From f96b73c15fd840f7eba18f7f4cbdded888d440b9 Mon Sep 17 00:00:00 2001 From: Kam Date: Wed, 23 Sep 2026 12:36:15 +0300 Subject: [PATCH 1/6] feat: add a DevTools examples app and harden the source scanners Adds an examples section to the demo app, one page per inspector, so serving the app and opening the popup shows every panel filled with real data instead of an empty tree. Examples app - Signals: signal, computed, linkedSignal, effect, resource, view and content queries, plus inputs, outputs and a model on projected cards. - Components: a required input, a model, and an attribute directive. - Injectors: a parent and a child providing the same tokens, one overriding the other. - Routes: children, grandchildren, a redirect, route data and a lazy child config. - A theme toggle (system/light/dark) with the dark palette inlined in index.html, since the deferred stylesheet defeated the pre-paint script and flashed on load. Popup - The launcher can be dragged anywhere rather than only to a corner, with a viewport clamp, keyboard moves and double-click to reset. - Open and close animate, honouring prefers-reduced-motion. - Escape is scoped to the popup, focus is only restored when it was inside, and the iframe and controls carry labels. Scanners - matchDelimiter, classBodyStart, maskStrings and stripComments now understand regex literals. A `/\[/` inside a providers array used to unbalance bracket matching and run to EOF, which was quadratic: 6400 components exhausted a 4GB heap, and now finishes in 34ms. - getProviders matches decorators in two steps with a bracket matcher instead of one backtracking regex, which removes a 46s hang. - lineCounter walks a file once and binary searches instead of counting newlines per match. - sourceRoots reads every project in angular.json, resolves symlinks before the containment check, folds nested roots in a linear pass, and honours a declared sourceRoot that happens to sit under a directory the walk would otherwise skip. - The ngrx gate reads the raw text, since masking hid the very import specifiers it looks for. - MCP tools carry JSON schemas, converted eagerly so a failing converter surfaces instead of being swallowed. Tests: 94 for the scanners and popup, 5 for the app. --- README.md | 29 +- app/index.html | 4 + app/src/app.ts | 45 +- app/src/pages/component-tree.ts | 8 +- app/src/pages/dashboard.ts | 4 +- app/src/pages/di-inspector.ts | 8 +- app/src/pages/route-inspector.ts | 4 +- app/src/pages/signal-inspector.ts | 6 +- app/src/pages/store-inspector.ts | 6 +- ...=> browser-agent-rpc-BXhoSh1z-BSqk5AzH.js} | 2 +- .../ui/assets/index-CyR_EFCd.js | 50 +- extension/ui/assets/index-DOHC4c_4.js | 162 ---- extension/ui/index.html | 4 +- ...=> browser-agent-rpc-BXhoSh1z-BSqk5AzH.js} | 2 +- .../dist/assets/index-CyR_EFCd.js | 896 ++++++++++++++++++ packages/ng-devtools-assets/dist/index.html | 4 +- packages/ng-devtools/package.json | 4 +- .../src/__tests__/agent-tools.test.ts | 61 ++ .../ng-devtools/src/__tests__/popup.test.ts | 74 ++ packages/ng-devtools/src/devframe.ts | 63 +- packages/ng-devtools/src/overlay.ts | 38 +- packages/ng-devtools/src/popup.ts | 277 +++++- .../src/rpc/__tests__/agent-schema.test.ts | 89 ++ .../src/rpc/__tests__/fixture-dir.ts | 12 + .../src/rpc/__tests__/get-components.test.ts | 109 +++ .../src/rpc/__tests__/get-ngrx-store.test.ts | 52 + .../src/rpc/__tests__/get-providers.test.ts | 113 +++ .../src/rpc/__tests__/get-routes.test.ts | 23 +- .../src/rpc/__tests__/get-signals.test.ts | 12 +- .../src/rpc/__tests__/source-roots.test.ts | 123 +++ .../src/rpc/__tests__/source-scan.test.ts | 141 +++ packages/ng-devtools/src/rpc/agent-schema.ts | 28 + packages/ng-devtools/src/rpc/build-meta.ts | 3 +- .../ng-devtools/src/rpc/get-components.ts | 119 ++- .../ng-devtools/src/rpc/get-ngrx-store.ts | 51 +- packages/ng-devtools/src/rpc/get-providers.ts | 98 +- packages/ng-devtools/src/rpc/get-routes.ts | 32 +- packages/ng-devtools/src/rpc/get-signals.ts | 117 +-- packages/ng-devtools/src/rpc/source-scan.ts | 305 +++++- pnpm-lock.yaml | 12 + src/app/app.css | 56 +- src/app/app.html | 9 +- src/app/app.routes.ts | 6 + src/app/app.spec.ts | 2 +- src/app/app.ts | 10 +- src/app/examples/components-example.ts | 81 ++ src/app/examples/di-child.ts | 50 + src/app/examples/di-example.ts | 87 ++ src/app/examples/di-tokens.ts | 19 + src/app/examples/example-page.ts | 71 ++ src/app/examples/example-panel.ts | 45 + src/app/examples/example-settings.ts | 11 + src/app/examples/examples-overview.ts | 139 +++ src/app/examples/examples.routes.ts | 48 + src/app/examples/examples.ts | 94 ++ src/app/examples/highlight.directive.ts | 25 + src/app/examples/route-panel.ts | 51 + src/app/examples/routes-example.ts | 62 ++ src/app/examples/signals-example.ts | 182 ++++ src/app/examples/stat-card.ts | 77 ++ src/app/pages/about.ts | 2 +- src/app/pages/home.ts | 8 + src/app/products/product-detail.ts | 26 +- src/app/products/product-list.ts | 30 +- src/app/theme-toggle.spec.ts | 58 ++ src/app/theme-toggle.ts | 84 ++ src/index.html | 71 ++ src/styles.css | 99 ++ 68 files changed, 4101 insertions(+), 592 deletions(-) rename extension/ui/assets/{browser-agent-rpc-BXhoSh1z-CQswxhBW.js => browser-agent-rpc-BXhoSh1z-BSqk5AzH.js} (93%) rename packages/ng-devtools-assets/dist/assets/index-BGQfD5bN.js => extension/ui/assets/index-CyR_EFCd.js (97%) delete mode 100644 extension/ui/assets/index-DOHC4c_4.js rename packages/ng-devtools-assets/dist/assets/{browser-agent-rpc-BXhoSh1z-D2qrD2G8.js => browser-agent-rpc-BXhoSh1z-BSqk5AzH.js} (93%) create mode 100644 packages/ng-devtools-assets/dist/assets/index-CyR_EFCd.js create mode 100644 packages/ng-devtools/src/__tests__/agent-tools.test.ts create mode 100644 packages/ng-devtools/src/__tests__/popup.test.ts create mode 100644 packages/ng-devtools/src/rpc/__tests__/agent-schema.test.ts create mode 100644 packages/ng-devtools/src/rpc/__tests__/fixture-dir.ts create mode 100644 packages/ng-devtools/src/rpc/__tests__/get-components.test.ts create mode 100644 packages/ng-devtools/src/rpc/__tests__/get-ngrx-store.test.ts create mode 100644 packages/ng-devtools/src/rpc/__tests__/get-providers.test.ts create mode 100644 packages/ng-devtools/src/rpc/__tests__/source-roots.test.ts create mode 100644 packages/ng-devtools/src/rpc/__tests__/source-scan.test.ts create mode 100644 packages/ng-devtools/src/rpc/agent-schema.ts create mode 100644 src/app/examples/components-example.ts create mode 100644 src/app/examples/di-child.ts create mode 100644 src/app/examples/di-example.ts create mode 100644 src/app/examples/di-tokens.ts create mode 100644 src/app/examples/example-page.ts create mode 100644 src/app/examples/example-panel.ts create mode 100644 src/app/examples/example-settings.ts create mode 100644 src/app/examples/examples-overview.ts create mode 100644 src/app/examples/examples.routes.ts create mode 100644 src/app/examples/examples.ts create mode 100644 src/app/examples/highlight.directive.ts create mode 100644 src/app/examples/route-panel.ts create mode 100644 src/app/examples/routes-example.ts create mode 100644 src/app/examples/signals-example.ts create mode 100644 src/app/examples/stat-card.ts create mode 100644 src/app/theme-toggle.spec.ts create mode 100644 src/app/theme-toggle.ts diff --git a/README.md b/README.md index faecb7d..eb0395e 100644 --- a/README.md +++ b/README.md @@ -89,15 +89,19 @@ When embedded in Express, the MCP endpoint is also available over HTTP at `/__ng #### Agent Tools -| Tool | Description | -| ------------------------------- | ------------------------------------ | -| `ng-devtools:get-routes` | List Angular routes from source | -| `ng-devtools:get-components` | Discover components, inputs, outputs | -| `ng-devtools:build-meta` | Angular/TS versions, SSR status | -| `ng-devtools:highlight` | Highlight a component in the page | -| `ng-devtools:inspect-signals` | Signal graph for a component | -| `ng-devtools:inspect-providers` | DI providers and resolution path | -| `ng-devtools:get-ngrx-store` | Scan source for NgRx store patterns | +MCP clients see these with an underscore, as `ng-devtools_get-routes`. + +| Tool | Description | +| ------------------------------- | ----------------------------------------------------------- | +| `ng-devtools:get-routes` | List Angular routes from source | +| `ng-devtools:get-components` | Discover components and directives, with inputs and outputs | +| `ng-devtools:get-signals` | Signal declarations from source | +| `ng-devtools:get-providers` | DI providers from source | +| `ng-devtools:build-meta` | Angular/TS versions, SSR status | +| `ng-devtools:highlight` | Highlight a component in the page | +| `ng-devtools:inspect-signals` | Signal graph a connected page reported | +| `ng-devtools:inspect-providers` | Injector tree a connected page reported | +| `ng-devtools:get-ngrx-store` | Scan source for NgRx store patterns | #### Agent Resources @@ -142,6 +146,13 @@ import { initOverlay } from '@santoshyadavdev/ng-devtools/overlay'; const dispose = await initOverlay(); ``` +It looks for the devframe connection next to the page and then at +`/__ng-devtools/`. Pass `baseURL` when it is mounted somewhere else: + +```ts +const dispose = await initOverlay({ baseURL: '/__my-devtools/' }); +``` + ### In-Page Popup The devtools can appear as a floating popup directly on your page — no browser extension needed: diff --git a/app/index.html b/app/index.html index d724123..2386b61 100644 --- a/app/index.html +++ b/app/index.html @@ -11,6 +11,10 @@ box-sizing: border-box; margin: 0; } + :root { + /* Angular brand, from the wordmark on angular.dev. */ + --accent: #ff6b85; + } body { font-family: system-ui, diff --git a/app/src/app.ts b/app/src/app.ts index ded62da..9c37d5e 100644 --- a/app/src/app.ts +++ b/app/src/app.ts @@ -15,17 +15,28 @@ type Tab = 'dashboard' | 'components' | 'routes' | 'signals' | 'injectors' | 'st template: `
- - - - + + Angular DevTools
@@ -80,7 +91,11 @@ type Tab = 'dashboard' | 'components' | 'routes' | 'signals' | 'injectors' | 'st align-items: center; gap: 8px; font-weight: 600; - color: #a78bfa; + color: var(--accent); + } + .brand span { + color: var(--accent); + white-space: nowrap; } nav { display: flex; @@ -169,7 +184,11 @@ export class App implements OnInit, OnDestroy { function detectBaseURL(): string | undefined { const params = new URLSearchParams(location.search); const fromQuery = params.get('baseURL'); - if (fromQuery) return fromQuery; + // Same origin only: any page can open this URL, and this value decides where + // the panel opens its RPC channel. + if (fromQuery && new URL(fromQuery, location.href).origin === location.origin) { + return fromQuery; + } if (location.pathname.includes('__ng-devtools')) return undefined; return '/__ng-devtools/'; diff --git a/app/src/pages/component-tree.ts b/app/src/pages/component-tree.ts index e8d8bb9..f352650 100644 --- a/app/src/pages/component-tree.ts +++ b/app/src/pages/component-tree.ts @@ -114,7 +114,7 @@ interface ProviderEntry { outline: none; } input:focus { - border-color: #a78bfa; + border-color: var(--accent); } button { padding: 8px 16px; @@ -148,12 +148,12 @@ interface ProviderEntry { transition: border-color 0.15s; } .component-item:hover { - border-color: #a78bfa; + border-color: var(--accent); } .selector { font-family: monospace; font-size: 15px; - color: #a78bfa; + color: var(--accent); font-weight: 600; } .file { @@ -178,7 +178,7 @@ interface ProviderEntry { } .detail h3 { font-family: monospace; - color: #a78bfa; + color: var(--accent); margin-bottom: 12px; } dl { diff --git a/app/src/pages/dashboard.ts b/app/src/pages/dashboard.ts index 723ac97..e8e66aa 100644 --- a/app/src/pages/dashboard.ts +++ b/app/src/pages/dashboard.ts @@ -62,7 +62,7 @@ import type { DevframeRpcClient } from 'devframe/client'; transition: border-color 0.15s; } .card.clickable:hover { - border-color: #a78bfa; + border-color: var(--accent); } h3 { font-size: 13px; @@ -87,7 +87,7 @@ import type { DevframeRpcClient } from 'devframe/client'; .big { font-size: 36px; font-weight: 700; - color: #a78bfa; + color: var(--accent); } .sub { font-size: 13px; diff --git a/app/src/pages/di-inspector.ts b/app/src/pages/di-inspector.ts index 5f808d9..bf69494 100644 --- a/app/src/pages/di-inspector.ts +++ b/app/src/pages/di-inspector.ts @@ -168,7 +168,7 @@ const TYPE_COLORS: Record = { outline: none; } input[type='text']:focus { - border-color: #a78bfa; + border-color: var(--accent); } .checkbox { display: flex; @@ -209,8 +209,8 @@ const TYPE_COLORS: Record = { background: #18181b; } .injector-row.selected { - background: #1e1b4b; - border-color: #a78bfa; + background: color-mix(in srgb, var(--accent) 22%, transparent); + border-color: var(--accent); } .type-badge { font-size: 10px; @@ -270,7 +270,7 @@ const TYPE_COLORS: Record = { } .token { font-family: monospace; - color: #a78bfa; + color: var(--accent); } .source-label { font-size: 13px; diff --git a/app/src/pages/route-inspector.ts b/app/src/pages/route-inspector.ts index 957c91f..e094945 100644 --- a/app/src/pages/route-inspector.ts +++ b/app/src/pages/route-inspector.ts @@ -65,7 +65,7 @@ interface RouteInfo { outline: none; } input:focus { - border-color: #a78bfa; + border-color: var(--accent); } button { padding: 8px 16px; @@ -111,7 +111,7 @@ interface RouteInfo { } .path { font-family: monospace; - color: #a78bfa; + color: var(--accent); font-weight: 500; } .file { diff --git a/app/src/pages/signal-inspector.ts b/app/src/pages/signal-inspector.ts index 771499c..4c5e8e6 100644 --- a/app/src/pages/signal-inspector.ts +++ b/app/src/pages/signal-inspector.ts @@ -204,7 +204,7 @@ const KIND_COLORS: Record = { outline: none; } input:focus { - border-color: #a78bfa; + border-color: var(--accent); } .label { font-size: 13px; @@ -264,7 +264,7 @@ const KIND_COLORS: Record = { border-color: #3f3f46; } .node-card.selected { - border-color: #a78bfa; + border-color: var(--accent); } .node-header { display: flex; @@ -318,7 +318,7 @@ const KIND_COLORS: Record = { } .detail-panel h3 { font-family: monospace; - color: #a78bfa; + color: var(--accent); margin-bottom: 12px; } .detail-panel h4 { diff --git a/app/src/pages/store-inspector.ts b/app/src/pages/store-inspector.ts index 3cadc19..460266d 100644 --- a/app/src/pages/store-inspector.ts +++ b/app/src/pages/store-inspector.ts @@ -189,7 +189,7 @@ const KIND_COLORS: Record = { outline: none; } input:focus { - border-color: #a78bfa; + border-color: var(--accent); } .toggle-group { display: flex; @@ -371,7 +371,7 @@ const KIND_COLORS: Record = { border-color: #3f3f46; } .action-card.selected { - border-color: #a78bfa; + border-color: var(--accent); } .action-type { font-family: monospace; @@ -385,7 +385,7 @@ const KIND_COLORS: Record = { .detail-panel { margin-top: 16px; background: #18181b; - border: 1px solid #a78bfa; + border: 1px solid var(--accent); border-radius: 10px; padding: 16px; } diff --git a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-CQswxhBW.js b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-BSqk5AzH.js similarity index 93% rename from extension/ui/assets/browser-agent-rpc-BXhoSh1z-CQswxhBW.js rename to extension/ui/assets/browser-agent-rpc-BXhoSh1z-BSqk5AzH.js index b799952..3f62835 100644 --- a/extension/ui/assets/browser-agent-rpc-BXhoSh1z-CQswxhBW.js +++ b/extension/ui/assets/browser-agent-rpc-BXhoSh1z-BSqk5AzH.js @@ -1 +1 @@ -import{t as e}from"./index-DOHC4c_4.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-CyR_EFCd.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/packages/ng-devtools-assets/dist/assets/index-BGQfD5bN.js b/extension/ui/assets/index-CyR_EFCd.js similarity index 97% rename from packages/ng-devtools-assets/dist/assets/index-BGQfD5bN.js rename to extension/ui/assets/index-CyR_EFCd.js index 02a6a4c..aef05a3 100644 --- a/packages/ng-devtools-assets/dist/assets/index-BGQfD5bN.js +++ b/extension/ui/assets/index-CyR_EFCd.js @@ -5,7 +5,7 @@ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function $n(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var er=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=qn(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(Xn(c))try{c()}catch(e){i=e instanceof Qn?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=qn(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{rr(f)}catch(e){i??=[],e instanceof Qn?i=Yn(Yn([],Jn(i)),Jn(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 Qn(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)rr(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)&&$n(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&$n(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),tr=er.EMPTY;function nr(e){return e instanceof er||e&&`closed`in e&&Xn(e.remove)&&Xn(e.add)&&Xn(e.unsubscribe)}function rr(e){Xn(e)?e():e.unsubscribe()}var ir={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ar={setTimeout:function(e,t){var n=[...arguments].slice(2),r=ar.delegate;return r?.setTimeout?r.setTimeout.apply(r,Yn([e,t],Jn(n))):setTimeout.apply(void 0,Yn([e,t],Jn(n)))},clearTimeout:function(e){return(ar.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function or(e){ar.setTimeout(function(){var t=ir.onUnhandledError;if(t)t(e);else throw e})}function sr(){}var cr=(function(){return dr(`C`,void 0,void 0)})();function lr(e){return dr(`E`,void 0,e)}function ur(e){return dr(`N`,e,void 0)}function dr(e,t,n){return{kind:e,value:t,error:n}}var fr=null;function pr(e){if(ir.useDeprecatedSynchronousErrorHandling){var t=!fr;if(t&&(fr={errorThrown:!1,error:null}),e(),t){var n=fr,r=n.errorThrown,i=n.error;if(fr=null,r)throw i}}else e()}function mr(e){ir.useDeprecatedSynchronousErrorHandling&&fr&&(fr.errorThrown=!0,fr.error=e)}var hr=function(e){Kn(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,nr(t)&&t.add(n)):n.destination=Cr,n}return t.create=function(e,t,n){return new yr(e,t,n)},t.prototype.next=function(e){this.isStopped?Sr(ur(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Sr(lr(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Sr(cr,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}(er),gr=Function.prototype.bind;function _r(e,t){return gr.call(e,t)}var vr=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){br(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){br(e)}else br(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){br(e)}},e}(),yr=function(e){Kn(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(Xn(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&ir.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&_r(t.next,o),error:t.error&&_r(t.error,o),complete:t.complete&&_r(t.complete,o)}):a=t}return i.destination=new vr(a),i}return t}(hr);function br(e){ir.useDeprecatedSynchronousErrorHandling?mr(e):or(e)}function xr(e){throw e}function Sr(e,t){var n=ir.onStoppedNotification;n&&ar.setTimeout(function(){return n(e,t)})}var Cr={closed:!0,next:sr,error:xr,complete:sr},wr=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Tr(e){return e}function Er(e){return e.length===0?Tr:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Dr=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=Ar(e)?e:new yr(e,t,n);return pr(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=Or(t),new t(function(t,r){var i=new yr({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[wr]=function(){return this},e.prototype.pipe=function(){return Er([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Or(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 Or(e){return e??ir.Promise??Promise}function kr(e){return e&&Xn(e.next)&&Xn(e.error)&&Xn(e.complete)}function Ar(e){return e&&e instanceof hr||kr(e)&&nr(e)}function jr(e){return Xn(e?.lift)}function Mr(e){return function(t){if(jr(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Nr(e,t,n,r,i){return new Pr(e,t,n,r,i)}var Pr=function(e){Kn(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(hr),Fr=Zn(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Ir=function(e){Kn(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Lr(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Fr},t.prototype.next=function(e){var t=this;pr(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=qn(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;pr(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;pr(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?tr:(this.currentObservers=null,a.push(e),new er(function(){t.currentObservers=null,$n(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 Dr;return e.source=this,e},t.create=function(e,t){return new Lr(e,t)},t}(Dr),Lr=function(e){Kn(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??tr},t}(Ir),Rr=function(e){Kn(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Ir);function zr(e,t){return Mr(function(n,r){var i=0;n.subscribe(Nr(r,function(n){r.next(e.call(t,n,i++))}))})}var Br=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,F=class extends Error{code;constructor(e,t){super(Hr(e,t)),this.code=e}};function Vr(e){return`NG0${Math.abs(e)}`}function Hr(e,t){return`${Vr(e)}${t?`: `+t:``}`}function I(e){for(let t in e)if(e[t]===I)return t;throw Error(``)}function Ur(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(Ur).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` `);return r>=0?n.slice(0,r):n}function Wr(e,t){return e?t?`${e} ${t}`:e:t||``}var Gr=I({__forward_ref__:I});function Kr(e){return e.__forward_ref__=Kr,e}function qr(e){return Jr(e)?e():e}function Jr(e){return typeof e==`function`&&Object.hasOwn(e,Gr)&&e.__forward_ref__===Kr}function Yr(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Xr(e){return Zr(e,ei)}function Zr(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Qr(e){return(e?.[ei]??null)||null}function $r(e){return e&&Object.hasOwn(e,ti)?e[ti]:null}var ei=I({ɵprov:I}),ti=I({ɵinj:I}),L=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=Yr({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function ni(e){return e&&!!e.ɵproviders}var ri=I({ɵcmp:I}),ii=I({ɵdir:I}),ai=I({ɵpipe:I}),oi=I({ɵfac:I}),si=I({__NG_ELEMENT_ID__:I}),ci=I({__NG_ENV_ID__:I});function li(e){return fi(e,`@Component`),e[ri]||null}function ui(e){return fi(e,`@Directive`),e[ii]||null}function di(e){return fi(e,`@Pipe`),e[ai]||null}function fi(e,t){if(e==null)throw new F(-919,!1)}function pi(e){return typeof e==`string`?e:e==null?``:String(e)}var mi=I({ngErrorCode:I}),hi=I({ngErrorMessage:I}),gi=I({ngTokenPath:I});function _i(e,t){return yi(``,-200,t)}function vi(e,t){throw new F(-201,!1)}function yi(e,t,n){let r=new F(t,e);return r[mi]=t,r[hi]=e,n&&(r[gi]=n),r}function bi(e){return e[mi]}var xi;function Si(){return xi}function Ci(e){let t=xi;return xi=e,t}function wi(e,t,n){let r=Xr(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;vi(e,``)}var Ti={},Ei=`__NG_DI_FLAG__`,Di=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=ki(t)||0;try{return this.injector.get(e,n&8?null:Ti,n)}catch(e){if(Wn(e))return e;throw e}}};function Oi(e,t=0){let n=Vn();if(n===void 0)throw new F(-203,!1);if(n===null)return wi(e,void 0,t);{let r=Ai(t),i=n.retrieve(e,r);if(Wn(i)){if(r.optional)return null;throw i}return i}}function R(e,t=0){return(Si()||Oi)(qr(e),t)}function z(e,t){return R(e,ki(t))}function ki(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Ai(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function ji(e){let t=[];for(let n=0;nArray.isArray(e)?Pi(e,t):t(e))}function Fi(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Ii(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Li(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function Ri(e,t,n){let r=Bi(e,t);return r>=0?e[r|1]=n:(r=~r,Li(e,r,t,n)),r}function zi(e,t){let n=Bi(e,t);if(n>=0)return e[n|1]}function Bi(e,t){return Vi(e,t,1)}function Vi(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 Pi(t,e=>{let t=e;Zi(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Xi(i,a),n}function Xi(e,t){for(let n=0;n{t(e,r)})}}function Zi(e,t,n,r){if(e=qr(e),!e)return!1;let i=null,a=$r(e),o=!a&&li(e);if(!a&&!o){let t=e.ngModule;if(a=$r(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)Zi(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{Pi(a.imports,i=>{Zi(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Xi(e,t)}if(!s){let e=Ni(i)||(()=>new i);t({provide:i,useFactory:e,deps:Ui},i),t({provide:Ki,useValue:i,multi:!0},i),t({provide:Wi,useValue:()=>R(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Qi(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Qi(e,t){for(let n of e)ni(n)&&(n=n.ɵproviders),Array.isArray(n)?Qi(n,t):t(n)}var $i=I({provide:String,useValue:I});function ea(e){return typeof e==`object`&&!!e&&$i in e}function ta(e){return!!(e&&e.useExisting)}function na(e){return!!(e&&e.useFactory)}function ra(e){return typeof e==`function`}var ia=new L(``),aa={},oa={},sa=void 0;function ca(){return sa===void 0&&(sa=new qi),sa}var la=class{},ua=class extends la{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,ba(e,e=>this.processProvider(e)),this.records.set(Gi,ga(void 0,this)),r.has(`environment`)&&this.records.set(la,ga(void 0,this));let i=this.records.get(ia);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Ki,Ui,{self:!0}))}retrieve(e,t){let n=ki(t)||0;try{return this.get(e,Ti,n)}catch(e){if(Wn(e))return e;throw e}}destroy(){ha(this),this._destroyed=!0;let e=P(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(),P(e)}}onDestroy(e){return ha(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){ha(this);let t=Hn(this),n=Ci(void 0);try{return e()}finally{Hn(t),Ci(n)}}get(e,t=Ti,n){if(ha(this),Object.hasOwn(e,ci))return e[ci](this);let r=ki(n),i=Hn(this),a=Ci(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=ya(e)&&Xr(e);t=n&&this.injectableDefInScope(n)?ga(da(e),aa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?ca():this.parent;return t=r&8&&t===Ti?null:t,n.get(e,t)}catch(e){let t=bi(e);throw t===-200||t===-201?new F(t,null):e}finally{Ci(a),Hn(i)}}resolveInjectorInitializers(){let e=P(null),t=Hn(this),n=Ci(void 0);try{let e=this.get(Wi,Ui,{self:!0});for(let t of e)t()}finally{Hn(t),Ci(n),P(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=qr(e);let t=ra(e)?e:qr(e&&e.provide),n=pa(e);if(!ra(e)&&e.multi===!0){let n=this.records.get(t);n||(n=ga(void 0,aa,!0),n.factory=()=>ji(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=P(null);try{if(t.value===oa)throw _i(``);return t.value===aa&&(t.value=oa,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&va(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{P(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=qr(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 da(e){let t=Xr(e),n=t===null?Ni(e):t.factory;if(n!==null)return n;if(e instanceof L)throw new F(-204,!1);if(e instanceof Function)return fa(e);throw new F(-204,!1)}function fa(e){if(e.length>0)throw new F(-204,!1);let t=Qr(e);return t===null?()=>new e:()=>t.factory(e)}function pa(e){return ea(e)?ga(void 0,e.useValue):ga(ma(e),aa)}function ma(e,t,n){let r;if(ra(e)){let t=qr(e);return Ni(t)||da(t)}if(ea(e))r=()=>qr(e.useValue);else if(na(e))r=()=>e.useFactory(...ji(e.deps||[]));else if(ta(e))r=(t,n)=>R(qr(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=qr(e&&(e.useClass||e.provide));if(_a(e))r=()=>new t(...ji(e.deps));else return Ni(t)||da(t)}return r}function ha(e){if(e.destroyed)throw new F(-205,!1)}function ga(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function _a(e){return!!e.deps}function va(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function ya(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function ba(e,t){for(let n of e)Array.isArray(n)?ba(n,t):n&&ni(n)?ba(n.ɵproviders,t):t(n)}function xa(e,t){let n;e instanceof ua?(ha(e),n=e):n=new Di(e);let r=Hn(n),i=Ci(void 0);try{return t()}finally{Hn(r),Ci(i)}}function Sa(){return Si()!==void 0||Vn()!=null}var Ca=1;function wa(e){return Array.isArray(e)&&typeof e[Ca]==`object`}function Ta(e){return Array.isArray(e)&&e[Ca]===!0}function Ea(e){return!!(e.flags&4)}function Da(e){return e.componentOffset>-1}function Oa(e){return(e.flags&1)==1}function ka(e){return!!e.template}function Aa(e){return!!(e[2]&512)}function ja(e){return(e[2]&256)==256}var Ma=`math`;function Na(e){for(;Array.isArray(e);)e=e[0];return e}function Pa(e,t){return Na(t[e])}function Fa(e,t){return Na(t[e.index])}function Ia(e,t){return e.data[t]}function La(e,t){return e[t]}function Ra(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function za(e,t){let n=t[e];return wa(n)?n:n[0]}function Ba(e){return(e[2]&128)==128}function Va(e,t){return t==null?null:e[t]}function Ha(e){e[17]=0}function Ua(e){e[2]&1024||(e[2]|=1024,Ba(e)&&qa(e))}function Wa(e,t){for(;e>0;)t=t[14],e--;return t}function Ga(e){return!!(e[2]&9216||e[24]?.dirty)}function Ka(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),Ga(e)&&qa(e)}function qa(e){e[10].changeDetectionScheduler?.notify(0);let t=Xa(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!Ba(t)));)t=Xa(t)}function Ja(e,t){if(ja(e))throw new F(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Ya(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Xa(e){let t=e[3];return Ta(t)?t[3]:t}function Za(e){return e[7]??=[]}function Qa(e){return e.cleanup??=[]}var B={lFrame:Po(null),bindingsEnabled:!0,skipHydrationRootTNode:null},$a=!1;function eo(){return B.lFrame.elementDepthCount}function to(){B.lFrame.elementDepthCount++}function no(){B.lFrame.elementDepthCount--}function ro(){return B.bindingsEnabled}function io(){return B.skipHydrationRootTNode!==null}function ao(e){return B.skipHydrationRootTNode===e}function oo(){B.skipHydrationRootTNode=null}function V(){return B.lFrame.lView}function so(){return B.lFrame.tView}function co(e){return B.lFrame.contextLView=e,e[8]}function lo(e){return B.lFrame.contextLView=null,e}function uo(){let e=fo();for(;e!==null&&e.type===64;)e=e.parent;return e}function fo(){return B.lFrame.currentTNode}function po(){let e=B.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function mo(e,t){let n=B.lFrame;n.currentTNode=e,n.isParent=t}function ho(){return B.lFrame.isParent}function go(){B.lFrame.isParent=!1}function _o(){return $a}function vo(e){let t=$a;return $a=e,t}function yo(){let e=B.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function bo(){return B.lFrame.bindingIndex}function xo(e){return B.lFrame.bindingIndex=e}function So(){return B.lFrame.bindingIndex++}function Co(e){let t=B.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function wo(){return B.lFrame.inI18n}function To(e,t){let n=B.lFrame;n.bindingIndex=n.bindingRootIndex=e,Do(t)}function Eo(){return B.lFrame.currentDirectiveIndex}function Do(e){B.lFrame.currentDirectiveIndex=e}function Oo(e){let t=B.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function ko(e){B.lFrame.currentQueryIndex=e}function Ao(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function jo(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=Ao(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=B.lFrame=No();return r.currentTNode=t,r.lView=e,!0}function Mo(e){let t=No(),n=e[1];B.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function No(){let e=B.lFrame,t=e===null?null:e.child;return t===null?Po(e):t}function Po(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 Fo(){let e=B.lFrame;return B.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Io=Fo;function Lo(){let e=Fo();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 Ro(e){return(B.lFrame.contextLView=Wa(e,B.lFrame.contextLView))[8]}function zo(){return B.lFrame.selectedIndex}function Bo(e){B.lFrame.selectedIndex=e}function Vo(){let e=B.lFrame;return Ia(e.tView,e.selectedIndex)}function Ho(){B.lFrame.currentNamespace=`svg`}function Uo(){Wo()}function Wo(){B.lFrame.currentNamespace=null}function Go(){return B.lFrame.currentNamespace}var Ko=!0;function qo(){return Ko}function Jo(e){Ko=e}function Yo(e,t=null,n=null,r){let i=Xo(e,t,n,r);return i.resolveInjectorInitializers(),i}function Xo(e,t=null,n=null,r,i=new Set){return new ua([n||Ui,Ji(e)],t||ca(),null,i)}var Zo=class e{static THROW_IF_NOT_FOUND=Ti;static NULL=new qi;static create(e,t){if(Array.isArray(e))return Yo({name:``},t,e,``);{let t=e.name??``;return Yo({name:t},e.parent,e.providers,t)}}static ɵprov=Yr({token:e,providedIn:`any`,factory:()=>R(Gi)});static __NG_ELEMENT_ID__=-1},Qo=new L(``),$o=class{static __NG_ELEMENT_ID__=ts;static __NG_ENV_ID__=e=>e},es=class extends $o{_lView;constructor(e){super(),this._lView=e}get destroyed(){return ja(this._lView)}onDestroy(e){let t=this._lView;return Ja(t,e),()=>Ya(t,e)}};function ts(){return new es(V())}var ns=new L(``),rs=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Rr(!1);debugTaskTracker=z(ns,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Dr(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=Yr({token:e,providedIn:`root`,factory:()=>new e})}return e})(),is=class extends Ir{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Sa()&&(this.destroyRef=z($o,{optional:!0})??void 0,this.pendingTasks=z(rs,{optional:!0})??void 0)}emit(e){let t=P(null);try{super.next(e)}finally{P(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 er&&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 as(...e){}function os(e){let t,n;function r(){e=as;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 ss(e){return queueMicrotask(()=>e()),()=>{e=as}}var cs=`isAngularZone`,ls=`isAngularZone_ID`,us=0,ds=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new is(!1);onMicrotaskEmpty=new is(!1);onStable=new is(!1);onError=new is(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new F(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,hs(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(cs)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new F(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new F(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,fs,as,as);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)}},fs={};function ps(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 ms(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){os(()=>{e.callbackScheduled=!1,gs(e),e.isCheckStableRunning=!0,ps(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),gs(e)}function hs(e){let t=()=>{ms(e)},n=us++;e._inner=e._inner.fork({name:`angular`,properties:{[cs]:!0,[ls]:n,[ls+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(bs(s))return n.invokeTask(i,a,o,s);try{return _s(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),vs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return _s(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!xs(s)&&t(),vs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,gs(e),ps(e)):i.change==`macroTask`&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,n,r,i)=>(t.handleError(r,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}function gs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function _s(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function vs(e){e._nesting--,ps(e)}var ys=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new is;onMicrotaskEmpty=new is;onStable=new is;onError=new is;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function bs(e){return Ss(e,`__ignore_ng_zone__`)}function xs(e){return Ss(e,`__scheduler_tick__`)}function Ss(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Cs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},ws=new L(``,{factory:()=>{let e=z(ds),t=z(la),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Cs),n.handleError(r))})}}}),Ts={provide:Wi,useValue:()=>{z(Cs,{optional:!0})},multi:!0};function H(e,t){let[n,r,i]=Mn(e,t?.equal),a=n;return a[en],a.set=r,a.update=i,a.asReadonly=Es.bind(a),a}function Es(){let e=this[en];if(e.readonlyFn===void 0){let t=()=>this();t[en]=e,e.readonlyFn=t}return e.readonlyFn}var Ds=new L(``,{factory:()=>Os}),Os=`ng`,ks=new L(``),As=new L(``,{providedIn:`platform`,factory:()=>`unknown`}),js=new L(``,{factory:()=>z(Qo).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),Ms=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=Ns}return e})();function Ns(){return new Ms(V(),uo())}var Ps=class{},Fs=new L(``,{factory:()=>!0}),Is=new L(``),Ls=(()=>{class e{static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>new Rs})}return e})(),Rs=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}},zs=class{[en];constructor(e){this[en]=e}destroy(){this[en].destroy()}};function Bs(e,t){let n=t?.injector??z(Zo),r=t?.manualCleanup===!0?null:n.get($o),i,a=n.get(Ms,null,{optional:!0}),o=n.get(Ps);return a===null?i=Gs(e,n.get(Ls),o):(i=Ws(a.view,o,e),r instanceof es&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new zs(i)}var Vs={...Rn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=vo(!1);try{zn(this)}finally{vo(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=P(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],P(e)}}},Hs={...Vs,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(gn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},Us={...Vs,consumerMarkedDirty(){this.view[2]|=8192,qa(this.view),this.notifier.notify(13)},destroy(){if(gn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function Ws(e,t,n){let r=Object.create(Us);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=Ks(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function Gs(e,t,n){let r=Object.create(Hs);return r.fn=Ks(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 Ks(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}var qs=(()=>{class e{internalPendingTasks=z(rs);scheduler=z(Ps);errorHandler=z(ws);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let t=this.add();try{e().catch(this.errorHandler).finally(t)}catch(e){this.errorHandler(e),t()}}static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Js=Symbol(`InputSignalNode#UNSET`),Ys={...In,transformFn:void 0,applyValueToInputSignal(e,t){Pn(e,t)}};function Xs(e){return{toString:e}.toString()}var U=(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})(U||{});function Zs(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Qs=null;function $s(){return Qs}var ec=[],W=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,sc(o,a)):sc(o,a)}var lc=-1,uc=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 dc(e){return!!(e.flags&8)}function fc(e){return!!(e.flags&16)}function pc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function xc(e,t){let n=bc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Sc=!0;function Cc(e){let t=Sc;return Sc=e,t}var wc=255,Tc=5,Ec=0,Dc={};function Oc(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,si)&&(r=n[si]),r??=n[si]=Ec++;let i=r&wc,a=1<>Tc)]|=a}function kc(e,t){let n=jc(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,Ac(r.data,e),Ac(t,null),Ac(r.blueprint,null));let i=Mc(e,t),a=e.injectorIndex;if(vc(i)){let e=yc(i),n=xc(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 Ac(e,t){e.push(0,0,0,0,0,0,0,0,t)}function jc(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Mc(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=qc(i),r===null)return lc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return lc}function Nc(e,t,n){Oc(e,t,n)}function Pc(e,t,n){if(n&8||e!==void 0)return e;vi(t,`NodeInjector`)}function Fc(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ci(void 0);try{return i?i.get(t,r,n&8):wi(t,r,n&8)}finally{Ci(a)}}return Pc(r,t,n)}function Ic(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Kc(e,t,n,r,Dc);if(i!==Dc)return i}let i=Lc(e,t,n,r,Dc);if(i!==Dc)return i}return Fc(t,n,r,i)}function Lc(e,t,n,r,i){let a=Vc(n);if(typeof a==`function`){if(!jo(t,e,r))return r&1?Pc(i,n,r):Fc(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))vi(n);else return e}finally{Io()}}else if(typeof a==`number`){let i=null,o=jc(e,t),s=lc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?Mc(e,t):t[o+8],s===lc||!Uc(r,!1)?o=-1:(i=t[1],o=yc(s),t=xc(s,t)));o!==-1;){let e=t[1];if(Hc(a,o,e.data)){let e=Rc(o,t,n,i,r,c);if(e!==Dc)return e}s=t[o+8],s!==lc&&Uc(r,t[1].data[o+8]===c)&&Hc(a,o,t)?(i=e,o=yc(s),t=xc(s,t)):o=-1}}return i}function Rc(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=zc(s,o,n,r==null?Da(s)&&Sc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?Dc:Bc(t,o,c,s,i)}function zc(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&&ka(e)&&e.type===n)return c}return null}function Bc(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof uc){let s=a;if(s.resolving)throw _i(``);let c=Cc(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ci(s.injectImpl):null;jo(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&tc(n,o[n],t)}finally{l!==null&&Ci(l),Cc(c),s.resolving=!1,Io()}}return a}function Vc(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,si)?e[si]:void 0;return typeof t==`number`?t>=0?t&wc:Gc:t}function Hc(e,t,n){let r=1<>Tc)]&r)}function Uc(e,t){return!(e&2)&&!(e&1&&t)}var Wc=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return Ic(this._tNode,this._lView,e,ki(n),t)}};function Gc(){return new Wc(uo(),V())}function Kc(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!Aa(o);){let e=Lc(a,o,n,r|2,Dc);if(e!==Dc)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,Dc,r);if(t!==Dc)return t}t=qc(o),o=o[14]}a=t}return i}function qc(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}var Jc=()=>(typeof requestIdleCallback<`u`?requestIdleCallback:e=>setTimeout(e)).bind(globalThis),Yc=()=>(typeof requestIdleCallback<`u`?cancelIdleCallback:clearTimeout).bind(globalThis),Xc=new L(``,{factory:()=>new Zc}),Zc=class{requestIdleCallback=Jc();cancelIdleCallback=Yc();requestOnIdle(e,t){return this.requestIdleCallback(e,t)}cancelOnIdle(e){return this.cancelIdleCallback(e)}};function Qc(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function $c(){return el(uo(),V())}function el(e,t){return new tl(Fa(e,t))}var tl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=$c}return e})();function nl(e){return(e.flags&128)==128}var rl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(rl||{}),il=new Map,al=0;function ol(){return al++}function sl(e){il.set(e[19],e)}function cl(e){il.delete(e[19])}var ll=`__ngContext__`;function ul(e,t){wa(t)?(e[ll]=t[19],sl(t)):e[ll]=t}function dl(e){return pl(e[12])}function fl(e){return pl(e[4])}function pl(e){for(;e!==null&&!Ta(e);)e=e[4];return e}var ml=void 0;function hl(e){ml=e}function gl(){if(ml!==void 0)return ml;if(typeof document<`u`)return document;throw new F(210,!1)}var _l=!1,vl=new L(``,{factory:()=>_l}),yl=new L(``),bl=new WeakMap;function xl(e,t){if(typeof e!=`object`||!e)return;let n=bl.get(e);n||(n=new WeakSet,bl.set(e,n)),n.add(t)}var Sl=new L(``);function Cl(e){return(e.flags&32)==32}var wl=()=>null;function Tl(e,t,n=!1){return wl(e,t,n)}function El(e){return e.get(yl,!1,{optional:!0})}function Dl(e,t){let n=e.contentQueries;if(n!==null){let r=P(null);try{for(let r=0;r|^->||--!>|)/g,Fl=`​$1​`;function Il(e){return e.replace(Nl,e=>e.replace(Pl,Fl))}function Ll(e,t){return e.createText(t)}function Rl(e,t,n){e.setValue(t,n)}function zl(e,t){return e.createComment(Il(t))}function Bl(e,t,n){return e.createElement(t,n)}function Vl(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Hl(e,t,n){e.appendChild(t,n)}function Ul(e,t,n,r,i){r===null?Hl(e,t,n):Vl(e,t,n,r,i)}function Wl(e,t,n,r){e.removeChild(null,t,n,r)}function Gl(e,t,n){e.setAttribute(t,`style`,n)}function Kl(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function ql(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&pc(e,t,r),i!==null&&Kl(e,t,i),a!==null&&Gl(e,t,a)}function Jl(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 Yl=`ng-template`;function Xl(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(eu(r))return!1;o=!0}}}}}return eu(r)||o}function eu(e){return!(e&1)}function tu(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!==``&&!eu(o)&&(t+=au(a,i),i=``),r=o,a||=!eu(r);n++}return i!==``&&(t+=au(a,i)),t}function su(e){return e.map(ou).join(`,`)}function cu(e){let t=[],n=[],r=1,i=2;for(;r=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),gu.add(n),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):(a&&n===a||c&&i&&c!==i&&(o===null||s===null||o===s))&&(r.splice(e,1),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),n.parentNode?.removeChild(n))}}function vu(e,t,n){let r=hu(n),i=mu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):mu.set(e,[{el:t,declarationView:r}])}var yu=(function(e){return e[e.CHANGE_DETECTION=0]=`CHANGE_DETECTION`,e[e.AFTER_NEXT_RENDER=1]=`AFTER_NEXT_RENDER`,e})(yu||{}),bu=new L(``),xu=new Set;function Su(e){xu.has(e)||(xu.add(e),performance?.mark?.(`mark_feature_usage`,{detail:{feature:e}}))}var Cu=(()=>{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>new e})}return e})(),wu=new L(``,{factory:()=>{let e=z(la),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Tu(e,t,n){let r=e.get(wu);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 Eu(e,t){let n=e.get(wu);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Du(e,t){let n=e.get(wu);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Ou(e,t){for(let[n,r]of t)Tu(e,r.animateFns)}function ku(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Ou(r,i)}function Au(e,t,n,r){try{n.get(Gi)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Eu(n,i.enter.get(t.index).animateFns);let a=ju(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];Nu(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&pu.add(e[19]),Tu(n,()=>Mu(e,t,i||void 0,a,r),i||void 0)}function ju(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 Mu(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&&Nu(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),Fu(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&pu.delete(e[19]),i(!0)})}else e&&pu.delete(e[19]),i(!1)}function Nu(e,t,n){if(t.type&12){let r=e[t.index];if(Ta(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,pu.delete(e[19])),n(!0)})}function Iu(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Ta(i)?c=i:wa(i)&&(l=!0,i=i[0]);let u=Na(i);e===0&&r!==null?(ku(s,r,a,n),o==null?Hl(t,r,u):Vl(t,r,u,o||null,!0)):e===1&&r!==null?(ku(s,r,a,n),Vl(t,r,u,o||null,!0),_u(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&vu(a,u,s),gu.delete(u),Au(s,a,n,e=>{if(gu.has(u)){gu.delete(u);return}Wl(t,u,l,e)})):e===3&&(gu.delete(u),Au(s,a,n,()=>{t.destroyNode(u)})),c!=null&&ad(t,e,n,c,a,r,o)}}function Lu(e,t){zu(e,t),t[0]=null,t[5]=null}function Ru(e,t,n,r,i,a){r[0]=i,r[5]=t,nd(e,r,n,1,i,a)}function zu(e,t){t[10].changeDetectionScheduler?.notify(9),nd(e,t,t[11],2,null,null)}function Bu(e){let t=e[12];if(!t)return Uu(e[1],e);for(;t;){let n=null;if(wa(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)wa(t)&&Uu(t[1],t),t=t[3];t===null&&(t=e),wa(t)&&Uu(t[1],t),n=t&&t[4]}t=n}}function Vu(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Hu(e,t){if(ja(t))return;let n=t[11];n.destroyNode&&nd(e,t,n,3,null,null),Bu(t)}function Uu(e,t){if(ja(t))return;let n=P(null);try{t[2]&=-129,t[2]|=256,t[24]&&gn(t[24]),Gu(e,t),Wu(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Ta(t[3])){n!==t[3]&&Vu(n,t);let r=t[18];r!==null&&r.detachView(e)}cl(t)}finally{P(n)}}function Wu(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&&hd(e,t,27,!1),W(o?U.TemplateUpdateStart:U.TemplateCreateStart,i,n),n(r,i)}finally{Bo(a),W(o?U.TemplateUpdateEnd:U.TemplateCreateEnd,i,n)}}function yd(e,t,n){Ed(e,t,n),(n.flags&64)==64&&Dd(e,t,n)}function bd(e,t,n=Fa){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{qa(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Yd(e){let t=e[24]??Object.create(Xd);return t.lView=e,t}var Xd={...nn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Xa(e.lView);for(;t&&!Zd(t[1]);)t=Xa(t);t&&Ua(t)},consumerOnSignalRead(){this.lView[24]=this}};function Zd(e){return e.type!==2}function Qd(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 $d=100;function ef(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{tf(e,t)}finally{n.end?.()}}function tf(e,t){let n=_o();try{vo(!0),cf(e,t);let n=0;for(;Ga(e);){if(n===$d)throw new F(103,!1);n++,cf(e,1)}}finally{vo(n)}}function nf(e,t,n,r){if(ja(t))return;let i=t[2];Mo(t);let a=!0,o=null,s=null;Zd(e)?(s=Gd(t),o=dn(s)):tn()===null?(a=!1,s=Yd(t),o=dn(s)):t[24]&&=(gn(t[24]),null);try{Ha(t),xo(e.bindingStartIndex),n!==null&&vd(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&rc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&ic(t,n,0,null),ac(t,0)}if(af(t),Qd(t),rf(t,0),e.contentQueries!==null&&Dl(e,t),a){let n=e.contentCheckHooks;n!==null&&rc(t,n)}else{let n=e.contentHooks;n!==null&&ic(t,n,1),ac(t,1)}uf(e,t);let o=e.components;o!==null&&lf(t,o,0);let s=e.viewQuery;if(s!==null&&Ol(2,s,r),a){let n=e.viewCheckHooks;n!==null&&rc(t,n)}else{let n=e.viewHooks;n!==null&&ic(t,n,2),ac(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Ud(t),t[2]&=-73}catch(e){throw qa(t),e}finally{s!==null&&(pn(s,o),a&&qd(s)),Lo()}}function rf(e,t){for(let n=dl(e);n!==null;n=fl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=Ii(e,10+t);Lu(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 _f(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(gf(e,n),Ii(t,n))}this._attachedToViewContainer=!1}Hu(this._lView[1],this._lView)}onDestroy(e){Ja(this._lView,e)}markForCheck(){df(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){Ka(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,ef(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new F(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Aa(this._lView),t=this._lView[16];t!==null&&!e&&Vu(t,this._lView),zu(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new F(902,!1);this._appRef=e;let t=Aa(this._lView),n=this._lView[16];n!==null&&!t&&vf(n,this._lView),Ka(this._lView)}};function bf(e,t,n,r,i){let a=e.data[t];if(a===null)a=xf(e,t,n,r,i),wo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=po();a.injectorIndex=e===null?-1:e.injectorIndex}return mo(a,!0),a}function xf(e,t,n,r,i){let a=fo(),o=ho(),s=o?a:a&&a.parent,c=e.data[t]=Cf(e,s,n,t,r,i);return Sf(e,c,a,o),c}function Sf(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 Cf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return io()&&(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:Go(),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 wf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Tf(e,n):r.push(e);e[6]=r}function Tf(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,Df=()=>null;function Of(e,t){return Ef(e,t)}function kf(e,t,n){return Df(e,t,n)}var Af=class{},jf=class{},Mf=(()=>{class e{static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>null})}return e})();function Nf(e){return e.debugInfo?.className||e.type.name||null}var Pf={},Ff=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Pf,n);return r!==Pf||t===Pf?r:this.parentInjector.get(e,t,n)}};function If(e,t,n){return e[t]=n}function Lf(e,t,n){if(n===lu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Rf(e,t,n,r){let i=Lf(e,t,n);return Lf(e,t+1,r)||i}function zf(e,t,n,r,i){let a=Rf(e,t,n,r);return Lf(e,t+2,i)||a}function Bf(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&xl(i,a),df(Da(e)?za(e.index,t):t,5);let o=t[8],s=Vf(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=Vf(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function Vf(e,t,n,r){let i=P(null);try{return W(U.OutputStart,t,n),n(r)!==!1}catch(t){return Nd(e,t),!1}finally{W(U.OutputEnd,t,n),P(i)}}function Hf(e,t,n,r,i,a,o,s){let c=Oa(e),l=!1,u=null;if(!r&&c&&(u=Wf(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=Fa(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);Uf(a)||Gf(r?t=>r(Na(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function Uf(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Wf(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 Gf(e,t,n,r,i,a,o){let s=t.firstCreatePass?Qa(t):null,c=Za(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Kf(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Gf(e.index,s,t,i,a,c,!0)}var qf=Symbol(`BINDING`),Jf=new L(``);function Yf(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 lp(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&gd.SignalBased)!==0};return i&&(a.transform=i),a})}function _p(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function vp(e,t,n){let r=t instanceof la?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Ff(n,r):n}function yp(e){let t=e.get(jf,null);if(t===null)throw new F(407,!1);return{rendererFactory:t,sanitizer:e.get(Mf,null),changeDetectionScheduler:e.get(Ps,null),ngReflect:!1,tracingService:e.get(bu,null,{optional:!0})}}function bp(e,t,n){let r=Sp(e);return Bl(t,r,r===`svg`?`svg`:r===`math`?Ma:n)}function xp(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new F(905,!1)}function Sp(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Cp=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=gp(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=_p(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=su(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){W(U.DynamicComponentStart);let s=P(null);try{let s=this.componentDef,c=vp(s,r||this.ngModule,e),l=yp(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Nf(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{P(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=wp(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?xd(l,r,s.encapsulation,t):bp(s,l,o??null);xp(u);let d=t.get(Jf,null),f=Tp(u,()=>t.get(Qo,null)??gl());d&&d.addHost(f);let p=a?.some(Dp)||i?.some(e=>typeof e!=`function`&&e.bindings.some(Dp)),m=ud(null,c,null,512|fd(s),null,null,e,l,t,null,Tl(u,t,!0));d&&mp&&f instanceof ShadowRoot&&Ja(m,()=>{d.removeHost(f)}),m[27]=u,Mo(m);let h=null;try{let e=dp(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);ql(l,u,e),ul(u,m),yd(c,m,e),kl(c,e,m),fp(c,e),n!==void 0&&kp(e,this.ngContentSelectors,n),h=za(e.index,m),m[8]=h[8],Ld(c,m,null)}catch(e){throw h!==null&&cl(h),cl(m),e}finally{W(U.DynamicComponentEnd),Lo()}return new Op(this.componentType,m,!!p)}};function wp(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:cu(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[qf].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 Dp(e){let t=e[qf].kind;return t===`input`||t===`twoWay`}var Op=class extends Af{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=Ia(t[1],27),this.location=el(this._tNode,t),this.instance=za(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new yf(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;Pd(n,r[1],r,e,t),this.previousInputValues.set(e,t),df(za(n.index,r),1)}get injector(){return new Wc(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function kp(e,t,n){let r=e.projection=[];for(let e=0;e!1;function jp(e,t,n){return Ap(e,t,n)}function Mp(e){return!!e&&typeof e.then==`function`}function Np(e){return!!e&&typeof e.subscribe==`function`}var Pp=class{},Fp=class extends Pp{injector;instance=null;constructor(e){super();let t=new ua([...e.providers,{provide:Pp,useValue:this}],e.parent||ca(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Ip(e,t,n=null){return new Fp({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Lp=(()=>{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=Yi(!1,e.type),n=t.length>0?Ip([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=Yr({token:e,providedIn:`environment`,factory:()=>new e(R(la))})}return e})();function Rp(e){return Xs(()=>{let t=Up(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==rl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Lp).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Al.Emulated,styles:e.styles||Ui,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Su(`NgStandalone`),Wp(n);let r=e.dependencies;return n.directiveDefs=Gp(r,zp),n.pipeDefs=Gp(r,di),n.id=Kp(n),n})}function zp(e){return li(e)||ui(e)}function Bp(e,t){if(e==null)return Hi;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=gd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Vp(e){if(e==null)return Hi;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Hp(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 Up(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||Hi,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Ui,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Bp(e.inputs,t),outputs:Vp(e.outputs),debugInfo:null}}function Wp(e){e.features?.forEach(t=>t(e))}function Gp(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 Kp(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 qp=new L(``),Jp=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=z(qp,{optional:!0})??[];injector=z(Zo);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=xa(this.injector,t);if(Mp(n))e.push(n);else if(Np(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=Qc({token:e,factory:e.ɵfac})}return e})();function Yp(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=gc(e.mergedAttrs,e.attrs);let t=e.tView=sd(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),mo(e,!1);let c=Qp(n,t,e,r);qo()&&Zu(n,t,c,e),ul(c,t);let l=ff(c,t,c,e);t[r+27]=l,md(t,l),jp(l,e,t)}function Xp(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=bf(t,d,4,o||null,s||null),l!=null){let e=Va(t.consts,l);f.localNames=[];for(let t=0;t{class e{cachedInjectors=new Map;getOrCreateInjector(e,t,n,r){if(!this.cachedInjectors.has(e)){let i=n.length>0?Ip(n,t,r):null;this.cachedInjectors.set(e,i)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=Yr({token:e,providedIn:`environment`,factory:()=>new e})}return e})(),Om=new L(``);function km(e,t,n){return e.get(Dm).getOrCreateInjector(t,e,n,``)}function Am(e,t,n){if(e instanceof Ff){let r=e.injector,i=e.parentInjector;return new Ff(r,km(i,t,n))}let r=e.get(la);return r===e?km(e,t,n):new Ff(e,km(r,t,n))}function jm(e,t,n,r=!1){let i=n[3],a=i[1];if(ja(i))return;let o=vm(i,t),s=o[1],c=o[lm];if(!(c!==null&&ee.data.s===t[1])??-1;return{dehydratedView:n>-1?e[6][n]:null,dehydratedViewIx:n}}function Nm(e,t,n,r,i){W(U.DeferBlockStateStart);let a=Sm(e,i,r);if(a!==null){t[1]=e;let o=i[1],s=Ia(o,a+27);hf(n,0);let c;if(e===rm.Complete){let e=bm(o,r),t=e.providers;t&&t.length>0&&(c=Am(i[9],e,t))}let{dehydratedView:l,dehydratedViewIx:u}=Mm(n,t),d=zd(i,s,null,{injector:c,dehydratedView:l});if(mf(n,d,0,Bd(s,l)),Ua(d),u>-1&&n[6]?.splice(u,1),(e===rm.Complete||e===rm.Error)&&Array.isArray(t[um])){for(let e of t[um])e();t[um]=null}}W(U.DeferBlockStateEnd)}function Pm(e,t){return e{e.loadingState===em.COMPLETE?jm(rm.Complete,t,n):e.loadingState===em.FAILED&&jm(rm.Error,t,n)})}var Lm=null;function Rm(e,t){return t[9].get(Om,null,{optional:!0})?.behavior!==fm.Manual}var zm=new L(``),Bm=new L(``);function Vm(){An(()=>{throw new F(600,``)})}var Hm=10,Um=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=z(ws);afterRenderManager=z(Cu);zonelessEnabled=z(Fs);rootEffectScheduler=z(Ls);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Ir;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=z(rs);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(zr(e=>!e))}constructor(){z(bu,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=z(la);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Zo.NULL){return this._injector.get(ds).run(()=>{if(W(U.BootstrapComponentStart),!this._injector.get(Jp).done)throw new F(405,``);let r=li(e),i=this._injector.get(Pp),a=new Cp(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Wm(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(zm,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Gm(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),W(U.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){W(U.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(yu.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw W(U.ChangeDetectionEnd),new F(101,!1);let e=P(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,P(e),this.afterTick.next(),W(U.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(jf,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Ga(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;Gm(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(Bm,[]).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),()=>Gm(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new F(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=Qc({token:e,factory:e.ɵfac})}return e})();function Wm(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Gm(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Km(e,t,n){let r=t.get(Jm);return r.add(e,n),()=>r.remove(e)}function qm(e){return(t,n)=>Km(t,n,e)}var Jm=(()=>{class e{buckets=new Map;callbackBucket=new Map;applicationRef=z(Um);ngZone=z(ds);idleService=z(Xc);add(e,t){let n=Ym(t);this.callbackBucket.set(e,n);let r=this.buckets.get(n);r??(r={idleId:null,queue:new Set},this.buckets.set(n,r)),r.queue.add(e),this.scheduleBucket(r,t)}remove(e){let t=this.callbackBucket.get(e);if(t===void 0)return;this.callbackBucket.delete(e);let n=this.buckets.get(t);n&&(n.queue.delete(e),n.queue.size===0&&(this.cancelBucket(n),this.buckets.delete(t)))}scheduleBucket(e,t){if(e.idleId!==null)return;let n=Ym(t),r=r=>{for(let t of e.queue)if(t(),this.applicationRef._tick(),e.queue.delete(t),this.callbackBucket.delete(t),r&&r.timeRemaining()===0&&!r.didTimeout)break;e.idleId=null,e.queue.size>0?this.scheduleBucket(e,t):this.buckets.delete(n)};e.idleId=this.idleService.requestOnIdle(e=>this.ngZone.run(()=>r(e)),t)}cancelBucket(e){e.idleId!==null&&(this.idleService.cancelOnIdle(e.idleId),e.idleId=null)}ngOnDestroy(){for(let e of this.buckets.values())this.cancelBucket(e);this.buckets.clear(),this.callbackBucket.clear()}static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>new e})}return e})();function Ym(e){return!e||e.timeout==null?``:`${e.timeout}`}function Xm(e){let t=V(),n=uo();if(Fm(t,n),!Rm(0,t))return;let r=t[9];pm(0,vm(t,n),e(()=>Qm(0,t,n),r))}function Zm(e,t,n){let r=t[9],i=t[1];if(e.loadingState!==em.NOT_STARTED)return e.loadingPromise??Promise.resolve();let a=vm(t,n),o=Em(i,e);e.loadingState=em.IN_PROGRESS,mm(1,a);let s=e.dependencyResolverFn,c=r.get(qs).add();return s?(e.loadingPromise=Promise.allSettled(s()).then(n=>{let r=!1,i=[],a=[];for(let e=0;e0&&(t.directiveRegistry=Tm(t.directiveRegistry,i),e.providers=Yi(!1,...i.map(e=>e.type))),a.length>0&&(t.pipeRegistry=Tm(t.pipeRegistry,a))}}),e.loadingPromise.finally(()=>{e.loadingPromise=null,c()})):(e.loadingPromise=Promise.resolve().then(()=>{e.loadingPromise=null,e.loadingState=em.COMPLETE,c()}),e.loadingPromise)}function Qm(e,t,n){let r=t[1],i=t[n.index];if(!Rm(e,t))return;let a=vm(t,n),o=bm(r,n);switch(hm(a),o.loadingState){case em.NOT_STARTED:jm(rm.Loading,n,i),Zm(o,t,n),o.loadingState===em.IN_PROGRESS&&Im(o,n,i);break;case em.IN_PROGRESS:jm(rm.Loading,n,i),Im(o,n,i);break;case em.COMPLETE:jm(rm.Complete,n,i);break;case em.FAILED:jm(rm.Error,n,i)}}function $m(e,t,n){return e===0?th(t,n):e!==2||!th(t,n)}function eh(e){return e!=null&&(e&1)==1}function th(e,t){let n=e[9],r=bm(e[1],t),i=El(n),a=eh(r.flags),o=vm(e,t)[cm]!==null;return!(a&&o&&i)}function nh(e,t,n,r,i,a,o,s,c,l){let u=V(),d=so(),f=e+27,p=Xp(u,d,e,null,0,0),m=u[9],h=El(m);if(d.firstCreatePass){Su(`NgDefer`);let e={primaryTmplIndex:t,loadingTmplIndex:r??null,placeholderTmplIndex:i??null,errorTmplIndex:a??null,placeholderBlockConfig:null,loadingBlockConfig:null,dependencyResolverFn:n??null,loadingState:em.NOT_STARTED,loadingPromise:null,providers:null,hydrateTriggers:null,debug:null,flags:l??0};c?.(d,e,s,o),xm(d,f,e)}let g=u[f];jp(g,p,u);let _=null,v=null;if(g[6]?.length>0){let e=g[6][0].data;v=e.di??null,_=e.s}let y=[null,im.Initial,null,null,null,null,v,_,null,null];ym(u,f,y);let b=null;v!==null&&h&&(b=m.get(Sl),b.add(v,{lView:u,tNode:p,lContainer:g}));let x=()=>{hm(y),v!==null&&b?.cleanup([v])};pm(0,y,()=>Ya(u,x)),Ja(u,x)}function rh(e){$m(0,V(),uo())&&Xm(qm({timeout:e}))}var ih=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 ah(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function oh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){P(r);let c=t.length-1;for(P(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=ah(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=ah(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 uh,a??=lh(e,o,s,n),sh(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;)ch(e,i,n,o,t[o]),o++}else if(t!=null){P(r);let c=t[Symbol.iterator]();P(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=ah(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new uh,a??=lh(e,o,s,n);let u=n(o,r);if(sh(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;)ch(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 sh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function ch(e,t,n,r,i){if(sh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function lh(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 uh=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 K(e,t,n,r,i,a,o,s){Su(`NgControlFlow`);let c=V(),l=so();return Xp(c,l,e,t,n,r,i,Va(l.consts,a),256,o,s),dh}function dh(e,t,n,r,i,a,o,s){Su(`NgControlFlow`);let c=V(),l=so();return Xp(c,l,e,t,n,r,i,Va(l.consts,a),512,o,s),dh}function q(e,t){Su(`NgControlFlow`);let n=V(),r=So(),i=n[r]===lu?-1:n[r],a=i===-1?void 0:vh(n,27+i);if(Lf(n,r,e)){let r=P(null);try{if(a!==void 0&&hf(a,0),e!==-1){let r=27+e,i=vh(n,r),a=Ch(n[1],r),o=kf(i,a,n);mf(i,zd(n,a,t,{dehydratedView:o}),0,Bd(a,o))}}finally{P(r)}}else if(a!==void 0){let e=pf(a,0);e!==void 0&&(e[8]=t)}}var fh=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 ph(e){return e}var mh=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function hh(e,t,n,r,i,a,o,s,c,l,u,d,f){Su(`NgControlFlow`);let p=V(),m=so(),h=c!==void 0,g=V(),_=new mh(h,s?o.bind(g[15][8]):o);g[27+e]=_,Xp(p,m,e+1,t,n,r,i,Va(m.consts,a),256),h&&Xp(p,m,e+2,c,l,u,d,Va(m.consts,f),512)}var gh=class extends ih{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,mf(this.lContainer,t,e,Bd(this.templateTNode,n)),yh(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,bh(this.lContainer,e),xh(this.lContainer,e)}create(e,t){let n=Of(this.lContainer,this.templateTNode.tView.ssrId);return zd(this.hostLView,this.templateTNode,new fh(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Hu(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];Du(e,r),pu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function bh(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 xh(e,t){return gf(e,t)}function Sh(e,t){return pf(e,t)}function Ch(e,t){return Ia(e,t)}function wh(e,t,n){let r=V();return Lf(r,So(),t)&&(so(),Cd(Vo(),r,e,t,r[11],n)),wh}function Th(e,t,n,r,i){Pd(t,e,n,i?`class`:`style`,r)}function Eh(e,t,n,r){let i=V(),a=i[1],o=e+27,s=a.firstCreatePass?dp(o,i,2,t,kd,ro(),n,r):a.data[o];if(Da(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Nf(o),()=>(Dh(e,t,i,s,r),Eh))}}return Dh(e,t,i,s,r),Eh}function Dh(e,t,n,r,i){if(jd(r,n,e,t,jh),Oa(r)){let e=n[1];yd(e,n,r),kl(e,r,n)}i!=null&&bd(n,r)}function Oh(){let e=so(),t=Md(uo());return e.firstCreatePass&&fp(e,t),ao(t)&&oo(),no(),t.classesWithoutHost!=null&&dc(t)&&Th(e,t,V(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&fc(t)&&Th(e,t,V(),t.stylesWithoutHost,!1),Oh}function kh(e,t,n,r){return Eh(e,t,n,r),Oh(),kh}function J(e,t,n,r){let i=V(),a=i[1],o=e+27,s=a.firstCreatePass?pp(o,a,2,t,n,r):a.data[o];return jd(s,i,e,t,jh),r!=null&&bd(i,s),J}function Y(){return ao(Md(uo()))&&oo(),no(),Y}function Ah(e,t,n,r){return J(e,t,n,r),Y(),Ah}var jh=(e,t,n,r,i)=>(Jo(!0),Bl(t[11],r,Go()));function Mh(){let e=so(),t=Md(uo());return e.firstCreatePass&&fp(e,t),Mh}function Nh(e,t,n){let r=V(),i=r[1],a=e+27,o=i.firstCreatePass?pp(a,i,8,`ng-container`,t,n):i.data[a];return jd(o,r,e,`ng-container`,Ih),n!=null&&bd(r,o),Nh}function Ph(){return Md(uo()),Mh}function Fh(e,t,n){return Nh(e,t,n),Ph(),Fh}var Ih=(e,t,n,r,i)=>(Jo(!0),zl(t[11],``));function Lh(){return V()}function Rh(e,t,n){let r=V();return Lf(r,So(),t)&&(so(),wd(Vo(),r,e,t,r[11],n)),Rh}var zh=`en-US`;function Bh(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function Vh(e,t,n){let r=V(),i=so(),a=uo();return Uh(i,r,r[11],a,e,t,n),Vh}function Hh(e,t,n){let r=V(),i=so(),a=uo();return(a.type&3||n)&&Hf(a,i,r,n,r[11],e,t,Bf(a,r,t)),Hh}function Uh(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Bf(r,t,a),Hf(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 Kh(e){return(e&2)==2}function qh(e,t){return e&131071|t<<17}function Jh(e){return e|2}function Yh(e){return(e&131068)>>2}function Xh(e,t){return e&-131069|t<<2}function Zh(e){return(e&1)==1}function Qh(e){return e|1}function $h(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Gh(o),c=Yh(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||Bi(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Gh(e[s+1]);e[r+1]=Wh(t,s),t!==0&&(e[t+1]=Xh(e[t+1],r)),e[s+1]=qh(e[s+1],r)}else e[r+1]=Wh(s,0),s!==0&&(e[s+1]=Xh(e[s+1],r)),s=r}else e[r+1]=Wh(c,0),s===0?s=r:e[c+1]=Xh(e[c+1],r),c=r;l&&(e[r+1]=Jh(e[r+1])),tg(e,u,r,!0),tg(e,u,r,!1),eg(t,u,e,r,a),o=Wh(s,c),a?t.classBindings=o:t.styleBindings=o}function eg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&Bi(a,t)>=0&&(n[r+1]=Qh(n[r+1]))}function tg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Gh(i):Yh(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];ng(n,t)&&(s=!0,e[o+1]=r?Qh(i):Jh(i)),o=r?Gh(i):Yh(i)}s&&(e[n+1]=r?Jh(i):Qh(i))}function ng(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?Bi(e,t)>=0:!1}function rg(e,t,n){return ag(e,t,n,!1),rg}function ig(e,t){return ag(e,t,null,!0),ig}function ag(e,t,n,r){let i=V(),a=so(),o=Co(2);if(a.firstUpdatePass&&sg(a,e,o,r),t!==lu&&Lf(i,o,t)){let s=a.data[zo()];mg(a,s,i,i[11],e,i[o+1]=_g(t,n),r,o)}}function og(e,t){return t>=e.expandoStartIndex}function sg(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[zo()],o=og(e,n);vg(a,r)&&t===null&&!o&&(t=!1),t=cg(i,a,t,r),$h(i,a,t,n,o,r)}}function cg(e,t,n,r){let i=Oo(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=fg(null,e,t,n,r),n=pg(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=fg(i,e,t,n,r),a===null){let n=lg(e,t,r);n!==void 0&&Array.isArray(n)&&(n=fg(null,e,t,n[1],r),n=pg(n,t.attrs,r),ug(e,t,r,n))}else a=dg(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function lg(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Yh(r)!==0)return e[Gh(r)]}function ug(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Gh(i)]=r}function dg(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?Ui:void 0);let d=l?zi(u,r):c===r?u:void 0;if(a&&!gg(d)&&(d=zi(t,r)),gg(d)&&(s=d,o))return s;let f=e[i+1];i=o?Gh(f):Yh(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=zi(e,r))}return s}function gg(e){return e!==void 0}function _g(e,t){return e==null||e===``||(typeof t==`string`?e=Ml(e)+t:typeof e==`object`&&(e=Ur(Ml(e)))),e}function vg(e,t){return!!(e.flags&(t?8:16))}function Z(e,t=``){let n=V(),r=so(),i=e+27,a=r.firstCreatePass?bf(r,i,1,t,null):r.data[i],o=yg(r,n,a,t);n[i]=o,qo()&&Zu(r,n,o,a),mo(a,!1)}var yg=(e,t,n,r)=>(Jo(!0),Ll(t[11],r));function bg(e,t,n,r=``){return Lf(e,So(),n)?t+pi(n)+r:lu}function xg(e,t,n,r,i,a=``){let o=Rf(e,bo(),n,i);return Co(2),o?t+pi(n)+r+pi(i)+a:lu}function Sg(e,t,n,r,i,a,o,s=``){let c=zf(e,bo(),n,i,o);return Co(3),c?t+pi(n)+r+pi(i)+a+pi(o)+s:lu}function Q(e){return $(``,e),Q}function $(e,t,n){let r=V(),i=bg(r,e,t,n);return i!==lu&&Tg(r,zo(),i),$}function Cg(e,t,n,r,i){let a=V(),o=xg(a,e,t,n,r,i);return o!==lu&&Tg(a,zo(),o),Cg}function wg(e,t,n,r,i,a,o){let s=V(),c=Sg(s,e,t,n,r,i,a,o);return c!==lu&&Tg(s,zo(),c),wg}function Tg(e,t,n){let r=Pa(t,e);Rl(e[11],r,n)}function Eg(e,t){let n=e[t];return n===lu?void 0:n}function Dg(e,t,n,r,i,a){let o=t+n;return Lf(e,o,i)?If(e,o+1,a?r.call(a,i):r(i)):Eg(e,o+1)}function Og(e,t){let n=so(),r,i=e+27;n.firstCreatePass?(r=kg(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=Ni(r.type,!0)),o=Ci(Xf);try{let e=Cc(!1),t=a();return Cc(e),Ra(n,V(),i,t),t}finally{Ci(o)}}function kg(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Ag(e,t,n){let r=e+27,i=V(),a=La(i,r);return jg(i,r)?Dg(i,yo(),t,a.transform,n,a):a.transform(n)}function jg(e,t){return e[1].data[t].pure}var Mg=(()=>{class e{applicationErrorHandler=z(ws);appRef=z(Um);taskService=z(rs);ngZone=z(ds);zonelessEnabled=z(Fs);tracing=z(bu,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new er;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ls):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(z(Is,{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?ss:os;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=Qc({token:e,factory:e.ɵfac})}return e})();function Ng(){return[{provide:Ps,useExisting:Mg},{provide:ds,useClass:ys},{provide:Fs,useValue:!0}]}function Pg(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Fg=new L(``,{factory:()=>z(Fg,{optional:!0,skipSelf:!0})||Pg()}),Ig=class{destroyed=!1;listeners=null;errorHandler=z(Cs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=z($o);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new F(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(Hr(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=P(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&&Lg(this.listeners)),P(t),this.isEmitting=!1}}};function Lg(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function Rg(e,t){return Sn(e,t?.equal)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});function zg(e,t){let n=Object.create(Ys);n.value=e,n.transformFn=t?.transform;function r(){if(rn(n),n.value===Js)throw new F(-950,null);return n.value}return r[en]=n,r}function Bg(e){return new Ig}function Vg(e,t){return zg(e,t)}function Hg(e){return zg(Js,e)}var Ug=(Vg.required=Hg,Vg),Wg=new L(``),Gg=new L(``);function Kg(e){return!e.moduleRef}function qg(e){let t=Kg(e)?e.r3Injector:e.moduleRef.injector,n=t.get(ds);return n.run(()=>{Kg(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(ws),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Kg(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Wg);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Wg);n.add(t),e.moduleRef.onDestroy(()=>{Gm(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return Yg(r,n,()=>{let n=t.get(rs),r=n.add(),i=t.get(Jp);return i.runInitializers(),i.donePromise.then(()=>{if(Bh(t.get(Fg,zh)||`en-US`),!t.get(Gg,!0))return Kg(e)?t.get(Um):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Kg(e)){let n=t.get(Um);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return Jg?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var Jg;function Yg(e,t,n){try{let r=n();return Mp(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var Xg=null;function Zg(e=[],t){return Zo.create({name:t,providers:[{provide:ia,useValue:`platform`},{provide:Wg,useValue:new Set([()=>Xg=null])},...e]})}function Qg(e=[]){if(Xg)return Xg;let t=Zg(e);return Xg=t,Vm(),$g(t),t}function $g(e){let t=e.get(ks,null);xa(e,()=>{t?.forEach(e=>e())})}function e_(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;W(U.BootstrapApplicationStart);try{let e=i?.injector??Qg(r);return qg({r3Injector:new Fp({providers:[Ng(),Ts,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{W(U.BootstrapApplicationEnd)}}var t_=null;function n_(){return t_}function r_(e){t_??=e}var i_=class{},a_=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Hp({name:`json`,type:e,pure:!1})}return e})();function o_(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 s_=`browser`,c_=class{_doc;constructor(e){this._doc=e}manager},l_=(()=>{class e extends c_{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)(R(Qo))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})(),u_=new L(``),d_=(()=>{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 l_));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof l_);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 F(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(R(u_),R(ds))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})(),f_=`ng-app-id`;function p_(e){for(let t of e)t.remove()}function m_(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function h_(e,t,n,r){let i=e.head?.querySelectorAll(`style[${f_}="${t}"],link[${f_}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(f_),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 g_(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var __=(()=>{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,h_(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,m_);t?.forEach(e=>this.addUsage(e,this.external,g_))}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&&(p_(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])p_(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,m_(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,g_(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)(R(Qo),R(Ds),R(js,8),R(As))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})(),v_={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},y_=/%COMP%/g,b_=`%COMP%`,x_=`_nghost-${b_}`,S_=`_ngcontent-${b_}`,C_=!0,w_=new L(``,{factory:()=>C_}),T_=new L(``);function E_(e){return S_.replace(y_,e)}function D_(e){return x_.replace(y_,e)}function O_(e,t){return t.map(t=>t.replace(y_,e))}var k_=(()=>{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 A_(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 P_?n.applyToHost(e):n instanceof N_&&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 Al.Emulated:r=new P_(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case Al.ShadowDom:return new M_(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case Al.ExperimentalIsolatedShadowDom:return new M_(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new N_(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)(R(d_),R(Jf),R(Ds),R(w_),R(Qo),R(ds),R(js),R(bu,8),R(T_,8))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})(),A_=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(v_[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(j_(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=j_(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new F(-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 F(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=v_[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=v_[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(uu.DashCase|uu.Important)?e.style.setProperty(t,n,r&uu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&uu.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=n_().getGlobalEventTarget(this.doc,e),!e))throw new F(-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 j_(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var M_=class extends A_{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=O_(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=g_(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)}},N_=class extends A_{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?O_(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&&pu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},P_=class extends N_{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=E_(l),this.hostAttr=D_(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}},F_=class e extends i_{supportsDOMEvents=!0;static makeCurrent(){r_(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=L_();return t==null?null:R_(t)}resetBaseElement(){I_=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return o_(document.cookie,e)}},I_=null;function L_(){return I_||=document.head.querySelector(`base`),I_?I_.getAttribute(`href`):null}function R_(e){return new URL(e,document.baseURI).pathname}var z_=[`alt`,`control`,`meta`,`shift`],B_={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},V_={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},H_=(()=>{class e extends c_{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(()=>n_().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.`),z_.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=B_[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`),z_.forEach(t=>{if(t!==n){let n=V_[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)(R(Qo))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})();async function U_(e,t,n){return e_({rootComponent:e,...W_(t,n)})}function W_(e,t){return{platformRef:t?.platformRef,appProviders:[...Y_,...e?.providers??[]],platformProviders:J_}}function G_(){F_.makeCurrent()}function K_(){return new Cs}function q_(){return hl(document),document}var J_=[{provide:As,useValue:s_},{provide:ks,useValue:G_,multi:!0},{provide:Qo,useFactory:q_}],Y_=[{provide:ia,useValue:`root`},{provide:Cs,useFactory:K_},{provide:u_,useClass:l_,multi:!0},{provide:u_,useClass:H_,multi:!0},k_,{provide:Jf,useClass:__},{provide:__,useExisting:Jf},d_,{provide:jf,useExisting:k_},[]];function X_(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 ev({code:i,why:Q_(a.why,e),fix:Q_(a.fix,e),docs:o,cause:e.cause,sources:e.sources},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function rv(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 lv=Math.random.bind(Math),uv=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function dv(e=21){let t=``,n=e;for(;n--;)t+=uv[lv()*64|0];return t}var fv=6e4,pv=e=>e,mv=pv,{clearTimeout:hv,setTimeout:gv}=globalThis;function _v(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=pv,deserialize:s=mv,resolver:c,bind:l=`rpc`,timeout:u=fv,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}=cv(),_=dv();s.i=_;let v;async function y(n=s){return u>=0&&(v=gv(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{hv(v),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:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$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 v(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(b)}function y(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 b(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&&(hv(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function vv(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var yv=Object.freeze({type:`object`,additionalProperties:!0});function bv(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return yv}return yv}function xv(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 Cv(e,t){return Sv(e,t)??[e]}function wv(e){return typeof e==`string`?`'${e}'`:new Ov().serialize(e)}var Tv=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Ev=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Tv.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Dv(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})(),kv=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Av=[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],jv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Mv=[],Nv=class{_data=new Pv;_hash=new Pv([...kv]);_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)Mv[n]=e[t+n]|0;else{let e=Mv[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Mv[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Mv[n]=t+Mv[n-7]+i+Mv[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+Av[n]+Mv[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=Pv.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 Fv(e){return new Nv().finalize(e).toBase64()}function Iv(e){return Fv(wv(e))}function Lv(e){return Iv(e)}function Rv(){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 zv=/^[\w+.-]{2,}:\/\//;function Bv(e){return e.endsWith(`/`)?e:`${e}/`}function Vv(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Hv(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Bv(n)+e.replace(/^\.?\//,``):e);return n}function Uv(e,t){if(!t||t===`/`||zv.test(e))return e;let n=Vv(t);return e.startsWith(n)?e:Hv(n,e)}function Wv(e,t){let n=e.match(zv);return t+(n?e.slice(n[0].length):e)}var Gv=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Kv(e=21){let t=``,n=e;for(;n--;)t+=Gv[Math.random()*64|0];return t}var qv=Symbol.for(`immer-nothing`),Jv=Symbol.for(`immer-draftable`),Yv=Symbol.for(`immer-state`),Xv=[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 Zv(e,...t){{let n=Xv[e],r=xy(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var Qv=Object,$v=Qv.getPrototypeOf,ey=`constructor`,ty=`prototype`,ny=`configurable`,ry=`enumerable`,iy=`writable`,ay=`value`,oy=e=>!!e&&!!e[Yv];function sy(e){return e?uy(e)||_y(e)||!!e[Jv]||!!e[ey]?.[Jv]||vy(e)||yy(e):!1}var cy=Qv[ty][ey].toString(),ly=new WeakMap;function uy(e){if(!e||!by(e))return!1;let t=$v(e);if(t===null||t===Qv[ty])return!0;let n=Qv.hasOwnProperty.call(t,ey)&&t[ey];if(n===Object)return!0;if(!xy(n))return!1;let r=ly.get(n);return r===void 0&&(r=Function.toString.call(n),ly.set(n,r)),r===cy}function dy(e,t,n=!0){fy(e)===0?(n?Reflect.ownKeys(e):Qv.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function fy(e){let t=e[Yv];return t?t.type_:_y(e)?1:vy(e)?2:yy(e)?3:0}var py=(e,t,n=fy(e))=>n===2?e.has(t):Qv[ty].hasOwnProperty.call(e,t),my=(e,t,n=fy(e))=>n===2?e.get(t):e[t],hy=(e,t,n,r=fy(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function gy(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var _y=Array.isArray,vy=e=>e instanceof Map,yy=e=>e instanceof Set,by=e=>typeof e==`object`,xy=e=>typeof e==`function`,Sy=e=>typeof e==`boolean`;function Cy(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var wy=e=>by(e)?e?.[Yv]:null,Ty=e=>e.copy_||e.base_,Ey=e=>e.modified_?e.copy_:e.base_;function Dy(e,t){if(vy(e))return new Map(e);if(yy(e))return new Set(e);if(_y(e))return Array[ty].slice.call(e);let n=uy(e);if(t===!0||t===`class_only`&&!n){let t=Qv.getOwnPropertyDescriptors(e);delete t[Yv];let n=Reflect.ownKeys(t);for(let r=0;r1&&Qv.defineProperties(e,{set:Ay,add:Ay,clear:Ay,delete:Ay}),Qv.freeze(e),t&&dy(e,(e,t)=>{Oy(t,!0)},!1),e)}function ky(){Zv(2)}var Ay={[ay]:ky};function jy(e){return e===null||!by(e)||Qv.isFrozen(e)}var My=`MapSet`,Ny=`Patches`,Py=`ArrayMethods`,Fy={};function Iy(e){let t=Fy[e];return t||Zv(0,e),t}var Ly=e=>!!Fy[e];function Ry(e,t){Fy[e]||(Fy[e]=t)}var zy,By=()=>zy,Vy=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Ly(My)?Iy(My):void 0,arrayMethodsPlugin_:Ly(Py)?Iy(Py):void 0});function Hy(e,t){t&&(e.patchPlugin_=Iy(Ny),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Uy(e){Wy(e),e.drafts_.forEach(Ky),e.drafts_=null}function Wy(e){e===zy&&(zy=e.parent_)}var Gy=e=>zy=Vy(zy,e);function Ky(e){let t=e[Yv];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function qy(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Yv].modified_&&(Uy(t),Zv(4)),sy(e)&&(e=Jy(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Yv].base_,e,t)}else e=Jy(t,n);return Yy(t,e,!0),Uy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===qv?void 0:e}function Jy(e,t){if(jy(t))return t;let n=t[Yv];if(!n)return rb(t,e.handledSet_,e);if(!Zy(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);tb(n,e)}return n.copy_}function Yy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oy(t,n)}function Xy(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Zy=(e,t)=>e.scope_===t,Qy=[];function $y(e,t,n,r){let i=Ty(e),a=e.type_;if(r!==void 0&&my(i,r,a)===t){hy(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;dy(i,(e,n)=>{if(oy(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Qy;for(let e of o)hy(i,e,n,a)}function eb(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Zy(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Ey(i);$y(e,i.draft_??i,a,n),tb(i,r)})}function tb(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)}Xy(e)}}function nb(e,t,n){let{scope_:r}=e;if(oy(n)){let i=n[Yv];Zy(i,r)&&i.callbacks_.push(function(){fb(e),$y(e,n,Ey(i),t)})}else sy(n)&&e.callbacks_.push(function(){let i=Ty(e);e.type_===3?i.has(n)&&rb(n,r.handledSet_,r):my(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&rb(my(e.copy_,t,e.type_),r.handledSet_,r)})}function rb(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||oy(e)||t.has(e)||!sy(e)||jy(e)?e:(t.add(e),dy(e,(r,i)=>{if(oy(i)){let t=i[Yv];Zy(t,n)&&(hy(e,r,Ey(t),e.type_),Xy(t))}else sy(i)&&rb(i,t,n)}),e)}function ib(e,t){let n=_y(e),r={type_:+!!n,scope_:t?t.scope_:By(),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=ab;n&&(i=[r],a=ob);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var ab={get(e,t){if(t===Yv)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=Ty(e);if(!py(i,t,e.type_))return lb(e,i,t);let a=i[t];if(e.finalized_||!sy(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Cy(t))return a;if(a===sb(e.base_,t)||cb(e,t,a)){fb(e);let n=e.type_===1?+t:t,r=mb(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ty(e)},ownKeys(e){return Reflect.ownKeys(Ty(e))},set(e,t,n){let r=ub(Ty(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=sb(Ty(e),t),i=r?.[Yv];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(gy(n,r)&&(n!==void 0||py(e.base_,t,e.type_)))return!0;fb(e),db(e)}return e.copy_[t]===n&&(n!==void 0||py(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),nb(e,t,n),!0)},deleteProperty(e,t){return fb(e),sb(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),db(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ty(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[iy]:!0,[ny]:e.type_!==1||t!==`length`,[ry]:r[ry],[ay]:n[t]}},defineProperty(){Zv(11)},getPrototypeOf(e){return $v(e.base_)},setPrototypeOf(){Zv(12)}},ob={};for(let e in ab){let t=ab[e];ob[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}ob.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Zv(13),ob.set.call(this,e,t,void 0)},ob.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&Zv(14),ab.set.call(this,e[0],t,n,e[0])};function sb(e,t){let n=e[Yv];return(n?Ty(n):e)[t]}function cb(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!sy(n)||n[Yv]?!1:e.baseRefs_.has(n)}function lb(e,t,n){let r=ub(t,n);return r?ay in r?r[ay]:r.get?.call(e.draft_):void 0}function ub(e,t){if(!(t in e))return;let n=$v(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=$v(n)}}function db(e){e.modified_||(e.modified_=!0,e.parent_&&db(e.parent_))}function fb(e){e.copy_||=(e.assigned_=new Map,Dy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pb=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(xy(e)&&!xy(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}xy(t)||Zv(6),n!==void 0&&!xy(n)&&Zv(7);let r;if(sy(e)){let i=Gy(this),a=mb(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Uy(i):Wy(i)}return Hy(i,n),qy(r,i)}if(!e||!by(e)){if(r=t(e),r===void 0&&(r=e),r===qv&&(r=void 0),this.autoFreeze_&&Oy(r,!0),n){let t=[],i=[];Iy(Ny).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Zv(1,e)},this.produceWithPatches=(e,t)=>{if(xy(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]},Sy(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Sy(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Sy(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){sy(e)||Zv(8),oy(e)&&(e=hb(e));let t=Gy(this),n=mb(t,e,void 0);return n[Yv].isManual_=!0,Wy(t),n}finishDraft(e,t){let n=e&&e[Yv];(!n||!n.isManual_)&&Zv(9);let{scope_:r}=n;return Hy(r,t),qy(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=Iy(Ny).applyPatches_;return oy(e)?r(e,t):this.produce(e,e=>r(e,t))}};function mb(e,t,n,r){let[i,a]=vy(t)?Iy(My).proxyMap_(t,n):yy(t)?Iy(My).proxySet_(t,n):ib(t,n);return(n?.scope_??By()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?eb(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 hb(e){return oy(e)||Zv(10,e),gb(e)}function gb(e){if(!sy(e)||jy(e))return e;let t=e[Yv],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Dy(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Dy(e,!0);return dy(n,(e,t)=>{hy(n,e,gb(t))},r),t&&(t.finalized_=!1),n}function _b(){Xv.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=wy(my(e,n.key_)),i=my(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||py(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=my(o,e,c),f=my(s,e,c),p=l?py(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===qv?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(yy(e))return new Set(Array.from(e).map(u));let t=Object.create($v(e));for(let n in e)t[n]=u(e[n]);return py(e,Jv)&&(t[Jv]=e[Jv]),t}function d(e){return oy(e)?u(e):e}Ry(Ny,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var vb=new pb,yb=vb.produce,bb=vb.produceWithPatches.bind(vb),xb=vb.applyPatches.bind(vb),Sb=1e3;function Cb(e,t){if(e.add(t),e.size>Sb){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function wb(e){let{enablePatches:t=!1}=e;t&&_b();let n=Rv(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Kv())=>{i.has(t)||(_b(),r=xb(r,e),Cb(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Kv())=>{if(!i.has(a)){if(Cb(i,a),t){let[t,i]=bb(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=yb(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Tb=typeof self==`object`?self:globalThis,Eb=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Db=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function Ob(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=Eb.has(e)?Tb[e]:void 0;return n(new(r??Tb.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`&&Db.has(a))return n(new Tb[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function kb(e){return Ob(new Map,e)(0)}var Ab=``,{toString:jb}={},{keys:Mb}=Object;function Nb(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=jb.call(e).slice(8,-1);switch(n){case`Array`:return[1,Ab];case`Object`:return[2,Ab];case`Date`:return[3,Ab];case`RegExp`:return[4,Ab];case`Map`:return[5,Ab];case`Set`:return[6,Ab];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function Pb([e,t]){return e===0&&(t===`function`||t===`symbol`)}function Fb(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]=Nb(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 Mb(r))(e||!Pb(Nb(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||!(Pb(Nb(n))||Pb(Nb(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Pb(Nb(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Ib(e,t={}){let n=[];return Fb(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:Lb,stringify:Rb}=JSON,zb={json:!0,lossy:!0};function Bb(e){return kb(Lb(e))}function Vb(e){return Rb(Ib(e,zb))}function Hb(e){return kb(e)}function Ub(e){return Vb(e)}function Wb(e){return Bb(e)}var Gb=256,Kb=class extends Error{name=`StreamClosedError`};function qb(e={}){let t=e.id??Kv(),n=Math.max(0,e.replayWindow??0),r=Rv(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new Kb(`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=Yb(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 Jb(e={}){let t=e.id??Kv(),n=Math.max(1,e.highWaterMark??Gb),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 Yb(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 Xb=128;function Zb(e){return e.replace(/[^\w-]+/g,`_`).slice(0,Xb)}var Qb=`modulepreload`,$b=function(e,t){return new URL(e,t).href},ex={},tx=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=$b(t,n),t=s(t),t in ex)return;ex[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`:Qb,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)})},nx=`__connection.json`,rx=`__DEVFRAME_CONNECTION__`,ix=`x-birpc-session`,ax=`__rpc-dump/index.json`,ox=`devframe:services`,sx=`devframe_otp`,cx=`devframe_auth_token`;iv.postMessage.remoteAssetsError;var lx=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Lv(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()}},ux=sv({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 dx(e){if(e.agent&&e.jsonSerializable===!1)throw ux.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function fx(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function px(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 mx(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 _x(e,t){let n=e.handler;if(!n){let r=await gx(e,t);if(!r.handler)throw ux.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 mx(e.name,r,t),o=await a(...n);return await hx(e.name,i,o)}}var vx=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 _x(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 ux.DF0021({name:e.name});dx(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 ux.DF0022({name:e.name});dx(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 _x(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw ux.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 yx(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 xx(t,`undefined`,r,e);return n}return i!==null&&bx(i,r,e,t),n})}function bx(e,t,n,r){if(typeof e==`bigint`)throw xx(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw xx(r,`Map`,t,n);if(e instanceof Set)throw xx(r,`Set`,t,n);if(e instanceof Date)throw xx(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw xx(r,e.constructor?.name??`class instance`,t,n)}function xx(e,t,n,r){let i=Sx(n,r);return ux.DF0020({name:e||``,type:t,path:i})}function Sx(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var Cx=`__DEVFRAME_CONNECTION_META__`,wx=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Tx(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 Ex(){return Tx(rx)}function Dx(){return Tx(Cx)}function Ox(e){if(e)return e;try{let e=localStorage.getItem(wx);if(e)return e}catch{}return Tx(wx)}function kx(e){globalThis[rx]=e,globalThis[Cx]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&Ax(e.authToken)}function Ax(e){try{localStorage.setItem(wx,e)}catch{}globalThis[wx]=e;let t=Ex();t&&(globalThis[rx]={...t,authToken:e})}function jx(e){let t=Uv(nx,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Mx(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Nx(){let e=Ex();if(e)return Mx(e,Ox()??e.authToken??e.connectionMeta.authToken);let t=Dx();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??jx(`./`),authToken:Ox(t.authToken)}}async function Px(e={}){if(e.connection){let t=Mx(e.connection,Ox(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return kx(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:jx(t[0]??`./`),authToken:Ox(e.authToken??e.connectionMeta.authToken)};return kx(n),n}let n=Nx();if(n){let t=Mx(n,Ox(e.authToken??n.authToken??n.connectionMeta.authToken));return kx(t),t}let r=[];for(let n of t){let t=Uv(nx,n),i=jx(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:Ox(e.authToken??r.authToken)};return kx(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Fx=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function Ix(e=sx){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Lx(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 Rx(e=sx){let t=Ix(e);return t&&Lx(e),t}async function zx(e,t={}){let n=Rx(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Bx(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(ox,{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 Vx(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:iv.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:iv.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=wb({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(iv.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var Hx=new Map;function Ux(e=Hx){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?yx(n,r??``):`s:${Ub(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?Wb(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function Wx(){}function Gx(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 Kx(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 qx(e){let{onConnected:t=Wx,onError:n=Wx,onDisconnected:r=Wx,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${cx}=${encodeURIComponent(e.authToken)}`);let s=Ux(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 v(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=Gx(r);if(!e)break;r=e.rest;let{event:t,data:n}=Kx(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 v(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`,[ix]: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 Jx(e,t){let{channel:n,rpcOptions:r={}}=t;return _v(e,{...n,timeout:-1,...r,proxify:!1})}function Yx(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(iv.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 Fx(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Fx(`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(iv.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 Fx(`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(iv.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(iv.client.connectionError,e),m(new Fx(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Fx(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=Jx(a.functions,{channel:v,rpcOptions:o});a.register({name:iv.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Fx(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(iv.client.connectionError,e),m(e),i.emit(iv.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$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 Fx(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(iv.client.connectionError,e)}return i.emit(iv.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(iv.client.isTrustedUpdated,!0)),t}async function ee(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function C(){return c?!0:x(b??``)}async function w(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:C,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:ee,ensureTrusted:w,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(iv.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(iv.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(iv.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function Xx(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 Zx(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Xx(n.sse,r??`./`,location);return Yx({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>qx({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 Qx(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:$x(r)?Qx(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function $x(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function eS(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function tS(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function nS(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function rS(e){if(e.error)throw Qx(e.error);return e.output}function iS(e){return e.some(e=>e!=null)}function aS(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function oS(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Hb(e):e}function a(e,t){return i(aS(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 nS(r)?rS(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(eS(r)){if(iS(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(tS(r)){let e=Lv(n),i=r.records[e];if(i)return rS(await s(i,r.serialization));if(r.fallback)return rS(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!iS(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 sS(e){let t=oS(await e.fetchJsonFromBases(ax),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 cS=``;function lS(e,t){return`${e}${cS}${t}`}function uS(e){let t=new Map,n=new Map;e.client.register({name:iv.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(lS(e,n))?._push(r,i)}}),e.client.register({name:iv.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=lS(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:iv.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=lS(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(iv.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(cS);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=lS(n,r),o=t.get(a);if(o)return o;let s=Jb({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(iv.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=lS(t,r),a=n.get(i);if(a)return a;let o=qb({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 dS(){}var fS=new Map;function pS(e){let t=e.url;e.authToken&&(t=`${t}?${cx}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=dS,onError:i=dS,onDisconnected:a=dS,definitions:o=fS}=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=Ux(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 mS(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 Wv(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function hS(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=mS(n.websocket,r??`./`,location);return Yx({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>pS({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 gS(e){return e.includes(`:`)}function _S(e,t){return gS(t)?t:`${e}:${t}`}function vS(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function yS(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return vS(a)}function bS(e,t){return{global:yS(e,t,`global`),project:yS(e,t,`project`)}}function xS(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(gS(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(_S(t,n),...r)),callEvent:((n,...r)=>e.callEvent(_S(t,n),...r)),callOptional:((n,...r)=>e.callOptional(_S(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(_S(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(_S(t,n),r,i),upload:(n,r)=>e.streaming.upload(_S(t,n),r)}},settings:bS(e,t),scope:e.scope}}function SS(){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 CS(e,t={}){let n=t.modelContext??SS();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=Zb(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=vv(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:xv(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>wS(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 wS(e,t,n){try{let r=Cv(n,e.args?.length);return{content:[{type:`text`,text:TS(await(await _x(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:ES(e)}]}}}function TS(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function ES(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 DS(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 OS(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Rv(),a=Array.isArray(t)?t:[t],o=await Px(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new lx({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new vx(f),m=e.webmcp===!1?void 0:CS(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Uv(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 v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=DS(e.transport??`auto`,s),b=y===`static`?await sS({fetchJsonFromBases:_}):y===`sse`?Zx({...v,sseOptions:e.sseOptions}):hS({...v,wsOptions:e.wsOptions}),x;try{x=new BroadcastChannel(`devframe-auth`)}catch{}let S,ee=!1;function C(e){return((...t)=>ee||!S?e(...t):S.then(()=>e(...t)))}function w(){g=!0;try{h?.(),m?.()}finally{try{x?.close()}finally{b.close?.()}}}let T={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(Ax(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;Ax(t),o={...o,authToken:t};try{x?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:C(b.call),callEvent:C(b.callEvent),callOptional:C(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:w};T.sharedState=Vx(T),T.streaming=uS(T),T.services=Bx(T);let te=new Map;T.scope=(e=>{if(!e)return T;let t=te.get(e);return t||(t=xS(T,e),te.set(e,t)),t}),f.rpc=T;function E(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ne(){if(e.simpleAuth!==!1&&E()&&typeof globalThis.prompt==`function`)for(await T.requestAuthCode().catch(()=>{});!T.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 T.requestTrustWithCode(t))return}}async function D(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await zx(T,{param:n}):!1;t||r||T.isTrusted||await ne()}return S=D().then(()=>{ee=!0},()=>{ee=!0}),s.mcp&&tx(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-D2qrD2G8.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(T))}).catch(()=>{}),x&&(x.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&T.requestTrustWithToken(e.data.authToken)}),T}var kS=OS,AS=class e{rpc=Ug(null);navigate=Bg();meta=H(null);componentCount=H(0);routeCount=H(0);signalCount=H(0);providerCount=H(0);storeCount=H(0);constructor(){Bs(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);t.rpc.call(`build-meta`).then(e=>this.meta.set(e)).catch(()=>{}),t.rpc.call(`get-components`).then(e=>this.componentCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-routes`).then(e=>this.routeCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-signals`).then(e=>this.signalCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-providers`).then(e=>this.providerCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-ngrx-store`).then(e=>this.storeCount.set(e.length)).catch(()=>{})})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:56,vars:9,consts:[[1,`grid`],[1,`card`],[1,`card`,`clickable`,3,`click`],[1,`big`],[1,`sub`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`div`,1)(2,`h3`),Z(3,`Project`),Y(),J(4,`dl`)(5,`dt`),Z(6,`Name`),Y(),J(7,`dd`),Z(8),Y(),J(9,`dt`),Z(10,`Angular`),Y(),J(11,`dd`),Z(12),Y(),J(13,`dt`),Z(14,`TypeScript`),Y(),J(15,`dd`),Z(16),Y(),J(17,`dt`),Z(18,`SSR`),Y(),J(19,`dd`),Z(20),Y()()(),J(21,`div`,2),Hh(`click`,function(){return t.navigate.emit(`components`)}),J(22,`h3`),Z(23,`Components`),Y(),J(24,`p`,3),Z(25),Y(),J(26,`p`,4),Z(27,`discovered in source`),Y()(),J(28,`div`,2),Hh(`click`,function(){return t.navigate.emit(`routes`)}),J(29,`h3`),Z(30,`Routes`),Y(),J(31,`p`,3),Z(32),Y(),J(33,`p`,4),Z(34,`registered paths`),Y()(),J(35,`div`,2),Hh(`click`,function(){return t.navigate.emit(`signals`)}),J(36,`h3`),Z(37,`Signals`),Y(),J(38,`p`,3),Z(39),Y(),J(40,`p`,4),Z(41,`reactive primitives`),Y()(),J(42,`div`,2),Hh(`click`,function(){return t.navigate.emit(`injectors`)}),J(43,`h3`),Z(44,`Injectors`),Y(),J(45,`p`,3),Z(46),Y(),J(47,`p`,4),Z(48,`DI providers`),Y()(),J(49,`div`,2),Hh(`click`,function(){return t.navigate.emit(`store`)}),J(50,`h3`),Z(51,`NgRx Store`),Y(),J(52,`p`,3),Z(53),Y(),J(54,`p`,4),Z(55,`store entries`),Y()()()),e&2&&(G(8),Q(t.meta()?.projectName??`…`),G(4),Q(t.meta()?.angularVersion??`…`),G(4),Q(t.meta()?.typescript??`…`),G(4),Q(t.meta()?.ssr?`Yes`:`No`),G(5),Q(t.componentCount()),G(7),Q(t.routeCount()),G(7),Q(t.signalCount()),G(7),Q(t.providerCount()),G(7),Q(t.storeCount()))},styles:[`.grid[_ngcontent-%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 v(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`,[ix]: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 Jx(e,t){let{channel:n,rpcOptions:r={}}=t;return _v(e,{...n,timeout:-1,...r,proxify:!1})}function Yx(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(iv.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 Fx(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Fx(`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(iv.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 Fx(`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(iv.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(iv.client.connectionError,e),m(new Fx(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Fx(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=Jx(a.functions,{channel:v,rpcOptions:o});a.register({name:iv.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Fx(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(iv.client.connectionError,e),m(e),i.emit(iv.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$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 Fx(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(iv.client.connectionError,e)}return i.emit(iv.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(iv.client.isTrustedUpdated,!0)),t}async function ee(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function C(){return c?!0:x(b??``)}async function w(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:C,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:ee,ensureTrusted:w,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(iv.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(iv.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(iv.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function Xx(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 Zx(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Xx(n.sse,r??`./`,location);return Yx({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>qx({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 Qx(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:$x(r)?Qx(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function $x(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function eS(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function tS(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function nS(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function rS(e){if(e.error)throw Qx(e.error);return e.output}function iS(e){return e.some(e=>e!=null)}function aS(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function oS(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Hb(e):e}function a(e,t){return i(aS(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 nS(r)?rS(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(eS(r)){if(iS(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(tS(r)){let e=Lv(n),i=r.records[e];if(i)return rS(await s(i,r.serialization));if(r.fallback)return rS(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!iS(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 sS(e){let t=oS(await e.fetchJsonFromBases(ax),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 cS=``;function lS(e,t){return`${e}${cS}${t}`}function uS(e){let t=new Map,n=new Map;e.client.register({name:iv.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(lS(e,n))?._push(r,i)}}),e.client.register({name:iv.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=lS(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:iv.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=lS(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(iv.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(cS);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=lS(n,r),o=t.get(a);if(o)return o;let s=Jb({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(iv.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=lS(t,r),a=n.get(i);if(a)return a;let o=qb({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 dS(){}var fS=new Map;function pS(e){let t=e.url;e.authToken&&(t=`${t}?${cx}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=dS,onError:i=dS,onDisconnected:a=dS,definitions:o=fS}=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=Ux(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 mS(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 Wv(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function hS(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=mS(n.websocket,r??`./`,location);return Yx({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>pS({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 gS(e){return e.includes(`:`)}function _S(e,t){return gS(t)?t:`${e}:${t}`}function vS(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function yS(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return vS(a)}function bS(e,t){return{global:yS(e,t,`global`),project:yS(e,t,`project`)}}function xS(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(gS(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(_S(t,n),...r)),callEvent:((n,...r)=>e.callEvent(_S(t,n),...r)),callOptional:((n,...r)=>e.callOptional(_S(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(_S(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(_S(t,n),r,i),upload:(n,r)=>e.streaming.upload(_S(t,n),r)}},settings:bS(e,t),scope:e.scope}}function SS(){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 CS(e,t={}){let n=t.modelContext??SS();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=Zb(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=vv(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:xv(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>wS(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 wS(e,t,n){try{let r=Cv(n,e.args?.length);return{content:[{type:`text`,text:TS(await(await _x(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:ES(e)}]}}}function TS(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function ES(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 DS(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 OS(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Rv(),a=Array.isArray(t)?t:[t],o=await Px(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new lx({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new vx(f),m=e.webmcp===!1?void 0:CS(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Uv(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 v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=DS(e.transport??`auto`,s),b=y===`static`?await sS({fetchJsonFromBases:_}):y===`sse`?Zx({...v,sseOptions:e.sseOptions}):hS({...v,wsOptions:e.wsOptions}),x;try{x=new BroadcastChannel(`devframe-auth`)}catch{}let S,ee=!1;function C(e){return((...t)=>ee||!S?e(...t):S.then(()=>e(...t)))}function w(){g=!0;try{h?.(),m?.()}finally{try{x?.close()}finally{b.close?.()}}}let T={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(Ax(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;Ax(t),o={...o,authToken:t};try{x?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:C(b.call),callEvent:C(b.callEvent),callOptional:C(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:w};T.sharedState=Vx(T),T.streaming=uS(T),T.services=Bx(T);let te=new Map;T.scope=(e=>{if(!e)return T;let t=te.get(e);return t||(t=xS(T,e),te.set(e,t)),t}),f.rpc=T;function E(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ne(){if(e.simpleAuth!==!1&&E()&&typeof globalThis.prompt==`function`)for(await T.requestAuthCode().catch(()=>{});!T.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 T.requestTrustWithCode(t))return}}async function D(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await zx(T,{param:n}):!1;t||r||T.isTrusted||await ne()}return S=D().then(()=>{ee=!0},()=>{ee=!0}),s.mcp&&tx(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-BSqk5AzH.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(T))}).catch(()=>{}),x&&(x.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&T.requestTrustWithToken(e.data.authToken)}),T}var kS=OS,AS=class e{rpc=Ug(null);navigate=Bg();meta=H(null);componentCount=H(0);routeCount=H(0);signalCount=H(0);providerCount=H(0);storeCount=H(0);constructor(){Bs(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);t.rpc.call(`build-meta`).then(e=>this.meta.set(e)).catch(()=>{}),t.rpc.call(`get-components`).then(e=>this.componentCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-routes`).then(e=>this.routeCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-signals`).then(e=>this.signalCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-providers`).then(e=>this.providerCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-ngrx-store`).then(e=>this.storeCount.set(e.length)).catch(()=>{})})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:56,vars:9,consts:[[1,`grid`],[1,`card`],[1,`card`,`clickable`,3,`click`],[1,`big`],[1,`sub`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`div`,1)(2,`h3`),Z(3,`Project`),Y(),J(4,`dl`)(5,`dt`),Z(6,`Name`),Y(),J(7,`dd`),Z(8),Y(),J(9,`dt`),Z(10,`Angular`),Y(),J(11,`dd`),Z(12),Y(),J(13,`dt`),Z(14,`TypeScript`),Y(),J(15,`dd`),Z(16),Y(),J(17,`dt`),Z(18,`SSR`),Y(),J(19,`dd`),Z(20),Y()()(),J(21,`div`,2),Hh(`click`,function(){return t.navigate.emit(`components`)}),J(22,`h3`),Z(23,`Components`),Y(),J(24,`p`,3),Z(25),Y(),J(26,`p`,4),Z(27,`discovered in source`),Y()(),J(28,`div`,2),Hh(`click`,function(){return t.navigate.emit(`routes`)}),J(29,`h3`),Z(30,`Routes`),Y(),J(31,`p`,3),Z(32),Y(),J(33,`p`,4),Z(34,`registered paths`),Y()(),J(35,`div`,2),Hh(`click`,function(){return t.navigate.emit(`signals`)}),J(36,`h3`),Z(37,`Signals`),Y(),J(38,`p`,3),Z(39),Y(),J(40,`p`,4),Z(41,`reactive primitives`),Y()(),J(42,`div`,2),Hh(`click`,function(){return t.navigate.emit(`injectors`)}),J(43,`h3`),Z(44,`Injectors`),Y(),J(45,`p`,3),Z(46),Y(),J(47,`p`,4),Z(48,`DI providers`),Y()(),J(49,`div`,2),Hh(`click`,function(){return t.navigate.emit(`store`)}),J(50,`h3`),Z(51,`NgRx Store`),Y(),J(52,`p`,3),Z(53),Y(),J(54,`p`,4),Z(55,`store entries`),Y()()()),e&2&&(G(8),Q(t.meta()?.projectName??`…`),G(4),Q(t.meta()?.angularVersion??`…`),G(4),Q(t.meta()?.typescript??`…`),G(4),Q(t.meta()?.ssr?`Yes`:`No`),G(5),Q(t.componentCount()),G(7),Q(t.routeCount()),G(7),Q(t.signalCount()),G(7),Q(t.providerCount()),G(7),Q(t.storeCount()))},styles:[`.grid[_ngcontent-%COMP%] { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; @@ -21,7 +21,7 @@ transition: border-color 0.15s; } .card.clickable[_ngcontent-%COMP%]:hover { - border-color: #a78bfa; + border-color: var(--%NS%accent); } h3[_ngcontent-%COMP%] { font-size: 13px; @@ -46,7 +46,7 @@ .big[_ngcontent-%COMP%] { font-size: 36px; font-weight: 700; - color: #a78bfa; + color: var(--%NS%accent); } .sub[_ngcontent-%COMP%] { font-size: 13px; @@ -68,7 +68,7 @@ outline: none; } input[_ngcontent-%COMP%]:focus { - border-color: #a78bfa; + border-color: var(--%NS%accent); } button[_ngcontent-%COMP%] { padding: 8px 16px; @@ -102,12 +102,12 @@ transition: border-color 0.15s; } .component-item[_ngcontent-%COMP%]:hover { - border-color: #a78bfa; + border-color: var(--%NS%accent); } .selector[_ngcontent-%COMP%] { font-family: monospace; font-size: 15px; - color: #a78bfa; + color: var(--%NS%accent); font-weight: 600; } .file[_ngcontent-%COMP%] { @@ -132,7 +132,7 @@ } .detail[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { font-family: monospace; - color: #a78bfa; + color: var(--%NS%accent); margin-bottom: 12px; } dl[_ngcontent-%COMP%] { @@ -207,7 +207,7 @@ outline: none; } input[_ngcontent-%COMP%]:focus { - border-color: #a78bfa; + border-color: var(--%NS%accent); } button[_ngcontent-%COMP%] { padding: 8px 16px; @@ -253,13 +253,13 @@ } .path[_ngcontent-%COMP%] { font-family: monospace; - color: #a78bfa; + color: var(--%NS%accent); font-weight: 500; } .file[_ngcontent-%COMP%] { font-size: 12px; color: #71717a; - }`]})},$S=(e,t)=>t.name+t.file+t.line,eC=(e,t)=>t.kind,tC=(e,t)=>t.id;function nC(e,t){e&1&&(J(0,`div`,3)(1,`p`,4),Z(2,`No signals found.`),Y(),J(3,`p`,5),Z(4,` No signal(), computed(), effect() calls found in source. Runtime graph requires Angular 19+ with the overlay connected. `),Y()())}function rC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · in <`,e.component,`> `)}}function iC(e,t){if(e&1&&(J(0,`div`,8)(1,`div`,9)(2,`span`,10),Z(3),Y(),J(4,`span`,11),Z(5),Y()(),J(6,`div`,12),Z(7),K(8,rC,1,1),Y()()),e&2){let e=t.$implicit,n=X(2);G(2),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(2),Q(e.name),G(2),Cg(` `,e.file,`:`,e.line,` `),G(),q(e.component?8:-1)}}function aC(e,t){if(e&1&&(J(0,`p`,6),Z(1,`Signals from source scan (static analysis):`),Y(),J(2,`div`,7),hh(3,iC,9,7,`div`,8,$S),Y()),e&2){let e=X();G(3),_h(e.filteredSourceSignals())}}function oC(e,t){if(e&1&&(J(0,`span`,14),Ah(1,`span`,17),Z(2),Y()),e&2){let e=t.$implicit;G(),rg(`background`,e.color),G(),$(` `,e.kind,` `)}}function sC(e,t){e&1&&(J(0,`span`,19),Z(1,`watching`),Y())}function cC(e,t){if(e&1&&(J(0,`div`,20),Z(1),Og(2,`json`),Y()),e&2){let e=X().$implicit;G(),Q(Ag(2,1,e.value))}}function lC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · Deps: `,X(2).getDependencies(e).length,` `)}}function uC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · Consumers: `,X(2).getConsumers(e).length,` `)}}function dC(e,t){if(e&1){let e=Lh();J(0,`div`,18),Hh(`click`,function(){let t=co(e).$implicit;return lo(X(2).selectNode(t))}),J(1,`div`,9)(2,`span`,10),Z(3),Y(),J(4,`span`,11),Z(5),Y(),K(6,sC,2,0,`span`,19),Y(),K(7,cC,3,3,`div`,20),J(8,`div`,12),Z(9),K(10,lC,1,1),K(11,uC,1,1),Y()()}if(e&2){let e=t.$implicit,n=X(2);ig(`selected`,n.selectedNode()?.id===e.id),G(2),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(2),Q(e.label??`(unnamed)`),G(),q(e.watched?6:-1),G(),q(e.value===void 0?-1:7),G(2),$(` Epoch: `,e.epoch,` `),G(),q(n.getDependencies(e).length?10:-1),G(),q(n.getConsumers(e).length?11:-1)}}function fC(e,t){if(e&1&&(J(0,`dt`),Z(1,`Value`),Y(),J(2,`dd`)(3,`pre`),Z(4),Og(5,`json`),Y()()),e&2){let e=X(3);G(4),Q(Ag(5,1,e.selectedNode().value))}}function pC(e,t){if(e&1&&(J(0,`li`)(1,`span`,21),Z(2),Y(),Z(3),Y()),e&2){let e=t.$implicit,n=X(4);G(),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(),$(` `,e.label??e.id,` `)}}function mC(e,t){if(e&1&&(J(0,`h4`),Z(1,`Dependencies (producers)`),Y(),J(2,`ul`),hh(3,pC,4,4,`li`,null,tC),Y()),e&2){let e=X(3);G(3),_h(e.getDependencies(e.selectedNode()))}}function hC(e,t){if(e&1&&(J(0,`li`)(1,`span`,21),Z(2),Y(),Z(3),Y()),e&2){let e=t.$implicit,n=X(4);G(),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(),$(` `,e.label??e.id,` `)}}function gC(e,t){if(e&1&&(J(0,`h4`),Z(1,`Consumers`),Y(),J(2,`ul`),hh(3,hC,4,4,`li`,null,tC),Y()),e&2){let e=X(3);G(3),_h(e.getConsumers(e.selectedNode()))}}function _C(e,t){if(e&1&&(J(0,`aside`,16)(1,`h3`),Z(2),Y(),J(3,`dl`)(4,`dt`),Z(5,`Kind`),Y(),J(6,`dd`),Z(7),Y(),J(8,`dt`),Z(9,`Epoch`),Y(),J(10,`dd`),Z(11),Y(),K(12,fC,6,3),Y(),K(13,mC,5,0),K(14,gC,5,0),Y()),e&2){let e=X(2);G(2),Q(e.selectedNode().label??e.selectedNode().id),G(5),Q(e.selectedNode().kind),G(4),Q(e.selectedNode().epoch),G(),q(e.selectedNode().value===void 0?-1:12),G(),q(e.getDependencies(e.selectedNode()).length?13:-1),G(),q(e.getConsumers(e.selectedNode()).length?14:-1)}}function vC(e,t){if(e&1&&(J(0,`div`,13),hh(1,oC,3,3,`span`,14,eC),Y(),J(3,`div`,7),hh(4,dC,12,11,`div`,15,tC),Y(),K(6,_C,15,6,`aside`,16)),e&2){let e=X();G(),_h(e.kindLegend),G(3),_h(e.filteredNodes()),G(2),q(e.selectedNode()?6:-1)}}var yC={signal:`#a78bfa`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#c084fc`,"input (signal)":`#f59e0b`,"input.required (signal)":`#f59e0b`,"output (signal)":`#ec4899`,"model (signal)":`#14b8a6`,"viewChild (signal)":`#8b5cf6`,"viewChildren (signal)":`#8b5cf6`,"contentChild (signal)":`#6366f1`,"contentChildren (signal)":`#6366f1`,resource:`#06b6d4`,unknown:`#71717a`},bC=class e{rpc=Ug(null);graph=H(null);sourceSignals=H([]);filter=H(``);selectedNode=H(null);kindLegend=Object.entries(yC).map(([e,t])=>({kind:e,color:t}));filteredNodes=Rg(()=>{let e=this.graph();if(!e)return[];let t=this.filter().toLowerCase();return t?e.nodes.filter(e=>(e.label??``).toLowerCase().includes(t)||e.kind.includes(t)):e.nodes});filteredSourceSignals=Rg(()=>{let e=this.filter().toLowerCase(),t=this.sourceSignals();return e?t.filter(t=>t.name.toLowerCase().includes(e)||t.kind.includes(e)||t.file.includes(e)):t});constructor(){Bs(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))})}async loadSignalGraph(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`signal-graph`),n=t.value();n?.graph&&this.graph.set(n.graph),t.on(`updated`,e=>{e?.graph&&this.graph.set(e.graph)})}async loadSourceSignals(e){let t=e.scope(`ng-devtools`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e)}catch{}}selectNode(e){this.selectedNode.set(this.selectedNode()?.id===e.id?null:e)}kindColor(e){return yC[e]??yC.unknown}getDependencies(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.consumer===n).map(e=>t.nodes[e.producer]).filter(Boolean)}getConsumers(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.producer===n).map(e=>t.nodes[e.consumer]).filter(Boolean)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-signal-inspector`]],inputs:{rpc:[1,`rpc`]},decls:7,vars:5,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by name or kind…`,3,`input`,`value`],[1,`label`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`legend`],[1,`legend-item`],[1,`node-card`,3,`selected`],[1,`detail-panel`],[1,`dot`],[1,`node-card`,3,`click`],[1,`watched-badge`],[1,`node-value`],[1,`kind-badge`,`sm`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`input`,1),Hh(`input`,function(e){return t.filter.set(e.target.value)}),Y(),J(2,`span`,2),Z(3),Y()(),K(4,nC,5,0,`div`,3),K(5,aC,5,0),K(6,vC,7,1)),e&2&&(G(),Rh(`value`,t.filter()),G(2),$(`Component: `,t.graph()?.componentSelector??`—`),G(),q(!t.graph()&&t.sourceSignals().length===0?4:-1),G(),q(!t.graph()&&t.sourceSignals().length>0?5:-1),G(),q(t.graph()?6:-1))},dependencies:[a_],styles:[`.toolbar[_ngcontent-%COMP%] { + }`]})},$S=(e,t)=>t.name+t.file+t.line,eC=(e,t)=>t.kind,tC=(e,t)=>t.id;function nC(e,t){e&1&&(J(0,`div`,3)(1,`p`,4),Z(2,`No signals found.`),Y(),J(3,`p`,5),Z(4,` No signal(), computed(), effect() calls found in source. Runtime graph requires Angular 19+ with the overlay connected. `),Y()())}function rC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · in <`,e.component,`> `)}}function iC(e,t){if(e&1&&(J(0,`div`,8)(1,`div`,9)(2,`span`,10),Z(3),Y(),J(4,`span`,11),Z(5),Y()(),J(6,`div`,12),Z(7),K(8,rC,1,1),Y()()),e&2){let e=t.$implicit,n=X(2);G(2),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(2),Q(e.name),G(2),Cg(` `,e.file,`:`,e.line,` `),G(),q(e.component?8:-1)}}function aC(e,t){if(e&1&&(J(0,`p`,6),Z(1,`Signals from source scan (static analysis):`),Y(),J(2,`div`,7),hh(3,iC,9,7,`div`,8,$S),Y()),e&2){let e=X();G(3),_h(e.filteredSourceSignals())}}function oC(e,t){if(e&1&&(J(0,`span`,14),Ah(1,`span`,17),Z(2),Y()),e&2){let e=t.$implicit;G(),rg(`background`,e.color),G(),$(` `,e.kind,` `)}}function sC(e,t){e&1&&(J(0,`span`,19),Z(1,`watching`),Y())}function cC(e,t){if(e&1&&(J(0,`div`,20),Z(1),Og(2,`json`),Y()),e&2){let e=X().$implicit;G(),Q(Ag(2,1,e.value))}}function lC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · Deps: `,X(2).getDependencies(e).length,` `)}}function uC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · Consumers: `,X(2).getConsumers(e).length,` `)}}function dC(e,t){if(e&1){let e=Lh();J(0,`div`,18),Hh(`click`,function(){let t=co(e).$implicit;return lo(X(2).selectNode(t))}),J(1,`div`,9)(2,`span`,10),Z(3),Y(),J(4,`span`,11),Z(5),Y(),K(6,sC,2,0,`span`,19),Y(),K(7,cC,3,3,`div`,20),J(8,`div`,12),Z(9),K(10,lC,1,1),K(11,uC,1,1),Y()()}if(e&2){let e=t.$implicit,n=X(2);ig(`selected`,n.selectedNode()?.id===e.id),G(2),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(2),Q(e.label??`(unnamed)`),G(),q(e.watched?6:-1),G(),q(e.value===void 0?-1:7),G(2),$(` Epoch: `,e.epoch,` `),G(),q(n.getDependencies(e).length?10:-1),G(),q(n.getConsumers(e).length?11:-1)}}function fC(e,t){if(e&1&&(J(0,`dt`),Z(1,`Value`),Y(),J(2,`dd`)(3,`pre`),Z(4),Og(5,`json`),Y()()),e&2){let e=X(3);G(4),Q(Ag(5,1,e.selectedNode().value))}}function pC(e,t){if(e&1&&(J(0,`li`)(1,`span`,21),Z(2),Y(),Z(3),Y()),e&2){let e=t.$implicit,n=X(4);G(),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(),$(` `,e.label??e.id,` `)}}function mC(e,t){if(e&1&&(J(0,`h4`),Z(1,`Dependencies (producers)`),Y(),J(2,`ul`),hh(3,pC,4,4,`li`,null,tC),Y()),e&2){let e=X(3);G(3),_h(e.getDependencies(e.selectedNode()))}}function hC(e,t){if(e&1&&(J(0,`li`)(1,`span`,21),Z(2),Y(),Z(3),Y()),e&2){let e=t.$implicit,n=X(4);G(),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(),$(` `,e.label??e.id,` `)}}function gC(e,t){if(e&1&&(J(0,`h4`),Z(1,`Consumers`),Y(),J(2,`ul`),hh(3,hC,4,4,`li`,null,tC),Y()),e&2){let e=X(3);G(3),_h(e.getConsumers(e.selectedNode()))}}function _C(e,t){if(e&1&&(J(0,`aside`,16)(1,`h3`),Z(2),Y(),J(3,`dl`)(4,`dt`),Z(5,`Kind`),Y(),J(6,`dd`),Z(7),Y(),J(8,`dt`),Z(9,`Epoch`),Y(),J(10,`dd`),Z(11),Y(),K(12,fC,6,3),Y(),K(13,mC,5,0),K(14,gC,5,0),Y()),e&2){let e=X(2);G(2),Q(e.selectedNode().label??e.selectedNode().id),G(5),Q(e.selectedNode().kind),G(4),Q(e.selectedNode().epoch),G(),q(e.selectedNode().value===void 0?-1:12),G(),q(e.getDependencies(e.selectedNode()).length?13:-1),G(),q(e.getConsumers(e.selectedNode()).length?14:-1)}}function vC(e,t){if(e&1&&(J(0,`div`,13),hh(1,oC,3,3,`span`,14,eC),Y(),J(3,`div`,7),hh(4,dC,12,11,`div`,15,tC),Y(),K(6,_C,15,6,`aside`,16)),e&2){let e=X();G(),_h(e.kindLegend),G(3),_h(e.filteredNodes()),G(2),q(e.selectedNode()?6:-1)}}var yC={signal:`#a78bfa`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#c084fc`,"input (signal)":`#f59e0b`,"input.required (signal)":`#f59e0b`,"output (signal)":`#ec4899`,"model (signal)":`#14b8a6`,"model.required (signal)":`#14b8a6`,"viewChild (signal)":`#8b5cf6`,"viewChild.required (signal)":`#8b5cf6`,"viewChildren (signal)":`#8b5cf6`,"contentChild (signal)":`#6366f1`,"contentChild.required (signal)":`#6366f1`,"contentChildren (signal)":`#6366f1`,resource:`#06b6d4`,unknown:`#71717a`},bC=class e{rpc=Ug(null);graph=H(null);sourceSignals=H([]);filter=H(``);selectedNode=H(null);kindLegend=Object.entries(yC).map(([e,t])=>({kind:e,color:t}));filteredNodes=Rg(()=>{let e=this.graph();if(!e)return[];let t=this.filter().toLowerCase();return t?e.nodes.filter(e=>(e.label??``).toLowerCase().includes(t)||e.kind.includes(t)):e.nodes});filteredSourceSignals=Rg(()=>{let e=this.filter().toLowerCase(),t=this.sourceSignals();return e?t.filter(t=>t.name.toLowerCase().includes(e)||t.kind.includes(e)||t.file.includes(e)):t});constructor(){Bs(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))})}async loadSignalGraph(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`signal-graph`),n=t.value();n?.graph&&this.graph.set(n.graph),t.on(`updated`,e=>{e?.graph&&this.graph.set(e.graph)})}async loadSourceSignals(e){let t=e.scope(`ng-devtools`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e)}catch{}}selectNode(e){this.selectedNode.set(this.selectedNode()?.id===e.id?null:e)}kindColor(e){return yC[e]??yC.unknown}getDependencies(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.consumer===n).map(e=>t.nodes[e.producer]).filter(Boolean)}getConsumers(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.producer===n).map(e=>t.nodes[e.consumer]).filter(Boolean)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-signal-inspector`]],inputs:{rpc:[1,`rpc`]},decls:7,vars:5,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by name or kind…`,3,`input`,`value`],[1,`label`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`legend`],[1,`legend-item`],[1,`node-card`,3,`selected`],[1,`detail-panel`],[1,`dot`],[1,`node-card`,3,`click`],[1,`watched-badge`],[1,`node-value`],[1,`kind-badge`,`sm`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`input`,1),Hh(`input`,function(e){return t.filter.set(e.target.value)}),Y(),J(2,`span`,2),Z(3),Y()(),K(4,nC,5,0,`div`,3),K(5,aC,5,0),K(6,vC,7,1)),e&2&&(G(),Rh(`value`,t.filter()),G(2),$(`Component: `,t.graph()?.componentSelector??`—`),G(),q(!t.graph()&&t.sourceSignals().length===0?4:-1),G(),q(!t.graph()&&t.sourceSignals().length>0?5:-1),G(),q(t.graph()?6:-1))},dependencies:[a_],styles:[`.toolbar[_ngcontent-%COMP%] { display: flex; gap: 12px; align-items: center; @@ -276,7 +276,7 @@ outline: none; } input[_ngcontent-%COMP%]:focus { - border-color: #a78bfa; + border-color: var(--%NS%accent); } .label[_ngcontent-%COMP%] { font-size: 13px; @@ -336,7 +336,7 @@ border-color: #3f3f46; } .node-card.selected[_ngcontent-%COMP%] { - border-color: #a78bfa; + border-color: var(--%NS%accent); } .node-header[_ngcontent-%COMP%] { display: flex; @@ -390,7 +390,7 @@ } .detail-panel[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { font-family: monospace; - color: #a78bfa; + color: var(--%NS%accent); margin-bottom: 12px; } .detail-panel[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] { @@ -445,7 +445,7 @@ outline: none; } input[type='text'][_ngcontent-%COMP%]:focus { - border-color: #a78bfa; + border-color: var(--%NS%accent); } .checkbox[_ngcontent-%COMP%] { display: flex; @@ -486,8 +486,8 @@ background: #18181b; } .injector-row.selected[_ngcontent-%COMP%] { - background: #1e1b4b; - border-color: #a78bfa; + background: color-mix(in srgb, var(--%NS%accent) 22%, transparent); + border-color: var(--%NS%accent); } .type-badge[_ngcontent-%COMP%] { font-size: 10px; @@ -547,7 +547,7 @@ } .token[_ngcontent-%COMP%] { font-family: monospace; - color: #a78bfa; + color: var(--%NS%accent); } .source-label[_ngcontent-%COMP%] { font-size: 13px; @@ -614,7 +614,7 @@ outline: none; } input[_ngcontent-%COMP%]:focus { - border-color: #a78bfa; + border-color: var(--%NS%accent); } .toggle-group[_ngcontent-%COMP%] { display: flex; @@ -796,7 +796,7 @@ border-color: #3f3f46; } .action-card.selected[_ngcontent-%COMP%] { - border-color: #a78bfa; + border-color: var(--%NS%accent); } .action-type[_ngcontent-%COMP%] { font-family: monospace; @@ -810,7 +810,7 @@ .detail-panel[_ngcontent-%COMP%] { margin-top: 16px; background: #18181b; - border: 1px solid #a78bfa; + border: 1px solid var(--%NS%accent); border-radius: 10px; padding: 16px; } @@ -831,7 +831,7 @@ font-size: 12px; white-space: pre-wrap; word-break: break-all; - }`]})},lw=(e,t)=>t.id;function uw(e,t){if(e&1){let e=Lh();Eh(0,`button`,8),Vh(`click`,function(){let t=co(e).$implicit;return lo(X().switchTab(t.id))}),Z(1),Oh()}if(e&2){let e=t.$implicit;ig(`active`,X().tab()===e.id),G(),Q(e.label)}}function dw(e,t){if(e&1){let e=Lh();Eh(0,`app-dashboard`,9),Vh(`navigate`,function(t){return co(e),lo(X().switchTab(t))}),Oh()}e&2&&wh(`rpc`,X().rpc())}function fw(e,t){e&1&&kh(0,`app-component-tree`,7),e&2&&wh(`rpc`,X().rpc())}function pw(e,t){e&1&&kh(0,`app-route-inspector`,7),e&2&&wh(`rpc`,X().rpc())}function mw(e,t){e&1&&kh(0,`app-signal-inspector`,7),e&2&&wh(`rpc`,X().rpc())}function hw(e,t){e&1&&kh(0,`app-di-inspector`,7),e&2&&wh(`rpc`,X().rpc())}function gw(e,t){e&1&&kh(0,`app-store-inspector`,7),e&2&&wh(`rpc`,X().rpc())}var _w=class e{tabs=[{id:`dashboard`,label:`Dashboard`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`}];tab=H(`dashboard`);rpc=H(null);connected=H(!1);ngOnInit(){let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.tabs.some(t=>t.id===e)&&this.tab.set(e);let t=vw();kS(t?{baseURL:t}:{}).then(e=>{this.rpc.set(e),this.connected.set(!0),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)})})}ngOnDestroy(){}switchTab(e){this.tab.set(e),history.replaceState(history.state,``,`#tab=${e}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-root`]],decls:20,vars:4,consts:[[1,`brand`],[`width`,`20`,`height`,`20`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2`],[`points`,`12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2`],[`x1`,`12`,`y1`,`22`,`x2`,`12`,`y2`,`15.5`],[`points`,`22 8.5 12 15.5 2 8.5`],[3,`active`],[1,`status`],[3,`rpc`],[3,`click`],[3,`navigate`,`rpc`]],template:function(e,t){if(e&1&&(Eh(0,`header`)(1,`div`,0),Ho(),Eh(2,`svg`,1),kh(3,`polygon`,2)(4,`line`,3)(5,`polyline`,4),Oh(),Uo(),Eh(6,`span`),Z(7,`Angular DevTools`),Oh()(),Eh(8,`nav`),hh(9,uw,2,3,`button`,5,lw),Oh(),Eh(11,`span`,6),Z(12),Oh()(),Eh(13,`main`),K(14,dw,1,1,`app-dashboard`,7)(15,fw,1,1,`app-component-tree`,7)(16,pw,1,1,`app-route-inspector`,7)(17,mw,1,1,`app-signal-inspector`,7)(18,hw,1,1,`app-di-inspector`,7)(19,gw,1,1,`app-store-inspector`,7),Oh()),e&2){let e;G(9),_h(t.tabs),G(2),ig(`connected`,t.connected()),G(),$(` `,t.connected()?`Connected`:`Connecting…`,` `),G(2),q((e=t.tab())===`dashboard`?14:e===`components`?15:e===`routes`?16:e===`signals`?17:e===`injectors`?18:e===`store`?19:-1)}},dependencies:[AS,KS,QS,bC,UC,cw],styles:[`[_nghost-%COMP%] { + }`]})},lw=(e,t)=>t.id;function uw(e,t){if(e&1){let e=Lh();Eh(0,`button`,13),Vh(`click`,function(){let t=co(e).$implicit;return lo(X().switchTab(t.id))}),Z(1),Oh()}if(e&2){let e=t.$implicit;ig(`active`,X().tab()===e.id),G(),Q(e.label)}}function dw(e,t){if(e&1){let e=Lh();Eh(0,`app-dashboard`,14),Vh(`navigate`,function(t){return co(e),lo(X().switchTab(t))}),Oh()}e&2&&wh(`rpc`,X().rpc())}function fw(e,t){e&1&&kh(0,`app-component-tree`,12),e&2&&wh(`rpc`,X().rpc())}function pw(e,t){e&1&&kh(0,`app-route-inspector`,12),e&2&&wh(`rpc`,X().rpc())}function mw(e,t){e&1&&kh(0,`app-signal-inspector`,12),e&2&&wh(`rpc`,X().rpc())}function hw(e,t){e&1&&kh(0,`app-di-inspector`,12),e&2&&wh(`rpc`,X().rpc())}function gw(e,t){e&1&&kh(0,`app-store-inspector`,12),e&2&&wh(`rpc`,X().rpc())}var _w=class e{tabs=[{id:`dashboard`,label:`Dashboard`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`}];tab=H(`dashboard`);rpc=H(null);connected=H(!1);ngOnInit(){let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.tabs.some(t=>t.id===e)&&this.tab.set(e);let t=vw();kS(t?{baseURL:t}:{}).then(e=>{this.rpc.set(e),this.connected.set(!0),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)})})}ngOnDestroy(){}switchTab(e){this.tab.set(e),history.replaceState(history.state,``,`#tab=${e}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-root`]],decls:26,vars:4,consts:[[1,`brand`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`fill`,`url(#ng-logo)`,`aria-hidden`,`true`],[`id`,`ng-logo`,`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`],[`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`],[3,`active`],[1,`status`],[3,`rpc`],[3,`click`],[3,`navigate`,`rpc`]],template:function(e,t){if(e&1&&(Eh(0,`header`)(1,`div`,0),Ho(),Eh(2,`svg`,1)(3,`defs`)(4,`linearGradient`,2),kh(5,`stop`,3)(6,`stop`,4)(7,`stop`,5)(8,`stop`,6)(9,`stop`,7)(10,`stop`,8),Oh()(),kh(11,`path`,9),Oh(),Uo(),Eh(12,`span`),Z(13,`Angular DevTools`),Oh()(),Eh(14,`nav`),hh(15,uw,2,3,`button`,10,lw),Oh(),Eh(17,`span`,11),Z(18),Oh()(),Eh(19,`main`),K(20,dw,1,1,`app-dashboard`,12)(21,fw,1,1,`app-component-tree`,12)(22,pw,1,1,`app-route-inspector`,12)(23,mw,1,1,`app-signal-inspector`,12)(24,hw,1,1,`app-di-inspector`,12)(25,gw,1,1,`app-store-inspector`,12),Oh()),e&2){let e;G(15),_h(t.tabs),G(2),ig(`connected`,t.connected()),G(),$(` `,t.connected()?`Connected`:`Connecting…`,` `),G(2),q((e=t.tab())===`dashboard`?20:e===`components`?21:e===`routes`?22:e===`signals`?23:e===`injectors`?24:e===`store`?25:-1)}},dependencies:[AS,KS,QS,bC,UC,cw],styles:[`[_nghost-%COMP%] { display: flex; flex-direction: column; height: 100vh; @@ -849,7 +849,11 @@ align-items: center; gap: 8px; font-weight: 600; - color: #a78bfa; + color: var(--%NS%accent); + } + .brand[_ngcontent-%COMP%] span[_ngcontent-%COMP%] { + color: var(--%NS%accent); + white-space: nowrap; } nav[_ngcontent-%COMP%] { display: flex; @@ -889,4 +893,4 @@ flex: 1; overflow: auto; padding: 16px; - }`]})};function vw(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e)return e;if(!location.pathname.includes(`__ng-devtools`))return`/__ng-devtools/`}U_(_w).catch(console.error);export{Kv as t}; \ No newline at end of file + }`]})};function vw(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e&&new URL(e,location.href).origin===location.origin)return e;if(!location.pathname.includes(`__ng-devtools`))return`/__ng-devtools/`}U_(_w).catch(console.error);export{Kv as t}; \ No newline at end of file diff --git a/extension/ui/assets/index-DOHC4c_4.js b/extension/ui/assets/index-DOHC4c_4.js deleted file mode 100644 index 7bdecae..0000000 --- a/extension/ui/assets/index-DOHC4c_4.js +++ /dev/null @@ -1,162 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,i=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,a=(e,a)=>{for(var o in a||={})n.call(a,o)&&i(e,o,a[o]);if(t)for(var o of t(a))r.call(a,o)&&i(e,o,a[o]);return e},o=(e,t,n)=>(i(e,typeof t==`symbol`?t:t+``,n),n),s=globalThis;function c(e){let t=s.__Zone_symbol_prefix;return(typeof t==`string`?t:`__zone_symbol__`)+e}function l(){let e=s.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t(`Zone`);let r=class e{constructor(e,t){o(this,`_parent`),o(this,`_name`),o(this,`_properties`),o(this,`_zoneDelegate`),this._parent=e,this._name=t?t.name||`unnamed`:``,this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(s.Promise!==te.ZoneAwarePromise)throw Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=e.current;for(;t.parent;)t=t.parent;return t}static get current(){return A.zone}static get currentTask(){return re}static __load_patch(r,i,a=!1){if(Object.hasOwn(te,r)){let e=s[c(`forceDuplicateZoneCheck`)]===!0;if(!a&&e)throw Error(`Already loaded patch: `+r)}else if(!s[`__Zone_disable_`+r]){let a=`Zone:`+r;t(a),te[r]=i(s,e,ne),n(a,a)}}get parent(){return this._parent}get name(){return this._name}get(e){let t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(Object.hasOwn(t._properties,e))return t;t=t._parent}return null}fork(e){if(!e)throw Error(`ZoneSpec required!`);return this._zoneDelegate.fork(this,e)}wrap(e,t){if(typeof e!=`function`)throw Error(`Expecting function got: `+e);let n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}}run(e,t,n,r){A={parent:A,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{A=A.parent}}runGuarded(e,t=null,n,r){A={parent:A,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{A=A.parent}}runTask(e,t,n){if(e.zone!=this)throw Error(`A task can only be run in the zone of creation! (Creation: `+(e.zone||x).name+`; Execution: `+this.name+`)`);let r=e,{type:i,data:{isPeriodic:a=!1,isRefreshable:o=!1}={}}=e;if(e.state===S&&(i===k||i===ee))return;let s=e.state!=T;s&&r._transitionTo(T,w);let c=re;re=r,A={parent:A,zone:this};try{i==ee&&e.data&&!a&&!o&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,r,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{let t=e.state;if(t!==S&&t!==D){if(i==k||a||o&&t===C)s&&r._transitionTo(w,T,C);else{let e=r._zoneDelegates;this._updateTaskCount(r,-1),s&&r._transitionTo(S,T,S),o&&(r._zoneDelegates=e)}}A=A.parent,re=c}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(C,S);let t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(D,C,S),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==C&&e._transitionTo(w,C),e}scheduleMicroTask(e,t,n,r){return this.scheduleTask(new u(O,e,t,n,r,void 0))}scheduleMacroTask(e,t,n,r,i){return this.scheduleTask(new u(ee,e,t,n,r,i))}scheduleEventTask(e,t,n,r,i){return this.scheduleTask(new u(k,e,t,n,r,i))}cancelTask(e){if(e.zone!=this)throw Error(`A task can only be cancelled in the zone of creation! (Creation: `+(e.zone||x).name+`; Execution: `+this.name+`)`);if(e.state===w||e.state===T){e._transitionTo(E,w,T);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(D,E),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(S,E),e.runCount=-1,e}}_updateTaskCount(e,t){let n=e._zoneDelegates;t==-1&&(e._zoneDelegates=null);for(let r=0;re.hasTask(n,r),onScheduleTask:(e,t,n,r)=>e.scheduleTask(n,r),onInvokeTask:(e,t,n,r,i,a)=>e.invokeTask(n,r,i,a),onCancelTask:(e,t,n,r)=>e.cancelTask(n,r)};class l{constructor(e,t,n){o(this,`_zone`),o(this,`_taskCounts`,{microTask:0,macroTask:0,eventTask:0}),o(this,`_forkDlgt`),o(this,`_forkZS`),o(this,`_forkCurrZone`),o(this,`_interceptDlgt`),o(this,`_interceptZS`),o(this,`_interceptCurrZone`),o(this,`_invokeDlgt`),o(this,`_invokeZS`),o(this,`_invokeCurrZone`),o(this,`_handleErrorDlgt`),o(this,`_handleErrorZS`),o(this,`_handleErrorCurrZone`),o(this,`_scheduleTaskDlgt`),o(this,`_scheduleTaskZS`),o(this,`_scheduleTaskCurrZone`),o(this,`_invokeTaskDlgt`),o(this,`_invokeTaskZS`),o(this,`_invokeTaskCurrZone`),o(this,`_cancelTaskDlgt`),o(this,`_cancelTaskZS`),o(this,`_cancelTaskCurrZone`),o(this,`_hasTaskDlgt`),o(this,`_hasTaskDlgtOwner`),o(this,`_hasTaskZS`),o(this,`_hasTaskCurrZone`),this._zone=e,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let r=n&&n.onHasTask,i=t&&t._hasTaskZS;(r||i)&&(this._hasTaskZS=r?n:a,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=a,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=a,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=a,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}get zone(){return this._zone}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,i):t.apply(n,r)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||=t;else if(t.scheduleFn)t.scheduleFn(t);else if(t.type==O)y(t);else throw Error(`Task is missing scheduleFn.`);return n}invokeTask(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error(`Task is not cancelable`);n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){let n=this._taskCounts,r=n[e],i=n[e]=r+t;if(i<0)throw Error(`More tasks executed then were scheduled.`);if(r==0||i==0){let t={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this._zone,t)}}}class u{constructor(e,t,n,r,i,a){if(o(this,`type`),o(this,`source`),o(this,`invoke`),o(this,`callback`),o(this,`data`),o(this,`scheduleFn`),o(this,`cancelFn`),o(this,`_zone`,null),o(this,`runCount`,0),o(this,`_zoneDelegates`,null),o(this,`_state`,`notScheduled`),this.type=e,this.source=t,this.data=r,this.scheduleFn=i,this.cancelFn=a,!n)throw Error(`callback is not defined`);this.callback=n;let c=this;this.invoke=e===k&&r&&r.useG?u.invokeTask:function(){return u.invokeTask.call(s,c,this,arguments)}}static invokeTask(e,t,n){e||=this,j++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{try{j===1&&!s[m]&&b()}finally{j--}}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(S,C)}_transitionTo(e,t,n){if(this._state===t||this._state===n)this._state=e,e==S&&(this._zoneDelegates=null);else throw Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?` or '`+n+`'`:``}, was '${this._state}'.`)}toString(){return this.data&&this.data.handleId!==void 0?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let d=c(`setTimeout`),f=c(`Promise`),p=c(`then`),m=c(`enable_native_microtask_draining`),h=[],g=!1,_;function v(e){!_&&s[f]&&(_=s[f].resolve(0)),_?(_[p]??_.then).call(_,e):s[d](e,0)}function y(e){let t=s[m],n=t&&h.length===0&&!g,r=!t&&j===0&&h.length===0;(n||r)&&v(b),e&&h.push(e)}function b(){if(!g){g=!0;try{for(;h.length;){let e=h;h=[];for(let t of e)try{t.zone.runTask(t,null,null)}catch(e){ne.onUnhandledError(e)}}}finally{if(s[m])g=!1,ne.microtaskDrainDone();else try{ne.microtaskDrainDone()}finally{g=!1}}}}let x={name:`NO ZONE`},S=`notScheduled`,C=`scheduling`,w=`scheduled`,T=`running`,E=`canceling`,D=`unknown`,O=`microTask`,ee=`macroTask`,k=`eventTask`,te=Object.create(null),ne={symbol:c,currentZoneFrame:()=>A,onUnhandledError:ie,microtaskDrainDone:ie,scheduleMicroTask:y,showUncaughtError:()=>!i[c(`ignoreConsoleErrorUncaughtError`)],patchEventTarget:()=>[],patchOnProperties:ie,patchMethod:()=>ie,bindArguments:()=>[],patchThen:()=>ie,patchMacroTask:()=>ie,patchEventPrototype:()=>ie,getGlobalObjects:()=>void 0,ObjectDefineProperty:()=>ie,ObjectGetOwnPropertyDescriptor:()=>void 0,ObjectCreate:()=>void 0,ArraySlice:()=>[],patchClass:()=>ie,wrapWithCurrentZone:()=>ie,filterProperties:()=>[],attachOriginToPatched:()=>ie,_redefineProperty:()=>ie,patchCallbacks:()=>ie,nativeScheduleMicroTask:v},A={parent:null,zone:new i(null,null)},re=null,j=0;function ie(){}return n(`Zone`,`Zone`),i}function u(){let e=globalThis,t=e[c(`forceDuplicateZoneCheck`)]===!0;if(e.Zone&&(t||typeof e.Zone.__symbol__!=`function`))throw Error(`Zone already loaded.`);return e.Zone??=l(),e.Zone}var d=Object.getOwnPropertyDescriptor,f=Object.defineProperty,p=Object.getPrototypeOf,m=Object.create,h=Array.prototype.slice,g=`addEventListener`,_=`removeEventListener`,v=c(g),y=c(_),b=`true`,x=`false`,S=c(``);function C(e,t){return Zone.current.wrap(e,t)}function w(e,t,n,r,i){return Zone.current.scheduleMacroTask(e,t,n,r,i)}var T=c,E=typeof window<`u`,D=E?window:void 0,O=E&&D||globalThis,ee=`removeAttribute`;function k(e,t){for(let n=e.length-1;n>=0;n--)typeof e[n]==`function`&&(e[n]=C(e[n],t+`_`+n));return e}function te(e,t){let n=e.constructor.name;for(let r=0;r{let t=function(){return e.apply(this,k(arguments,n+`.`+i))};return me(t,e),t})(a)}}}function ne(e){return e?e.writable===!1?!1:typeof e.get!=`function`||e.set!==void 0:!0}var A=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope,re=!(`nw`in O)&&O.process!==void 0&&O.process.toString()===`[object process]`,j=!re&&!A&&!!(E&&D.HTMLElement),ie=O.process!==void 0&&O.process.toString()===`[object process]`&&!A&&!!(E&&D.HTMLElement),ae=Object.create(null),oe=T(`enable_beforeunload`),se=function(e){if(e||=O.event,!e)return;let t=ae[e.type];t||=ae[e.type]=T(`ON_PROPERTY`+e.type);let n=this||e.target||O,r=n[t],i;if(j&&n===D&&e.type===`error`){let t=e;i=r&&r.call(this,t.message,t.filename,t.lineno,t.colno,t.error),i===!0&&e.preventDefault()}else i=r&&r.apply(this,arguments),e.type===`beforeunload`&&O[oe]&&typeof i==`string`?e.returnValue=i:i!=null&&!i&&e.preventDefault();return i};function ce(e,t,n){let r=d(e,t);if(!r&&n&&d(n,t)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;let i=T(`on`+t+`patched`);if(Object.hasOwn(e,i)&&e[i])return;delete r.writable,delete r.value;let a=r.get,o=r.set,s=t.slice(2),c=ae[s];c||=ae[s]=T(`ON_PROPERTY`+s),r.set=function(t){let n=this;!n&&e===O&&(n=O),n&&(typeof n[c]==`function`&&n.removeEventListener(s,se),o?.call(n,null),n[c]=t,typeof t==`function`&&n.addEventListener(s,se,!1))},r.get=function(){let n=this;if(!n&&e===O&&(n=O),!n)return null;let i=n[c];if(i)return i;if(a){let e=a.call(this);if(e)return r.set.call(this,e),typeof n[ee]==`function`&&n.removeAttribute(t),e}return null},f(e,t,r),e[i]=!0}function le(e,t,n){if(t)for(let r=0;rfunction(t,r){let a=n(t,r);return a.cbIdx>=0&&typeof r[a.cbIdx]==`function`?w(a.name,r[a.cbIdx],a,i):e.apply(t,r)})}function me(e,t){e[T(`OriginalDelegate`)]=t}function he(e){return typeof e==`function`}function ge(e){return typeof e==`number`}var _e={useG:!0},ve=Object.create(null),ye={},be=RegExp(`^`+S+`(\\w+)(true|false)$`),xe=T(`propagationStopped`),Se=[`capture`,`once`,`passive`,`signal`];function Ce(e,t){let n=(t?t(e):e)+x,r=(t?t(e):e)+b,i=S+n,a=S+r;ve[e]={[x]:i,[b]:a}}function we(e,t,n,r){let i=r&&r.add||g,o=r&&r.rm||_,s=r&&r.listeners||`eventListeners`,c=r&&r.rmAll||`removeAllListeners`,l=T(i),u=`.`+i+`:`,d=function(e,t,n){if(e.isRemoved)return;let r=e.callback;typeof r==`object`&&r.handleEvent&&(e.callback=e=>r.handleEvent(e),e.originalDelegate=r);let i;try{e.invoke(e,t,[n])}catch(e){i=e}let a=e.options;if(a&&typeof a==`object`&&a.once){let r=e.originalDelegate?e.originalDelegate:e.callback;t[o].call(t,n.type,r,a)}return i};function f(n,r,i){if(r||=e.event,!r)return;let a=n||r.target||e,o=a[ve[r.type][i?b:x]];if(o){let e=[];if(o.length===1){let t=d(o[0],a,r);t&&e.push(t)}else{let t=o.slice();for(let n=0;n{throw r})}}}let m=function(e){return f(this,e,!1)},h=function(e){return f(this,e,!0)};function v(t,n){if(!t)return!1;let r=!0;n&&n.useG!==void 0&&(r=n.useG);let d=n&&n.vh,f=!0;n&&n.chkDup!==void 0&&(f=n.chkDup);let g=!1;n&&n.rt!==void 0&&(g=n.rt);let _=t;for(;_&&!Object.hasOwn(_,i);)_=p(_);if(!_&&t[i]&&(_=t),!_||_[l])return!1;let v=n&&n.eventNameToString,y={},C=_[l]=_[i],w=_[T(o)]=_[o],E=_[T(s)]=_[s],D=_[T(c)]=_[c],O;n&&n.prepend&&(O=_[T(n.prepend)]=_[n.prepend]);function ee(e,t){return t?typeof e==`boolean`?{capture:e,passive:!0}:e?(typeof e==`object`&&e.passive!==!1&&(e.passive=!0),e):{passive:!0}:e}let k=function(e){if(!y.isExisting)return C.call(y.target,y.eventName,y.capture?h:m,y.options)},te=function(e){if(!e.isRemoved){let t=ve[e.eventName],n;t&&(n=t[e.capture?b:x]);let r=n&&e.target[n];if(r){for(let t=0;tj.zone.cancelTask(j);t.call(_,`abort`,e,{once:!0}),j.removeAbortListener=()=>_.removeEventListener(`abort`,e)}if(y.target=null,A&&(A.taskData=null),C&&(y.options.once=!0),typeof j.options!=`boolean`&&(j.options=g),j.target=l,j.capture=S,j.eventName=u,m&&(j.originalDelegate=p),c?D.unshift(j):D.push(j),s)return l}};return _[i]=ue(C,u,ie,ae,g),O&&(_.prependListener=ue(O,`.prependListener:`,A,ae,g,!0)),_[o]=function(){let t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));let i=arguments[2],a=i?typeof i==`boolean`||i.capture:!1,o=arguments[1];if(!o)return w.apply(this,arguments);if(d&&!d(w,o,t,arguments))return;let s=ve[r],c;s&&(c=s[a?b:x]);let l=c&&t[c];if(l)for(let e=0;efunction(t,n){t[xe]=!0,e&&e.apply(t,n)})}function De(e,t){t.patchMethod(e,`queueMicrotask`,e=>function(e,t){Zone.current.scheduleMicroTask(`queueMicrotask`,t[0])})}var Oe=T(`zoneTask`);function ke(e,t,n,r){let i=null,a=null;t+=r,n+=r;let o={};function s(t){let n=t.data;n.args[0]=function(){return t.invoke.apply(this,arguments)};let r=i.apply(e,n.args);return ge(r)?n.handleId=r:(n.handle=r,n.isRefreshable=he(r?.refresh)),t}function c(t){let{handle:n,handleId:r}=t.data;return a.call(e,n??r)}i=fe(e,t,n=>function(i,a){if(he(a[0])){let e={isRefreshable:!1,isPeriodic:r===`Interval`,delay:r===`Timeout`||r===`Interval`?a[1]||0:void 0,args:a},n=a[0];a[0]=function(){try{return n.apply(this,arguments)}finally{let{handle:t,handleId:n,isPeriodic:r,isRefreshable:i}=e;!r&&!i&&(n?delete o[n]:t&&(t[Oe]=null))}};let i=w(t,a[0],e,s,c);if(!i)return i;let{handleId:l,handle:u,isRefreshable:d,isPeriodic:f}=i.data;if(l)o[l]=i;else if(u&&(u[Oe]=i,d&&!f)){let e=u.refresh;u.refresh=function(){let{zone:t,state:n}=i;return n===`notScheduled`?(i._state=`scheduled`,t._updateTaskCount(i,1)):n===`running`&&(i._state=`scheduling`),e.call(this)}}return u??l??i}return n.apply(e,a)}),a=fe(e,n,t=>function(n,r){let i=r[0],a;ge(i)?(a=o[i],delete o[i]):(a=i?.[Oe],a?i[Oe]=null:a=i),a?.type?a.cancelFn&&a.zone.cancelTask(a):t.apply(e,r)})}function Ae(e,t){let{isBrowser:n,isMix:r}=t.getGlobalObjects();(n||r)&&e.customElements&&`customElements`in e&&t.patchCallbacks(t,e.customElements,`customElements`,`define`,[`connectedCallback`,`disconnectedCallback`,`adoptedCallback`,`attributeChangedCallback`,`formAssociatedCallback`,`formDisabledCallback`,`formResetCallback`,`formStateRestoreCallback`])}function je(e,t){if(Zone[t.symbol(`patchEventTarget`)])return;let{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:i,FALSE_STR:a,ZONE_SYMBOL_PREFIX:o}=t.getGlobalObjects();for(let e=0;et.target===e);if(r.length===0)return t;let i=r[0].ignoreProperties;return t.filter(e=>i.indexOf(e)===-1)}function Pe(e,t,n,r){e&&le(e,Ne(e,t,n),r)}function Fe(e){return Object.getOwnPropertyNames(e).filter(e=>e.startsWith(`on`)&&e.length>2).map(e=>e.substring(2))}function Ie(e,t){if(re&&!ie||Zone[e.symbol(`patchEvents`)])return;let n=t.__Zone_ignore_on_properties,r=[];if(j){let e=window;r=r.concat([`Document`,`SVGElement`,`Element`,`HTMLElement`,`HTMLBodyElement`,`HTMLMediaElement`,`HTMLFrameSetElement`,`HTMLFrameElement`,`HTMLIFrameElement`,`HTMLMarqueeElement`,`Worker`]),Pe(e,Fe(e),n,p(e))}r=r.concat([`XMLHttpRequest`,`XMLHttpRequestEventTarget`,`IDBIndex`,`IDBRequest`,`IDBOpenDBRequest`,`IDBDatabase`,`IDBTransaction`,`IDBCursor`,`WebSocket`]);for(let e=0;e{let t=`clear`;ke(e,`set`,t,`Timeout`),ke(e,`set`,t,`Interval`),ke(e,`set`,t,`Immediate`)}),e.__load_patch(`requestAnimationFrame`,e=>{ke(e,`request`,`cancel`,`AnimationFrame`),ke(e,`mozRequest`,`mozCancel`,`AnimationFrame`),ke(e,`webkitRequest`,`webkitCancel`,`AnimationFrame`)}),e.__load_patch(`blocking`,(e,t)=>{let n=[`alert`,`prompt`,`confirm`];for(let r=0;rfunction(r,a){return t.current.run(n,e,a,i)})}}),e.__load_patch(`EventTarget`,(e,t,n)=>{Me(e,n),je(e,n);let r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,n,[r.prototype])}),e.__load_patch(`MutationObserver`,(e,t,n)=>{de(`MutationObserver`),de(`WebKitMutationObserver`)}),e.__load_patch(`IntersectionObserver`,(e,t,n)=>{de(`IntersectionObserver`)}),e.__load_patch(`FileReader`,(e,t,n)=>{de(`FileReader`)}),e.__load_patch(`on_property`,(e,t,n)=>{Ie(n,e)}),e.__load_patch(`customElements`,(e,t,n)=>{Ae(e,n)}),e.__load_patch(`XHR`,(e,t)=>{c(e);let n=T(`xhrTask`),r=T(`xhrSync`),i=T(`xhrListener`),a=T(`xhrScheduled`),o=T(`xhrURL`),s=T(`xhrErrorBeforeScheduled`);function c(e){let c=e.XMLHttpRequest;if(!c)return;let l=c.prototype;function u(e){return e[n]}let d=l[v],f=l[y];if(!d){let t=e.XMLHttpRequestEventTarget;if(t){let e=t.prototype;d=e[v],f=e[y]}}let p=`readystatechange`,m=`scheduled`;function h(e){let r=e.data,o=r.target;o[a]=!1,o[s]=!1;let c=o[i];d||(d=o[v],f=o[y]),c&&f.call(o,p,c);let l=o[i]=()=>{if(o.readyState===o.DONE){if(!r.aborted&&o[a]&&e.state===m){let n=o[t.__symbol__(`loadfalse`)];if(o.status!==0&&n&&n.length>0){let i=e.invoke;e.invoke=function(){let n=o[t.__symbol__(`loadfalse`)];for(let t=0;tfunction(e,t){return e[r]=t[2]==0,e[o]=t[1],b.apply(e,t)}),x=T(`fetchTaskAborting`),S=T(`fetchTaskScheduling`),C=fe(l,`send`,()=>function(e,n){if(t.current[S]===!0||e[r])return C.apply(e,n);{let t={target:e,url:e[o],isPeriodic:!1,args:n,aborted:!1},r=w(`XMLHttpRequest.send`,g,t,h,_);e&&e[s]===!0&&!t.aborted&&r.state===m&&r.invoke()}}),E=fe(l,`abort`,()=>function(e,n){let r=u(e);if(r&&typeof r.type==`string`){if(r.cancelFn==null||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(t.current[x]===!0)return E.apply(e,n)})}}),e.__load_patch(`geolocation`,e=>{e.navigator&&e.navigator.geolocation&&te(e.navigator.geolocation,[`getCurrentPosition`,`watchPosition`])}),e.__load_patch(`PromiseRejectionEvent`,(e,t)=>{function n(t){return function(n){Te(e,t).forEach(r=>{let i=e.PromiseRejectionEvent;if(i){let e=new i(t,{promise:n.promise,reason:n.rejection});r.invoke(e)}})}}e.PromiseRejectionEvent&&(t[T(`unhandledPromiseRejectionHandler`)]=n(`unhandledrejection`),t[T(`rejectionHandledHandler`)]=n(`rejectionhandled`))}),e.__load_patch(`queueMicrotask`,(e,t,n)=>{De(e,n)})}function Re(e){e.__load_patch(`ZoneAwarePromise`,(e,t,n)=>{let r=Object.getOwnPropertyDescriptor,i=Object.defineProperty;function a(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||``)+`: `+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}let o=n.symbol,s=[],c=e[o(`DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION`)]!==!1,l=o(`Promise`),u=o(`then`);n.onUnhandledError=e=>{if(n.showUncaughtError()){let t=e&&e.rejection;t&&e.zone&&e.task?console.error(`Unhandled Promise rejection:`,t instanceof Error?t.message:t,`; Zone:`,e.zone.name,`; Task:`,e.task&&e.task.source,`; Value:`,t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;s.length;){let e=s.shift();try{e.zone.runGuarded(()=>{throw e.throwOriginal?e.rejection:e})}catch(e){f(e)}}};let d=o(`unhandledPromiseRejectionHandler`);function f(e){n.onUnhandledError(e);try{let n=t[d];typeof n==`function`&&n.call(this,e)}catch{}}function p(e){return e&&typeof e.then==`function`}function m(e){return e}function h(e){return k.reject(e)}let g=o(`state`),_=o(`value`),v=o(`finally`),y=o(`parentPromiseValue`),b=o(`parentPromiseState`);function x(e,t){return n=>{try{w(e,t,n)}catch(t){w(e,!1,t)}}}let S=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},C=o(`currentTaskTrace`);function w(e,r,o){let l=S();if(e===o)throw TypeError(`Promise resolved with itself`);if(e[g]===null){let u=null;try{(typeof o==`object`||typeof o==`function`)&&(u=o&&o.then)}catch(t){return l(()=>{w(e,!1,t)})(),e}if(r!==!1&&o instanceof k&&Object.hasOwn(o,g)&&Object.hasOwn(o,_)&&o[g]!==null)E(o),w(e,o[g],o[_]);else if(r!==!1&&typeof u==`function`)try{u.call(o,l(x(e,r)),l(x(e,!1)))}catch(t){l(()=>{w(e,!1,t)})()}else{e[g]=r;let l=e[_];if(e[_]=o,e[v]===v&&r===!0&&(e[g]=e[b],e[_]=e[y]),r===!1&&o instanceof Error){let e=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;e&&i(o,C,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t{try{let r=e[_],i=!!n&&v===n[v];i&&(n[y]=r,n[b]=a),w(n,!0,t.run(o,void 0,i&&o!==h&&o!==m?[]:[r]))}catch(e){w(n,!1,e)}},n)}let O=function(){},ee=e.AggregateError;class k{static toString(){return`function ZoneAwarePromise() { [native code] }`}static resolve(e){return e instanceof k?e:w(new this(null),!0,e)}static reject(e){return w(new this(null),!1,e)}static withResolvers(){let e={};return e.promise=new k((t,n)=>{e.resolve=t,e.reject=n}),e}static any(e){if(!e||typeof e[Symbol.iterator]!=`function`)return Promise.reject(new ee([],`All promises were rejected`));let t=[],n=0;try{for(let r of e)n++,t.push(k.resolve(r))}catch{return Promise.reject(new ee([],`All promises were rejected`))}if(n===0)return Promise.reject(new ee([],`All promises were rejected`));let r=!1,i=[];return new k((e,a)=>{for(let o=0;o{r||(r=!0,e(t))},e=>{i.push(e),n--,n===0&&(r=!0,a(new ee(i,`All promises were rejected`)))})})}static race(e){let t,n,r=new this((e,r)=>{t=e,n=r});function i(e){t(e)}function a(e){n(e)}for(let t of e)p(t)||(t=this.resolve(t)),t.then(i,a);return r}static all(e){return k.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof k?this:k).allWithCallback(e,{thenCallback:e=>({status:`fulfilled`,value:e}),errorCallback:e=>({status:`rejected`,reason:e})})}static allWithCallback(e,t){let n,r,i=new this((e,t)=>{n=e,r=t}),a=2,o=0,s=[];for(let i of e){p(i)||(i=this.resolve(i));let e=o;try{i.then(r=>{s[e]=t?t.thenCallback(r):r,a--,a===0&&n(s)},i=>{t?(s[e]=t.errorCallback(i),a--,a===0&&n(s)):r(i)})}catch(e){r(e)}a++,o++}return a-=2,a===0&&n(s),i}constructor(e){let t=this;if(!(t instanceof k))throw Error(`Must be an instanceof Promise.`);t[g]=null,t[_]=[];try{let n=S();e&&e(n(x(t,!0)),n(x(t,!1)))}catch(e){w(t,!1,e)}}get[Symbol.toStringTag](){return`Promise`}get[Symbol.species](){return k}then(e,n){let r=this.constructor?.[Symbol.species];(!r||typeof r!=`function`)&&(r=this.constructor||k);let i=new r(O),a=t.current;return this[g]==null?this[_].push(a,i,e,n):D(this,a,i,e,n),i}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];(!n||typeof n!=`function`)&&(n=k);let r=new n(O);r[v]=v;let i=t.current;return this[g]==null?this[_].push(i,r,e,e):D(this,i,r,e,e),r}}k.resolve=k.resolve,k.reject=k.reject,k.race=k.race,k.all=k.all;let te=e[l]=e.Promise;e.Promise=k;let ne=o(`thenPatched`);function A(e){let t=e.prototype,n=r(t,`then`);if(n&&(n.writable===!1||!n.configurable))return;let i=t.then;t[u]=i,e.prototype.then=function(e,t){return new k((e,t)=>{i.call(this,e,t)}).then(e,t)},e[ne]=!0}n.patchThen=A;function re(e){return function(t,n){let r=e.apply(t,n);if(r instanceof k)return r;let i=r.constructor;return i[ne]||A(i),r}}if(te){A(te);let t=te.try;t&&typeof t==`function`&&(k.try=t),fe(e,`fetch`,e=>re(e))}return Promise[t.__symbol__(`uncaughtPromiseErrors`)]=s,k})}function ze(e){e.__load_patch(`toString`,e=>{let t=Function.prototype.toString,n=T(`OriginalDelegate`),r=T(`Promise`),i=T(`Error`),a=function(){if(typeof this==`function`){let a=this[n];if(a)return typeof a==`function`?t.call(a):Object.prototype.toString.call(a);if(this===Promise){let n=e[r];if(n)return t.call(n)}if(this===Error){let n=e[i];if(n)return t.call(n)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;let o=Object.prototype.toString;Object.prototype.toString=function(){return typeof Promise==`function`&&this instanceof Promise?`[object Promise]`:o.call(this)}})}function Be(e,t,n,r,i){let a=Zone.__symbol__(r);if(t[a])return;let o=t[a]=t[r];t[r]=function(a,s,c){return s&&s.prototype&&i.forEach(function(t){let i=`${n}.${r}::`+t,a=s.prototype;try{if(Object.hasOwn(a,t)){let n=e.ObjectGetOwnPropertyDescriptor(a,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,i),e._redefineProperty(s.prototype,t,n)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}catch{}}),o.call(t,a,s,c)},e.attachOriginToPatched(t[r],o)}function Ve(e){e.__load_patch(`util`,(e,t,n)=>{let r=Fe(e);n.patchOnProperties=le,n.patchMethod=fe,n.bindArguments=k,n.patchMacroTask=pe;let i=t.__symbol__(`BLACK_LISTED_EVENTS`),a=t.__symbol__(`UNPATCHED_EVENTS`);e[a]&&(e[i]=e[a]),e[i]&&(t[i]=t[a]=e[i]),n.patchEventPrototype=Ee,n.patchEventTarget=we,n.ObjectDefineProperty=f,n.ObjectGetOwnPropertyDescriptor=d,n.ObjectCreate=m,n.ArraySlice=h,n.patchClass=de,n.wrapWithCurrentZone=C,n.filterProperties=Ne,n.attachOriginToPatched=me,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Be,n.getGlobalObjects=()=>({globalSources:ye,zoneSymbolEventNames:ve,eventNames:r,isBrowser:j,isMix:ie,isNode:re,TRUE_STR:b,FALSE_STR:x,ZONE_SYMBOL_PREFIX:S,ADD_EVENT_LISTENER_STR:g,REMOVE_EVENT_LISTENER_STR:_})})}function He(e){Re(e),ze(e),Ve(e)}var Ue=u();He(Ue),Le(Ue);var We=null,Ge=!1,Ke=1,qe=null,Je=Symbol(`SIGNAL`);function M(e){let t=We;return We=e,t}function Ye(){return We}var Xe={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:`unknown`,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ze(e){if(Ge)throw Error(``);if(We===null)return;We.consumerOnSignalRead(e);let t=We.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=We.recomputing;if(r&&(n=t===void 0?We.producers:t.nextProducer,n!==void 0&&n.producer===e)){We.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Ke;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===We&&(!r||i.knownValidAtEpoch===Ke))return;let a=ft(We),o={producer:e,consumer:We,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Ke,lastReadVersion:e.version,nextConsumer:void 0};We.producersTail=o,t===void 0?We.producers=o:t.nextProducer=o,a&&ut(e,o)}function Qe(){Ke++}function $e(e){if((!ft(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==Ke)){if(!e.producerMustRecompute(e)&&!ct(e)){rt(e);return}e.producerRecomputeValue(e),rt(e)}}function et(e){if(e.consumers===void 0)return;let t=Ge;Ge=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||nt(e)}}finally{Ge=t}}function tt(){return We?.consumerAllowSignalWrites!==!1}function nt(e){e.dirty=!0,et(e),e.consumerMarkedDirty?.(e)}function rt(e){e.dirty=!1,e.lastCleanEpoch=Ke}function it(e){return e&&at(e),M(e)}function at(e){if(e.producersTail?.knownValidAtEpoch===Ke){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function ot(e,t){M(t),e&&st(e)}function st(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(ft(e))do n=dt(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function ct(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||($e(e),n!==e.version))return!0}return!1}function lt(e){if(ft(e)){let t=e.producers;for(;t!==void 0;)t=dt(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function ut(e,t){let n=e.consumersTail,r=ft(e);if(n===void 0?(t.nextConsumer=void 0,e.consumers=t):(t.nextConsumer=n.nextConsumer,n.nextConsumer=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let t=e.producers;t!==void 0;t=t.nextProducer)ut(t.producer,t)}function dt(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,i=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r===void 0?t.consumersTail=i:r.prevConsumer=i,i!==void 0)i.nextConsumer=r;else if(t.consumers=r,!ft(t)){let e=t.producers;for(;e!==void 0;)e=dt(e)}return n}function ft(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function pt(e){qe?.(e)}function mt(e,t){return Object.is(e,t)}function ht(e,t){let n=Object.create(yt);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if($e(n),Ze(n),n.value===vt)throw n.error;return n.value};return r[Je]=n,pt(n),r}var gt=Symbol(`UNSET`),_t=Symbol(`COMPUTING`),vt=Symbol(`ERRORED`),yt={...Xe,value:gt,dirty:!0,error:null,equal:mt,kind:`computed`,producerMustRecompute(e){return e.value===gt||e.value===_t},producerRecomputeValue(e){if(e.value===_t)throw Error(``);let t=e.value;e.value=_t;let n=it(e),r,i=!1;try{r=e.computation(),M(null),i=t!==gt&&t!==vt&&r!==vt&&e.equal(t,r)}catch(t){r=vt,e.error=t}finally{ot(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function bt(){throw Error()}var xt=bt;function St(e){xt(e)}function Ct(e){xt=e}var wt=null;function Tt(e,t){let n=Object.create(kt);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Et(n);return r[Je]=n,pt(n),[r,e=>Dt(n,e),e=>Ot(n,e)]}function Et(e){return Ze(e),e.value}function Dt(e,t){tt()||St(e),e.equal(e.value,t)||(e.value=t,At(e))}function Ot(e,t){tt()||St(e),Dt(e,t(e.value))}var kt={...Xe,equal:mt,value:void 0,kind:`signal`};function At(e){e.version++,Qe(),et(e),wt?.(e)}var jt={...Xe,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function Mt(e){if(e.dirty=!1,e.version>0&&!ct(e))return;e.version++;let t=it(e);try{e.cleanup(),e.fn()}finally{ot(e,t)}}var Nt=void 0;function Pt(){return Nt}function Ft(e){let t=Nt;return Nt=e,t}var It=Symbol(`NotFound`);function Lt(e){return e===It||e?.name===`ɵNotFound`}var Rt=function(e,t){return Rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Rt(e,t)};function zt(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Rt(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Bt(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function Vt(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Ht(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0},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?Jt:(this.currentObservers=null,a.push(e),new qt(function(){t.currentObservers=null,Kt(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 xn;return e.source=this,e},t.create=function(e,t){return new jn(e,t)},t}(xn),jn=function(e){zt(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)??Jt},t}(An),Mn=function(e){zt(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}(An);function Nn(e,t){return En(function(n,r){var i=0;n.subscribe(Dn(r,function(n){r.next(e.call(t,n,i++))}))})}var Pn=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,N=class extends Error{code;constructor(e,t){super(In(e,t)),this.code=e}};function Fn(e){return`NG0${Math.abs(e)}`}function In(e,t){return`${Fn(e)}${t?`: `+t:``}`}function P(e){for(let t in e)if(e[t]===P)return t;throw Error(``)}function Ln(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(Ln).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` -`);return r>=0?n.slice(0,r):n}function Rn(e,t){return e?t?`${e} ${t}`:e:t||``}var zn=P({__forward_ref__:P});function Bn(e){return e.__forward_ref__=Bn,e}function Vn(e){return Hn(e)?e():e}function Hn(e){return typeof e==`function`&&Object.hasOwn(e,zn)&&e.__forward_ref__===Bn}function Un(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Wn(e){return Gn(e,Jn)}function Gn(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Kn(e){return(e?.[Jn]??null)||null}function qn(e){return e&&Object.hasOwn(e,Yn)?e[Yn]:null}var Jn=P({ɵprov:P}),Yn=P({ɵinj:P}),F=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=Un({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Xn(e){return e&&!!e.ɵproviders}var Zn=P({ɵcmp:P}),Qn=P({ɵdir:P}),$n=P({ɵpipe:P}),er=P({ɵfac:P}),tr=P({__NG_ELEMENT_ID__:P}),nr=P({__NG_ENV_ID__:P});function rr(e){return or(e,`@Component`),e[Zn]||null}function ir(e){return or(e,`@Directive`),e[Qn]||null}function ar(e){return or(e,`@Pipe`),e[$n]||null}function or(e,t){if(e==null)throw new N(-919,!1)}function sr(e){return typeof e==`string`?e:e==null?``:String(e)}var cr=P({ngErrorCode:P}),lr=P({ngErrorMessage:P}),ur=P({ngTokenPath:P});function dr(e,t){return pr(``,-200,t)}function fr(e,t){throw new N(-201,!1)}function pr(e,t,n){let r=new N(t,e);return r[cr]=t,r[lr]=e,n&&(r[ur]=n),r}function mr(e){return e[cr]}var hr;function gr(){return hr}function _r(e){let t=hr;return hr=e,t}function vr(e,t,n){let r=Wn(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;fr(e,``)}var yr={},br=`__NG_DI_FLAG__`,xr=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=Cr(t)||0;try{return this.injector.get(e,n&8?null:yr,n)}catch(e){if(Lt(e))return e;throw e}}};function Sr(e,t=0){let n=Pt();if(n===void 0)throw new N(-203,!1);if(n===null)return vr(e,void 0,t);{let r=wr(t),i=n.retrieve(e,r);if(Lt(i)){if(r.optional)return null;throw i}return i}}function I(e,t=0){return(gr()||Sr)(Vn(e),t)}function L(e,t){return I(e,Cr(t))}function Cr(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function wr(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Tr(e){let t=[];for(let n=0;nArray.isArray(e)?Or(e,t):t(e))}function kr(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Ar(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function jr(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function Mr(e,t,n){let r=Pr(e,t);return r>=0?e[r|1]=n:(r=~r,jr(e,r,t,n)),r}function Nr(e,t){let n=Pr(e,t);if(n>=0)return e[n|1]}function Pr(e,t){return Fr(e,t,1)}function Fr(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 Or(t,e=>{let t=e;Gr(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Wr(i,a),n}function Wr(e,t){for(let n=0;n{t(e,r)})}}function Gr(e,t,n,r){if(e=Vn(e),!e)return!1;let i=null,a=qn(e),o=!a&&rr(e);if(!a&&!o){let t=e.ngModule;if(a=qn(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)Gr(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{Or(a.imports,i=>{Gr(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Wr(e,t)}if(!s){let e=Dr(i)||(()=>new i);t({provide:i,useFactory:e,deps:Lr},i),t({provide:Br,useValue:i,multi:!0},i),t({provide:Rr,useValue:()=>I(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Kr(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Kr(e,t){for(let n of e)Xn(n)&&(n=n.ɵproviders),Array.isArray(n)?Kr(n,t):t(n)}var qr=P({provide:String,useValue:P});function Jr(e){return typeof e==`object`&&!!e&&qr in e}function Yr(e){return!!(e&&e.useExisting)}function Xr(e){return!!(e&&e.useFactory)}function Zr(e){return typeof e==`function`}var Qr=new F(``),$r={},ei={},ti=void 0;function ni(){return ti===void 0&&(ti=new Vr),ti}var ri=class{},ii=class extends ri{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,mi(e,e=>this.processProvider(e)),this.records.set(zr,ui(void 0,this)),r.has(`environment`)&&this.records.set(ri,ui(void 0,this));let i=this.records.get(Qr);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Br,Lr,{self:!0}))}retrieve(e,t){let n=Cr(t)||0;try{return this.get(e,yr,n)}catch(e){if(Lt(e))return e;throw e}}destroy(){li(this),this._destroyed=!0;let e=M(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(),M(e)}}onDestroy(e){return li(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){li(this);let t=Ft(this),n=_r(void 0);try{return e()}finally{Ft(t),_r(n)}}get(e,t=yr,n){if(li(this),Object.hasOwn(e,nr))return e[nr](this);let r=Cr(n),i=Ft(this),a=_r(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=pi(e)&&Wn(e);t=n&&this.injectableDefInScope(n)?ui(ai(e),$r):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?ni():this.parent;return t=r&8&&t===yr?null:t,n.get(e,t)}catch(e){let t=mr(e);throw t===-200||t===-201?new N(t,null):e}finally{_r(a),Ft(i)}}resolveInjectorInitializers(){let e=M(null),t=Ft(this),n=_r(void 0);try{let e=this.get(Rr,Lr,{self:!0});for(let t of e)t()}finally{Ft(t),_r(n),M(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=Vn(e);let t=Zr(e)?e:Vn(e&&e.provide),n=si(e);if(!Zr(e)&&e.multi===!0){let n=this.records.get(t);n||(n=ui(void 0,$r,!0),n.factory=()=>Tr(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=M(null);try{if(t.value===ei)throw dr(``);return t.value===$r&&(t.value=ei,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&fi(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{M(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Vn(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 ai(e){let t=Wn(e),n=t===null?Dr(e):t.factory;if(n!==null)return n;if(e instanceof F)throw new N(-204,!1);if(e instanceof Function)return oi(e);throw new N(-204,!1)}function oi(e){if(e.length>0)throw new N(-204,!1);let t=Kn(e);return t===null?()=>new e:()=>t.factory(e)}function si(e){return Jr(e)?ui(void 0,e.useValue):ui(ci(e),$r)}function ci(e,t,n){let r;if(Zr(e)){let t=Vn(e);return Dr(t)||ai(t)}if(Jr(e))r=()=>Vn(e.useValue);else if(Xr(e))r=()=>e.useFactory(...Tr(e.deps||[]));else if(Yr(e))r=(t,n)=>I(Vn(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=Vn(e&&(e.useClass||e.provide));if(di(e))r=()=>new t(...Tr(e.deps));else return Dr(t)||ai(t)}return r}function li(e){if(e.destroyed)throw new N(-205,!1)}function ui(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function di(e){return!!e.deps}function fi(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function pi(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function mi(e,t){for(let n of e)Array.isArray(n)?mi(n,t):n&&Xn(n)?mi(n.ɵproviders,t):t(n)}function hi(e,t){let n;e instanceof ii?(li(e),n=e):n=new xr(e);let r=Ft(n),i=_r(void 0);try{return t()}finally{Ft(r),_r(i)}}function gi(){return gr()!==void 0||Pt()!=null}var _i=1;function vi(e){return Array.isArray(e)&&typeof e[_i]==`object`}function yi(e){return Array.isArray(e)&&e[_i]===!0}function bi(e){return!!(e.flags&4)}function xi(e){return e.componentOffset>-1}function Si(e){return(e.flags&1)==1}function Ci(e){return!!e.template}function wi(e){return!!(e[2]&512)}function Ti(e){return(e[2]&256)==256}var Ei=`math`;function Di(e){for(;Array.isArray(e);)e=e[0];return e}function Oi(e,t){return Di(t[e])}function ki(e,t){return Di(t[e.index])}function Ai(e,t){return e.data[t]}function ji(e,t){return e[t]}function Mi(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Ni(e,t){let n=t[e];return vi(n)?n:n[0]}function Pi(e){return(e[2]&128)==128}function Fi(e,t){return t==null?null:e[t]}function Ii(e){e[17]=0}function Li(e){e[2]&1024||(e[2]|=1024,Pi(e)&&Vi(e))}function Ri(e,t){for(;e>0;)t=t[14],e--;return t}function zi(e){return!!(e[2]&9216||e[24]?.dirty)}function Bi(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),zi(e)&&Vi(e)}function Vi(e){e[10].changeDetectionScheduler?.notify(0);let t=Wi(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!Pi(t)));)t=Wi(t)}function Hi(e,t){if(Ti(e))throw new N(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Ui(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Wi(e){let t=e[3];return yi(t)?t[3]:t}function Gi(e){return e[7]??=[]}function Ki(e){return e.cleanup??=[]}var R={lFrame:Ea(null),bindingsEnabled:!0,skipHydrationRootTNode:null},qi=!1;function Ji(){return R.lFrame.elementDepthCount}function Yi(){R.lFrame.elementDepthCount++}function Xi(){R.lFrame.elementDepthCount--}function Zi(){return R.bindingsEnabled}function Qi(){return R.skipHydrationRootTNode!==null}function $i(e){return R.skipHydrationRootTNode===e}function ea(){R.skipHydrationRootTNode=null}function z(){return R.lFrame.lView}function ta(){return R.lFrame.tView}function na(e){return R.lFrame.contextLView=e,e[8]}function ra(e){return R.lFrame.contextLView=null,e}function ia(){let e=aa();for(;e!==null&&e.type===64;)e=e.parent;return e}function aa(){return R.lFrame.currentTNode}function oa(){let e=R.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function sa(e,t){let n=R.lFrame;n.currentTNode=e,n.isParent=t}function ca(){return R.lFrame.isParent}function la(){R.lFrame.isParent=!1}function ua(){return qi}function da(e){let t=qi;return qi=e,t}function fa(){let e=R.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function pa(e){return R.lFrame.bindingIndex=e}function ma(){return R.lFrame.bindingIndex++}function ha(e){let t=R.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function ga(){return R.lFrame.inI18n}function _a(e,t){let n=R.lFrame;n.bindingIndex=n.bindingRootIndex=e,ya(t)}function va(){return R.lFrame.currentDirectiveIndex}function ya(e){R.lFrame.currentDirectiveIndex=e}function ba(e){let t=R.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function xa(e){R.lFrame.currentQueryIndex=e}function Sa(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function Ca(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=Sa(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=R.lFrame=Ta();return r.currentTNode=t,r.lView=e,!0}function wa(e){let t=Ta(),n=e[1];R.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Ta(){let e=R.lFrame,t=e===null?null:e.child;return t===null?Ea(e):t}function Ea(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 Da(){let e=R.lFrame;return R.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Oa=Da;function ka(){let e=Da();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 Aa(e){return(R.lFrame.contextLView=Ri(e,R.lFrame.contextLView))[8]}function ja(){return R.lFrame.selectedIndex}function Ma(e){R.lFrame.selectedIndex=e}function Na(){let e=R.lFrame;return Ai(e.tView,e.selectedIndex)}function Pa(){R.lFrame.currentNamespace=`svg`}function Fa(){Ia()}function Ia(){R.lFrame.currentNamespace=null}function La(){return R.lFrame.currentNamespace}var Ra=!0;function za(){return Ra}function Ba(e){Ra=e}function Va(e,t=null,n=null,r){let i=Ha(e,t,n,r);return i.resolveInjectorInitializers(),i}function Ha(e,t=null,n=null,r,i=new Set){return new ii([n||Lr,Hr(e)],t||ni(),null,i)}var Ua=class e{static THROW_IF_NOT_FOUND=yr;static NULL=new Vr;static create(e,t){if(Array.isArray(e))return Va({name:``},t,e,``);{let t=e.name??``;return Va({name:t},e.parent,e.providers,t)}}static ɵprov=Un({token:e,providedIn:`any`,factory:()=>I(zr)});static __NG_ELEMENT_ID__=-1},Wa=new F(``),Ga=class{static __NG_ELEMENT_ID__=qa;static __NG_ENV_ID__=e=>e},Ka=class extends Ga{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Ti(this._lView)}onDestroy(e){let t=this._lView;return Hi(t,e),()=>Ui(t,e)}};function qa(){return new Ka(z())}var Ja=new F(``),Ya=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Mn(!1);debugTaskTracker=L(Ja,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new xn(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=Un({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Xa=class extends An{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,gi()&&(this.destroyRef=L(Ga,{optional:!0})??void 0,this.pendingTasks=L(Ya,{optional:!0})??void 0)}emit(e){let t=M(null);try{super.next(e)}finally{M(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 qt&&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 Za(...e){}function Qa(e){let t,n;function r(){e=Za;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 $a(e){return queueMicrotask(()=>e()),()=>{e=Za}}var eo=`isAngularZone`,to=`isAngularZone_ID`,no=0,ro=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new Xa(!1);onMicrotaskEmpty=new Xa(!1);onStable=new Xa(!1);onError=new Xa(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new N(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,so(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(eo)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new N(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new N(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,io,Za,Za);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)}},io={};function ao(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 oo(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){Qa(()=>{e.callbackScheduled=!1,co(e),e.isCheckStableRunning=!0,ao(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),co(e)}function so(e){let t=()=>{oo(e)},n=no++;e._inner=e._inner.fork({name:`angular`,properties:{[eo]:!0,[to]:n,[to+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(po(s))return n.invokeTask(i,a,o,s);try{return lo(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),uo(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return lo(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!mo(s)&&t(),uo(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,co(e),ao(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 co(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function lo(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function uo(e){e._nesting--,ao(e)}var fo=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new Xa;onMicrotaskEmpty=new Xa;onStable=new Xa;onError=new Xa;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 po(e){return ho(e,`__ignore_ng_zone__`)}function mo(e){return ho(e,`__scheduler_tick__`)}function ho(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var go=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},_o=new F(``,{factory:()=>{let e=L(ro),t=L(ri),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(go),n.handleError(r))})}}}),vo={provide:Rr,useValue:()=>{L(go,{optional:!0})},multi:!0};function B(e,t){let[n,r,i]=Tt(e,t?.equal),a=n;return a[Je],a.set=r,a.update=i,a.asReadonly=yo.bind(a),a}function yo(){let e=this[Je];if(e.readonlyFn===void 0){let t=()=>this();t[Je]=e,e.readonlyFn=t}return e.readonlyFn}var bo=new F(``,{factory:()=>xo}),xo=`ng`,So=new F(``),Co=new F(``,{providedIn:`platform`,factory:()=>`unknown`}),wo=new F(``,{factory:()=>L(Wa).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),To=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=Eo}return e})();function Eo(){return new To(z(),ia())}var Do=class{},Oo=new F(``,{factory:()=>!0}),ko=new F(``),Ao=(()=>{class e{static ɵprov=Un({token:e,providedIn:`root`,factory:()=>new jo})}return e})(),jo=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}},Mo=class{[Je];constructor(e){this[Je]=e}destroy(){this[Je].destroy()}};function No(e,t){let n=t?.injector??L(Ua),r=t?.manualCleanup===!0?null:n.get(Ga),i,a=n.get(To,null,{optional:!0}),o=n.get(Do);return a===null?i=Ro(e,n.get(Ao),o):(i=Lo(a.view,o,e),r instanceof Ka&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new Mo(i)}var Po={...jt,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=da(!1);try{Mt(this)}finally{da(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=M(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],M(e)}}},Fo={...Po,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(lt(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},Io={...Po,consumerMarkedDirty(){this.view[2]|=8192,Vi(this.view),this.notifier.notify(13)},destroy(){if(lt(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function Lo(e,t,n){let r=Object.create(Io);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=zo(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function Ro(e,t,n){let r=Object.create(Fo);return r.fn=zo(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 zo(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}var Bo=(()=>{class e{internalPendingTasks=L(Ya);scheduler=L(Do);errorHandler=L(_o);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let t=this.add();try{e().catch(this.errorHandler).finally(t)}catch(e){this.errorHandler(e),t()}}static ɵprov=Un({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Vo=Symbol(`InputSignalNode#UNSET`),Ho={...kt,transformFn:void 0,applyValueToInputSignal(e,t){Dt(e,t)}};function Uo(e){return{toString:e}.toString()}var V=(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})(V||{});function Wo(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Go=null;function Ko(){return Go}var qo=[],H=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,es(o,a)):es(o,a)}var ns=-1,rs=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 is(e){return!!(e.flags&8)}function as(e){return!!(e.flags&16)}function os(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function ms(e,t){let n=ps(e),r=t;for(;n>0;)r=r[14],n--;return r}var hs=!0;function gs(e){let t=hs;return hs=e,t}var _s=255,vs=5,ys=0,bs={};function xs(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,tr)&&(r=n[tr]),r??=n[tr]=ys++;let i=r&_s,a=1<>vs)]|=a}function Ss(e,t){let n=ws(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,Cs(r.data,e),Cs(t,null),Cs(r.blueprint,null));let i=Ts(e,t),a=e.injectorIndex;if(ds(i)){let e=fs(i),n=ms(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 Cs(e,t){e.push(0,0,0,0,0,0,0,0,t)}function ws(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Ts(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=Bs(i),r===null)return ns;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return ns}function Es(e,t,n){xs(e,t,n)}function Ds(e,t,n){if(n&8||e!==void 0)return e;fr(t,`NodeInjector`)}function Os(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=_r(void 0);try{return i?i.get(t,r,n&8):vr(t,r,n&8)}finally{_r(a)}}return Ds(r,t,n)}function ks(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=zs(e,t,n,r,bs);if(i!==bs)return i}let i=As(e,t,n,r,bs);if(i!==bs)return i}return Os(t,n,r,i)}function As(e,t,n,r,i){let a=Ps(n);if(typeof a==`function`){if(!Ca(t,e,r))return r&1?Ds(i,n,r):Os(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))fr(n);else return e}finally{Oa()}}else if(typeof a==`number`){let i=null,o=ws(e,t),s=ns,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?Ts(e,t):t[o+8],s===ns||!Is(r,!1)?o=-1:(i=t[1],o=fs(s),t=ms(s,t)));o!==-1;){let e=t[1];if(Fs(a,o,e.data)){let e=js(o,t,n,i,r,c);if(e!==bs)return e}s=t[o+8],s!==ns&&Is(r,t[1].data[o+8]===c)&&Fs(a,o,t)?(i=e,o=fs(s),t=ms(s,t)):o=-1}}return i}function js(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=Ms(s,o,n,r==null?xi(s)&&hs:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?bs:Ns(t,o,c,s,i)}function Ms(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&&Ci(e)&&e.type===n)return c}return null}function Ns(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof rs){let s=a;if(s.resolving)throw dr(``);let c=gs(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?_r(s.injectImpl):null;Ca(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&Jo(n,o[n],t)}finally{l!==null&&_r(l),gs(c),s.resolving=!1,Oa()}}return a}function Ps(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,tr)?e[tr]:void 0;return typeof t==`number`?t>=0?t&_s:Rs:t}function Fs(e,t,n){let r=1<>vs)]&r)}function Is(e,t){return!(e&2)&&!(e&1&&t)}var Ls=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return ks(this._tNode,this._lView,e,Cr(n),t)}};function Rs(){return new Ls(ia(),z())}function zs(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!wi(o);){let e=As(a,o,n,r|2,bs);if(e!==bs)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,bs,r);if(t!==bs)return t}t=Bs(o),o=o[14]}a=t}return i}function Bs(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}var Vs=()=>(typeof requestIdleCallback<`u`?requestIdleCallback:e=>setTimeout(e)).bind(globalThis),Hs=()=>(typeof requestIdleCallback<`u`?cancelIdleCallback:clearTimeout).bind(globalThis),Us=new F(``,{factory:()=>new Ws}),Ws=class{requestIdleCallback=Vs();cancelIdleCallback=Hs();requestOnIdle(e,t){return this.requestIdleCallback(e,t)}cancelOnIdle(e){return this.cancelIdleCallback(e)}};function Gs(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function Ks(){return qs(ia(),z())}function qs(e,t){return new Js(ki(e,t))}var Js=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Ks}return e})();function Ys(e){return(e.flags&128)==128}var Xs=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(Xs||{}),Zs=new Map,Qs=0;function $s(){return Qs++}function ec(e){Zs.set(e[19],e)}function tc(e){Zs.delete(e[19])}var nc=`__ngContext__`;function rc(e,t){vi(t)?(e[nc]=t[19],ec(t)):e[nc]=t}function ic(e){return oc(e[12])}function ac(e){return oc(e[4])}function oc(e){for(;e!==null&&!yi(e);)e=e[4];return e}var sc=void 0;function cc(e){sc=e}function lc(){if(sc!==void 0)return sc;if(typeof document<`u`)return document;throw new N(210,!1)}var uc=!1,dc=new F(``,{factory:()=>uc}),fc=new F(``),pc=new WeakMap;function mc(e,t){if(typeof e!=`object`||!e)return;let n=pc.get(e);n||(n=new WeakSet,pc.set(e,n)),n.add(t)}var hc=new F(``);function gc(e){return(e.flags&32)==32}var _c=()=>null;function vc(e,t,n=!1){return _c(e,t,n)}function yc(e){return e.get(fc,!1,{optional:!0})}function bc(e,t){let n=e.contentQueries;if(n!==null){let r=M(null);try{for(let r=0;r|^->||--!>|)/g,Oc=`​$1​`;function kc(e){return e.replace(Ec,e=>e.replace(Dc,Oc))}function Ac(e,t){return e.createText(t)}function jc(e,t,n){e.setValue(t,n)}function Mc(e,t){return e.createComment(kc(t))}function Nc(e,t,n){return e.createElement(t,n)}function Pc(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Fc(e,t,n){e.appendChild(t,n)}function Ic(e,t,n,r,i){r===null?Fc(e,t,n):Pc(e,t,n,r,i)}function Lc(e,t,n,r){e.removeChild(null,t,n,r)}function Rc(e,t,n){e.setAttribute(t,`style`,n)}function zc(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function Bc(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&os(e,t,r),i!==null&&zc(e,t,i),a!==null&&Rc(e,t,a)}function Vc(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 Hc=`ng-template`;function Uc(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(qc(r))return!1;o=!0}}}}}return qc(r)||o}function qc(e){return!(e&1)}function Jc(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!==``&&!qc(o)&&(t+=Qc(a,i),i=``),r=o,a||=!qc(r);n++}return i!==``&&(t+=Qc(a,i)),t}function el(e){return e.map($c).join(`,`)}function tl(e){let t=[],n=[],r=1,i=2;for(;r=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),ll.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 dl(e,t,n){let r=cl(n),i=sl.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):sl.set(e,[{el:t,declarationView:r}])}var fl=(function(e){return e[e.CHANGE_DETECTION=0]=`CHANGE_DETECTION`,e[e.AFTER_NEXT_RENDER=1]=`AFTER_NEXT_RENDER`,e})(fl||{}),pl=new F(``),ml=new Set;function hl(e){ml.has(e)||(ml.add(e),performance?.mark?.(`mark_feature_usage`,{detail:{feature:e}}))}var gl=(()=>{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=Un({token:e,providedIn:`root`,factory:()=>new e})}return e})(),_l=new F(``,{factory:()=>{let e=L(ri),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function vl(e,t,n){let r=e.get(_l);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 yl(e,t){let n=e.get(_l);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function bl(e,t){let n=e.get(_l);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function xl(e,t){for(let[n,r]of t)vl(e,r.animateFns)}function Sl(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&xl(r,i)}function Cl(e,t,n,r){try{n.get(zr)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&yl(n,i.enter.get(t.index).animateFns);let a=wl(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];El(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&ol.add(e[19]),vl(n,()=>Tl(e,t,i||void 0,a,r),i||void 0)}function wl(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 Tl(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&&El(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),Ol(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&ol.delete(e[19]),i(!0)})}else e&&ol.delete(e[19]),i(!1)}function El(e,t,n){if(t.type&12){let r=e[t.index];if(yi(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,ol.delete(e[19])),n(!0)})}function kl(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;yi(i)?c=i:vi(i)&&(l=!0,i=i[0]);let u=Di(i);e===0&&r!==null?(Sl(s,r,a,n),o==null?Fc(t,r,u):Pc(t,r,u,o||null,!0)):e===1&&r!==null?(Sl(s,r,a,n),Pc(t,r,u,o||null,!0),ul(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&dl(a,u,s),ll.delete(u),Cl(s,a,n,e=>{if(ll.has(u)){ll.delete(u);return}Lc(t,u,l,e)})):e===3&&(ll.delete(u),Cl(s,a,n,()=>{t.destroyNode(u)})),c!=null&&Ql(t,e,n,c,a,r,o)}}function Al(e,t){Ml(e,t),t[0]=null,t[5]=null}function jl(e,t,n,r,i,a){r[0]=i,r[5]=t,Yl(e,r,n,1,i,a)}function Ml(e,t){t[10].changeDetectionScheduler?.notify(9),Yl(e,t,t[11],2,null,null)}function Nl(e){let t=e[12];if(!t)return Il(e[1],e);for(;t;){let n=null;if(vi(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)vi(t)&&Il(t[1],t),t=t[3];t===null&&(t=e),vi(t)&&Il(t[1],t),n=t&&t[4]}t=n}}function Pl(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Fl(e,t){if(Ti(t))return;let n=t[11];n.destroyNode&&Yl(e,t,n,3,null,null),Nl(t)}function Il(e,t){if(Ti(t))return;let n=M(null);try{t[2]&=-129,t[2]|=256,t[24]&<(t[24]),Rl(e,t),Ll(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&yi(t[3])){n!==t[3]&&Pl(n,t);let r=t[18];r!==null&&r.detachView(e)}tc(t)}finally{M(n)}}function Ll(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&&cu(e,t,27,!1),H(o?V.TemplateUpdateStart:V.TemplateCreateStart,i,n),n(r,i)}finally{Ma(a),H(o?V.TemplateUpdateEnd:V.TemplateCreateEnd,i,n)}}function fu(e,t,n){yu(e,t,n),(n.flags&64)==64&&bu(e,t,n)}function pu(e,t,n=ki){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{Vi(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Hu(e){let t=e[24]??Object.create(Uu);return t.lView=e,t}var Uu={...Xe,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Wi(e.lView);for(;t&&!Wu(t[1]);)t=Wi(t);t&&Li(t)},consumerOnSignalRead(){this.lView[24]=this}};function Wu(e){return e.type!==2}function Gu(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 Ku=100;function qu(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{Ju(e,t)}finally{n.end?.()}}function Ju(e,t){let n=ua();try{da(!0),ed(e,t);let n=0;for(;zi(e);){if(n===Ku)throw new N(103,!1);n++,ed(e,1)}}finally{da(n)}}function Yu(e,t,n,r){if(Ti(t))return;let i=t[2];wa(t);let a=!0,o=null,s=null;Wu(e)?(s=Ru(t),o=it(s)):Ye()===null?(a=!1,s=Hu(t),o=it(s)):t[24]&&=(lt(t[24]),null);try{Ii(t),pa(e.bindingStartIndex),n!==null&&du(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&Xo(t,n,null)}else{let n=e.preOrderHooks;n!==null&&Zo(t,n,0,null),Qo(t,0)}if(Zu(t),Gu(t),Xu(t,0),e.contentQueries!==null&&bc(e,t),a){let n=e.contentCheckHooks;n!==null&&Xo(t,n)}else{let n=e.contentHooks;n!==null&&Zo(t,n,1),Qo(t,1)}nd(e,t);let o=e.components;o!==null&&td(t,o,0);let s=e.viewQuery;if(s!==null&&xc(2,s,r),a){let n=e.viewCheckHooks;n!==null&&Xo(t,n)}else{let n=e.viewHooks;n!==null&&Zo(t,n,2),Qo(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Iu(t),t[2]&=-73}catch(e){throw Vi(t),e}finally{s!==null&&(ot(s,o),a&&Bu(s)),ka()}}function Xu(e,t){for(let n=ic(e);n!==null;n=ac(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=Ar(e,10+t);Al(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 ld(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(cd(e,n),Ar(t,n))}this._attachedToViewContainer=!1}Fl(this._lView[1],this._lView)}onDestroy(e){Hi(this._lView,e)}markForCheck(){rd(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){Bi(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,qu(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new N(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=wi(this._lView),t=this._lView[16];t!==null&&!e&&Pl(t,this._lView),Ml(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new N(902,!1);this._appRef=e;let t=wi(this._lView),n=this._lView[16];n!==null&&!t&&ud(n,this._lView),Bi(this._lView)}};function fd(e,t,n,r,i){let a=e.data[t];if(a===null)a=pd(e,t,n,r,i),ga()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=oa();a.injectorIndex=e===null?-1:e.injectorIndex}return sa(a,!0),a}function pd(e,t,n,r,i){let a=aa(),o=ca(),s=o?a:a&&a.parent,c=e.data[t]=hd(e,s,n,t,r,i);return md(e,c,a,o),c}function md(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 hd(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return Qi()&&(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:La(),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 gd(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?_d(e,n):r.push(e);e[6]=r}function _d(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,yd=()=>null;function bd(e,t){return vd(e,t)}function xd(e,t,n){return yd(e,t,n)}var Sd=class{},Cd=class{},wd=(()=>{class e{static ɵprov=Un({token:e,providedIn:`root`,factory:()=>null})}return e})();function Td(e){return e.debugInfo?.className||e.type.name||null}var Ed={},Dd=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Ed,n);return r!==Ed||t===Ed?r:this.parentInjector.get(e,t,n)}};function Od(e,t,n){return e[t]=n}function kd(e,t,n){if(n===nl)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Ad(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&mc(i,a),rd(xi(e)?Ni(e.index,t):t,5);let o=t[8],s=jd(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=jd(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function jd(e,t,n,r){let i=M(null);try{return H(V.OutputStart,t,n),n(r)!==!1}catch(t){return Eu(e,t),!1}finally{H(V.OutputEnd,t,n),M(i)}}function Md(e,t,n,r,i,a,o,s){let c=Si(e),l=!1,u=null;if(!r&&c&&(u=Pd(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=ki(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);Nd(a)||Fd(r?t=>r(Di(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function Nd(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Pd(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 Fd(e,t,n,r,i,a,o){let s=t.firstCreatePass?Ki(t):null,c=Gi(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Id(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Fd(e.index,s,t,i,a,c,!0)}var Ld=Symbol(`BINDING`),Rd=new F(``);function zd(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 $d(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&lu.SignalBased)!==0};return i&&(a.transform=i),a})}function cf(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function lf(e,t,n){let r=t instanceof ri?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Dd(n,r):n}function uf(e){let t=e.get(Cd,null);if(t===null)throw new N(407,!1);return{rendererFactory:t,sanitizer:e.get(wd,null),changeDetectionScheduler:e.get(Do,null),ngReflect:!1,tracingService:e.get(pl,null,{optional:!0})}}function df(e,t,n){let r=pf(e);return Nc(t,r,r===`svg`?`svg`:r===`math`?Ei:n)}function ff(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new N(905,!1)}function pf(e){return(e.selectors[0][0]||`div`).toLowerCase()}var mf=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=sf(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=cf(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=el(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){H(V.DynamicComponentStart);let s=M(null);try{let s=this.componentDef,c=lf(s,r||this.ngModule,e),l=uf(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Td(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{M(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=hf(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?mu(l,r,s.encapsulation,t):df(s,l,o??null);ff(u);let d=t.get(Rd,null),f=gf(u,()=>t.get(Wa,null)??lc());d&&d.addHost(f);let p=a?.some(vf)||i?.some(e=>typeof e!=`function`&&e.bindings.some(vf)),m=ru(null,c,null,512|au(s),null,null,e,l,t,null,vc(u,t,!0));d&&af&&f instanceof ShadowRoot&&Hi(m,()=>{d.removeHost(f)}),m[27]=u,wa(m);let h=null;try{let e=tf(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);Bc(l,u,e),rc(u,m),fu(c,m,e),Sc(c,e,m),nf(c,e),n!==void 0&&bf(e,this.ngContentSelectors,n),h=Ni(e.index,m),m[8]=h[8],Au(c,m,null)}catch(e){throw h!==null&&tc(h),tc(m),e}finally{H(V.DynamicComponentEnd),ka()}return new yf(this.componentType,m,!!p)}};function hf(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:tl(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[Ld].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 vf(e){let t=e[Ld].kind;return t===`input`||t===`twoWay`}var yf=class extends Sd{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=Ai(t[1],27),this.location=qs(this._tNode,t),this.instance=Ni(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new dd(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;Du(n,r[1],r,e,t),this.previousInputValues.set(e,t),rd(Ni(n.index,r),1)}get injector(){return new Ls(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function bf(e,t,n){let r=e.projection=[];for(let e=0;e!1;function Sf(e,t,n){return xf(e,t,n)}function Cf(e){return!!e&&typeof e.then==`function`}function wf(e){return!!e&&typeof e.subscribe==`function`}var Tf=class{},Ef=class extends Tf{injector;instance=null;constructor(e){super();let t=new ii([...e.providers,{provide:Tf,useValue:this}],e.parent||ni(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Df(e,t,n=null){return new Ef({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Of=(()=>{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=Ur(!1,e.type),n=t.length>0?Df([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=Un({token:e,providedIn:`environment`,factory:()=>new e(I(ri))})}return e})();function kf(e){return Uo(()=>{let t=Pf(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==Xs.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Of).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Cc.Emulated,styles:e.styles||Lr,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&hl(`NgStandalone`),Ff(n);let r=e.dependencies;return n.directiveDefs=If(r,Af),n.pipeDefs=If(r,ar),n.id=Lf(n),n})}function Af(e){return rr(e)||ir(e)}function jf(e,t){if(e==null)return Ir;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=lu.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Mf(e){if(e==null)return Ir;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Nf(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 Pf(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||Ir,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Lr,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:jf(e.inputs,t),outputs:Mf(e.outputs),debugInfo:null}}function Ff(e){e.features?.forEach(t=>t(e))}function If(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 Lf(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 Rf=new F(``),zf=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=L(Rf,{optional:!0})??[];injector=L(Ua);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=hi(this.injector,t);if(Cf(n))e.push(n);else if(wf(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=Gs({token:e,factory:e.ɵfac})}return e})();function Bf(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=ls(e.mergedAttrs,e.attrs);let t=e.tView=eu(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),sa(e,!1);let c=Uf(n,t,e,r);za()&&Wl(n,t,c,e),rc(c,t);let l=id(c,t,c,e);t[r+27]=l,su(t,l),Sf(l,e,t)}function Vf(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=fd(t,d,4,o||null,s||null),l!=null){let e=Fi(t.consts,l);f.localNames=[];for(let t=0;t{class e{cachedInjectors=new Map;getOrCreateInjector(e,t,n,r){if(!this.cachedInjectors.has(e)){let i=n.length>0?Df(n,t,r):null;this.cachedInjectors.set(e,i)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=Un({token:e,providedIn:`environment`,factory:()=>new e})}return e})(),vp=new F(``);function yp(e,t,n){return e.get(_p).getOrCreateInjector(t,e,n,``)}function bp(e,t,n){if(e instanceof Dd){let r=e.injector,i=e.parentInjector;return new Dd(r,yp(i,t,n))}let r=e.get(ri);return r===e?yp(e,t,n):new Dd(e,yp(r,t,n))}function xp(e,t,n,r=!1){let i=n[3],a=i[1];if(Ti(i))return;let o=cp(i,t),s=o[1],c=o[$f];if(!(c!==null&&ee.data.s===t[1])??-1;return{dehydratedView:n>-1?e[6][n]:null,dehydratedViewIx:n}}function Cp(e,t,n,r,i){H(V.DeferBlockStateStart);let a=fp(e,i,r);if(a!==null){t[1]=e;let o=i[1],s=Ai(o,a+27);sd(n,0);let c;if(e===W.Complete){let e=up(o,r),t=e.providers;t&&t.length>0&&(c=bp(i[9],e,t))}let{dehydratedView:l,dehydratedViewIx:u}=Sp(n,t),d=Mu(i,s,null,{injector:c,dehydratedView:l});if(od(n,d,0,Nu(s,l)),Li(d),u>-1&&n[6]?.splice(u,1),(e===W.Complete||e===W.Error)&&Array.isArray(t[ep])){for(let e of t[ep])e();t[ep]=null}}H(V.DeferBlockStateEnd)}function wp(e,t){return e{e.loadingState===Gf.COMPLETE?xp(W.Complete,t,n):e.loadingState===Gf.FAILED&&xp(W.Error,t,n)})}var Dp=null;function Op(e,t){return t[9].get(vp,null,{optional:!0})?.behavior!==np.Manual}var kp=new F(``),Ap=new F(``);function jp(){Ct(()=>{throw new N(600,``)})}var Mp=10,Np=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=L(_o);afterRenderManager=L(gl);zonelessEnabled=L(Oo);rootEffectScheduler=L(Ao);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new An;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=L(Ya);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Nn(e=>!e))}constructor(){L(pl,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=L(ri);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Ua.NULL){return this._injector.get(ro).run(()=>{if(H(V.BootstrapComponentStart),!this._injector.get(zf).done)throw new N(405,``);let r=rr(e),i=this._injector.get(Tf),a=new mf(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Pp(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(kp,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Fp(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),H(V.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){H(V.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(fl.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw H(V.ChangeDetectionEnd),new N(101,!1);let e=M(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,M(e),this.afterTick.next(),H(V.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Cd,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++zi(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;Fp(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(Ap,[]).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),()=>Fp(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new N(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=Gs({token:e,factory:e.ɵfac})}return e})();function Pp(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Fp(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Ip(e,t,n){let r=t.get(Rp);return r.add(e,n),()=>r.remove(e)}function Lp(e){return(t,n)=>Ip(t,n,e)}var Rp=(()=>{class e{buckets=new Map;callbackBucket=new Map;applicationRef=L(Np);ngZone=L(ro);idleService=L(Us);add(e,t){let n=zp(t);this.callbackBucket.set(e,n);let r=this.buckets.get(n);r??(r={idleId:null,queue:new Set},this.buckets.set(n,r)),r.queue.add(e),this.scheduleBucket(r,t)}remove(e){let t=this.callbackBucket.get(e);if(t===void 0)return;this.callbackBucket.delete(e);let n=this.buckets.get(t);n&&(n.queue.delete(e),n.queue.size===0&&(this.cancelBucket(n),this.buckets.delete(t)))}scheduleBucket(e,t){if(e.idleId!==null)return;let n=zp(t),r=r=>{for(let t of e.queue)if(t(),this.applicationRef._tick(),e.queue.delete(t),this.callbackBucket.delete(t),r&&r.timeRemaining()===0&&!r.didTimeout)break;e.idleId=null,e.queue.size>0?this.scheduleBucket(e,t):this.buckets.delete(n)};e.idleId=this.idleService.requestOnIdle(e=>this.ngZone.run(()=>r(e)),t)}cancelBucket(e){e.idleId!==null&&(this.idleService.cancelOnIdle(e.idleId),e.idleId=null)}ngOnDestroy(){for(let e of this.buckets.values())this.cancelBucket(e);this.buckets.clear(),this.callbackBucket.clear()}static ɵprov=Un({token:e,providedIn:`root`,factory:()=>new e})}return e})();function zp(e){return!e||e.timeout==null?``:`${e.timeout}`}function Bp(e){let t=z(),n=ia();if(Tp(t,n),!Op(0,t))return;let r=t[9];rp(0,cp(t,n),e(()=>Hp(0,t,n),r))}function Vp(e,t,n){let r=t[9],i=t[1];if(e.loadingState!==Gf.NOT_STARTED)return e.loadingPromise??Promise.resolve();let a=cp(t,n),o=gp(i,e);e.loadingState=Gf.IN_PROGRESS,ip(1,a);let s=e.dependencyResolverFn,c=r.get(Bo).add();return s?(e.loadingPromise=Promise.allSettled(s()).then(n=>{let r=!1,i=[],a=[];for(let e=0;e0&&(t.directiveRegistry=hp(t.directiveRegistry,i),e.providers=Ur(!1,...i.map(e=>e.type))),a.length>0&&(t.pipeRegistry=hp(t.pipeRegistry,a))}}),e.loadingPromise.finally(()=>{e.loadingPromise=null,c()})):(e.loadingPromise=Promise.resolve().then(()=>{e.loadingPromise=null,e.loadingState=Gf.COMPLETE,c()}),e.loadingPromise)}function Hp(e,t,n){let r=t[1],i=t[n.index];if(!Op(e,t))return;let a=cp(t,n),o=up(r,n);switch(ap(a),o.loadingState){case Gf.NOT_STARTED:xp(W.Loading,n,i),Vp(o,t,n),o.loadingState===Gf.IN_PROGRESS&&Ep(o,n,i);break;case Gf.IN_PROGRESS:xp(W.Loading,n,i),Ep(o,n,i);break;case Gf.COMPLETE:xp(W.Complete,n,i);break;case Gf.FAILED:xp(W.Error,n,i)}}function Up(e,t,n){return e===0?Gp(t,n):e!==2||!Gp(t,n)}function Wp(e){return e!=null&&(e&1)==1}function Gp(e,t){let n=e[9],r=up(e[1],t),i=yc(n),a=Wp(r.flags),o=cp(e,t)[Qf]!==null;return!(a&&o&&i)}function Kp(e,t,n,r,i,a,o,s,c,l){let u=z(),d=ta(),f=e+27,p=Vf(u,d,e,null,0,0),m=u[9],h=yc(m);if(d.firstCreatePass){hl(`NgDefer`);let e={primaryTmplIndex:t,loadingTmplIndex:r??null,placeholderTmplIndex:i??null,errorTmplIndex:a??null,placeholderBlockConfig:null,loadingBlockConfig:null,dependencyResolverFn:n??null,loadingState:Gf.NOT_STARTED,loadingPromise:null,providers:null,hydrateTriggers:null,debug:null,flags:l??0};c?.(d,e,s,o),dp(d,f,e)}let g=u[f];Sf(g,p,u);let _=null,v=null;if(g[6]?.length>0){let e=g[6][0].data;v=e.di??null,_=e.s}let y=[null,Jf.Initial,null,null,null,null,v,_,null,null];lp(u,f,y);let b=null;v!==null&&h&&(b=m.get(hc),b.add(v,{lView:u,tNode:p,lContainer:g}));let x=()=>{ap(y),v!==null&&b?.cleanup([v])};rp(0,y,()=>Ui(u,x)),Hi(u,x)}function qp(e){Up(0,z(),ia())&&Bp(Lp({timeout:e}))}var Jp=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 Yp(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function Xp(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){M(r);let c=t.length-1;for(M(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=Yp(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=Yp(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 em,a??=$p(e,o,s,n),Zp(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;)Qp(e,i,n,o,t[o]),o++}else if(t!=null){M(r);let c=t[Symbol.iterator]();M(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=Yp(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new em,a??=$p(e,o,s,n);let u=n(o,r);if(Zp(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;)Qp(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 Zp(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Qp(e,t,n,r,i){if(Zp(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function $p(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 em=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 G(e,t,n,r,i,a,o,s){hl(`NgControlFlow`);let c=z(),l=ta();return Vf(c,l,e,t,n,r,i,Fi(l.consts,a),256,o,s),tm}function tm(e,t,n,r,i,a,o,s){hl(`NgControlFlow`);let c=z(),l=ta();return Vf(c,l,e,t,n,r,i,Fi(l.consts,a),512,o,s),tm}function K(e,t){hl(`NgControlFlow`);let n=z(),r=ma(),i=n[r]===nl?-1:n[r],a=i===-1?void 0:sm(n,27+i);if(kd(n,r,e)){let r=M(null);try{if(a!==void 0&&sd(a,0),e!==-1){let r=27+e,i=sm(n,r),a=fm(n[1],r),o=xd(i,a,n);od(i,Mu(n,a,t,{dehydratedView:o}),0,Nu(a,o))}}finally{M(r)}}else if(a!==void 0){let e=ad(a,0);e!==void 0&&(e[8]=t)}}var nm=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-10}},rm=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function im(e,t,n,r,i,a,o,s,c,l,u,d,f){hl(`NgControlFlow`);let p=z(),m=ta(),h=c!==void 0,g=z(),_=new rm(h,s?o.bind(g[15][8]):o);g[27+e]=_,Vf(p,m,e+1,t,n,r,i,Fi(m.consts,a),256),h&&Vf(p,m,e+2,c,l,u,d,Fi(m.consts,f),512)}var am=class extends Jp{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,od(this.lContainer,t,e,Nu(this.templateTNode,n)),cm(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,lm(this.lContainer,e),um(this.lContainer,e)}create(e,t){let n=bd(this.lContainer,this.templateTNode.tView.ssrId);return Mu(this.hostLView,this.templateTNode,new nm(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Fl(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];bl(e,r),ol.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function lm(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 um(e,t){return cd(e,t)}function dm(e,t){return ad(e,t)}function fm(e,t){return Ai(e,t)}function pm(e,t,n){let r=z();return kd(r,ma(),t)&&(ta(),gu(Na(),r,e,t,r[11],n)),pm}function mm(e,t,n,r,i){Du(t,e,n,i?`class`:`style`,r)}function hm(e,t,n,r){let i=z(),a=i[1],o=e+27,s=a.firstCreatePass?tf(o,i,2,t,Su,Zi(),n,r):a.data[o];if(xi(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Td(o),()=>(gm(e,t,i,s,r),hm))}}return gm(e,t,i,s,r),hm}function gm(e,t,n,r,i){if(wu(r,n,e,t,bm),Si(r)){let e=n[1];fu(e,n,r),Sc(e,r,n)}i!=null&&pu(n,r)}function _m(){let e=ta(),t=Tu(ia());return e.firstCreatePass&&nf(e,t),$i(t)&&ea(),Xi(),t.classesWithoutHost!=null&&is(t)&&mm(e,t,z(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&as(t)&&mm(e,t,z(),t.stylesWithoutHost,!1),_m}function vm(e,t,n,r){return hm(e,t,n,r),_m(),vm}function q(e,t,n,r){let i=z(),a=i[1],o=e+27,s=a.firstCreatePass?rf(o,a,2,t,n,r):a.data[o];return wu(s,i,e,t,bm),r!=null&&pu(i,s),q}function J(){return $i(Tu(ia()))&&ea(),Xi(),J}function ym(e,t,n,r){return q(e,t,n,r),J(),ym}var bm=(e,t,n,r,i)=>(Ba(!0),Nc(t[11],r,La()));function xm(){let e=ta(),t=Tu(ia());return e.firstCreatePass&&nf(e,t),xm}function Sm(e,t,n){let r=z(),i=r[1],a=e+27,o=i.firstCreatePass?rf(a,i,8,`ng-container`,t,n):i.data[a];return wu(o,r,e,`ng-container`,Tm),n!=null&&pu(r,o),Sm}function Cm(){return Tu(ia()),xm}function wm(e,t,n){return Sm(e,t,n),Cm(),wm}var Tm=(e,t,n,r,i)=>(Ba(!0),Mc(t[11],``));function Em(){return z()}function Dm(e,t,n){let r=z();return kd(r,ma(),t)&&(ta(),_u(Na(),r,e,t,r[11],n)),Dm}var Om=`en-US`;function km(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function Am(e,t,n){let r=z(),i=ta(),a=ia();return Mm(i,r,r[11],a,e,t,n),Am}function jm(e,t,n){let r=z(),i=ta(),a=ia();return(a.type&3||n)&&Md(a,i,r,n,r[11],e,t,Ad(a,r,t)),jm}function Mm(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Ad(r,t,a),Md(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 Fm(e){return(e&2)==2}function Im(e,t){return e&131071|t<<17}function Lm(e){return e|2}function Rm(e){return(e&131068)>>2}function zm(e,t){return e&-131069|t<<2}function Bm(e){return(e&1)==1}function Vm(e){return e|1}function Hm(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Pm(o),c=Rm(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||Pr(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Pm(e[s+1]);e[r+1]=Nm(t,s),t!==0&&(e[t+1]=zm(e[t+1],r)),e[s+1]=Im(e[s+1],r)}else e[r+1]=Nm(s,0),s!==0&&(e[s+1]=zm(e[s+1],r)),s=r}else e[r+1]=Nm(c,0),s===0?s=r:e[c+1]=zm(e[c+1],r),c=r;l&&(e[r+1]=Lm(e[r+1])),Wm(e,u,r,!0),Wm(e,u,r,!1),Um(t,u,e,r,a),o=Nm(s,c),a?t.classBindings=o:t.styleBindings=o}function Um(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&Pr(a,t)>=0&&(n[r+1]=Vm(n[r+1]))}function Wm(e,t,n,r){let i=e[n+1],a=t===null,o=r?Pm(i):Rm(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];Gm(n,t)&&(s=!0,e[o+1]=r?Vm(i):Lm(i)),o=r?Pm(i):Rm(i)}s&&(e[n+1]=r?Lm(i):Vm(i))}function Gm(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?Pr(e,t)>=0:!1}function Km(e,t,n){return Jm(e,t,n,!1),Km}function qm(e,t){return Jm(e,t,null,!0),qm}function Jm(e,t,n,r){let i=z(),a=ta(),o=ha(2);if(a.firstUpdatePass&&Xm(a,e,o,r),t!==nl&&kd(i,o,t)){let s=a.data[ja()];rh(a,s,i,i[11],e,i[o+1]=oh(t,n),r,o)}}function Ym(e,t){return t>=e.expandoStartIndex}function Xm(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[ja()],o=Ym(e,n);sh(a,r)&&t===null&&!o&&(t=!1),t=Zm(i,a,t,r),Hm(i,a,t,n,o,r)}}function Zm(e,t,n,r){let i=ba(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=th(null,e,t,n,r),n=nh(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=th(i,e,t,n,r),a===null){let n=Qm(e,t,r);n!==void 0&&Array.isArray(n)&&(n=th(null,e,t,n[1],r),n=nh(n,t.attrs,r),$m(e,t,r,n))}else a=eh(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function Qm(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Rm(r)!==0)return e[Pm(r)]}function $m(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Pm(i)]=r}function eh(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===nl&&(u=l?Lr:void 0);let d=l?Nr(u,r):c===r?u:void 0;if(a&&!ah(d)&&(d=Nr(t,r)),ah(d)&&(s=d,o))return s;let f=e[i+1];i=o?Pm(f):Rm(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=Nr(e,r))}return s}function ah(e){return e!==void 0}function oh(e,t){return e==null||e===``||(typeof t==`string`?e=Tc(e)+t:typeof e==`object`&&(e=Ln(Tc(e)))),e}function sh(e,t){return!!(e.flags&(t?8:16))}function X(e,t=``){let n=z(),r=ta(),i=e+27,a=r.firstCreatePass?fd(r,i,1,t,null):r.data[i],o=ch(r,n,a,t);n[i]=o,za()&&Wl(r,n,o,a),sa(a,!1)}var ch=(e,t,n,r)=>(Ba(!0),Ac(t[11],r));function lh(e,t,n,r=``){return kd(e,ma(),n)?t+sr(n)+r:nl}function Z(e){return Q(``,e),Z}function Q(e,t,n){let r=z(),i=lh(r,e,t,n);return i!==nl&&uh(r,ja(),i),Q}function uh(e,t,n){let r=Oi(t,e);jc(e[11],r,n)}function dh(e,t){let n=e[t];return n===nl?void 0:n}function fh(e,t,n,r,i,a){let o=t+n;return kd(e,o,i)?Od(e,o+1,a?r.call(a,i):r(i)):dh(e,o+1)}function ph(e,t){let n=ta(),r,i=e+27;n.firstCreatePass?(r=mh(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=Dr(r.type,!0)),o=_r(Bd);try{let e=gs(!1),t=a();return gs(e),Mi(n,z(),i,t),t}finally{_r(o)}}function mh(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function hh(e,t,n){let r=e+27,i=z(),a=ji(i,r);return gh(i,r)?fh(i,fa(),t,a.transform,n,a):a.transform(n)}function gh(e,t){return e[1].data[t].pure}var _h=(()=>{class e{applicationErrorHandler=L(_o);appRef=L(Np);taskService=L(Ya);ngZone=L(ro);zonelessEnabled=L(Oo);tracing=L(pl,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new qt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(to):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(L(ko,{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?$a:Qa;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=Gs({token:e,factory:e.ɵfac})}return e})();function vh(){return[{provide:Do,useExisting:_h},{provide:ro,useClass:fo},{provide:Oo,useValue:!0}]}function yh(){return typeof $localize<`u`&&$localize.locale||`en-US`}var bh=new F(``,{factory:()=>L(bh,{optional:!0,skipSelf:!0})||yh()});function xh(e,t){return ht(e,t?.equal)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});function Sh(e,t){let n=Object.create(Ho);n.value=e,n.transformFn=t?.transform;function r(){if(Ze(n),n.value===Vo)throw new N(-950,null);return n.value}return r[Je]=n,r}function Ch(e,t){return Sh(e,t)}function wh(e){return Sh(Vo,e)}var Th=(Ch.required=wh,Ch),Eh=new F(``),Dh=new F(``);function Oh(e){return!e.moduleRef}function kh(e){let t=Oh(e)?e.r3Injector:e.moduleRef.injector,n=t.get(ro);return n.run(()=>{Oh(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(_o),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Oh(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Eh);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Eh);n.add(t),e.moduleRef.onDestroy(()=>{Fp(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return jh(r,n,()=>{let n=t.get(Ya),r=n.add(),i=t.get(zf);return i.runInitializers(),i.donePromise.then(()=>{if(km(t.get(bh,Om)||`en-US`),!t.get(Dh,!0))return Oh(e)?t.get(Np):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Oh(e)){let n=t.get(Np);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return Ah?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var Ah;function jh(e,t,n){try{let r=n();return Cf(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var Mh=null;function Nh(e=[],t){return Ua.create({name:t,providers:[{provide:Qr,useValue:`platform`},{provide:Eh,useValue:new Set([()=>Mh=null])},...e]})}function Ph(e=[]){if(Mh)return Mh;let t=Nh(e);return Mh=t,jp(),Fh(t),t}function Fh(e){let t=e.get(So,null);hi(e,()=>{t?.forEach(e=>e())})}function Ih(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;H(V.BootstrapApplicationStart);try{let e=i?.injector??Ph(r);return kh({r3Injector:new Ef({providers:[vh(),vo,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{H(V.BootstrapApplicationEnd)}}var Lh=null;function Rh(){return Lh}function zh(e){Lh??=e}var Bh=class{},Vh=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Nf({name:`json`,type:e,pure:!1})}return e})();function Hh(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 Uh=`browser`,Wh=class{_doc;constructor(e){this._doc=e}manager},Gh=(()=>{class e extends Wh{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)(I(Wa))};static ɵprov=Un({token:e,factory:e.ɵfac})}return e})(),Kh=new F(``),qh=(()=>{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 Gh));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof Gh);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 N(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(I(Kh),I(ro))};static ɵprov=Un({token:e,factory:e.ɵfac})}return e})(),Jh=`ng-app-id`;function Yh(e){for(let t of e)t.remove()}function Xh(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function Zh(e,t,n,r){let i=e.head?.querySelectorAll(`style[${Jh}="${t}"],link[${Jh}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(Jh),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 Qh(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var $h=(()=>{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,Zh(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,Xh);t?.forEach(e=>this.addUsage(e,this.external,Qh))}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&&(Yh(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Yh(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,Xh(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,Qh(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)(I(Wa),I(bo),I(wo,8),I(Co))};static ɵprov=Un({token:e,factory:e.ɵfac})}return e})(),eg={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`},tg=/%COMP%/g,ng=`%COMP%`,rg=`_nghost-${ng}`,ig=`_ngcontent-${ng}`,ag=!0,og=new F(``,{factory:()=>ag}),sg=new F(``);function cg(e){return ig.replace(tg,e)}function lg(e){return rg.replace(tg,e)}function ug(e,t){return t.map(t=>t.replace(tg,e))}var dg=(()=>{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 fg(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 gg?n.applyToHost(e):n instanceof hg&&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 Cc.Emulated:r=new gg(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case Cc.ShadowDom:return new mg(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case Cc.ExperimentalIsolatedShadowDom:return new mg(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new hg(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)(I(qh),I(Rd),I(bo),I(og),I(Wa),I(ro),I(wo),I(pl,8),I(sg,8))};static ɵprov=Un({token:e,factory:e.ɵfac})}return e})(),fg=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(eg[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(pg(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=pg(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new N(-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 N(-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=eg[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=eg[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&(rl.DashCase|rl.Important)?e.style.setProperty(t,n,r&rl.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&rl.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=Rh().getGlobalEventTarget(this.doc,e),!e))throw new N(-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 pg(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var mg=class extends fg{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=ug(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=Qh(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)}},hg=class extends fg{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?ug(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&&ol.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},gg=class extends hg{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=cg(l),this.hostAttr=lg(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}},_g=class e extends Bh{supportsDOMEvents=!0;static makeCurrent(){zh(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=yg();return t==null?null:bg(t)}resetBaseElement(){vg=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Hh(document.cookie,e)}},vg=null;function yg(){return vg||=document.head.querySelector(`base`),vg?vg.getAttribute(`href`):null}function bg(e){return new URL(e,document.baseURI).pathname}var xg=[`alt`,`control`,`meta`,`shift`],Sg={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},Cg={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},wg=(()=>{class e extends Wh{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(()=>Rh().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.`),xg.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=Sg[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`),xg.forEach(t=>{if(t!==n){let n=Cg[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)(I(Wa))};static ɵprov=Un({token:e,factory:e.ɵfac})}return e})();async function Tg(e,t,n){return Ih({rootComponent:e,...Eg(t,n)})}function Eg(e,t){return{platformRef:t?.platformRef,appProviders:[...jg,...e?.providers??[]],platformProviders:Ag}}function Dg(){_g.makeCurrent()}function Og(){return new go}function kg(){return cc(document),document}var Ag=[{provide:Co,useValue:Uh},{provide:So,useValue:Dg,multi:!0},{provide:Wa,useFactory:kg}],jg=[{provide:Qr,useValue:`root`},{provide:go,useFactory:Og},{provide:Kh,useClass:Gh,multi:!0},{provide:Kh,useClass:wg,multi:!0},dg,{provide:Rd,useClass:$h},{provide:$h,useExisting:Rd},qh,{provide:Cd,useExisting:dg},[]];function Mg(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 Ig({code:i,why:Pg(a.why,e),fix:Pg(a.fix,e),docs:o,cause:e.cause,sources:e.sources},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function zg(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 Wg=Math.random.bind(Math),Gg=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Kg(e=21){let t=``,n=e;for(;n--;)t+=Gg[Wg()*64|0];return t}var qg=6e4,Jg=e=>e,Yg=Jg,{clearTimeout:Xg,setTimeout:Zg}=globalThis;function Qg(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=Jg,deserialize:s=Yg,resolver:c,bind:l=`rpc`,timeout:u=qg,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}=Ug(),_=Kg();s.i=_;let v;async function y(n=s){return u>=0&&(v=Zg(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Xg(v),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:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$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 v(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(b)}function y(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 b(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&&(Xg(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function $g(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var e_=Object.freeze({type:`object`,additionalProperties:!0});function t_(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return e_}return e_}function n_(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 i_(e,t){return r_(e,t)??[e]}function a_(e){return typeof e==`string`?`'${e}'`:new l_().serialize(e)}var o_=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,s_=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[o_.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function c_(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})(),u_=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],d_=[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],f_=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,p_=[],m_=class{_data=new h_;_hash=new h_([...u_]);_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)p_[n]=e[t+n]|0;else{let e=p_[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=p_[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;p_[n]=t+p_[n-7]+i+p_[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+d_[n]+p_[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=h_.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 g_(e){return new m_().finalize(e).toBase64()}function __(e){return g_(a_(e))}function v_(e){return __(e)}function y_(){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 x_(e){return e.endsWith(`/`)?e:`${e}/`}function S_(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function C_(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?x_(n)+e.replace(/^\.?\//,``):e);return n}function w_(e,t){if(!t||t===`/`||b_.test(e))return e;let n=S_(t);return e.startsWith(n)?e:C_(n,e)}function T_(e,t){let n=e.match(b_);return t+(n?e.slice(n[0].length):e)}var E_=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function D_(e=21){let t=``,n=e;for(;n--;)t+=E_[Math.random()*64|0];return t}var O_=Symbol.for(`immer-nothing`),k_=Symbol.for(`immer-draftable`),A_=Symbol.for(`immer-state`),j_=[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 M_(e,...t){{let n=j_[e],r=nv(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var N_=Object,P_=N_.getPrototypeOf,F_=`constructor`,I_=`prototype`,L_=`configurable`,R_=`enumerable`,z_=`writable`,B_=`value`,V_=e=>!!e&&!!e[A_];function H_(e){return e?G_(e)||Q_(e)||!!e[k_]||!!e[F_]?.[k_]||$_(e)||ev(e):!1}var U_=N_[I_][F_].toString(),W_=new WeakMap;function G_(e){if(!e||!tv(e))return!1;let t=P_(e);if(t===null||t===N_[I_])return!0;let n=N_.hasOwnProperty.call(t,F_)&&t[F_];if(n===Object)return!0;if(!nv(n))return!1;let r=W_.get(n);return r===void 0&&(r=Function.toString.call(n),W_.set(n,r)),r===U_}function K_(e,t,n=!0){q_(e)===0?(n?Reflect.ownKeys(e):N_.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function q_(e){let t=e[A_];return t?t.type_:Q_(e)?1:$_(e)?2:ev(e)?3:0}var J_=(e,t,n=q_(e))=>n===2?e.has(t):N_[I_].hasOwnProperty.call(e,t),Y_=(e,t,n=q_(e))=>n===2?e.get(t):e[t],X_=(e,t,n,r=q_(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Z_(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Q_=Array.isArray,$_=e=>e instanceof Map,ev=e=>e instanceof Set,tv=e=>typeof e==`object`,nv=e=>typeof e==`function`,rv=e=>typeof e==`boolean`;function iv(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var av=e=>tv(e)?e?.[A_]:null,ov=e=>e.copy_||e.base_,sv=e=>e.modified_?e.copy_:e.base_;function cv(e,t){if($_(e))return new Map(e);if(ev(e))return new Set(e);if(Q_(e))return Array[I_].slice.call(e);let n=G_(e);if(t===!0||t===`class_only`&&!n){let t=N_.getOwnPropertyDescriptors(e);delete t[A_];let n=Reflect.ownKeys(t);for(let r=0;r1&&N_.defineProperties(e,{set:dv,add:dv,clear:dv,delete:dv}),N_.freeze(e),t&&K_(e,(e,t)=>{lv(t,!0)},!1),e)}function uv(){M_(2)}var dv={[B_]:uv};function fv(e){return e===null||!tv(e)||N_.isFrozen(e)}var pv=`MapSet`,mv=`Patches`,hv=`ArrayMethods`,gv={};function _v(e){let t=gv[e];return t||M_(0,e),t}var vv=e=>!!gv[e];function yv(e,t){gv[e]||(gv[e]=t)}var bv,xv=()=>bv,Sv=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:vv(pv)?_v(pv):void 0,arrayMethodsPlugin_:vv(hv)?_v(hv):void 0});function Cv(e,t){t&&(e.patchPlugin_=_v(mv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wv(e){Tv(e),e.drafts_.forEach(Dv),e.drafts_=null}function Tv(e){e===bv&&(bv=e.parent_)}var Ev=e=>bv=Sv(bv,e);function Dv(e){let t=e[A_];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ov(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[A_].modified_&&(wv(t),M_(4)),H_(e)&&(e=kv(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[A_].base_,e,t)}else e=kv(t,n);return Av(t,e,!0),wv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===O_?void 0:e}function kv(e,t){if(fv(t))return t;let n=t[A_];if(!n)return Rv(t,e.handledSet_,e);if(!Mv(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);Iv(n,e)}return n.copy_}function Av(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lv(t,n)}function jv(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Mv=(e,t)=>e.scope_===t,Nv=[];function Pv(e,t,n,r){let i=ov(e),a=e.type_;if(r!==void 0&&Y_(i,r,a)===t){X_(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;K_(i,(e,n)=>{if(V_(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Nv;for(let e of o)X_(i,e,n,a)}function Fv(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Mv(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=sv(i);Pv(e,i.draft_??i,a,n),Iv(i,r)})}function Iv(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)}jv(e)}}function Lv(e,t,n){let{scope_:r}=e;if(V_(n)){let i=n[A_];Mv(i,r)&&i.callbacks_.push(function(){qv(e),Pv(e,n,sv(i),t)})}else H_(n)&&e.callbacks_.push(function(){let i=ov(e);e.type_===3?i.has(n)&&Rv(n,r.handledSet_,r):Y_(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Rv(Y_(e.copy_,t,e.type_),r.handledSet_,r)})}function Rv(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||V_(e)||t.has(e)||!H_(e)||fv(e)?e:(t.add(e),K_(e,(r,i)=>{if(V_(i)){let t=i[A_];Mv(t,n)&&(X_(e,r,sv(t),e.type_),jv(t))}else H_(i)&&Rv(i,t,n)}),e)}function zv(e,t){let n=Q_(e),r={type_:+!!n,scope_:t?t.scope_:xv(),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=Bv;n&&(i=[r],a=Vv);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Bv={get(e,t){if(t===A_)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=ov(e);if(!J_(i,t,e.type_))return Wv(e,i,t);let a=i[t];if(e.finalized_||!H_(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&iv(t))return a;if(a===Hv(e.base_,t)||Uv(e,t,a)){qv(e);let n=e.type_===1?+t:t,r=Yv(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in ov(e)},ownKeys(e){return Reflect.ownKeys(ov(e))},set(e,t,n){let r=Gv(ov(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Hv(ov(e),t),i=r?.[A_];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Z_(n,r)&&(n!==void 0||J_(e.base_,t,e.type_)))return!0;qv(e),Kv(e)}return e.copy_[t]===n&&(n!==void 0||J_(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Lv(e,t,n),!0)},deleteProperty(e,t){return qv(e),Hv(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Kv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=ov(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[z_]:!0,[L_]:e.type_!==1||t!==`length`,[R_]:r[R_],[B_]:n[t]}},defineProperty(){M_(11)},getPrototypeOf(e){return P_(e.base_)},setPrototypeOf(){M_(12)}},Vv={};for(let e in Bv){let t=Bv[e];Vv[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Vv.deleteProperty=function(e,t){return isNaN(parseInt(t))&&M_(13),Vv.set.call(this,e,t,void 0)},Vv.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&M_(14),Bv.set.call(this,e[0],t,n,e[0])};function Hv(e,t){let n=e[A_];return(n?ov(n):e)[t]}function Uv(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!H_(n)||n[A_]?!1:e.baseRefs_.has(n)}function Wv(e,t,n){let r=Gv(t,n);return r?B_ in r?r[B_]:r.get?.call(e.draft_):void 0}function Gv(e,t){if(!(t in e))return;let n=P_(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=P_(n)}}function Kv(e){e.modified_||(e.modified_=!0,e.parent_&&Kv(e.parent_))}function qv(e){e.copy_||=(e.assigned_=new Map,cv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Jv=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(nv(e)&&!nv(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}nv(t)||M_(6),n!==void 0&&!nv(n)&&M_(7);let r;if(H_(e)){let i=Ev(this),a=Yv(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?wv(i):Tv(i)}return Cv(i,n),Ov(r,i)}if(!e||!tv(e)){if(r=t(e),r===void 0&&(r=e),r===O_&&(r=void 0),this.autoFreeze_&&lv(r,!0),n){let t=[],i=[];_v(mv).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}M_(1,e)},this.produceWithPatches=(e,t)=>{if(nv(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]},rv(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),rv(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),rv(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){H_(e)||M_(8),V_(e)&&(e=Xv(e));let t=Ev(this),n=Yv(t,e,void 0);return n[A_].isManual_=!0,Tv(t),n}finishDraft(e,t){let n=e&&e[A_];(!n||!n.isManual_)&&M_(9);let{scope_:r}=n;return Cv(r,t),Ov(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=_v(mv).applyPatches_;return V_(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Yv(e,t,n,r){let[i,a]=$_(t)?_v(pv).proxyMap_(t,n):ev(t)?_v(pv).proxySet_(t,n):zv(t,n);return(n?.scope_??xv()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Fv(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 Xv(e){return V_(e)||M_(10,e),Zv(e)}function Zv(e){if(!H_(e)||fv(e))return e;let t=e[A_],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=cv(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=cv(e,!0);return K_(n,(e,t)=>{X_(n,e,Zv(t))},r),t&&(t.finalized_=!1),n}function Qv(){j_.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=av(Y_(e,n.key_)),i=Y_(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||J_(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=Y_(o,e,c),f=Y_(s,e,c),p=l?J_(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===O_?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(ev(e))return new Set(Array.from(e).map(u));let t=Object.create(P_(e));for(let n in e)t[n]=u(e[n]);return J_(e,k_)&&(t[k_]=e[k_]),t}function d(e){return V_(e)?u(e):e}yv(mv,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var $v=new Jv,ey=$v.produce,ty=$v.produceWithPatches.bind($v),ny=$v.applyPatches.bind($v),ry=1e3;function iy(e,t){if(e.add(t),e.size>ry){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function ay(e){let{enablePatches:t=!1}=e;t&&Qv();let n=y_(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=D_())=>{i.has(t)||(Qv(),r=ny(r,e),iy(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=D_())=>{if(!i.has(a)){if(iy(i,a),t){let[t,i]=ty(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=ey(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var oy=typeof self==`object`?self:globalThis,sy=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),cy=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function ly(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=sy.has(e)?oy[e]:void 0;return n(new(r??oy.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`&&cy.has(a))return n(new oy[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function uy(e){return ly(new Map,e)(0)}var dy=``,{toString:fy}={},{keys:py}=Object;function my(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=fy.call(e).slice(8,-1);switch(n){case`Array`:return[1,dy];case`Object`:return[2,dy];case`Date`:return[3,dy];case`RegExp`:return[4,dy];case`Map`:return[5,dy];case`Set`:return[6,dy];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function hy([e,t]){return e===0&&(t===`function`||t===`symbol`)}function gy(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]=my(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 py(r))(e||!hy(my(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||!(hy(my(n))||hy(my(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!hy(my(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function _y(e,t={}){let n=[];return gy(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:vy,stringify:yy}=JSON,by={json:!0,lossy:!0};function xy(e){return uy(vy(e))}function Sy(e){return yy(_y(e,by))}function Cy(e){return uy(e)}function wy(e){return Sy(e)}function Ty(e){return xy(e)}var Ey=256,Dy=class extends Error{name=`StreamClosedError`};function Oy(e={}){let t=e.id??D_(),n=Math.max(0,e.replayWindow??0),r=y_(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new Dy(`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=Ay(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 ky(e={}){let t=e.id??D_(),n=Math.max(1,e.highWaterMark??Ey),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 Ay(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 jy=128;function My(e){return e.replace(/[^\w-]+/g,`_`).slice(0,jy)}var Ny=`modulepreload`,Py=function(e,t){return new URL(e,t).href},Fy={},Iy=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=Py(t,n),t=s(t),t in Fy)return;Fy[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`:Ny,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)})},Ly=`__connection.json`,Ry=`__DEVFRAME_CONNECTION__`,zy=`x-birpc-session`,By=`__rpc-dump/index.json`,Vy=`devframe:services`,Hy=`devframe_otp`,Uy=`devframe_auth_token`;$.postMessage.remoteAssetsError;var Wy=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>v_(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()}},Gy=Hg({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 Ky(e){if(e.agent&&e.jsonSerializable===!1)throw Gy.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function qy(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function Jy(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 Yy(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 Qy(e,t){let n=e.handler;if(!n){let r=await Zy(e,t);if(!r.handler)throw Gy.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 Yy(e.name,r,t),o=await a(...n);return await Xy(e.name,i,o)}}var $y=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 Qy(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 Gy.DF0021({name:e.name});Ky(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 Gy.DF0022({name:e.name});Ky(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 Qy(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw Gy.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 eb(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 nb(t,`undefined`,r,e);return n}return i!==null&&tb(i,r,e,t),n})}function tb(e,t,n,r){if(typeof e==`bigint`)throw nb(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw nb(r,`Map`,t,n);if(e instanceof Set)throw nb(r,`Set`,t,n);if(e instanceof Date)throw nb(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw nb(r,e.constructor?.name??`class instance`,t,n)}function nb(e,t,n,r){let i=rb(n,r);return Gy.DF0020({name:e||``,type:t,path:i})}function rb(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var ib=`__DEVFRAME_CONNECTION_META__`,ab=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function ob(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 sb(){return ob(Ry)}function cb(){return ob(ib)}function lb(e){if(e)return e;try{let e=localStorage.getItem(ab);if(e)return e}catch{}return ob(ab)}function ub(e){globalThis[Ry]=e,globalThis[ib]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&db(e.authToken)}function db(e){try{localStorage.setItem(ab,e)}catch{}globalThis[ab]=e;let t=sb();t&&(globalThis[Ry]={...t,authToken:e})}function fb(e){let t=w_(Ly,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function pb(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function mb(){let e=sb();if(e)return pb(e,lb()??e.authToken??e.connectionMeta.authToken);let t=cb();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??fb(`./`),authToken:lb(t.authToken)}}async function hb(e={}){if(e.connection){let t=pb(e.connection,lb(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return ub(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:fb(t[0]??`./`),authToken:lb(e.authToken??e.connectionMeta.authToken)};return ub(n),n}let n=mb();if(n){let t=pb(n,lb(e.authToken??n.authToken??n.connectionMeta.authToken));return ub(t),t}let r=[];for(let n of t){let t=w_(Ly,n),i=fb(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:lb(e.authToken??r.authToken)};return ub(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var gb=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function _b(e=Hy){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function vb(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 yb(e=Hy){let t=_b(e);return t&&vb(e),t}async function bb(e,t={}){let n=yb(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function xb(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(Vy,{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 Sb(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:$.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:$.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=ay({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on($.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var Cb=new Map;function wb(e=Cb){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?eb(n,r??``):`s:${wy(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?Ty(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function Tb(){}function Eb(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 Db(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 Ob(e){let{onConnected:t=Tb,onError:n=Tb,onDisconnected:r=Tb,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${Uy}=${encodeURIComponent(e.authToken)}`);let s=wb(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 v(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=Eb(r);if(!e)break;r=e.rest;let{event:t,data:n}=Db(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 v(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`,[zy]: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 kb(e,t){let{channel:n,rpcOptions:r={}}=t;return Qg(e,{...n,timeout:-1,...r,proxify:!1})}function Ab(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($.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 gb(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new gb(`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($.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 gb(`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($.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit($.client.connectionError,e),m(new gb(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new gb(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=kb(a.functions,{channel:v,rpcOptions:o});a.register({name:$.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new gb(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit($.client.connectionError,e),m(e),i.emit($.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$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 gb(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit($.client.connectionError,e)}return i.emit($.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit($.client.isTrustedUpdated,!0)),t}async function C(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function w(){return c?!0:x(b??``)}async function T(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:w,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:C,ensureTrusted:T,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit($.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit($.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit($.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function jb(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 Mb(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=jb(n.sse,r??`./`,location);return Ab({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Ob({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 Nb(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:Pb(r)?Nb(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function Pb(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function Fb(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function Ib(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Lb(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Rb(e){if(e.error)throw Nb(e.error);return e.output}function zb(e){return e.some(e=>e!=null)}function Bb(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Vb(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Cy(e):e}function a(e,t){return i(Bb(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 Lb(r)?Rb(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(Fb(r)){if(zb(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(Ib(r)){let e=v_(n),i=r.records[e];if(i)return Rb(await s(i,r.serialization));if(r.fallback)return Rb(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!zb(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 Hb(e){let t=Vb(await e.fetchJsonFromBases(By),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 Ub=``;function Wb(e,t){return`${e}${Ub}${t}`}function Gb(e){let t=new Map,n=new Map;e.client.register({name:$.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Wb(e,n))?._push(r,i)}}),e.client.register({name:$.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Wb(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:$.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=Wb(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on($.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Ub);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=Wb(n,r),o=t.get(a);if(o)return o;let s=ky({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($.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=Wb(t,r),a=n.get(i);if(a)return a;let o=Oy({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 Kb(){}var qb=new Map;function Jb(e){let t=e.url;e.authToken&&(t=`${t}?${Uy}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Kb,onError:i=Kb,onDisconnected:a=Kb,definitions:o=qb}=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=wb(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 Yb(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 T_(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Xb(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Yb(n.websocket,r??`./`,location);return Ab({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Jb({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 Zb(e){return e.includes(`:`)}function Qb(e,t){return Zb(t)?t:`${e}:${t}`}function $b(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function ex(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return $b(a)}function tx(e,t){return{global:ex(e,t,`global`),project:ex(e,t,`project`)}}function nx(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Zb(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(Qb(t,n),...r)),callEvent:((n,...r)=>e.callEvent(Qb(t,n),...r)),callOptional:((n,...r)=>e.callOptional(Qb(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(Qb(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(Qb(t,n),r,i),upload:(n,r)=>e.streaming.upload(Qb(t,n),r)}},settings:tx(e,t),scope:e.scope}}function rx(){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 ix(e,t={}){let n=t.modelContext??rx();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=My(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=$g(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:n_(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>ax(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 ax(e,t,n){try{let r=i_(n,e.args?.length);return{content:[{type:`text`,text:ox(await(await Qy(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:sx(e)}]}}}function ox(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function sx(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 cx(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 lx(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=y_(),a=Array.isArray(t)?t:[t],o=await hb(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new Wy({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new $y(f),m=e.webmcp===!1?void 0:ix(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(w_(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 v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=cx(e.transport??`auto`,s),b=y===`static`?await Hb({fetchJsonFromBases:_}):y===`sse`?Mb({...v,sseOptions:e.sseOptions}):Xb({...v,wsOptions:e.wsOptions}),x;try{x=new BroadcastChannel(`devframe-auth`)}catch{}let S,C=!1;function w(e){return((...t)=>C||!S?e(...t):S.then(()=>e(...t)))}function T(){g=!0;try{h?.(),m?.()}finally{try{x?.close()}finally{b.close?.()}}}let E={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(db(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;db(t),o={...o,authToken:t};try{x?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:w(b.call),callEvent:w(b.callEvent),callOptional:w(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:T};E.sharedState=Sb(E),E.streaming=Gb(E),E.services=xb(E);let D=new Map;E.scope=(e=>{if(!e)return E;let t=D.get(e);return t||(t=nx(E,e),D.set(e,t)),t}),f.rpc=E;function O(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ee(){if(e.simpleAuth!==!1&&O()&&typeof globalThis.prompt==`function`)for(await E.requestAuthCode().catch(()=>{});!E.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 E.requestTrustWithCode(t))return}}async function k(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await bb(E,{param:n}):!1;t||r||E.isTrusted||await ee()}return S=k().then(()=>{C=!0},()=>{C=!0}),s.mcp&&Iy(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-CQswxhBW.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(E))}).catch(()=>{}),x&&(x.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&E.requestTrustWithToken(e.data.authToken)}),E}var ux=lx,dx=class e{rpc=Th(null);meta=B(null);componentCount=B(0);routeCount=B(0);constructor(){No(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);t.rpc.call(`build-meta`).then(e=>this.meta.set(e)),t.rpc.call(`get-components`).then(e=>this.componentCount.set(e.length)),t.rpc.call(`get-routes`).then(e=>this.routeCount.set(e.length))})}static ɵfac=function(t){return new(t||e)};static ɵcmp=kf({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},decls:35,vars:6,consts:[[1,`grid`],[1,`card`],[1,`big`],[1,`sub`]],template:function(e,t){e&1&&(q(0,`div`,0)(1,`div`,1)(2,`h3`),X(3,`Project`),J(),q(4,`dl`)(5,`dt`),X(6,`Name`),J(),q(7,`dd`),X(8),J(),q(9,`dt`),X(10,`Angular`),J(),q(11,`dd`),X(12),J(),q(13,`dt`),X(14,`TypeScript`),J(),q(15,`dd`),X(16),J(),q(17,`dt`),X(18,`SSR`),J(),q(19,`dd`),X(20),J()()(),q(21,`div`,1)(22,`h3`),X(23,`Components`),J(),q(24,`p`,2),X(25),J(),q(26,`p`,3),X(27,`discovered in source`),J()(),q(28,`div`,1)(29,`h3`),X(30,`Routes`),J(),q(31,`p`,2),X(32),J(),q(33,`p`,3),X(34,`registered paths`),J()()()),e&2&&(U(8),Z(t.meta()?.projectName??`…`),U(4),Z(t.meta()?.angularVersion??`…`),U(4),Z(t.meta()?.typescript??`…`),U(4),Z(t.meta()?.ssr?`Yes`:`No`),U(5),Z(t.componentCount()),U(7),Z(t.routeCount()))},styles:[`.grid[_ngcontent-%COMP%] { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; } - .card[_ngcontent-%COMP%] { - background: #18181b; border: 1px solid #27272a; border-radius: 10px; padding: 20px; - } - h3[_ngcontent-%COMP%] { font-size: 13px; text-transform: uppercase; color: #71717a; margin-bottom: 12px; letter-spacing: 0.05em; } - dl[_ngcontent-%COMP%] { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; } - dt[_ngcontent-%COMP%] { color: #a1a1aa; } - dd[_ngcontent-%COMP%] { color: #e4e4e7; font-weight: 500; } - .big[_ngcontent-%COMP%] { font-size: 36px; font-weight: 700; color: #a78bfa; } - .sub[_ngcontent-%COMP%] { font-size: 13px; color: #71717a; margin-top: 4px; }`]})},fx=(e,t)=>t.selector;function px(e,t){e&1&&(q(0,`p`,3),X(1,`Scanning components…`),J())}function mx(e,t){e&1&&(q(0,`p`,3),X(1,`No components found.`),J())}function hx(e,t){if(e&1&&(q(0,`div`,10)(1,`span`,11),X(2,`Inputs:`),J(),X(3),J()),e&2){let e=Y().$implicit;U(3),Q(` `,e.inputs.join(`, `),` `)}}function gx(e,t){if(e&1&&(q(0,`div`,10)(1,`span`,11),X(2,`Outputs:`),J(),X(3),J()),e&2){let e=Y().$implicit;U(3),Q(` `,e.outputs.join(`, `),` `)}}function _x(e,t){if(e&1){let e=Em();q(0,`li`,7),jm(`click`,function(){let t=na(e).$implicit;return ra(Y(2).select(t))}),q(1,`div`,8),X(2),J(),q(3,`div`,9),X(4),J(),G(5,hx,4,1,`div`,10),G(6,gx,4,1,`div`,10),J()}if(e&2){let e=t.$implicit;U(2),Q(`<`,e.selector,`>`),U(2),Z(e.file),U(),K(e.inputs.length?5:-1),U(),K(e.outputs.length?6:-1)}}function vx(e,t){if(e&1&&(q(0,`ul`,4),im(1,_x,7,4,`li`,6,fx),J()),e&2){let e=Y();U(),om(e.filtered())}}function yx(e,t){if(e&1&&(q(0,`aside`,5)(1,`h3`),X(2),J(),q(3,`pre`),X(4),ph(5,`json`),J()()),e&2){let e=Y();U(2),Q(`<`,e.selected().selector,`>`),U(2),Z(hh(5,2,e.selected()))}}var bx=class e{rpc=Th(null);components=B([]);filter=B(``);loading=B(!1);selected=B(null);filtered=B([]);constructor(){No(()=>{let e=this.filter().toLowerCase(),t=this.components();this.filtered.set(e?t.filter(t=>t.selector.includes(e)||t.file.includes(e)):t)}),No(()=>{this.rpc()&&this.refresh()})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0);try{let t=await e.scope(`ng-devtools`).rpc.call(`get-components`);this.components.set(t)}finally{this.loading.set(!1)}}}select(e){this.selected.set(e);let t=this.rpc();t&&t.scope(`ng-devtools`).rpc.callEvent(`select-component`,e.selector)}static ɵfac=function(t){return new(t||e)};static ɵcmp=kf({type:e,selectors:[[`app-component-tree`]],inputs:{rpc:[1,`rpc`]},decls:8,vars:3,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter components…`,3,`input`,`value`],[3,`click`],[1,`muted`],[`role`,`list`,1,`component-list`],[1,`detail`],[1,`component-item`],[1,`component-item`,3,`click`],[1,`selector`],[1,`file`],[1,`io`],[1,`label`]],template:function(e,t){e&1&&(q(0,`div`,0)(1,`input`,1),jm(`input`,function(e){return t.filter.set(e.target.value)}),J(),q(2,`button`,2),jm(`click`,function(){return t.refresh()}),X(3,`Refresh`),J()(),G(4,px,2,0,`p`,3)(5,mx,2,0,`p`,3)(6,vx,3,0,`ul`,4),G(7,yx,6,4,`aside`,5)),e&2&&(U(),Dm(`value`,t.filter()),U(3),K(t.loading()?4:t.filtered().length===0?5:6),U(3),K(t.selected()?7:-1))},dependencies:[Vh],styles:[`.toolbar[_ngcontent-%COMP%] { display: flex; gap: 8px; margin-bottom: 16px; } - input[_ngcontent-%COMP%] { - flex: 1; padding: 8px 12px; background: #18181b; border: 1px solid #27272a; - border-radius: 6px; color: #e4e4e7; font-size: 14px; outline: none; - } - input[_ngcontent-%COMP%]:focus { border-color: #a78bfa; } - button[_ngcontent-%COMP%] { - padding: 8px 16px; background: #3f3f46; border: none; border-radius: 6px; - color: #e4e4e7; cursor: pointer; font-size: 13px; - } - button[_ngcontent-%COMP%]:hover { background: #52525b; } - .muted[_ngcontent-%COMP%] { color: #71717a; font-size: 14px; } - .component-list[_ngcontent-%COMP%] { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; } - .component-item[_ngcontent-%COMP%] { - background: #18181b; border: 1px solid #27272a; border-radius: 8px; - padding: 12px 16px; cursor: pointer; transition: border-color 0.15s; - } - .component-item[_ngcontent-%COMP%]:hover { border-color: #a78bfa; } - .selector[_ngcontent-%COMP%] { font-family: monospace; font-size: 15px; color: #a78bfa; font-weight: 600; } - .file[_ngcontent-%COMP%] { font-size: 12px; color: #71717a; margin-top: 2px; } - .io[_ngcontent-%COMP%] { font-size: 13px; color: #a1a1aa; margin-top: 4px; } - .io[_ngcontent-%COMP%] .label[_ngcontent-%COMP%] { color: #71717a; } - .detail[_ngcontent-%COMP%] { - margin-top: 16px; padding: 16px; background: #18181b; - border: 1px solid #27272a; border-radius: 8px; - } - .detail[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { font-family: monospace; color: #a78bfa; margin-bottom: 8px; } - pre[_ngcontent-%COMP%] { font-size: 12px; color: #a1a1aa; white-space: pre-wrap; }`]})},xx=(e,t)=>t.path+t.file;function Sx(e,t){e&1&&(q(0,`p`,3),X(1,`Scanning routes…`),J())}function Cx(e,t){e&1&&(q(0,`p`,3),X(1,`No routes found.`),J())}function wx(e,t){if(e&1&&(q(0,`tr`)(1,`td`,5),X(2),J(),q(3,`td`),X(4),J(),q(5,`td`,6),X(6),J(),q(7,`td`),X(8),J()()),e&2){let e=t.$implicit;U(2),Q(`/`,e.path),U(2),Z(e.component??`—`),U(2),Z(e.file),U(2),Z(e.hasChildren?`Yes`:`—`)}}function Tx(e,t){if(e&1&&(q(0,`table`,4)(1,`thead`)(2,`tr`)(3,`th`),X(4,`Path`),J(),q(5,`th`),X(6,`Component`),J(),q(7,`th`),X(8,`File`),J(),q(9,`th`),X(10,`Children`),J()()(),q(11,`tbody`),im(12,wx,9,4,`tr`,null,xx),J()()),e&2){let e=Y();U(12),om(e.filtered())}}var Ex=class e{rpc=Th(null);routes=B([]);filter=B(``);loading=B(!1);filtered=B([]);constructor(){No(()=>{let e=this.filter().toLowerCase(),t=this.routes();this.filtered.set(e?t.filter(t=>t.path.includes(e)||t.file.includes(e)):t)}),No(()=>{this.rpc()&&this.refresh()})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0);try{let t=await e.scope(`ng-devtools`).rpc.call(`get-routes`);this.routes.set(t)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=kf({type:e,selectors:[[`app-route-inspector`]],inputs:{rpc:[1,`rpc`]},decls:7,vars:2,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter routes…`,3,`input`,`value`],[3,`click`],[1,`muted`],[`role`,`table`],[1,`path`],[1,`file`]],template:function(e,t){e&1&&(q(0,`div`,0)(1,`input`,1),jm(`input`,function(e){return t.filter.set(e.target.value)}),J(),q(2,`button`,2),jm(`click`,function(){return t.refresh()}),X(3,`Refresh`),J()(),G(4,Sx,2,0,`p`,3)(5,Cx,2,0,`p`,3)(6,Tx,14,0,`table`,4)),e&2&&(U(),Dm(`value`,t.filter()),U(3),K(t.loading()?4:t.filtered().length===0?5:6))},styles:[`.toolbar[_ngcontent-%COMP%] { display: flex; gap: 8px; margin-bottom: 16px; } - input[_ngcontent-%COMP%] { - flex: 1; padding: 8px 12px; background: #18181b; border: 1px solid #27272a; - border-radius: 6px; color: #e4e4e7; font-size: 14px; outline: none; - } - input[_ngcontent-%COMP%]:focus { border-color: #a78bfa; } - button[_ngcontent-%COMP%] { - padding: 8px 16px; background: #3f3f46; border: none; border-radius: 6px; - color: #e4e4e7; cursor: pointer; font-size: 13px; - } - button[_ngcontent-%COMP%]:hover { background: #52525b; } - .muted[_ngcontent-%COMP%] { color: #71717a; font-size: 14px; } - table[_ngcontent-%COMP%] { width: 100%; border-collapse: collapse; font-size: 14px; } - thead[_ngcontent-%COMP%] { position: sticky; top: 0; } - th[_ngcontent-%COMP%] { - text-align: left; padding: 8px 12px; background: #18181b; - color: #71717a; font-size: 12px; text-transform: uppercase; - letter-spacing: 0.05em; border-bottom: 1px solid #27272a; - } - td[_ngcontent-%COMP%] { padding: 10px 12px; border-bottom: 1px solid #1e1e22; } - tr[_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%] { background: #18181b; } - .path[_ngcontent-%COMP%] { font-family: monospace; color: #a78bfa; font-weight: 500; } - .file[_ngcontent-%COMP%] { font-size: 12px; color: #71717a; }`]})},Dx=(e,t)=>t.kind,Ox=(e,t)=>t.id;function kx(e,t){e&1&&(q(0,`div`,3)(1,`p`,4),X(2,`No signal graph available.`),J(),q(3,`p`,5),X(4,`Signal inspection requires Angular 19+ with debug mode. The overlay collects the graph from the running app.`),J()())}function Ax(e,t){if(e&1&&(q(0,`span`,7),ym(1,`span`,11),X(2),J()),e&2){let e=t.$implicit;U(),Km(`background`,e.color),U(),Q(` `,e.kind,` `)}}function jx(e,t){e&1&&(q(0,`span`,16),X(1,`watching`),J())}function Mx(e,t){if(e&1&&(q(0,`div`,17),X(1),ph(2,`json`),J()),e&2){let e=Y().$implicit;U(),Z(hh(2,1,e.value))}}function Nx(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · Deps: `,Y(2).getDependencies(e).length,` `)}}function Px(e,t){if(e&1&&X(0),e&2){let e=Y().$implicit;Q(` · Consumers: `,Y(2).getConsumers(e).length,` `)}}function Fx(e,t){if(e&1){let e=Em();q(0,`div`,12),jm(`click`,function(){let t=na(e).$implicit;return ra(Y(2).selectNode(t))}),q(1,`div`,13)(2,`span`,14),X(3),J(),q(4,`span`,15),X(5),J(),G(6,jx,2,0,`span`,16),J(),G(7,Mx,3,3,`div`,17),q(8,`div`,18),X(9),G(10,Nx,1,1),G(11,Px,1,1),J()()}if(e&2){let e=t.$implicit,n=Y(2);qm(`selected`,n.selectedNode()?.id===e.id),U(2),Km(`background`,n.kindColor(e.kind)),U(),Z(e.kind),U(2),Z(e.label??`(unnamed)`),U(),K(e.watched?6:-1),U(),K(e.value===void 0?-1:7),U(2),Q(` Epoch: `,e.epoch,` `),U(),K(n.getDependencies(e).length?10:-1),U(),K(n.getConsumers(e).length?11:-1)}}function Ix(e,t){if(e&1&&(q(0,`dt`),X(1,`Value`),J(),q(2,`dd`)(3,`pre`),X(4),ph(5,`json`),J()()),e&2){let e=Y(3);U(4),Z(hh(5,1,e.selectedNode().value))}}function Lx(e,t){if(e&1&&(q(0,`li`)(1,`span`,19),X(2),J(),X(3),J()),e&2){let e=t.$implicit,n=Y(4);U(),Km(`background`,n.kindColor(e.kind)),U(),Z(e.kind),U(),Q(` `,e.label??e.id)}}function Rx(e,t){if(e&1&&(q(0,`h4`),X(1,`Dependencies (producers)`),J(),q(2,`ul`),im(3,Lx,4,4,`li`,null,Ox),J()),e&2){let e=Y(3);U(3),om(e.getDependencies(e.selectedNode()))}}function zx(e,t){if(e&1&&(q(0,`li`)(1,`span`,19),X(2),J(),X(3),J()),e&2){let e=t.$implicit,n=Y(4);U(),Km(`background`,n.kindColor(e.kind)),U(),Z(e.kind),U(),Q(` `,e.label??e.id)}}function Bx(e,t){if(e&1&&(q(0,`h4`),X(1,`Consumers`),J(),q(2,`ul`),im(3,zx,4,4,`li`,null,Ox),J()),e&2){let e=Y(3);U(3),om(e.getConsumers(e.selectedNode()))}}function Vx(e,t){if(e&1&&(q(0,`aside`,10)(1,`h3`),X(2),J(),q(3,`dl`)(4,`dt`),X(5,`Kind`),J(),q(6,`dd`),X(7),J(),q(8,`dt`),X(9,`Epoch`),J(),q(10,`dd`),X(11),J(),G(12,Ix,6,3),J(),G(13,Rx,5,0),G(14,Bx,5,0),J()),e&2){let e=Y(2);U(2),Z(e.selectedNode().label??e.selectedNode().id),U(5),Z(e.selectedNode().kind),U(4),Z(e.selectedNode().epoch),U(),K(e.selectedNode().value===void 0?-1:12),U(),K(e.getDependencies(e.selectedNode()).length?13:-1),U(),K(e.getConsumers(e.selectedNode()).length?14:-1)}}function Hx(e,t){if(e&1&&(q(0,`div`,6),im(1,Ax,3,3,`span`,7,Dx),J(),q(3,`div`,8),im(4,Fx,12,11,`div`,9,Ox),J(),G(6,Vx,15,6,`aside`,10)),e&2){let e=Y();U(),om(e.kindLegend),U(3),om(e.filteredNodes()),U(2),K(e.selectedNode()?6:-1)}}var Ux={signal:`#a78bfa`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#c084fc`,unknown:`#71717a`},Wx=class e{rpc=Th(null);graph=B(null);filter=B(``);selectedNode=B(null);kindLegend=Object.entries(Ux).map(([e,t])=>({kind:e,color:t}));filteredNodes=xh(()=>{let e=this.graph();if(!e)return[];let t=this.filter().toLowerCase();return t?e.nodes.filter(e=>(e.label??``).toLowerCase().includes(t)||e.kind.includes(t)):e.nodes});constructor(){No(()=>{let e=this.rpc();e&&this.loadSignalGraph(e)})}async loadSignalGraph(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`signal-graph`),n=t.value();n?.graph&&this.graph.set(n.graph),t.on(`updated`,e=>{e?.graph&&this.graph.set(e.graph)})}selectNode(e){this.selectedNode.set(this.selectedNode()?.id===e.id?null:e)}kindColor(e){return Ux[e]??Ux.unknown}getDependencies(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.consumer===n).map(e=>t.nodes[e.producer]).filter(Boolean)}getConsumers(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.producer===n).map(e=>t.nodes[e.consumer]).filter(Boolean)}static ɵfac=function(t){return new(t||e)};static ɵcmp=kf({type:e,selectors:[[`app-signal-inspector`]],inputs:{rpc:[1,`rpc`]},decls:6,vars:3,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by name or kind…`,3,`input`,`value`],[1,`label`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`legend`],[1,`legend-item`],[1,`nodes`],[1,`node-card`,3,`selected`],[1,`detail-panel`],[1,`dot`],[1,`node-card`,3,`click`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`watched-badge`],[1,`node-value`],[1,`node-meta`],[1,`kind-badge`,`sm`]],template:function(e,t){e&1&&(q(0,`div`,0)(1,`input`,1),jm(`input`,function(e){return t.filter.set(e.target.value)}),J(),q(2,`span`,2),X(3),J()(),G(4,kx,5,0,`div`,3)(5,Hx,7,1)),e&2&&(U(),Dm(`value`,t.filter()),U(2),Q(`Component: `,t.graph()?.componentSelector??`—`),U(),K(t.graph()?5:4))},dependencies:[Vh],styles:[`.toolbar[_ngcontent-%COMP%] { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; } - input[_ngcontent-%COMP%] { - flex: 1; padding: 8px 12px; background: #18181b; border: 1px solid #27272a; - border-radius: 6px; color: #e4e4e7; font-size: 14px; outline: none; - } - input[_ngcontent-%COMP%]:focus { border-color: #a78bfa; } - .label[_ngcontent-%COMP%] { font-size: 13px; color: #71717a; white-space: nowrap; } - .empty[_ngcontent-%COMP%] { text-align: center; padding: 48px 16px; } - .muted[_ngcontent-%COMP%] { color: #71717a; font-size: 14px; } - .hint[_ngcontent-%COMP%] { color: #52525b; font-size: 12px; margin-top: 8px; } - .legend[_ngcontent-%COMP%] { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; } - .legend-item[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #a1a1aa; } - .dot[_ngcontent-%COMP%] { width: 8px; height: 8px; border-radius: 50%; } - .nodes[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: 8px; } - .node-card[_ngcontent-%COMP%] { - background: #18181b; border: 1px solid #27272a; border-radius: 8px; - padding: 12px 16px; cursor: pointer; transition: border-color 0.15s; - } - .node-card[_ngcontent-%COMP%]:hover { border-color: #3f3f46; } - .node-card.selected[_ngcontent-%COMP%] { border-color: #a78bfa; } - .node-header[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; } - .kind-badge[_ngcontent-%COMP%] { - font-size: 11px; padding: 2px 8px; border-radius: 4px; color: #fff; - font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; - } - .kind-badge.sm[_ngcontent-%COMP%] { font-size: 10px; padding: 1px 5px; } - .node-label[_ngcontent-%COMP%] { font-family: monospace; font-size: 14px; color: #e4e4e7; } - .watched-badge[_ngcontent-%COMP%] { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #14532d; color: #4ade80; } - .node-value[_ngcontent-%COMP%] { font-family: monospace; font-size: 12px; color: #a1a1aa; margin-top: 4px; max-height: 40px; overflow: hidden; } - .node-meta[_ngcontent-%COMP%] { font-size: 11px; color: #52525b; margin-top: 4px; } - .detail-panel[_ngcontent-%COMP%] { - margin-top: 16px; padding: 16px; background: #18181b; - border: 1px solid #27272a; border-radius: 8px; - } - .detail-panel[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { font-family: monospace; color: #a78bfa; margin-bottom: 12px; } - .detail-panel[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] { font-size: 12px; color: #71717a; margin: 12px 0 4px; text-transform: uppercase; letter-spacing: 0.05em; } - dl[_ngcontent-%COMP%] { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; } - dt[_ngcontent-%COMP%] { color: #71717a; } - dd[_ngcontent-%COMP%] { color: #e4e4e7; } - pre[_ngcontent-%COMP%] { font-size: 12px; white-space: pre-wrap; margin: 0; } - ul[_ngcontent-%COMP%] { list-style: none; padding: 0; font-size: 13px; } - li[_ngcontent-%COMP%] { padding: 2px 0; color: #a1a1aa; display: flex; align-items: center; gap: 6px; }`]})},Gx=(e,t)=>t.injector.id,Kx=(e,t)=>t.node.injector.id,qx=(e,t)=>t.token;function Jx(e,t){e&1&&(q(0,`div`,4)(1,`p`,5),X(2,`No injector tree available.`),J(),q(3,`p`,6),X(4,`DI inspection requires Angular 17+ with debug mode. The overlay collects injector data from the running app.`),J()())}function Yx(e,t){e&1&&wm(0)}function Xx(e,t){if(e&1&&(q(0,`span`,15),X(1),J()),e&2){let e=Y().$implicit;U(),Q(``,e.node.injector.providerCount,` providers`)}}function Zx(e,t){if(e&1){let e=Em();q(0,`div`,12),jm(`click`,function(){let t=na(e).$implicit;return ra(Y(4).select(t.node))}),q(1,`span`,13),X(2),J(),q(3,`span`,14),X(4),J(),G(5,Xx,2,1,`span`,15),J()}if(e&2){let e=t.$implicit,n=Y(4);Km(`padding-left`,e.depth*24+12,`px`),qm(`selected`,n.selectedId()===e.node.injector.id),U(),Km(`background`,n.typeColor(e.node.injector.type)),U(),Q(` `,e.node.injector.type,` `),U(2),Z(e.node.injector.name),U(),K(e.node.injector.providerCount>0?5:-1)}}function Qx(e,t){if(e&1&&(q(0,`div`,10),im(1,Zx,6,9,`div`,11,Kx),J()),e&2){let e=Y().$implicit,t=Y(2);U(),om(t.flattenTree(e))}}function $x(e,t){e&1&&(Hf(0,Yx,1,0,`ng-container`,9)(1,Qx,3,0),Kp(2,1),qp()),e&2&&Dm(`ngTemplateOutlet`,void 0)}function eS(e,t){e&1&&(q(0,`p`,5),X(1,`No providers configured on this injector.`),J())}function tS(e,t){if(e&1&&(q(0,`tr`)(1,`td`,18),X(2),J(),q(3,`td`),X(4),J(),q(5,`td`),X(6),J()()),e&2){let e=t.$implicit;U(2),Z(e.token),U(2),Z(e.type),U(2),Z(e.isViewProvider?`Yes`:`—`)}}function nS(e,t){if(e&1&&(q(0,`table`,17)(1,`thead`)(2,`tr`)(3,`th`),X(4,`Token`),J(),q(5,`th`),X(6,`Type`),J(),q(7,`th`),X(8,`View`),J()()(),q(9,`tbody`),im(10,tS,7,3,`tr`,null,qx),J()()),e&2){let e=Y(3);U(10),om(e.selectedInjector().providers)}}function rS(e,t){if(e&1&&(q(0,`aside`,8)(1,`div`,16)(2,`span`,13),X(3),J(),q(4,`h3`),X(5),J()(),G(6,eS,2,0,`p`,5)(7,nS,12,0,`table`,17),J()),e&2){let e=Y(2);U(2),Km(`background`,e.typeColor(e.selectedInjector().injector.type)),U(),Q(` `,e.selectedInjector().injector.type,` `),U(2),Z(e.selectedInjector().injector.name),U(),K(e.selectedInjector().providers.length===0?6:7)}}function iS(e,t){if(e&1&&(q(0,`div`,7),im(1,$x,4,1,null,null,Gx),J(),G(3,rS,8,5,`aside`,8)),e&2){let e=Y();U(),om(e.filteredRoots()),U(2),K(e.selectedInjector()?3:-1)}}var aS={element:`#60a5fa`,environment:`#34d399`,null:`#71717a`},oS=class e{rpc=Th(null);roots=B([]);filter=B(``);hideEmpty=B(!1);selectedId=B(null);selectedInjector=xh(()=>{let e=this.selectedId();return e?this.findNode(this.roots(),e):null});filteredRoots=xh(()=>{let e=this.roots();this.hideEmpty()&&(e=this.filterEmpty(e));let t=this.filter().toLowerCase();return t&&(e=this.filterByQuery(e,t)),e});constructor(){No(()=>{let e=this.rpc();e&&this.loadInjectorTree(e)})}async loadInjectorTree(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`injector-tree`),n=t.value();n?.roots?.length&&this.roots.set(n.roots),t.on(`updated`,e=>{e?.roots&&this.roots.set(e.roots)})}select(e){this.selectedId.set(this.selectedId()===e.injector.id?null:e.injector.id)}typeColor(e){return aS[e]??aS.null}flattenTree(e){let t=[],n=(e,r)=>{t.push({node:e,depth:r});for(let t of e.children)n(t,r+1)};return n(e,0),t}findNode(e,t){for(let n of e){if(n.injector.id===t)return n;let e=this.findNode(n.children,t);if(e)return e}return null}filterEmpty(e){return e.map(e=>({...e,children:this.filterEmpty(e.children)})).filter(e=>e.injector.providerCount>0||e.children.length>0)}filterByQuery(e,t){return e.map(e=>({...e,children:this.filterByQuery(e.children,t)})).filter(e=>e.injector.name.toLowerCase().includes(t)||e.providers.some(e=>e.token.toLowerCase().includes(t))||e.children.length>0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=kf({type:e,selectors:[[`app-di-inspector`]],inputs:{rpc:[1,`rpc`]},decls:7,vars:3,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by injector name or token…`,3,`input`,`value`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`tree-container`],[1,`detail-panel`],[4,`ngTemplateOutlet`],[1,`injector-tree`],[1,`injector-row`,3,`selected`,`paddingLeft`],[1,`injector-row`,3,`click`],[1,`type-badge`],[1,`name`],[1,`provider-count`],[1,`detail-header`],[`role`,`table`],[1,`token`]],template:function(e,t){e&1&&(q(0,`div`,0)(1,`input`,1),jm(`input`,function(e){return t.filter.set(e.target.value)}),J(),q(2,`label`,2)(3,`input`,3),jm(`change`,function(){return t.hideEmpty.set(!t.hideEmpty())}),J(),X(4,` Hide empty injectors `),J()(),G(5,Jx,5,0,`div`,4)(6,iS,4,1)),e&2&&(U(),Dm(`value`,t.filter()),U(2),Dm(`checked`,t.hideEmpty()),U(2),K(t.roots().length===0?5:6))},styles:[`.toolbar[_ngcontent-%COMP%] { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; } - input[type=text][_ngcontent-%COMP%] { - flex: 1; padding: 8px 12px; background: #18181b; border: 1px solid #27272a; - border-radius: 6px; color: #e4e4e7; font-size: 14px; outline: none; - } - input[type=text][_ngcontent-%COMP%]:focus { border-color: #a78bfa; } - .checkbox[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #a1a1aa; white-space: nowrap; cursor: pointer; } - .empty[_ngcontent-%COMP%] { text-align: center; padding: 48px 16px; } - .muted[_ngcontent-%COMP%] { color: #71717a; font-size: 14px; } - .hint[_ngcontent-%COMP%] { color: #52525b; font-size: 12px; margin-top: 8px; } - .tree-container[_ngcontent-%COMP%] { display: flex; flex-direction: column; } - .injector-row[_ngcontent-%COMP%] { - display: flex; align-items: center; gap: 8px; padding: 8px 12px; - cursor: pointer; border-bottom: 1px solid #1e1e22; transition: background 0.1s; - } - .injector-row[_ngcontent-%COMP%]:hover { background: #18181b; } - .injector-row.selected[_ngcontent-%COMP%] { background: #1e1b4b; border-color: #a78bfa; } - .type-badge[_ngcontent-%COMP%] { - font-size: 10px; padding: 2px 6px; border-radius: 4px; color: #fff; - font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; - } - .name[_ngcontent-%COMP%] { font-family: monospace; font-size: 13px; color: #e4e4e7; } - .provider-count[_ngcontent-%COMP%] { font-size: 11px; color: #71717a; margin-left: auto; } - .detail-panel[_ngcontent-%COMP%] { - margin-top: 16px; padding: 16px; background: #18181b; - border: 1px solid #27272a; border-radius: 8px; - } - .detail-header[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; } - .detail-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { font-family: monospace; color: #e4e4e7; margin: 0; } - table[_ngcontent-%COMP%] { width: 100%; border-collapse: collapse; font-size: 13px; } - th[_ngcontent-%COMP%] { - text-align: left; padding: 6px 10px; background: #0f0f11; - color: #71717a; font-size: 11px; text-transform: uppercase; - letter-spacing: 0.05em; border-bottom: 1px solid #27272a; - } - td[_ngcontent-%COMP%] { padding: 8px 10px; border-bottom: 1px solid #1e1e22; } - .token[_ngcontent-%COMP%] { font-family: monospace; color: #a78bfa; }`]})},sS=(e,t)=>t.id;function cS(e,t){if(e&1){let e=Em();hm(0,`button`,8),Am(`click`,function(){let t=na(e).$implicit;return ra(Y().switchTab(t.id))}),X(1),_m()}if(e&2){let e=t.$implicit;qm(`active`,Y().tab()===e.id),U(),Z(e.label)}}function lS(e,t){e&1&&vm(0,`app-dashboard`,7),e&2&&pm(`rpc`,Y().rpc())}function uS(e,t){e&1&&vm(0,`app-component-tree`,7),e&2&&pm(`rpc`,Y().rpc())}function dS(e,t){e&1&&vm(0,`app-route-inspector`,7),e&2&&pm(`rpc`,Y().rpc())}function fS(e,t){e&1&&vm(0,`app-signal-inspector`,7),e&2&&pm(`rpc`,Y().rpc())}function pS(e,t){e&1&&vm(0,`app-di-inspector`,7),e&2&&pm(`rpc`,Y().rpc())}var mS=class e{tabs=[{id:`dashboard`,label:`Dashboard`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`}];tab=B(`dashboard`);rpc=B(null);connected=B(!1);ngOnInit(){let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.tabs.some(t=>t.id===e)&&this.tab.set(e);let t=hS();ux(t?{baseURL:t}:{}).then(e=>{this.rpc.set(e),this.connected.set(!0),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)})})}ngOnDestroy(){}switchTab(e){this.tab.set(e),history.replaceState(history.state,``,`#tab=${e}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=kf({type:e,selectors:[[`app-root`]],decls:19,vars:4,consts:[[1,`brand`],[`width`,`20`,`height`,`20`,`viewBox`,`0 0 24 24`,`fill`,`none`,`stroke`,`currentColor`,`stroke-width`,`2`],[`points`,`12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2`],[`x1`,`12`,`y1`,`22`,`x2`,`12`,`y2`,`15.5`],[`points`,`22 8.5 12 15.5 2 8.5`],[3,`active`],[1,`status`],[3,`rpc`],[3,`click`]],template:function(e,t){if(e&1&&(hm(0,`header`)(1,`div`,0),Pa(),hm(2,`svg`,1),vm(3,`polygon`,2)(4,`line`,3)(5,`polyline`,4),_m(),Fa(),hm(6,`span`),X(7,`Angular DevTools`),_m()(),hm(8,`nav`),im(9,cS,2,3,`button`,5,sS),_m(),hm(11,`span`,6),X(12),_m()(),hm(13,`main`),G(14,lS,1,1,`app-dashboard`,7)(15,uS,1,1,`app-component-tree`,7)(16,dS,1,1,`app-route-inspector`,7)(17,fS,1,1,`app-signal-inspector`,7)(18,pS,1,1,`app-di-inspector`,7),_m()),e&2){let e;U(9),om(t.tabs),U(2),qm(`connected`,t.connected()),U(),Q(` `,t.connected()?`Connected`:`Connecting…`,` `),U(2),K((e=t.tab())===`dashboard`?14:e===`components`?15:e===`routes`?16:e===`signals`?17:e===`injectors`?18:-1)}},dependencies:[dx,bx,Ex,Wx,oS],styles:[`[_nghost-%COMP%] { display: flex; flex-direction: column; height: 100vh; } - header[_ngcontent-%COMP%] { - display: flex; align-items: center; gap: 16px; - padding: 8px 16px; - background: #18181b; border-bottom: 1px solid #27272a; - } - .brand[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #a78bfa; } - nav[_ngcontent-%COMP%] { display: flex; gap: 4px; flex: 1; } - nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%] { - padding: 6px 14px; border: none; border-radius: 6px; - background: transparent; color: #a1a1aa; cursor: pointer; - font-size: 13px; transition: all 0.15s; - } - nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover { background: #27272a; color: #e4e4e7; } - nav[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%] { background: #3f3f46; color: #fff; } - .status[_ngcontent-%COMP%] { - font-size: 12px; padding: 3px 10px; border-radius: 99px; - background: #44403c; color: #a8a29e; - } - .status.connected[_ngcontent-%COMP%] { background: #14532d; color: #4ade80; } - main[_ngcontent-%COMP%] { flex: 1; overflow: auto; padding: 16px; }`]})};function hS(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e)return e;if(!location.pathname.includes(`__ng-devtools`))return`/__ng-devtools/`}Tg(mS).catch(console.error);export{D_ as t}; \ No newline at end of file diff --git a/extension/ui/index.html b/extension/ui/index.html index d34d4af..b383846 100644 --- a/extension/ui/index.html +++ b/extension/ui/index.html @@ -4,8 +4,8 @@ Angular DevTools - - + + diff --git a/packages/ng-devtools-assets/dist/assets/browser-agent-rpc-BXhoSh1z-D2qrD2G8.js b/packages/ng-devtools-assets/dist/assets/browser-agent-rpc-BXhoSh1z-BSqk5AzH.js similarity index 93% rename from packages/ng-devtools-assets/dist/assets/browser-agent-rpc-BXhoSh1z-D2qrD2G8.js rename to packages/ng-devtools-assets/dist/assets/browser-agent-rpc-BXhoSh1z-BSqk5AzH.js index d326a3f..3f62835 100644 --- a/packages/ng-devtools-assets/dist/assets/browser-agent-rpc-BXhoSh1z-D2qrD2G8.js +++ b/packages/ng-devtools-assets/dist/assets/browser-agent-rpc-BXhoSh1z-BSqk5AzH.js @@ -1 +1 @@ -import{t as e}from"./index-BGQfD5bN.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file +import{t as e}from"./index-CyR_EFCd.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge}; \ No newline at end of file diff --git a/packages/ng-devtools-assets/dist/assets/index-CyR_EFCd.js b/packages/ng-devtools-assets/dist/assets/index-CyR_EFCd.js new file mode 100644 index 0000000..aef05a3 --- /dev/null +++ b/packages/ng-devtools-assets/dist/assets/index-CyR_EFCd.js @@ -0,0 +1,896 @@ +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,i=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,a=(e,a)=>{for(var o in a||={})n.call(a,o)&&i(e,o,a[o]);if(t)for(var o of t(a))r.call(a,o)&&i(e,o,a[o]);return e},o=(e,t,n)=>(i(e,typeof t==`symbol`?t:t+``,n),n),s=globalThis;function c(e){let t=s.__Zone_symbol_prefix;return(typeof t==`string`?t:`__zone_symbol__`)+e}function l(){let e=s.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t(`Zone`);let r=class e{constructor(e,t){o(this,`_parent`),o(this,`_name`),o(this,`_properties`),o(this,`_zoneDelegate`),this._parent=e,this._name=t?t.name||`unnamed`:``,this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}static assertZonePatched(){if(s.Promise!==re.ZoneAwarePromise)throw Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=e.current;for(;t.parent;)t=t.parent;return t}static get current(){return O.zone}static get currentTask(){return ae}static __load_patch(r,i,a=!1){if(Object.hasOwn(re,r)){let e=s[c(`forceDuplicateZoneCheck`)]===!0;if(!a&&e)throw Error(`Already loaded patch: `+r)}else if(!s[`__Zone_disable_`+r]){let a=`Zone:`+r;t(a),re[r]=i(s,e,ie),n(a,a)}}get parent(){return this._parent}get name(){return this._name}get(e){let t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(Object.hasOwn(t._properties,e))return t;t=t._parent}return null}fork(e){if(!e)throw Error(`ZoneSpec required!`);return this._zoneDelegate.fork(this,e)}wrap(e,t){if(typeof e!=`function`)throw Error(`Expecting function got: `+e);let n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}}run(e,t,n,r){O={parent:O,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{O=O.parent}}runGuarded(e,t=null,n,r){O={parent:O,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{O=O.parent}}runTask(e,t,n){if(e.zone!=this)throw Error(`A task can only be run in the zone of creation! (Creation: `+(e.zone||x).name+`; Execution: `+this.name+`)`);let r=e,{type:i,data:{isPeriodic:a=!1,isRefreshable:o=!1}={}}=e;if(e.state===S&&(i===D||i===ne))return;let s=e.state!=w;s&&r._transitionTo(w,C);let c=ae;ae=r,O={parent:O,zone:this};try{i==ne&&e.data&&!a&&!o&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,r,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{let t=e.state;if(t!==S&&t!==te){if(i==D||a||o&&t===ee)s&&r._transitionTo(C,w,ee);else{let e=r._zoneDelegates;this._updateTaskCount(r,-1),s&&r._transitionTo(S,w,S),o&&(r._zoneDelegates=e)}}O=O.parent,ae=c}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(ee,S);let t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(te,ee,S),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==ee&&e._transitionTo(C,ee),e}scheduleMicroTask(e,t,n,r){return this.scheduleTask(new u(E,e,t,n,r,void 0))}scheduleMacroTask(e,t,n,r,i){return this.scheduleTask(new u(ne,e,t,n,r,i))}scheduleEventTask(e,t,n,r,i){return this.scheduleTask(new u(D,e,t,n,r,i))}cancelTask(e){if(e.zone!=this)throw Error(`A task can only be cancelled in the zone of creation! (Creation: `+(e.zone||x).name+`; Execution: `+this.name+`)`);if(e.state===C||e.state===w){e._transitionTo(T,C,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(te,T),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(S,T),e.runCount=-1,e}}_updateTaskCount(e,t){let n=e._zoneDelegates;t==-1&&(e._zoneDelegates=null);for(let r=0;re.hasTask(n,r),onScheduleTask:(e,t,n,r)=>e.scheduleTask(n,r),onInvokeTask:(e,t,n,r,i,a)=>e.invokeTask(n,r,i,a),onCancelTask:(e,t,n,r)=>e.cancelTask(n,r)};class l{constructor(e,t,n){o(this,`_zone`),o(this,`_taskCounts`,{microTask:0,macroTask:0,eventTask:0}),o(this,`_forkDlgt`),o(this,`_forkZS`),o(this,`_forkCurrZone`),o(this,`_interceptDlgt`),o(this,`_interceptZS`),o(this,`_interceptCurrZone`),o(this,`_invokeDlgt`),o(this,`_invokeZS`),o(this,`_invokeCurrZone`),o(this,`_handleErrorDlgt`),o(this,`_handleErrorZS`),o(this,`_handleErrorCurrZone`),o(this,`_scheduleTaskDlgt`),o(this,`_scheduleTaskZS`),o(this,`_scheduleTaskCurrZone`),o(this,`_invokeTaskDlgt`),o(this,`_invokeTaskZS`),o(this,`_invokeTaskCurrZone`),o(this,`_cancelTaskDlgt`),o(this,`_cancelTaskZS`),o(this,`_cancelTaskCurrZone`),o(this,`_hasTaskDlgt`),o(this,`_hasTaskDlgtOwner`),o(this,`_hasTaskZS`),o(this,`_hasTaskCurrZone`),this._zone=e,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let r=n&&n.onHasTask,i=t&&t._hasTaskZS;(r||i)&&(this._hasTaskZS=r?n:a,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=a,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=a,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=a,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}get zone(){return this._zone}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new i(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,i):t.apply(n,r)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||=t;else if(t.scheduleFn)t.scheduleFn(t);else if(t.type==E)y(t);else throw Error(`Task is missing scheduleFn.`);return n}invokeTask(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error(`Task is not cancelable`);n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){let n=this._taskCounts,r=n[e],i=n[e]=r+t;if(i<0)throw Error(`More tasks executed then were scheduled.`);if(r==0||i==0){let t={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this._zone,t)}}}class u{constructor(e,t,n,r,i,a){if(o(this,`type`),o(this,`source`),o(this,`invoke`),o(this,`callback`),o(this,`data`),o(this,`scheduleFn`),o(this,`cancelFn`),o(this,`_zone`,null),o(this,`runCount`,0),o(this,`_zoneDelegates`,null),o(this,`_state`,`notScheduled`),this.type=e,this.source=t,this.data=r,this.scheduleFn=i,this.cancelFn=a,!n)throw Error(`callback is not defined`);this.callback=n;let c=this;this.invoke=e===D&&r&&r.useG?u.invokeTask:function(){return u.invokeTask.call(s,c,this,arguments)}}static invokeTask(e,t,n){e||=this,oe++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{try{oe===1&&!s[m]&&b()}finally{oe--}}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(S,ee)}_transitionTo(e,t,n){if(this._state===t||this._state===n)this._state=e,e==S&&(this._zoneDelegates=null);else throw Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?` or '`+n+`'`:``}, was '${this._state}'.`)}toString(){return this.data&&this.data.handleId!==void 0?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let d=c(`setTimeout`),f=c(`Promise`),p=c(`then`),m=c(`enable_native_microtask_draining`),h=[],g=!1,_;function v(e){!_&&s[f]&&(_=s[f].resolve(0)),_?(_[p]??_.then).call(_,e):s[d](e,0)}function y(e){let t=s[m],n=t&&h.length===0&&!g,r=!t&&oe===0&&h.length===0;(n||r)&&v(b),e&&h.push(e)}function b(){if(!g){g=!0;try{for(;h.length;){let e=h;h=[];for(let t of e)try{t.zone.runTask(t,null,null)}catch(e){ie.onUnhandledError(e)}}}finally{if(s[m])g=!1,ie.microtaskDrainDone();else try{ie.microtaskDrainDone()}finally{g=!1}}}}let x={name:`NO ZONE`},S=`notScheduled`,ee=`scheduling`,C=`scheduled`,w=`running`,T=`canceling`,te=`unknown`,E=`microTask`,ne=`macroTask`,D=`eventTask`,re=Object.create(null),ie={symbol:c,currentZoneFrame:()=>O,onUnhandledError:se,microtaskDrainDone:se,scheduleMicroTask:y,showUncaughtError:()=>!i[c(`ignoreConsoleErrorUncaughtError`)],patchEventTarget:()=>[],patchOnProperties:se,patchMethod:()=>se,bindArguments:()=>[],patchThen:()=>se,patchMacroTask:()=>se,patchEventPrototype:()=>se,getGlobalObjects:()=>void 0,ObjectDefineProperty:()=>se,ObjectGetOwnPropertyDescriptor:()=>void 0,ObjectCreate:()=>void 0,ArraySlice:()=>[],patchClass:()=>se,wrapWithCurrentZone:()=>se,filterProperties:()=>[],attachOriginToPatched:()=>se,_redefineProperty:()=>se,patchCallbacks:()=>se,nativeScheduleMicroTask:v},O={parent:null,zone:new i(null,null)},ae=null,oe=0;function se(){}return n(`Zone`,`Zone`),i}function u(){let e=globalThis,t=e[c(`forceDuplicateZoneCheck`)]===!0;if(e.Zone&&(t||typeof e.Zone.__symbol__!=`function`))throw Error(`Zone already loaded.`);return e.Zone??=l(),e.Zone}var d=Object.getOwnPropertyDescriptor,f=Object.defineProperty,p=Object.getPrototypeOf,m=Object.create,h=Array.prototype.slice,g=`addEventListener`,_=`removeEventListener`,v=c(g),y=c(_),b=`true`,x=`false`,S=c(``);function ee(e,t){return Zone.current.wrap(e,t)}function C(e,t,n,r,i){return Zone.current.scheduleMacroTask(e,t,n,r,i)}var w=c,T=typeof window<`u`,te=T?window:void 0,E=T&&te||globalThis,ne=`removeAttribute`;function D(e,t){for(let n=e.length-1;n>=0;n--)typeof e[n]==`function`&&(e[n]=ee(e[n],t+`_`+n));return e}function re(e,t){let n=e.constructor.name;for(let r=0;r{let t=function(){return e.apply(this,D(arguments,n+`.`+i))};return _e(t,e),t})(a)}}}function ie(e){return e?e.writable===!1?!1:typeof e.get!=`function`||e.set!==void 0:!0}var O=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope,ae=!(`nw`in E)&&E.process!==void 0&&E.process.toString()===`[object process]`,oe=!ae&&!O&&!!(T&&te.HTMLElement),se=E.process!==void 0&&E.process.toString()===`[object process]`&&!O&&!!(T&&te.HTMLElement),ce=Object.create(null),le=w(`enable_beforeunload`),ue=function(e){if(e||=E.event,!e)return;let t=ce[e.type];t||=ce[e.type]=w(`ON_PROPERTY`+e.type);let n=this||e.target||E,r=n[t],i;if(oe&&n===te&&e.type===`error`){let t=e;i=r&&r.call(this,t.message,t.filename,t.lineno,t.colno,t.error),i===!0&&e.preventDefault()}else i=r&&r.apply(this,arguments),e.type===`beforeunload`&&E[le]&&typeof i==`string`?e.returnValue=i:i!=null&&!i&&e.preventDefault();return i};function de(e,t,n){let r=d(e,t);if(!r&&n&&d(n,t)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;let i=w(`on`+t+`patched`);if(Object.hasOwn(e,i)&&e[i])return;delete r.writable,delete r.value;let a=r.get,o=r.set,s=t.slice(2),c=ce[s];c||=ce[s]=w(`ON_PROPERTY`+s),r.set=function(t){let n=this;!n&&e===E&&(n=E),n&&(typeof n[c]==`function`&&n.removeEventListener(s,ue),o?.call(n,null),n[c]=t,typeof t==`function`&&n.addEventListener(s,ue,!1))},r.get=function(){let n=this;if(!n&&e===E&&(n=E),!n)return null;let i=n[c];if(i)return i;if(a){let e=a.call(this);if(e)return r.set.call(this,e),typeof n[ne]==`function`&&n.removeAttribute(t),e}return null},f(e,t,r),e[i]=!0}function fe(e,t,n){if(t)for(let r=0;rfunction(t,r){let a=n(t,r);return a.cbIdx>=0&&typeof r[a.cbIdx]==`function`?C(a.name,r[a.cbIdx],a,i):e.apply(t,r)})}function _e(e,t){e[w(`OriginalDelegate`)]=t}function ve(e){return typeof e==`function`}function ye(e){return typeof e==`number`}var be={useG:!0},xe=Object.create(null),Se={},Ce=RegExp(`^`+S+`(\\w+)(true|false)$`),we=w(`propagationStopped`),Te=[`capture`,`once`,`passive`,`signal`];function Ee(e,t){let n=(t?t(e):e)+x,r=(t?t(e):e)+b,i=S+n,a=S+r;xe[e]={[x]:i,[b]:a}}function De(e,t,n,r){let i=r&&r.add||g,o=r&&r.rm||_,s=r&&r.listeners||`eventListeners`,c=r&&r.rmAll||`removeAllListeners`,l=w(i),u=`.`+i+`:`,d=function(e,t,n){if(e.isRemoved)return;let r=e.callback;typeof r==`object`&&r.handleEvent&&(e.callback=e=>r.handleEvent(e),e.originalDelegate=r);let i;try{e.invoke(e,t,[n])}catch(e){i=e}let a=e.options;if(a&&typeof a==`object`&&a.once){let r=e.originalDelegate?e.originalDelegate:e.callback;t[o].call(t,n.type,r,a)}return i};function f(n,r,i){if(r||=e.event,!r)return;let a=n||r.target||e,o=a[xe[r.type][i?b:x]];if(o){let e=[];if(o.length===1){let t=d(o[0],a,r);t&&e.push(t)}else{let t=o.slice();for(let n=0;n{throw r})}}}let m=function(e){return f(this,e,!1)},h=function(e){return f(this,e,!0)};function v(t,n){if(!t)return!1;let r=!0;n&&n.useG!==void 0&&(r=n.useG);let d=n&&n.vh,f=!0;n&&n.chkDup!==void 0&&(f=n.chkDup);let g=!1;n&&n.rt!==void 0&&(g=n.rt);let _=t;for(;_&&!Object.hasOwn(_,i);)_=p(_);if(!_&&t[i]&&(_=t),!_||_[l])return!1;let v=n&&n.eventNameToString,y={},ee=_[l]=_[i],C=_[w(o)]=_[o],T=_[w(s)]=_[s],te=_[w(c)]=_[c],E;n&&n.prepend&&(E=_[w(n.prepend)]=_[n.prepend]);function ne(e,t){return t?typeof e==`boolean`?{capture:e,passive:!0}:e?(typeof e==`object`&&e.passive!==!1&&(e.passive=!0),e):{passive:!0}:e}let D=function(e){if(!y.isExisting)return ee.call(y.target,y.eventName,y.capture?h:m,y.options)},re=function(e){if(!e.isRemoved){let t=xe[e.eventName],n;t&&(n=t[e.capture?b:x]);let r=n&&e.target[n];if(r){for(let t=0;toe.zone.cancelTask(oe);t.call(_,`abort`,e,{once:!0}),oe.removeAbortListener=()=>_.removeEventListener(`abort`,e)}if(y.target=null,O&&(O.taskData=null),ee&&(y.options.once=!0),typeof oe.options!=`boolean`&&(oe.options=g),oe.target=l,oe.capture=S,oe.eventName=u,m&&(oe.originalDelegate=p),c?te.unshift(oe):te.push(oe),s)return l}};return _[i]=pe(ee,u,se,ce,g),E&&(_.prependListener=pe(E,`.prependListener:`,O,ce,g,!0)),_[o]=function(){let t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));let i=arguments[2],a=i?typeof i==`boolean`||i.capture:!1,o=arguments[1];if(!o)return C.apply(this,arguments);if(d&&!d(C,o,t,arguments))return;let s=xe[r],c;s&&(c=s[a?b:x]);let l=c&&t[c];if(l)for(let e=0;efunction(t,n){t[we]=!0,e&&e.apply(t,n)})}function Ae(e,t){t.patchMethod(e,`queueMicrotask`,e=>function(e,t){Zone.current.scheduleMicroTask(`queueMicrotask`,t[0])})}var je=w(`zoneTask`);function Me(e,t,n,r){let i=null,a=null;t+=r,n+=r;let o={};function s(t){let n=t.data;n.args[0]=function(){return t.invoke.apply(this,arguments)};let r=i.apply(e,n.args);return ye(r)?n.handleId=r:(n.handle=r,n.isRefreshable=ve(r?.refresh)),t}function c(t){let{handle:n,handleId:r}=t.data;return a.call(e,n??r)}i=he(e,t,n=>function(i,a){if(ve(a[0])){let e={isRefreshable:!1,isPeriodic:r===`Interval`,delay:r===`Timeout`||r===`Interval`?a[1]||0:void 0,args:a},n=a[0];a[0]=function(){try{return n.apply(this,arguments)}finally{let{handle:t,handleId:n,isPeriodic:r,isRefreshable:i}=e;!r&&!i&&(n?delete o[n]:t&&(t[je]=null))}};let i=C(t,a[0],e,s,c);if(!i)return i;let{handleId:l,handle:u,isRefreshable:d,isPeriodic:f}=i.data;if(l)o[l]=i;else if(u&&(u[je]=i,d&&!f)){let e=u.refresh;u.refresh=function(){let{zone:t,state:n}=i;return n===`notScheduled`?(i._state=`scheduled`,t._updateTaskCount(i,1)):n===`running`&&(i._state=`scheduling`),e.call(this)}}return u??l??i}return n.apply(e,a)}),a=he(e,n,t=>function(n,r){let i=r[0],a;ye(i)?(a=o[i],delete o[i]):(a=i?.[je],a?i[je]=null:a=i),a?.type?a.cancelFn&&a.zone.cancelTask(a):t.apply(e,r)})}function Ne(e,t){let{isBrowser:n,isMix:r}=t.getGlobalObjects();(n||r)&&e.customElements&&`customElements`in e&&t.patchCallbacks(t,e.customElements,`customElements`,`define`,[`connectedCallback`,`disconnectedCallback`,`adoptedCallback`,`attributeChangedCallback`,`formAssociatedCallback`,`formDisabledCallback`,`formResetCallback`,`formStateRestoreCallback`])}function Pe(e,t){if(Zone[t.symbol(`patchEventTarget`)])return;let{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:i,FALSE_STR:a,ZONE_SYMBOL_PREFIX:o}=t.getGlobalObjects();for(let e=0;et.target===e);if(r.length===0)return t;let i=r[0].ignoreProperties;return t.filter(e=>i.indexOf(e)===-1)}function Le(e,t,n,r){e&&fe(e,Ie(e,t,n),r)}function Re(e){return Object.getOwnPropertyNames(e).filter(e=>e.startsWith(`on`)&&e.length>2).map(e=>e.substring(2))}function ze(e,t){if(ae&&!se||Zone[e.symbol(`patchEvents`)])return;let n=t.__Zone_ignore_on_properties,r=[];if(oe){let e=window;r=r.concat([`Document`,`SVGElement`,`Element`,`HTMLElement`,`HTMLBodyElement`,`HTMLMediaElement`,`HTMLFrameSetElement`,`HTMLFrameElement`,`HTMLIFrameElement`,`HTMLMarqueeElement`,`Worker`]),Le(e,Re(e),n,p(e))}r=r.concat([`XMLHttpRequest`,`XMLHttpRequestEventTarget`,`IDBIndex`,`IDBRequest`,`IDBOpenDBRequest`,`IDBDatabase`,`IDBTransaction`,`IDBCursor`,`WebSocket`]);for(let e=0;e{let t=`clear`;Me(e,`set`,t,`Timeout`),Me(e,`set`,t,`Interval`),Me(e,`set`,t,`Immediate`)}),e.__load_patch(`requestAnimationFrame`,e=>{Me(e,`request`,`cancel`,`AnimationFrame`),Me(e,`mozRequest`,`mozCancel`,`AnimationFrame`),Me(e,`webkitRequest`,`webkitCancel`,`AnimationFrame`)}),e.__load_patch(`blocking`,(e,t)=>{let n=[`alert`,`prompt`,`confirm`];for(let r=0;rfunction(r,a){return t.current.run(n,e,a,i)})}}),e.__load_patch(`EventTarget`,(e,t,n)=>{Fe(e,n),Pe(e,n);let r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,n,[r.prototype])}),e.__load_patch(`MutationObserver`,(e,t,n)=>{me(`MutationObserver`),me(`WebKitMutationObserver`)}),e.__load_patch(`IntersectionObserver`,(e,t,n)=>{me(`IntersectionObserver`)}),e.__load_patch(`FileReader`,(e,t,n)=>{me(`FileReader`)}),e.__load_patch(`on_property`,(e,t,n)=>{ze(n,e)}),e.__load_patch(`customElements`,(e,t,n)=>{Ne(e,n)}),e.__load_patch(`XHR`,(e,t)=>{c(e);let n=w(`xhrTask`),r=w(`xhrSync`),i=w(`xhrListener`),a=w(`xhrScheduled`),o=w(`xhrURL`),s=w(`xhrErrorBeforeScheduled`);function c(e){let c=e.XMLHttpRequest;if(!c)return;let l=c.prototype;function u(e){return e[n]}let d=l[v],f=l[y];if(!d){let t=e.XMLHttpRequestEventTarget;if(t){let e=t.prototype;d=e[v],f=e[y]}}let p=`readystatechange`,m=`scheduled`;function h(e){let r=e.data,o=r.target;o[a]=!1,o[s]=!1;let c=o[i];d||(d=o[v],f=o[y]),c&&f.call(o,p,c);let l=o[i]=()=>{if(o.readyState===o.DONE){if(!r.aborted&&o[a]&&e.state===m){let n=o[t.__symbol__(`loadfalse`)];if(o.status!==0&&n&&n.length>0){let i=e.invoke;e.invoke=function(){let n=o[t.__symbol__(`loadfalse`)];for(let t=0;tfunction(e,t){return e[r]=t[2]==0,e[o]=t[1],b.apply(e,t)}),x=w(`fetchTaskAborting`),S=w(`fetchTaskScheduling`),ee=he(l,`send`,()=>function(e,n){if(t.current[S]===!0||e[r])return ee.apply(e,n);{let t={target:e,url:e[o],isPeriodic:!1,args:n,aborted:!1},r=C(`XMLHttpRequest.send`,g,t,h,_);e&&e[s]===!0&&!t.aborted&&r.state===m&&r.invoke()}}),T=he(l,`abort`,()=>function(e,n){let r=u(e);if(r&&typeof r.type==`string`){if(r.cancelFn==null||r.data&&r.data.aborted)return;r.zone.cancelTask(r)}else if(t.current[x]===!0)return T.apply(e,n)})}}),e.__load_patch(`geolocation`,e=>{e.navigator&&e.navigator.geolocation&&re(e.navigator.geolocation,[`getCurrentPosition`,`watchPosition`])}),e.__load_patch(`PromiseRejectionEvent`,(e,t)=>{function n(t){return function(n){Oe(e,t).forEach(r=>{let i=e.PromiseRejectionEvent;if(i){let e=new i(t,{promise:n.promise,reason:n.rejection});r.invoke(e)}})}}e.PromiseRejectionEvent&&(t[w(`unhandledPromiseRejectionHandler`)]=n(`unhandledrejection`),t[w(`rejectionHandledHandler`)]=n(`rejectionhandled`))}),e.__load_patch(`queueMicrotask`,(e,t,n)=>{Ae(e,n)})}function Ve(e){e.__load_patch(`ZoneAwarePromise`,(e,t,n)=>{let r=Object.getOwnPropertyDescriptor,i=Object.defineProperty;function a(e){return e&&e.toString===Object.prototype.toString?(e.constructor&&e.constructor.name||``)+`: `+JSON.stringify(e):e?e.toString():Object.prototype.toString.call(e)}let o=n.symbol,s=[],c=e[o(`DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION`)]!==!1,l=o(`Promise`),u=o(`then`);n.onUnhandledError=e=>{if(n.showUncaughtError()){let t=e&&e.rejection;t&&e.zone&&e.task?console.error(`Unhandled Promise rejection:`,t instanceof Error?t.message:t,`; Zone:`,e.zone.name,`; Task:`,e.task&&e.task.source,`; Value:`,t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;s.length;){let e=s.shift();try{e.zone.runGuarded(()=>{throw e.throwOriginal?e.rejection:e})}catch(e){f(e)}}};let d=o(`unhandledPromiseRejectionHandler`);function f(e){n.onUnhandledError(e);try{let n=t[d];typeof n==`function`&&n.call(this,e)}catch{}}function p(e){return e&&typeof e.then==`function`}function m(e){return e}function h(e){return D.reject(e)}let g=o(`state`),_=o(`value`),v=o(`finally`),y=o(`parentPromiseValue`),b=o(`parentPromiseState`);function x(e,t){return n=>{try{C(e,t,n)}catch(t){C(e,!1,t)}}}let S=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},ee=o(`currentTaskTrace`);function C(e,r,o){let l=S();if(e===o)throw TypeError(`Promise resolved with itself`);if(e[g]===null){let u=null;try{(typeof o==`object`||typeof o==`function`)&&(u=o&&o.then)}catch(t){return l(()=>{C(e,!1,t)})(),e}if(r!==!1&&o instanceof D&&Object.hasOwn(o,g)&&Object.hasOwn(o,_)&&o[g]!==null)T(o),C(e,o[g],o[_]);else if(r!==!1&&typeof u==`function`)try{u.call(o,l(x(e,r)),l(x(e,!1)))}catch(t){l(()=>{C(e,!1,t)})()}else{e[g]=r;let l=e[_];if(e[_]=o,e[v]===v&&r===!0&&(e[g]=e[b],e[_]=e[y]),r===!1&&o instanceof Error){let e=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;e&&i(o,ee,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t{try{let r=e[_],i=!!n&&v===n[v];i&&(n[y]=r,n[b]=a),C(n,!0,t.run(o,void 0,i&&o!==h&&o!==m?[]:[r]))}catch(e){C(n,!1,e)}},n)}let E=function(){},ne=e.AggregateError;class D{static toString(){return`function ZoneAwarePromise() { [native code] }`}static resolve(e){return e instanceof D?e:C(new this(null),!0,e)}static reject(e){return C(new this(null),!1,e)}static withResolvers(){let e={};return e.promise=new D((t,n)=>{e.resolve=t,e.reject=n}),e}static any(e){if(!e||typeof e[Symbol.iterator]!=`function`)return Promise.reject(new ne([],`All promises were rejected`));let t=[],n=0;try{for(let r of e)n++,t.push(D.resolve(r))}catch{return Promise.reject(new ne([],`All promises were rejected`))}if(n===0)return Promise.reject(new ne([],`All promises were rejected`));let r=!1,i=[];return new D((e,a)=>{for(let o=0;o{r||(r=!0,e(t))},e=>{i.push(e),n--,n===0&&(r=!0,a(new ne(i,`All promises were rejected`)))})})}static race(e){let t,n,r=new this((e,r)=>{t=e,n=r});function i(e){t(e)}function a(e){n(e)}for(let t of e)p(t)||(t=this.resolve(t)),t.then(i,a);return r}static all(e){return D.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof D?this:D).allWithCallback(e,{thenCallback:e=>({status:`fulfilled`,value:e}),errorCallback:e=>({status:`rejected`,reason:e})})}static allWithCallback(e,t){let n,r,i=new this((e,t)=>{n=e,r=t}),a=2,o=0,s=[];for(let i of e){p(i)||(i=this.resolve(i));let e=o;try{i.then(r=>{s[e]=t?t.thenCallback(r):r,a--,a===0&&n(s)},i=>{t?(s[e]=t.errorCallback(i),a--,a===0&&n(s)):r(i)})}catch(e){r(e)}a++,o++}return a-=2,a===0&&n(s),i}constructor(e){let t=this;if(!(t instanceof D))throw Error(`Must be an instanceof Promise.`);t[g]=null,t[_]=[];try{let n=S();e&&e(n(x(t,!0)),n(x(t,!1)))}catch(e){C(t,!1,e)}}get[Symbol.toStringTag](){return`Promise`}get[Symbol.species](){return D}then(e,n){let r=this.constructor?.[Symbol.species];(!r||typeof r!=`function`)&&(r=this.constructor||D);let i=new r(E),a=t.current;return this[g]==null?this[_].push(a,i,e,n):te(this,a,i,e,n),i}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];(!n||typeof n!=`function`)&&(n=D);let r=new n(E);r[v]=v;let i=t.current;return this[g]==null?this[_].push(i,r,e,e):te(this,i,r,e,e),r}}D.resolve=D.resolve,D.reject=D.reject,D.race=D.race,D.all=D.all;let re=e[l]=e.Promise;e.Promise=D;let ie=o(`thenPatched`);function O(e){let t=e.prototype,n=r(t,`then`);if(n&&(n.writable===!1||!n.configurable))return;let i=t.then;t[u]=i,e.prototype.then=function(e,t){return new D((e,t)=>{i.call(this,e,t)}).then(e,t)},e[ie]=!0}n.patchThen=O;function ae(e){return function(t,n){let r=e.apply(t,n);if(r instanceof D)return r;let i=r.constructor;return i[ie]||O(i),r}}if(re){O(re);let t=re.try;t&&typeof t==`function`&&(D.try=t),he(e,`fetch`,e=>ae(e))}return Promise[t.__symbol__(`uncaughtPromiseErrors`)]=s,D})}function He(e){e.__load_patch(`toString`,e=>{let t=Function.prototype.toString,n=w(`OriginalDelegate`),r=w(`Promise`),i=w(`Error`),a=function(){if(typeof this==`function`){let a=this[n];if(a)return typeof a==`function`?t.call(a):Object.prototype.toString.call(a);if(this===Promise){let n=e[r];if(n)return t.call(n)}if(this===Error){let n=e[i];if(n)return t.call(n)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;let o=Object.prototype.toString;Object.prototype.toString=function(){return typeof Promise==`function`&&this instanceof Promise?`[object Promise]`:o.call(this)}})}function Ue(e,t,n,r,i){let a=Zone.__symbol__(r);if(t[a])return;let o=t[a]=t[r];t[r]=function(a,s,c){return s&&s.prototype&&i.forEach(function(t){let i=`${n}.${r}::`+t,a=s.prototype;try{if(Object.hasOwn(a,t)){let n=e.ObjectGetOwnPropertyDescriptor(a,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,i),e._redefineProperty(s.prototype,t,n)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],i))}catch{}}),o.call(t,a,s,c)},e.attachOriginToPatched(t[r],o)}function We(e){e.__load_patch(`util`,(e,t,n)=>{let r=Re(e);n.patchOnProperties=fe,n.patchMethod=he,n.bindArguments=D,n.patchMacroTask=ge;let i=t.__symbol__(`BLACK_LISTED_EVENTS`),a=t.__symbol__(`UNPATCHED_EVENTS`);e[a]&&(e[i]=e[a]),e[i]&&(t[i]=t[a]=e[i]),n.patchEventPrototype=ke,n.patchEventTarget=De,n.ObjectDefineProperty=f,n.ObjectGetOwnPropertyDescriptor=d,n.ObjectCreate=m,n.ArraySlice=h,n.patchClass=me,n.wrapWithCurrentZone=ee,n.filterProperties=Ie,n.attachOriginToPatched=_e,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Ue,n.getGlobalObjects=()=>({globalSources:Se,zoneSymbolEventNames:xe,eventNames:r,isBrowser:oe,isMix:se,isNode:ae,TRUE_STR:b,FALSE_STR:x,ZONE_SYMBOL_PREFIX:S,ADD_EVENT_LISTENER_STR:g,REMOVE_EVENT_LISTENER_STR:_})})}function Ge(e){Ve(e),He(e),We(e)}var Ke=u();Ge(Ke),Be(Ke);var qe=(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})(qe||{}),Je=(function(e){return e[e.None=0]=`None`,e[e.Const=1]=`Const`,e})(Je||{}),Ye=class{modifiers;constructor(e=Je.None){this.modifiers=e}hasModifier(e){return(this.modifiers&e)!==0}},Xe=(function(e){return e[e.Dynamic=0]=`Dynamic`,e[e.Bool=1]=`Bool`,e[e.String=2]=`String`,e[e.Int=3]=`Int`,e[e.Number=4]=`Number`,e[e.Function=5]=`Function`,e[e.Inferred=6]=`Inferred`,e[e.None=7]=`None`,e})(Xe||{}),Ze=class extends Ye{name;constructor(e,t){super(t),this.name=e}visitType(e,t){return e.visitBuiltinType(this,t)}};Xe.Dynamic;var Qe=new Ze(Xe.Inferred);Xe.Bool,Xe.Int,Xe.Number,Xe.String,Xe.Function,Xe.None;var k=(function(e){return e[e.Equals=0]=`Equals`,e[e.NotEquals=1]=`NotEquals`,e[e.Assign=2]=`Assign`,e[e.Identical=3]=`Identical`,e[e.NotIdentical=4]=`NotIdentical`,e[e.Minus=5]=`Minus`,e[e.Plus=6]=`Plus`,e[e.Divide=7]=`Divide`,e[e.Multiply=8]=`Multiply`,e[e.Modulo=9]=`Modulo`,e[e.And=10]=`And`,e[e.Or=11]=`Or`,e[e.BitwiseOr=12]=`BitwiseOr`,e[e.BitwiseAnd=13]=`BitwiseAnd`,e[e.Lower=14]=`Lower`,e[e.LowerEquals=15]=`LowerEquals`,e[e.Bigger=16]=`Bigger`,e[e.BiggerEquals=17]=`BiggerEquals`,e[e.NullishCoalesce=18]=`NullishCoalesce`,e[e.Exponentiation=19]=`Exponentiation`,e[e.In=20]=`In`,e[e.InstanceOf=21]=`InstanceOf`,e[e.AdditionAssignment=22]=`AdditionAssignment`,e[e.SubtractionAssignment=23]=`SubtractionAssignment`,e[e.MultiplicationAssignment=24]=`MultiplicationAssignment`,e[e.DivisionAssignment=25]=`DivisionAssignment`,e[e.RemainderAssignment=26]=`RemainderAssignment`,e[e.ExponentiationAssignment=27]=`ExponentiationAssignment`,e[e.AndAssignment=28]=`AndAssignment`,e[e.OrAssignment=29]=`OrAssignment`,e[e.NullishCoalesceAssignment=30]=`NullishCoalesceAssignment`,e})(k||{});function $e(e,t){return e==null||t==null?e==t:e.isEquivalent(t)}function et(e,t,n){let r=e.length;if(r!==t.length)return!1;for(let i=0;ie.isEquivalent(t))}var nt=class{leadingComments;type;sourceSpan;constructor(e,t,n){this.leadingComments=n,this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new ft(this,e,null,t)}key(e,t,n){return new pt(this,e,t,n)}callFn(e,t,n,r){return new at(this,e,null,t,n,r)}instantiate(e,t,n,r){return new ot(this,e,t,n)}conditional(e,t=null,n,r){return new ut(this,e,t,null,n)}equals(e,t){return new dt(k.Equals,this,e,null,t)}notEquals(e,t){return new dt(k.NotEquals,this,e,null,t)}identical(e,t){return new dt(k.Identical,this,e,null,t)}notIdentical(e,t){return new dt(k.NotIdentical,this,e,null,t)}minus(e,t){return new dt(k.Minus,this,e,null,t)}plus(e,t){return new dt(k.Plus,this,e,null,t)}divide(e,t){return new dt(k.Divide,this,e,null,t)}multiply(e,t){return new dt(k.Multiply,this,e,null,t)}modulo(e,t){return new dt(k.Modulo,this,e,null,t)}power(e,t){return new dt(k.Exponentiation,this,e,null,t)}and(e,t){return new dt(k.And,this,e,null,t)}bitwiseOr(e,t){return new dt(k.BitwiseOr,this,e,null,t)}bitwiseAnd(e,t){return new dt(k.BitwiseAnd,this,e,null,t)}or(e,t){return new dt(k.Or,this,e,null,t)}lower(e,t){return new dt(k.Lower,this,e,null,t)}lowerEquals(e,t){return new dt(k.LowerEquals,this,e,null,t)}bigger(e,t){return new dt(k.Bigger,this,e,null,t)}biggerEquals(e,t){return new dt(k.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(vt,e)}nullishCoalesce(e,t){return new dt(k.NullishCoalesce,this,e,null,t)}toStmt(e){return new xt(this,null,e)}},rt=class e extends nt{name;constructor(e,t,n,r){super(t,n,r),this.name=e}isEquivalent(t){return t instanceof e&&this.name===t.name}isConstant(){return!1}visitExpression(e,t){return e.visitReadVarExpr(this,t)}clone(){return new e(this.name,this.type,this.sourceSpan)}set(e){return new dt(k.Assign,this,e,null,this.sourceSpan)}},it=class e extends nt{expr;constructor(e,t,n,r){super(t,n,r),this.expr=e}visitExpression(e,t){return e.visitTypeofExpr(this,t)}isEquivalent(t){return t instanceof e&&t.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new e(this.expr.clone())}},at=class e extends nt{fn;args;pure;isOptional;constructor(e,t,n,r,i=!1,a,o=!1){super(n,r,a),this.fn=e,this.args=t,this.pure=i,this.isOptional=o}get receiver(){return this.fn}isEquivalent(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&&tt(this.args,t.args)&&this.pure===t.pure}isConstant(){return!1}visitExpression(e,t){return e.visitInvokeFunctionExpr(this,t)}clone(){return new e(this.fn.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan,this.pure,[],this.isOptional)}},ot=class e extends nt{classExpr;args;constructor(e,t,n,r,i){super(n,r,i),this.classExpr=e,this.args=t}isEquivalent(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&&tt(this.args,t.args)}isConstant(){return!1}visitExpression(e,t){return e.visitInstantiateExpr(this,t)}clone(){return new e(this.classExpr.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan)}},st=class e extends nt{body;flags;constructor(e,t,n,r){super(null,n,r),this.body=e,this.flags=t}isEquivalent(t){return t instanceof e&&this.body===t.body&&this.flags===t.flags}isConstant(){return!0}visitExpression(e,t){return e.visitRegularExpressionLiteral(this,t)}clone(){return new e(this.body,this.flags,this.sourceSpan)}},ct=class e extends nt{value;constructor(e,t,n,r){super(t,n,r),this.value=e}isEquivalent(t){return t instanceof e&&this.value===t.value}isConstant(){return!0}visitExpression(e,t){return e.visitLiteralExpr(this,t)}clone(){return new e(this.value,this.type,this.sourceSpan)}},lt=class e extends nt{value;typeParams;constructor(e,t,n=null,r,i){super(t,r,i),this.value=e,this.typeParams=n}isEquivalent(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName}isConstant(){return!1}visitExpression(e,t){return e.visitExternalExpr(this,t)}clone(){return new e(this.value,this.type,this.typeParams,this.sourceSpan)}},ut=class e extends nt{condition;falseCase;trueCase;constructor(e,t,n=null,r,i,a){super(r||t.type,i,a),this.condition=e,this.falseCase=n,this.trueCase=t}isEquivalent(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&$e(this.falseCase,t.falseCase)}isConstant(){return!1}visitExpression(e,t){return e.visitConditionalExpr(this,t)}clone(){return new e(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}},dt=class e extends nt{operator;rhs;lhs;constructor(e,t,n,r,i,a){super(r||t.type,i,a),this.operator=e,this.rhs=n,this.lhs=t}isEquivalent(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)}isConstant(){return!1}visitExpression(e,t){return e.visitBinaryOperatorExpr(this,t)}clone(){return new e(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let e=this.operator;return e===k.Assign||e===k.AdditionAssignment||e===k.SubtractionAssignment||e===k.MultiplicationAssignment||e===k.DivisionAssignment||e===k.RemainderAssignment||e===k.ExponentiationAssignment||e===k.AndAssignment||e===k.OrAssignment||e===k.NullishCoalesceAssignment}},ft=class e extends nt{receiver;name;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.name=t,this.isOptional=a}get index(){return this.name}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadPropExpr(this,t)}set(e){return new dt(k.Assign,this.receiver.prop(this.name),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.name,this.type,this.sourceSpan,[],this.isOptional)}},pt=class e extends nt{receiver;index;isOptional;constructor(e,t,n,r,i,a=!1){super(n,r,i),this.receiver=e,this.index=t,this.isOptional=a}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.isOptional===t.isOptional}isConstant(){return!1}visitExpression(e,t){return e.visitReadKeyExpr(this,t)}set(e){return new dt(k.Assign,this.receiver.key(this.index),e,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan,[],this.isOptional)}},mt=class e extends nt{entries;constructor(e,t,n,r){super(t,n,r),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(t){return t instanceof e&&tt(this.entries,t.entries)}visitExpression(e,t){return e.visitLiteralArrayExpr(this,t)}clone(){return new e(this.entries.map(e=>e.clone()),this.type,this.sourceSpan)}},ht=class e{expression;constructor(e){this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}clone(){return new e(this.expression.clone())}isConstant(){return this.expression.isConstant()}},gt=class e extends nt{entries;valueType=null;constructor(e,t,n,r){super(t,n,r),this.entries=e,t&&(this.valueType=t.valueType)}isEquivalent(t){return t instanceof e&&tt(this.entries,t.entries)}isConstant(){return this.entries.every(e=>e.isConstant())}visitExpression(e,t){return e.visitLiteralMapExpr(this,t)}clone(){let t=this.entries.map(e=>e.clone());return new e(t,this.type,this.sourceSpan)}},_t=class e extends nt{expression;constructor(e,t,n){super(null,t,n),this.expression=e}isEquivalent(t){return t instanceof e&&this.expression.isEquivalent(t.expression)}isConstant(){return this.expression.isConstant()}visitExpression(e,t){return e.visitSpreadElementExpr(this,t)}clone(){return new e(this.expression.clone(),this.sourceSpan)}},vt=new ct(null,Qe,null),yt=(function(e){return e[e.None=0]=`None`,e[e.Final=1]=`Final`,e[e.Private=2]=`Private`,e[e.Exported=4]=`Exported`,e[e.Static=8]=`Static`,e})(yt||{}),bt=class{modifiers;sourceSpan;leadingComments;constructor(e=yt.None,t=null,n){this.modifiers=e,this.sourceSpan=t,this.leadingComments=n}hasModifier(e){return(this.modifiers&e)!==0}addLeadingComment(e){this.leadingComments=this.leadingComments??[],this.leadingComments.push(e)}},xt=class e extends bt{expr;constructor(e,t,n){super(yt.None,t,n),this.expr=e}isEquivalent(t){return t instanceof e&&this.expr.isEquivalent(t.expr)}visitStatement(e,t){return e.visitExpressionStmt(this,t)}};(class e{static INSTANCE=new e;keyOf(e){if(e instanceof ct&&typeof e.value==`string`)return`"${e.value}"`;if(e instanceof ct)return String(e.value);if(e instanceof st)return`/${e.body}/${e.flags??``}`;if(e instanceof mt){let t=[];for(let n of e.entries)t.push(this.keyOf(n));return`[${t.join(`,`)}]`}if(e instanceof gt){let t=[];for(let n of e.entries)if(n instanceof ht)t.push(`...`+this.keyOf(n.expression));else{let e=n.key;n.quoted&&(e=`"${e}"`),t.push(e+`:`+this.keyOf(n.value))}return`{${t.join(`,`)}}`}if(e instanceof lt)return`import("${e.value.moduleName}", ${e.value.name})`;if(e instanceof rt)return`read(${e.name})`;if(e instanceof it)return`typeof(${this.keyOf(e.expr)})`;if(e instanceof _t)return`...${this.keyOf(e.expression)}`;throw Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`)}});var A=`@angular/core`,j=(()=>{class e{static core={name:null,moduleName:A};static namespaceHTML={name:`ɵɵnamespaceHTML`,moduleName:A};static namespaceMathML={name:`ɵɵnamespaceMathML`,moduleName:A};static namespaceSVG={name:`ɵɵnamespaceSVG`,moduleName:A};static element={name:`ɵɵelement`,moduleName:A};static elementStart={name:`ɵɵelementStart`,moduleName:A};static elementEnd={name:`ɵɵelementEnd`,moduleName:A};static foreignComponent={name:`ɵɵforeignComponent`,moduleName:A};static foreignContent={name:`ɵɵforeignContent`,moduleName:A};static foreignContentFn={name:`ɵɵforeignContentFn`,moduleName:A};static domElement={name:`ɵɵdomElement`,moduleName:A};static domElementStart={name:`ɵɵdomElementStart`,moduleName:A};static domElementEnd={name:`ɵɵdomElementEnd`,moduleName:A};static domElementContainer={name:`ɵɵdomElementContainer`,moduleName:A};static domElementContainerStart={name:`ɵɵdomElementContainerStart`,moduleName:A};static domElementContainerEnd={name:`ɵɵdomElementContainerEnd`,moduleName:A};static domTemplate={name:`ɵɵdomTemplate`,moduleName:A};static domListener={name:`ɵɵdomListener`,moduleName:A};static advance={name:`ɵɵadvance`,moduleName:A};static syntheticHostProperty={name:`ɵɵsyntheticHostProperty`,moduleName:A};static syntheticHostListener={name:`ɵɵsyntheticHostListener`,moduleName:A};static attribute={name:`ɵɵattribute`,moduleName:A};static classProp={name:`ɵɵclassProp`,moduleName:A};static elementContainerStart={name:`ɵɵelementContainerStart`,moduleName:A};static elementContainerEnd={name:`ɵɵelementContainerEnd`,moduleName:A};static elementContainer={name:`ɵɵelementContainer`,moduleName:A};static styleMap={name:`ɵɵstyleMap`,moduleName:A};static classMap={name:`ɵɵclassMap`,moduleName:A};static styleProp={name:`ɵɵstyleProp`,moduleName:A};static interpolate={name:`ɵɵinterpolate`,moduleName:A};static interpolate1={name:`ɵɵinterpolate1`,moduleName:A};static interpolate2={name:`ɵɵinterpolate2`,moduleName:A};static interpolate3={name:`ɵɵinterpolate3`,moduleName:A};static interpolate4={name:`ɵɵinterpolate4`,moduleName:A};static interpolate5={name:`ɵɵinterpolate5`,moduleName:A};static interpolate6={name:`ɵɵinterpolate6`,moduleName:A};static interpolate7={name:`ɵɵinterpolate7`,moduleName:A};static interpolate8={name:`ɵɵinterpolate8`,moduleName:A};static interpolateV={name:`ɵɵinterpolateV`,moduleName:A};static nextContext={name:`ɵɵnextContext`,moduleName:A};static resetView={name:`ɵɵresetView`,moduleName:A};static templateCreate={name:`ɵɵtemplate`,moduleName:A};static defer={name:`ɵɵdefer`,moduleName:A};static deferWhen={name:`ɵɵdeferWhen`,moduleName:A};static deferOnIdle={name:`ɵɵdeferOnIdle`,moduleName:A};static deferOnImmediate={name:`ɵɵdeferOnImmediate`,moduleName:A};static deferOnTimer={name:`ɵɵdeferOnTimer`,moduleName:A};static deferOnHover={name:`ɵɵdeferOnHover`,moduleName:A};static deferOnInteraction={name:`ɵɵdeferOnInteraction`,moduleName:A};static deferOnViewport={name:`ɵɵdeferOnViewport`,moduleName:A};static deferPrefetchWhen={name:`ɵɵdeferPrefetchWhen`,moduleName:A};static deferPrefetchOnIdle={name:`ɵɵdeferPrefetchOnIdle`,moduleName:A};static deferPrefetchOnImmediate={name:`ɵɵdeferPrefetchOnImmediate`,moduleName:A};static deferPrefetchOnTimer={name:`ɵɵdeferPrefetchOnTimer`,moduleName:A};static deferPrefetchOnHover={name:`ɵɵdeferPrefetchOnHover`,moduleName:A};static deferPrefetchOnInteraction={name:`ɵɵdeferPrefetchOnInteraction`,moduleName:A};static deferPrefetchOnViewport={name:`ɵɵdeferPrefetchOnViewport`,moduleName:A};static deferHydrateWhen={name:`ɵɵdeferHydrateWhen`,moduleName:A};static deferHydrateNever={name:`ɵɵdeferHydrateNever`,moduleName:A};static deferHydrateOnIdle={name:`ɵɵdeferHydrateOnIdle`,moduleName:A};static deferHydrateOnImmediate={name:`ɵɵdeferHydrateOnImmediate`,moduleName:A};static deferHydrateOnTimer={name:`ɵɵdeferHydrateOnTimer`,moduleName:A};static deferHydrateOnHover={name:`ɵɵdeferHydrateOnHover`,moduleName:A};static deferHydrateOnInteraction={name:`ɵɵdeferHydrateOnInteraction`,moduleName:A};static deferHydrateOnViewport={name:`ɵɵdeferHydrateOnViewport`,moduleName:A};static deferEnableTimerScheduling={name:`ɵɵdeferEnableTimerScheduling`,moduleName:A};static enableIncrementalHydrationRuntime={name:`ɵɵenableIncrementalHydrationRuntime`,moduleName:A};static conditionalCreate={name:`ɵɵconditionalCreate`,moduleName:A};static conditionalBranchCreate={name:`ɵɵconditionalBranchCreate`,moduleName:A};static conditional={name:`ɵɵconditional`,moduleName:A};static repeater={name:`ɵɵrepeater`,moduleName:A};static repeaterCreate={name:`ɵɵrepeaterCreate`,moduleName:A};static repeaterTrackByIndex={name:`ɵɵrepeaterTrackByIndex`,moduleName:A};static repeaterTrackByIdentity={name:`ɵɵrepeaterTrackByIdentity`,moduleName:A};static componentInstance={name:`ɵɵcomponentInstance`,moduleName:A};static text={name:`ɵɵtext`,moduleName:A};static enableBindings={name:`ɵɵenableBindings`,moduleName:A};static disableBindings={name:`ɵɵdisableBindings`,moduleName:A};static getCurrentView={name:`ɵɵgetCurrentView`,moduleName:A};static textInterpolate={name:`ɵɵtextInterpolate`,moduleName:A};static textInterpolate1={name:`ɵɵtextInterpolate1`,moduleName:A};static textInterpolate2={name:`ɵɵtextInterpolate2`,moduleName:A};static textInterpolate3={name:`ɵɵtextInterpolate3`,moduleName:A};static textInterpolate4={name:`ɵɵtextInterpolate4`,moduleName:A};static textInterpolate5={name:`ɵɵtextInterpolate5`,moduleName:A};static textInterpolate6={name:`ɵɵtextInterpolate6`,moduleName:A};static textInterpolate7={name:`ɵɵtextInterpolate7`,moduleName:A};static textInterpolate8={name:`ɵɵtextInterpolate8`,moduleName:A};static textInterpolateV={name:`ɵɵtextInterpolateV`,moduleName:A};static restoreView={name:`ɵɵrestoreView`,moduleName:A};static pureFunction0={name:`ɵɵpureFunction0`,moduleName:A};static pureFunction1={name:`ɵɵpureFunction1`,moduleName:A};static pureFunction2={name:`ɵɵpureFunction2`,moduleName:A};static pureFunction3={name:`ɵɵpureFunction3`,moduleName:A};static pureFunction4={name:`ɵɵpureFunction4`,moduleName:A};static pureFunction5={name:`ɵɵpureFunction5`,moduleName:A};static pureFunction6={name:`ɵɵpureFunction6`,moduleName:A};static pureFunction7={name:`ɵɵpureFunction7`,moduleName:A};static pureFunction8={name:`ɵɵpureFunction8`,moduleName:A};static pureFunctionV={name:`ɵɵpureFunctionV`,moduleName:A};static pipeBind1={name:`ɵɵpipeBind1`,moduleName:A};static pipeBind2={name:`ɵɵpipeBind2`,moduleName:A};static pipeBind3={name:`ɵɵpipeBind3`,moduleName:A};static pipeBind4={name:`ɵɵpipeBind4`,moduleName:A};static pipeBindV={name:`ɵɵpipeBindV`,moduleName:A};static domProperty={name:`ɵɵdomProperty`,moduleName:A};static ariaProperty={name:`ɵɵariaProperty`,moduleName:A};static property={name:`ɵɵproperty`,moduleName:A};static control={name:`ɵɵcontrol`,moduleName:A};static controlCreate={name:`ɵɵcontrolCreate`,moduleName:A};static animationEnterListener={name:`ɵɵanimateEnterListener`,moduleName:A};static animationLeaveListener={name:`ɵɵanimateLeaveListener`,moduleName:A};static animationEnter={name:`ɵɵanimateEnter`,moduleName:A};static animationLeave={name:`ɵɵanimateLeave`,moduleName:A};static i18n={name:`ɵɵi18n`,moduleName:A};static i18nAttributes={name:`ɵɵi18nAttributes`,moduleName:A};static i18nExp={name:`ɵɵi18nExp`,moduleName:A};static i18nStart={name:`ɵɵi18nStart`,moduleName:A};static i18nEnd={name:`ɵɵi18nEnd`,moduleName:A};static i18nApply={name:`ɵɵi18nApply`,moduleName:A};static i18nPostprocess={name:`ɵɵi18nPostprocess`,moduleName:A};static pipe={name:`ɵɵpipe`,moduleName:A};static projection={name:`ɵɵprojection`,moduleName:A};static projectionDef={name:`ɵɵprojectionDef`,moduleName:A};static reference={name:`ɵɵreference`,moduleName:A};static inject={name:`ɵɵinject`,moduleName:A};static injectAttribute={name:`ɵɵinjectAttribute`,moduleName:A};static directiveInject={name:`ɵɵdirectiveInject`,moduleName:A};static invalidFactory={name:`ɵɵinvalidFactory`,moduleName:A};static invalidFactoryDep={name:`ɵɵinvalidFactoryDep`,moduleName:A};static templateRefExtractor={name:`ɵɵtemplateRefExtractor`,moduleName:A};static forwardRef={name:`forwardRef`,moduleName:A};static resolveForwardRef={name:`resolveForwardRef`,moduleName:A};static replaceMetadata={name:`ɵɵreplaceMetadata`,moduleName:A};static getReplaceMetadataURL={name:`ɵɵgetReplaceMetadataURL`,moduleName:A};static ɵɵdefineInjectable={name:`ɵɵdefineInjectable`,moduleName:A};static declareInjectable={name:`ɵɵngDeclareInjectable`,moduleName:A};static InjectableDeclaration={name:`ɵɵInjectableDeclaration`,moduleName:A};static defineService={name:`ɵɵdefineService`,moduleName:A};static declareService={name:`ɵɵngDeclareService`,moduleName:A};static resolveWindow={name:`ɵɵresolveWindow`,moduleName:A};static resolveDocument={name:`ɵɵresolveDocument`,moduleName:A};static resolveBody={name:`ɵɵresolveBody`,moduleName:A};static getComponentDepsFactory={name:`ɵɵgetComponentDepsFactory`,moduleName:A};static defineComponent={name:`ɵɵdefineComponent`,moduleName:A};static declareComponent={name:`ɵɵngDeclareComponent`,moduleName:A};static setComponentScope={name:`ɵɵsetComponentScope`,moduleName:A};static ChangeDetectionStrategy={name:`ChangeDetectionStrategy`,moduleName:A};static ViewEncapsulation={name:`ViewEncapsulation`,moduleName:A};static ComponentDeclaration={name:`ɵɵComponentDeclaration`,moduleName:A};static FactoryDeclaration={name:`ɵɵFactoryDeclaration`,moduleName:A};static declareFactory={name:`ɵɵngDeclareFactory`,moduleName:A};static FactoryTarget={name:`ɵɵFactoryTarget`,moduleName:A};static defineDirective={name:`ɵɵdefineDirective`,moduleName:A};static declareDirective={name:`ɵɵngDeclareDirective`,moduleName:A};static DirectiveDeclaration={name:`ɵɵDirectiveDeclaration`,moduleName:A};static InjectorDef={name:`ɵɵInjectorDef`,moduleName:A};static InjectorDeclaration={name:`ɵɵInjectorDeclaration`,moduleName:A};static defineInjector={name:`ɵɵdefineInjector`,moduleName:A};static declareInjector={name:`ɵɵngDeclareInjector`,moduleName:A};static NgModuleDeclaration={name:`ɵɵNgModuleDeclaration`,moduleName:A};static ModuleWithProviders={name:`ModuleWithProviders`,moduleName:A};static defineNgModule={name:`ɵɵdefineNgModule`,moduleName:A};static declareNgModule={name:`ɵɵngDeclareNgModule`,moduleName:A};static setNgModuleScope={name:`ɵɵsetNgModuleScope`,moduleName:A};static registerNgModuleType={name:`ɵɵregisterNgModuleType`,moduleName:A};static PipeDeclaration={name:`ɵɵPipeDeclaration`,moduleName:A};static definePipe={name:`ɵɵdefinePipe`,moduleName:A};static declarePipe={name:`ɵɵngDeclarePipe`,moduleName:A};static declareClassMetadata={name:`ɵɵngDeclareClassMetadata`,moduleName:A};static declareClassMetadataAsync={name:`ɵɵngDeclareClassMetadataAsync`,moduleName:A};static setClassMetadata={name:`ɵsetClassMetadata`,moduleName:A};static setClassMetadataAsync={name:`ɵsetClassMetadataAsync`,moduleName:A};static setClassDebugInfo={name:`ɵsetClassDebugInfo`,moduleName:A};static queryRefresh={name:`ɵɵqueryRefresh`,moduleName:A};static viewQuery={name:`ɵɵviewQuery`,moduleName:A};static loadQuery={name:`ɵɵloadQuery`,moduleName:A};static contentQuery={name:`ɵɵcontentQuery`,moduleName:A};static viewQuerySignal={name:`ɵɵviewQuerySignal`,moduleName:A};static contentQuerySignal={name:`ɵɵcontentQuerySignal`,moduleName:A};static queryAdvance={name:`ɵɵqueryAdvance`,moduleName:A};static twoWayProperty={name:`ɵɵtwoWayProperty`,moduleName:A};static twoWayBindingSet={name:`ɵɵtwoWayBindingSet`,moduleName:A};static twoWayListener={name:`ɵɵtwoWayListener`,moduleName:A};static declareLet={name:`ɵɵdeclareLet`,moduleName:A};static storeLet={name:`ɵɵstoreLet`,moduleName:A};static readContextLet={name:`ɵɵreadContextLet`,moduleName:A};static arrowFunction={name:`ɵɵarrowFunction`,moduleName:A};static attachSourceLocations={name:`ɵɵattachSourceLocations`,moduleName:A};static NgOnChangesFeature={name:`ɵɵNgOnChangesFeature`,moduleName:A};static ControlFeature={name:`ɵɵControlFeature`,moduleName:A};static InheritDefinitionFeature={name:`ɵɵInheritDefinitionFeature`,moduleName:A};static ProvidersFeature={name:`ɵɵProvidersFeature`,moduleName:A};static HostDirectivesFeature={name:`ɵɵHostDirectivesFeature`,moduleName:A};static ExternalStylesFeature={name:`ɵɵExternalStylesFeature`,moduleName:A};static listener={name:`ɵɵlistener`,moduleName:A};static getInheritedFactory={name:`ɵɵgetInheritedFactory`,moduleName:A};static sanitizeHtml={name:`ɵɵsanitizeHtml`,moduleName:A};static sanitizeStyle={name:`ɵɵsanitizeStyle`,moduleName:A};static validateAttribute={name:`ɵɵvalidateAttribute`,moduleName:A};static sanitizeResourceUrl={name:`ɵɵsanitizeResourceUrl`,moduleName:A};static sanitizeScript={name:`ɵɵsanitizeScript`,moduleName:A};static sanitizeUrl={name:`ɵɵsanitizeUrl`,moduleName:A};static sanitizeUrlOrResourceUrl={name:`ɵɵsanitizeUrlOrResourceUrl`,moduleName:A};static trustConstantHtml={name:`ɵɵtrustConstantHtml`,moduleName:A};static trustConstantResourceUrl={name:`ɵɵtrustConstantResourceUrl`,moduleName:A};static inputDecorator={name:`Input`,moduleName:A};static outputDecorator={name:`Output`,moduleName:A};static viewChildDecorator={name:`ViewChild`,moduleName:A};static viewChildrenDecorator={name:`ViewChildren`,moduleName:A};static contentChildDecorator={name:`ContentChild`,moduleName:A};static contentChildrenDecorator={name:`ContentChildren`,moduleName:A};static InputSignalBrandWriteType={name:`ɵINPUT_SIGNAL_BRAND_WRITE_TYPE`,moduleName:A};static UnwrapDirectiveSignalInputs={name:`ɵUnwrapDirectiveSignalInputs`,moduleName:A};static unwrapWritableSignal={name:`ɵunwrapWritableSignal`,moduleName:A};static assertType={name:`ɵassertType`,moduleName:A}}return e})();k.And,k.Bigger,k.BiggerEquals,k.BitwiseOr,k.BitwiseAnd,k.Divide,k.Assign,k.Equals,k.Identical,k.Lower,k.LowerEquals,k.Minus,k.Modulo,k.Exponentiation,k.Multiply,k.NotEquals,k.NotIdentical,k.NullishCoalesce,k.Or,k.Plus,k.In,k.InstanceOf,k.AdditionAssignment,k.SubtractionAssignment,k.MultiplicationAssignment,k.DivisionAssignment,k.RemainderAssignment,k.ExponentiationAssignment,k.AndAssignment,k.OrAssignment,k.NullishCoalesceAssignment;var St=class{span;sourceSpan;constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return`AST`}},Ct=class extends St{receiver;args;argumentSpan;constructor(e,t,n,r,i){super(e,t),this.receiver=n,this.args=r,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},wt=(function(e){return e[e.Property=0]=`Property`,e[e.Attribute=1]=`Attribute`,e[e.Class=2]=`Class`,e[e.Style=3]=`Style`,e[e.LegacyAnimation=4]=`LegacyAnimation`,e[e.TwoWay=5]=`TwoWay`,e[e.Animation=6]=`Animation`,e})(wt||{}),Tt=`(:(where|is)\\()?`,Et=`-shadowcsshost`,Dt=`-shadowcsscontext`,Ot=`[^)(]*`,kt=String.raw`(?:\(${Ot}\)|${Ot})+?`,At=String.raw`(?:\(${kt}\)|${Ot})+?`,jt=String.raw`(?:\((${At})\))`;String.raw`(:nth-[-\w]+)`+jt,Et+jt+``,`${Tt}`,Dt+jt+``;var M=(function(e){return e[e.ListEnd=0]=`ListEnd`,e[e.Statement=1]=`Statement`,e[e.Variable=2]=`Variable`,e[e.ElementStart=3]=`ElementStart`,e[e.Element=4]=`Element`,e[e.ForeignComponent=5]=`ForeignComponent`,e[e.Template=6]=`Template`,e[e.ElementEnd=7]=`ElementEnd`,e[e.ContainerStart=8]=`ContainerStart`,e[e.Container=9]=`Container`,e[e.ContainerEnd=10]=`ContainerEnd`,e[e.DisableBindings=11]=`DisableBindings`,e[e.ConditionalCreate=12]=`ConditionalCreate`,e[e.ConditionalBranchCreate=13]=`ConditionalBranchCreate`,e[e.Conditional=14]=`Conditional`,e[e.EnableBindings=15]=`EnableBindings`,e[e.Text=16]=`Text`,e[e.Listener=17]=`Listener`,e[e.InterpolateText=18]=`InterpolateText`,e[e.Binding=19]=`Binding`,e[e.Property=20]=`Property`,e[e.StyleProp=21]=`StyleProp`,e[e.ClassProp=22]=`ClassProp`,e[e.StyleMap=23]=`StyleMap`,e[e.ClassMap=24]=`ClassMap`,e[e.Advance=25]=`Advance`,e[e.Pipe=26]=`Pipe`,e[e.Attribute=27]=`Attribute`,e[e.ExtractedAttribute=28]=`ExtractedAttribute`,e[e.Defer=29]=`Defer`,e[e.DeferOn=30]=`DeferOn`,e[e.DeferWhen=31]=`DeferWhen`,e[e.I18nMessage=32]=`I18nMessage`,e[e.DomProperty=33]=`DomProperty`,e[e.Namespace=34]=`Namespace`,e[e.ProjectionDef=35]=`ProjectionDef`,e[e.EnableIncrementalHydrationRuntime=36]=`EnableIncrementalHydrationRuntime`,e[e.Projection=37]=`Projection`,e[e.Content=38]=`Content`,e[e.RepeaterCreate=39]=`RepeaterCreate`,e[e.Repeater=40]=`Repeater`,e[e.TwoWayProperty=41]=`TwoWayProperty`,e[e.TwoWayListener=42]=`TwoWayListener`,e[e.DeclareLet=43]=`DeclareLet`,e[e.StoreLet=44]=`StoreLet`,e[e.I18nStart=45]=`I18nStart`,e[e.I18n=46]=`I18n`,e[e.I18nEnd=47]=`I18nEnd`,e[e.I18nExpression=48]=`I18nExpression`,e[e.I18nApply=49]=`I18nApply`,e[e.IcuStart=50]=`IcuStart`,e[e.IcuEnd=51]=`IcuEnd`,e[e.IcuPlaceholder=52]=`IcuPlaceholder`,e[e.I18nContext=53]=`I18nContext`,e[e.I18nAttributes=54]=`I18nAttributes`,e[e.SourceLocation=55]=`SourceLocation`,e[e.Animation=56]=`Animation`,e[e.AnimationString=57]=`AnimationString`,e[e.AnimationBinding=58]=`AnimationBinding`,e[e.AnimationListener=59]=`AnimationListener`,e[e.Control=60]=`Control`,e[e.ControlCreate=61]=`ControlCreate`,e})(M||{}),Mt=(function(e){return e[e.LexicalRead=0]=`LexicalRead`,e[e.Context=1]=`Context`,e[e.TrackContext=2]=`TrackContext`,e[e.ReadVariable=3]=`ReadVariable`,e[e.NextContext=4]=`NextContext`,e[e.Reference=5]=`Reference`,e[e.StoreLet=6]=`StoreLet`,e[e.ContextLetReference=7]=`ContextLetReference`,e[e.GetCurrentView=8]=`GetCurrentView`,e[e.RestoreView=9]=`RestoreView`,e[e.ResetView=10]=`ResetView`,e[e.PureFunctionExpr=11]=`PureFunctionExpr`,e[e.PureFunctionParameterExpr=12]=`PureFunctionParameterExpr`,e[e.PipeBinding=13]=`PipeBinding`,e[e.PipeBindingVariadic=14]=`PipeBindingVariadic`,e[e.SafePropertyRead=15]=`SafePropertyRead`,e[e.SafeKeyedRead=16]=`SafeKeyedRead`,e[e.SafeNavigationMigration=17]=`SafeNavigationMigration`,e[e.SafeTernaryExpr=18]=`SafeTernaryExpr`,e[e.EmptyExpr=19]=`EmptyExpr`,e[e.AssignTemporaryExpr=20]=`AssignTemporaryExpr`,e[e.ReadTemporaryExpr=21]=`ReadTemporaryExpr`,e[e.SlotLiteralExpr=22]=`SlotLiteralExpr`,e[e.ConditionalCase=23]=`ConditionalCase`,e[e.ConstCollected=24]=`ConstCollected`,e[e.TwoWayBindingSet=25]=`TwoWayBindingSet`,e[e.ForeignContent=26]=`ForeignContent`,e[e.ArrowFunction=27]=`ArrowFunction`,e})(Mt||{}),Nt=(function(e){return e[e.None=0]=`None`,e[e.AlwaysInline=1]=`AlwaysInline`,e})(Nt||{}),Pt=(function(e){return e[e.Context=0]=`Context`,e[e.Identifier=1]=`Identifier`,e[e.SavedView=2]=`SavedView`,e[e.Alias=3]=`Alias`,e})(Pt||{}),Ft=(function(e){return e[e.Attribute=0]=`Attribute`,e[e.ClassName=1]=`ClassName`,e[e.StyleProperty=2]=`StyleProperty`,e[e.Property=3]=`Property`,e[e.Template=4]=`Template`,e[e.I18n=5]=`I18n`,e[e.LegacyAnimation=6]=`LegacyAnimation`,e[e.TwoWayProperty=7]=`TwoWayProperty`,e[e.Animation=8]=`Animation`,e})(Ft||{}),It=(function(e){return e[e.Creation=0]=`Creation`,e[e.Postproccessing=1]=`Postproccessing`,e})(It||{}),Lt=(function(e){return e[e.I18nText=0]=`I18nText`,e[e.I18nAttribute=1]=`I18nAttribute`,e})(Lt||{}),Rt=(function(e){return e[e.None=0]=`None`,e[e.ElementTag=1]=`ElementTag`,e[e.TemplateTag=2]=`TemplateTag`,e[e.OpenTag=4]=`OpenTag`,e[e.CloseTag=8]=`CloseTag`,e[e.ExpressionIndex=16]=`ExpressionIndex`,e})(Rt||{}),zt=(function(e){return e[e.HTML=0]=`HTML`,e[e.SVG=1]=`SVG`,e[e.Math=2]=`Math`,e})(zt||{}),Bt=(function(e){return e[e.Idle=0]=`Idle`,e[e.Immediate=1]=`Immediate`,e[e.Timer=2]=`Timer`,e[e.Hover=3]=`Hover`,e[e.Interaction=4]=`Interaction`,e[e.Viewport=5]=`Viewport`,e[e.Never=6]=`Never`,e})(Bt||{}),Vt=(function(e){return e[e.RootI18n=0]=`RootI18n`,e[e.Icu=1]=`Icu`,e[e.Attr=2]=`Attr`,e})(Vt||{}),Ht=(function(e){return e[e.NgTemplate=0]=`NgTemplate`,e[e.Structural=1]=`Structural`,e[e.Block=2]=`Block`,e})(Ht||{}),Ut=(function(e){return e[e.None=0]=`None`,e[e.InChildOperation=1]=`InChildOperation`,e[e.InArrowFunctionOperation=2]=`InArrowFunctionOperation`,e[e.InSafeNavigationMigration=4]=`InSafeNavigationMigration`,e})(Ut||{});M.Element,M.ElementStart,M.Container,M.ContainerStart,M.Template,M.RepeaterCreate,M.ConditionalCreate,M.ConditionalBranchCreate;var N=(function(e){return e[e.Tmpl=0]=`Tmpl`,e[e.Host=1]=`Host`,e[e.Both=2]=`Both`,e})(N||{}),Wt=(function(e){return e[e.Full=0]=`Full`,e[e.DomOnly=1]=`DomOnly`,e})(Wt||{});j.ariaProperty,j.ariaProperty,j.attribute,j.attribute,j.classProp,j.classProp,j.element,j.element,j.elementContainer,j.elementContainer,j.elementContainerEnd,j.elementContainerEnd,j.elementContainerStart,j.elementContainerStart,j.elementEnd,j.elementEnd,j.elementStart,j.elementStart,j.domProperty,j.domProperty,j.i18nExp,j.i18nExp,j.listener,j.listener,j.listener,j.listener,j.property,j.property,j.styleProp,j.styleProp,j.syntheticHostListener,j.syntheticHostListener,j.syntheticHostProperty,j.syntheticHostProperty,j.templateCreate,j.templateCreate,j.twoWayProperty,j.twoWayProperty,j.twoWayListener,j.twoWayListener,j.declareLet,j.declareLet,j.conditionalCreate,j.conditionalBranchCreate,j.conditionalBranchCreate,j.conditionalBranchCreate,j.domElement,j.domElement,j.domElementStart,j.domElementStart,j.domElementEnd,j.domElementEnd,j.domElementContainer,j.domElementContainer,j.domElementContainerStart,j.domElementContainerStart,j.domElementContainerEnd,j.domElementContainerEnd,j.domListener,j.domListener,j.domTemplate,j.domTemplate,j.animationEnter,j.animationEnter,j.animationLeave,j.animationLeave,j.animationEnterListener,j.animationEnterListener,j.animationLeaveListener,j.animationLeaveListener,k.And,k.Bigger,k.BiggerEquals,k.BitwiseOr,k.BitwiseAnd,k.Divide,k.Assign,k.Equals,k.Identical,k.Lower,k.LowerEquals,k.Minus,k.Modulo,k.Exponentiation,k.Multiply,k.NotEquals,k.NotIdentical,k.NullishCoalesce,k.Or,k.Plus,k.In,k.InstanceOf,k.AdditionAssignment,k.SubtractionAssignment,k.MultiplicationAssignment,k.DivisionAssignment,k.RemainderAssignment,k.ExponentiationAssignment,k.AndAssignment,k.OrAssignment,k.NullishCoalesceAssignment,M.Property,M.Property,M.Property,M.Attribute,M.Attribute,M.Property,M.TwoWayProperty,M.Container,M.ContainerStart,M.ContainerEnd,M.Element,M.ElementStart,M.ElementEnd,M.Template,M.ElementEnd,M.ElementStart,M.Element,M.ContainerEnd,M.ContainerStart,M.Container,M.I18nEnd,M.I18nStart,M.I18n,M.Pipe;var Gt=` \f +\r \v ᠎ - \u2028\u2029   `;`${Gt}`,`${Gt}`;var Kt=(function(e){return e[e.Character=0]=`Character`,e[e.Identifier=1]=`Identifier`,e[e.PrivateIdentifier=2]=`PrivateIdentifier`,e[e.Keyword=3]=`Keyword`,e[e.String=4]=`String`,e[e.Operator=5]=`Operator`,e[e.Number=6]=`Number`,e[e.RegExpBody=7]=`RegExpBody`,e[e.RegExpFlags=8]=`RegExpFlags`,e[e.Error=9]=`Error`,e})(Kt||{}),qt=(function(e){return e[e.Plain=0]=`Plain`,e[e.TemplateLiteralPart=1]=`TemplateLiteralPart`,e[e.TemplateLiteralEnd=2]=`TemplateLiteralEnd`,e})(qt||{});Kt.Character,M.StyleMap,M.ClassMap,M.StyleProp,M.ClassProp,M.Attribute,M.Property,M.Attribute,M.Control,M.DomProperty,M.DomProperty,M.Attribute,M.StyleMap,M.ClassMap,M.StyleProp,M.ClassProp,M.Listener,M.TwoWayListener,M.AnimationListener,M.StyleMap,M.ClassMap,M.StyleProp,M.ClassProp,M.Property,M.TwoWayProperty,M.DomProperty,M.Attribute,M.Animation,M.Control,Bt.Idle,j.deferOnIdle,j.deferPrefetchOnIdle,j.deferHydrateOnIdle,Bt.Immediate,j.deferOnImmediate,j.deferPrefetchOnImmediate,j.deferHydrateOnImmediate,Bt.Timer,j.deferOnTimer,j.deferPrefetchOnTimer,j.deferHydrateOnTimer,Bt.Hover,j.deferOnHover,j.deferPrefetchOnHover,j.deferHydrateOnHover,Bt.Interaction,j.deferOnInteraction,j.deferPrefetchOnInteraction,j.deferHydrateOnInteraction,Bt.Viewport,j.deferOnViewport,j.deferPrefetchOnViewport,j.deferHydrateOnViewport,Bt.Never,j.deferHydrateNever,j.deferHydrateNever,j.deferHydrateNever,j.pipeBind1,j.pipeBind2,j.pipeBind3,j.pipeBind4,j.textInterpolate,j.textInterpolate1,j.textInterpolate2,j.textInterpolate3,j.textInterpolate4,j.textInterpolate5,j.textInterpolate6,j.textInterpolate7,j.textInterpolate8,j.textInterpolateV,j.interpolate,j.interpolate1,j.interpolate2,j.interpolate3,j.interpolate4,j.interpolate5,j.interpolate6,j.interpolate7,j.interpolate8,j.interpolateV,j.pureFunction0,j.pureFunction1,j.pureFunction2,j.pureFunction3,j.pureFunction4,j.pureFunction5,j.pureFunction6,j.pureFunction7,j.pureFunction8,j.pureFunctionV,j.resolveWindow,j.resolveDocument,j.resolveBody,qe.HTML,j.sanitizeHtml,qe.RESOURCE_URL,j.sanitizeResourceUrl,qe.SCRIPT,j.sanitizeScript,qe.STYLE,j.sanitizeStyle,qe.URL,j.sanitizeUrl,qe.ATTRIBUTE_NO_BINDING,j.validateAttribute,qe.HTML,j.trustConstantHtml,qe.RESOURCE_URL,j.trustConstantResourceUrl;var Jt=(function(e){return e[e.None=0]=`None`,e[e.ViewContextRead=1]=`ViewContextRead`,e[e.ViewContextWrite=2]=`ViewContextWrite`,e[e.SideEffectful=4]=`SideEffectful`,e})(Jt||{});N.Tmpl,N.Tmpl,N.Both,N.Host,N.Tmpl,N.Tmpl,N.Tmpl,N.Both,N.Both,N.Both,N.Tmpl,N.Both,N.Both,N.Tmpl,N.Both,N.Tmpl,N.Both,N.Both,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Both,N.Both,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Both,N.Both,N.Both,N.Tmpl,N.Tmpl,N.Both,N.Tmpl,N.Tmpl,N.Tmpl,N.Both,N.Both,N.Tmpl,N.Both,N.Both,N.Both,N.Both,N.Both,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Both,N.Tmpl,N.Both,N.Tmpl,N.Both,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Tmpl,N.Both,N.Both,N.Both,wt.Property,Ft.Property,wt.TwoWay,Ft.TwoWayProperty,wt.Attribute,Ft.Attribute,wt.Class,Ft.ClassName,wt.Style,Ft.StyleProperty,wt.LegacyAnimation,Ft.LegacyAnimation,wt.Animation,Ft.Animation;var Yt=`%COMP%`;`${Yt}`,`${Yt}`,class e{static SINGLETON=new e;static veWillInferAnyFor(t){let n=e.SINGLETON;return t instanceof Ct?t.visit(n):t.receiver.visit(n)}visitUnary(e){return e.expr.visit(this)}visitBinary(e){return e.left.visit(this)||e.right.visit(this)}visitChain(){return!1}visitConditional(e){return e.condition.visit(this)||e.trueExp.visit(this)||e.falseExp.visit(this)}visitCall(){return!0}visitSafeCall(){return!1}visitImplicitReceiver(){return!1}visitThisReceiver(){return!1}visitInterpolation(e){return e.expressions.some(e=>e.visit(this))}visitKeyedRead(){return!1}visitLiteralArray(){return!0}visitLiteralMap(){return!0}visitLiteralPrimitive(){return!1}visitPipe(){return!0}visitPrefixNot(e){return e.expression.visit(this)}visitTypeofExpression(e){return e.expression.visit(this)}visitVoidExpression(e){return e.expression.visit(this)}visitNonNullAssert(e){return e.expression.visit(this)}visitPropertyRead(){return!1}visitSafePropertyRead(){return!1}visitSafeKeyedRead(){return!1}visitTemplateLiteral(){return!1}visitTemplateLiteralElement(){return!1}visitTaggedTemplateLiteral(){return!1}visitParenthesizedExpression(e){return e.expression.visit(this)}visitRegularExpressionLiteral(){return!1}visitSpreadElement(e){return e.expression.visit(this)}visitArrowFunction(e,t){return!1}};var Xt=null,Zt=!1,Qt=1,$t=null,en=Symbol(`SIGNAL`);function P(e){let t=Xt;return Xt=e,t}function tn(){return Xt}var nn={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:`unknown`,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function rn(e){if(Zt)throw Error(``);if(Xt===null)return;Xt.consumerOnSignalRead(e);let t=Xt.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Xt.recomputing;if(r&&(n=t===void 0?Xt.producers:t.nextProducer,n!==void 0&&n.producer===e)){Xt.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Qt;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===Xt&&(!r||i.knownValidAtEpoch===Qt))return;let a=yn(Xt),o={producer:e,consumer:Xt,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Qt,lastReadVersion:e.version,nextConsumer:void 0};Xt.producersTail=o,t===void 0?Xt.producers=o:t.nextProducer=o,a&&_n(e,o)}function an(){Qt++}function on(e){if((!yn(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==Qt)){if(!e.producerMustRecompute(e)&&!hn(e)){un(e);return}e.producerRecomputeValue(e),un(e)}}function sn(e){if(e.consumers===void 0)return;let t=Zt;Zt=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let e=t.consumer;e.dirty||ln(e)}}finally{Zt=t}}function cn(){return Xt?.consumerAllowSignalWrites!==!1}function ln(e){e.dirty=!0,sn(e),e.consumerMarkedDirty?.(e)}function un(e){e.dirty=!1,e.lastCleanEpoch=Qt}function dn(e){return e&&fn(e),P(e)}function fn(e){if(e.producersTail?.knownValidAtEpoch===Qt){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function pn(e,t){P(t),e&&mn(e)}function mn(e){e.recomputing=!1;let t=e.producersTail,n=t===void 0?e.producers:t.nextProducer;if(n!==void 0){if(yn(e))do n=vn(n);while(n!==void 0);t===void 0?e.producers=void 0:t.nextProducer=void 0}}function hn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let e=t.producer,n=t.lastReadVersion;if(n!==e.version||(on(e),n!==e.version))return!0}return!1}function gn(e){if(yn(e)){let t=e.producers;for(;t!==void 0;)t=vn(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function _n(e,t){let n=e.consumersTail,r=yn(e);if(n===void 0?(t.nextConsumer=void 0,e.consumers=t):(t.nextConsumer=n.nextConsumer,n.nextConsumer=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let t=e.producers;t!==void 0;t=t.nextProducer)_n(t.producer,t)}function vn(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,i=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r===void 0?t.consumersTail=i:r.prevConsumer=i,i!==void 0)i.nextConsumer=r;else if(t.consumers=r,!yn(t)){let e=t.producers;for(;e!==void 0;)e=vn(e)}return n}function yn(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function bn(e){$t?.(e)}function xn(e,t){return Object.is(e,t)}function Sn(e,t){let n=Object.create(En);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(on(n),rn(n),n.value===Tn)throw n.error;return n.value};return r[en]=n,bn(n),r}var Cn=Symbol(`UNSET`),wn=Symbol(`COMPUTING`),Tn=Symbol(`ERRORED`),En={...nn,value:Cn,dirty:!0,error:null,equal:xn,kind:`computed`,producerMustRecompute(e){return e.value===Cn||e.value===wn},producerRecomputeValue(e){if(e.value===wn)throw Error(``);let t=e.value;e.value=wn;let n=dn(e),r,i=!1;try{r=e.computation(),P(null),i=t!==Cn&&t!==Tn&&r!==Tn&&e.equal(t,r)}catch(t){r=Tn,e.error=t}finally{pn(e,n)}if(i){e.value=t;return}e.value=r,e.version++}};function Dn(){throw Error()}var On=Dn;function kn(e){On(e)}function An(e){On=e}var jn=null;function Mn(e,t){let n=Object.create(In);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Nn(n);return r[en]=n,bn(n),[r,e=>Pn(n,e),e=>Fn(n,e)]}function Nn(e){return rn(e),e.value}function Pn(e,t){cn()||kn(e),e.equal(e.value,t)||(e.value=t,Ln(e))}function Fn(e,t){cn()||kn(e),Pn(e,t(e.value))}var In={...nn,equal:xn,value:void 0,kind:`signal`};function Ln(e){e.version++,an(),sn(e),jn?.(e)}var Rn={...nn,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:`effect`};function zn(e){if(e.dirty=!1,e.version>0&&!hn(e))return;e.version++;let t=dn(e);try{e.cleanup(),e.fn()}finally{pn(e,t)}}var Bn=void 0;function Vn(){return Bn}function Hn(e){let t=Bn;return Bn=e,t}var Un=Symbol(`NotFound`);function Wn(e){return e===Un||e?.name===`ɵNotFound`}var Gn=function(e,t){return Gn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Gn(e,t)};function Kn(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Gn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function qn(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function Jn(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Yn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r0},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?tr:(this.currentObservers=null,a.push(e),new er(function(){t.currentObservers=null,$n(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 Dr;return e.source=this,e},t.create=function(e,t){return new Lr(e,t)},t}(Dr),Lr=function(e){Kn(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??tr},t}(Ir),Rr=function(e){Kn(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Ir);function zr(e,t){return Mr(function(n,r){var i=0;n.subscribe(Nr(r,function(n){r.next(e.call(t,n,i++))}))})}var Br=`https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss`,F=class extends Error{code;constructor(e,t){super(Hr(e,t)),this.code=e}};function Vr(e){return`NG0${Math.abs(e)}`}function Hr(e,t){return`${Vr(e)}${t?`: `+t:``}`}function I(e){for(let t in e)if(e[t]===I)return t;throw Error(``)}function Ur(e){if(typeof e==`string`)return e;if(Array.isArray(e))return`[${e.map(Ur).join(`, `)}]`;if(e==null)return``+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return``+n;let r=n.indexOf(` +`);return r>=0?n.slice(0,r):n}function Wr(e,t){return e?t?`${e} ${t}`:e:t||``}var Gr=I({__forward_ref__:I});function Kr(e){return e.__forward_ref__=Kr,e}function qr(e){return Jr(e)?e():e}function Jr(e){return typeof e==`function`&&Object.hasOwn(e,Gr)&&e.__forward_ref__===Kr}function Yr(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Xr(e){return Zr(e,ei)}function Zr(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Qr(e){return(e?.[ei]??null)||null}function $r(e){return e&&Object.hasOwn(e,ti)?e[ti]:null}var ei=I({ɵprov:I}),ti=I({ɵinj:I}),L=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=Yr({token:this,providedIn:t.providedIn||`root`,factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function ni(e){return e&&!!e.ɵproviders}var ri=I({ɵcmp:I}),ii=I({ɵdir:I}),ai=I({ɵpipe:I}),oi=I({ɵfac:I}),si=I({__NG_ELEMENT_ID__:I}),ci=I({__NG_ENV_ID__:I});function li(e){return fi(e,`@Component`),e[ri]||null}function ui(e){return fi(e,`@Directive`),e[ii]||null}function di(e){return fi(e,`@Pipe`),e[ai]||null}function fi(e,t){if(e==null)throw new F(-919,!1)}function pi(e){return typeof e==`string`?e:e==null?``:String(e)}var mi=I({ngErrorCode:I}),hi=I({ngErrorMessage:I}),gi=I({ngTokenPath:I});function _i(e,t){return yi(``,-200,t)}function vi(e,t){throw new F(-201,!1)}function yi(e,t,n){let r=new F(t,e);return r[mi]=t,r[hi]=e,n&&(r[gi]=n),r}function bi(e){return e[mi]}var xi;function Si(){return xi}function Ci(e){let t=xi;return xi=e,t}function wi(e,t,n){let r=Xr(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;vi(e,``)}var Ti={},Ei=`__NG_DI_FLAG__`,Di=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=ki(t)||0;try{return this.injector.get(e,n&8?null:Ti,n)}catch(e){if(Wn(e))return e;throw e}}};function Oi(e,t=0){let n=Vn();if(n===void 0)throw new F(-203,!1);if(n===null)return wi(e,void 0,t);{let r=Ai(t),i=n.retrieve(e,r);if(Wn(i)){if(r.optional)return null;throw i}return i}}function R(e,t=0){return(Si()||Oi)(qr(e),t)}function z(e,t){return R(e,ki(t))}function ki(e){return e===void 0||typeof e==`number`?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Ai(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function ji(e){let t=[];for(let n=0;nArray.isArray(e)?Pi(e,t):t(e))}function Fi(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Ii(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Li(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(i===1)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;){let t=i-2;e[i]=e[t],i--}e[t]=n,e[t+1]=r}}function Ri(e,t,n){let r=Bi(e,t);return r>=0?e[r|1]=n:(r=~r,Li(e,r,t,n)),r}function zi(e,t){let n=Bi(e,t);if(n>=0)return e[n|1]}function Bi(e,t){return Vi(e,t,1)}function Vi(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 Pi(t,e=>{let t=e;Zi(t,a,[],r)&&(i||=[],i.push(t))}),i!==void 0&&Xi(i,a),n}function Xi(e,t){for(let n=0;n{t(e,r)})}}function Zi(e,t,n,r){if(e=qr(e),!e)return!1;let i=null,a=$r(e),o=!a&&li(e);if(!a&&!o){let t=e.ngModule;if(a=$r(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)Zi(i,t,n,r)}}else if(a){if(a.imports!=null&&!s){r.add(i);let e;try{Pi(a.imports,i=>{Zi(i,t,n,r)&&(e||=[],e.push(i))})}finally{}e!==void 0&&Xi(e,t)}if(!s){let e=Ni(i)||(()=>new i);t({provide:i,useFactory:e,deps:Ui},i),t({provide:Ki,useValue:i,multi:!0},i),t({provide:Wi,useValue:()=>R(i),multi:!0},i)}let o=a.providers;if(o!=null&&!s){let n=e;Qi(o,e=>{t(e,n)})}}else return!1;return i!==e&&e.providers!==void 0}function Qi(e,t){for(let n of e)ni(n)&&(n=n.ɵproviders),Array.isArray(n)?Qi(n,t):t(n)}var $i=I({provide:String,useValue:I});function ea(e){return typeof e==`object`&&!!e&&$i in e}function ta(e){return!!(e&&e.useExisting)}function na(e){return!!(e&&e.useFactory)}function ra(e){return typeof e==`function`}var ia=new L(``),aa={},oa={},sa=void 0;function ca(){return sa===void 0&&(sa=new qi),sa}var la=class{},ua=class extends la{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,ba(e,e=>this.processProvider(e)),this.records.set(Gi,ga(void 0,this)),r.has(`environment`)&&this.records.set(la,ga(void 0,this));let i=this.records.get(ia);i!=null&&typeof i.value==`string`&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Ki,Ui,{self:!0}))}retrieve(e,t){let n=ki(t)||0;try{return this.get(e,Ti,n)}catch(e){if(Wn(e))return e;throw e}}destroy(){ha(this),this._destroyed=!0;let e=P(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(),P(e)}}onDestroy(e){return ha(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){ha(this);let t=Hn(this),n=Ci(void 0);try{return e()}finally{Hn(t),Ci(n)}}get(e,t=Ti,n){if(ha(this),Object.hasOwn(e,ci))return e[ci](this);let r=ki(n),i=Hn(this),a=Ci(void 0);try{if(!(r&4)){let t=this.records.get(e);if(t===void 0){let n=ya(e)&&Xr(e);t=n&&this.injectableDefInScope(n)?ga(da(e),aa):null,this.records.set(e,t)}if(t!=null)return this.hydrate(e,t,r)}let n=r&2?ca():this.parent;return t=r&8&&t===Ti?null:t,n.get(e,t)}catch(e){let t=bi(e);throw t===-200||t===-201?new F(t,null):e}finally{Ci(a),Hn(i)}}resolveInjectorInitializers(){let e=P(null),t=Hn(this),n=Ci(void 0);try{let e=this.get(Wi,Ui,{self:!0});for(let t of e)t()}finally{Hn(t),Ci(n),P(e)}}toString(){return`R3Injector[...]`}processProvider(e){e=qr(e);let t=ra(e)?e:qr(e&&e.provide),n=pa(e);if(!ra(e)&&e.multi===!0){let n=this.records.get(t);n||(n=ga(void 0,aa,!0),n.factory=()=>ji(n.multi),this.records.set(t,n)),t=e,n.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=P(null);try{if(t.value===oa)throw _i(``);return t.value===aa&&(t.value=oa,t.value=t.factory(void 0,n)),typeof t.value==`object`&&t.value&&va(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{P(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=qr(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 da(e){let t=Xr(e),n=t===null?Ni(e):t.factory;if(n!==null)return n;if(e instanceof L)throw new F(-204,!1);if(e instanceof Function)return fa(e);throw new F(-204,!1)}function fa(e){if(e.length>0)throw new F(-204,!1);let t=Qr(e);return t===null?()=>new e:()=>t.factory(e)}function pa(e){return ea(e)?ga(void 0,e.useValue):ga(ma(e),aa)}function ma(e,t,n){let r;if(ra(e)){let t=qr(e);return Ni(t)||da(t)}if(ea(e))r=()=>qr(e.useValue);else if(na(e))r=()=>e.useFactory(...ji(e.deps||[]));else if(ta(e))r=(t,n)=>R(qr(e.useExisting),n!==void 0&&n&8?8:void 0);else{let t=qr(e&&(e.useClass||e.provide));if(_a(e))r=()=>new t(...ji(e.deps));else return Ni(t)||da(t)}return r}function ha(e){if(e.destroyed)throw new F(-205,!1)}function ga(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function _a(e){return!!e.deps}function va(e){return typeof e==`object`&&!!e&&typeof e.ngOnDestroy==`function`}function ya(e){return typeof e==`function`||typeof e==`object`&&e.ngMetadataName===`InjectionToken`}function ba(e,t){for(let n of e)Array.isArray(n)?ba(n,t):n&&ni(n)?ba(n.ɵproviders,t):t(n)}function xa(e,t){let n;e instanceof ua?(ha(e),n=e):n=new Di(e);let r=Hn(n),i=Ci(void 0);try{return t()}finally{Hn(r),Ci(i)}}function Sa(){return Si()!==void 0||Vn()!=null}var Ca=1;function wa(e){return Array.isArray(e)&&typeof e[Ca]==`object`}function Ta(e){return Array.isArray(e)&&e[Ca]===!0}function Ea(e){return!!(e.flags&4)}function Da(e){return e.componentOffset>-1}function Oa(e){return(e.flags&1)==1}function ka(e){return!!e.template}function Aa(e){return!!(e[2]&512)}function ja(e){return(e[2]&256)==256}var Ma=`math`;function Na(e){for(;Array.isArray(e);)e=e[0];return e}function Pa(e,t){return Na(t[e])}function Fa(e,t){return Na(t[e.index])}function Ia(e,t){return e.data[t]}function La(e,t){return e[t]}function Ra(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function za(e,t){let n=t[e];return wa(n)?n:n[0]}function Ba(e){return(e[2]&128)==128}function Va(e,t){return t==null?null:e[t]}function Ha(e){e[17]=0}function Ua(e){e[2]&1024||(e[2]|=1024,Ba(e)&&qa(e))}function Wa(e,t){for(;e>0;)t=t[14],e--;return t}function Ga(e){return!!(e[2]&9216||e[24]?.dirty)}function Ka(e){e[10].changeDetectionScheduler?.notify(8),e[2]&64&&(e[2]|=1024),Ga(e)&&qa(e)}function qa(e){e[10].changeDetectionScheduler?.notify(0);let t=Xa(e);for(;t!==null&&!(t[2]&8192||(t[2]|=8192,!Ba(t)));)t=Xa(t)}function Ja(e,t){if(ja(e))throw new F(911,!1);e[21]===null&&(e[21]=[]),e[21].push(t)}function Ya(e,t){if(e[21]===null)return;let n=e[21].indexOf(t);n!==-1&&e[21].splice(n,1)}function Xa(e){let t=e[3];return Ta(t)?t[3]:t}function Za(e){return e[7]??=[]}function Qa(e){return e.cleanup??=[]}var B={lFrame:Po(null),bindingsEnabled:!0,skipHydrationRootTNode:null},$a=!1;function eo(){return B.lFrame.elementDepthCount}function to(){B.lFrame.elementDepthCount++}function no(){B.lFrame.elementDepthCount--}function ro(){return B.bindingsEnabled}function io(){return B.skipHydrationRootTNode!==null}function ao(e){return B.skipHydrationRootTNode===e}function oo(){B.skipHydrationRootTNode=null}function V(){return B.lFrame.lView}function so(){return B.lFrame.tView}function co(e){return B.lFrame.contextLView=e,e[8]}function lo(e){return B.lFrame.contextLView=null,e}function uo(){let e=fo();for(;e!==null&&e.type===64;)e=e.parent;return e}function fo(){return B.lFrame.currentTNode}function po(){let e=B.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function mo(e,t){let n=B.lFrame;n.currentTNode=e,n.isParent=t}function ho(){return B.lFrame.isParent}function go(){B.lFrame.isParent=!1}function _o(){return $a}function vo(e){let t=$a;return $a=e,t}function yo(){let e=B.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function bo(){return B.lFrame.bindingIndex}function xo(e){return B.lFrame.bindingIndex=e}function So(){return B.lFrame.bindingIndex++}function Co(e){let t=B.lFrame,n=t.bindingIndex;return t.bindingIndex+=e,n}function wo(){return B.lFrame.inI18n}function To(e,t){let n=B.lFrame;n.bindingIndex=n.bindingRootIndex=e,Do(t)}function Eo(){return B.lFrame.currentDirectiveIndex}function Do(e){B.lFrame.currentDirectiveIndex=e}function Oo(e){let t=B.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function ko(e){B.lFrame.currentQueryIndex=e}function Ao(e){let t=e[1];return t.type===2?t.declTNode:t.type===1?e[5]:null}function jo(e,t,n){if(n&4){let r=t,i=e;for(;r=r.parent,r===null&&!(n&1)&&(r=Ao(i),!(r===null||(i=i[14],r.type&10))););if(r===null)return!1;t=r,e=i}let r=B.lFrame=No();return r.currentTNode=t,r.lView=e,!0}function Mo(e){let t=No(),n=e[1];B.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function No(){let e=B.lFrame,t=e===null?null:e.child;return t===null?Po(e):t}function Po(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 Fo(){let e=B.lFrame;return B.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Io=Fo;function Lo(){let e=Fo();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 Ro(e){return(B.lFrame.contextLView=Wa(e,B.lFrame.contextLView))[8]}function zo(){return B.lFrame.selectedIndex}function Bo(e){B.lFrame.selectedIndex=e}function Vo(){let e=B.lFrame;return Ia(e.tView,e.selectedIndex)}function Ho(){B.lFrame.currentNamespace=`svg`}function Uo(){Wo()}function Wo(){B.lFrame.currentNamespace=null}function Go(){return B.lFrame.currentNamespace}var Ko=!0;function qo(){return Ko}function Jo(e){Ko=e}function Yo(e,t=null,n=null,r){let i=Xo(e,t,n,r);return i.resolveInjectorInitializers(),i}function Xo(e,t=null,n=null,r,i=new Set){return new ua([n||Ui,Ji(e)],t||ca(),null,i)}var Zo=class e{static THROW_IF_NOT_FOUND=Ti;static NULL=new qi;static create(e,t){if(Array.isArray(e))return Yo({name:``},t,e,``);{let t=e.name??``;return Yo({name:t},e.parent,e.providers,t)}}static ɵprov=Yr({token:e,providedIn:`any`,factory:()=>R(Gi)});static __NG_ELEMENT_ID__=-1},Qo=new L(``),$o=class{static __NG_ELEMENT_ID__=ts;static __NG_ENV_ID__=e=>e},es=class extends $o{_lView;constructor(e){super(),this._lView=e}get destroyed(){return ja(this._lView)}onDestroy(e){let t=this._lView;return Ja(t,e),()=>Ya(t,e)}};function ts(){return new es(V())}var ns=new L(``),rs=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Rr(!1);debugTaskTracker=z(ns,{optional:!0});get hasPendingTasks(){return!this.destroyed&&this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Dr(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=Yr({token:e,providedIn:`root`,factory:()=>new e})}return e})(),is=class extends Ir{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,Sa()&&(this.destroyRef=z($o,{optional:!0})??void 0,this.pendingTasks=z(rs,{optional:!0})??void 0)}emit(e){let t=P(null);try{super.next(e)}finally{P(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 er&&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 as(...e){}function os(e){let t,n;function r(){e=as;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 ss(e){return queueMicrotask(()=>e()),()=>{e=as}}var cs=`isAngularZone`,ls=`isAngularZone_ID`,us=0,ds=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new is(!1);onMicrotaskEmpty=new is(!1);onStable=new is(!1);onError=new is(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:i=!1}=e;if(typeof Zone>`u`)throw new F(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,hs(a)}static isInAngularZone(){return typeof Zone<`u`&&Zone.current.get(cs)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new F(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new F(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,fs,as,as);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)}},fs={};function ps(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 ms(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){os(()=>{e.callbackScheduled=!1,gs(e),e.isCheckStableRunning=!0,ps(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),gs(e)}function hs(e){let t=()=>{ms(e)},n=us++;e._inner=e._inner.fork({name:`angular`,properties:{[cs]:!0,[ls]:n,[ls+n]:!0},onInvokeTask:(n,r,i,a,o,s)=>{if(bs(s))return n.invokeTask(i,a,o,s);try{return _s(e),n.invokeTask(i,a,o,s)}finally{(e.shouldCoalesceEventChangeDetection&&a.type===`eventTask`||e.shouldCoalesceRunChangeDetection)&&t(),vs(e)}},onInvoke:(n,r,i,a,o,s,c)=>{try{return _s(e),n.invoke(i,a,o,s,c)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!xs(s)&&t(),vs(e)}},onHasTask:(t,n,r,i)=>{t.hasTask(r,i),n===r&&(i.change==`microTask`?(e._hasPendingMicrotasks=i.microTask,gs(e),ps(e)):i.change==`macroTask`&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:(t,n,r,i)=>(t.handleError(r,i),e.runOutsideAngular(()=>e.onError.emit(i)),!1)})}function gs(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0)}function _s(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function vs(e){e._nesting--,ps(e)}var ys=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new is;onMicrotaskEmpty=new is;onStable=new is;onError=new is;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function bs(e){return Ss(e,`__ignore_ng_zone__`)}function xs(e){return Ss(e,`__scheduler_tick__`)}function Ss(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var Cs=class{_console=console;handleError(e){this._console.error(`ERROR`,e)}},ws=new L(``,{factory:()=>{let e=z(ds),t=z(la),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(Cs),n.handleError(r))})}}}),Ts={provide:Wi,useValue:()=>{z(Cs,{optional:!0})},multi:!0};function H(e,t){let[n,r,i]=Mn(e,t?.equal),a=n;return a[en],a.set=r,a.update=i,a.asReadonly=Es.bind(a),a}function Es(){let e=this[en];if(e.readonlyFn===void 0){let t=()=>this();t[en]=e,e.readonlyFn=t}return e.readonlyFn}var Ds=new L(``,{factory:()=>Os}),Os=`ng`,ks=new L(``),As=new L(``,{providedIn:`platform`,factory:()=>`unknown`}),js=new L(``,{factory:()=>z(Qo).body?.querySelector(`[ngCspNonce]`)?.getAttribute(`ngCspNonce`)||null}),Ms=(()=>{class e{view;node;constructor(e,t){this.view=e,this.node=t}static __NG_ELEMENT_ID__=Ns}return e})();function Ns(){return new Ms(V(),uo())}var Ps=class{},Fs=new L(``,{factory:()=>!0}),Is=new L(``),Ls=(()=>{class e{static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>new Rs})}return e})(),Rs=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}},zs=class{[en];constructor(e){this[en]=e}destroy(){this[en].destroy()}};function Bs(e,t){let n=t?.injector??z(Zo),r=t?.manualCleanup===!0?null:n.get($o),i,a=n.get(Ms,null,{optional:!0}),o=n.get(Ps);return a===null?i=Gs(e,n.get(Ls),o):(i=Ws(a.view,o,e),r instanceof es&&r._lView===a.view&&(r=null)),i.injector=n,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new zs(i)}var Vs={...Rn,cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=vo(!1);try{zn(this)}finally{vo(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=P(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],P(e)}}},Hs={...Vs,consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(gn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}},Us={...Vs,consumerMarkedDirty(){this.view[2]|=8192,qa(this.view),this.notifier.notify(13)},destroy(){if(gn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[23]?.delete(this)}};function Ws(e,t,n){let r=Object.create(Us);return r.view=e,r.zone=typeof Zone<`u`?Zone.current:null,r.notifier=t,r.fn=Ks(r,n),e[23]??=new Set,e[23].add(r),r.consumerMarkedDirty(r),r}function Gs(e,t,n){let r=Object.create(Hs);return r.fn=Ks(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 Ks(e,t){return()=>{t(t=>(e.cleanupFns??=[]).push(t))}}var qs=(()=>{class e{internalPendingTasks=z(rs);scheduler=z(Ps);errorHandler=z(ws);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let t=this.add();try{e().catch(this.errorHandler).finally(t)}catch(e){this.errorHandler(e),t()}}static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>new e})}return e})(),Js=Symbol(`InputSignalNode#UNSET`),Ys={...In,transformFn:void 0,applyValueToInputSignal(e,t){Pn(e,t)}};function Xs(e){return{toString:e}.toString()}var U=(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})(U||{});function Zs(e,t,n,r){t===null?e[n]=r:t.applyValueToInputSignal(t,r)}var Qs=null;function $s(){return Qs}var ec=[],W=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,sc(o,a)):sc(o,a)}var lc=-1,uc=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 dc(e){return!!(e.flags&8)}function fc(e){return!!(e.flags&16)}function pc(e,t,n){let r=0;for(;rt){o=a-1;break}}}for(;a>16}function xc(e,t){let n=bc(e),r=t;for(;n>0;)r=r[14],n--;return r}var Sc=!0;function Cc(e){let t=Sc;return Sc=e,t}var wc=255,Tc=5,Ec=0,Dc={};function Oc(e,t,n){let r;typeof n==`string`?r=n.charCodeAt(0)||0:Object.hasOwn(n,si)&&(r=n[si]),r??=n[si]=Ec++;let i=r&wc,a=1<>Tc)]|=a}function kc(e,t){let n=jc(e,t);if(n!==-1)return n;let r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,Ac(r.data,e),Ac(t,null),Ac(r.blueprint,null));let i=Mc(e,t),a=e.injectorIndex;if(vc(i)){let e=yc(i),n=xc(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 Ac(e,t){e.push(0,0,0,0,0,0,0,0,t)}function jc(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Mc(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=qc(i),r===null)return lc;if(n++,i=i[14],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return lc}function Nc(e,t,n){Oc(e,t,n)}function Pc(e,t,n){if(n&8||e!==void 0)return e;vi(t,`NodeInjector`)}function Fc(e,t,n,r){if(n&8&&r===void 0&&(r=null),!(n&3)){let i=e[9],a=Ci(void 0);try{return i?i.get(t,r,n&8):wi(t,r,n&8)}finally{Ci(a)}}return Pc(r,t,n)}function Ic(e,t,n,r=0,i){if(e!==null){if(t[2]&2048&&!(r&2)){let i=Kc(e,t,n,r,Dc);if(i!==Dc)return i}let i=Lc(e,t,n,r,Dc);if(i!==Dc)return i}return Fc(t,n,r,i)}function Lc(e,t,n,r,i){let a=Vc(n);if(typeof a==`function`){if(!jo(t,e,r))return r&1?Pc(i,n,r):Fc(t,n,r,i);try{let e;if(e=a(r),e==null&&!(r&8))vi(n);else return e}finally{Io()}}else if(typeof a==`number`){let i=null,o=jc(e,t),s=lc,c=r&1?t[15][5]:null;for((o===-1||r&4)&&(s=o===-1?Mc(e,t):t[o+8],s===lc||!Uc(r,!1)?o=-1:(i=t[1],o=yc(s),t=xc(s,t)));o!==-1;){let e=t[1];if(Hc(a,o,e.data)){let e=Rc(o,t,n,i,r,c);if(e!==Dc)return e}s=t[o+8],s!==lc&&Uc(r,t[1].data[o+8]===c)&&Hc(a,o,t)?(i=e,o=yc(s),t=xc(s,t)):o=-1}}return i}function Rc(e,t,n,r,i,a){let o=t[1],s=o.data[e+8],c=zc(s,o,n,r==null?Da(s)&&Sc:r!=o&&!!(s.type&3),i&1&&a===s);return c===null?Dc:Bc(t,o,c,s,i)}function zc(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&&ka(e)&&e.type===n)return c}return null}function Bc(e,t,n,r,i){let a=e[n],o=t.data;if(a instanceof uc){let s=a;if(s.resolving)throw _i(``);let c=Cc(s.canSeeViewProviders);s.resolving=!0,o[n].type||o[n];let l=s.injectImpl?Ci(s.injectImpl):null;jo(e,r,0);try{a=e[n]=s.factory(void 0,i,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&tc(n,o[n],t)}finally{l!==null&&Ci(l),Cc(c),s.resolving=!1,Io()}}return a}function Vc(e){if(typeof e==`string`)return e.charCodeAt(0)||0;let t=Object.hasOwn(e,si)?e[si]:void 0;return typeof t==`number`?t>=0?t&wc:Gc:t}function Hc(e,t,n){let r=1<>Tc)]&r)}function Uc(e,t){return!(e&2)&&!(e&1&&t)}var Wc=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return Ic(this._tNode,this._lView,e,ki(n),t)}};function Gc(){return new Wc(uo(),V())}function Kc(e,t,n,r,i){let a=e,o=t;for(;a!==null&&o!==null&&o[2]&2048&&!Aa(o);){let e=Lc(a,o,n,r|2,Dc);if(e!==Dc)return e;r&=-5;let t=a.parent;if(!t){let e=o[20];if(e){let t=e.get(n,Dc,r);if(t!==Dc)return t}t=qc(o),o=o[14]}a=t}return i}function qc(e){let t=e[1],n=t.type;return n===2?t.declTNode:n===1?e[5]:null}var Jc=()=>(typeof requestIdleCallback<`u`?requestIdleCallback:e=>setTimeout(e)).bind(globalThis),Yc=()=>(typeof requestIdleCallback<`u`?cancelIdleCallback:clearTimeout).bind(globalThis),Xc=new L(``,{factory:()=>new Zc}),Zc=class{requestIdleCallback=Jc();cancelIdleCallback=Yc();requestOnIdle(e,t){return this.requestIdleCallback(e,t)}cancelOnIdle(e){return this.cancelIdleCallback(e)}};function Qc(e){return{token:e.token,providedIn:e.autoProvided===!1?null:`root`,factory:e.factory,value:void 0}}function $c(){return el(uo(),V())}function el(e,t){return new tl(Fa(e,t))}var tl=(()=>{class e{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=$c}return e})();function nl(e){return(e.flags&128)==128}var rl=(function(e){return e[e.OnPush=0]=`OnPush`,e[e.Eager=1]=`Eager`,e[e.Default=1]=`Default`,e})(rl||{}),il=new Map,al=0;function ol(){return al++}function sl(e){il.set(e[19],e)}function cl(e){il.delete(e[19])}var ll=`__ngContext__`;function ul(e,t){wa(t)?(e[ll]=t[19],sl(t)):e[ll]=t}function dl(e){return pl(e[12])}function fl(e){return pl(e[4])}function pl(e){for(;e!==null&&!Ta(e);)e=e[4];return e}var ml=void 0;function hl(e){ml=e}function gl(){if(ml!==void 0)return ml;if(typeof document<`u`)return document;throw new F(210,!1)}var _l=!1,vl=new L(``,{factory:()=>_l}),yl=new L(``),bl=new WeakMap;function xl(e,t){if(typeof e!=`object`||!e)return;let n=bl.get(e);n||(n=new WeakSet,bl.set(e,n)),n.add(t)}var Sl=new L(``);function Cl(e){return(e.flags&32)==32}var wl=()=>null;function Tl(e,t,n=!1){return wl(e,t,n)}function El(e){return e.get(yl,!1,{optional:!0})}function Dl(e,t){let n=e.contentQueries;if(n!==null){let r=P(null);try{for(let r=0;r|^->||--!>|)/g,Fl=`​$1​`;function Il(e){return e.replace(Nl,e=>e.replace(Pl,Fl))}function Ll(e,t){return e.createText(t)}function Rl(e,t,n){e.setValue(t,n)}function zl(e,t){return e.createComment(Il(t))}function Bl(e,t,n){return e.createElement(t,n)}function Vl(e,t,n,r,i){e.insertBefore(t,n,r,i)}function Hl(e,t,n){e.appendChild(t,n)}function Ul(e,t,n,r,i){r===null?Hl(e,t,n):Vl(e,t,n,r,i)}function Wl(e,t,n,r){e.removeChild(null,t,n,r)}function Gl(e,t,n){e.setAttribute(t,`style`,n)}function Kl(e,t,n){n===``?e.removeAttribute(t,`class`):e.setAttribute(t,`class`,n)}function ql(e,t,n){let{mergedAttrs:r,classes:i,styles:a}=n;r!==null&&pc(e,t,r),i!==null&&Kl(e,t,i),a!==null&&Gl(e,t,a)}function Jl(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 Yl=`ng-template`;function Xl(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(eu(r))return!1;o=!0}}}}}return eu(r)||o}function eu(e){return!(e&1)}function tu(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!==``&&!eu(o)&&(t+=au(a,i),i=``),r=o,a||=!eu(r);n++}return i!==``&&(t+=au(a,i)),t}function su(e){return e.map(ou).join(`,`)}function cu(e){let t=[],n=[],r=1,i=2;for(;r=0;e--){let{el:n,declarationView:s}=r[e],c=n.parentNode;n===t?(r.splice(e,1),gu.add(n),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}}))):(a&&n===a||c&&i&&c!==i&&(o===null||s===null||o===s))&&(r.splice(e,1),n.dispatchEvent(new CustomEvent(`animationend`,{detail:{cancel:!0}})),n.parentNode?.removeChild(n))}}function vu(e,t,n){let r=hu(n),i=mu.get(e);i?i.some(e=>e.el===t)||i.push({el:t,declarationView:r}):mu.set(e,[{el:t,declarationView:r}])}var yu=(function(e){return e[e.CHANGE_DETECTION=0]=`CHANGE_DETECTION`,e[e.AFTER_NEXT_RENDER=1]=`AFTER_NEXT_RENDER`,e})(yu||{}),bu=new L(``),xu=new Set;function Su(e){xu.has(e)||(xu.add(e),performance?.mark?.(`mark_feature_usage`,{detail:{feature:e}}))}var Cu=(()=>{class e{impl=null;execute(){this.impl?.execute()}static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>new e})}return e})(),wu=new L(``,{factory:()=>{let e=z(la),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function Tu(e,t,n){let r=e.get(wu);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 Eu(e,t){let n=e.get(wu);if(Array.isArray(t))for(let e of t)n.queue.delete(e);else n.queue.delete(t)}function Du(e,t){let n=e.get(wu);if(t.detachedLeaveAnimationFns){for(let e of t.detachedLeaveAnimationFns)n.queue.delete(e);t.detachedLeaveAnimationFns=void 0}}function Ou(e,t){for(let[n,r]of t)Tu(e,r.animateFns)}function ku(e,t,n,r){let i=e?.[26]?.enter;t!==null&&i&&i.has(n.index)&&Ou(r,i)}function Au(e,t,n,r){try{n.get(Gi)}catch{return r(!1)}let i=e?.[26];i?.enter?.has(t.index)&&Eu(n,i.enter.get(t.index).animateFns);let a=ju(e,t,i);if(a.size===0){let n=!1;if(e){let r=[];Nu(e,t,r),n=r.length>0}if(!n)return r(!1)}e&&pu.add(e[19]),Tu(n,()=>Mu(e,t,i||void 0,a,r),i||void 0)}function ju(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 Mu(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&&Nu(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),Fu(e,t.running,i)}else Promise.allSettled(a).then(()=>{e&&pu.delete(e[19]),i(!0)})}else e&&pu.delete(e[19]),i(!1)}function Nu(e,t,n){if(t.type&12){let r=e[t.index];if(Ta(r))for(let e=10;e{e[26]?.running===t&&(e[26].running=void 0,pu.delete(e[19])),n(!0)})}function Iu(e,t,n,r,i,a,o,s){if(i!=null){let c,l=!1;Ta(i)?c=i:wa(i)&&(l=!0,i=i[0]);let u=Na(i);e===0&&r!==null?(ku(s,r,a,n),o==null?Hl(t,r,u):Vl(t,r,u,o||null,!0)):e===1&&r!==null?(ku(s,r,a,n),Vl(t,r,u,o||null,!0),_u(a,u,s)):e===2?(s?.[26]?.leave?.has(a.index)&&vu(a,u,s),gu.delete(u),Au(s,a,n,e=>{if(gu.has(u)){gu.delete(u);return}Wl(t,u,l,e)})):e===3&&(gu.delete(u),Au(s,a,n,()=>{t.destroyNode(u)})),c!=null&&ad(t,e,n,c,a,r,o)}}function Lu(e,t){zu(e,t),t[0]=null,t[5]=null}function Ru(e,t,n,r,i,a){r[0]=i,r[5]=t,nd(e,r,n,1,i,a)}function zu(e,t){t[10].changeDetectionScheduler?.notify(9),nd(e,t,t[11],2,null,null)}function Bu(e){let t=e[12];if(!t)return Uu(e[1],e);for(;t;){let n=null;if(wa(t))n=t[12];else{let e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)wa(t)&&Uu(t[1],t),t=t[3];t===null&&(t=e),wa(t)&&Uu(t[1],t),n=t&&t[4]}t=n}}function Vu(e,t){let n=e[9],r=n.indexOf(t);n.splice(r,1)}function Hu(e,t){if(ja(t))return;let n=t[11];n.destroyNode&&nd(e,t,n,3,null,null),Bu(t)}function Uu(e,t){if(ja(t))return;let n=P(null);try{t[2]&=-129,t[2]|=256,t[24]&&gn(t[24]),Gu(e,t),Wu(e,t),t[1].type===1&&t[11].destroy();let n=t[16];if(n!==null&&Ta(t[3])){n!==t[3]&&Vu(n,t);let r=t[18];r!==null&&r.detachView(e)}cl(t)}finally{P(n)}}function Wu(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&&hd(e,t,27,!1),W(o?U.TemplateUpdateStart:U.TemplateCreateStart,i,n),n(r,i)}finally{Bo(a),W(o?U.TemplateUpdateEnd:U.TemplateCreateEnd,i,n)}}function yd(e,t,n){Ed(e,t,n),(n.flags&64)==64&&Dd(e,t,n)}function bd(e,t,n=Fa){let r=t.localNames;if(r!==null){let i=t.index+1;for(let a=0;a{qa(e.lView)},consumerOnSignalRead(){this.lView[24]=this}};function Yd(e){let t=e[24]??Object.create(Xd);return t.lView=e,t}var Xd={...nn,consumerIsAlwaysLive:!0,kind:`template`,consumerMarkedDirty:e=>{let t=Xa(e.lView);for(;t&&!Zd(t[1]);)t=Xa(t);t&&Ua(t)},consumerOnSignalRead(){this.lView[24]=this}};function Zd(e){return e.type!==2}function Qd(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 $d=100;function ef(e,t=0){let n=e[10].rendererFactory;n.begin?.();try{tf(e,t)}finally{n.end?.()}}function tf(e,t){let n=_o();try{vo(!0),cf(e,t);let n=0;for(;Ga(e);){if(n===$d)throw new F(103,!1);n++,cf(e,1)}}finally{vo(n)}}function nf(e,t,n,r){if(ja(t))return;let i=t[2];Mo(t);let a=!0,o=null,s=null;Zd(e)?(s=Gd(t),o=dn(s)):tn()===null?(a=!1,s=Yd(t),o=dn(s)):t[24]&&=(gn(t[24]),null);try{Ha(t),xo(e.bindingStartIndex),n!==null&&vd(e,t,n,2,r);let a=(i&3)==3;if(a){let n=e.preOrderCheckHooks;n!==null&&rc(t,n,null)}else{let n=e.preOrderHooks;n!==null&&ic(t,n,0,null),ac(t,0)}if(af(t),Qd(t),rf(t,0),e.contentQueries!==null&&Dl(e,t),a){let n=e.contentCheckHooks;n!==null&&rc(t,n)}else{let n=e.contentHooks;n!==null&&ic(t,n,1),ac(t,1)}uf(e,t);let o=e.components;o!==null&&lf(t,o,0);let s=e.viewQuery;if(s!==null&&Ol(2,s,r),a){let n=e.viewCheckHooks;n!==null&&rc(t,n)}else{let n=e.viewHooks;n!==null&&ic(t,n,2),ac(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[22]){for(let e of t[22])e();t[22]=null}Ud(t),t[2]&=-73}catch(e){throw qa(t),e}finally{s!==null&&(pn(s,o),a&&qd(s)),Lo()}}function rf(e,t){for(let n=dl(e);n!==null;n=fl(n))for(let e=10;e0&&(e[n-1][4]=r[4]);let a=Ii(e,10+t);Lu(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 _f(e,t,n,r){let i=10+r,a=n.length;r>0&&(n[i-1][4]=t),r-1&&(gf(e,n),Ii(t,n))}this._attachedToViewContainer=!1}Hu(this._lView[1],this._lView)}onDestroy(e){Ja(this._lView,e)}markForCheck(){df(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[2]&=-129}reattach(){Ka(this._lView),this._lView[2]|=128}detectChanges(){this._lView[2]|=1024,ef(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new F(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Aa(this._lView),t=this._lView[16];t!==null&&!e&&Vu(t,this._lView),zu(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new F(902,!1);this._appRef=e;let t=Aa(this._lView),n=this._lView[16];n!==null&&!t&&vf(n,this._lView),Ka(this._lView)}};function bf(e,t,n,r,i){let a=e.data[t];if(a===null)a=xf(e,t,n,r,i),wo()&&(a.flags|=32);else if(a.type&64){a.type=n,a.value=r,a.attrs=i;let e=po();a.injectorIndex=e===null?-1:e.injectorIndex}return mo(a,!0),a}function xf(e,t,n,r,i){let a=fo(),o=ho(),s=o?a:a&&a.parent,c=e.data[t]=Cf(e,s,n,t,r,i);return Sf(e,c,a,o),c}function Sf(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 Cf(e,t,n,r,i,a){let o=t?t.injectorIndex:-1,s=0;return io()&&(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:Go(),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 wf(e){let t=e[6]??[],n=e[3][11],r=[];for(let e of t)e.data.di===void 0?Tf(e,n):r.push(e);e[6]=r}function Tf(e,t){let n=0,r=e.firstChild;if(r){let i=e.data.r;for(;nnull,Df=()=>null;function Of(e,t){return Ef(e,t)}function kf(e,t,n){return Df(e,t,n)}var Af=class{},jf=class{},Mf=(()=>{class e{static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>null})}return e})();function Nf(e){return e.debugInfo?.className||e.type.name||null}var Pf={},Ff=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,Pf,n);return r!==Pf||t===Pf?r:this.parentInjector.get(e,t,n)}};function If(e,t,n){return e[t]=n}function Lf(e,t,n){if(n===lu)return!1;let r=e[t];return!Object.is(r,n)&&(e[t]=n,!0)}function Rf(e,t,n,r){let i=Lf(e,t,n);return Lf(e,t+1,r)||i}function zf(e,t,n,r,i){let a=Rf(e,t,n,r);return Lf(e,t+2,i)||a}function Bf(e,t,n){return function r(i){let a=r.__ngNativeEl__;a!==void 0&&xl(i,a),df(Da(e)?za(e.index,t):t,5);let o=t[8],s=Vf(t,o,n,i),c=r.__ngNextListenerFn__;for(;c;)s=Vf(t,o,c,i)&&s,c=c.__ngNextListenerFn__;return s}}function Vf(e,t,n,r){let i=P(null);try{return W(U.OutputStart,t,n),n(r)!==!1}catch(t){return Nd(e,t),!1}finally{W(U.OutputEnd,t,n),P(i)}}function Hf(e,t,n,r,i,a,o,s){let c=Oa(e),l=!1,u=null;if(!r&&c&&(u=Wf(t,n,a,e.index)),u!==null){let e=u.__ngLastListenerFn__||u;e.__ngNextListenerFn__=o,u.__ngLastListenerFn__=o,l=!0}else{let o=Fa(e,n),c=r?r(o):o;r||(s.__ngNativeEl__=o);let l=i.listen(c,a,s);Uf(a)||Gf(r?t=>r(Na(t[e.index])):e.index,t,n,a,s,l,!1)}return l}function Uf(e){return e.startsWith(`animation`)||e.startsWith(`transition`)}function Wf(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 Gf(e,t,n,r,i,a,o){let s=t.firstCreatePass?Qa(t):null,c=Za(n),l=c.length;c.push(i,a),s&&s.push(r,e,l,(l+1)*(o?-1:1))}function Kf(e,t,n,r,i,a){let o=t[n],s=t[1],c=o[s.data[n].outputs[r]].subscribe(a);Gf(e.index,s,t,i,a,c,!0)}var qf=Symbol(`BINDING`),Jf=new L(``);function Yf(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 lp(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&gd.SignalBased)!==0};return i&&(a.transform=i),a})}function _p(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function vp(e,t,n){let r=t instanceof la?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Ff(n,r):n}function yp(e){let t=e.get(jf,null);if(t===null)throw new F(407,!1);return{rendererFactory:t,sanitizer:e.get(Mf,null),changeDetectionScheduler:e.get(Ps,null),ngReflect:!1,tracingService:e.get(bu,null,{optional:!0})}}function bp(e,t,n){let r=Sp(e);return Bl(t,r,r===`svg`?`svg`:r===`math`?Ma:n)}function xp(e){if((e&&`localName`in e&&typeof e.localName==`string`?e.localName:e?.tagName)?.toLowerCase()===`script`)throw new F(905,!1)}function Sp(e){return(e.selectors[0][0]||`div`).toLowerCase()}var Cp=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=gp(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=_p(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=su(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,i,a,o){W(U.DynamicComponentStart);let s=P(null);try{let s=this.componentDef,c=vp(s,r||this.ngModule,e),l=yp(c),u=l.tracingService;return u&&u.componentCreate?u.componentCreate(Nf(s),()=>this.createComponentRef(l,c,t,n,i,a,o)):this.createComponentRef(l,c,t,n,i,a,o)}finally{P(s)}}createComponentRef(e,t,n,r,i,a,o){let s=this.componentDef,c=wp(r,s,a,i),l=e.rendererFactory.createRenderer(null,s),u=r?xd(l,r,s.encapsulation,t):bp(s,l,o??null);xp(u);let d=t.get(Jf,null),f=Tp(u,()=>t.get(Qo,null)??gl());d&&d.addHost(f);let p=a?.some(Dp)||i?.some(e=>typeof e!=`function`&&e.bindings.some(Dp)),m=ud(null,c,null,512|fd(s),null,null,e,l,t,null,Tl(u,t,!0));d&&mp&&f instanceof ShadowRoot&&Ja(m,()=>{d.removeHost(f)}),m[27]=u,Mo(m);let h=null;try{let e=dp(27,m,2,`#host`,()=>c.directiveRegistry,!0,0);ql(l,u,e),ul(u,m),yd(c,m,e),kl(c,e,m),fp(c,e),n!==void 0&&kp(e,this.ngContentSelectors,n),h=za(e.index,m),m[8]=h[8],Ld(c,m,null)}catch(e){throw h!==null&&cl(h),cl(m),e}finally{W(U.DynamicComponentEnd),Lo()}return new Op(this.componentType,m,!!p)}};function wp(e,t,n,r){let i=e?[`ng-version`,`22.1.7`]:cu(t.selectors[0]),a=null,o=null,s=0;if(n)for(let e of n)s+=e[qf].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 Dp(e){let t=e[qf].kind;return t===`input`||t===`twoWay`}var Op=class extends Af{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=Ia(t[1],27),this.location=el(this._tNode,t),this.instance=za(this._tNode.index,t)[8],this.hostView=this.changeDetectorRef=new yf(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;Pd(n,r[1],r,e,t),this.previousInputValues.set(e,t),df(za(n.index,r),1)}get injector(){return new Wc(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function kp(e,t,n){let r=e.projection=[];for(let e=0;e!1;function jp(e,t,n){return Ap(e,t,n)}function Mp(e){return!!e&&typeof e.then==`function`}function Np(e){return!!e&&typeof e.subscribe==`function`}var Pp=class{},Fp=class extends Pp{injector;instance=null;constructor(e){super();let t=new ua([...e.providers,{provide:Pp,useValue:this}],e.parent||ca(),e.debugName,new Set([`environment`]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Ip(e,t,n=null){return new Fp({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var Lp=(()=>{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=Yi(!1,e.type),n=t.length>0?Ip([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=Yr({token:e,providedIn:`environment`,factory:()=>new e(R(la))})}return e})();function Rp(e){return Xs(()=>{let t=Up(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==rl.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?e=>e.get(Lp).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Al.Emulated,styles:e.styles||Ui,_:null,schemas:e.schemas||null,tView:null,id:``};t.standalone&&Su(`NgStandalone`),Wp(n);let r=e.dependencies;return n.directiveDefs=Gp(r,zp),n.pipeDefs=Gp(r,di),n.id=Kp(n),n})}function zp(e){return li(e)||ui(e)}function Bp(e,t){if(e==null)return Hi;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=gd.None,c=null),n[a]=[r,s,c],t[a]=o}return n}function Vp(e){if(e==null)return Hi;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Hp(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 Up(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||Hi,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Ui,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Bp(e.inputs,t),outputs:Vp(e.outputs),debugInfo:null}}function Wp(e){e.features?.forEach(t=>t(e))}function Gp(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 Kp(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 qp=new L(``),Jp=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t});appInits=z(qp,{optional:!0})??[];injector=z(Zo);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let n=xa(this.injector,t);if(Mp(n))e.push(n);else if(Np(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=Qc({token:e,factory:e.ɵfac})}return e})();function Yp(e,t,n,r,i,a,o,s){if(n.firstCreatePass){e.mergedAttrs=gc(e.mergedAttrs,e.attrs);let t=e.tView=sd(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),mo(e,!1);let c=Qp(n,t,e,r);qo()&&Zu(n,t,c,e),ul(c,t);let l=ff(c,t,c,e);t[r+27]=l,md(t,l),jp(l,e,t)}function Xp(e,t,n,r,i,a,o,s,c,l,u){let d=n+27,f;if(t.firstCreatePass){if(f=bf(t,d,4,o||null,s||null),l!=null){let e=Va(t.consts,l);f.localNames=[];for(let t=0;t{class e{cachedInjectors=new Map;getOrCreateInjector(e,t,n,r){if(!this.cachedInjectors.has(e)){let i=n.length>0?Ip(n,t,r):null;this.cachedInjectors.set(e,i)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static ɵprov=Yr({token:e,providedIn:`environment`,factory:()=>new e})}return e})(),Om=new L(``);function km(e,t,n){return e.get(Dm).getOrCreateInjector(t,e,n,``)}function Am(e,t,n){if(e instanceof Ff){let r=e.injector,i=e.parentInjector;return new Ff(r,km(i,t,n))}let r=e.get(la);return r===e?km(e,t,n):new Ff(e,km(r,t,n))}function jm(e,t,n,r=!1){let i=n[3],a=i[1];if(ja(i))return;let o=vm(i,t),s=o[1],c=o[lm];if(!(c!==null&&ee.data.s===t[1])??-1;return{dehydratedView:n>-1?e[6][n]:null,dehydratedViewIx:n}}function Nm(e,t,n,r,i){W(U.DeferBlockStateStart);let a=Sm(e,i,r);if(a!==null){t[1]=e;let o=i[1],s=Ia(o,a+27);hf(n,0);let c;if(e===rm.Complete){let e=bm(o,r),t=e.providers;t&&t.length>0&&(c=Am(i[9],e,t))}let{dehydratedView:l,dehydratedViewIx:u}=Mm(n,t),d=zd(i,s,null,{injector:c,dehydratedView:l});if(mf(n,d,0,Bd(s,l)),Ua(d),u>-1&&n[6]?.splice(u,1),(e===rm.Complete||e===rm.Error)&&Array.isArray(t[um])){for(let e of t[um])e();t[um]=null}}W(U.DeferBlockStateEnd)}function Pm(e,t){return e{e.loadingState===em.COMPLETE?jm(rm.Complete,t,n):e.loadingState===em.FAILED&&jm(rm.Error,t,n)})}var Lm=null;function Rm(e,t){return t[9].get(Om,null,{optional:!0})?.behavior!==fm.Manual}var zm=new L(``),Bm=new L(``);function Vm(){An(()=>{throw new F(600,``)})}var Hm=10,Um=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=z(ws);afterRenderManager=z(Cu);zonelessEnabled=z(Fs);rootEffectScheduler=z(Ls);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Ir;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=z(rs);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(zr(e=>!e))}constructor(){z(bu,{optional:!0})}whenStable(){let e;return new Promise(t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})}).finally(()=>{e.unsubscribe()})}_injector=z(la);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,t){return this.bootstrapImpl(e,t)}bootstrapImpl(e,t,n=Zo.NULL){return this._injector.get(ds).run(()=>{if(W(U.BootstrapComponentStart),!this._injector.get(Jp).done)throw new F(405,``);let r=li(e),i=this._injector.get(Pp),a=new Cp(r,i);this.componentTypes.push(e);let{hostElement:o,directives:s,bindings:c}=Wm(t),l=o||a.selector,u=a.create(n,[],l,i.injector,s,c),d=u.location.nativeElement,f=u.injector.get(zm,null);return f?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),Gm(this.components,u),f?.unregisterApplication(d)}),this._loadComponent(u),W(U.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){W(U.ChangeDetectionStart),this.tracingSnapshot===null?this.tickImpl():this.tracingSnapshot.run(yu.CHANGE_DETECTION,this.tickImpl)}tickImpl=()=>{if(this._runningTick)throw W(U.ChangeDetectionEnd),new F(101,!1);let e=P(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,P(e),this.afterTick.next(),W(U.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(jf,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++Ga(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;Gm(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(Bm,[]).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),()=>Gm(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new F(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=Qc({token:e,factory:e.ɵfac})}return e})();function Wm(e){return e===void 0||typeof e==`string`||e instanceof Element?{hostElement:e}:e}function Gm(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Km(e,t,n){let r=t.get(Jm);return r.add(e,n),()=>r.remove(e)}function qm(e){return(t,n)=>Km(t,n,e)}var Jm=(()=>{class e{buckets=new Map;callbackBucket=new Map;applicationRef=z(Um);ngZone=z(ds);idleService=z(Xc);add(e,t){let n=Ym(t);this.callbackBucket.set(e,n);let r=this.buckets.get(n);r??(r={idleId:null,queue:new Set},this.buckets.set(n,r)),r.queue.add(e),this.scheduleBucket(r,t)}remove(e){let t=this.callbackBucket.get(e);if(t===void 0)return;this.callbackBucket.delete(e);let n=this.buckets.get(t);n&&(n.queue.delete(e),n.queue.size===0&&(this.cancelBucket(n),this.buckets.delete(t)))}scheduleBucket(e,t){if(e.idleId!==null)return;let n=Ym(t),r=r=>{for(let t of e.queue)if(t(),this.applicationRef._tick(),e.queue.delete(t),this.callbackBucket.delete(t),r&&r.timeRemaining()===0&&!r.didTimeout)break;e.idleId=null,e.queue.size>0?this.scheduleBucket(e,t):this.buckets.delete(n)};e.idleId=this.idleService.requestOnIdle(e=>this.ngZone.run(()=>r(e)),t)}cancelBucket(e){e.idleId!==null&&(this.idleService.cancelOnIdle(e.idleId),e.idleId=null)}ngOnDestroy(){for(let e of this.buckets.values())this.cancelBucket(e);this.buckets.clear(),this.callbackBucket.clear()}static ɵprov=Yr({token:e,providedIn:`root`,factory:()=>new e})}return e})();function Ym(e){return!e||e.timeout==null?``:`${e.timeout}`}function Xm(e){let t=V(),n=uo();if(Fm(t,n),!Rm(0,t))return;let r=t[9];pm(0,vm(t,n),e(()=>Qm(0,t,n),r))}function Zm(e,t,n){let r=t[9],i=t[1];if(e.loadingState!==em.NOT_STARTED)return e.loadingPromise??Promise.resolve();let a=vm(t,n),o=Em(i,e);e.loadingState=em.IN_PROGRESS,mm(1,a);let s=e.dependencyResolverFn,c=r.get(qs).add();return s?(e.loadingPromise=Promise.allSettled(s()).then(n=>{let r=!1,i=[],a=[];for(let e=0;e0&&(t.directiveRegistry=Tm(t.directiveRegistry,i),e.providers=Yi(!1,...i.map(e=>e.type))),a.length>0&&(t.pipeRegistry=Tm(t.pipeRegistry,a))}}),e.loadingPromise.finally(()=>{e.loadingPromise=null,c()})):(e.loadingPromise=Promise.resolve().then(()=>{e.loadingPromise=null,e.loadingState=em.COMPLETE,c()}),e.loadingPromise)}function Qm(e,t,n){let r=t[1],i=t[n.index];if(!Rm(e,t))return;let a=vm(t,n),o=bm(r,n);switch(hm(a),o.loadingState){case em.NOT_STARTED:jm(rm.Loading,n,i),Zm(o,t,n),o.loadingState===em.IN_PROGRESS&&Im(o,n,i);break;case em.IN_PROGRESS:jm(rm.Loading,n,i),Im(o,n,i);break;case em.COMPLETE:jm(rm.Complete,n,i);break;case em.FAILED:jm(rm.Error,n,i)}}function $m(e,t,n){return e===0?th(t,n):e!==2||!th(t,n)}function eh(e){return e!=null&&(e&1)==1}function th(e,t){let n=e[9],r=bm(e[1],t),i=El(n),a=eh(r.flags),o=vm(e,t)[cm]!==null;return!(a&&o&&i)}function nh(e,t,n,r,i,a,o,s,c,l){let u=V(),d=so(),f=e+27,p=Xp(u,d,e,null,0,0),m=u[9],h=El(m);if(d.firstCreatePass){Su(`NgDefer`);let e={primaryTmplIndex:t,loadingTmplIndex:r??null,placeholderTmplIndex:i??null,errorTmplIndex:a??null,placeholderBlockConfig:null,loadingBlockConfig:null,dependencyResolverFn:n??null,loadingState:em.NOT_STARTED,loadingPromise:null,providers:null,hydrateTriggers:null,debug:null,flags:l??0};c?.(d,e,s,o),xm(d,f,e)}let g=u[f];jp(g,p,u);let _=null,v=null;if(g[6]?.length>0){let e=g[6][0].data;v=e.di??null,_=e.s}let y=[null,im.Initial,null,null,null,null,v,_,null,null];ym(u,f,y);let b=null;v!==null&&h&&(b=m.get(Sl),b.add(v,{lView:u,tNode:p,lContainer:g}));let x=()=>{hm(y),v!==null&&b?.cleanup([v])};pm(0,y,()=>Ya(u,x)),Ja(u,x)}function rh(e){$m(0,V(),uo())&&Xm(qm({timeout:e}))}var ih=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 ah(e,t,n,r,i){return e===n&&Object.is(t,r)?1:Object.is(i(e,t),i(n,r))?-1:0}function oh(e,t,n,r){let i,a,o=0,s=e.length-1;if(Array.isArray(t)){P(r);let c=t.length-1;for(P(null);o<=s&&o<=c;){let r=e.at(o),l=t[o],u=ah(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=ah(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 uh,a??=lh(e,o,s,n),sh(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;)ch(e,i,n,o,t[o]),o++}else if(t!=null){P(r);let c=t[Symbol.iterator]();P(null);let l=c.next();for(;!l.done&&o<=s;){let t=e.at(o),r=l.value,u=ah(o,t,o,r,n);if(u!==0)u<0&&e.updateValue(o,r),o++,l=c.next();else{i??=new uh,a??=lh(e,o,s,n);let u=n(o,r);if(sh(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;)ch(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 sh(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function ch(e,t,n,r,i){if(sh(e,t,r,n(r,i)))e.updateValue(r,i);else{let t=e.create(r,i);e.attach(r,t)}}function lh(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 uh=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 K(e,t,n,r,i,a,o,s){Su(`NgControlFlow`);let c=V(),l=so();return Xp(c,l,e,t,n,r,i,Va(l.consts,a),256,o,s),dh}function dh(e,t,n,r,i,a,o,s){Su(`NgControlFlow`);let c=V(),l=so();return Xp(c,l,e,t,n,r,i,Va(l.consts,a),512,o,s),dh}function q(e,t){Su(`NgControlFlow`);let n=V(),r=So(),i=n[r]===lu?-1:n[r],a=i===-1?void 0:vh(n,27+i);if(Lf(n,r,e)){let r=P(null);try{if(a!==void 0&&hf(a,0),e!==-1){let r=27+e,i=vh(n,r),a=Ch(n[1],r),o=kf(i,a,n);mf(i,zd(n,a,t,{dehydratedView:o}),0,Bd(a,o))}}finally{P(r)}}else if(a!==void 0){let e=pf(a,0);e!==void 0&&(e[8]=t)}}var fh=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 ph(e){return e}var mh=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function hh(e,t,n,r,i,a,o,s,c,l,u,d,f){Su(`NgControlFlow`);let p=V(),m=so(),h=c!==void 0,g=V(),_=new mh(h,s?o.bind(g[15][8]):o);g[27+e]=_,Xp(p,m,e+1,t,n,r,i,Va(m.consts,a),256),h&&Xp(p,m,e+2,c,l,u,d,Va(m.consts,f),512)}var gh=class extends ih{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,mf(this.lContainer,t,e,Bd(this.templateTNode,n)),yh(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,bh(this.lContainer,e),xh(this.lContainer,e)}create(e,t){let n=Of(this.lContainer,this.templateTNode.tView.ssrId);return zd(this.hostLView,this.templateTNode,new fh(this.lContainer,t,e),{dehydratedView:n})}destroy(e){Hu(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];Du(e,r),pu.delete(n[19]),r.detachedLeaveAnimationFns=void 0}}function bh(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 xh(e,t){return gf(e,t)}function Sh(e,t){return pf(e,t)}function Ch(e,t){return Ia(e,t)}function wh(e,t,n){let r=V();return Lf(r,So(),t)&&(so(),Cd(Vo(),r,e,t,r[11],n)),wh}function Th(e,t,n,r,i){Pd(t,e,n,i?`class`:`style`,r)}function Eh(e,t,n,r){let i=V(),a=i[1],o=e+27,s=a.firstCreatePass?dp(o,i,2,t,kd,ro(),n,r):a.data[o];if(Da(s)){let n=i[10].tracingService;if(n&&n.componentCreate){let o=a.data[s.directiveStart+s.componentOffset];return n.componentCreate(Nf(o),()=>(Dh(e,t,i,s,r),Eh))}}return Dh(e,t,i,s,r),Eh}function Dh(e,t,n,r,i){if(jd(r,n,e,t,jh),Oa(r)){let e=n[1];yd(e,n,r),kl(e,r,n)}i!=null&&bd(n,r)}function Oh(){let e=so(),t=Md(uo());return e.firstCreatePass&&fp(e,t),ao(t)&&oo(),no(),t.classesWithoutHost!=null&&dc(t)&&Th(e,t,V(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&fc(t)&&Th(e,t,V(),t.stylesWithoutHost,!1),Oh}function kh(e,t,n,r){return Eh(e,t,n,r),Oh(),kh}function J(e,t,n,r){let i=V(),a=i[1],o=e+27,s=a.firstCreatePass?pp(o,a,2,t,n,r):a.data[o];return jd(s,i,e,t,jh),r!=null&&bd(i,s),J}function Y(){return ao(Md(uo()))&&oo(),no(),Y}function Ah(e,t,n,r){return J(e,t,n,r),Y(),Ah}var jh=(e,t,n,r,i)=>(Jo(!0),Bl(t[11],r,Go()));function Mh(){let e=so(),t=Md(uo());return e.firstCreatePass&&fp(e,t),Mh}function Nh(e,t,n){let r=V(),i=r[1],a=e+27,o=i.firstCreatePass?pp(a,i,8,`ng-container`,t,n):i.data[a];return jd(o,r,e,`ng-container`,Ih),n!=null&&bd(r,o),Nh}function Ph(){return Md(uo()),Mh}function Fh(e,t,n){return Nh(e,t,n),Ph(),Fh}var Ih=(e,t,n,r,i)=>(Jo(!0),zl(t[11],``));function Lh(){return V()}function Rh(e,t,n){let r=V();return Lf(r,So(),t)&&(so(),wd(Vo(),r,e,t,r[11],n)),Rh}var zh=`en-US`;function Bh(e){typeof e==`string`&&e.toLowerCase().replace(/_/g,`-`)}function Vh(e,t,n){let r=V(),i=so(),a=uo();return Uh(i,r,r[11],a,e,t,n),Vh}function Hh(e,t,n){let r=V(),i=so(),a=uo();return(a.type&3||n)&&Hf(a,i,r,n,r[11],e,t,Bf(a,r,t)),Hh}function Uh(e,t,n,r,i,a,o){let s=!0,c=null;if((r.type&3||o)&&(c??=Bf(r,t,a),Hf(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 Kh(e){return(e&2)==2}function qh(e,t){return e&131071|t<<17}function Jh(e){return e|2}function Yh(e){return(e&131068)>>2}function Xh(e,t){return e&-131069|t<<2}function Zh(e){return(e&1)==1}function Qh(e){return e|1}function $h(e,t,n,r,i,a){let o=a?t.classBindings:t.styleBindings,s=Gh(o),c=Yh(o);e[r]=n;let l=!1,u;if(Array.isArray(n)){let e=n;u=e[1],(u===null||Bi(e,u)>0)&&(l=!0)}else u=n;if(i){if(c!==0){let t=Gh(e[s+1]);e[r+1]=Wh(t,s),t!==0&&(e[t+1]=Xh(e[t+1],r)),e[s+1]=qh(e[s+1],r)}else e[r+1]=Wh(s,0),s!==0&&(e[s+1]=Xh(e[s+1],r)),s=r}else e[r+1]=Wh(c,0),s===0?s=r:e[c+1]=Xh(e[c+1],r),c=r;l&&(e[r+1]=Jh(e[r+1])),tg(e,u,r,!0),tg(e,u,r,!1),eg(t,u,e,r,a),o=Wh(s,c),a?t.classBindings=o:t.styleBindings=o}function eg(e,t,n,r,i){let a=i?e.residualClasses:e.residualStyles;a!=null&&typeof t==`string`&&Bi(a,t)>=0&&(n[r+1]=Qh(n[r+1]))}function tg(e,t,n,r){let i=e[n+1],a=t===null,o=r?Gh(i):Yh(i),s=!1;for(;o!==0&&(s===!1||a);){let n=e[o],i=e[o+1];ng(n,t)&&(s=!0,e[o+1]=r?Qh(i):Jh(i)),o=r?Gh(i):Yh(i)}s&&(e[n+1]=r?Jh(i):Qh(i))}function ng(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t==`string`?Bi(e,t)>=0:!1}function rg(e,t,n){return ag(e,t,n,!1),rg}function ig(e,t){return ag(e,t,null,!0),ig}function ag(e,t,n,r){let i=V(),a=so(),o=Co(2);if(a.firstUpdatePass&&sg(a,e,o,r),t!==lu&&Lf(i,o,t)){let s=a.data[zo()];mg(a,s,i,i[11],e,i[o+1]=_g(t,n),r,o)}}function og(e,t){return t>=e.expandoStartIndex}function sg(e,t,n,r){let i=e.data;if(i[n+1]===null){let a=i[zo()],o=og(e,n);vg(a,r)&&t===null&&!o&&(t=!1),t=cg(i,a,t,r),$h(i,a,t,n,o,r)}}function cg(e,t,n,r){let i=Oo(e),a=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=fg(null,e,t,n,r),n=pg(n,t.attrs,r),a=null);else{let o=t.directiveStylingLast;if(o===-1||e[o]!==i){if(n=fg(i,e,t,n,r),a===null){let n=lg(e,t,r);n!==void 0&&Array.isArray(n)&&(n=fg(null,e,t,n[1],r),n=pg(n,t.attrs,r),ug(e,t,r,n))}else a=dg(e,t,r)}}return a!==void 0&&(r?t.residualClasses=a:t.residualStyles=a),n}function lg(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Yh(r)!==0)return e[Gh(r)]}function ug(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[Gh(i)]=r}function dg(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?Ui:void 0);let d=l?zi(u,r):c===r?u:void 0;if(a&&!gg(d)&&(d=zi(t,r)),gg(d)&&(s=d,o))return s;let f=e[i+1];i=o?Gh(f):Yh(f)}if(t!==null){let e=a?t.residualClasses:t.residualStyles;e!=null&&(s=zi(e,r))}return s}function gg(e){return e!==void 0}function _g(e,t){return e==null||e===``||(typeof t==`string`?e=Ml(e)+t:typeof e==`object`&&(e=Ur(Ml(e)))),e}function vg(e,t){return!!(e.flags&(t?8:16))}function Z(e,t=``){let n=V(),r=so(),i=e+27,a=r.firstCreatePass?bf(r,i,1,t,null):r.data[i],o=yg(r,n,a,t);n[i]=o,qo()&&Zu(r,n,o,a),mo(a,!1)}var yg=(e,t,n,r)=>(Jo(!0),Ll(t[11],r));function bg(e,t,n,r=``){return Lf(e,So(),n)?t+pi(n)+r:lu}function xg(e,t,n,r,i,a=``){let o=Rf(e,bo(),n,i);return Co(2),o?t+pi(n)+r+pi(i)+a:lu}function Sg(e,t,n,r,i,a,o,s=``){let c=zf(e,bo(),n,i,o);return Co(3),c?t+pi(n)+r+pi(i)+a+pi(o)+s:lu}function Q(e){return $(``,e),Q}function $(e,t,n){let r=V(),i=bg(r,e,t,n);return i!==lu&&Tg(r,zo(),i),$}function Cg(e,t,n,r,i){let a=V(),o=xg(a,e,t,n,r,i);return o!==lu&&Tg(a,zo(),o),Cg}function wg(e,t,n,r,i,a,o){let s=V(),c=Sg(s,e,t,n,r,i,a,o);return c!==lu&&Tg(s,zo(),c),wg}function Tg(e,t,n){let r=Pa(t,e);Rl(e[11],r,n)}function Eg(e,t){let n=e[t];return n===lu?void 0:n}function Dg(e,t,n,r,i,a){let o=t+n;return Lf(e,o,i)?If(e,o+1,a?r.call(a,i):r(i)):Eg(e,o+1)}function Og(e,t){let n=so(),r,i=e+27;n.firstCreatePass?(r=kg(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=Ni(r.type,!0)),o=Ci(Xf);try{let e=Cc(!1),t=a();return Cc(e),Ra(n,V(),i,t),t}finally{Ci(o)}}function kg(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Ag(e,t,n){let r=e+27,i=V(),a=La(i,r);return jg(i,r)?Dg(i,yo(),t,a.transform,n,a):a.transform(n)}function jg(e,t){return e[1].data[t].pure}var Mg=(()=>{class e{applicationErrorHandler=z(ws);appRef=z(Um);taskService=z(rs);ngZone=z(ds);zonelessEnabled=z(Fs);tracing=z(bu,{optional:!0});zoneIsDefined=typeof Zone<`u`&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new er;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ls):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(z(Is,{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?ss:os;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=Qc({token:e,factory:e.ɵfac})}return e})();function Ng(){return[{provide:Ps,useExisting:Mg},{provide:ds,useClass:ys},{provide:Fs,useValue:!0}]}function Pg(){return typeof $localize<`u`&&$localize.locale||`en-US`}var Fg=new L(``,{factory:()=>z(Fg,{optional:!0,skipSelf:!0})||Pg()}),Ig=class{destroyed=!1;listeners=null;errorHandler=z(Cs,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=z($o);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new F(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(Hr(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let t=P(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&&Lg(this.listeners)),P(t),this.isEmitting=!1}}};function Lg(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function Rg(e,t){return Sn(e,t?.equal)}(class e extends Error{_brand;constructor(e){super(e)}static IDLE=new e(`IDLE`);static LOADING=new e(`LOADING`)});function zg(e,t){let n=Object.create(Ys);n.value=e,n.transformFn=t?.transform;function r(){if(rn(n),n.value===Js)throw new F(-950,null);return n.value}return r[en]=n,r}function Bg(e){return new Ig}function Vg(e,t){return zg(e,t)}function Hg(e){return zg(Js,e)}var Ug=(Vg.required=Hg,Vg),Wg=new L(``),Gg=new L(``);function Kg(e){return!e.moduleRef}function qg(e){let t=Kg(e)?e.r3Injector:e.moduleRef.injector,n=t.get(ds);return n.run(()=>{Kg(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(ws),i;if(n.runOutsideAngular(()=>{i=n.onError.subscribe({next:r})}),Kg(e)){let n=()=>t.destroy(),r=e.platformInjector.get(Wg);r.add(n),t.onDestroy(()=>{i.unsubscribe(),r.delete(n)})}else{let t=()=>e.moduleRef.destroy(),n=e.platformInjector.get(Wg);n.add(t),e.moduleRef.onDestroy(()=>{Gm(e.allPlatformModules,e.moduleRef),i.unsubscribe(),n.delete(t)})}return Yg(r,n,()=>{let n=t.get(rs),r=n.add(),i=t.get(Jp);return i.runInitializers(),i.donePromise.then(()=>{if(Bh(t.get(Fg,zh)||`en-US`),!t.get(Gg,!0))return Kg(e)?t.get(Um):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(Kg(e)){let n=t.get(Um);return e.rootComponent!==void 0&&n.bootstrap(e.rootComponent),n}return Jg?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void n.remove(r))})})}var Jg;function Yg(e,t,n){try{let r=n();return Mp(r)?r.catch(n=>{throw t.runOutsideAngular(()=>e(n)),n}):r}catch(n){throw t.runOutsideAngular(()=>e(n)),n}}var Xg=null;function Zg(e=[],t){return Zo.create({name:t,providers:[{provide:ia,useValue:`platform`},{provide:Wg,useValue:new Set([()=>Xg=null])},...e]})}function Qg(e=[]){if(Xg)return Xg;let t=Zg(e);return Xg=t,Vm(),$g(t),t}function $g(e){let t=e.get(ks,null);xa(e,()=>{t?.forEach(e=>e())})}function e_(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:i}=e;W(U.BootstrapApplicationStart);try{let e=i?.injector??Qg(r);return qg({r3Injector:new Fp({providers:[Ng(),Ts,...n||[]],parent:e,debugName:``,runEnvironmentInitializers:!1}).injector,platformInjector:e,rootComponent:t})}catch(e){return Promise.reject(e)}finally{W(U.BootstrapApplicationEnd)}}var t_=null;function n_(){return t_}function r_(e){t_??=e}var i_=class{},a_=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static ɵfac=function(t){return new(t||e)};static ɵpipe=Hp({name:`json`,type:e,pure:!1})}return e})();function o_(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 s_=`browser`,c_=class{_doc;constructor(e){this._doc=e}manager},l_=(()=>{class e extends c_{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)(R(Qo))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})(),u_=new L(``),d_=(()=>{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 l_));this._plugins=n.slice().reverse();let r=e.find(e=>e instanceof l_);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 F(-5101,!1);return this._eventNameToPlugin.set(e,t),t}static ɵfac=function(t){return new(t||e)(R(u_),R(ds))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})(),f_=`ng-app-id`;function p_(e){for(let t of e)t.remove()}function m_(e,t){let n=t.createElement(`style`);return n.textContent=e,n}function h_(e,t,n,r){let i=e.head?.querySelectorAll(`style[${f_}="${t}"],link[${f_}="${t}"]`);if(!i||i.length===0)return!1;for(let e of i)e.removeAttribute(f_),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 g_(e,t){let n=t.createElement(`link`);return n.setAttribute(`rel`,`stylesheet`),n.setAttribute(`href`,e),n}var __=(()=>{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,h_(e,t,this.inline,this.external)&&this.hosts.add(e.head)}addStyles(e,t){for(let t of e)this.addUsage(t,this.inline,m_);t?.forEach(e=>this.addUsage(e,this.external,g_))}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&&(p_(n.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])p_(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,m_(t,this.doc)));for(let[t,{elements:n}]of this.external)n.push(this.addElement(e,g_(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)(R(Qo),R(Ds),R(js,8),R(As))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})(),v_={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`,math:`http://www.w3.org/1998/Math/MathML`},y_=/%COMP%/g,b_=`%COMP%`,x_=`_nghost-${b_}`,S_=`_ngcontent-${b_}`,C_=!0,w_=new L(``,{factory:()=>C_}),T_=new L(``);function E_(e){return S_.replace(y_,e)}function D_(e){return x_.replace(y_,e)}function O_(e,t){return t.map(t=>t.replace(y_,e))}var k_=(()=>{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 A_(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 P_?n.applyToHost(e):n instanceof N_&&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 Al.Emulated:r=new P_(o,s,t,this.appId,c,i,a,l,this.cssVarNamespace);break;case Al.ShadowDom:return new M_(o,e,t,i,a,this.nonce,l,this.cssVarNamespace,s);case Al.ExperimentalIsolatedShadowDom:return new M_(o,e,t,i,a,this.nonce,l,this.cssVarNamespace);default:r=new N_(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)(R(d_),R(Jf),R(Ds),R(w_),R(Qo),R(ds),R(js),R(bu,8),R(T_,8))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})(),A_=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r,i=``){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(v_[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(j_(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){if(e){let r=j_(e)?e.content:e;if(n!=null&&n.parentNode!==r)throw new F(-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 F(-5104,!1);return t||(n.textContent=``),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+`:`+t;let i=v_[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=v_[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){let i=t.startsWith(`--`);i&&(t=t.replace(`%NS%`,this.cssVarNamespace)),i||r&(uu.DashCase|uu.Important)?e.style.setProperty(t,n,r&uu.Important?`important`:``):e.style[t]=n}removeStyle(e,t,n){let r=t.startsWith(`--`);r&&(t=t.replace(`%NS%`,this.cssVarNamespace)),r||n&uu.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=n_().getGlobalEventTarget(this.doc,e),!e))throw new F(-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 j_(e){return e.tagName===`TEMPLATE`&&e.content!==void 0}var M_=class extends A_{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=O_(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=g_(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)}},N_=class extends A_{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?O_(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&&pu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},P_=class extends N_{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=E_(l),this.hostAttr=D_(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}},F_=class e extends i_{supportsDOMEvents=!0;static makeCurrent(){r_(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=L_();return t==null?null:R_(t)}resetBaseElement(){I_=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return o_(document.cookie,e)}},I_=null;function L_(){return I_||=document.head.querySelector(`base`),I_?I_.getAttribute(`href`):null}function R_(e){return new URL(e,document.baseURI).pathname}var z_=[`alt`,`control`,`meta`,`shift`],B_={"\b":`Backspace`," ":`Tab`,"":`Delete`,"\x1B":`Escape`,Del:`Delete`,Esc:`Escape`,Left:`ArrowLeft`,Right:`ArrowRight`,Up:`ArrowUp`,Down:`ArrowDown`,Menu:`ContextMenu`,Scroll:`ScrollLock`,Win:`OS`},V_={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},H_=(()=>{class e extends c_{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(()=>n_().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.`),z_.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=B_[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`),z_.forEach(t=>{if(t!==n){let n=V_[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)(R(Qo))};static ɵprov=Yr({token:e,factory:e.ɵfac})}return e})();async function U_(e,t,n){return e_({rootComponent:e,...W_(t,n)})}function W_(e,t){return{platformRef:t?.platformRef,appProviders:[...Y_,...e?.providers??[]],platformProviders:J_}}function G_(){F_.makeCurrent()}function K_(){return new Cs}function q_(){return hl(document),document}var J_=[{provide:As,useValue:s_},{provide:ks,useValue:G_,multi:!0},{provide:Qo,useFactory:q_}],Y_=[{provide:ia,useValue:`root`},{provide:Cs,useFactory:K_},{provide:u_,useClass:l_,multi:!0},{provide:u_,useClass:H_,multi:!0},k_,{provide:Jf,useClass:__},{provide:__,useExisting:Jf},d_,{provide:jf,useExisting:k_},[]];function X_(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 ev({code:i,why:Q_(a.why,e),fix:Q_(a.fix,e),docs:o,cause:e.cause,sources:e.sources},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function rv(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 lv=Math.random.bind(Math),uv=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function dv(e=21){let t=``,n=e;for(;n--;)t+=uv[lv()*64|0];return t}var fv=6e4,pv=e=>e,mv=pv,{clearTimeout:hv,setTimeout:gv}=globalThis;function _v(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=pv,deserialize:s=mv,resolver:c,bind:l=`rpc`,timeout:u=fv,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}=cv(),_=dv();s.i=_;let v;async function y(n=s){return u>=0&&(v=gv(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{hv(v),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:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$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 v(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(b)}function y(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 b(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&&(hv(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function vv(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var yv=Object.freeze({type:`object`,additionalProperties:!0});function bv(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return yv}return yv}function xv(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 Cv(e,t){return Sv(e,t)??[e]}function wv(e){return typeof e==`string`?`'${e}'`:new Ov().serialize(e)}var Tv=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Ev=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Tv.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Dv(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})(),kv=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Av=[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],jv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Mv=[],Nv=class{_data=new Pv;_hash=new Pv([...kv]);_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)Mv[n]=e[t+n]|0;else{let e=Mv[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Mv[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Mv[n]=t+Mv[n-7]+i+Mv[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+Av[n]+Mv[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=Pv.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 Fv(e){return new Nv().finalize(e).toBase64()}function Iv(e){return Fv(wv(e))}function Lv(e){return Iv(e)}function Rv(){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 zv=/^[\w+.-]{2,}:\/\//;function Bv(e){return e.endsWith(`/`)?e:`${e}/`}function Vv(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Hv(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Bv(n)+e.replace(/^\.?\//,``):e);return n}function Uv(e,t){if(!t||t===`/`||zv.test(e))return e;let n=Vv(t);return e.startsWith(n)?e:Hv(n,e)}function Wv(e,t){let n=e.match(zv);return t+(n?e.slice(n[0].length):e)}var Gv=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Kv(e=21){let t=``,n=e;for(;n--;)t+=Gv[Math.random()*64|0];return t}var qv=Symbol.for(`immer-nothing`),Jv=Symbol.for(`immer-draftable`),Yv=Symbol.for(`immer-state`),Xv=[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 Zv(e,...t){{let n=Xv[e],r=xy(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var Qv=Object,$v=Qv.getPrototypeOf,ey=`constructor`,ty=`prototype`,ny=`configurable`,ry=`enumerable`,iy=`writable`,ay=`value`,oy=e=>!!e&&!!e[Yv];function sy(e){return e?uy(e)||_y(e)||!!e[Jv]||!!e[ey]?.[Jv]||vy(e)||yy(e):!1}var cy=Qv[ty][ey].toString(),ly=new WeakMap;function uy(e){if(!e||!by(e))return!1;let t=$v(e);if(t===null||t===Qv[ty])return!0;let n=Qv.hasOwnProperty.call(t,ey)&&t[ey];if(n===Object)return!0;if(!xy(n))return!1;let r=ly.get(n);return r===void 0&&(r=Function.toString.call(n),ly.set(n,r)),r===cy}function dy(e,t,n=!0){fy(e)===0?(n?Reflect.ownKeys(e):Qv.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function fy(e){let t=e[Yv];return t?t.type_:_y(e)?1:vy(e)?2:yy(e)?3:0}var py=(e,t,n=fy(e))=>n===2?e.has(t):Qv[ty].hasOwnProperty.call(e,t),my=(e,t,n=fy(e))=>n===2?e.get(t):e[t],hy=(e,t,n,r=fy(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function gy(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var _y=Array.isArray,vy=e=>e instanceof Map,yy=e=>e instanceof Set,by=e=>typeof e==`object`,xy=e=>typeof e==`function`,Sy=e=>typeof e==`boolean`;function Cy(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var wy=e=>by(e)?e?.[Yv]:null,Ty=e=>e.copy_||e.base_,Ey=e=>e.modified_?e.copy_:e.base_;function Dy(e,t){if(vy(e))return new Map(e);if(yy(e))return new Set(e);if(_y(e))return Array[ty].slice.call(e);let n=uy(e);if(t===!0||t===`class_only`&&!n){let t=Qv.getOwnPropertyDescriptors(e);delete t[Yv];let n=Reflect.ownKeys(t);for(let r=0;r1&&Qv.defineProperties(e,{set:Ay,add:Ay,clear:Ay,delete:Ay}),Qv.freeze(e),t&&dy(e,(e,t)=>{Oy(t,!0)},!1),e)}function ky(){Zv(2)}var Ay={[ay]:ky};function jy(e){return e===null||!by(e)||Qv.isFrozen(e)}var My=`MapSet`,Ny=`Patches`,Py=`ArrayMethods`,Fy={};function Iy(e){let t=Fy[e];return t||Zv(0,e),t}var Ly=e=>!!Fy[e];function Ry(e,t){Fy[e]||(Fy[e]=t)}var zy,By=()=>zy,Vy=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Ly(My)?Iy(My):void 0,arrayMethodsPlugin_:Ly(Py)?Iy(Py):void 0});function Hy(e,t){t&&(e.patchPlugin_=Iy(Ny),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Uy(e){Wy(e),e.drafts_.forEach(Ky),e.drafts_=null}function Wy(e){e===zy&&(zy=e.parent_)}var Gy=e=>zy=Vy(zy,e);function Ky(e){let t=e[Yv];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function qy(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Yv].modified_&&(Uy(t),Zv(4)),sy(e)&&(e=Jy(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Yv].base_,e,t)}else e=Jy(t,n);return Yy(t,e,!0),Uy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===qv?void 0:e}function Jy(e,t){if(jy(t))return t;let n=t[Yv];if(!n)return rb(t,e.handledSet_,e);if(!Zy(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);tb(n,e)}return n.copy_}function Yy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oy(t,n)}function Xy(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Zy=(e,t)=>e.scope_===t,Qy=[];function $y(e,t,n,r){let i=Ty(e),a=e.type_;if(r!==void 0&&my(i,r,a)===t){hy(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;dy(i,(e,n)=>{if(oy(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Qy;for(let e of o)hy(i,e,n,a)}function eb(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Zy(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Ey(i);$y(e,i.draft_??i,a,n),tb(i,r)})}function tb(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)}Xy(e)}}function nb(e,t,n){let{scope_:r}=e;if(oy(n)){let i=n[Yv];Zy(i,r)&&i.callbacks_.push(function(){fb(e),$y(e,n,Ey(i),t)})}else sy(n)&&e.callbacks_.push(function(){let i=Ty(e);e.type_===3?i.has(n)&&rb(n,r.handledSet_,r):my(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&rb(my(e.copy_,t,e.type_),r.handledSet_,r)})}function rb(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||oy(e)||t.has(e)||!sy(e)||jy(e)?e:(t.add(e),dy(e,(r,i)=>{if(oy(i)){let t=i[Yv];Zy(t,n)&&(hy(e,r,Ey(t),e.type_),Xy(t))}else sy(i)&&rb(i,t,n)}),e)}function ib(e,t){let n=_y(e),r={type_:+!!n,scope_:t?t.scope_:By(),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=ab;n&&(i=[r],a=ob);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var ab={get(e,t){if(t===Yv)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=Ty(e);if(!py(i,t,e.type_))return lb(e,i,t);let a=i[t];if(e.finalized_||!sy(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Cy(t))return a;if(a===sb(e.base_,t)||cb(e,t,a)){fb(e);let n=e.type_===1?+t:t,r=mb(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ty(e)},ownKeys(e){return Reflect.ownKeys(Ty(e))},set(e,t,n){let r=ub(Ty(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=sb(Ty(e),t),i=r?.[Yv];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(gy(n,r)&&(n!==void 0||py(e.base_,t,e.type_)))return!0;fb(e),db(e)}return e.copy_[t]===n&&(n!==void 0||py(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),nb(e,t,n),!0)},deleteProperty(e,t){return fb(e),sb(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),db(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ty(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[iy]:!0,[ny]:e.type_!==1||t!==`length`,[ry]:r[ry],[ay]:n[t]}},defineProperty(){Zv(11)},getPrototypeOf(e){return $v(e.base_)},setPrototypeOf(){Zv(12)}},ob={};for(let e in ab){let t=ab[e];ob[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}ob.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Zv(13),ob.set.call(this,e,t,void 0)},ob.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&Zv(14),ab.set.call(this,e[0],t,n,e[0])};function sb(e,t){let n=e[Yv];return(n?Ty(n):e)[t]}function cb(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!sy(n)||n[Yv]?!1:e.baseRefs_.has(n)}function lb(e,t,n){let r=ub(t,n);return r?ay in r?r[ay]:r.get?.call(e.draft_):void 0}function ub(e,t){if(!(t in e))return;let n=$v(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=$v(n)}}function db(e){e.modified_||(e.modified_=!0,e.parent_&&db(e.parent_))}function fb(e){e.copy_||=(e.assigned_=new Map,Dy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pb=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(xy(e)&&!xy(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}xy(t)||Zv(6),n!==void 0&&!xy(n)&&Zv(7);let r;if(sy(e)){let i=Gy(this),a=mb(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Uy(i):Wy(i)}return Hy(i,n),qy(r,i)}if(!e||!by(e)){if(r=t(e),r===void 0&&(r=e),r===qv&&(r=void 0),this.autoFreeze_&&Oy(r,!0),n){let t=[],i=[];Iy(Ny).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Zv(1,e)},this.produceWithPatches=(e,t)=>{if(xy(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]},Sy(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Sy(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Sy(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){sy(e)||Zv(8),oy(e)&&(e=hb(e));let t=Gy(this),n=mb(t,e,void 0);return n[Yv].isManual_=!0,Wy(t),n}finishDraft(e,t){let n=e&&e[Yv];(!n||!n.isManual_)&&Zv(9);let{scope_:r}=n;return Hy(r,t),qy(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=Iy(Ny).applyPatches_;return oy(e)?r(e,t):this.produce(e,e=>r(e,t))}};function mb(e,t,n,r){let[i,a]=vy(t)?Iy(My).proxyMap_(t,n):yy(t)?Iy(My).proxySet_(t,n):ib(t,n);return(n?.scope_??By()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?eb(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 hb(e){return oy(e)||Zv(10,e),gb(e)}function gb(e){if(!sy(e)||jy(e))return e;let t=e[Yv],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Dy(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Dy(e,!0);return dy(n,(e,t)=>{hy(n,e,gb(t))},r),t&&(t.finalized_=!1),n}function _b(){Xv.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=wy(my(e,n.key_)),i=my(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||py(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e{let u=my(o,e,c),f=my(s,e,c),p=l?py(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===qv?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(yy(e))return new Set(Array.from(e).map(u));let t=Object.create($v(e));for(let n in e)t[n]=u(e[n]);return py(e,Jv)&&(t[Jv]=e[Jv]),t}function d(e){return oy(e)?u(e):e}Ry(Ny,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var vb=new pb,yb=vb.produce,bb=vb.produceWithPatches.bind(vb),xb=vb.applyPatches.bind(vb),Sb=1e3;function Cb(e,t){if(e.add(t),e.size>Sb){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function wb(e){let{enablePatches:t=!1}=e;t&&_b();let n=Rv(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Kv())=>{i.has(t)||(_b(),r=xb(r,e),Cb(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Kv())=>{if(!i.has(a)){if(Cb(i,a),t){let[t,i]=bb(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=yb(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Tb=typeof self==`object`?self:globalThis,Eb=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Db=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function Ob(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=Eb.has(e)?Tb[e]:void 0;return n(new(r??Tb.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`&&Db.has(a))return n(new Tb[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function kb(e){return Ob(new Map,e)(0)}var Ab=``,{toString:jb}={},{keys:Mb}=Object;function Nb(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=jb.call(e).slice(8,-1);switch(n){case`Array`:return[1,Ab];case`Object`:return[2,Ab];case`Date`:return[3,Ab];case`RegExp`:return[4,Ab];case`Map`:return[5,Ab];case`Set`:return[6,Ab];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function Pb([e,t]){return e===0&&(t===`function`||t===`symbol`)}function Fb(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]=Nb(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 Mb(r))(e||!Pb(Nb(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||!(Pb(Nb(n))||Pb(Nb(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Pb(Nb(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Ib(e,t={}){let n=[];return Fb(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:Lb,stringify:Rb}=JSON,zb={json:!0,lossy:!0};function Bb(e){return kb(Lb(e))}function Vb(e){return Rb(Ib(e,zb))}function Hb(e){return kb(e)}function Ub(e){return Vb(e)}function Wb(e){return Bb(e)}var Gb=256,Kb=class extends Error{name=`StreamClosedError`};function qb(e={}){let t=e.id??Kv(),n=Math.max(0,e.replayWindow??0),r=Rv(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new Kb(`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=Yb(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 Jb(e={}){let t=e.id??Kv(),n=Math.max(1,e.highWaterMark??Gb),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 Yb(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 Xb=128;function Zb(e){return e.replace(/[^\w-]+/g,`_`).slice(0,Xb)}var Qb=`modulepreload`,$b=function(e,t){return new URL(e,t).href},ex={},tx=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=$b(t,n),t=s(t),t in ex)return;ex[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`:Qb,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)})},nx=`__connection.json`,rx=`__DEVFRAME_CONNECTION__`,ix=`x-birpc-session`,ax=`__rpc-dump/index.json`,ox=`devframe:services`,sx=`devframe_otp`,cx=`devframe_auth_token`;iv.postMessage.remoteAssetsError;var lx=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Lv(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()}},ux=sv({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 dx(e){if(e.agent&&e.jsonSerializable===!1)throw ux.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function fx(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function px(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 mx(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 _x(e,t){let n=e.handler;if(!n){let r=await gx(e,t);if(!r.handler)throw ux.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 mx(e.name,r,t),o=await a(...n);return await hx(e.name,i,o)}}var vx=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 _x(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 ux.DF0021({name:e.name});dx(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 ux.DF0022({name:e.name});dx(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 _x(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw ux.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 yx(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 xx(t,`undefined`,r,e);return n}return i!==null&&bx(i,r,e,t),n})}function bx(e,t,n,r){if(typeof e==`bigint`)throw xx(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw xx(r,`Map`,t,n);if(e instanceof Set)throw xx(r,`Set`,t,n);if(e instanceof Date)throw xx(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw xx(r,e.constructor?.name??`class instance`,t,n)}function xx(e,t,n,r){let i=Sx(n,r);return ux.DF0020({name:e||``,type:t,path:i})}function Sx(e,t){return Array.isArray(e)?`[${t}]`:t===``?``:t}var Cx=`__DEVFRAME_CONNECTION_META__`,wx=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function Tx(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 Ex(){return Tx(rx)}function Dx(){return Tx(Cx)}function Ox(e){if(e)return e;try{let e=localStorage.getItem(wx);if(e)return e}catch{}return Tx(wx)}function kx(e){globalThis[rx]=e,globalThis[Cx]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&Ax(e.authToken)}function Ax(e){try{localStorage.setItem(wx,e)}catch{}globalThis[wx]=e;let t=Ex();t&&(globalThis[rx]={...t,authToken:e})}function jx(e){let t=Uv(nx,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function Mx(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function Nx(){let e=Ex();if(e)return Mx(e,Ox()??e.authToken??e.connectionMeta.authToken);let t=Dx();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??jx(`./`),authToken:Ox(t.authToken)}}async function Px(e={}){if(e.connection){let t=Mx(e.connection,Ox(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return kx(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:jx(t[0]??`./`),authToken:Ox(e.authToken??e.connectionMeta.authToken)};return kx(n),n}let n=Nx();if(n){let t=Mx(n,Ox(e.authToken??n.authToken??n.connectionMeta.authToken));return kx(t),t}let r=[];for(let n of t){let t=Uv(nx,n),i=jx(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:Ox(e.authToken??r.authToken)};return kx(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Fx=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function Ix(e=sx){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Lx(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 Rx(e=sx){let t=Ix(e);return t&&Lx(e),t}async function zx(e,t={}){let n=Rx(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Bx(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(ox,{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 Vx(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:iv.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:iv.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=wb({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(iv.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var Hx=new Map;function Ux(e=Hx){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?yx(n,r??``):`s:${Ub(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?Wb(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function Wx(){}function Gx(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 Kx(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 qx(e){let{onConnected:t=Wx,onError:n=Wx,onDisconnected:r=Wx,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${cx}=${encodeURIComponent(e.authToken)}`);let s=Ux(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 v(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=Gx(r);if(!e)break;r=e.rest;let{event:t,data:n}=Kx(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 v(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`,[ix]: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 Jx(e,t){let{channel:n,rpcOptions:r={}}=t;return _v(e,{...n,timeout:-1,...r,proxify:!1})}function Yx(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(iv.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 Fx(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Fx(`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(iv.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 Fx(`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(iv.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(iv.client.connectionError,e),m(new Fx(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Fx(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=Jx(a.functions,{channel:v,rpcOptions:o});a.register({name:iv.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Fx(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(iv.client.connectionError,e),m(e),i.emit(iv.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$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 Fx(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(iv.client.connectionError,e)}return i.emit(iv.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(iv.client.isTrustedUpdated,!0)),t}async function ee(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function C(){return c?!0:x(b??``)}async function w(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:C,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:ee,ensureTrusted:w,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(iv.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(iv.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(iv.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function Xx(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 Zx(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Xx(n.sse,r??`./`,location);return Yx({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>qx({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 Qx(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:$x(r)?Qx(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function $x(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function eS(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function tS(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function nS(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function rS(e){if(e.error)throw Qx(e.error);return e.output}function iS(e){return e.some(e=>e!=null)}function aS(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function oS(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Hb(e):e}function a(e,t){return i(aS(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 nS(r)?rS(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(eS(r)){if(iS(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(tS(r)){let e=Lv(n),i=r.records[e];if(i)return rS(await s(i,r.serialization));if(r.fallback)return rS(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!iS(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 sS(e){let t=oS(await e.fetchJsonFromBases(ax),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 cS=``;function lS(e,t){return`${e}${cS}${t}`}function uS(e){let t=new Map,n=new Map;e.client.register({name:iv.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(lS(e,n))?._push(r,i)}}),e.client.register({name:iv.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=lS(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:iv.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=lS(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(iv.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(cS);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=lS(n,r),o=t.get(a);if(o)return o;let s=Jb({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(iv.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=lS(t,r),a=n.get(i);if(a)return a;let o=qb({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 dS(){}var fS=new Map;function pS(e){let t=e.url;e.authToken&&(t=`${t}?${cx}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=dS,onError:i=dS,onDisconnected:a=dS,definitions:o=fS}=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=Ux(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 mS(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 Wv(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function hS(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=mS(n.websocket,r??`./`,location);return Yx({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>pS({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 gS(e){return e.includes(`:`)}function _S(e,t){return gS(t)?t:`${e}:${t}`}function vS(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function yS(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return vS(a)}function bS(e,t){return{global:yS(e,t,`global`),project:yS(e,t,`project`)}}function xS(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(gS(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(_S(t,n),...r)),callEvent:((n,...r)=>e.callEvent(_S(t,n),...r)),callOptional:((n,...r)=>e.callOptional(_S(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(_S(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(_S(t,n),r,i),upload:(n,r)=>e.streaming.upload(_S(t,n),r)}},settings:bS(e,t),scope:e.scope}}function SS(){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 CS(e,t={}){let n=t.modelContext??SS();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=Zb(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=vv(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:xv(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>wS(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 wS(e,t,n){try{let r=Cv(n,e.args?.length);return{content:[{type:`text`,text:TS(await(await _x(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:ES(e)}]}}}function TS(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function ES(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 DS(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 OS(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Rv(),a=Array.isArray(t)?t:[t],o=await Px(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new lx({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new vx(f),m=e.webmcp===!1?void 0:CS(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Uv(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 v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=DS(e.transport??`auto`,s),b=y===`static`?await sS({fetchJsonFromBases:_}):y===`sse`?Zx({...v,sseOptions:e.sseOptions}):hS({...v,wsOptions:e.wsOptions}),x;try{x=new BroadcastChannel(`devframe-auth`)}catch{}let S,ee=!1;function C(e){return((...t)=>ee||!S?e(...t):S.then(()=>e(...t)))}function w(){g=!0;try{h?.(),m?.()}finally{try{x?.close()}finally{b.close?.()}}}let T={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(Ax(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;Ax(t),o={...o,authToken:t};try{x?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:C(b.call),callEvent:C(b.callEvent),callOptional:C(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:w};T.sharedState=Vx(T),T.streaming=uS(T),T.services=Bx(T);let te=new Map;T.scope=(e=>{if(!e)return T;let t=te.get(e);return t||(t=xS(T,e),te.set(e,t)),t}),f.rpc=T;function E(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function ne(){if(e.simpleAuth!==!1&&E()&&typeof globalThis.prompt==`function`)for(await T.requestAuthCode().catch(()=>{});!T.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 T.requestTrustWithCode(t))return}}async function D(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await zx(T,{param:n}):!1;t||r||T.isTrusted||await ne()}return S=D().then(()=>{ee=!0},()=>{ee=!0}),s.mcp&&tx(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-BSqk5AzH.js`);return{setupBrowserAgentRpcBridge:e}},[],import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(T))}).catch(()=>{}),x&&(x.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&T.requestTrustWithToken(e.data.authToken)}),T}var kS=OS,AS=class e{rpc=Ug(null);navigate=Bg();meta=H(null);componentCount=H(0);routeCount=H(0);signalCount=H(0);providerCount=H(0);storeCount=H(0);constructor(){Bs(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);t.rpc.call(`build-meta`).then(e=>this.meta.set(e)).catch(()=>{}),t.rpc.call(`get-components`).then(e=>this.componentCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-routes`).then(e=>this.routeCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-signals`).then(e=>this.signalCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-providers`).then(e=>this.providerCount.set(e.length)).catch(()=>{}),t.rpc.call(`get-ngrx-store`).then(e=>this.storeCount.set(e.length)).catch(()=>{})})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-dashboard`]],inputs:{rpc:[1,`rpc`]},outputs:{navigate:`navigate`},decls:56,vars:9,consts:[[1,`grid`],[1,`card`],[1,`card`,`clickable`,3,`click`],[1,`big`],[1,`sub`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`div`,1)(2,`h3`),Z(3,`Project`),Y(),J(4,`dl`)(5,`dt`),Z(6,`Name`),Y(),J(7,`dd`),Z(8),Y(),J(9,`dt`),Z(10,`Angular`),Y(),J(11,`dd`),Z(12),Y(),J(13,`dt`),Z(14,`TypeScript`),Y(),J(15,`dd`),Z(16),Y(),J(17,`dt`),Z(18,`SSR`),Y(),J(19,`dd`),Z(20),Y()()(),J(21,`div`,2),Hh(`click`,function(){return t.navigate.emit(`components`)}),J(22,`h3`),Z(23,`Components`),Y(),J(24,`p`,3),Z(25),Y(),J(26,`p`,4),Z(27,`discovered in source`),Y()(),J(28,`div`,2),Hh(`click`,function(){return t.navigate.emit(`routes`)}),J(29,`h3`),Z(30,`Routes`),Y(),J(31,`p`,3),Z(32),Y(),J(33,`p`,4),Z(34,`registered paths`),Y()(),J(35,`div`,2),Hh(`click`,function(){return t.navigate.emit(`signals`)}),J(36,`h3`),Z(37,`Signals`),Y(),J(38,`p`,3),Z(39),Y(),J(40,`p`,4),Z(41,`reactive primitives`),Y()(),J(42,`div`,2),Hh(`click`,function(){return t.navigate.emit(`injectors`)}),J(43,`h3`),Z(44,`Injectors`),Y(),J(45,`p`,3),Z(46),Y(),J(47,`p`,4),Z(48,`DI providers`),Y()(),J(49,`div`,2),Hh(`click`,function(){return t.navigate.emit(`store`)}),J(50,`h3`),Z(51,`NgRx Store`),Y(),J(52,`p`,3),Z(53),Y(),J(54,`p`,4),Z(55,`store entries`),Y()()()),e&2&&(G(8),Q(t.meta()?.projectName??`…`),G(4),Q(t.meta()?.angularVersion??`…`),G(4),Q(t.meta()?.typescript??`…`),G(4),Q(t.meta()?.ssr?`Yes`:`No`),G(5),Q(t.componentCount()),G(7),Q(t.routeCount()),G(7),Q(t.signalCount()),G(7),Q(t.providerCount()),G(7),Q(t.storeCount()))},styles:[`.grid[_ngcontent-%COMP%] { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + gap: 16px; + } + .card[_ngcontent-%COMP%] { + background: #18181b; + border: 1px solid #27272a; + border-radius: 10px; + padding: 20px; + } + .card.clickable[_ngcontent-%COMP%] { + cursor: pointer; + transition: border-color 0.15s; + } + .card.clickable[_ngcontent-%COMP%]:hover { + border-color: var(--%NS%accent); + } + h3[_ngcontent-%COMP%] { + font-size: 13px; + text-transform: uppercase; + color: #71717a; + margin-bottom: 12px; + letter-spacing: 0.05em; + } + dl[_ngcontent-%COMP%] { + display: grid; + grid-template-columns: auto 1fr; + gap: 6px 12px; + font-size: 14px; + } + dt[_ngcontent-%COMP%] { + color: #a1a1aa; + } + dd[_ngcontent-%COMP%] { + color: #e4e4e7; + font-weight: 500; + } + .big[_ngcontent-%COMP%] { + font-size: 36px; + font-weight: 700; + color: var(--%NS%accent); + } + .sub[_ngcontent-%COMP%] { + font-size: 13px; + color: #71717a; + margin-top: 4px; + }`]})},jS=(e,t)=>t.selector,MS=(e,t)=>t.token+t.line;function NS(e,t){e&1&&(J(0,`p`,3),Z(1,`Scanning components…`),Y())}function PS(e,t){e&1&&(J(0,`p`,3),Z(1,`No components found.`),Y())}function FS(e,t){if(e&1&&(J(0,`div`,10)(1,`span`,11),Z(2,`Inputs:`),Y(),Z(3),Y()),e&2){let e=X().$implicit;G(3),$(` `,e.inputs.join(`, `),` `)}}function IS(e,t){if(e&1&&(J(0,`div`,10)(1,`span`,11),Z(2,`Outputs:`),Y(),Z(3),Y()),e&2){let e=X().$implicit;G(3),$(` `,e.outputs.join(`, `),` `)}}function LS(e,t){if(e&1){let e=Lh();J(0,`li`,7),Hh(`click`,function(){let t=co(e).$implicit;return lo(X(2).select(t))}),J(1,`div`,8),Z(2),Y(),J(3,`div`,9),Z(4),Y(),K(5,FS,4,1,`div`,10),K(6,IS,4,1,`div`,10),Y()}if(e&2){let e=t.$implicit;G(2),$(`<`,e.selector,`>`),G(2),Q(e.file),G(),q(e.inputs.length?5:-1),G(),q(e.outputs.length?6:-1)}}function RS(e,t){if(e&1&&(J(0,`ul`,4),hh(1,LS,7,4,`li`,6,jS),Y()),e&2){let e=X();G(),_h(e.filtered())}}function zS(e,t){if(e&1&&(J(0,`dt`),Z(1,`Inputs`),Y(),J(2,`dd`),Z(3),Y()),e&2){let e=X(2);G(3),Q(e.selected().inputs.join(`, `))}}function BS(e,t){if(e&1&&(J(0,`dt`),Z(1,`Outputs`),Y(),J(2,`dd`),Z(3),Y()),e&2){let e=X(2);G(3),Q(e.selected().outputs.join(`, `))}}function VS(e,t){if(e&1&&(J(0,`span`,17),Z(1),Y()),e&2){let e=X().$implicit;G(),$(`→ `,e.source)}}function HS(e,t){if(e&1&&(J(0,`li`,14)(1,`span`,15),Z(2),Y(),J(3,`span`,16),Z(4),Y(),K(5,VS,2,1,`span`,17),Y()),e&2){let e=t.$implicit;G(2),Q(e.token),G(2),Q(e.type),G(),q(e.source&&e.source!==`class`&&e.source!==`providers array`?5:-1)}}function US(e,t){if(e&1&&(J(0,`h4`),Z(1,`Injected Providers`),Y(),J(2,`ul`,13),hh(3,HS,6,3,`li`,14,MS),Y()),e&2){let e=X(2);G(3),_h(e.selectedProviders())}}function WS(e,t){e&1&&(J(0,`p`,12),Z(1,`No injected providers detected.`),Y())}function GS(e,t){if(e&1&&(J(0,`aside`,5)(1,`h3`),Z(2),Y(),J(3,`dl`)(4,`dt`),Z(5,`File`),Y(),J(6,`dd`),Z(7),Y(),K(8,zS,4,1),K(9,BS,4,1),J(10,`dt`),Z(11,`Standalone`),Y(),J(12,`dd`),Z(13),Y()(),K(14,US,5,0)(15,WS,2,0,`p`,12),Y()),e&2){let e=X();G(2),$(`<`,e.selected().selector,`>`),G(5),Q(e.selected().file),G(),q(e.selected().inputs.length?8:-1),G(),q(e.selected().outputs.length?9:-1),G(4),Q(e.selected().isStandalone?`Yes`:`No`),G(),q(e.selectedProviders().length?14:15)}}var KS=class e{rpc=Ug(null);components=H([]);allProviders=H([]);filter=H(``);loading=H(!1);selected=H(null);selectedProviders=H([]);filtered=H([]);constructor(){Bs(()=>{let e=this.filter().toLowerCase(),t=this.components();this.filtered.set(e?t.filter(t=>t.selector.includes(e)||t.file.includes(e)):t)}),Bs(()=>{this.rpc()&&this.refresh()})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0);try{let t=e.scope(`ng-devtools`),[n,r]=await Promise.all([t.rpc.call(`get-components`),t.rpc.call(`get-providers`)]);this.components.set(n),this.allProviders.set(r);let i=this.selected();i&&this.selectedProviders.set(r.filter(e=>e.file===i.file))}finally{this.loading.set(!1)}}}select(e){this.selected.set(e),this.selectedProviders.set(this.allProviders().filter(t=>t.file===e.file));let t=this.rpc();t&&t.scope(`ng-devtools`).rpc.callEvent(`select-component`,e.selector)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-component-tree`]],inputs:{rpc:[1,`rpc`]},decls:8,vars:3,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter components…`,3,`input`,`value`],[3,`click`],[1,`muted`],[`role`,`list`,1,`component-list`],[1,`detail`],[1,`component-item`],[1,`component-item`,3,`click`],[1,`selector`],[1,`file`],[1,`io`],[1,`label`],[1,`no-providers`],[`role`,`list`,1,`provider-list`],[1,`provider-item`],[1,`provider-token`],[1,`provider-type`],[1,`provider-source`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`input`,1),Hh(`input`,function(e){return t.filter.set(e.target.value)}),Y(),J(2,`button`,2),Hh(`click`,function(){return t.refresh()}),Z(3,`Refresh`),Y()(),K(4,NS,2,0,`p`,3)(5,PS,2,0,`p`,3)(6,RS,3,0,`ul`,4),K(7,GS,16,6,`aside`,5)),e&2&&(G(),Rh(`value`,t.filter()),G(3),q(t.loading()?4:t.filtered().length===0?5:6),G(3),q(t.selected()?7:-1))},styles:[`.toolbar[_ngcontent-%COMP%] { + display: flex; + gap: 8px; + margin-bottom: 16px; + } + input[_ngcontent-%COMP%] { + flex: 1; + padding: 8px 12px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 6px; + color: #e4e4e7; + font-size: 14px; + outline: none; + } + input[_ngcontent-%COMP%]:focus { + border-color: var(--%NS%accent); + } + button[_ngcontent-%COMP%] { + padding: 8px 16px; + background: #3f3f46; + border: none; + border-radius: 6px; + color: #e4e4e7; + cursor: pointer; + font-size: 13px; + } + button[_ngcontent-%COMP%]:hover { + background: #52525b; + } + .muted[_ngcontent-%COMP%] { + color: #71717a; + font-size: 14px; + } + .component-list[_ngcontent-%COMP%] { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + gap: 8px; + } + .component-item[_ngcontent-%COMP%] { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 12px 16px; + cursor: pointer; + transition: border-color 0.15s; + } + .component-item[_ngcontent-%COMP%]:hover { + border-color: var(--%NS%accent); + } + .selector[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 15px; + color: var(--%NS%accent); + font-weight: 600; + } + .file[_ngcontent-%COMP%] { + font-size: 12px; + color: #71717a; + margin-top: 2px; + } + .io[_ngcontent-%COMP%] { + font-size: 13px; + color: #a1a1aa; + margin-top: 4px; + } + .io[_ngcontent-%COMP%] .label[_ngcontent-%COMP%] { + color: #71717a; + } + .detail[_ngcontent-%COMP%] { + margin-top: 16px; + padding: 16px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + } + .detail[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { + font-family: monospace; + color: var(--%NS%accent); + margin-bottom: 12px; + } + dl[_ngcontent-%COMP%] { + display: grid; + grid-template-columns: auto 1fr; + gap: 4px 12px; + font-size: 13px; + margin-bottom: 16px; + } + dt[_ngcontent-%COMP%] { + color: #71717a; + } + dd[_ngcontent-%COMP%] { + color: #e4e4e7; + } + h4[_ngcontent-%COMP%] { + font-size: 12px; + text-transform: uppercase; + letter-spacing: 0.05em; + color: #71717a; + margin-bottom: 8px; + } + .provider-list[_ngcontent-%COMP%] { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + gap: 6px; + } + .provider-item[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 8px; + padding: 6px 10px; + background: #09090b; + border: 1px solid #27272a; + border-radius: 6px; + font-size: 13px; + } + .provider-token[_ngcontent-%COMP%] { + font-family: monospace; + color: #e4e4e7; + font-weight: 600; + } + .provider-type[_ngcontent-%COMP%] { + font-size: 11px; + padding: 1px 6px; + border-radius: 4px; + background: #3f3f46; + color: #a1a1aa; + } + .provider-source[_ngcontent-%COMP%] { + font-size: 12px; + color: #71717a; + } + .no-providers[_ngcontent-%COMP%] { + font-size: 13px; + color: #52525b; + }`]})},qS=(e,t)=>t.path+t.file;function JS(e,t){e&1&&(J(0,`p`,3),Z(1,`Scanning routes…`),Y())}function YS(e,t){e&1&&(J(0,`p`,3),Z(1,`No routes found.`),Y())}function XS(e,t){if(e&1&&(J(0,`tr`)(1,`td`,5),Z(2),Y(),J(3,`td`),Z(4),Y(),J(5,`td`,6),Z(6),Y(),J(7,`td`),Z(8),Y()()),e&2){let e=t.$implicit;G(2),$(`/`,e.path),G(2),Q(e.component??`—`),G(2),Q(e.file),G(2),Q(e.hasChildren?`Yes`:`—`)}}function ZS(e,t){if(e&1&&(J(0,`table`,4)(1,`thead`)(2,`tr`)(3,`th`),Z(4,`Path`),Y(),J(5,`th`),Z(6,`Component`),Y(),J(7,`th`),Z(8,`File`),Y(),J(9,`th`),Z(10,`Children`),Y()()(),J(11,`tbody`),hh(12,XS,9,4,`tr`,null,qS),Y()()),e&2){let e=X();G(12),_h(e.filtered())}}var QS=class e{rpc=Ug(null);routes=H([]);filter=H(``);loading=H(!1);filtered=H([]);constructor(){Bs(()=>{let e=this.filter().toLowerCase(),t=this.routes();this.filtered.set(e?t.filter(t=>t.path.includes(e)||t.file.includes(e)):t)}),Bs(()=>{this.rpc()&&this.refresh()})}async refresh(){let e=this.rpc();if(e){this.loading.set(!0);try{let t=await e.scope(`ng-devtools`).rpc.call(`get-routes`);this.routes.set(t)}finally{this.loading.set(!1)}}}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-route-inspector`]],inputs:{rpc:[1,`rpc`]},decls:7,vars:2,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter routes…`,3,`input`,`value`],[3,`click`],[1,`muted`],[`role`,`table`],[1,`path`],[1,`file`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`input`,1),Hh(`input`,function(e){return t.filter.set(e.target.value)}),Y(),J(2,`button`,2),Hh(`click`,function(){return t.refresh()}),Z(3,`Refresh`),Y()(),K(4,JS,2,0,`p`,3)(5,YS,2,0,`p`,3)(6,ZS,14,0,`table`,4)),e&2&&(G(),Rh(`value`,t.filter()),G(3),q(t.loading()?4:t.filtered().length===0?5:6))},styles:[`.toolbar[_ngcontent-%COMP%] { + display: flex; + gap: 8px; + margin-bottom: 16px; + } + input[_ngcontent-%COMP%] { + flex: 1; + padding: 8px 12px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 6px; + color: #e4e4e7; + font-size: 14px; + outline: none; + } + input[_ngcontent-%COMP%]:focus { + border-color: var(--%NS%accent); + } + button[_ngcontent-%COMP%] { + padding: 8px 16px; + background: #3f3f46; + border: none; + border-radius: 6px; + color: #e4e4e7; + cursor: pointer; + font-size: 13px; + } + button[_ngcontent-%COMP%]:hover { + background: #52525b; + } + .muted[_ngcontent-%COMP%] { + color: #71717a; + font-size: 14px; + } + table[_ngcontent-%COMP%] { + width: 100%; + border-collapse: collapse; + font-size: 14px; + } + thead[_ngcontent-%COMP%] { + position: sticky; + top: 0; + } + th[_ngcontent-%COMP%] { + text-align: left; + padding: 8px 12px; + background: #18181b; + color: #71717a; + font-size: 12px; + text-transform: uppercase; + letter-spacing: 0.05em; + border-bottom: 1px solid #27272a; + } + td[_ngcontent-%COMP%] { + padding: 10px 12px; + border-bottom: 1px solid #1e1e22; + } + tr[_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%] { + background: #18181b; + } + .path[_ngcontent-%COMP%] { + font-family: monospace; + color: var(--%NS%accent); + font-weight: 500; + } + .file[_ngcontent-%COMP%] { + font-size: 12px; + color: #71717a; + }`]})},$S=(e,t)=>t.name+t.file+t.line,eC=(e,t)=>t.kind,tC=(e,t)=>t.id;function nC(e,t){e&1&&(J(0,`div`,3)(1,`p`,4),Z(2,`No signals found.`),Y(),J(3,`p`,5),Z(4,` No signal(), computed(), effect() calls found in source. Runtime graph requires Angular 19+ with the overlay connected. `),Y()())}function rC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · in <`,e.component,`> `)}}function iC(e,t){if(e&1&&(J(0,`div`,8)(1,`div`,9)(2,`span`,10),Z(3),Y(),J(4,`span`,11),Z(5),Y()(),J(6,`div`,12),Z(7),K(8,rC,1,1),Y()()),e&2){let e=t.$implicit,n=X(2);G(2),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(2),Q(e.name),G(2),Cg(` `,e.file,`:`,e.line,` `),G(),q(e.component?8:-1)}}function aC(e,t){if(e&1&&(J(0,`p`,6),Z(1,`Signals from source scan (static analysis):`),Y(),J(2,`div`,7),hh(3,iC,9,7,`div`,8,$S),Y()),e&2){let e=X();G(3),_h(e.filteredSourceSignals())}}function oC(e,t){if(e&1&&(J(0,`span`,14),Ah(1,`span`,17),Z(2),Y()),e&2){let e=t.$implicit;G(),rg(`background`,e.color),G(),$(` `,e.kind,` `)}}function sC(e,t){e&1&&(J(0,`span`,19),Z(1,`watching`),Y())}function cC(e,t){if(e&1&&(J(0,`div`,20),Z(1),Og(2,`json`),Y()),e&2){let e=X().$implicit;G(),Q(Ag(2,1,e.value))}}function lC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · Deps: `,X(2).getDependencies(e).length,` `)}}function uC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · Consumers: `,X(2).getConsumers(e).length,` `)}}function dC(e,t){if(e&1){let e=Lh();J(0,`div`,18),Hh(`click`,function(){let t=co(e).$implicit;return lo(X(2).selectNode(t))}),J(1,`div`,9)(2,`span`,10),Z(3),Y(),J(4,`span`,11),Z(5),Y(),K(6,sC,2,0,`span`,19),Y(),K(7,cC,3,3,`div`,20),J(8,`div`,12),Z(9),K(10,lC,1,1),K(11,uC,1,1),Y()()}if(e&2){let e=t.$implicit,n=X(2);ig(`selected`,n.selectedNode()?.id===e.id),G(2),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(2),Q(e.label??`(unnamed)`),G(),q(e.watched?6:-1),G(),q(e.value===void 0?-1:7),G(2),$(` Epoch: `,e.epoch,` `),G(),q(n.getDependencies(e).length?10:-1),G(),q(n.getConsumers(e).length?11:-1)}}function fC(e,t){if(e&1&&(J(0,`dt`),Z(1,`Value`),Y(),J(2,`dd`)(3,`pre`),Z(4),Og(5,`json`),Y()()),e&2){let e=X(3);G(4),Q(Ag(5,1,e.selectedNode().value))}}function pC(e,t){if(e&1&&(J(0,`li`)(1,`span`,21),Z(2),Y(),Z(3),Y()),e&2){let e=t.$implicit,n=X(4);G(),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(),$(` `,e.label??e.id,` `)}}function mC(e,t){if(e&1&&(J(0,`h4`),Z(1,`Dependencies (producers)`),Y(),J(2,`ul`),hh(3,pC,4,4,`li`,null,tC),Y()),e&2){let e=X(3);G(3),_h(e.getDependencies(e.selectedNode()))}}function hC(e,t){if(e&1&&(J(0,`li`)(1,`span`,21),Z(2),Y(),Z(3),Y()),e&2){let e=t.$implicit,n=X(4);G(),rg(`background`,n.kindColor(e.kind)),G(),Q(e.kind),G(),$(` `,e.label??e.id,` `)}}function gC(e,t){if(e&1&&(J(0,`h4`),Z(1,`Consumers`),Y(),J(2,`ul`),hh(3,hC,4,4,`li`,null,tC),Y()),e&2){let e=X(3);G(3),_h(e.getConsumers(e.selectedNode()))}}function _C(e,t){if(e&1&&(J(0,`aside`,16)(1,`h3`),Z(2),Y(),J(3,`dl`)(4,`dt`),Z(5,`Kind`),Y(),J(6,`dd`),Z(7),Y(),J(8,`dt`),Z(9,`Epoch`),Y(),J(10,`dd`),Z(11),Y(),K(12,fC,6,3),Y(),K(13,mC,5,0),K(14,gC,5,0),Y()),e&2){let e=X(2);G(2),Q(e.selectedNode().label??e.selectedNode().id),G(5),Q(e.selectedNode().kind),G(4),Q(e.selectedNode().epoch),G(),q(e.selectedNode().value===void 0?-1:12),G(),q(e.getDependencies(e.selectedNode()).length?13:-1),G(),q(e.getConsumers(e.selectedNode()).length?14:-1)}}function vC(e,t){if(e&1&&(J(0,`div`,13),hh(1,oC,3,3,`span`,14,eC),Y(),J(3,`div`,7),hh(4,dC,12,11,`div`,15,tC),Y(),K(6,_C,15,6,`aside`,16)),e&2){let e=X();G(),_h(e.kindLegend),G(3),_h(e.filteredNodes()),G(2),q(e.selectedNode()?6:-1)}}var yC={signal:`#a78bfa`,computed:`#60a5fa`,linkedSignal:`#34d399`,effect:`#fb923c`,template:`#94a3b8`,afterRenderEffectPhase:`#f472b6`,childSignalProp:`#c084fc`,"input (signal)":`#f59e0b`,"input.required (signal)":`#f59e0b`,"output (signal)":`#ec4899`,"model (signal)":`#14b8a6`,"model.required (signal)":`#14b8a6`,"viewChild (signal)":`#8b5cf6`,"viewChild.required (signal)":`#8b5cf6`,"viewChildren (signal)":`#8b5cf6`,"contentChild (signal)":`#6366f1`,"contentChild.required (signal)":`#6366f1`,"contentChildren (signal)":`#6366f1`,resource:`#06b6d4`,unknown:`#71717a`},bC=class e{rpc=Ug(null);graph=H(null);sourceSignals=H([]);filter=H(``);selectedNode=H(null);kindLegend=Object.entries(yC).map(([e,t])=>({kind:e,color:t}));filteredNodes=Rg(()=>{let e=this.graph();if(!e)return[];let t=this.filter().toLowerCase();return t?e.nodes.filter(e=>(e.label??``).toLowerCase().includes(t)||e.kind.includes(t)):e.nodes});filteredSourceSignals=Rg(()=>{let e=this.filter().toLowerCase(),t=this.sourceSignals();return e?t.filter(t=>t.name.toLowerCase().includes(e)||t.kind.includes(e)||t.file.includes(e)):t});constructor(){Bs(()=>{let e=this.rpc();e&&(this.loadSignalGraph(e),this.loadSourceSignals(e))})}async loadSignalGraph(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`signal-graph`),n=t.value();n?.graph&&this.graph.set(n.graph),t.on(`updated`,e=>{e?.graph&&this.graph.set(e.graph)})}async loadSourceSignals(e){let t=e.scope(`ng-devtools`);try{let e=await t.rpc.call(`get-signals`);this.sourceSignals.set(e)}catch{}}selectNode(e){this.selectedNode.set(this.selectedNode()?.id===e.id?null:e)}kindColor(e){return yC[e]??yC.unknown}getDependencies(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.consumer===n).map(e=>t.nodes[e.producer]).filter(Boolean)}getConsumers(e){let t=this.graph();if(!t)return[];let n=t.nodes.findIndex(t=>t.id===e.id);return t.edges.filter(e=>e.producer===n).map(e=>t.nodes[e.consumer]).filter(Boolean)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-signal-inspector`]],inputs:{rpc:[1,`rpc`]},decls:7,vars:5,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by name or kind…`,3,`input`,`value`],[1,`label`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`source-label`],[1,`nodes`],[1,`node-card`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`legend`],[1,`legend-item`],[1,`node-card`,3,`selected`],[1,`detail-panel`],[1,`dot`],[1,`node-card`,3,`click`],[1,`watched-badge`],[1,`node-value`],[1,`kind-badge`,`sm`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`input`,1),Hh(`input`,function(e){return t.filter.set(e.target.value)}),Y(),J(2,`span`,2),Z(3),Y()(),K(4,nC,5,0,`div`,3),K(5,aC,5,0),K(6,vC,7,1)),e&2&&(G(),Rh(`value`,t.filter()),G(2),$(`Component: `,t.graph()?.componentSelector??`—`),G(),q(!t.graph()&&t.sourceSignals().length===0?4:-1),G(),q(!t.graph()&&t.sourceSignals().length>0?5:-1),G(),q(t.graph()?6:-1))},dependencies:[a_],styles:[`.toolbar[_ngcontent-%COMP%] { + display: flex; + gap: 12px; + align-items: center; + margin-bottom: 16px; + } + input[_ngcontent-%COMP%] { + flex: 1; + padding: 8px 12px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 6px; + color: #e4e4e7; + font-size: 14px; + outline: none; + } + input[_ngcontent-%COMP%]:focus { + border-color: var(--%NS%accent); + } + .label[_ngcontent-%COMP%] { + font-size: 13px; + color: #71717a; + white-space: nowrap; + } + .empty[_ngcontent-%COMP%] { + text-align: center; + padding: 48px 16px; + } + .muted[_ngcontent-%COMP%] { + color: #71717a; + font-size: 14px; + } + .hint[_ngcontent-%COMP%] { + color: #52525b; + font-size: 12px; + margin-top: 8px; + } + .source-label[_ngcontent-%COMP%] { + font-size: 13px; + color: #71717a; + margin-bottom: 12px; + } + .legend[_ngcontent-%COMP%] { + display: flex; + gap: 12px; + flex-wrap: wrap; + margin-bottom: 16px; + } + .legend-item[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 4px; + font-size: 12px; + color: #a1a1aa; + } + .dot[_ngcontent-%COMP%] { + width: 8px; + height: 8px; + border-radius: 50%; + } + .nodes[_ngcontent-%COMP%] { + display: flex; + flex-direction: column; + gap: 8px; + } + .node-card[_ngcontent-%COMP%] { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 12px 16px; + cursor: pointer; + transition: border-color 0.15s; + } + .node-card[_ngcontent-%COMP%]:hover { + border-color: #3f3f46; + } + .node-card.selected[_ngcontent-%COMP%] { + border-color: var(--%NS%accent); + } + .node-header[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 8px; + } + .kind-badge[_ngcontent-%COMP%] { + font-size: 11px; + padding: 2px 8px; + border-radius: 4px; + color: #fff; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + } + .kind-badge.sm[_ngcontent-%COMP%] { + font-size: 10px; + padding: 1px 5px; + } + .node-label[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 14px; + color: #e4e4e7; + } + .watched-badge[_ngcontent-%COMP%] { + font-size: 10px; + padding: 1px 6px; + border-radius: 4px; + background: #14532d; + color: #4ade80; + } + .node-value[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 12px; + color: #a1a1aa; + margin-top: 4px; + max-height: 40px; + overflow: hidden; + } + .node-meta[_ngcontent-%COMP%] { + font-size: 11px; + color: #52525b; + margin-top: 4px; + } + .detail-panel[_ngcontent-%COMP%] { + margin-top: 16px; + padding: 16px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + } + .detail-panel[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { + font-family: monospace; + color: var(--%NS%accent); + margin-bottom: 12px; + } + .detail-panel[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] { + font-size: 12px; + color: #71717a; + margin: 12px 0 4px; + text-transform: uppercase; + letter-spacing: 0.05em; + } + dl[_ngcontent-%COMP%] { + display: grid; + grid-template-columns: auto 1fr; + gap: 4px 12px; + font-size: 13px; + } + dt[_ngcontent-%COMP%] { + color: #71717a; + } + dd[_ngcontent-%COMP%] { + color: #e4e4e7; + } + pre[_ngcontent-%COMP%] { + font-size: 12px; + white-space: pre-wrap; + margin: 0; + } + ul[_ngcontent-%COMP%] { + list-style: none; + padding: 0; + font-size: 13px; + } + li[_ngcontent-%COMP%] { + padding: 2px 0; + color: #a1a1aa; + display: flex; + align-items: center; + gap: 6px; + }`]})},xC=(e,t)=>t.type,SC=(e,t)=>t.token+t.file+t.line,CC=(e,t)=>t.injector.id,wC=(e,t)=>t.node.injector.id,TC=(e,t)=>t.token;function EC(e,t){e&1&&(J(0,`div`,4)(1,`p`,5),Z(2,`No DI data found.`),Y(),J(3,`p`,6),Z(4,` No providers, injectables, or inject() calls found. Runtime tree requires Angular 17+ with the overlay connected. `),Y()())}function DC(e,t){if(e&1&&(J(0,`span`,14),Z(1),Y()),e&2){let e=X().$implicit;G(),$(`providedIn: `,e.providedIn)}}function OC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · as `,e.source,` `)}}function kC(e,t){if(e&1&&(J(0,`div`,11)(1,`div`,12)(2,`span`,13),Z(3),Y(),K(4,DC,2,1,`span`,14),Y(),J(5,`div`,15),Z(6),K(7,OC,1,1),Y()()),e&2){let e=t.$implicit;G(3),Q(e.token),G(),q(e.providedIn?4:-1),G(2),Cg(` `,e.file,`:`,e.line,` `),G(),q(e.source!==`class`&&e.source!==`providers array`?7:-1)}}function AC(e,t){if(e&1&&(J(0,`div`,9)(1,`h3`),Z(2),Y(),J(3,`div`,10),hh(4,kC,8,5,`div`,11,SC),Y()()),e&2){let e=t.$implicit;G(2),Cg(``,e.label,` (`,e.items.length,`)`),G(2),_h(e.items)}}function jC(e,t){if(e&1&&(J(0,`p`,7),Z(1,`DI from source scan (static analysis):`),Y(),J(2,`div`,8),hh(3,AC,6,2,`div`,9,xC),Y()),e&2){let e=X();G(3),_h(e.groupedProviders())}}function MC(e,t){e&1&&Fh(0)}function NC(e,t){if(e&1&&(J(0,`span`,24),Z(1),Y()),e&2){let e=X().$implicit;G(),$(``,e.node.injector.providerCount,` providers`)}}function PC(e,t){if(e&1){let e=Lh();J(0,`div`,21),Hh(`click`,function(){let t=co(e).$implicit;return lo(X(4).select(t.node))}),J(1,`span`,22),Z(2),Y(),J(3,`span`,23),Z(4),Y(),K(5,NC,2,1,`span`,24),Y()}if(e&2){let e=t.$implicit,n=X(4);rg(`padding-left`,e.depth*24+12,`px`),ig(`selected`,n.selectedId()===e.node.injector.id),G(),rg(`background`,n.typeColor(e.node.injector.type)),G(),$(` `,e.node.injector.type,` `),G(2),Q(e.node.injector.name),G(),q(e.node.injector.providerCount>0?5:-1)}}function FC(e,t){if(e&1&&(J(0,`div`,19),hh(1,PC,6,9,`div`,20,wC),Y()),e&2){let e=X().$implicit,t=X(2);G(),_h(t.flattenTree(e))}}function IC(e,t){e&1&&(Zp(0,MC,1,0,`ng-container`,18)(1,FC,3,0),nh(2,1),rh()),e&2&&Rh(`ngTemplateOutlet`,void 0)}function LC(e,t){e&1&&(J(0,`p`,5),Z(1,`No providers configured on this injector.`),Y())}function RC(e,t){if(e&1&&(J(0,`tr`)(1,`td`,13),Z(2),Y(),J(3,`td`),Z(4),Y(),J(5,`td`),Z(6),Y()()),e&2){let e=t.$implicit;G(2),Q(e.token),G(2),Q(e.type),G(2),Q(e.isViewProvider?`Yes`:`—`)}}function zC(e,t){if(e&1&&(J(0,`table`,26)(1,`thead`)(2,`tr`)(3,`th`),Z(4,`Token`),Y(),J(5,`th`),Z(6,`Type`),Y(),J(7,`th`),Z(8,`View`),Y()()(),J(9,`tbody`),hh(10,RC,7,3,`tr`,null,TC),Y()()),e&2){let e=X(3);G(10),_h(e.selectedInjector().providers)}}function BC(e,t){if(e&1&&(J(0,`aside`,17)(1,`div`,25)(2,`span`,22),Z(3),Y(),J(4,`h3`),Z(5),Y()(),K(6,LC,2,0,`p`,5)(7,zC,12,0,`table`,26),Y()),e&2){let e=X(2);G(2),rg(`background`,e.typeColor(e.selectedInjector().injector.type)),G(),$(` `,e.selectedInjector().injector.type,` `),G(2),Q(e.selectedInjector().injector.name),G(),q(e.selectedInjector().providers.length===0?6:7)}}function VC(e,t){if(e&1&&(J(0,`div`,16),hh(1,IC,4,1,null,null,CC),Y(),K(3,BC,8,5,`aside`,17)),e&2){let e=X();G(),_h(e.filteredRoots()),G(2),q(e.selectedInjector()?3:-1)}}var HC={element:`#60a5fa`,environment:`#34d399`,null:`#71717a`},UC=class e{rpc=Ug(null);roots=H([]);sourceProviders=H([]);filter=H(``);hideEmpty=H(!1);selectedId=H(null);selectedInjector=Rg(()=>{let e=this.selectedId();return e?this.findNode(this.roots(),e):null});filteredRoots=Rg(()=>{let e=this.roots();this.hideEmpty()&&(e=this.filterEmpty(e));let t=this.filter().toLowerCase();return t&&(e=this.filterByQuery(e,t)),e});groupedProviders=Rg(()=>{let e=this.sourceProviders(),t=this.filter().toLowerCase(),n=t?e.filter(e=>e.token.toLowerCase().includes(t)||e.file.includes(t)):e,r=[{type:`root-provider`,label:`Root Providers (provide*)`,items:[]},{type:`injectable`,label:`Injectable Services`,items:[]},{type:`injection`,label:`inject() Calls`,items:[]},{type:`provider`,label:`Component Providers`,items:[]}];for(let e of n){let t=r.find(t=>t.type===e.type);t&&t.items.push(e)}return r.filter(e=>e.items.length>0)});constructor(){Bs(()=>{let e=this.rpc();e&&(this.loadInjectorTree(e),this.loadSourceProviders(e))})}async loadInjectorTree(e){let t=await e.scope(`ng-devtools`).rpc.sharedState(`injector-tree`),n=t.value();n?.roots?.length&&this.roots.set(n.roots),t.on(`updated`,e=>{e?.roots&&this.roots.set(e.roots)})}async loadSourceProviders(e){let t=e.scope(`ng-devtools`);try{let e=await t.rpc.call(`get-providers`);this.sourceProviders.set(e)}catch{}}select(e){this.selectedId.set(this.selectedId()===e.injector.id?null:e.injector.id)}typeColor(e){return HC[e]??HC.null}flattenTree(e){let t=[],n=(e,r)=>{t.push({node:e,depth:r});for(let t of e.children)n(t,r+1)};return n(e,0),t}findNode(e,t){for(let n of e){if(n.injector.id===t)return n;let e=this.findNode(n.children,t);if(e)return e}return null}filterEmpty(e){return e.map(e=>({...e,children:this.filterEmpty(e.children)})).filter(e=>e.injector.providerCount>0||e.children.length>0)}filterByQuery(e,t){return e.map(e=>({...e,children:this.filterByQuery(e.children,t)})).filter(e=>e.injector.name.toLowerCase().includes(t)||e.providers.some(e=>e.token.toLowerCase().includes(t))||e.children.length>0)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-di-inspector`]],inputs:{rpc:[1,`rpc`]},decls:8,vars:5,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by injector name or token…`,3,`input`,`value`],[1,`checkbox`],[`type`,`checkbox`,3,`change`,`checked`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`source-label`],[1,`source-providers`],[1,`provider-group`],[1,`provider-list`],[1,`provider-card`],[1,`provider-header`],[1,`token`],[1,`provided-in`],[1,`provider-meta`],[1,`tree-container`],[1,`detail-panel`],[4,`ngTemplateOutlet`],[1,`injector-tree`],[1,`injector-row`,3,`selected`,`paddingLeft`],[1,`injector-row`,3,`click`],[1,`type-badge`],[1,`name`],[1,`provider-count`],[1,`detail-header`],[`role`,`table`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`input`,1),Hh(`input`,function(e){return t.filter.set(e.target.value)}),Y(),J(2,`label`,2)(3,`input`,3),Hh(`change`,function(){return t.hideEmpty.set(!t.hideEmpty())}),Y(),Z(4,` Hide empty injectors `),Y()(),K(5,EC,5,0,`div`,4),K(6,jC,5,0),K(7,VC,4,1)),e&2&&(G(),Rh(`value`,t.filter()),G(2),Rh(`checked`,t.hideEmpty()),G(2),q(t.roots().length===0&&t.sourceProviders().length===0?5:-1),G(),q(t.roots().length===0&&t.sourceProviders().length>0?6:-1),G(),q(t.roots().length>0?7:-1))},styles:[`.toolbar[_ngcontent-%COMP%] { + display: flex; + gap: 12px; + align-items: center; + margin-bottom: 16px; + } + input[type='text'][_ngcontent-%COMP%] { + flex: 1; + padding: 8px 12px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 6px; + color: #e4e4e7; + font-size: 14px; + outline: none; + } + input[type='text'][_ngcontent-%COMP%]:focus { + border-color: var(--%NS%accent); + } + .checkbox[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 6px; + font-size: 13px; + color: #a1a1aa; + white-space: nowrap; + cursor: pointer; + } + .empty[_ngcontent-%COMP%] { + text-align: center; + padding: 48px 16px; + } + .muted[_ngcontent-%COMP%] { + color: #71717a; + font-size: 14px; + } + .hint[_ngcontent-%COMP%] { + color: #52525b; + font-size: 12px; + margin-top: 8px; + } + .tree-container[_ngcontent-%COMP%] { + display: flex; + flex-direction: column; + } + .injector-row[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 12px; + cursor: pointer; + border-bottom: 1px solid #1e1e22; + transition: background 0.1s; + } + .injector-row[_ngcontent-%COMP%]:hover { + background: #18181b; + } + .injector-row.selected[_ngcontent-%COMP%] { + background: color-mix(in srgb, var(--%NS%accent) 22%, transparent); + border-color: var(--%NS%accent); + } + .type-badge[_ngcontent-%COMP%] { + font-size: 10px; + padding: 2px 6px; + border-radius: 4px; + color: #fff; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + } + .name[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 13px; + color: #e4e4e7; + } + .provider-count[_ngcontent-%COMP%] { + font-size: 11px; + color: #71717a; + margin-left: auto; + } + .detail-panel[_ngcontent-%COMP%] { + margin-top: 16px; + padding: 16px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + } + .detail-header[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 8px; + margin-bottom: 12px; + } + .detail-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { + font-family: monospace; + color: #e4e4e7; + margin: 0; + } + table[_ngcontent-%COMP%] { + width: 100%; + border-collapse: collapse; + font-size: 13px; + } + th[_ngcontent-%COMP%] { + text-align: left; + padding: 6px 10px; + background: #0f0f11; + color: #71717a; + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.05em; + border-bottom: 1px solid #27272a; + } + td[_ngcontent-%COMP%] { + padding: 8px 10px; + border-bottom: 1px solid #1e1e22; + } + .token[_ngcontent-%COMP%] { + font-family: monospace; + color: var(--%NS%accent); + } + .source-label[_ngcontent-%COMP%] { + font-size: 13px; + color: #71717a; + margin-bottom: 12px; + } + .source-providers[_ngcontent-%COMP%] { + display: flex; + flex-direction: column; + gap: 20px; + } + .provider-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { + font-size: 13px; + color: #71717a; + text-transform: uppercase; + letter-spacing: 0.05em; + margin-bottom: 8px; + } + .provider-list[_ngcontent-%COMP%] { + display: flex; + flex-direction: column; + gap: 6px; + } + .provider-card[_ngcontent-%COMP%] { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 10px 14px; + } + .provider-header[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 8px; + } + .provider-header[_ngcontent-%COMP%] .token[_ngcontent-%COMP%] { + font-size: 14px; + font-weight: 500; + } + .provided-in[_ngcontent-%COMP%] { + font-size: 11px; + padding: 1px 6px; + border-radius: 4px; + background: #14532d; + color: #4ade80; + } + .provider-meta[_ngcontent-%COMP%] { + font-size: 11px; + color: #52525b; + margin-top: 4px; + }`]})},WC=(e,t)=>t.kind,GC=(e,t)=>t.name+t.file+t.line;function KC(e,t){e&1&&Ah(0,`span`,4)}function qC(e,t){e&1&&(J(0,`div`,5)(1,`p`,6),Z(2,`No NgRx store patterns found.`),Y(),J(3,`p`,7),Z(4,` No createAction, createReducer, createEffect, createSelector, or createFeature calls found in source. Make sure your app uses @ngrx/store. `),Y()())}function JC(e,t){if(e&1&&(J(0,`span`,9),Ah(1,`span`,14),Z(2),Y()),e&2){let e=t.$implicit;G(),rg(`background`,e.color),G(),$(` `,e.kind,` `)}}function YC(e,t){if(e&1&&(J(0,`span`,15),Z(1),Y()),e&2){let e=t.$implicit;rg(`border-color`,X(3).kindColor(e.kind)),G(),wg(` `,e.count,` `,e.kind,``,e.count===1?``:`s`,` `)}}function XC(e,t){if(e&1&&Z(0),e&2){let e=X().$implicit;$(` · `,e.detail,` `)}}function ZC(e,t){if(e&1&&(J(0,`div`,13)(1,`div`,16)(2,`span`,17),Z(3),Y(),J(4,`span`,18),Z(5),Y()(),J(6,`div`,19),Z(7),K(8,XC,1,1),Y()()),e&2){let e=t.$implicit,n=X(3);G(2),rg(`background`,n.kindColor(e.kind)),G(),$(` `,e.kind,` `),G(2),Q(e.name),G(2),Cg(` `,e.file,`:`,e.line,` `),G(),q(e.detail?8:-1)}}function QC(e,t){if(e&1&&(J(0,`div`,8),hh(1,JC,3,3,`span`,9,WC),Y(),J(3,`div`,10),hh(4,YC,2,5,`span`,11,WC),Y(),J(6,`div`,12),hh(7,ZC,9,7,`div`,13,GC),Y()),e&2){let e=X(2);G(),_h(e.kindLegend),G(3),_h(e.groupedEntries()),G(3),_h(e.filteredEntries())}}function $C(e,t){e&1&&K(0,qC,5,0,`div`,5)(1,QC,9,0),e&2&&q(X().sourceEntries().length===0?0:1)}function ew(e,t){e&1&&(J(0,`div`,5)(1,`p`,6),Z(2,`No NgRx store connection detected.`),Y(),J(3,`p`,7),Z(4,` Runtime inspection requires @ngrx/store-devtools to be configured in your app. The store devtools use the Redux DevTools protocol to expose state. `),Y()())}function tw(e,t){if(e&1){let e=Lh();J(0,`div`,28),Hh(`click`,function(){let t=co(e).$implicit;return lo(X(3).selectedAction.set(t))}),J(1,`div`,29),Z(2),Y(),J(3,`div`,30),Z(4),Y()()}if(e&2){let e=t.$implicit,n=X(3);ig(`selected`,n.selectedAction()===e),G(2),Q(e.type),G(2),Q(n.formatTime(e.timestamp))}}function nw(e,t){e&1&&(J(0,`p`,6),Z(1,`No actions dispatched yet.`),Y())}function rw(e,t){if(e&1&&(J(0,`dt`),Z(1,`Payload`),Y(),J(2,`dd`)(3,`pre`),Z(4),Og(5,`json`),Y()()),e&2){let e=X(4);G(4),Q(Ag(5,1,e.selectedAction().payload))}}function iw(e,t){if(e&1&&(J(0,`aside`,27)(1,`h3`),Z(2),Y(),J(3,`dl`)(4,`dt`),Z(5,`Type`),Y(),J(6,`dd`),Z(7),Y(),J(8,`dt`),Z(9,`Time`),Y(),J(10,`dd`),Z(11),Y(),K(12,rw,6,3),Y()()),e&2){let e=X(3);G(2),Q(e.selectedAction().type),G(5),Q(e.selectedAction().type),G(4),Q(e.formatTime(e.selectedAction().timestamp)),G(),q(e.selectedAction().payload===void 0?-1:12)}}function aw(e,t){if(e&1&&(J(0,`div`,20)(1,`section`,21)(2,`h3`),Z(3,`Current State`),Y(),J(4,`pre`,22),Z(5),Og(6,`json`),Y()(),J(7,`section`,23)(8,`h3`),Z(9,` Recent Actions `),J(10,`span`,24),Z(11),Y()(),J(12,`div`,25),hh(13,tw,5,4,`div`,26,ph,!1,nw,2,0,`p`,6),Y()()(),K(16,iw,13,4,`aside`,27)),e&2){let e=X(2);G(5),Q(Ag(6,4,e.runtimeState()?.state)),G(6),Q(e.filteredActions().length),G(2),_h(e.filteredActions()),G(3),q(e.selectedAction()?16:-1)}}function ow(e,t){e&1&&K(0,ew,5,0,`div`,5)(1,aw,17,6),e&2&&q(+!!X().runtimeState()?.connected)}var sw={action:`#f59e0b`,reducer:`#a78bfa`,effect:`#fb923c`,selector:`#60a5fa`,feature:`#34d399`,"store-setup":`#94a3b8`,"signal-store":`#e879f9`,"signal-state":`#22d3ee`,"signal-method":`#fb7185`},cw=class e{rpc=Ug(null);filter=H(``);mode=H(`source`);sourceEntries=H([]);runtimeState=H(null);selectedAction=H(null);kindLegend=Object.entries(sw).map(([e,t])=>({kind:e,color:t}));filteredEntries=Rg(()=>{let e=this.filter().toLowerCase();return this.sourceEntries().filter(t=>t.name.toLowerCase().includes(e)||t.kind.toLowerCase().includes(e))});groupedEntries=Rg(()=>{let e=this.sourceEntries(),t=new Map;for(let n of e)t.set(n.kind,(t.get(n.kind)??0)+1);return[...t.entries()].map(([e,t])=>({kind:e,count:t}))});filteredActions=Rg(()=>{let e=this.filter().toLowerCase(),t=[...this.runtimeState()?.actions??[]].reverse();return e?t.filter(t=>t.type.toLowerCase().includes(e)):t});constructor(){Bs(()=>{let e=this.rpc();if(!e)return;let t=e.scope(`ng-devtools`);t.rpc.call(`get-ngrx-store`).then(e=>{this.sourceEntries.set(e),e.length===0&&this.mode.set(`runtime`)}).catch(()=>this.sourceEntries.set([])),t.rpc.sharedState(`ngrx-store`).then(e=>{e?.subscribe&&e.subscribe(e=>this.runtimeState.set(e))})})}kindColor(e){return sw[e]??`#71717a`}formatTime(e){return new Date(e).toLocaleTimeString()}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-store-inspector`]],inputs:{rpc:[1,`rpc`]},decls:10,vars:8,consts:[[1,`toolbar`],[`type`,`text`,`placeholder`,`Filter by name or kind…`,3,`input`,`value`],[1,`toggle-group`],[3,`click`],[1,`live-dot`],[1,`empty`],[1,`muted`],[1,`hint`],[1,`legend`],[1,`legend-item`],[1,`summary`],[1,`summary-badge`,3,`border-color`],[1,`nodes`],[1,`node-card`],[1,`dot`],[1,`summary-badge`],[1,`node-header`],[1,`kind-badge`],[1,`node-label`],[1,`node-meta`],[1,`runtime-layout`],[1,`state-panel`],[1,`state-tree`],[1,`actions-panel`],[1,`action-count`],[1,`action-list`],[1,`action-card`,3,`selected`],[1,`detail-panel`],[1,`action-card`,3,`click`],[1,`action-type`],[1,`action-time`]],template:function(e,t){e&1&&(J(0,`div`,0)(1,`input`,1),Hh(`input`,function(e){return t.filter.set(e.target.value)}),Y(),J(2,`div`,2)(3,`button`,3),Hh(`click`,function(){return t.mode.set(`source`)}),Z(4,`Source`),Y(),J(5,`button`,3),Hh(`click`,function(){return t.mode.set(`runtime`)}),Z(6,` Runtime `),K(7,KC,1,0,`span`,4),Y()()(),K(8,$C,2,1),K(9,ow,2,1)),e&2&&(G(),Rh(`value`,t.filter()),G(2),ig(`active`,t.mode()===`source`),G(2),ig(`active`,t.mode()===`runtime`),G(2),q(t.runtimeState()?.connected?7:-1),G(),q(t.mode()===`source`?8:-1),G(),q(t.mode()===`runtime`?9:-1))},dependencies:[a_],styles:[`.toolbar[_ngcontent-%COMP%] { + display: flex; + gap: 12px; + align-items: center; + margin-bottom: 16px; + } + input[_ngcontent-%COMP%] { + flex: 1; + padding: 8px 12px; + background: #18181b; + border: 1px solid #27272a; + border-radius: 6px; + color: #e4e4e7; + font-size: 14px; + outline: none; + } + input[_ngcontent-%COMP%]:focus { + border-color: var(--%NS%accent); + } + .toggle-group[_ngcontent-%COMP%] { + display: flex; + border: 1px solid #27272a; + border-radius: 6px; + overflow: hidden; + } + .toggle-group[_ngcontent-%COMP%] button[_ngcontent-%COMP%] { + padding: 6px 14px; + border: none; + background: transparent; + color: #a1a1aa; + cursor: pointer; + font-size: 13px; + display: flex; + align-items: center; + gap: 6px; + } + .toggle-group[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%] { + background: #3f3f46; + color: #fff; + } + .live-dot[_ngcontent-%COMP%] { + width: 6px; + height: 6px; + border-radius: 50%; + background: #4ade80; + animation: _ngcontent-%COMP%_pulse 2s infinite; + } + @keyframes _ngcontent-%COMP%_pulse { + 0%, + 100% { + opacity: 1; + } + 50% { + opacity: 0.4; + } + } + .empty[_ngcontent-%COMP%] { + text-align: center; + padding: 48px 16px; + } + .muted[_ngcontent-%COMP%] { + color: #71717a; + font-size: 14px; + } + .hint[_ngcontent-%COMP%] { + color: #52525b; + font-size: 12px; + margin-top: 8px; + } + .legend[_ngcontent-%COMP%] { + display: flex; + gap: 12px; + flex-wrap: wrap; + margin-bottom: 12px; + } + .legend-item[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 4px; + font-size: 12px; + color: #a1a1aa; + } + .dot[_ngcontent-%COMP%] { + width: 8px; + height: 8px; + border-radius: 50%; + } + .summary[_ngcontent-%COMP%] { + display: flex; + gap: 8px; + flex-wrap: wrap; + margin-bottom: 16px; + } + .summary-badge[_ngcontent-%COMP%] { + font-size: 12px; + padding: 3px 10px; + border-radius: 99px; + border: 1px solid; + color: #e4e4e7; + } + .nodes[_ngcontent-%COMP%] { + display: flex; + flex-direction: column; + gap: 8px; + } + .node-card[_ngcontent-%COMP%] { + background: #18181b; + border: 1px solid #27272a; + border-radius: 8px; + padding: 12px 16px; + transition: border-color 0.15s; + } + .node-card[_ngcontent-%COMP%]:hover { + border-color: #3f3f46; + } + .node-header[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 8px; + } + .kind-badge[_ngcontent-%COMP%] { + font-size: 11px; + padding: 2px 8px; + border-radius: 4px; + color: #fff; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + } + .node-label[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 14px; + color: #e4e4e7; + } + .node-meta[_ngcontent-%COMP%] { + font-size: 12px; + color: #71717a; + margin-top: 4px; + } + .runtime-layout[_ngcontent-%COMP%] { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 16px; + } + .state-panel[_ngcontent-%COMP%], + .actions-panel[_ngcontent-%COMP%] { + background: #18181b; + border: 1px solid #27272a; + border-radius: 10px; + padding: 16px; + } + h3[_ngcontent-%COMP%] { + font-size: 13px; + text-transform: uppercase; + color: #71717a; + margin-bottom: 12px; + letter-spacing: 0.05em; + display: flex; + align-items: center; + gap: 8px; + } + .action-count[_ngcontent-%COMP%] { + font-size: 11px; + padding: 1px 6px; + border-radius: 99px; + background: #3f3f46; + color: #a1a1aa; + } + .state-tree[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 12px; + color: #a1a1aa; + white-space: pre-wrap; + word-break: break-all; + max-height: 500px; + overflow: auto; + } + .action-list[_ngcontent-%COMP%] { + display: flex; + flex-direction: column; + gap: 6px; + max-height: 500px; + overflow: auto; + } + .action-card[_ngcontent-%COMP%] { + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px 12px; + background: #09090b; + border: 1px solid #27272a; + border-radius: 6px; + cursor: pointer; + transition: border-color 0.15s; + } + .action-card[_ngcontent-%COMP%]:hover { + border-color: #3f3f46; + } + .action-card.selected[_ngcontent-%COMP%] { + border-color: var(--%NS%accent); + } + .action-type[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 13px; + color: #e4e4e7; + } + .action-time[_ngcontent-%COMP%] { + font-size: 11px; + color: #71717a; + } + .detail-panel[_ngcontent-%COMP%] { + margin-top: 16px; + background: #18181b; + border: 1px solid var(--%NS%accent); + border-radius: 10px; + padding: 16px; + } + dl[_ngcontent-%COMP%] { + display: grid; + grid-template-columns: auto 1fr; + gap: 6px 12px; + font-size: 14px; + } + dt[_ngcontent-%COMP%] { + color: #a1a1aa; + } + dd[_ngcontent-%COMP%] { + color: #e4e4e7; + } + pre[_ngcontent-%COMP%] { + font-family: monospace; + font-size: 12px; + white-space: pre-wrap; + word-break: break-all; + }`]})},lw=(e,t)=>t.id;function uw(e,t){if(e&1){let e=Lh();Eh(0,`button`,13),Vh(`click`,function(){let t=co(e).$implicit;return lo(X().switchTab(t.id))}),Z(1),Oh()}if(e&2){let e=t.$implicit;ig(`active`,X().tab()===e.id),G(),Q(e.label)}}function dw(e,t){if(e&1){let e=Lh();Eh(0,`app-dashboard`,14),Vh(`navigate`,function(t){return co(e),lo(X().switchTab(t))}),Oh()}e&2&&wh(`rpc`,X().rpc())}function fw(e,t){e&1&&kh(0,`app-component-tree`,12),e&2&&wh(`rpc`,X().rpc())}function pw(e,t){e&1&&kh(0,`app-route-inspector`,12),e&2&&wh(`rpc`,X().rpc())}function mw(e,t){e&1&&kh(0,`app-signal-inspector`,12),e&2&&wh(`rpc`,X().rpc())}function hw(e,t){e&1&&kh(0,`app-di-inspector`,12),e&2&&wh(`rpc`,X().rpc())}function gw(e,t){e&1&&kh(0,`app-store-inspector`,12),e&2&&wh(`rpc`,X().rpc())}var _w=class e{tabs=[{id:`dashboard`,label:`Dashboard`},{id:`components`,label:`Components`},{id:`routes`,label:`Routes`},{id:`signals`,label:`Signals`},{id:`injectors`,label:`Injectors`},{id:`store`,label:`Store`}];tab=H(`dashboard`);rpc=H(null);connected=H(!1);ngOnInit(){let e=new URLSearchParams(location.hash.replace(/^#/,``)).get(`tab`);e&&this.tabs.some(t=>t.id===e)&&this.tab.set(e);let t=vw();kS(t?{baseURL:t}:{}).then(e=>{this.rpc.set(e),this.connected.set(!0),e.events.on(`connection:status`,e=>{this.connected.set(e===`connected`)})})}ngOnDestroy(){}switchTab(e){this.tab.set(e),history.replaceState(history.state,``,`#tab=${e}`)}static ɵfac=function(t){return new(t||e)};static ɵcmp=Rp({type:e,selectors:[[`app-root`]],decls:26,vars:4,consts:[[1,`brand`],[`width`,`20`,`height`,`22`,`viewBox`,`0 0 223 236`,`fill`,`url(#ng-logo)`,`aria-hidden`,`true`],[`id`,`ng-logo`,`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`],[`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`],[3,`active`],[1,`status`],[3,`rpc`],[3,`click`],[3,`navigate`,`rpc`]],template:function(e,t){if(e&1&&(Eh(0,`header`)(1,`div`,0),Ho(),Eh(2,`svg`,1)(3,`defs`)(4,`linearGradient`,2),kh(5,`stop`,3)(6,`stop`,4)(7,`stop`,5)(8,`stop`,6)(9,`stop`,7)(10,`stop`,8),Oh()(),kh(11,`path`,9),Oh(),Uo(),Eh(12,`span`),Z(13,`Angular DevTools`),Oh()(),Eh(14,`nav`),hh(15,uw,2,3,`button`,10,lw),Oh(),Eh(17,`span`,11),Z(18),Oh()(),Eh(19,`main`),K(20,dw,1,1,`app-dashboard`,12)(21,fw,1,1,`app-component-tree`,12)(22,pw,1,1,`app-route-inspector`,12)(23,mw,1,1,`app-signal-inspector`,12)(24,hw,1,1,`app-di-inspector`,12)(25,gw,1,1,`app-store-inspector`,12),Oh()),e&2){let e;G(15),_h(t.tabs),G(2),ig(`connected`,t.connected()),G(),$(` `,t.connected()?`Connected`:`Connecting…`,` `),G(2),q((e=t.tab())===`dashboard`?20:e===`components`?21:e===`routes`?22:e===`signals`?23:e===`injectors`?24:e===`store`?25:-1)}},dependencies:[AS,KS,QS,bC,UC,cw],styles:[`[_nghost-%COMP%] { + display: flex; + flex-direction: column; + height: 100vh; + } + header[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 16px; + padding: 8px 16px; + background: #18181b; + border-bottom: 1px solid #27272a; + } + .brand[_ngcontent-%COMP%] { + display: flex; + align-items: center; + gap: 8px; + font-weight: 600; + color: var(--%NS%accent); + } + .brand[_ngcontent-%COMP%] span[_ngcontent-%COMP%] { + color: var(--%NS%accent); + white-space: nowrap; + } + nav[_ngcontent-%COMP%] { + display: flex; + gap: 4px; + flex: 1; + } + nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%] { + padding: 6px 14px; + border: none; + border-radius: 6px; + background: transparent; + color: #a1a1aa; + cursor: pointer; + font-size: 13px; + transition: all 0.15s; + } + nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover { + background: #27272a; + color: #e4e4e7; + } + nav[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%] { + background: #3f3f46; + color: #fff; + } + .status[_ngcontent-%COMP%] { + font-size: 12px; + padding: 3px 10px; + border-radius: 99px; + background: #44403c; + color: #a8a29e; + } + .status.connected[_ngcontent-%COMP%] { + background: #14532d; + color: #4ade80; + } + main[_ngcontent-%COMP%] { + flex: 1; + overflow: auto; + padding: 16px; + }`]})};function vw(){let e=new URLSearchParams(location.search).get(`baseURL`);if(e&&new URL(e,location.href).origin===location.origin)return e;if(!location.pathname.includes(`__ng-devtools`))return`/__ng-devtools/`}U_(_w).catch(console.error);export{Kv as t}; \ No newline at end of file diff --git a/packages/ng-devtools-assets/dist/index.html b/packages/ng-devtools-assets/dist/index.html index 82561c2..b383846 100644 --- a/packages/ng-devtools-assets/dist/index.html +++ b/packages/ng-devtools-assets/dist/index.html @@ -4,8 +4,8 @@ Angular DevTools - - + + diff --git a/packages/ng-devtools/package.json b/packages/ng-devtools/package.json index 244c44b..4e20939 100644 --- a/packages/ng-devtools/package.json +++ b/packages/ng-devtools/package.json @@ -15,7 +15,8 @@ }, "files": [ "src", - "bin.mjs" + "bin.mjs", + "!src/**/__tests__" ], "keywords": [ "angular", @@ -26,6 +27,7 @@ "mcp" ], "dependencies": { + "@valibot/to-json-schema": "^1.8.0", "cac": "^7.0.0", "devframe": "^1.0.0", "valibot": "^1.5.0" diff --git a/packages/ng-devtools/src/__tests__/agent-tools.test.ts b/packages/ng-devtools/src/__tests__/agent-tools.test.ts new file mode 100644 index 0000000..d590789 --- /dev/null +++ b/packages/ng-devtools/src/__tests__/agent-tools.test.ts @@ -0,0 +1,61 @@ +import { createHostContext } from 'devframe/node'; +import { describe, expect, it } from 'vitest'; +import ngDevtools from '../devframe.ts'; + +async function boot() { + const host = { + mountStatic: () => {}, + resolveOrigin: () => 'http://localhost', + getStorageDir: () => '', + }; + const ctx = await createHostContext({ cwd: process.cwd(), mode: 'dev', host: host as never }); + await ngDevtools.setup(ctx as never); + const push = (name: string, payload: unknown) => + ctx.rpc.invokeLocal(`ng-devtools:${name}` as never, payload as never); + const call = async (tool: string, selector: string) => + ((await ctx.agent.invoke(`ng-devtools:${tool}`, { selector })) as { markdown: string }) + .markdown; + return { push, call }; +} + +describe('agent tools', () => { + it('say so when no page is connected', async () => { + const { call } = await boot(); + expect(await call('highlight', 'app-root')).toMatch(/no page is connected/i); + expect(await call('inspect-signals', 'app-root')).toMatch(/no signal graph/i); + expect(await call('inspect-providers', 'app-root')).toMatch(/no injector data/i); + }); + + it('answer from the data the page pushed', async () => { + const { push, call } = await boot(); + await push('push-component-tree', [{ id: 'ngdt-1', selector: 'app-root' }]); + await push('push-signal-graph', { + nodes: [{ id: 'a', kind: 'signal', label: 'count' }], + edges: [], + componentSelector: 'app-root', + }); + await push('push-injector-tree', [ + { + injector: { id: 'i1', type: 'element', name: 'App', providerCount: 0 }, + providers: [], + children: [], + }, + ]); + + expect(await call('highlight', 'app-root')).toMatch(/highlight request/i); + + // The payload matters, not how it is worded around. + const signals = await call('inspect-signals', 'app-root'); + expect(JSON.parse(signals)).toMatchObject({ nodes: [{ label: 'count' }] }); + + const other = await call('inspect-signals', 'app-other'); + expect(other).toMatch(/app-other/); + expect(other).toMatch(/app-root/); + + // The answer carries the whole injector tree, whatever it is worded like. + const providers = await call('inspect-providers', 'app-root'); + expect(JSON.parse(providers.slice(providers.indexOf('[')))).toMatchObject([ + { injector: { name: 'App' } }, + ]); + }); +}); diff --git a/packages/ng-devtools/src/__tests__/popup.test.ts b/packages/ng-devtools/src/__tests__/popup.test.ts new file mode 100644 index 0000000..8992e10 --- /dev/null +++ b/packages/ng-devtools/src/__tests__/popup.test.ts @@ -0,0 +1,74 @@ +// @vitest-environment jsdom +import { beforeEach, describe, expect, it, vi } from 'vitest'; + +/** The module auto-creates on import and keeps a single instance, so each test + * needs it loaded afresh. */ +async function loadPopup() { + document.body.innerHTML = ''; + vi.resetModules(); + await import('../popup.ts'); +} + +function parts() { + const host = document.getElementById('ng-devtools-popup-root')!; + const shadow = host.shadowRoot!; + return { + fab: shadow.querySelector('.fab') as HTMLButtonElement, + panel: shadow.querySelector('.panel') as HTMLElement, + }; +} + +// One document and one localStorage, so these share state by nature. +describe.sequential('devtools popup', () => { + beforeEach(() => localStorage.clear()); + + it('mounts even when the stored state is unusable', async () => { + for (const stored of ['null', '123', '"float"', '[]', '{not json', '{"launcher":{}}']) { + localStorage.setItem('ng-devtools-popup', stored); + await loadPopup(); + const { fab } = parts(); + expect(fab, `stored: ${stored}`).toBeTruthy(); + expect(fab.style.inset).not.toContain('NaN'); + } + }); + + it('opens and closes on click, which is what a keyboard sends', async () => { + await loadPopup(); + const { fab, panel } = parts(); + fab.click(); + expect(panel.classList.contains('open')).toBe(true); + expect(fab.getAttribute('aria-expanded')).toBe('true'); + fab.click(); + expect(panel.classList.contains('open')).toBe(false); + }); + + it('moves the launcher with the arrow keys and remembers where it went', async () => { + await loadPopup(); + const { fab } = parts(); + fab.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight', bubbles: true })); + const saved = JSON.parse(localStorage.getItem('ng-devtools-popup')!); + expect(Number.isFinite(saved.launcher.x)).toBe(true); + expect(Number.isFinite(saved.launcher.y)).toBe(true); + }); + + it('keeps the launcher on screen', async () => { + localStorage.setItem( + 'ng-devtools-popup', + JSON.stringify({ launcher: { x: 99999, y: 99999 }, docked: 'float' }), + ); + await loadPopup(); + const { fab } = parts(); + const [top, , , left] = fab.style.inset.split(' '); + expect(parseInt(left, 10)).toBeLessThan(window.innerWidth); + expect(parseInt(top, 10)).toBeLessThan(window.innerHeight); + }); + + it('labels the panel and its controls', async () => { + await loadPopup(); + const shadow = document.getElementById('ng-devtools-popup-root')!.shadowRoot!; + expect(shadow.querySelector('.panel')!.getAttribute('aria-label')).toBeTruthy(); + expect(shadow.querySelector('.frame')!.getAttribute('title')).toBeTruthy(); + expect(shadow.querySelector('.dock-btn')!.getAttribute('aria-label')).toBeTruthy(); + expect(shadow.querySelector('.close-btn')!.getAttribute('aria-label')).toBeTruthy(); + }); +}); diff --git a/packages/ng-devtools/src/devframe.ts b/packages/ng-devtools/src/devframe.ts index d72e20e..ac4c6d2 100644 --- a/packages/ng-devtools/src/devframe.ts +++ b/packages/ng-devtools/src/devframe.ts @@ -21,7 +21,7 @@ const ngDevtools = defineDevframe({ version: pkg.version, packageName: pkg.name, description: 'Inspect Angular component trees, signals, and routes at dev and build time.', - homepage: 'https://github.com/user/angular-devtools', + homepage: 'https://github.com/santoshyadavdev/angular-devtools', icon: 'ph:angular-logo-duotone', importMetaUrl: import.meta.url, clientAssets, @@ -134,7 +134,8 @@ const ngDevtools = defineDevframe({ ctx.agent.registerResource({ id: 'ng-devtools:component-tree', name: 'Angular Component Tree', - description: 'Live component hierarchy snapshot as JSON.', + description: + 'Component hierarchy last reported by a connected page, as JSON. Empty when no page is connected.', mimeType: 'application/json', read: () => ({ text: JSON.stringify(componentTree.value(), null, 2) }), }); @@ -151,7 +152,8 @@ const ngDevtools = defineDevframe({ ctx.agent.registerResource({ id: 'ng-devtools:injector-tree', name: 'Angular Injector Tree', - description: 'Live DI injector hierarchy with providers at each level.', + description: + 'DI injector hierarchy last reported by a connected page, with providers at each level. Empty when no page is connected.', mimeType: 'application/json', read: () => ({ text: JSON.stringify(injectorTreeState.value(), null, 2) }), }); @@ -160,7 +162,7 @@ const ngDevtools = defineDevframe({ id: 'ng-devtools:ngrx-store', name: 'NgRx Store State', description: - 'Live NgRx store state and recent dispatched actions. Read this to understand the current application state managed by NgRx.', + 'NgRx store state and recent actions last reported by a connected page. Empty when no page is connected.', mimeType: 'application/json', read: () => ({ text: JSON.stringify(ngrxStoreState.value(), null, 2) }), }); @@ -181,20 +183,27 @@ const ngDevtools = defineDevframe({ required: ['selector'], }, handler: async (args: { selector: string }) => { + if (!componentTree.value().nodes.length) { + return { + markdown: `No page is connected, so nothing was highlighted. Live data needs a page: connect through the MCP endpoint of the server that runs the app, with the app open in a browser. The stdio server has no page attached and only ever reports this.`, + }; + } await ctx.rpc.invokeLocal('ng-devtools:select-component' as any, args.selector); void my.rpc.broadcast({ method: 'highlight-in-page', args: [args.selector], optional: true, }); - return { markdown: `Highlighted \`${args.selector}\` in the page overlay.` }; + return { + markdown: `Sent a highlight request for \`${args.selector}\`. It only shows if the selector matches an element on the page.`, + }; }, }); ctx.agent.registerTool({ id: 'ng-devtools:inspect-signals', description: - 'Get the signal graph for a specific component by CSS selector. Returns signal nodes (signal, computed, linkedSignal, effect) and their dependency edges. Call this to understand reactive data flow before suggesting state changes.', + 'Get the signal graph the running page last reported: signal nodes (signal, computed, linkedSignal, effect) and their dependency edges. The page reports one graph, for its root component, so a selector that does not match it returns what is available instead.', safety: 'read', inputSchema: { type: 'object', @@ -207,27 +216,28 @@ const ngDevtools = defineDevframe({ required: ['selector'], }, handler: async (args: { selector: string }) => { - try { - const result = await my.rpc.broadcast({ - method: 'get-signal-graph-for', - args: [args.selector], - }); - return { markdown: JSON.stringify(result, null, 2) }; - } catch { - const cached = signalGraphState.value().graph; + // `broadcast` resolves with nothing, so the page cannot answer a + // question. Read the graph the overlay pushes into shared state. + const graph = signalGraphState.value().graph; + if (!graph) { + return { + markdown: `No signal graph available. Live data needs a page: connect through the MCP endpoint of the server that runs the app, with the app open in a browser. The stdio server has no page attached and only ever reports this.`, + }; + } + const json = JSON.stringify(graph, null, 2); + if (graph.componentSelector !== args.selector) { return { - markdown: cached - ? JSON.stringify(cached, null, 2) - : 'No signal graph available. Is the Angular app running with debug mode?', + markdown: `No signal graph for \`${args.selector}\`. The live graph covers \`${graph.componentSelector}\`:\n\n${json}`, }; } + return { markdown: json }; }, }); ctx.agent.registerTool({ id: 'ng-devtools:inspect-providers', description: - 'Get DI providers and the injector resolution path for a component by CSS selector. Call this to understand dependency injection before suggesting provider changes.', + 'Get the DI injector hierarchy the running page last reported, with the providers at each level. The page reports the whole tree rather than one component, so the selector only labels the answer.', safety: 'read', inputSchema: { type: 'object', @@ -240,20 +250,15 @@ const ngDevtools = defineDevframe({ required: ['selector'], }, handler: async (args: { selector: string }) => { - try { - const result = await my.rpc.broadcast({ - method: 'get-providers-for', - args: [args.selector], - }); - return { markdown: JSON.stringify(result, null, 2) }; - } catch { - const cached = injectorTreeState.value().roots; + const roots = injectorTreeState.value().roots; + if (!roots.length) { return { - markdown: cached.length - ? JSON.stringify(cached, null, 2) - : 'No injector data available.', + markdown: `No injector data available. Live data needs a page: connect through the MCP endpoint of the server that runs the app, with the app open in a browser. The stdio server has no page attached and only ever reports this.`, }; } + return { + markdown: `This is the injector tree for the whole page, not filtered to \`${args.selector}\`:\n\n${JSON.stringify(roots, null, 2)}`, + }; }, }); }, diff --git a/packages/ng-devtools/src/overlay.ts b/packages/ng-devtools/src/overlay.ts index 5c48025..adbe977 100644 --- a/packages/ng-devtools/src/overlay.ts +++ b/packages/ng-devtools/src/overlay.ts @@ -2,8 +2,10 @@ import { connectDevframe } from 'devframe/client'; let highlightEl: HTMLElement | null = null; -export async function initOverlay() { - const rpc = await connectDevframe(); +export async function initOverlay(options: { baseURL?: string | string[] } = {}) { + // `connectDevframe()` alone looks for the connection next to the page, which + // misses the documented `/__ng-devtools/` mount in a host app. + const rpc = await connectDevframe({ baseURL: options.baseURL ?? ['./', '/__ng-devtools/'] }); const my = rpc.scope('ng-devtools'); async function pushTree() { @@ -44,35 +46,17 @@ export async function initOverlay() { jsonSerializable: true, handler: (selector: string) => { clearHighlight(); - const el = document.querySelector(selector); + // The selector comes from an agent, so it may not be valid CSS. + let el: Element | null = null; + try { + el = document.querySelector(selector); + } catch { + return; + } if (el instanceof HTMLElement) showHighlight(el); }, }); - // On-demand signal graph for a specific component - my.rpc.register({ - name: 'get-signal-graph-for', - type: 'query', - jsonSerializable: true, - handler: (selector: string) => { - const el = document.querySelector(selector); - if (!el) return null; - return getSignalGraphForElement(el); - }, - }); - - // On-demand DI providers for a specific component - my.rpc.register({ - name: 'get-providers-for', - type: 'query', - jsonSerializable: true, - handler: (selector: string) => { - const el = document.querySelector(selector); - if (!el) return null; - return getProvidersForElement(el); - }, - }); - return () => { clearInterval(interval); clearHighlight(); diff --git a/packages/ng-devtools/src/popup.ts b/packages/ng-devtools/src/popup.ts index 928c01e..d8c19ea 100644 --- a/packages/ng-devtools/src/popup.ts +++ b/packages/ng-devtools/src/popup.ts @@ -1,6 +1,8 @@ // In-page floating devtools popup. Renders an iframe pointing at the devtools SPA. let popupRoot: HTMLElement | null = null; +/** Kept so a later call returns the same handle rather than nothing. */ +let handle: { toggle: () => void; destroy: () => void } | undefined; let isOpen = false; const STORAGE_KEY = 'ng-devtools-popup'; @@ -11,14 +13,38 @@ interface PopupState { width: number; height: number; docked: 'float' | 'bottom' | 'right'; + /** Where the launcher was left, so it can sit anywhere, not just a corner. */ + launcher?: { x: number; y: number }; } +const DEFAULT_STATE: PopupState = { x: 16, y: 16, width: 720, height: 480, docked: 'float' }; + function loadState(): PopupState { try { const raw = localStorage.getItem(STORAGE_KEY); - if (raw) return JSON.parse(raw); - } catch {} - return { x: 16, y: 16, width: 720, height: 480, docked: 'float' }; + const stored: unknown = raw ? JSON.parse(raw) : null; + if (!stored || typeof stored !== 'object' || Array.isArray(stored)) return { ...DEFAULT_STATE }; + + // Anything in storage may be stale or hand edited, so each field is only + // taken when it is the shape this version expects. + const saved = stored as Partial; + const point = saved.launcher; + return { + ...DEFAULT_STATE, + ...(Number.isFinite(saved.x) ? { x: saved.x as number } : {}), + ...(Number.isFinite(saved.y) ? { y: saved.y as number } : {}), + ...(Number.isFinite(saved.width) ? { width: saved.width as number } : {}), + ...(Number.isFinite(saved.height) ? { height: saved.height as number } : {}), + ...(saved.docked === 'float' || saved.docked === 'bottom' || saved.docked === 'right' + ? { docked: saved.docked } + : {}), + ...(point && Number.isFinite(point.x) && Number.isFinite(point.y) + ? { launcher: { x: point.x, y: point.y } } + : {}), + }; + } catch { + return { ...DEFAULT_STATE }; + } } function saveState(state: PopupState) { @@ -47,7 +73,7 @@ function getBaseURL(): string { } export function createDevtoolsPopup() { - if (popupRoot) return; + if (popupRoot) return handle; const state = loadState(); @@ -59,12 +85,20 @@ export function createDevtoolsPopup() { // FAB toggle button const fab = document.createElement('button'); fab.setAttribute('aria-label', 'Toggle Angular DevTools'); + fab.setAttribute('aria-expanded', 'false'); fab.title = 'Angular DevTools'; - fab.innerHTML = ``; + // The Angular shield, from the wordmark on angular.dev. + fab.innerHTML = + ``; // Panel container const panel = document.createElement('div'); panel.classList.add('panel'); + panel.setAttribute('role', 'region'); + panel.setAttribute('aria-label', 'Angular DevTools'); // Toolbar const toolbar = document.createElement('div'); @@ -78,24 +112,33 @@ export function createDevtoolsPopup() { dockGroup.classList.add('dock-group'); for (const mode of ['float', 'bottom', 'right'] as const) { const btn = document.createElement('button'); + btn.type = 'button'; btn.textContent = mode === 'float' ? '⊡' : mode === 'bottom' ? '⬓' : '⬔'; btn.title = `Dock ${mode}`; + btn.setAttribute('aria-label', `Dock ${mode}`); + btn.setAttribute('aria-pressed', String(state.docked === mode)); btn.classList.add('dock-btn'); if (state.docked === mode) btn.classList.add('active'); btn.addEventListener('click', () => { state.docked = mode; applyDock(); - dockGroup.querySelectorAll('.dock-btn').forEach((b) => b.classList.remove('active')); + dockGroup.querySelectorAll('.dock-btn').forEach((b) => { + b.classList.remove('active'); + b.setAttribute('aria-pressed', 'false'); + }); btn.classList.add('active'); + btn.setAttribute('aria-pressed', 'true'); saveState(state); }); dockGroup.appendChild(btn); } const closeBtn = document.createElement('button'); + closeBtn.type = 'button'; closeBtn.classList.add('close-btn'); closeBtn.innerHTML = '✕'; closeBtn.title = 'Close'; + closeBtn.setAttribute('aria-label', 'Close Angular DevTools'); closeBtn.addEventListener('click', togglePanel); toolbar.append(title, dockGroup, closeBtn); @@ -103,6 +146,7 @@ export function createDevtoolsPopup() { // Iframe const iframe = document.createElement('iframe'); iframe.classList.add('frame'); + iframe.title = 'Angular DevTools'; panel.append(toolbar, iframe); @@ -112,29 +156,52 @@ export function createDevtoolsPopup() { :host { all: initial; } .fab { position: fixed; - bottom: 16px; - right: 16px; z-index: 2147483646; + inset: auto 16px 16px auto; width: 44px; height: 44px; border-radius: 50%; border: none; - background: #7c3aed; - color: #fff; + background: var(--ng-devtools-accent, #7c3aed); + color: var(--ng-devtools-accent-ink, #fff); cursor: pointer; + touch-action: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(0,0,0,0.3); transition: transform 0.15s, background 0.15s; } - .fab:hover { background: #6d28d9; transform: scale(1.08); } + .fab:hover { background: var(--ng-devtools-accent-hover, #6d28d9); transform: scale(1.08); } .fab.open { background: #3f3f46; } + .fab.dragging { + transition: none; + cursor: grabbing; + transform: scale(1.06); + } + /* The shadow root cannot inherit the page's focus styles. */ + .dock-btn:focus-visible, .close-btn:focus-visible { + outline: 2px solid #fff; + outline-offset: 2px; + } + /* The launcher sits on the host page, whose background is unknown, so the + ring is drawn in both directions to stay visible either way. */ + .fab:focus-visible { + outline: 2px solid #fff; + outline-offset: 2px; + box-shadow: 0 0 0 4px #111827; + } .panel { position: fixed; z-index: 2147483647; - display: none; + display: flex; flex-direction: column; + opacity: 0; + visibility: hidden; + pointer-events: none; + transform: translateY(8px) scale(0.98); + transform-origin: bottom right; + transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms; background: #0f0f11; border: 1px solid #27272a; border-radius: 10px; @@ -142,7 +209,16 @@ export function createDevtoolsPopup() { box-shadow: 0 8px 32px rgba(0,0,0,0.5); resize: both; } - .panel.open { display: flex; } + .panel.open { + opacity: 1; + visibility: visible; + pointer-events: auto; + transform: none; + transition: opacity 160ms ease, transform 160ms ease, visibility 0s; + } + @media (prefers-reduced-motion: reduce) { + .panel, .panel.open, .fab { transition: none; } + } .panel.dock-float { border-radius: 10px; } @@ -167,13 +243,13 @@ export function createDevtoolsPopup() { resize: horizontal; } .toolbar { + cursor: grab; display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: #18181b; border-bottom: 1px solid #27272a; - cursor: grab; user-select: none; min-height: 36px; } @@ -182,7 +258,7 @@ export function createDevtoolsPopup() { font-family: system-ui, sans-serif; font-size: 13px; font-weight: 600; - color: #a78bfa; + color: var(--ng-devtools-title, #a78bfa); flex: 1; } .dock-group { @@ -192,7 +268,7 @@ export function createDevtoolsPopup() { .dock-btn, .close-btn { border: none; background: transparent; - color: #71717a; + color: #8a8a94; cursor: pointer; font-size: 14px; padding: 2px 6px; @@ -200,7 +276,7 @@ export function createDevtoolsPopup() { line-height: 1; } .dock-btn:hover, .close-btn:hover { background: #27272a; color: #e4e4e7; } - .dock-btn.active { color: #a78bfa; } + .dock-btn.active { color: var(--ng-devtools-title, #a78bfa); } .close-btn { font-size: 13px; } .frame { flex: 1; @@ -230,8 +306,12 @@ export function createDevtoolsPopup() { const onMouseMove = (e: MouseEvent) => { if (!dragging) return; - state.x = Math.max(0, e.clientX - dragOffsetX); - state.y = Math.max(0, e.clientY - dragOffsetY); + // Clamped at both ends: dragging the toolbar off the right or bottom edge + // would leave the panel with no reachable handle. + const maxX = Math.max(0, window.innerWidth - panel.offsetWidth); + const maxY = Math.max(0, window.innerHeight - panel.offsetHeight); + state.x = Math.min(Math.max(0, e.clientX - dragOffsetX), maxX); + state.y = Math.min(Math.max(0, e.clientY - dragOffsetY), maxY); panel.style.left = state.x + 'px'; panel.style.top = state.y + 'px'; }; @@ -246,6 +326,12 @@ export function createDevtoolsPopup() { window.addEventListener('mousemove', onMouseMove); window.addEventListener('mouseup', onMouseUp); + // Scoped to the popup's own chrome: a listener on the window would take + // Escape away from the host application. + popupRoot.addEventListener('keydown', (event) => { + if ((event as KeyboardEvent).key === 'Escape' && isOpen) togglePanel(); + }); + function applyDock() { panel.className = `panel${isOpen ? ' open' : ''} dock-${state.docked}`; if (state.docked === 'float') { @@ -264,8 +350,12 @@ export function createDevtoolsPopup() { function togglePanel() { isOpen = !isOpen; fab.classList.toggle('open', isOpen); + fab.setAttribute('aria-expanded', String(isOpen)); panel.classList.toggle('open', isOpen); applyDock(); + // Closing hides the panel, so focus would fall to the body. Only take it + // back when it was inside the popup: the host page may own it. + if (!isOpen && popupRoot?.contains(document.activeElement)) fab.focus(); if (isOpen && !iframe.src) { const base = getBaseURL(); const origin = location.origin; @@ -273,31 +363,160 @@ export function createDevtoolsPopup() { } } - fab.addEventListener('click', togglePanel); + // Dragging the launcher, so it can be left anywhere rather than only in a + // corner. A press that does not move is a click, which still opens the panel. + const DRAG_THRESHOLD = 4; + const MARGIN = 8; + let fabPointer: { id: number; offsetX: number; offsetY: number; moved: boolean } | null = null; + let launcherAt: { x: number; y: number } | null = null; + let suppressClick = false; + + fab.addEventListener('pointerdown', (event) => { + // A second finger must not take over a drag that is already running. + if (fabPointer) return; + fabPointer = { + id: event.pointerId, + // Layout offsets, not the rendered box, which carries the hover scale. + offsetX: event.clientX - fab.offsetLeft, + offsetY: event.clientY - fab.offsetTop, + moved: false, + }; + try { + fab.setPointerCapture(event.pointerId); + } catch { + // the pointer is already gone; the drag simply never starts + } + }); - // Track resize for float mode - const resizeObserver = new ResizeObserver(() => { - if (state.docked === 'float' && isOpen) { - state.width = panel.offsetWidth; - state.height = panel.offsetHeight; - saveState(state); + fab.addEventListener('pointermove', (event) => { + if (!fabPointer || event.pointerId !== fabPointer.id) return; + // A mouse that comes back with no button held lost its capture somewhere. + if (event.pointerType === 'mouse' && event.buttons === 0) { + cancelFabDrag(); + return; + } + const x = event.clientX - fabPointer.offsetX; + const y = event.clientY - fabPointer.offsetY; + + if (!fabPointer.moved) { + if (Math.hypot(x - fab.offsetLeft, y - fab.offsetTop) < DRAG_THRESHOLD) return; + fabPointer.moved = true; + fab.classList.add('dragging'); } + placeLauncher(x, y); }); - resizeObserver.observe(panel); + + function cancelFabDrag() { + fabPointer = null; + fab.classList.remove('dragging'); + } + + const endFabDrag = (event: PointerEvent) => { + if (!fabPointer || event.pointerId !== fabPointer.id) return; + const moved = fabPointer.moved; + cancelFabDrag(); + if (!moved) return; + + // A mouse drag is followed by a click, which must not also toggle. Touch + // sends no such click, so the flag is cleared on the next frame rather + // than left armed to swallow a later, unrelated activation. + suppressClick = true; + requestAnimationFrame(() => { + suppressClick = false; + }); + + if (launcherAt) state.launcher = launcherAt; + saveState(state); + }; + + fab.addEventListener('pointerup', endFabDrag); + // A cancelled drag keeps whatever position it reached, but is not saved. + fab.addEventListener('pointercancel', cancelFabDrag); + fab.addEventListener('lostpointercapture', cancelFabDrag); + + // Keyboard activation of a button fires `click` with no pointer events, so + // the toggle stays on `click` rather than on `pointerup`. + fab.addEventListener('click', () => { + if (suppressClick) { + suppressClick = false; + return; + } + togglePanel(); + }); + + /** Positions the launcher, keeping it fully on screen. */ + function placeLauncher(x: number, y: number) { + const size = fab.offsetWidth; + const left = Math.round(Math.min(Math.max(x, MARGIN), window.innerWidth - size - MARGIN)); + const top = Math.round(Math.min(Math.max(y, MARGIN), window.innerHeight - size - MARGIN)); + fab.style.inset = `${top}px auto auto ${left}px`; + launcherAt = { x: left, y: top }; + return launcherAt; + } + + function applyLauncher() { + if (!state.launcher) return; + placeLauncher(state.launcher.x, state.launcher.y); + } + + // Dragging is not the only way to move it: arrow keys nudge it, and a + // double click returns it to the default corner. + fab.addEventListener('keydown', (event) => { + const step = event.shiftKey ? 32 : 8; + const by: Record = { + ArrowLeft: [-step, 0], + ArrowRight: [step, 0], + ArrowUp: [0, -step], + ArrowDown: [0, step], + }; + const move = by[event.key]; + if (!move) return; + event.preventDefault(); + state.launcher = placeLauncher(fab.offsetLeft + move[0], fab.offsetTop + move[1]); + saveState(state); + }); + + fab.addEventListener('dblclick', () => { + // The two clicks that make up a double click have already toggled the + // panel twice, leaving it as it was; only the position resets. + delete state.launcher; + fab.style.inset = ''; + saveState(state); + }); + + applyLauncher(); + // Keep it reachable when the window changes size. + window.addEventListener('resize', applyLauncher); + // Track resize for float mode. Not every environment that has a document + // also has ResizeObserver, so the panel still works without it. + const resizeObserver = + typeof ResizeObserver === 'undefined' + ? undefined + : new ResizeObserver(() => { + if (state.docked === 'float' && isOpen) { + state.width = panel.offsetWidth; + state.height = panel.offsetHeight; + saveState(state); + } + }); + resizeObserver?.observe(panel); applyDock(); - return { + handle = { toggle: togglePanel, destroy: () => { window.removeEventListener('mousemove', onMouseMove); window.removeEventListener('mouseup', onMouseUp); - resizeObserver.disconnect(); + window.removeEventListener('resize', applyLauncher); + resizeObserver?.disconnect(); popupRoot?.remove(); popupRoot = null; + handle = undefined; isOpen = false; }, }; + return handle; } // Auto-create when loaded as script diff --git a/packages/ng-devtools/src/rpc/__tests__/agent-schema.test.ts b/packages/ng-devtools/src/rpc/__tests__/agent-schema.test.ts new file mode 100644 index 0000000..3e47ccc --- /dev/null +++ b/packages/ng-devtools/src/rpc/__tests__/agent-schema.test.ts @@ -0,0 +1,89 @@ +import * as v from 'valibot'; +import { describe, expect, it } from 'vitest'; +import { describable } from '../agent-schema.ts'; +import { getBuildMeta } from '../build-meta.ts'; +import { getComponents } from '../get-components.ts'; +import { getNgrxStore } from '../get-ngrx-store.ts'; +import { getProviders } from '../get-providers.ts'; +import { getRoutes } from '../get-routes.ts'; +import { getSignals } from '../get-signals.ts'; + +const converterOf = (schema: unknown) => + (schema as { '~standard': { jsonSchema?: { output: (o: unknown) => { type?: string } } } })[ + '~standard' + ].jsonSchema; + +describe('describable', () => { + it('adds a converter', () => { + expect(converterOf(describable(v.array(v.object({ id: v.string() }))))).toBeDefined(); + }); + + it('describes an object return accurately, for the MCP output schema', () => { + const schema = describable(v.object({ ok: v.boolean() })); + expect(converterOf(schema)!.output({ target: 'draft-2020-12' })).toMatchObject({ + type: 'object', + properties: { ok: { type: 'boolean' } }, + }); + }); + + it('is what devframe publishes as the output schema', async () => { + // devframe converts with `input`, and drops a non-object result, so an + // object return must survive and an array return must not be advertised. + const { returnToJsonSchema } = (await import('devframe/internal')) as { + returnToJsonSchema: (schema: unknown) => { type?: string } | undefined; + }; + expect(returnToJsonSchema(describable(v.object({ ok: v.boolean() })))?.type).toBe('object'); + expect(returnToJsonSchema(describable(v.array(v.string())))?.type).toBe('array'); + // Without the converter devframe cannot tell an array from an object. + expect(returnToJsonSchema(v.array(v.string()))).toMatchObject({ type: 'object' }); + }); + + it('converts for the draft devframe asks for', () => { + const schema = describable(v.array(v.string())); + const json = converterOf(schema)!.output({ target: 'draft-2020-12' }) as Record; + expect(json['$schema']).toContain('2020-12'); + }); + + it('describes an array return as an array', () => { + const schema = describable(v.array(v.object({ id: v.string() }))); + expect(converterOf(schema)!.output({ target: 'draft-2020-12' }).type).toBe('array'); + }); + + it('keeps validating', () => { + const schema = describable(v.array(v.string())); + const validate = schema['~standard'].validate as (input: unknown) => { value?: unknown }; + expect(validate(['a'])).toMatchObject({ value: ['a'] }); + }); + + // Without a converter devframe advertises a permissive object output schema, + // and every `tools/call` on these fails because an array does not match it. + it('describes an object return so it can be published as an output schema', () => { + const converter = converterOf((getBuildMeta as { returns: unknown }).returns); + expect(converter!.output({ target: 'draft-2020-12' }).type).toBe('object'); + }); + + // devframe converts with `input`, so that is the path that has to work. + it('converts through the input side devframe uses', () => { + const schema = describable(v.array(v.string())); + const converter = converterOf(schema) as unknown as { + input: (o: unknown) => { type?: string }; + }; + expect(converter.input({ target: 'draft-2020-12' }).type).toBe('array'); + }); + + it('fails at startup rather than silently falling back', () => { + expect(() => describable(v.array(v.custom(() => true)))).toThrow(); + }); + + it.each([ + ['get-routes', getRoutes], + ['get-components', getComponents], + ['get-signals', getSignals], + ['get-providers', getProviders], + ['get-ngrx-store', getNgrxStore], + ])('%s describes its own return value', (_name, definition) => { + const converter = converterOf((definition as { returns: unknown }).returns); + expect(converter).toBeDefined(); + expect(converter!.output({ target: 'draft-2020-12' }).type).toBe('array'); + }); +}); diff --git a/packages/ng-devtools/src/rpc/__tests__/fixture-dir.ts b/packages/ng-devtools/src/rpc/__tests__/fixture-dir.ts new file mode 100644 index 0000000..3f3037d --- /dev/null +++ b/packages/ng-devtools/src/rpc/__tests__/fixture-dir.ts @@ -0,0 +1,12 @@ +import { mkdtempSync, rmSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { onTestFinished } from 'vitest'; + +/** A temporary directory removed when the test that made it finishes. */ +export function fixtureDir(prefix: string): string { + const dir = mkdtempSync(join(tmpdir(), prefix)); + // Registered per test, so a sibling running concurrently cannot remove it. + onTestFinished(() => rmSync(dir, { recursive: true, force: true })); + return dir; +} diff --git a/packages/ng-devtools/src/rpc/__tests__/get-components.test.ts b/packages/ng-devtools/src/rpc/__tests__/get-components.test.ts new file mode 100644 index 0000000..1abe70e --- /dev/null +++ b/packages/ng-devtools/src/rpc/__tests__/get-components.test.ts @@ -0,0 +1,109 @@ +import { mkdirSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { fixtureDir } from './fixture-dir.ts'; +import { describe, expect, it } from 'vitest'; +import { getComponents } from '../get-components.ts'; + +async function componentsFor(source: string) { + const dir = fixtureDir('ng-devtools-components-'); + mkdirSync(join(dir, 'src')); + writeFileSync(join(dir, 'src', 'widgets.ts'), source); + const { handler } = getComponents.setup({ cwd: dir } as never); + return handler(); +} + +describe('get-components', () => { + it('reports every component in a file with its own members', async () => { + const components = await componentsFor(` + @Component({ selector: 'app-alpha', template: '' }) + export class Alpha { + count = input(0) + changed = output() + } + + @Component({ selector: 'app-beta', template: '', standalone: false }) + export class Beta { + label = input.required() + } + `); + expect(components).toEqual([ + expect.objectContaining({ + selector: 'app-alpha', + inputs: ['count'], + outputs: ['changed'], + isStandalone: true, + }), + expect.objectContaining({ + selector: 'app-beta', + inputs: ['label'], + outputs: [], + isStandalone: false, + }), + ]); + }); + + it('reads inputs declared without a type argument', async () => { + const [component] = await componentsFor(` + @Component({ selector: 'app-card', template: '' }) + export class Card { + title = input('') + size = input.required() + expanded = model(false) + closed = output() + } + `); + expect(component.inputs).toEqual(['title', 'size', 'expanded']); + expect(component.outputs).toEqual(['closed']); + }); + + it('marks a directive apart from a component', async () => { + const found = await componentsFor(` + @Component({ selector: 'app-card', template: '' }) + export class Card {} + + @Directive({ selector: '[appHighlight]' }) + export class Highlight {} + `); + expect(found.map((c) => [c.selector, c.kind])).toEqual([ + ['app-card', 'component'], + ['[appHighlight]', 'directive'], + ]); + }); + + it('ignores a component that is commented out', async () => { + const components = await componentsFor(` + // @Component({ selector: 'app-old', template: '' }) + // export class Old {} + + @Component({ selector: 'app-new', template: '' }) + export class New {} + `); + expect(components.map((c) => c.selector)).toEqual(['app-new']); + }); + + it('ignores declarations quoted inside a template', async () => { + const [component] = await componentsFor(` + @Component({ + selector: 'app-docs', + template: \`
title = input('quoted')
\`, + }) + export class Docs { + real = input('') + } + `); + expect(component.selector).toBe('app-docs'); + expect(component.inputs).toEqual(['real']); + }); + + it('still reads decorator based members', async () => { + const [component] = await componentsFor(` + @Component({ selector: 'app-legacy', template: '' }) + export class Legacy { + @Input('aliased') name: string; + @Output() saved = new EventEmitter(); + } + `); + expect(component.inputs).toEqual(['name']); + expect(component.outputs).toEqual(['saved']); + }); +}); diff --git a/packages/ng-devtools/src/rpc/__tests__/get-ngrx-store.test.ts b/packages/ng-devtools/src/rpc/__tests__/get-ngrx-store.test.ts new file mode 100644 index 0000000..837ac1c --- /dev/null +++ b/packages/ng-devtools/src/rpc/__tests__/get-ngrx-store.test.ts @@ -0,0 +1,52 @@ +import { mkdirSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { fixtureDir } from './fixture-dir.ts'; +import { describe, expect, it } from 'vitest'; +import { getNgrxStore } from '../get-ngrx-store.ts'; + +async function storeFor(source: string) { + const dir = fixtureDir('ng-devtools-ngrx-'); + mkdirSync(join(dir, 'src')); + writeFileSync(join(dir, 'src', 'store.ts'), source); + const { handler } = getNgrxStore.setup({ cwd: dir } as never); + return handler(); +} + +describe('get-ngrx-store', () => { + it('reads a signal store', async () => { + const entries = await storeFor( + `export const ProductStore = signalStore(withState({ items: [] }));`, + ); + expect(entries.map((e) => [e.name, e.line])).toEqual([['ProductStore', 1]]); + }); + + it('reads a file whose only ngrx marker is the import', async () => { + const entries = await storeFor( + [ + "import { provideStore } from '@ngrx/store';", + 'export const appConfig = { providers: [provideStore({})] };', + ].join('\n'), + ); + expect(entries.map((e) => e.name)).toContain('provideStore'); + }); + + it('ignores a commented out store', async () => { + const entries = await storeFor( + [ + '// export const OldStore = signalStore(withState({ a: 1 }))', + 'export const ProductStore = signalStore(withState({ items: [] }));', + ].join('\n'), + ); + expect(entries.map((e) => e.name)).toEqual(['ProductStore']); + }); + + it('ignores a store written inside a template string', async () => { + const entries = await storeFor( + [ + 'const docs = `export const DocsStore = signalStore(withState({}))`;', + 'export const ProductStore = signalStore(withState({ items: [] }));', + ].join('\n'), + ); + expect(entries.map((e) => e.name)).toEqual(['ProductStore']); + }); +}); diff --git a/packages/ng-devtools/src/rpc/__tests__/get-providers.test.ts b/packages/ng-devtools/src/rpc/__tests__/get-providers.test.ts new file mode 100644 index 0000000..9613d94 --- /dev/null +++ b/packages/ng-devtools/src/rpc/__tests__/get-providers.test.ts @@ -0,0 +1,113 @@ +import { mkdirSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { fixtureDir } from './fixture-dir.ts'; +import { describe, expect, it } from 'vitest'; +import { getProviders } from '../get-providers.ts'; + +async function providersFor(source: string) { + const dir = fixtureDir('ng-devtools-providers-'); + mkdirSync(join(dir, 'src')); + writeFileSync(join(dir, 'src', 'app.ts'), source); + const { handler } = getProviders.setup({ cwd: dir } as never); + return handler(); +} + +describe('get-providers', () => { + it('reads a providers array', async () => { + const providers = await providersFor(` + @Component({ + providers: [{ provide: PANEL_TITLE, useValue: 'a title' }, FeatureCatalog], + }) + class Panel {} + `); + expect(providers.map((p) => p.token)).toEqual(['PANEL_TITLE', 'FeatureCatalog']); + }); + + it('reads the whole providers array when one entry holds an array', async () => { + const providers = await providersFor( + [ + '@Component({', + ' providers: [{ provide: TOKENS, useValue: [1, 2] }, LateService],', + '})', + 'class Panel {}', + ].join('\n'), + ); + expect(providers.map((p) => p.token)).toEqual(['TOKENS', 'LateService']); + }); + + it('reads a decorator whose argument list holds a comment', async () => { + const providers = await providersFor( + ['@Injectable({', ' /** docs */', " providedIn: 'root',", '})', 'class Api {}'].join('\n'), + ); + expect(providers).toEqual([ + expect.objectContaining({ token: 'Api', providedIn: 'root', line: 1 }), + ]); + }); + + it('does not read identifiers quoted inside a string', async () => { + const providers = await providersFor(` + @Component({ + providers: [{ provide: PANEL_TITLE, useValue: 'Element level providers' }], + }) + class Panel {} + `); + expect(providers.map((p) => p.token)).toEqual(['PANEL_TITLE']); + }); + + it('does not read commented out providers', async () => { + const providers = await providersFor(` + @Component({ + providers: [ + // { provide: OldToken, useValue: 1 }, + NewToken, + ], + }) + class Panel {} + `); + expect(providers.map((p) => p.token)).toEqual(['NewToken']); + }); + + it('reads every providers array in a file, with each token on its own line', async () => { + const providers = await providersFor( + [ + '@Component({', + ' providers: [', + ' FirstToken,', + ' ],', + '})', + 'class First {}', + '', + '@Component({', + ' providers: [SecondToken],', + '})', + 'class Second {}', + ].join('\n'), + ); + expect(providers.map((p) => [p.token, p.line])).toEqual([ + ['FirstToken', 3], + ['SecondToken', 9], + ]); + }); + + it('keeps providedIn and the line of each entry', async () => { + const providers = await providersFor( + ` +@Injectable({ providedIn: 'root' }) +class Settings {}`, + ); + expect(providers).toEqual([ + expect.objectContaining({ token: 'Settings', providedIn: 'root', line: 2 }), + ]); + }); + + it('reads inject() calls', async () => { + const providers = await providersFor(` + class Panel { + readonly settings = inject(ExampleSettings); + } + `); + expect(providers).toContainEqual( + expect.objectContaining({ token: 'ExampleSettings', source: 'settings' }), + ); + }); +}); diff --git a/packages/ng-devtools/src/rpc/__tests__/get-routes.test.ts b/packages/ng-devtools/src/rpc/__tests__/get-routes.test.ts index 78c2574..a0af98c 100644 --- a/packages/ng-devtools/src/rpc/__tests__/get-routes.test.ts +++ b/packages/ng-devtools/src/rpc/__tests__/get-routes.test.ts @@ -1,15 +1,11 @@ -import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; -import { tmpdir } from 'node:os'; +import { mkdirSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; -import { afterEach, describe, expect, it } from 'vitest'; +import { fixtureDir } from './fixture-dir.ts'; +import { describe, expect, it } from 'vitest'; import { getRoutes } from '../get-routes.ts'; -let dir: string; - -afterEach(() => rmSync(dir, { recursive: true, force: true })); - async function routesFor(source: string) { - dir = mkdtempSync(join(tmpdir(), 'ng-devtools-routes-')); + const dir = fixtureDir('ng-devtools-routes-'); mkdirSync(join(dir, 'src')); writeFileSync(join(dir, 'src', 'app.routes.ts'), source); const { handler } = getRoutes.setup({ cwd: dir } as never); @@ -152,6 +148,17 @@ describe('get-routes', () => { expect(routes.map((r) => [r.path, r.component])).toEqual([['home', 'HomeComponent']]); }); + it('flags a lazily loaded child route configuration', async () => { + const routes = await routesFor(`[ + { path: 'admin', loadChildren: () => import('./admin/routes').then((m) => m.adminRoutes) }, + { path: 'about', component: AboutComponent }, + ]`); + expect(routes.map((r) => [r.path, r.hasChildren])).toEqual([ + ['admin', true], + ['about', false], + ]); + }); + it('only flags children on the route that has them', async () => { const routes = await routesFor(`[ { path: 'admin', component: Admin, children: [{ path: 'users', component: Users }] }, diff --git a/packages/ng-devtools/src/rpc/__tests__/get-signals.test.ts b/packages/ng-devtools/src/rpc/__tests__/get-signals.test.ts index c0d5fdc..9aa3489 100644 --- a/packages/ng-devtools/src/rpc/__tests__/get-signals.test.ts +++ b/packages/ng-devtools/src/rpc/__tests__/get-signals.test.ts @@ -1,15 +1,11 @@ -import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'; -import { tmpdir } from 'node:os'; +import { mkdirSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; -import { afterEach, describe, expect, it } from 'vitest'; +import { fixtureDir } from './fixture-dir.ts'; +import { describe, expect, it } from 'vitest'; import { getSignals } from '../get-signals.ts'; -let dir: string; - -afterEach(() => rmSync(dir, { recursive: true, force: true })); - async function signalsFor(source: string) { - dir = mkdtempSync(join(tmpdir(), 'ng-devtools-signals-')); + const dir = fixtureDir('ng-devtools-signals-'); mkdirSync(join(dir, 'src')); writeFileSync(join(dir, 'src', 'app.ts'), source); const { handler } = getSignals.setup({ cwd: dir } as never); diff --git a/packages/ng-devtools/src/rpc/__tests__/source-roots.test.ts b/packages/ng-devtools/src/rpc/__tests__/source-roots.test.ts new file mode 100644 index 0000000..65841d9 --- /dev/null +++ b/packages/ng-devtools/src/rpc/__tests__/source-roots.test.ts @@ -0,0 +1,123 @@ +import { mkdirSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { fixtureDir } from './fixture-dir.ts'; +import { describe, expect, it } from 'vitest'; +import { getComponents } from '../get-components.ts'; +import { getNgrxStore } from '../get-ngrx-store.ts'; +import { getProviders } from '../get-providers.ts'; +import { getRoutes } from '../get-routes.ts'; +import { getSignals } from '../get-signals.ts'; + +function component(dir: string, at: string, selector: string) { + mkdirSync(join(dir, at), { recursive: true }); + writeFileSync( + join(dir, at, 'widget.ts'), + `@Component({ selector: '${selector}', template: '' })\nexport class Widget {}`, + ); +} + +async function componentsIn(workspace: unknown, layout: Record) { + const dir = fixtureDir('ng-devtools-roots-'); + if (workspace) writeFileSync(join(dir, 'angular.json'), JSON.stringify(workspace)); + for (const [at, selector] of Object.entries(layout)) component(dir, at, selector); + const { handler } = getComponents.setup({ cwd: dir } as never); + return (await handler()).map((c) => c.selector).sort(); +} + +describe('source roots', () => { + it('scans every project in the workspace', async () => { + const selectors = await componentsIn( + { + projects: { + shop: { sourceRoot: 'apps/shop/src' }, + admin: { sourceRoot: 'apps/admin/src' }, + ui: { root: 'libs/ui' }, + }, + }, + { + 'apps/shop/src': 'app-shop', + 'apps/admin/src': 'app-admin', + 'libs/ui/src': 'app-ui', + }, + ); + expect(selectors).toEqual(['app-admin', 'app-shop', 'app-ui']); + }); + + it('falls back to src without a workspace file', async () => { + expect(await componentsIn(null, { src: 'app-plain' })).toEqual(['app-plain']); + }); + + it('honours a declared source root that happens to be named like an output dir', async () => { + const selectors = await componentsIn( + { projects: { app: { sourceRoot: 'src/build' } } }, + { 'src/build': 'app-declared' }, + ); + expect(selectors).toEqual(['app-declared']); + }); + + it('refuses a declared source root inside dependencies', async () => { + const selectors = await componentsIn( + { projects: { app: { sourceRoot: 'node_modules/pkg/src' } } }, + { 'node_modules/pkg/src': 'app-dependency', src: 'app-real' }, + ); + expect(selectors).toEqual(['app-real']); + }); + + it('skips generated directories', async () => { + const selectors = await componentsIn(null, { + src: 'app-real', + 'src/node_modules/pkg': 'app-dependency', + 'src/dist': 'app-built', + }); + expect(selectors).toEqual(['app-real']); + }); +}); + +// The wiring was added to all five scanners, so all five are checked. +describe('every scanner reads the workspace source roots', () => { + const workspaceJson = { projects: { shop: { sourceRoot: 'apps/shop/src' } } }; + + function multiProject(file: string, contents: string) { + const dir = fixtureDir('ng-devtools-roots-all-'); + writeFileSync(join(dir, 'angular.json'), JSON.stringify(workspaceJson)); + mkdirSync(join(dir, 'apps', 'shop', 'src'), { recursive: true }); + writeFileSync(join(dir, 'apps', 'shop', 'src', file), contents); + return dir; + } + + it('finds components outside src', async () => { + const dir = multiProject( + 'a.ts', + "@Component({ selector: 'app-shop', template: '' }) class S {}", + ); + const found = await getComponents.setup({ cwd: dir } as never).handler(); + expect(found.map((c) => c.selector)).toEqual(['app-shop']); + }); + + it('finds signals outside src', async () => { + const dir = multiProject('a.ts', 'class S { count = signal(0); }'); + const found = await getSignals.setup({ cwd: dir } as never).handler(); + expect(found.map((s) => s.name)).toEqual(['count']); + }); + + it('finds providers outside src', async () => { + const dir = multiProject('a.ts', "@Injectable({ providedIn: 'root' }) class Api {}"); + const found = await getProviders.setup({ cwd: dir } as never).handler(); + expect(found.map((p) => p.token)).toContain('Api'); + }); + + it('finds routes outside src', async () => { + const dir = multiProject( + 'app.routes.ts', + "export const routes = [{ path: 'home', component: Home }];", + ); + const found = await getRoutes.setup({ cwd: dir } as never).handler(); + expect(found.map((r) => r.path)).toEqual(['home']); + }); + + it('finds ngrx stores outside src', async () => { + const dir = multiProject('store.ts', 'export const S = signalStore(withState({}));'); + const found = await getNgrxStore.setup({ cwd: dir } as never).handler(); + expect(found.map((e) => e.name)).toContain('S'); + }); +}); diff --git a/packages/ng-devtools/src/rpc/__tests__/source-scan.test.ts b/packages/ng-devtools/src/rpc/__tests__/source-scan.test.ts new file mode 100644 index 0000000..3f93f36 --- /dev/null +++ b/packages/ng-devtools/src/rpc/__tests__/source-scan.test.ts @@ -0,0 +1,141 @@ +import { mkdirSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { fixtureDir } from './fixture-dir.ts'; +import { describe, expect, it } from 'vitest'; +import { getComponents } from '../get-components.ts'; +import { getProviders } from '../get-providers.ts'; +import { getRoutes } from '../get-routes.ts'; +import { getSignals } from '../get-signals.ts'; +import { + lineCounter, + maskStrings, + matchDelimiter, + sourceRoots, + stripComments, +} from '../source-scan.ts'; + +function workspace(files: Record, workspaceJson?: unknown) { + const dir = fixtureDir('ng-devtools-scan-'); + if (workspaceJson) writeFileSync(join(dir, 'angular.json'), JSON.stringify(workspaceJson)); + for (const [path, contents] of Object.entries(files)) { + const at = join(dir, path); + mkdirSync(join(at, '..'), { recursive: true }); + writeFileSync(at, contents); + } + return dir; +} + +describe('lexing', () => { + it('does not treat a quote inside a regular expression as a string', () => { + const source = 'const re = /[\'"]/;\nconst after = 1;\n'; + expect(maskStrings(source)).toBe(source); + expect(stripComments(source)).toBe(source); + }); + + it('keeps scanning past a regular expression that contains a quote', async () => { + const dir = workspace({ + 'src/a.ts': [ + "@Component({ selector: 'app-first', template: '' })", + 'export class First {}', + "const slug = (s: string) => s.replace(/['\"]/g, '');", + "@Component({ selector: 'app-second', template: '' })", + 'export class Second { count = signal(0); }', + ].join('\n'), + }); + + const components = await getComponents.setup({ cwd: dir } as never).handler(); + expect(components.map((c) => c.selector)).toEqual(['app-first', 'app-second']); + + const signals = await getSignals.setup({ cwd: dir } as never).handler(); + expect(signals.map((s) => s.name)).toEqual(['count']); + }); + + it('keeps reading routes after a regular expression', async () => { + const dir = workspace({ + 'src/app.routes.ts': [ + "const isId = /^[a-z']+$/;", + 'export const routes = [{ path: 1, component: Home }];'.replace('1', "'home'"), + ].join('\n'), + }); + const routes = await getRoutes.setup({ cwd: dir } as never).handler(); + expect(routes.map((r) => r.path)).toEqual(['home']); + }); + + it('reports the line of a match without rescanning the file', () => { + const at = lineCounter('a\nb\nc'); + expect([at(0), at(2), at(4)]).toEqual([1, 2, 3]); + }); +}); + +describe('source roots', () => { + it('ignores a root that points outside the workspace', () => { + const dir = workspace({ 'src/a.ts': '' }, { projects: { escape: { sourceRoot: '../..' } } }); + expect(sourceRoots(dir)).toEqual([join(dir, 'src')]); + }); + + it('ignores a root that points at a generated directory', () => { + const dir = workspace( + { 'src/a.ts': '', 'node_modules/pkg/a.ts': '' }, + { projects: { bad: { sourceRoot: 'node_modules' } } }, + ); + expect(sourceRoots(dir)).toEqual([join(dir, 'src')]); + }); + + it('drops a root nested inside another so nothing is reported twice', async () => { + const dir = workspace( + { + 'src/lib/src/widget.ts': + "@Component({ selector: 'lib-x', template: '' }) export class X {}", + }, + { projects: { app: { sourceRoot: 'src' }, lib: { sourceRoot: 'src/lib/src' } } }, + ); + expect(sourceRoots(dir)).toEqual([join(dir, 'src')]); + const components = await getComponents.setup({ cwd: dir } as never).handler(); + expect(components.map((c) => c.selector)).toEqual(['lib-x']); + }); + + it('scans nothing rather than the whole directory when no source root exists', () => { + const dir = workspace({ 'lib/a.ts': '' }); + expect(sourceRoots(dir)).toEqual([]); + }); +}); + +describe('component metadata', () => { + it('reads standalone from the component own decorator', async () => { + const dir = workspace({ + 'src/a.ts': [ + 'const legacyMeta = { standalone: false };', + "@Component({ selector: 'app-modern', template: '' })", + 'export class Modern {}', + "@Component({ selector: 'app-legacy', template: '', standalone: false })", + 'export class Legacy {}', + ].join('\n'), + }); + const components = await getComponents.setup({ cwd: dir } as never).handler(); + expect(components.map((c) => [c.selector, c.isStandalone])).toEqual([ + ['app-modern', true], + ['app-legacy', false], + ]); + }); +}); + +describe('matchDelimiter', () => { + it('does not count brackets inside a regex literal', () => { + const code = 'providers: [{ provide: T, useValue: /\\[/ }, Real]\nconst after = [Alpha];'; + const open = code.indexOf('['); + expect(code.slice(open, matchDelimiter(code, open, '[', ']') + 1)).toBe( + '[{ provide: T, useValue: /\\[/ }, Real]', + ); + }); + + it('stays linear when every component holds an unbalanced regex', async () => { + const files = Array.from( + { length: 400 }, + (_, i) => + `@Component({ selector: 'c${i}', providers: [{ provide: T${i}, useValue: /\\[/ }, Real${i}] })\nexport class C${i} {}`, + ).join('\n'); + const dir = workspace({ 'src/a.ts': files }); + const providers = await getProviders.setup({ cwd: dir } as never).handler(); + expect(providers).toHaveLength(800); + }); +}); diff --git a/packages/ng-devtools/src/rpc/agent-schema.ts b/packages/ng-devtools/src/rpc/agent-schema.ts new file mode 100644 index 0000000..4df83ca --- /dev/null +++ b/packages/ng-devtools/src/rpc/agent-schema.ts @@ -0,0 +1,28 @@ +import { toStandardJsonSchema } from '@valibot/to-json-schema'; + +/** + * Attach a [Standard JSON Schema](https://standardschema.dev/) converter to a + * valibot schema. + * + * Devframe stays validator neutral: it describes an RPC `returns` schema with + * the validator's own converter, and valibot does not ship one by default. + * Without it devframe falls back to a permissive object schema and advertises + * that as the MCP `outputSchema`, so a tool returning an array fails every + * `tools/call` against the schema the server itself published. + * + * With the converter attached, an object return is described accurately, and + * an array return advertises no output schema at all, since MCP only allows an + * object there. Either way the response matches what was advertised. + */ +export function describable(schema: T): T { + const described = { ...schema, ...toStandardJsonSchema(schema as never) } as T; + + // Conversion is lazy, and devframe swallows a converter that throws by + // falling back to a permissive object schema: the very thing this avoids. + // Converting once here turns that into an error at startup instead. + (described as { '~standard': { jsonSchema: { input: (o: unknown) => unknown } } })[ + '~standard' + ].jsonSchema.input({ target: 'draft-2020-12' }); + + return described; +} diff --git a/packages/ng-devtools/src/rpc/build-meta.ts b/packages/ng-devtools/src/rpc/build-meta.ts index 9957486..92a4156 100644 --- a/packages/ng-devtools/src/rpc/build-meta.ts +++ b/packages/ng-devtools/src/rpc/build-meta.ts @@ -1,5 +1,6 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; +import { describable } from './agent-schema.ts'; import { existsSync, readFileSync } from 'node:fs'; import { join } from 'node:path'; @@ -17,7 +18,7 @@ export const getBuildMeta = defineRpcFunction({ jsonSerializable: true, snapshot: true, args: [], - returns: BuildMetaSchema, + returns: describable(BuildMetaSchema), agent: { description: 'Angular project metadata: framework version, TypeScript version, SSR status. Baked into static builds. Call this before suggesting dependency or config changes.', diff --git a/packages/ng-devtools/src/rpc/get-components.ts b/packages/ng-devtools/src/rpc/get-components.ts index 3005cc7..4d1d921 100644 --- a/packages/ng-devtools/src/rpc/get-components.ts +++ b/packages/ng-devtools/src/rpc/get-components.ts @@ -1,10 +1,20 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; -import { readFileSync, readdirSync, statSync } from 'node:fs'; +import { describable } from './agent-schema.ts'; +import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; import { join, relative } from 'node:path'; +import { + IGNORED_DIRS, + classScopes, + maskStrings, + matchDelimiter, + sourceRoots, + stripComments, +} from './source-scan.ts'; const ComponentSchema = v.object({ selector: v.string(), + kind: v.string(), file: v.string(), inputs: v.array(v.string()), outputs: v.array(v.string()), @@ -16,28 +26,30 @@ export const getComponents = defineRpcFunction({ type: 'query', jsonSerializable: true, args: [], - returns: v.array(ComponentSchema), + returns: describable(v.array(ComponentSchema)), agent: { description: - 'Discover Angular components by scanning source files for @Component decorators. Returns selectors, inputs, outputs, and file paths. Call this to understand the component architecture.', + 'Discover Angular components and directives by scanning source files for @Component and @Directive decorators. Returns each selector with its kind, inputs, outputs, and file path. Call this to understand the component architecture.', title: 'List Angular components', }, setup: (ctx) => ({ - handler: async () => scanComponents(join(ctx.cwd, 'src'), ctx.cwd), + handler: async () => scanComponents(ctx.cwd), }), }); interface ComponentInfo { selector: string; + /** `component` or `directive`: the scan covers both. */ + kind: string; file: string; inputs: string[]; outputs: string[]; isStandalone: boolean; } -function scanComponents(dir: string, cwd: string): ComponentInfo[] { +function scanComponents(cwd: string): ComponentInfo[] { const components: ComponentInfo[] = []; - walk(dir, cwd, components); + for (const root of sourceRoots(cwd)) walk(root, cwd, components); return components; } @@ -52,8 +64,11 @@ function walk(dir: string, cwd: string, out: ComponentInfo[]) { for (const entry of entries) { const full = join(dir, entry); try { - if (statSync(full).isDirectory()) { - if (entry !== 'node_modules') walk(full, cwd, out); + const stats = lstatSync(full); + // Not followed: a link can point anywhere, including outside the workspace. + if (stats.isSymbolicLink()) continue; + if (stats.isDirectory()) { + if (!IGNORED_DIRS.has(entry.toLowerCase())) walk(full, cwd, out); continue; } } catch { @@ -63,39 +78,67 @@ function walk(dir: string, cwd: string, out: ComponentInfo[]) { if (!entry.endsWith('.ts') || entry.endsWith('.spec.ts')) continue; try { - const content = readFileSync(full, 'utf-8'); - if (!content.includes('@Component')) continue; + out.push(...componentsIn(readFileSync(full, 'utf-8'), relative(cwd, full))); + } catch { + // skip + } + } +} - const selectorMatch = content.match(/selector:\s*['"`]([^'"`]+)['"`]/); - if (!selectorMatch) continue; +function componentsIn(content: string, relPath: string): ComponentInfo[] { + const source = stripComments(content); + // A decorator or a declaration quoted inside a template is not code. + const code = maskStrings(source); - const inputs: string[] = []; - for (const m of content.matchAll(/(\w+)\s*=\s*input(?:<|\.required)/g)) { - inputs.push(m[1]); - } - for (const m of content.matchAll(/@Input\(\)\s+(\w+)/g)) { - inputs.push(m[1]); - } + const components: ComponentInfo[] = []; + const scopes = classScopes(code, source); + scopes.forEach((scope, i) => { + if (!scope.component) return; + const body = code.slice(scope.start, scope.end); + const decorator = precedingDecorator(code, scopes[i - 1]?.end ?? 0, scope.start); + components.push({ + selector: scope.component, + kind: decorator.name, + file: relPath, + inputs: [...names(body, INPUT), ...names(body, INPUT_DECORATOR)], + outputs: [...names(body, OUTPUT), ...names(body, OUTPUT_DECORATOR)], + isStandalone: !/\bstandalone\s*:\s*false\b/.test(decorator.args), + }); + }); + return components; +} - const outputs: string[] = []; - for (const m of content.matchAll(/(\w+)\s*=\s*output(?:<|\()/g)) { - outputs.push(m[1]); - } - for (const m of content.matchAll(/@Output\(\)\s+(\w+)/g)) { - outputs.push(m[1]); - } +function names(body: string, pattern: RegExp): string[] { + pattern.lastIndex = 0; + return [...body.matchAll(pattern)].map((match) => match[1]); +} - const isStandalone = !content.includes('standalone: false'); +// `name = input(`, `name = input(` and `name = input.required(`, optionally +// behind a modifier or a type annotation, as in `readonly name: InputSignal =`. +const INPUT = + /(? component ? 'directive' : 'component'; + if (at === -1) return { name, args: '' }; + + const open = code.indexOf('(', from + at); + if (open === -1 || open >= until) return { name, args: '' }; + return { name, args: code.slice(open, matchDelimiter(code, open, '(', ')') + 1) }; } diff --git a/packages/ng-devtools/src/rpc/get-ngrx-store.ts b/packages/ng-devtools/src/rpc/get-ngrx-store.ts index bcc5c5a..289fd6e 100644 --- a/packages/ng-devtools/src/rpc/get-ngrx-store.ts +++ b/packages/ng-devtools/src/rpc/get-ngrx-store.ts @@ -1,7 +1,15 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; -import { readFileSync, readdirSync, statSync } from 'node:fs'; +import { describable } from './agent-schema.ts'; +import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; import { join, relative } from 'node:path'; +import { + IGNORED_DIRS, + lineCounter, + maskStrings, + sourceRoots, + stripComments, +} from './source-scan.ts'; const NgrxStoreEntrySchema = v.object({ name: v.string(), @@ -26,14 +34,14 @@ export const getNgrxStore = defineRpcFunction({ type: 'query', jsonSerializable: true, args: [], - returns: v.array(NgrxStoreEntrySchema), + returns: describable(v.array(NgrxStoreEntrySchema)), agent: { description: 'Scan source files for NgRx store patterns: actions, reducers, effects, selectors, features, and store setup. Returns name, kind, file, and line number. Call this to understand the NgRx state management architecture.', title: 'List NgRx store entries from source', }, setup: (ctx) => ({ - handler: async () => scanNgrxStore(join(ctx.cwd, 'src'), ctx.cwd), + handler: async () => scanNgrxStore(ctx.cwd), }), }); @@ -89,9 +97,9 @@ const NGRX_PATTERNS: { pattern: RegExp; kind: NgrxStoreEntry['kind'] }[] = [ { pattern: /(\w+)\s*:\s*signalMethod\s*[<(]/g, kind: 'signal-method' }, ]; -function scanNgrxStore(dir: string, cwd: string): NgrxStoreEntry[] { +function scanNgrxStore(cwd: string): NgrxStoreEntry[] { const entries: NgrxStoreEntry[] = []; - walk(dir, cwd, entries); + for (const root of sourceRoots(cwd)) walk(root, cwd, entries); // Deduplicate by name+file+line (guards against overlapping patterns) const seen = new Set(); return entries.filter((e) => { @@ -113,8 +121,11 @@ function walk(dir: string, cwd: string, out: NgrxStoreEntry[]) { for (const item of items) { const full = join(dir, item); try { - if (statSync(full).isDirectory()) { - if (item !== 'node_modules') walk(full, cwd, out); + const stats = lstatSync(full); + // Not followed: a link can point anywhere, including outside the workspace. + if (stats.isSymbolicLink()) continue; + if (stats.isDirectory()) { + if (!IGNORED_DIRS.has(item.toLowerCase())) walk(full, cwd, out); continue; } } catch { @@ -124,29 +135,35 @@ function walk(dir: string, cwd: string, out: NgrxStoreEntry[]) { if (!item.endsWith('.ts') || item.endsWith('.spec.ts') || item.endsWith('.d.ts')) continue; try { - const content = readFileSync(full, 'utf-8'); + const raw = readFileSync(full, 'utf-8'); + // The gate runs on the real text: an import specifier is a string, so a + // masked copy would hide the very marker it looks for. // Quick check: skip files that don't reference ngrx if ( - !content.includes('@ngrx/') && - !content.includes('createAction') && - !content.includes('createReducer') && - !content.includes('createEffect') && - !content.includes('createSelector') && - !content.includes('createFeature') && - !content.includes('signalStore') && - !content.includes('signalState') + !raw.includes('@ngrx/') && + !raw.includes('createAction') && + !raw.includes('createReducer') && + !raw.includes('createEffect') && + !raw.includes('createSelector') && + !raw.includes('createFeature') && + !raw.includes('signalStore') && + !raw.includes('signalState') ) { continue; } + // Comments and strings are not code: a commented out store, or a call + // quoted in a template, is not part of the app. + const content = maskStrings(stripComments(raw)); + const lineAt = lineCounter(content); const relPath = relative(cwd, full); for (const { pattern, kind } of NGRX_PATTERNS) { pattern.lastIndex = 0; let match: RegExpExecArray | null; while ((match = pattern.exec(content)) !== null) { - const lineNum = content.substring(0, match.index).split('\n').length; + const lineNum = lineAt(match.index); const name = match[1]; // For StoreModule/EffectsModule, use the full match as name diff --git a/packages/ng-devtools/src/rpc/get-providers.ts b/packages/ng-devtools/src/rpc/get-providers.ts index 00a9dce..b180295 100644 --- a/packages/ng-devtools/src/rpc/get-providers.ts +++ b/packages/ng-devtools/src/rpc/get-providers.ts @@ -1,6 +1,15 @@ import { defineRpcFunction } from 'devframe'; +import { + IGNORED_DIRS, + lineCounter, + maskStrings, + matchDelimiter, + sourceRoots, + stripComments, +} from './source-scan.ts'; import * as v from 'valibot'; -import { readFileSync, readdirSync, statSync } from 'node:fs'; +import { describable } from './agent-schema.ts'; +import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; import { join, relative } from 'node:path'; const ProviderEntrySchema = v.object({ @@ -17,14 +26,14 @@ export const getProviders = defineRpcFunction({ type: 'query', jsonSerializable: true, args: [], - returns: v.array(ProviderEntrySchema), + returns: describable(v.array(ProviderEntrySchema)), agent: { description: 'Scan source files for DI providers: @Injectable services, inject() calls, and providers arrays. Returns token, file, and where it is provided. Call this to understand the DI architecture.', title: 'List Angular DI providers from source', }, setup: (ctx) => ({ - handler: async () => scanProviders(join(ctx.cwd, 'src'), ctx.cwd), + handler: async () => scanProviders(ctx.cwd), }), }); @@ -70,9 +79,9 @@ interface ProviderEntry { type: string; } -function scanProviders(dir: string, cwd: string): ProviderEntry[] { +function scanProviders(cwd: string): ProviderEntry[] { const entries: ProviderEntry[] = []; - walk(dir, cwd, entries); + for (const root of sourceRoots(cwd)) walk(root, cwd, entries); return entries; } @@ -87,8 +96,11 @@ function walk(dir: string, cwd: string, out: ProviderEntry[]) { for (const item of items) { const full = join(dir, item); try { - if (statSync(full).isDirectory()) { - if (item !== 'node_modules') walk(full, cwd, out); + const stats = lstatSync(full); + // Not followed: a link can point anywhere, including outside the workspace. + if (stats.isSymbolicLink()) continue; + if (stats.isDirectory()) { + if (!IGNORED_DIRS.has(item.toLowerCase())) walk(full, cwd, out); continue; } } catch { @@ -98,54 +110,76 @@ function walk(dir: string, cwd: string, out: ProviderEntry[]) { if (!item.endsWith('.ts') || item.endsWith('.spec.ts') || item.endsWith('.d.ts')) continue; try { - const content = readFileSync(full, 'utf-8'); + const source = stripComments(readFileSync(full, 'utf-8')); + // Identifiers quoted in a string are not providers, so match against + // masked source. Masking keeps the length, so offsets still line up. + const code = maskStrings(source); const relPath = relative(cwd, full); + const lineAt = lineCounter(code); + + // @Injectable({ ... }) or @Service, matched in two steps: the decorator + // name, then the class that follows it. Walking the argument list with a + // bracket matcher keeps a comment or a trailing comma in there from + // sending a single pattern into catastrophic backtracking. + for (const decorator of code.matchAll(/@(Injectable|Service)\b/g)) { + const at = decorator.index; + let after = at + decorator[0].length; + let args = ''; + + const parenAt = code.indexOf('(', after); + if (parenAt !== -1 && code.slice(after, parenAt).trim() === '') { + const close = matchDelimiter(code, parenAt, '(', ')'); + // The value of `providedIn` is a string, so it is read from the + // source rather than the copy with string contents masked out. + args = source.slice(parenAt, close + 1); + after = close + 1; + } - // @Injectable({ providedIn: 'root' }) or @Service (with or without parens) - for (const match of content.matchAll( - /@(?:Injectable|Service)\s*(?:\(\s*\{?\s*(?:providedIn:\s*['"`](\w+)['"`])?\s*\}?\s*\))?\s*\n?\s*(?:export\s+)?class\s+(\w+)/g, - )) { - const decorator = content.substring(match.index!, match.index! + 10); - const isService = decorator.includes('Service'); + DECLARATION.lastIndex = after; + const declaration = DECLARATION.exec(code); + if (!declaration) continue; + + const isService = decorator[1] === 'Service'; out.push({ - token: match[2], + token: declaration[1], source: 'class', file: relPath, - line: content.substring(0, match.index!).split('\n').length, + line: lineAt(at), // @Service defaults to providedIn: 'root' - providedIn: match[1] || (isService ? 'root' : undefined), + providedIn: + /providedIn\s*:\s*['"`](\w+)['"`]/.exec(args)?.[1] ?? (isService ? 'root' : undefined), type: 'injectable', }); } // inject(Token) calls — covers `x = inject(T)`, `readonly x = inject(T)`, `private x = inject()` - for (const match of content.matchAll( - /(?:(?:private|protected|public|readonly)\s+)*(\w+)\s*=\s*inject\s*(?:<[^>]*>)?\s*\(\s*(\w+)/g, + for (const match of code.matchAll( + /(?]*>)?\s*\(\s*(\w+)/g, )) { out.push({ token: match[2], source: match[1], file: relPath, - line: content.substring(0, match.index!).split('\n').length, + line: lineAt(match.index!), type: 'injection', }); } // Constructor injection — @Inject(Token) or typed parameter - for (const match of content.matchAll( + for (const match of code.matchAll( /@Inject\(\s*(\w+)\s*\)\s*(?:private|protected|public|readonly|\s)*(\w+)/g, )) { out.push({ token: match[1], source: match[2], file: relPath, - line: content.substring(0, match.index!).split('\n').length, + line: lineAt(match.index!), type: 'injection', }); } // provide*() calls in app config — provideHttpClient(), provideRouter(), etc. - for (const match of content.matchAll(/\b(provide\w+)\s*\(/g)) { + for (const match of code.matchAll(/\b(provide\w+)\s*\(/g)) { const fnName = match[1]; const token = PROVIDE_FN_TO_TOKEN[fnName]; if (token) { @@ -153,18 +187,19 @@ function walk(dir: string, cwd: string, out: ProviderEntry[]) { token, source: fnName + '()', file: relPath, - line: content.substring(0, match.index!).split('\n').length, + line: lineAt(match.index!), providedIn: 'root', type: 'root-provider', }); } } - // providers: [...] in @Component / @NgModule - const providersMatch = content.match(/providers:\s*\[([\s\S]*?)\]/); - if (providersMatch) { - const block = providersMatch[1]; - const lineOffset = content.substring(0, providersMatch.index!).split('\n').length; + // providers: [...] in every @Component / @Directive / @NgModule + for (const providersMatch of code.matchAll(/providers\s*:\s*\[/g)) { + const openAt = providersMatch.index + providersMatch[0].lastIndexOf('['); + const blockStart = openAt + 1; + // A nested array, as in `useValue: [1, 2]`, must not end the list. + const block = code.slice(blockStart, matchDelimiter(code, openAt, '[', ']')); for (const tokenMatch of block.matchAll(/\b([A-Z]\w+)\b/g)) { const token = tokenMatch[1]; @@ -173,7 +208,7 @@ function walk(dir: string, cwd: string, out: ProviderEntry[]) { token, source: 'providers array', file: relPath, - line: lineOffset, + line: lineAt(blockStart + tokenMatch.index), type: 'provider', }); } @@ -183,3 +218,6 @@ function walk(dir: string, cwd: string, out: ProviderEntry[]) { } } } + +/** Sticky, so the class after a decorator is found however far it sits. */ +const DECLARATION = /\s*(?:export\s+)?(?:default\s+)?(?:abstract\s+)?class\s+(\w+)/y; diff --git a/packages/ng-devtools/src/rpc/get-routes.ts b/packages/ng-devtools/src/rpc/get-routes.ts index 05a7da3..6403abb 100644 --- a/packages/ng-devtools/src/rpc/get-routes.ts +++ b/packages/ng-devtools/src/rpc/get-routes.ts @@ -1,8 +1,16 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; -import { readFileSync, readdirSync, statSync } from 'node:fs'; +import { describable } from './agent-schema.ts'; +import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; import { join, relative } from 'node:path'; -import { skipString, stripComments } from './source-scan.ts'; +import { + IGNORED_DIRS, + skipRegex, + skipString, + sourceRoots, + startsRegex, + stripComments, +} from './source-scan.ts'; const RouteSchema = v.object({ path: v.string(), @@ -16,7 +24,7 @@ export const getRoutes = defineRpcFunction({ type: 'query', jsonSerializable: true, args: [], - returns: v.array(RouteSchema), + returns: describable(v.array(RouteSchema)), agent: { description: 'List Angular routes extracted from route configuration files in the workspace. Call before suggesting navigation changes or analyzing the app structure.', @@ -29,7 +37,7 @@ export const getRoutes = defineRpcFunction({ function extractRoutes(cwd: string) { const routes: { path: string; component?: string; hasChildren: boolean; file: string }[] = []; - findRouteFiles(join(cwd, 'src'), cwd, routes); + for (const root of sourceRoots(cwd)) findRouteFiles(root, cwd, routes); return routes; } @@ -48,8 +56,11 @@ function findRouteFiles( for (const entry of entries) { const full = join(dir, entry); try { - if (statSync(full).isDirectory()) { - if (entry !== 'node_modules') findRouteFiles(full, cwd, routes); + const stats = lstatSync(full); + // Not followed: a link can point anywhere, including outside the workspace. + if (stats.isSymbolicLink()) continue; + if (stats.isDirectory()) { + if (!IGNORED_DIRS.has(entry.toLowerCase())) findRouteFiles(full, cwd, routes); continue; } } catch { @@ -69,7 +80,8 @@ function findRouteFiles( routes.push({ path, component: routeComponent(props), - hasChildren: props.has('children'), + // `loadChildren` has children too, it just loads them lazily. + hasChildren: props.has('children') || props.has('loadChildren'), file: relPath, }); } @@ -97,7 +109,8 @@ function objectLiterals(source: string): string[] { const open: Bracket[] = []; for (let i = 0; i < source.length; i++) { const ch = source[i]; - if (ch === '"' || ch === "'" || ch === '`') i = skipString(source, i); + if (ch === '/' && startsRegex(source, i)) i = skipRegex(source, i); + else if (ch === '"' || ch === "'" || ch === '`') i = skipString(source, i); else if ('([{'.includes(ch)) { const parent = open.at(-1); open.push({ @@ -125,7 +138,8 @@ function topLevelProps(body: string): Map { let start = 0; for (let i = 0; i < body.length; i++) { const ch = body[i]; - if (ch === '"' || ch === "'" || ch === '`') i = skipString(body, i); + if (ch === '/' && startsRegex(body, i)) i = skipRegex(body, i); + else if (ch === '"' || ch === "'" || ch === '`') i = skipString(body, i); else if ('([{'.includes(ch)) depth++; else if (')]}'.includes(ch)) depth--; else if (ch === ',' && depth === 0) { diff --git a/packages/ng-devtools/src/rpc/get-signals.ts b/packages/ng-devtools/src/rpc/get-signals.ts index e2e68de..e531cb5 100644 --- a/packages/ng-devtools/src/rpc/get-signals.ts +++ b/packages/ng-devtools/src/rpc/get-signals.ts @@ -1,8 +1,16 @@ import { defineRpcFunction } from 'devframe'; import * as v from 'valibot'; -import { readFileSync, readdirSync, statSync } from 'node:fs'; +import { describable } from './agent-schema.ts'; +import { lstatSync, readFileSync, readdirSync, statSync } from 'node:fs'; import { join, relative } from 'node:path'; -import { lineAt, maskStrings, skipString, stripComments } from './source-scan.ts'; +import { + IGNORED_DIRS, + classScopes, + lineCounter, + maskStrings, + sourceRoots, + stripComments, +} from './source-scan.ts'; const SignalEntrySchema = v.object({ name: v.string(), @@ -17,14 +25,14 @@ export const getSignals = defineRpcFunction({ type: 'query', jsonSerializable: true, args: [], - returns: v.array(SignalEntrySchema), + returns: describable(v.array(SignalEntrySchema)), agent: { description: 'Scan source files for signal(), computed(), linkedSignal(), and effect() declarations. Returns name, kind, file, and line number. Call this to understand the reactive architecture before suggesting changes.', title: 'List Angular signals from source', }, setup: (ctx) => ({ - handler: async () => scanSignals(join(ctx.cwd, 'src'), ctx.cwd), + handler: async () => scanSignals(ctx.cwd), }), }); @@ -36,12 +44,6 @@ interface SignalEntry { component?: string; } -interface ClassScope { - start: number; - end: number; - component?: string; -} - const KINDS: Record = { signal: 'signal', computed: 'computed', @@ -64,16 +66,13 @@ const KINDS: Record = { // `this.` prefix is a declaration too, but any other member assignment, as in // `store.count = signal(0)`, is not, hence the lookbehind. const SIGNAL_CALL = new RegExp( - String.raw`(? at >= scope.start && at < scope.end)?.component, }); } return entries; } - -/** - * The span of every class in the file, each with the selector of the - * `@Component` or `@Directive` decorating it, so that a signal is reported - * against the class that declares it rather than the first selector in the - * file. - */ -function classScopes(code: string, source: string): ClassScope[] { - const scopes: ClassScope[] = []; - const declaration = /\bclass\s+\w+/g; - let previousEnd = 0; - let match: RegExpExecArray | null; - // `code` has string contents masked out, so a class written inside a - // template cannot open a scope; `source` still holds the selector to read. - while ((match = declaration.exec(code)) !== null) { - const bodyStart = classBodyStart(code, match.index + match[0].length); - if (bodyStart === -1) break; - const end = matchDelimiter(code, bodyStart, '{', '}'); - scopes.push({ - start: match.index, - end, - component: decoratorSelector( - code.slice(previousEnd, match.index), - source.slice(previousEnd, match.index), - ), - }); - previousEnd = end; - declaration.lastIndex = end; - } - return scopes; -} - -/** - * The first `{` that opens the class body, skipping the braces a generic - * parameter list can hold, as in `class Panel {`. - */ -function classBodyStart(code: string, from: number): number { - let angle = 0; - for (let i = from; i < code.length; i++) { - const ch = code[i]; - if (ch === '"' || ch === "'" || ch === '`') i = skipString(code, i); - else if (ch === '<') angle++; - else if (ch === '>' && angle > 0) angle--; - else if (ch === '{' && angle === 0) return i; - } - return -1; -} - -/** - * The selector of the last `@Component`/`@Directive` decorator in `code`, read - * out of `source` at the same offsets. Both the decorator and the `selector` - * key are found in the masked copy, so neither a decorator nor a `selector:` - * written inside a template can be picked up, and only the value is read from - * the unmasked copy, where it survives. - */ -function decoratorSelector(code: string, source: string): string | undefined { - let open = -1; - for (const match of code.matchAll(DECORATOR)) open = match.index + match[0].length - 1; - if (open === -1) return undefined; - const args = code.slice(open, matchDelimiter(code, open, '(', ')')); - const key = /\bselector\s*:\s*['"`]/.exec(args); - if (!key) return undefined; - const quote = open + key.index + key[0].length - 1; - return source.slice(quote + 1, skipString(source, quote)); -} - -function matchDelimiter(source: string, open: number, start: string, end: string): number { - let depth = 0; - for (let i = open; i < source.length; i++) { - const ch = source[i]; - if (ch === '"' || ch === "'" || ch === '`') i = skipString(source, i); - else if (ch === start) depth++; - else if (ch === end && --depth === 0) return i; - } - return source.length; -} diff --git a/packages/ng-devtools/src/rpc/source-scan.ts b/packages/ng-devtools/src/rpc/source-scan.ts index 2a12ced..6d8f7b7 100644 --- a/packages/ng-devtools/src/rpc/source-scan.ts +++ b/packages/ng-devtools/src/rpc/source-scan.ts @@ -1,14 +1,58 @@ +import { readFileSync, realpathSync, statSync } from 'node:fs'; +import { isAbsolute, join, relative, resolve } from 'node:path'; + // Helpers shared by the RPC functions that read information out of source // files with regular expressions. None of them parse TypeScript; they only do // enough lexing to keep strings and comments from being mistaken for code. -/** Index of the quote that closes the string starting at `start`. */ +/** + * Index of the `/` that closes the regular expression starting at `start`, or + * `start` itself when this is a division rather than a literal. + */ +export function skipRegex(source: string, start: number): number { + let inClass = false; + for (let i = start + 1; i < source.length; i++) { + const ch = source[i]; + if (ch === '\\') i++; + else if (ch === '\n') return start; + else if (ch === '[') inClass = true; + else if (ch === ']') inClass = false; + else if (ch === '/' && !inClass) return i; + } + return start; +} + +/** Whether the `/` at `at` opens a regular expression rather than dividing. */ +export function startsRegex(source: string, at: number): boolean { + for (let i = at - 1; i >= 0; i--) { + const ch = source[i]; + if (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r') continue; + // After a value, `/` divides; after an operator or a keyword, it opens one. + return ( + !/[\w$)\]]/.test(ch) || /\b(return|typeof|case|in|of|do|else)$/.test(source.slice(0, i + 1)) + ); + } + return true; +} + +/** + * Index of the quote that closes the string starting at `start`, or `start` + * itself when there is none. + * + * Only a template literal may span lines, so a `'` or `"` left open at the end + * of its line is not a string at all. It is usually a quote inside a regular + * expression, as in `/['"]/`, and treating it as a string would blank out the + * rest of the file. + */ export function skipString(source: string, start: number): number { + const quote = source[start]; for (let i = start + 1; i < source.length; i++) { - if (source[i] === '\\') i++; - else if (source[i] === source[start]) return i; + const ch = source[i]; + if (ch === '\\') i++; + else if (ch === quote) return i; + else if (ch === '\n' && quote !== '`') return start; } - return source.length; + return start; } /** @@ -19,19 +63,33 @@ export function stripComments(source: string): string { let out = ''; for (let i = 0; i < source.length; i++) { const ch = source[i]; - if (ch === '"' || ch === "'" || ch === '`') { - const end = skipString(source, i); - out += source.slice(i, end + 1); - i = end; - } else if (source.startsWith('//', i)) { + // Comments first: `//` would otherwise look like an empty regex literal. + if (source.startsWith('//', i)) { const end = source.indexOf('\n', i); - out += ' '.repeat((end === -1 ? source.length : end) - i); - i = (end === -1 ? source.length : end) - 1; - } else if (source.startsWith('/*', i)) { - const end = source.indexOf('*/', i + 2); - const stop = end === -1 ? source.length : end + 2; + const stop = end === -1 ? source.length : end; out += blank(source.slice(i, stop)); i = stop - 1; + } else if (source.startsWith('/*', i)) { + const end = source.indexOf('*/', i + 2); + if (end === -1) { + // Unterminated, so not a comment; blanking here would erase the file. + out += ch; + continue; + } + out += blank(source.slice(i, end + 2)); + i = end + 1; + } else if (ch === '/' && startsRegex(source, i)) { + const end = skipRegex(source, i); + out += source.slice(i, end + 1); + i = end; + } else if (ch === '"' || ch === "'" || ch === '`') { + const end = skipString(source, i); + if (end === i) { + out += ch; + continue; + } + out += source.slice(i, end + 1); + i = end; } else { out += ch; } @@ -48,8 +106,17 @@ export function maskStrings(source: string): string { let out = ''; for (let i = 0; i < source.length; i++) { const ch = source[i]; - if (ch === '"' || ch === "'" || ch === '`') { + if (ch === '/' && startsRegex(source, i)) { + const end = skipRegex(source, i); + out += source.slice(i, end + 1); + i = end; + } else if (ch === '"' || ch === "'" || ch === '`') { const end = skipString(source, i); + if (end === i) { + // Not a string after all, so the quote is just a character. + out += ch; + continue; + } out += ch + blank(source.slice(i + 1, end)) + (end < source.length ? source[end] : ''); i = end; } else { @@ -59,16 +126,212 @@ export function maskStrings(source: string): string { return out; } -/** The 1-based line number of `index` in `source`. */ -export function lineAt(source: string, index: number): number { - let line = 1; - for (let i = 0; i < index && i < source.length; i++) { - if (source[i] === '\n') line++; +/** + * A reusable line lookup for one file. Scanning for newlines on every match is + * quadratic over a file; this walks it once and then binary searches. + */ +export function lineCounter(source: string): (index: number) => number { + const starts = [0]; + for (let i = 0; i < source.length; i++) { + if (source[i] === '\n') starts.push(i + 1); } - return line; + return (index) => { + let low = 0; + let high = starts.length - 1; + while (low < high) { + const mid = (low + high + 1) >> 1; + if (starts[mid] <= index) low = mid; + else high = mid - 1; + } + return low + 1; + }; } /** Same length as `text`, with every character but the newlines blanked out. */ function blank(text: string): string { return text.replace(/[^\n]/g, ' '); } + +/** A class body, with the selector of the decorator that precedes it. */ +export interface ClassScope { + start: number; + end: number; + component?: string; +} + +const DECORATOR = /@(?:Component|Directive)\s*\(/g; + +/** + * The span of every class in the file, each with the selector of the + * `@Component` or `@Directive` decorating it. + */ +export function classScopes(code: string, source: string): ClassScope[] { + const scopes: ClassScope[] = []; + const declaration = /\bclass\s+\w+/g; + let previousEnd = 0; + let match: RegExpExecArray | null; + // `code` has string contents masked out, so a class written inside a + // template cannot open a scope; `source` still holds the selector to read. + while ((match = declaration.exec(code)) !== null) { + const bodyStart = classBodyStart(code, match.index + match[0].length); + if (bodyStart === -1) break; + const end = matchDelimiter(code, bodyStart, '{', '}'); + scopes.push({ + start: match.index, + end, + component: decoratorSelector( + code.slice(previousEnd, match.index), + source.slice(previousEnd, match.index), + ), + }); + previousEnd = end; + declaration.lastIndex = end; + } + return scopes; +} + +/** + * The first `{` that opens the class body, skipping the braces a generic + * parameter list can hold, as in `class Panel {`. + */ +function classBodyStart(code: string, from: number): number { + let angle = 0; + for (let i = from; i < code.length; i++) { + const ch = code[i]; + if (ch === '/' && startsRegex(code, i)) i = skipRegex(code, i); + else if (ch === '"' || ch === "'" || ch === '`') i = skipString(code, i); + else if (ch === '<') angle++; + else if (ch === '>' && angle > 0) angle--; + else if (ch === '{' && angle === 0) return i; + } + return -1; +} + +/** + * The selector of the last `@Component`/`@Directive` decorator in `code`, read + * out of `source` at the same offsets. Both the decorator and the `selector` + * key are found in the masked copy, so neither a decorator nor a `selector:` + * written inside a template can be picked up, and only the value is read from + * the unmasked copy, where it survives. + */ +function decoratorSelector(code: string, source: string): string | undefined { + let open = -1; + for (const match of code.matchAll(DECORATOR)) open = match.index + match[0].length - 1; + if (open === -1) return undefined; + const args = code.slice(open, matchDelimiter(code, open, '(', ')')); + const key = /\bselector\s*:\s*['"`]/.exec(args); + if (!key) return undefined; + const quote = open + key.index + key[0].length - 1; + return source.slice(quote + 1, skipString(source, quote)); +} + +/** Index of the delimiter that closes the one at `open`. */ +export function matchDelimiter(source: string, open: number, start: string, end: string): number { + let depth = 0; + for (let i = open; i < source.length; i++) { + const ch = source[i]; + if (ch === '"' || ch === "'" || ch === '`') i = skipString(source, i); + else if (ch === '/' && i > open && startsRegex(source, i)) i = skipRegex(source, i); + else if (ch === start) depth++; + else if (ch === end && --depth === 0) return i; + } + return source.length; +} + +/** + * The directories to scan for source files: every `sourceRoot` in + * `angular.json`, so a workspace with more than one project is covered, and + * `src` for a project without one. Falls back to the working directory. + */ +export function sourceRoots(cwd: string): string[] { + const roots: string[] = []; + try { + const workspace = JSON.parse(readFileSync(join(cwd, 'angular.json'), 'utf-8')); + const projects = workspace?.projects; + for (const project of Object.values(projects ?? {})) { + if (!project || typeof project !== 'object') continue; + const entry = project as Record; + const root = entry['sourceRoot'] ?? join(String(entry['root'] ?? ''), 'src'); + if (typeof root === 'string' && root) roots.push(resolve(cwd, root)); + } + } catch { + // no workspace file, or it is not readable + } + const declared = new Set(roots); + roots.push(join(cwd, 'src')); + + // Resolve symlinks before comparing: `resolve()` is only string work, so a + // `sourceRoot` that is a link, or a `src` that is, would otherwise pass the + // containment check and have its files reported as if they were in here. + const root = realPath(cwd); + const seen = new Set(); + const usable = [...new Set(roots)].filter((dir) => { + const real = realPath(dir); + if (seen.has(real)) return false; + const inside = relative(root, real); + // Must be a strict descendant: `.` resolves to the workspace itself, which + // would widen every scan to the whole repository. + if (!inside || inside.startsWith('..') || isAbsolute(inside)) return false; + // A declared `sourceRoot` is deliberate, so a project really rooted at + // `src/build` is honoured; only dependencies are refused outright. + const refused = declared.has(dir) ? DEPENDENCY_DIRS : IGNORED_DIRS; + if (inside.split(/[\\/]/).some((part) => refused.has(part.toLowerCase()))) return false; + try { + if (!statSync(real).isDirectory()) return false; + } catch { + return false; + } + seen.add(real); + return true; + }); + + // A root nested inside another would report everything under it twice. + // Sorted, a root can only be nested inside the last covering one, so this + // stays linear on a workspace with hundreds of projects. + const kept: string[] = []; + let cover: string | undefined; + for (const dir of usable.sort()) { + const inCover = cover && !relative(cover, dir).startsWith('..'); + if (inCover) { + // The walk refuses to descend into a generated directory, so a project + // declared below one is only reachable by starting there. + const crosses = relative(cover!, dir) + .split(/[\\/]/) + .some((part) => IGNORED_DIRS.has(part.toLowerCase())); + if (!crosses) continue; + kept.push(dir); + continue; + } + kept.push(dir); + cover = dir; + } + return kept; +} + +/** Directories holding third-party code, never scanned even when declared. */ +export const DEPENDENCY_DIRS = new Set(['node_modules', '.git', '.yarn']); + +/** Directories that never hold project source. */ +export const IGNORED_DIRS = new Set([ + 'node_modules', + 'dist', + 'build', + 'out-tsc', + 'coverage', + 'tmp', + '.angular', + '.git', + '.nx', + '.cache', + '.turbo', + '.yarn', +]); + +/** The path with symlinks resolved, or the path itself when it does not exist. */ +function realPath(path: string): string { + try { + return realpathSync(path); + } catch { + return path; + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc4c1a6..934f928 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,6 +102,9 @@ importers: '@devframes/agentic': specifier: ^1.0.0 version: 1.0.0(crossws@0.4.12(srvx@1.0.5))(devframe@1.0.0) + '@valibot/to-json-schema': + specifier: ^1.8.0 + version: 1.8.0(valibot@1.5.0(typescript@6.0.3)) cac: specifier: ^7.0.0 version: 7.0.0 @@ -1723,6 +1726,11 @@ packages: '@types/serve-static@2.2.0': resolution: {integrity: sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==} + '@valibot/to-json-schema@1.8.0': + resolution: {integrity: sha512-a0M+uwCuQZEPAo65NYkFSJ14O5c213KoSZmPdoCfuFvUhfULi4T2Z6Tpjv6lTVMW9RoLm74RpRAjNEa43KcN+g==} + peerDependencies: + valibot: ^1.5.0 + '@vitejs/plugin-basic-ssl@2.3.0': resolution: {integrity: sha512-bdyo8rB3NnQbikdMpHaML9Z1OZPBu6fFOBo+OtxsBlvMJtysWskmBcnbIDhUqgC8tcxNv/a+BcV5U+2nQMm1OQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -4272,6 +4280,10 @@ snapshots: '@types/http-errors': 2.0.5 '@types/node': 20.19.43 + '@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@6.0.3))': + dependencies: + valibot: 1.5.0(typescript@6.0.3) + '@vitejs/plugin-basic-ssl@2.3.0(vite@8.1.5(@types/node@20.19.43)(esbuild@0.28.2)(sass@1.101.0))': dependencies: vite: 8.1.5(@types/node@20.19.43)(esbuild@0.28.2)(sass@1.101.0) diff --git a/src/app/app.css b/src/app/app.css index e5646a6..3faed7f 100644 --- a/src/app/app.css +++ b/src/app/app.css @@ -1,7 +1,7 @@ :host { display: block; min-height: 100vh; - background: #fafafa; + background: var(--page); } .navbar { @@ -9,25 +9,45 @@ align-items: center; gap: 32px; padding: 0 24px; - height: 56px; - background: #fff; - border-bottom: 1px solid #e5e7eb; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); + min-height: 56px; + background: var(--surface); + border-bottom: 1px solid var(--line); + box-shadow: 0 1px 3px var(--shadow); position: sticky; top: 0; z-index: 100; } +/* The bar carries five items; below this it needs two rows rather than + clipping the last of them off the screen. */ +@media (max-width: 700px) { + .navbar { + flex-wrap: wrap; + gap: 8px 16px; + padding: 8px 16px; + } + .nav-links { + order: 3; + flex-basis: 100%; + } +} + .brand { + white-space: nowrap; font-weight: 700; font-size: 16px; - color: #7c3aed; text-decoration: none; letter-spacing: -0.01em; + color: var(--brand); +} + +.navbar app-theme-toggle { + margin-left: auto; } .nav-links { display: flex; + flex-wrap: wrap; gap: 4px; } @@ -36,7 +56,7 @@ border-radius: 6px; font-size: 14px; font-weight: 500; - color: #6b7280; + color: var(--muted); text-decoration: none; transition: background 0.15s, @@ -44,11 +64,25 @@ } .nav-links a:hover { - background: #f3f4f6; - color: #111827; + background: var(--subtle); + color: var(--ink); } .nav-links a.active { - background: #ede9fe; - color: #7c3aed; + background: var(--brand-soft); + color: var(--brand); +} + +.skip-link { + position: absolute; + left: -9999px; + top: 0; + z-index: 200; + padding: 8px 16px; + background: var(--surface); + color: var(--brand); +} + +.skip-link:focus { + left: 0; } diff --git a/src/app/app.html b/src/app/app.html index 11cc8b5..d55674f 100644 --- a/src/app/app.html +++ b/src/app/app.html @@ -1,4 +1,5 @@ -