git-history-ui 2.0.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/README.md +100 -10
- package/build/frontend/chunk-2QTYGOOP.js +1 -0
- package/build/frontend/chunk-36NFLS3P.js +1 -0
- package/build/frontend/chunk-3FFYILBL.js +1 -0
- package/build/frontend/chunk-C56FFICU.js +2 -0
- package/build/frontend/chunk-HIERJLKT.js +1 -0
- package/build/frontend/chunk-HYRHOB47.js +7 -0
- package/build/frontend/chunk-ITIFFECZ.js +1 -0
- package/build/frontend/chunk-N7UHDKJ7.js +1 -0
- package/build/frontend/chunk-NUMLL3OZ.js +1 -0
- package/build/frontend/chunk-TQE5NWMZ.js +5 -0
- package/build/frontend/chunk-TQVUSJBM.js +1 -0
- package/build/frontend/chunk-YSTG766K.js +1 -0
- package/build/frontend/index.html +2 -2
- package/build/frontend/main-44WYBFGF.js +1 -0
- package/build/frontend/styles-GSJUSSXL.css +1 -0
- package/dist/backend/aggregations.d.ts +57 -0
- package/dist/backend/aggregations.js +130 -0
- package/dist/backend/aggregations.js.map +1 -0
- package/dist/backend/annotations.d.ts +30 -0
- package/dist/backend/annotations.js +90 -0
- package/dist/backend/annotations.js.map +1 -0
- package/dist/backend/gitService.d.ts +14 -0
- package/dist/backend/gitService.js +81 -0
- package/dist/backend/gitService.js.map +1 -1
- package/dist/backend/grouping/prGrouping.d.ts +39 -0
- package/dist/backend/grouping/prGrouping.js +210 -0
- package/dist/backend/grouping/prGrouping.js.map +1 -0
- package/dist/backend/impact.d.ts +16 -0
- package/dist/backend/impact.js +66 -0
- package/dist/backend/impact.js.map +1 -0
- package/dist/backend/insights.d.ts +9 -0
- package/dist/backend/insights.js +44 -0
- package/dist/backend/insights.js.map +1 -0
- package/dist/backend/llm/anthropicProvider.d.ts +13 -0
- package/dist/backend/llm/anthropicProvider.js +90 -0
- package/dist/backend/llm/anthropicProvider.js.map +1 -0
- package/dist/backend/llm/heuristicProvider.d.ts +15 -0
- package/dist/backend/llm/heuristicProvider.js +127 -0
- package/dist/backend/llm/heuristicProvider.js.map +1 -0
- package/dist/backend/llm/index.d.ts +17 -0
- package/dist/backend/llm/index.js +66 -0
- package/dist/backend/llm/index.js.map +1 -0
- package/dist/backend/llm/openaiProvider.d.ts +13 -0
- package/dist/backend/llm/openaiProvider.js +100 -0
- package/dist/backend/llm/openaiProvider.js.map +1 -0
- package/dist/backend/llm/types.d.ts +32 -0
- package/dist/backend/llm/types.js +3 -0
- package/dist/backend/llm/types.js.map +1 -0
- package/dist/backend/search/datePhrase.d.ts +20 -0
- package/dist/backend/search/datePhrase.js +113 -0
- package/dist/backend/search/datePhrase.js.map +1 -0
- package/dist/backend/search/nlSearch.d.ts +39 -0
- package/dist/backend/search/nlSearch.js +90 -0
- package/dist/backend/search/nlSearch.js.map +1 -0
- package/dist/backend/server.d.ts +3 -0
- package/dist/backend/server.js +137 -2
- package/dist/backend/server.js.map +1 -1
- package/dist/backend/snapshot.d.ts +16 -0
- package/dist/backend/snapshot.js +42 -0
- package/dist/backend/snapshot.js.map +1 -0
- package/docs/launch.md +66 -0
- package/docs/screenshot.png +0 -0
- package/package.json +13 -3
- package/build/frontend/main-GGMHSSIF.js +0 -11
- package/build/frontend/styles-CO6MLMTR.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,93 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
5
5
|
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [3.0.0] - 2026-05-02
|
|
8
|
+
|
|
9
|
+
This release transforms `git-history-ui` from a "pretty git log" into a
|
|
10
|
+
**Git Intelligence** platform. Everything is still zero-config; new AI
|
|
11
|
+
features are opt-in via your own API key.
|
|
12
|
+
|
|
13
|
+
### Added — Headline features
|
|
14
|
+
|
|
15
|
+
- **Natural-language search.** A new `/api/search` endpoint and toggle in the
|
|
16
|
+
toolbar accept queries like "login bug last month" or "payments by alice".
|
|
17
|
+
A built-in heuristic intent parser handles dates, authors, and synonym
|
|
18
|
+
expansion (`fix` → `bug, hotfix, patch`, `auth` → `login, oauth, jwt`,
|
|
19
|
+
etc.). When `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` is set, results are
|
|
20
|
+
semantically re-ranked. The interpreted query is shown as removable chips
|
|
21
|
+
so you always know how the tool understood your request.
|
|
22
|
+
- **PR / feature grouping.** A new `/api/groups` endpoint clusters commits by
|
|
23
|
+
GitHub merge commits (`Merge pull request #N from ...`), squash merges
|
|
24
|
+
(`subject (#N)`), and Conventional Commits scope (`feat(auth):`,
|
|
25
|
+
`fix(payments):`). Toggle the flat / grouped view from the toolbar.
|
|
26
|
+
Optional `GITHUB_TOKEN` enriches groups with PR title, author, labels.
|
|
27
|
+
- **Time travel.** New `/timeline` route with a horizontal slider. Drag to any
|
|
28
|
+
point in history to see HEAD, branch, and tag positions at that moment, and
|
|
29
|
+
a live diff against current HEAD.
|
|
30
|
+
- **File history & blame.** Click any file in a commit's Files panel to open
|
|
31
|
+
`/file/:path` — full history of every commit that touched the file, plus a
|
|
32
|
+
tabbed blame view (the existing `/api/blame` endpoint now has a UI).
|
|
33
|
+
- **Commit impact analysis.** New `/api/impact/:hash` endpoint shows files
|
|
34
|
+
touched, modules affected, dependency ripple parsed from JS/TS imports, and
|
|
35
|
+
related commits that touched the same files.
|
|
36
|
+
- **Insights dashboard.** New `/insights` route with top contributors,
|
|
37
|
+
hotspots (most-changed files), churn over time, and a heuristic risky-files
|
|
38
|
+
score that blends churn × contributor diversity × recency.
|
|
39
|
+
- **AI extras (optional).** "Explain this change" on commits and "Summarize"
|
|
40
|
+
on diffs, both powered by `LlmService.summarize()`. Disabled with a clear
|
|
41
|
+
tooltip when no provider key is configured.
|
|
42
|
+
- **Local-first annotations.** Add notes to any commit; stored at
|
|
43
|
+
`~/.git-history-ui/<repo-hash>/annotations.json`. New endpoints under
|
|
44
|
+
`/api/annotations/:hash`.
|
|
45
|
+
- **Shareable links.** A "Share" button on the commit detail copies a URL
|
|
46
|
+
with the commit hash encoded.
|
|
47
|
+
- **Collapse unchanged blocks.** Diffs default to ±3 lines of context with an
|
|
48
|
+
Expand button to reveal the rest.
|
|
49
|
+
|
|
50
|
+
### Added — Plumbing
|
|
51
|
+
|
|
52
|
+
- New `LlmService` abstraction (`src/backend/llm/`) with three providers:
|
|
53
|
+
`HeuristicProvider` (always-on, pure heuristic), `AnthropicProvider`
|
|
54
|
+
(claude-3-5-haiku by default), and `OpenAiProvider` (gpt-4o-mini by
|
|
55
|
+
default). Provider selected via `GHUI_LLM_PROVIDER` + key auto-detection.
|
|
56
|
+
- New aggregations module (`src/backend/aggregations.ts`) with pure functions
|
|
57
|
+
for contributor stats, file churn, churn-by-day, and risky-file scoring.
|
|
58
|
+
- Real Angular routing replaces the previous single-page layout. New routes:
|
|
59
|
+
`/`, `/timeline`, `/file/:path`, `/insights`. Components are lazy-loaded.
|
|
60
|
+
- Backend POST/DELETE endpoints (annotations, summarize, explain). CORS
|
|
61
|
+
updated to allow these methods on local origins only.
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- Toolbar adds nav links (History / Timeline / Insights), a search-mode
|
|
66
|
+
toggle (literal vs. AI-flavored), and a flat/grouped toggle.
|
|
67
|
+
- Commit detail panel now has Explain / Show Impact / Share action buttons,
|
|
68
|
+
per-file "View history" buttons, an Impact card, and an Annotations
|
|
69
|
+
collapsible panel.
|
|
70
|
+
- Diff viewer adds Collapse / Summarize buttons.
|
|
71
|
+
|
|
72
|
+
### Tests
|
|
73
|
+
|
|
74
|
+
- 24 new tests for the LLM heuristic provider, NL query parser, aggregation
|
|
75
|
+
functions, and PR grouping. Total suite: 43 tests.
|
|
76
|
+
|
|
77
|
+
## [2.0.3] - 2026-05-01
|
|
78
|
+
|
|
79
|
+
### Added
|
|
80
|
+
|
|
81
|
+
- README now includes a preview screenshot, sharper positioning, a "why use
|
|
82
|
+
this" section, and comparisons with GitHub UI, terminal tools, and desktop
|
|
83
|
+
Git clients.
|
|
84
|
+
- Package files now include `docs/**/*` so README preview assets are available
|
|
85
|
+
in published packages.
|
|
86
|
+
|
|
87
|
+
### Fixed
|
|
88
|
+
|
|
89
|
+
- Theme toggle now switches from the default system preference to dark mode on
|
|
90
|
+
the first click, making dark mode immediately visible on light systems.
|
|
91
|
+
- Theme button accessibility text now reports both the selected preference and
|
|
92
|
+
resolved theme.
|
|
93
|
+
|
|
7
94
|
## [2.0.2] - 2026-05-01
|
|
8
95
|
|
|
9
96
|
### Added
|
package/README.md
CHANGED
|
@@ -7,28 +7,88 @@
|
|
|
7
7
|
[](https://github.com/beingmartinbmc/git-history-ui)
|
|
8
8
|
[](https://github.com/beingmartinbmc/git-history-ui/issues)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**Git Intelligence in your browser.** A fast, zero-setup web UI that turns your
|
|
11
|
+
git history from a flat log into a navigable narrative — with natural-language
|
|
12
|
+
search, PR/feature grouping, time-travel snapshots, file-level history, blame,
|
|
13
|
+
commit impact analysis, and an insights dashboard. Optional AI integration
|
|
14
|
+
(Anthropic / OpenAI) supercharges search and explanations.
|
|
15
|
+
|
|
16
|
+
## 👀 Preview
|
|
17
|
+
|
|
18
|
+

|
|
11
19
|
|
|
12
20
|
## 🚀 Quick Start
|
|
13
21
|
|
|
14
22
|
```bash
|
|
23
|
+
# Go to the git repository you want to inspect
|
|
24
|
+
cd /path/to/your/project
|
|
25
|
+
|
|
15
26
|
# Run directly with npx (no installation needed)
|
|
16
27
|
npx git-history-ui@latest
|
|
17
28
|
```
|
|
18
29
|
|
|
19
30
|
That's it! The application will start on `http://localhost:3000` and open your browser automatically.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
31
|
+
It reads history from the current working directory, so run it inside the project whose commits you want to visualize.
|
|
32
|
+
|
|
33
|
+
No installs. No config. Just your commits, visualized.
|
|
34
|
+
|
|
35
|
+
## 🤔 Why use this?
|
|
36
|
+
|
|
37
|
+
- `git log` is powerful, but hard to scan when branches, merges, and long-lived work overlap.
|
|
38
|
+
- GitHub's commit UI does not show your local or unpushed commits.
|
|
39
|
+
- Desktop clients can be heavy when you just want a quick read on one repo.
|
|
40
|
+
- `git-history-ui` gives you a fast, local, visual way to explore history from any git repository.
|
|
41
|
+
|
|
42
|
+
## ✨ What's new in v3 — "Git Intelligence"
|
|
43
|
+
|
|
44
|
+
- **Natural-language search** — Ask "login bug last month" or "payments by alice".
|
|
45
|
+
A built-in heuristic intent parser extracts dates, authors, and keyword
|
|
46
|
+
synonyms; if you set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`, it adds
|
|
47
|
+
semantic re-ranking on top.
|
|
48
|
+
- **PR & feature grouping** — Switch the commit list to "Grouped" mode to see
|
|
49
|
+
commits clustered by pull request (GitHub merge & squash patterns) or
|
|
50
|
+
Conventional Commits scope (`feat(auth):`, `fix(payments):`). Optional
|
|
51
|
+
GitHub PR enrichment when `GITHUB_TOKEN` is set.
|
|
52
|
+
- **Time travel** — A horizontal timeline slider that shows the repo state
|
|
53
|
+
(HEAD, branches, tags) at any point and computes a live diff vs HEAD.
|
|
54
|
+
- **File history & blame** — Click any file in a commit's Files panel to see
|
|
55
|
+
every commit that touched it, with a tabbed blame view powered by
|
|
56
|
+
`highlight.js`.
|
|
57
|
+
- **Commit impact analysis** — One click reveals files touched, modules
|
|
58
|
+
affected, dependency ripple (parsed from JS/TS imports), and other commits
|
|
59
|
+
that touched the same files.
|
|
60
|
+
- **Insights dashboard** — Top contributors, hotspots, churn over time, and
|
|
61
|
+
a heuristic risky-files score for code reviewers and tech leads.
|
|
62
|
+
- **AI extras (optional)** — "Explain this change" on commits and "Summarize"
|
|
63
|
+
on diffs, both gated on a configured API key.
|
|
64
|
+
- **Local-first annotations** — Add notes to commits stored at
|
|
65
|
+
`~/.git-history-ui/<repo>/annotations.json`.
|
|
66
|
+
|
|
67
|
+
Plus everything from v2:
|
|
68
|
+
|
|
69
|
+
- **Canvas commit graph** with branch lanes, ref pills, hover/selected states
|
|
70
|
+
- **Real-time filtering** by author, date, text, file path
|
|
71
|
+
- **Unified & split diffs** with `highlight.js`, plus collapse-unchanged blocks
|
|
72
|
+
- **Dark / light / system theme** with single-click toggle
|
|
73
|
+
- **Zero setup** — `npx git-history-ui@latest`, that's it
|
|
74
|
+
|
|
75
|
+
## ⚖️ How it compares
|
|
76
|
+
|
|
77
|
+
- **vs GitHub UI**: NL search and PR grouping work *with* your unpushed
|
|
78
|
+
commits, and time travel + impact analysis aren't on GitHub at all.
|
|
79
|
+
- **vs `tig` or `git log`**: visual lanes, browser diffs, AI explanations,
|
|
80
|
+
insights dashboard.
|
|
81
|
+
- **vs desktop clients (GitKraken, SourceTree, Fork)**: starts on demand with
|
|
82
|
+
no project import, no account, no native install. AI features are
|
|
83
|
+
pay-as-you-go on *your* key — nothing about your code leaves your machine
|
|
84
|
+
unless you opt in.
|
|
28
85
|
|
|
29
86
|
## 📖 Usage
|
|
30
87
|
|
|
31
88
|
### CLI Options
|
|
89
|
+
|
|
90
|
+
Run these commands from inside the git repository you want to inspect.
|
|
91
|
+
|
|
32
92
|
```bash
|
|
33
93
|
# Custom port
|
|
34
94
|
npx git-history-ui@latest --port 8080
|
|
@@ -49,6 +109,36 @@ npx git-history-ui@latest --no-open
|
|
|
49
109
|
npx git-history-ui@latest --help
|
|
50
110
|
```
|
|
51
111
|
|
|
112
|
+
### Optional: bring your own AI key
|
|
113
|
+
|
|
114
|
+
Natural-language search and "Explain change" / "Summarize diff" actions all
|
|
115
|
+
work without an API key (heuristic mode). Set one of these to upgrade them
|
|
116
|
+
with a real model — your code never leaves the host running git-history-ui
|
|
117
|
+
except for the prompt you explicitly trigger:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Anthropic (recommended; uses claude-3-5-haiku by default)
|
|
121
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
122
|
+
|
|
123
|
+
# Or OpenAI (uses gpt-4o-mini by default)
|
|
124
|
+
export OPENAI_API_KEY=sk-...
|
|
125
|
+
|
|
126
|
+
# Force a specific provider when both are set
|
|
127
|
+
export GHUI_LLM_PROVIDER=anthropic # or openai, or heuristic
|
|
128
|
+
|
|
129
|
+
npx git-history-ui@latest
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Optional: GitHub PR enrichment
|
|
133
|
+
|
|
134
|
+
Set `GITHUB_TOKEN` (a fine-grained PAT with read access to your repo) to
|
|
135
|
+
hydrate the grouped view with PR titles, authors, and labels:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
export GITHUB_TOKEN=ghp_...
|
|
139
|
+
npx git-history-ui@latest
|
|
140
|
+
```
|
|
141
|
+
|
|
52
142
|
## 🏭 Production
|
|
53
143
|
|
|
54
144
|
### Build for Production
|
|
@@ -72,7 +162,7 @@ docker run -p 3000:3000 git-history-ui
|
|
|
72
162
|
### Setup
|
|
73
163
|
```bash
|
|
74
164
|
# Clone and install
|
|
75
|
-
git clone https://github.com/
|
|
165
|
+
git clone https://github.com/beingmartinbmc/git-history-ui.git
|
|
76
166
|
cd git-history-ui
|
|
77
167
|
npm install
|
|
78
168
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as J}from"./chunk-HYRHOB47.js";import{a as H,b as V,c as B,d as U,h as q}from"./chunk-YSTG766K.js";import{a as G}from"./chunk-N7UHDKJ7.js";import"./chunk-ITIFFECZ.js";import{$ as h,Ab as d,Bb as y,Cb as z,Ga as o,Ib as A,Pa as P,Sb as v,Ta as m,Tb as M,W as D,db as l,dc as j,ea as E,eb as r,ec as R,fa as S,fb as a,gb as F,hc as L,mb as w,mc as k,nb as x,nc as $,oa as g,ob as f,xb as C,yb as N,zb as s}from"./chunk-TQE5NWMZ.js";var b=class n{http=h($);base="/api";snapshot(t){let e=new k().set("at",t);return this.http.get(`${this.base}/snapshot`,{params:e})}rangeDiff(t,e){let i=new k().set("from",t).set("to",e);return this.http.get(`${this.base}/diff`,{params:i})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=D({token:n,factory:n.\u0275fac,providedIn:"root"})};function X(n,t){if(n&1&&(r(0,"span",16),s(1,"|"),a()),n&2){let e=t.$implicit,i=t.index,c=f();C("active",i===c.tickIndex()),l("title",e.label)}}function Y(n,t){if(n&1&&(r(0,"li")(1,"span",25),s(2),a(),r(3,"code",26),s(4),a()()),n&2){let e=t.$implicit;o(2),d(e.name),o(2),d(e.hash.slice(0,7))}}function Z(n,t){if(n&1&&(r(0,"div",22)(1,"span",19),s(2),a(),r(3,"ul",23),m(4,Y,5,2,"li",24),a()()),n&2){let e=f().ngIf,i=f();o(2),y("Branches (",i.branchEntries(e).length,")"),o(2),l("ngForOf",i.branchEntries(e).slice(0,8))}}function ee(n,t){if(n&1&&(r(0,"li")(1,"span",25),s(2),a(),r(3,"code",26),s(4),a()()),n&2){let e=t.$implicit;o(2),d(e.name),o(2),d(e.hash.slice(0,7))}}function te(n,t){if(n&1&&(r(0,"div",22)(1,"span",19),s(2),a(),r(3,"ul",23),m(4,ee,5,2,"li",24),a()()),n&2){let e=f().ngIf,i=f();o(2),y("Tags (",i.tagEntries(e).length,")"),o(2),l("ngForOf",i.tagEntries(e).slice(0,8))}}function ne(n,t){if(n&1&&(r(0,"section",17)(1,"div",18)(2,"span",19),s(3,"HEAD at this moment"),a(),r(4,"code",20),s(5),a()(),m(6,Z,5,2,"div",21)(7,te,5,2,"div",21),a()),n&2){let e=t.ngIf,i=f();o(5),d(e.ref??"(no commits yet)"),o(),l("ngIf",i.branchEntries(e).length),o(),l("ngIf",i.tagEntries(e).length)}}function ie(n,t){n&1&&(r(0,"span",27),s(1,"Computing diff\u2026"),a())}function ae(n,t){if(n&1&&(r(0,"span",27),s(1),a()),n&2){let e=t.ngIf;o(),d(e)}}function oe(n,t){n&1&&(r(0,"span",28),s(1," No differences (you're already at HEAD). "),a())}function re(n,t){if(n&1){let e=w();r(0,"div",31),x("click",function(){let c=E(e).$implicit,p=f(2);return S(p.selectedFile.set(c))}),r(1,"span"),s(2),a(),r(3,"span",32),s(4),a(),r(5,"span",33),s(6),a()()}if(n&2){let e=t.$implicit,i=f(2);C("selected",e===i.selectedFile()),o(),N(A("status status-",e.status)),o(),d(i.statusLabel(e.status)),o(2),d(e.file),o(2),z("+",e.additions," \u2212",e.deletions)}}function se(n,t){if(n&1&&(r(0,"div",29),m(1,re,7,9,"div",30),a()),n&2){let e=f();o(),l("ngForOf",e.diff())}}function le(n,t){if(n&1&&(r(0,"div",34),F(1,"app-diff-viewer",35),a()),n&2){let e=t.ngIf;o(),l("fileInput",e)}}var K=class n{state=h(G);timelineApi=h(b);snapshot=g(null);diff=g(null);loadingDiff=g(!1);diffError=g(null);selectedFile=g(null);tickIndex=g(0);ticks=v(()=>de(this.state.commits()));atDisplay=v(()=>{let t=this.ticks()[this.tickIndex()];return t?t.label:""});firstTickLabel=v(()=>this.ticks()[0]?.label??"");lastTickLabel=v(()=>this.ticks()[this.ticks().length-1]?.label??"");constructor(){M(()=>{let t=this.ticks();t.length!==0&&this.tickIndex()>=t.length&&this.tickIndex.set(t.length-1)}),M(()=>{let t=this.ticks()[this.tickIndex()];t&&this.timelineApi.snapshot(t.iso).subscribe({next:e=>{this.snapshot.set(e),this.loadDiff(e)},error:()=>this.snapshot.set(null)})})}onTickChange(t){this.tickIndex.set(Math.max(0,Math.min(this.ticks().length-1,Number(t))))}branchEntries(t){return Object.entries(t.branches).map(([e,i])=>({name:e,hash:i}))}tagEntries(t){return Object.entries(t.tags).map(([e,i])=>({name:e,hash:i}))}statusLabel(t){return t==="modified"?"mod":t.slice(0,3)}loadDiff(t){if(!t.ref){this.diff.set([]),this.selectedFile.set(null);return}let e=this.state.commits()[0]?.hash;if(!e||e===t.ref){this.diff.set([]),this.selectedFile.set(null);return}this.loadingDiff.set(!0),this.diffError.set(null),this.timelineApi.rangeDiff(t.ref,e).subscribe({next:i=>{this.diff.set(i),this.selectedFile.set(i[0]??null),this.loadingDiff.set(!1)},error:i=>{this.diffError.set(i?.error?.error??"Failed to compute diff"),this.loadingDiff.set(!1)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["app-timeline"]],decls:28,vars:12,consts:[[1,"page"],[1,"head"],[1,"sub"],[1,"now"],[1,"slider-wrap"],["type","range","min","0",1,"slider",3,"ngModelChange","max","ngModel"],[1,"ticks"],["class","tick",3,"active","title",4,"ngFor","ngForOf"],[1,"tick-labels"],["class","snapshot",4,"ngIf"],[1,"diff-panel"],[1,"diff-head"],["class","diff-status",4,"ngIf"],["class","diff-status muted",4,"ngIf"],["class","files",4,"ngIf"],["class","diff-body",4,"ngIf"],[1,"tick",3,"title"],[1,"snapshot"],[1,"snap-card"],[1,"snap-label"],[1,"snap-hash"],["class","snap-card branches",4,"ngIf"],[1,"snap-card","branches"],[1,"ref-list"],[4,"ngFor","ngForOf"],[1,"ref-name"],[1,"ref-hash"],[1,"diff-status"],[1,"diff-status","muted"],[1,"files"],["class","file",3,"selected","click",4,"ngFor","ngForOf"],[1,"file",3,"click"],[1,"path"],[1,"changes"],[1,"diff-body"],[3,"fileInput"]],template:function(e,i){if(e&1&&(r(0,"div",0)(1,"header",1)(2,"div")(3,"h2"),s(4,"Time travel"),a(),r(5,"p",2),s(6,"Drag the slider to see repo state at any point. Diff is computed against current HEAD."),a()(),r(7,"div",3),s(8),a()(),r(9,"div",4)(10,"input",5),x("ngModelChange",function(p){return i.onTickChange(p)}),a(),r(11,"div",6),m(12,X,2,3,"span",7),a(),r(13,"div",8)(14,"span"),s(15),a(),r(16,"span"),s(17),a()()(),m(18,ne,8,3,"section",9),r(19,"section",10)(20,"div",11)(21,"h3"),s(22,"Diff vs HEAD"),a(),m(23,ie,2,0,"span",12)(24,ae,2,1,"span",12)(25,oe,2,0,"span",13),a(),m(26,se,2,1,"div",14)(27,le,2,1,"div",15),a()()),e&2){let c,p;o(8),d(i.atDisplay()),o(2),l("max",i.ticks().length-1)("ngModel",i.tickIndex()),o(2),l("ngForOf",i.ticks()),o(3),d(i.firstTickLabel()),o(2),d(i.lastTickLabel()),o(),l("ngIf",i.snapshot()),o(5),l("ngIf",i.loadingDiff()),o(),l("ngIf",i.diffError()),o(),l("ngIf",!i.loadingDiff()&&!i.diffError()&&((c=i.diff())==null?null:c.length)===0),o(),l("ngIf",(((p=i.diff())==null?null:p.length)??0)>0),o(),l("ngIf",i.selectedFile())}},dependencies:[L,j,R,q,H,U,V,B,J],styles:["[_nghost-%COMP%]{display:block;flex:1;min-height:0;overflow-y:auto}.page[_ngcontent-%COMP%]{padding:1rem 1.25rem;max-width:1200px;margin:0 auto}.head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;margin-bottom:1rem}.head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:18px}.head[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%]{margin:.2rem 0 0;color:var(--fg-muted);font-size:13px}.now[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);font-size:13px;padding:.4rem .7rem;background:var(--bg-elevated);border:1px solid var(--border-soft);border-radius:var(--radius-sm)}.slider-wrap[_ngcontent-%COMP%]{background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-md);padding:1rem 1.25rem;margin-bottom:1rem}.slider[_ngcontent-%COMP%]{width:100%;accent-color:var(--accent)}.ticks[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:.4rem;color:var(--fg-subtle);font-size:10px}.tick.active[_ngcontent-%COMP%]{color:var(--accent);font-weight:700}.tick-labels[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:.5rem;font-size:11px;color:var(--fg-muted)}.snapshot[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem;margin-bottom:1rem}.snap-card[_ngcontent-%COMP%]{background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-md);padding:.75rem 1rem}.snap-label[_ngcontent-%COMP%]{display:block;font-size:11px;color:var(--fg-muted);text-transform:uppercase;letter-spacing:.04em;margin-bottom:.4rem}.snap-hash[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);font-size:13px;color:var(--accent);word-break:break-all}.ref-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;font-size:12px}.ref-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:2px 0;gap:1rem}.ref-name[_ngcontent-%COMP%]{color:var(--fg-secondary)}.ref-hash[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);color:var(--fg-muted);font-size:11px}.diff-panel[_ngcontent-%COMP%]{background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-md);overflow:hidden}.diff-head[_ngcontent-%COMP%]{padding:.75rem 1rem;border-bottom:1px solid var(--border-soft);display:flex;align-items:baseline;gap:1rem}.diff-head[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:14px}.diff-status[_ngcontent-%COMP%]{font-size:12px;color:var(--fg-muted)}.diff-status.muted[_ngcontent-%COMP%]{font-style:italic}.files[_ngcontent-%COMP%]{padding:.5rem 0;max-height:220px;overflow-y:auto}.file[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.6rem;padding:.35rem 1rem;cursor:pointer;font-size:12px}.file[_ngcontent-%COMP%]:hover{background:var(--bg-elevated)}.file.selected[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--accent) 18%,transparent)}.status[_ngcontent-%COMP%]{font-size:10px;padding:1px 6px;border-radius:3px;background:var(--bg-elevated);color:var(--fg-muted);text-transform:uppercase}.status-added[_ngcontent-%COMP%]{background:#10b9812e;color:#10b981}.status-deleted[_ngcontent-%COMP%]{background:#ef44442e;color:#ef4444}.status-modified[_ngcontent-%COMP%]{background:#6366f12e;color:var(--accent)}.path[_ngcontent-%COMP%]{flex:1;font-family:var(--font-mono, monospace)}.changes[_ngcontent-%COMP%]{font-size:11px;color:var(--fg-muted)}.diff-body[_ngcontent-%COMP%]{border-top:1px solid var(--border-soft);padding:.5rem 0}"],changeDetection:0})};function de(n){if(n.length===0)return[];let t=[...n].sort((u,_)=>u.date.localeCompare(_.date)),e=t[0].date,i=t[t.length-1].date,c=new Date(e),O=new Date(i).getTime()-c.getTime(),I=Math.max(12,Math.min(24,Math.floor(O/(1e3*60*60*24*7))+1)),Q=O/Math.max(1,I-1),T=[];for(let u=0;u<I;u++){let _=new Date(c.getTime()+u*Q);T.push({iso:_.toISOString(),label:_.toISOString().slice(0,10)})}return T}export{K as TimelineComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as a,Rb as v,Sb as l,Tb as m,U as f,W as h,ja as y,ka as b,l as g,la as d,oa as i}from"./chunk-TQE5NWMZ.js";function U(n,e){let t=e?.injector??a(y),s=new g(1),u=m(()=>{let r;try{r=n()}catch(c){v(()=>s.error(c));return}v(()=>s.next(r))},{injector:t,manualCleanup:!0});return t.get(d).onDestroy(()=>{u.destroy(),s.complete()}),s.asObservable()}function L(n,e){let s=!e?.manualCleanup?e?.injector?.get(d)??a(d):null,u=w(e?.equal),r;e?.requireSync?r=i({kind:0},{equal:u}):r=i({kind:1,value:e?.initialValue},{equal:u});let c,p=n.subscribe({next:o=>r.set({kind:1,value:o}),error:o=>{r.set({kind:2,error:o}),c?.()},complete:()=>{c?.()}});if(e?.requireSync&&r().kind===0)throw new f(601,!1);return c=s?.onDestroy(p.unsubscribe.bind(p)),l(()=>{let o=r();switch(o.kind){case 1:return o.value;case 2:throw o.error;case 0:throw new f(601,!1)}},{equal:e?.equal})}function w(n=Object.is){return(e,t)=>e.kind===1&&t.kind===1&&n(e.value,t.value)}var k="ghui:theme",D=class n{doc=a(b);mediaQuery=null;preference=i(this.read());systemDark=i(!1);resolved=l(()=>{let e=this.preference();return e==="system"?this.systemDark()?"dark":"light":e});constructor(){typeof window<"u"&&window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.systemDark.set(this.mediaQuery.matches),this.mediaQuery.addEventListener("change",e=>this.systemDark.set(e.matches))),m(()=>{let e=this.resolved(),t=this.doc.documentElement;t.classList.toggle("dark",e==="dark"),t.dataset.theme=e,this.doc.body?.classList?.toggle("dark",e==="dark")})}setPreference(e){this.preference.set(e);try{localStorage.setItem(k,e)}catch{}}cycle(){let t=this.resolved()==="light"?"dark":"light";this.setPreference(t)}read(){try{let e=localStorage.getItem(k);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=h({token:n,factory:n.\u0275fac,providedIn:"root"})};export{U as a,L as b,D as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as f,$a as an,$b as Rn,Aa as Kt,B as Y,Ba as Xt,D as te,Da as Kr,E as ce,G as Ft,H as ue,Ha as Ae,J as tt,Ja as Xr,K as Q,Ka as Jt,L as Vt,La as k,M as $r,Ma as Jr,Na as en,O as zr,Oa as er,Pa as tn,Pb as vn,Q as Hr,R as _,Ra as Me,Rb as K,S as qt,T as I,U as w,Ua as rn,Ub as mn,Va as re,Vb as yn,W as R,Wa as De,Wb as it,Y as Br,Ya as nn,Yb as Sn,Z as T,Za as on,Zb as ot,_ as S,_a as sn,_b as Oe,a as l,aa as Fr,ab as cn,ac as wn,b as U,ba as Vr,bb as un,bc as Cn,ca as le,cb as ln,cc as st,da as j,e as Pr,f as Ur,g as Lr,gb as dn,h as $t,i as zt,ia as qr,ic as En,j as V,ja as Gt,jc as bn,k as L,ka as x,kc as In,la as Gr,ma as Wt,na as rt,nb as hn,o as q,oa as nt,p as D,pa as Wr,q as d,r as be,rb as fn,s as xr,sa as Ie,t as jr,ta as Zt,tb as pn,u as y,ua as Zr,ub as gn,v as Ht,va as Yt,w as O,wa as Yr,x as Bt,xa as Qt,y as kr,ya as Qr,z as et,za as Te}from"./chunk-TQE5NWMZ.js";var ut=new T(""),or=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(i=>{i.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,r,i,o){return this._findPluginFor(r).addEventListener(e,r,i,o)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(o=>o.supports(e)),!r)throw new w(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||t)(S(ut),S(De))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),_e=class{_doc;constructor(n){this._doc=n}manager},tr="ng-app-id";function Tn(t){for(let n of t)n.remove()}function An(t,n){let e=n.createElement("style");return e.textContent=t,e}function Di(t,n,e,r){let i=t.head?.querySelectorAll(`style[${tr}="${n}"],link[${tr}="${n}"]`);if(i)for(let o of i)o.removeAttribute(tr),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function nr(t,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var sr=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,r,i,o={}){this.doc=e,this.appId=r,this.nonce=i,Di(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let i of e)this.addUsage(i,this.inline,An);r?.forEach(i=>this.addUsage(i,this.external,nr))}removeStyles(e,r){for(let i of e)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(e,r,i){let o=r.get(e);o?o.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(e,this.doc)))})}removeUsage(e,r){let i=r.get(e);i&&(i.usage--,i.usage<=0&&(Tn(i.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Tn(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(e,An(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(e,nr(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),e.appendChild(r)}static \u0275fac=function(r){return new(r||t)(S(x),S(Qt),S(Kt,8),S(Te))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),rr={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"},ar=/%COMP%/g;var Dn="%COMP%",Oi=`_nghost-${Dn}`,_i=`_ngcontent-${Dn}`,Ni=!0,Pi=new T("",{providedIn:"root",factory:()=>Ni});function Ui(t){return _i.replace(ar,t)}function Li(t){return Oi.replace(ar,t)}function On(t,n){return n.map(e=>e.replace(ar,t))}var cr=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;animationDisabled;maxAnimationTimeout;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;registry;constructor(e,r,i,o,s,a,c,u=null,h,v,m=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=c,this.nonce=u,this.animationDisabled=h,this.maxAnimationTimeout=v,this.tracingService=m,this.platformIsServer=!1,this.defaultRenderer=new Ne(e,s,c,this.platformIsServer,this.tracingService,this.registry=qr(),this.maxAnimationTimeout)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(e,r);return i instanceof at?i.applyToHost(e):i instanceof Pe&&i.applyStyles(),i}getOrCreateRenderer(e,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,v=this.platformIsServer,m=this.tracingService;switch(r.encapsulation){case Xt.Emulated:o=new at(c,u,r,this.appId,h,s,a,v,m,this.registry,this.animationDisabled,this.maxAnimationTimeout);break;case Xt.ShadowDom:return new ir(c,u,e,r,s,a,this.nonce,v,m,this.registry,this.maxAnimationTimeout);default:o=new Pe(c,u,r,h,s,a,v,m,this.registry,this.animationDisabled,this.maxAnimationTimeout);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||t)(S(or),S(sr),S(Qt),S(Pi),S(x),S(Te),S(De),S(Kt),S(un),S(ln),S(rn,8))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Ne=class{eventManager;doc;ngZone;platformIsServer;tracingService;registry;maxAnimationTimeout;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,r,i,o,s,a){this.eventManager=n,this.doc=e,this.ngZone=r,this.platformIsServer=i,this.tracingService=o,this.registry=s,this.maxAnimationTimeout=a}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(rr[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(Mn(n)?n.content:n).appendChild(e)}insertBefore(n,e,r){n&&(Mn(n)?n.content:n).insertBefore(e,r)}removeChild(n,e){let{elements:r}=this.registry;if(r){r.animate(e,()=>e.remove(),this.maxAnimationTimeout);return}e.remove()}selectRootElement(n,e){let r=typeof n=="string"?this.doc.querySelector(n):n;if(!r)throw new w(-5104,!1);return e||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,r,i){if(i){e=i+":"+e;let o=rr[i];o?n.setAttributeNS(o,e,r):n.setAttribute(e,r)}else n.setAttribute(e,r)}removeAttribute(n,e,r){if(r){let i=rr[r];i?n.removeAttributeNS(i,e):n.removeAttribute(`${r}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,r,i){i&(Ae.DashCase|Ae.Important)?n.style.setProperty(e,r,i&Ae.Important?"important":""):n.style[e]=r}removeStyle(n,e,r){r&Ae.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,r){n!=null&&(n[e]=r)}setValue(n,e){n.nodeValue=e}listen(n,e,r,i){if(typeof n=="string"&&(n=Oe().getGlobalEventTarget(this.doc,n),!n))throw new w(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(n,e,o)),this.eventManager.addEventListener(n,e,o,i)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function Mn(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var ir=class extends Ne{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,r,i,o,s,a,c,u,h,v){super(n,o,s,c,u,h,v),this.sharedStylesHost=e,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let m=i.styles;m=On(i.id,m);for(let C of m){let M=document.createElement("style");a&&M.setAttribute("nonce",a),M.textContent=C,this.shadowRoot.appendChild(M)}let E=i.getExternalStyles?.();if(E)for(let C of E){let M=nr(C,o);a&&M.setAttribute("nonce",a),this.shadowRoot.appendChild(M)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,r){return super.insertBefore(this.nodeOrShadowRoot(n),e,r)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Pe=class extends Ne{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;_animationDisabled;constructor(n,e,r,i,o,s,a,c,u,h,v,m){super(n,o,s,a,c,u,v),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=i,this._animationDisabled=h;let E=r.styles;this.styles=m?On(m,E):E,this.styleUrls=r.getExternalStyles?.(m)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){if(this.removeStylesOnCompDestroy){if(!this._animationDisabled&&this.registry.elements){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)},this.maxAnimationTimeout)});return}this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}}},at=class extends Pe{contentAttr;hostAttr;constructor(n,e,r,i,o,s,a,c,u,h,v,m){let E=i+"-"+r.id;super(n,e,r,o,s,a,c,u,h,v,m,E),this.contentAttr=Ui(E),this.hostAttr=Li(E)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let r=super.createElement(n,e);return super.setAttribute(r,this.contentAttr,""),r}};var lt=class t extends wn{supportsDOMEvents=!0;static makeCurrent(){Rn(new t)}onAndCancel(n,e,r,i){return n.addEventListener(e,r,i),()=>{n.removeEventListener(e,r,i)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=xi();return e==null?null:ji(e)}resetBaseElement(){Ue=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return En(document.cookie,n)}},Ue=null;function xi(){return Ue=Ue||document.head.querySelector("base"),Ue?Ue.getAttribute("href"):null}function ji(t){return new URL(t,document.baseURI).pathname}var ki=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Un=(()=>{class t extends _e{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,i,o){return e.addEventListener(r,i,o),()=>this.removeEventListener(e,r,i,o)}removeEventListener(e,r,i,o){return e.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||t)(S(x))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),_n=["alt","control","meta","shift"],$i={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},zi={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},Ln=(()=>{class t extends _e{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,r,i,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Oe().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let r=e.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=t._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),_n.forEach(u=>{let h=r.indexOf(u);h>-1&&(r.splice(h,1),s+=u+".")}),s+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=i,c.fullKey=s,c}static matchEventFullKeyCode(e,r){let i=$i[e.key]||e.key,o="";return r.indexOf("code.")>-1&&(i=e.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),_n.forEach(s=>{if(s!==i){let a=zi[s];a(e)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(e,r,i){return o=>{t.matchEventFullKeyCode(o,e)&&i.runGuarded(()=>r(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||t)(S(x))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function Hi(t,n){let e=l({rootComponent:t},Bi(n));return Sn(e)}function Bi(t){return{appProviders:[...Wi,...t?.providers??[]],platformProviders:Gi}}function Fi(){lt.makeCurrent()}function Vi(){return new Wt}function qi(){return Yr(document),document}var Gi=[{provide:Te,useValue:In},{provide:Qr,useValue:Fi,multi:!0},{provide:x,useFactory:qi}];var Wi=[{provide:Vr,useValue:"root"},{provide:Wt,useFactory:Vi},{provide:ut,useClass:Un,multi:!0,deps:[x]},{provide:ut,useClass:Ln,multi:!0,deps:[x]},cr,sr,or,{provide:Xr,useExisting:cr},{provide:bn,useClass:ki},[]];var xn=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||t)(S(x))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p="primary",Ye=Symbol("RouteTitle"),fr=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function oe(t){return new fr(t)}function Vn(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function Yi(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!H(t[e],n[e]))return!1;return!0}function H(t,n){let e=t?pr(t):void 0,r=n?pr(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!qn(t[i],n[i]))return!1;return!0}function pr(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function qn(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Gn(t){return t.length>0?t[t.length-1]:null}function Z(t){return xr(t)?t:on(t)?D(Promise.resolve(t)):d(t)}var Qi={exact:Zn,subset:Yn},Wn={exact:Ki,subset:Xi,ignored:()=>!0};function jn(t,n,e){return Qi[e.paths](t.root,n.root,e.matrixParams)&&Wn[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function Ki(t,n){return H(t,n)}function Zn(t,n,e){if(!ne(t.segments,n.segments)||!ft(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!Zn(t.children[r],n.children[r],e))return!1;return!0}function Xi(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>qn(t[e],n[e]))}function Yn(t,n,e){return Qn(t,n,n.segments,e)}function Qn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ne(i,e)||n.hasChildren()||!ft(i,e,r))}else if(t.segments.length===e.length){if(!ne(t.segments,e)||!ft(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!Yn(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ne(t.segments,i)||!ft(t.segments,i,r)||!t.children[p]?!1:Qn(t.children[p],n,o,r)}}function ft(t,n,e){return n.every((r,i)=>Wn[e](t[i].parameters,r.parameters))}var F=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){return to.serialize(this)}},g=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return pt(this)}},X=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=oe(this.parameters),this._parameterMap}toString(){return Xn(this)}};function Ji(t,n){return ne(t,n)&&t.every((e,r)=>H(e.parameters,n[r].parameters))}function ne(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function eo(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===p&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==p&&(e=e.concat(n(i,r)))}),e}var Qe=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>new se,providedIn:"root"})}return t})(),se=class{parse(n){let e=new vr(n);return new F(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Le(n.root,!0)}`,r=io(n.queryParams),i=typeof n.fragment=="string"?`#${ro(n.fragment)}`:"";return`${e}${r}${i}`}},to=new se;function pt(t){return t.segments.map(n=>Xn(n)).join("/")}function Le(t,n){if(!t.hasChildren())return pt(t);if(n){let e=t.children[p]?Le(t.children[p],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==p&&r.push(`${i}:${Le(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=eo(t,(r,i)=>i===p?[Le(t.children[p],!1)]:[`${i}:${Le(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[p]!=null?`${pt(t)}/${e[0]}`:`${pt(t)}/(${e.join("//")})`}}function Kn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function dt(t){return Kn(t).replace(/%3B/gi,";")}function ro(t){return encodeURI(t)}function gr(t){return Kn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function gt(t){return decodeURIComponent(t)}function kn(t){return gt(t.replace(/\+/g,"%20"))}function Xn(t){return`${gr(t.path)}${no(t.parameters)}`}function no(t){return Object.entries(t).map(([n,e])=>`;${gr(n)}=${gr(e)}`).join("")}function io(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${dt(e)}=${dt(i)}`).join("&"):`${dt(e)}=${dt(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var oo=/^[^\/()?;#]+/;function ur(t){let n=t.match(oo);return n?n[0]:""}var so=/^[^\/()?;=#]+/;function ao(t){let n=t.match(so);return n?n[0]:""}var co=/^[^=?&#]+/;function uo(t){let n=t.match(co);return n?n[0]:""}var lo=/^[^&#]+/;function ho(t){let n=t.match(lo);return n?n[0]:""}var vr=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[p]=new g(n,e)),r}parseSegment(){let n=ur(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(n),new X(gt(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=ao(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=ur(this.remaining);i&&(r=i,this.capture(r))}n[gt(e)]=gt(r)}parseQueryParam(n){let e=uo(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=ho(this.remaining);s&&(r=s,this.capture(r))}let i=kn(e),o=kn(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=ur(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new w(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=p);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[p]:new g([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new w(4011,!1)}};function Jn(t){return t.segments.length>0?new g([],{[p]:t}):t}function ei(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=ei(i);if(r===p&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new g(t.segments,n);return fo(e)}function fo(t){if(t.numberOfChildren===1&&t.children[p]){let n=t.children[p];return new g(t.segments.concat(n.segments),n.children)}return t}function J(t){return t instanceof F}function ti(t,n,e=null,r=null){let i=ri(t);return ni(i,n,e,r)}function ri(t){let n;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=Jn(r);return n??i}function ni(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return lr(i,i,i,e,r);let o=po(n);if(o.toRoot())return lr(i,i,new g([],{}),e,r);let s=go(o,i,t),a=s.processChildren?je(s.segmentGroup,s.index,o.commands):oi(s.segmentGroup,s.index,o.commands);return lr(i,s.segmentGroup,a,e,r)}function vt(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function ze(t){return typeof t=="object"&&t!=null&&t.outlets}function lr(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([c,u])=>{o[c]=Array.isArray(u)?u.map(h=>`${h}`):`${u}`});let s;t===n?s=e:s=ii(t,n,e);let a=Jn(ei(s));return new F(a,o,i)}function ii(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=ii(o,n,e)}),new g(t.segments,r)}var mt=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&vt(r[0]))throw new w(4003,!1);let i=r.find(ze);if(i&&i!==Gn(r))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function po(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new mt(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new mt(e,n,r)}var fe=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function go(t,n,e){if(t.isAbsolute)return new fe(n,!0,0);if(!e)return new fe(n,!1,NaN);if(e.parent===null)return new fe(e,!0,0);let r=vt(t.commands[0])?0:1,i=e.segments.length-1+r;return vo(e,i,t.numberOfDoubleDots)}function vo(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new w(4005,!1);i=r.segments.length}return new fe(r,!1,i-o)}function mo(t){return ze(t[0])?t[0].outlets:{[p]:t}}function oi(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return je(t,n,e);let r=yo(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[p]=new g(t.segments.slice(r.pathIndex),t.children),je(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?mr(t,n,e):r.match?je(t,0,i):mr(t,n,e)}function je(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=mo(e),i={};if(Object.keys(r).some(o=>o!==p)&&t.children[p]&&t.numberOfChildren===1&&t.children[p].segments.length===0){let o=je(t.children[p],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=oi(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function yo(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(ze(a))break;let c=`${a}`,u=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!zn(c,u,s))return o;r+=2}else{if(!zn(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function mr(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(ze(o)){let c=So(o.outlets);return new g(r,c)}if(i===0&&vt(e[0])){let c=t.segments[n];r.push(new X(c.path,$n(e[0]))),i++;continue}let s=ze(o)?o.outlets[p]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&vt(a)?(r.push(new X(s,$n(a))),i+=2):(r.push(new X(s,{})),i++)}return new g(r,{})}function So(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=mr(new g([],{}),0,r))}),n}function $n(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function zn(t,n,e){return t==e.path&&H(n,e.parameters)}var ke="imperative",b=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(b||{}),P=class{id;url;constructor(n,e){this.id=n,this.url=e}},ae=class extends P{type=b.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},z=class extends P{urlAfterRedirects;type=b.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},A=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(A||{}),He=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(He||{}),B=class extends P{reason;code;type=b.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},G=class extends P{reason;code;type=b.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},ge=class extends P{error;target;type=b.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Be=class extends P{urlAfterRedirects;state;type=b.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},yt=class extends P{urlAfterRedirects;state;type=b.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},St=class extends P{urlAfterRedirects;state;shouldActivate;type=b.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Rt=class extends P{urlAfterRedirects;state;type=b.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},wt=class extends P{urlAfterRedirects;state;type=b.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ct=class{route;type=b.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Et=class{route;type=b.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},bt=class{snapshot;type=b.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},It=class{snapshot;type=b.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Tt=class{snapshot;type=b.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},At=class{snapshot;type=b.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Fe=class{},ve=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function Ro(t){return!(t instanceof Fe)&&!(t instanceof ve)}function wo(t,n){return t.providers&&!t._injector&&(t._injector=er(t.providers,n,`Route: ${t.path}`)),t._injector??n}function $(t){return t.outlet||p}function Co(t,n){let e=t.filter(r=>$(r)===n);return e.push(...t.filter(r=>$(r)!==n)),e}function Se(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var Mt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return Se(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new Re(this.rootInjector)}},Re=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new Mt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(S(le))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Dt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=yr(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=yr(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Sr(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Sr(n,this._root).map(e=>e.value)}};function yr(t,n){if(t===n.value)return n;for(let e of n.children){let r=yr(t,e);if(r)return r}return null}function Sr(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Sr(t,e);if(r.length)return r.unshift(n),r}return[]}var N=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function he(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var Ve=class extends Dt{snapshot;constructor(n,e){super(n),this.snapshot=e,Ar(this,n)}toString(){return this.snapshot.toString()}};function si(t){let n=Eo(t),e=new L([new X("",{})]),r=new L({}),i=new L({}),o=new L({}),s=new L(""),a=new W(e,r,o,s,i,p,t,n.root);return a.snapshot=n.root,new Ve(new N(a,[]),n)}function Eo(t){let n={},e={},r={},o=new ie([],n,r,"",e,p,t,null,{});return new qe("",new N(o,[]))}var W=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,c){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(y(u=>u[Ye]))??d(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(y(n=>oe(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(y(n=>oe(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Ot(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&ci(i)&&(r.resolve[Ye]=i.title),r}var ie=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Ye]}constructor(n,e,r,i,o,s,a,c,u){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=oe(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=oe(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},qe=class extends Dt{url;constructor(n,e){super(e),this.url=n,Ar(this,e)}toString(){return ai(this._root)}};function Ar(t,n){n.value._routerState=t,n.children.forEach(e=>Ar(t,e))}function ai(t){let n=t.children.length>0?` { ${t.children.map(ai).join(", ")} } `:"";return`${t.value}${n}`}function dr(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,H(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),H(n.params,e.params)||t.paramsSubject.next(e.params),Yi(n.url,e.url)||t.urlSubject.next(e.url),H(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Rr(t,n){let e=H(t.params,n.params)&&Ji(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Rr(t.parent,n.parent))}function ci(t){return typeof t.title=="string"||t.title===null}var ui=new T(""),Mr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=p;activateEvents=new re;deactivateEvents=new re;attachEvents=new re;detachEvents=new re;routerOutletData=yn(void 0);parentContexts=f(Re);location=f(Jr);changeDetector=f(it);inputBinder=f(Ut,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new w(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new wr(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Me({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ie]})}return t})(),wr=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===W?this.route:n===Re?this.childContexts:n===ui?this.outletData:this.parent.get(n,e)}},Ut=new T("");var Dr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=tn({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&dn(0,"router-outlet")},dependencies:[Mr],encapsulation:2})}return t})();function Or(t){let n=t.children&&t.children.map(Or),e=n?U(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==p&&(e.component=Dr),e}function bo(t,n,e){let r=Ge(t,n._root,e?e._root:void 0);return new Ve(r,n)}function Ge(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=Io(t,n,e);return new N(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Ge(t,a)),s}}let r=To(n.value),i=n.children.map(o=>Ge(t,o));return new N(r,i)}}function Io(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Ge(t,r,i);return Ge(t,r)})}function To(t){return new W(new L(t.url),new L(t.params),new L(t.queryParams),new L(t.fragment),new L(t.data),t.outlet,t.component,t)}var me=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},li="ngNavigationCancelingError";function _t(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=J(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=di(!1,A.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function di(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[li]=!0,e.cancellationCode=n,e}function Ao(t){return hi(t)&&J(t.url)}function hi(t){return!!t&&t[li]}var Mo=(t,n,e,r)=>y(i=>(new Cr(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Cr=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),dr(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=he(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=he(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=he(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=he(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new At(o.value.snapshot))}),n.children.length&&this.forwardEvent(new It(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(dr(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),dr(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},Nt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},pe=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Do(t,n,e){let r=t._root,i=n?n._root:null;return xe(r,i,e,[r.value])}function Oo(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function we(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Br(t)?t:n.get(t):r}function xe(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=he(n);return t.children.forEach(s=>{_o(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>$e(a,e.getContext(s),i)),i}function _o(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=No(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new Nt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?xe(t,n,a?a.children:null,r,i):xe(t,n,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new pe(a.outlet.component,s))}else s&&$e(n,a,i),i.canActivateChecks.push(new Nt(r)),o.component?xe(t,null,a?a.children:null,r,i):xe(t,null,e,r,i);return i}function No(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ne(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ne(t.url,n.url)||!H(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Rr(t,n)||!H(t.queryParams,n.queryParams);case"paramsChange":default:return!Rr(t,n)}}function $e(t,n,e){let r=he(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?$e(s,n.children.getContext(o),e):$e(s,null,e):$e(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new pe(n.outlet.component,i)):e.canDeactivateChecks.push(new pe(null,i)):e.canDeactivateChecks.push(new pe(null,i))}function Ke(t){return typeof t=="function"}function Po(t){return typeof t=="boolean"}function Uo(t){return t&&Ke(t.canLoad)}function Lo(t){return t&&Ke(t.canActivate)}function xo(t){return t&&Ke(t.canActivateChild)}function jo(t){return t&&Ke(t.canDeactivate)}function ko(t){return t&&Ke(t.canMatch)}function fi(t){return t instanceof jr||t?.name==="EmptyError"}var ht=Symbol("INITIAL_VALUE");function ye(){return _(t=>Ht(t.map(n=>n.pipe(ue(1),Hr(ht)))).pipe(y(n=>{for(let e of n)if(e!==!0){if(e===ht)return ht;if(e===!1||$o(e))return e}return!0}),Y(n=>n!==ht),ue(1)))}function $o(t){return J(t)||t instanceof me}function zo(t,n){return O(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?d(U(l({},e),{guardsResult:!0})):Ho(s,r,i,t).pipe(O(a=>a&&Po(a)?Bo(r,o,t,n):d(a)),y(a=>U(l({},e),{guardsResult:a})))})}function Ho(t,n,e,r){return D(t).pipe(O(i=>Wo(i.component,i.route,e,n,r)),Q(i=>i!==!0,!0))}function Bo(t,n,e,r){return D(n).pipe(ce(i=>kr(Vo(i.route.parent,r),Fo(i.route,r),Go(t,i.path,e),qo(t,i.route,e))),Q(i=>i!==!0,!0))}function Fo(t,n){return t!==null&&n&&n(new Tt(t)),d(!0)}function Vo(t,n){return t!==null&&n&&n(new bt(t)),d(!0)}function qo(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return d(!0);let i=r.map(o=>et(()=>{let s=Se(n)??e,a=we(o,s),c=Lo(a)?a.canActivate(n,t):j(s,()=>a(n,t));return Z(c).pipe(Q())}));return d(i).pipe(ye())}function Go(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>Oo(s)).filter(s=>s!==null).map(s=>et(()=>{let a=s.guards.map(c=>{let u=Se(s.node)??e,h=we(c,u),v=xo(h)?h.canActivateChild(r,t):j(u,()=>h(r,t));return Z(v).pipe(Q())});return d(a).pipe(ye())}));return d(o).pipe(ye())}function Wo(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return d(!0);let s=o.map(a=>{let c=Se(n)??i,u=we(a,c),h=jo(u)?u.canDeactivate(t,n,e,r):j(c,()=>u(t,n,e,r));return Z(h).pipe(Q())});return d(s).pipe(ye())}function Zo(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return d(!0);let o=i.map(s=>{let a=we(s,t),c=Uo(a)?a.canLoad(n,e):j(t,()=>a(n,e));return Z(c)});return d(o).pipe(ye(),pi(r))}function pi(t){return Ur(I(n=>{if(typeof n!="boolean")throw _t(t,n)}),y(n=>n===!0))}function Yo(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return d(!0);let o=i.map(s=>{let a=we(s,t),c=ko(a)?a.canMatch(n,e):j(t,()=>a(n,e));return Z(c)});return d(o).pipe(ye(),pi(r))}var We=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},Ze=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function de(t){return be(new We(t))}function Qo(t){return be(new w(4e3,!1))}function Ko(t){return be(di(!1,A.GuardRejected))}var Er=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return d(r);if(i.numberOfChildren>1||!i.children[p])return Qo(`${n.redirectTo}`);i=i.children[p]}}applyRedirectCommands(n,e,r,i,o){return Xo(e,i,o).pipe(y(s=>{if(s instanceof F)throw new Ze(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new Ze(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new F(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,r,i)}),new g(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new w(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function Xo(t,n,e){if(typeof t=="string")return d(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,params:u,data:h,title:v}=n;return Z(j(e,()=>r({params:u,data:h,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,title:v})))}var br={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Jo(t,n,e,r,i){let o=gi(t,n,e);return o.matched?(r=wo(n,r),Yo(r,n,e,i).pipe(y(s=>s===!0?o:l({},br)))):d(o)}function gi(t,n,e){if(n.path==="**")return es(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},br):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Vn)(e,t,n);if(!i)return l({},br);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function es(t){return{matched:!0,parameters:t.length>0?Gn(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Hn(t,n,e,r){return e.length>0&&ns(t,e,r)?{segmentGroup:new g(n,rs(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&is(t,e,r)?{segmentGroup:new g(t.segments,ts(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function ts(t,n,e,r){let i={};for(let o of e)if(Lt(t,n,o)&&!r[$(o)]){let s=new g([],{});i[$(o)]=s}return l(l({},r),i)}function rs(t,n){let e={};e[p]=n;for(let r of t)if(r.path===""&&$(r)!==p){let i=new g([],{});e[$(r)]=i}return e}function ns(t,n,e){return e.some(r=>Lt(t,n,r)&&$(r)!==p)}function is(t,n,e){return e.some(r=>Lt(t,n,r))}function Lt(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function os(t,n,e){return n.length===0&&!t.children[e]}var Ir=class{};function ss(t,n,e,r,i,o,s="emptyOnly"){return new Tr(t,n,e,r,i,s,o).recognize()}var as=31,Tr=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Er(this.urlSerializer,this.urlTree)}noMatchError(n){return new w(4002,`'${n.segmentGroup}'`)}recognize(){let n=Hn(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(y(({children:e,rootSnapshot:r})=>{let i=new N(r,e),o=new qe("",i),s=ti(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(n){let e=new ie([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),p,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,p,e).pipe(y(r=>({children:r,rootSnapshot:e})),te(r=>{if(r instanceof Ze)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof We?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(y(s=>s instanceof N?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return D(o).pipe(ce(s=>{let a=r.children[s],c=Co(e,s);return this.processSegmentGroup(n,c,a,s,i)}),zr((s,a)=>(s.push(...a),s)),Ft(null),$r(),O(s=>{if(s===null)return de(r);let a=vi(s);return cs(a),d(a)}))}processSegment(n,e,r,i,o,s,a){return D(e).pipe(ce(c=>this.processSegmentAgainstRoute(c._injector??n,e,c,r,i,o,s,a).pipe(te(u=>{if(u instanceof We)return d(null);throw u}))),Q(c=>!!c),te(c=>{if(fi(c))return os(r,i,o)?d(new Ir):de(r);throw c}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,c){return $(r)!==s&&(s===p||!Lt(i,o,r))?de(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,c):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,c):de(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:c,parameters:u,consumedSegments:h,positionalParamSegments:v,remainingSegments:m}=gi(e,i,o);if(!c)return de(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>as&&(this.allowRedirects=!1));let E=new ie(o,u,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Bn(i),$(i),i.component??i._loadedComponent??null,i,Fn(i)),C=Ot(E,a,this.paramsInheritanceStrategy);return E.params=Object.freeze(C.params),E.data=Object.freeze(C.data),this.applyRedirects.applyRedirectCommands(h,i.redirectTo,v,E,n).pipe(_(ee=>this.applyRedirects.lineralizeSegments(i,ee)),O(ee=>this.processSegment(n,r,e,ee.concat(m),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=Jo(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(_(c=>c.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(_(({routes:u})=>{let h=r._loadedInjector??n,{parameters:v,consumedSegments:m,remainingSegments:E}=c,C=new ie(m,v,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Bn(r),$(r),r.component??r._loadedComponent??null,r,Fn(r)),M=Ot(C,s,this.paramsInheritanceStrategy);C.params=Object.freeze(M.params),C.data=Object.freeze(M.data);let{segmentGroup:ee,slicedSegments:kt}=Hn(e,m,E,u);if(kt.length===0&&ee.hasChildren())return this.processChildren(h,u,ee,C).pipe(y(Je=>new N(C,Je)));if(u.length===0&&kt.length===0)return d(new N(C,[]));let Mi=$(r)===o;return this.processSegment(h,u,ee,kt,Mi?p:o,!0,C).pipe(y(Je=>new N(C,Je instanceof N?[Je]:[])))}))):de(e)))}getChildConfig(n,e,r){return e.children?d({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?d({routes:e._loadedRoutes,injector:e._loadedInjector}):Zo(n,e,r,this.urlSerializer).pipe(O(i=>i?this.configLoader.loadChildren(n,e).pipe(I(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):Ko(e))):d({routes:[],injector:n})}};function cs(t){t.sort((n,e)=>n.value.outlet===p?-1:e.value.outlet===p?1:n.value.outlet.localeCompare(e.value.outlet))}function us(t){let n=t.value.routeConfig;return n&&n.path===""}function vi(t){let n=[],e=new Set;for(let r of t){if(!us(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=vi(r.children);n.push(new N(r.value,i))}return n.filter(r=>!e.has(r))}function Bn(t){return t.data||{}}function Fn(t){return t.resolve||{}}function ls(t,n,e,r,i,o){return O(s=>ss(t,n,e,r,s.extractedUrl,i,o).pipe(y(({state:a,tree:c})=>U(l({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function ds(t,n){return O(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return d(e);let o=new Set(i.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let u of mi(c))s.add(u);let a=0;return D(s).pipe(ce(c=>o.has(c)?hs(c,r,t,n):(c.data=Ot(c,c.parent,t).resolve,d(void 0))),I(()=>a++),Vt(1),O(c=>a===s.size?d(e):q))})}function mi(t){let n=t.children.map(e=>mi(e)).flat();return[t,...n]}function hs(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!ci(i)&&(o[Ye]=i.title),et(()=>(t.data=Ot(t,t.parent,e).resolve,fs(o,t,n,r).pipe(y(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function fs(t,n,e,r){let i=pr(t);if(i.length===0)return d({});let o={};return D(i).pipe(O(s=>ps(t[s],n,e,r).pipe(Q(),I(a=>{if(a instanceof me)throw _t(new se,a);o[s]=a}))),Vt(1),y(()=>o),te(s=>fi(s)?q:be(s)))}function ps(t,n,e,r){let i=Se(n)??r,o=we(t,i),s=o.resolve?o.resolve(n,e):j(i,()=>o(n,e));return Z(s)}function hr(t){return _(n=>{let e=t(n);return e?D(e).pipe(y(()=>n)):d(n)})}var _r=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===p);return r}getResolvedTitleForRoute(e){return e.data[Ye]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(yi),providedIn:"root"})}return t})(),yi=(()=>{class t extends _r{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(S(xn))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ce=new T("",{providedIn:"root",factory:()=>({})}),Xe=new T(""),Si=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(vn);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return d(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=Z(j(e,()=>r.loadComponent())).pipe(y(wi),_(Ci),I(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),tt(()=>{this.componentLoaders.delete(r)})),o=new zt(i,()=>new V).pipe($t());return this.componentLoaders.set(r,o),o}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return d({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=Ri(r,this.compiler,e,this.onLoadEndListener).pipe(tt(()=>{this.childrenLoaders.delete(r)})),s=new zt(o,()=>new V).pipe($t());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ri(t,n,e,r){return Z(j(e,()=>t.loadChildren())).pipe(y(wi),_(Ci),O(i=>i instanceof en||Array.isArray(i)?d(i):D(n.compileModuleAsync(i))),y(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(Xe,[],{optional:!0,self:!0}).flat()),{routes:s.map(Or),injector:o}}))}function gs(t){return t&&typeof t=="object"&&"default"in t}function wi(t){return gs(t)?t.default:t}function Ci(t){return d(t)}var xt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(vs),providedIn:"root"})}return t})(),vs=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ei=new T("");var bi=new T(""),Ii=(()=>{class t{currentNavigation=nt(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new V;transitionAbortWithErrorSubject=new V;configLoader=f(Si);environmentInjector=f(le);destroyRef=f(Gr);urlSerializer=f(Qe);rootContexts=f(Re);location=f(st);inputBindingEnabled=f(Ut,{optional:!0})!==null;titleStrategy=f(_r);options=f(Ce,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(xt);createViewTransition=f(Ei,{optional:!0});navigationErrorHandler=f(bi,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>d(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new Ct(i)),r=i=>this.events.next(new Et(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;K(()=>{this.transitions?.next(U(l({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new L(null),this.transitions.pipe(Y(r=>r!==null),_(r=>{let i=!1;return d(r).pipe(_(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",A.SupersededByNewNavigation),q;this.currentTransition=r,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?U(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new G(o.id,this.urlSerializer.serialize(o.rawUrl),"",He.IgnoredSameUrlNavigation)),o.resolve(!1),q;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return d(o).pipe(_(c=>(this.events.next(new ae(c.id,this.urlSerializer.serialize(c.extractedUrl),c.source,c.restoredState)),c.id!==this.navigationId?q:Promise.resolve(c))),ls(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),I(c=>{r.targetSnapshot=c.targetSnapshot,r.urlAfterRedirects=c.urlAfterRedirects,this.currentNavigation.update(h=>(h.finalUrl=c.urlAfterRedirects,h));let u=new Be(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:c,extractedUrl:u,source:h,restoredState:v,extras:m}=o,E=new ae(c,this.urlSerializer.serialize(u),h,v);this.events.next(E);let C=si(this.rootComponentType).snapshot;return this.currentTransition=r=U(l({},o),{targetSnapshot:C,urlAfterRedirects:u,extras:U(l({},m),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(M=>(M.finalUrl=u,M)),d(r)}else return this.events.next(new G(o.id,this.urlSerializer.serialize(o.extractedUrl),"",He.IgnoredByUrlHandlingStrategy)),o.resolve(!1),q}),I(o=>{let s=new yt(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),y(o=>(this.currentTransition=r=U(l({},o),{guards:Do(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),zo(this.environmentInjector,o=>this.events.next(o)),I(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw _t(this.urlSerializer,o.guardsResult);let s=new St(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),Y(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",A.GuardRejected),!1)),hr(o=>{if(o.guards.canActivateChecks.length!==0)return d(o).pipe(I(s=>{let a=new Rt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),_(s=>{let a=!1;return d(s).pipe(ds(this.paramsInheritanceStrategy,this.environmentInjector),I({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",A.NoDataFromResolver)}}))}),I(s=>{let a=new wt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),hr(o=>{let s=a=>{let c=[];if(a.routeConfig?.loadComponent){let u=Se(a)??this.environmentInjector;c.push(this.configLoader.loadComponent(u,a.routeConfig).pipe(I(h=>{a.component=h}),y(()=>{})))}for(let u of a.children)c.push(...s(u));return c};return Ht(s(o.targetSnapshot.root)).pipe(Ft(null),ue(1))}),hr(()=>this.afterPreactivation()),_(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?D(a).pipe(y(()=>r)):d(r)}),y(o=>{let s=bo(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=U(l({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),r}),I(()=>{this.events.next(new Fe)}),Mo(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),ue(1),qt(new Lr(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(Y(()=>!i&&!r.targetRouterState),I(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",A.Aborted)}))),I({next:o=>{i=!0,this.lastSuccessfulNavigation=K(this.currentNavigation),this.events.next(new z(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),qt(this.transitionAbortWithErrorSubject.pipe(I(o=>{throw o}))),tt(()=>{i||this.cancelNavigationTransition(r,"",A.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),te(o=>{if(this.destroyed)return r.resolve(!1),q;if(i=!0,hi(o))this.events.next(new B(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),Ao(o)?this.events.next(new ve(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new ge(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=j(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof me){let{message:c,cancellationCode:u}=_t(this.urlSerializer,a);this.events.next(new B(r.id,this.urlSerializer.serialize(r.extractedUrl),c,u)),this.events.next(new ve(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return q}))}))}cancelNavigationTransition(e,r,i){let o=new B(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=K(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ms(t){return t!==ke}var Ti=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(ys),providedIn:"root"})}return t})(),Pt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},ys=(()=>{class t extends Pt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Zt(t)))(i||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ai=(()=>{class t{urlSerializer=f(Qe);options=f(Ce,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(st);urlHandlingStrategy=f(xt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new F;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof F?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=si(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(Ss),providedIn:"root"})}return t})(),Ss=(()=>{class t extends Ai{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof ae?this.updateStateMemento():e instanceof G?this.commitTransition(r):e instanceof Be?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Fe?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof B&&e.code!==A.SupersededByNewNavigation&&e.code!==A.Redirect?this.restoreHistory(r):e instanceof ge?this.restoreHistory(r,!0):e instanceof z&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,c=l(l({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",c)}else{let a=l(l({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Zt(t)))(i||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Nr(t,n){t.events.pipe(Y(e=>e instanceof z||e instanceof B||e instanceof ge||e instanceof G),y(e=>e instanceof z||e instanceof G?0:(e instanceof B?e.code===A.Redirect||e.code===A.SupersededByNewNavigation:!1)?2:1),Y(e=>e!==2),ue(1)).subscribe(()=>{n()})}var Rs={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ws={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ee=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(nn);stateManager=f(Ai);options=f(Ce,{optional:!0})||{};pendingTasks=f(Wr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(Ii);urlSerializer=f(Qe);location=f(st);urlHandlingStrategy=f(xt);injector=f(le);_events=new V;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(Ti);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(Xe,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Ut,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new Pr;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=K(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof B&&r.code!==A.Redirect&&r.code!==A.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof z)this.navigated=!0;else if(r instanceof ve){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||ms(i.source)},s);this.scheduleNavigation(a,ke,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}Ro(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),ke,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let c=l({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(o.state=c)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(c=>{this.disposed||this.injector.get(rt)(c)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return K(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Or),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:s,h=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":h=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}h!==null&&(h=this.removeEmptyProps(h));let v;try{let m=i?i.snapshot:this.routerState.snapshot.root;v=ri(m)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),v=this.currentUrlTree.root}return ni(v,e,h,u??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=J(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,ke,null,r)}navigate(e,r={skipLocationChange:!1}){return Cs(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=l({},Rs):r===!1?i=l({},ws):i=r,J(e))return jn(this.currentUrlTree,e,i);let o=this.parseUrl(e);return jn(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,u;s?(a=s.resolve,c=s.reject,u=s.promise):u=new Promise((v,m)=>{a=v,c=m});let h=this.pendingTasks.add();return Nr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(v=>Promise.reject(v))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Cs(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new w(4008,!1)}var jt=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=nt(null);get href(){return K(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new V;applicationErrorHandler=f(rt);options=f(Ce,{optional:!0});constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a,this.reactiveHref.set(f(new mn("href"),{optional:!0}));let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area"||!!(typeof customElements=="object"&&customElements.get(c)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof z&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(J(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,c)?.catch(u=>{this.applicationErrorHandler(u)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:J(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(k(Ee),k(W),Zr("tabindex"),k(Jt),k(Yt),k(Cn))};static \u0275dir=Me({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&hn("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&cn("href",i.reactiveHref(),Kr)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",ot],skipLocationChange:[2,"skipLocationChange","skipLocationChange",ot],replaceUrl:[2,"replaceUrl","replaceUrl",ot],routerLink:"routerLink"},features:[Ie]})}return t})(),bs=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new re;constructor(e,r,i,o,s){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof z&&this.update()})}ngAfterContentInit(){d(this.links.changes,d(null)).pipe(Bt()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=D(e).pipe(Bt()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=Is(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(k(Ee),k(Yt),k(Jt),k(it),k(jt,8))};static \u0275dir=Me({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&fn(o,jt,5),r&2){let s;pn(s=gn())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ie]})}return t})();function Is(t){return!!t.paths}var Ts=new T("");function As(t,...n){return Fr([{provide:Xe,multi:!0,useValue:t},[],{provide:W,useFactory:Ms,deps:[Ee]},{provide:sn,multi:!0,useFactory:Ds},n.map(e=>e.\u0275providers)])}function Ms(t){return t.routerState.root}function Ds(){let t=f(Gt);return n=>{let e=t.get(an);if(n!==e.components[0])return;let r=t.get(Ee),i=t.get(Os);t.get(_s)===1&&r.initialNavigation(),t.get(Ns,null,{optional:!0})?.setUpPreloading(),t.get(Ts,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var Os=new T("",{factory:()=>new V}),_s=new T("",{providedIn:"root",factory:()=>1});var Ns=new T("");export{Hi as a,W as b,Mr as c,Ee as d,jt as e,bs as f,As as g};
|