@arsedizioni/ars-utils 22.1.5 → 22.5.2

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.
Files changed (78) hide show
  1. package/README.md +158 -10
  2. package/clipper.ui/clipper.scss +564 -0
  3. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +1 -1
  4. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +11 -7
  6. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-core.date.mjs +609 -0
  8. package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -0
  9. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +591 -0
  10. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -0
  11. package/fesm2022/arsedizioni-ars-utils-core.mjs +270 -1449
  12. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1 -1
  14. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +1 -1
  16. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  17. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +14 -4108
  18. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
  19. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +962 -0
  20. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -0
  21. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +506 -0
  22. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -0
  23. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +450 -0
  24. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -0
  25. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +184 -0
  26. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -0
  27. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +825 -0
  28. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -0
  29. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +708 -0
  30. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -0
  31. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +426 -0
  32. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -0
  33. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +531 -0
  34. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -0
  35. package/fesm2022/arsedizioni-ars-utils-ui.mjs +54 -1227
  36. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  37. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1049 -0
  38. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -0
  39. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +263 -0
  40. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -0
  41. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +4 -3
  42. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  43. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +53 -0
  44. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -0
  45. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +517 -0
  46. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -0
  47. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +246 -0
  48. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -0
  49. package/fesm2022/arsedizioni-ars-utils.mjs +13 -12
  50. package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
  51. package/help/package.json +4 -0
  52. package/package.json +80 -14
  53. package/styles/ui.colors.scss +23 -0
  54. package/support.ui/package.json +4 -0
  55. package/tinymce/package.json +4 -0
  56. package/types/arsedizioni-ars-utils-clipper.common.d.ts +1 -2
  57. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +4 -1
  58. package/types/arsedizioni-ars-utils-core.d.ts +684 -1004
  59. package/types/arsedizioni-ars-utils-core.date.d.ts +304 -0
  60. package/types/arsedizioni-ars-utils-core.markdown.d.ts +159 -0
  61. package/types/arsedizioni-ars-utils-ui.application.d.ts +10 -2022
  62. package/types/arsedizioni-ars-utils-ui.controls.d.ts +413 -0
  63. package/types/arsedizioni-ars-utils-ui.d.ts +183 -566
  64. package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +224 -0
  65. package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +228 -0
  66. package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +47 -0
  67. package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +309 -0
  68. package/types/arsedizioni-ars-utils-ui.files.d.ts +271 -0
  69. package/types/arsedizioni-ars-utils-ui.filters.d.ts +163 -0
  70. package/types/arsedizioni-ars-utils-ui.help.d.ts +220 -0
  71. package/types/arsedizioni-ars-utils-ui.navigation.d.ts +650 -0
  72. package/types/arsedizioni-ars-utils-ui.notifications.d.ts +73 -0
  73. package/types/arsedizioni-ars-utils-ui.paginator.d.ts +23 -0
  74. package/types/arsedizioni-ars-utils-ui.shell.d.ts +345 -0
  75. package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +63 -0
  76. package/types/arsedizioni-ars-utils.d.ts +4 -10
  77. package/ui.tinymce/README.md +12 -0
  78. package/ui.tinymce/langs/it.js +466 -0
@@ -0,0 +1,1049 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ElementRef, DestroyRef, input, model, booleanAttribute, numberAttribute, output, viewChildren, signal, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
+ import { CdkTrapFocus } from '@angular/cdk/a11y';
5
+ import { Directionality } from '@angular/cdk/bidi';
6
+ import { CdkConnectedOverlay } from '@angular/cdk/overlay';
7
+ import * as i1 from '@angular/material/icon';
8
+ import { MatIconModule } from '@angular/material/icon';
9
+ import * as i2 from '@angular/material/tooltip';
10
+ import { MatTooltipModule } from '@angular/material/tooltip';
11
+ import { Router, NavigationEnd } from '@angular/router';
12
+ import { EMPTY, filter, map, distinctUntilChanged } from 'rxjs';
13
+ import { ThemeService } from '@arsedizioni/ars-utils/core';
14
+ import { MediaObserver } from '@arsedizioni/ars-utils/ui';
15
+
16
+ /**
17
+ * @file navigation.definitions.ts
18
+ *
19
+ * Data model shared by every variant of the Material Design 3 (Expressive)
20
+ * navigation component: Navigation bar, Navigation rail (collapsed and
21
+ * expanded) and Navigation drawer (standard and modal).
22
+ *
23
+ * Reference: https://m3.material.io/components/navigation-bar/specs
24
+ * https://m3.material.io/components/navigation-rail/specs
25
+ * https://m3.material.io/components/navigation-drawer/specs
26
+ */
27
+ /**
28
+ * Identifier of the synthesized overflow destination. Use it to recognise the
29
+ * overflow entry inside `itemSelected`.
30
+ */
31
+ const NAVIGATION_OVERFLOW_ID = '__overflow';
32
+ /**
33
+ * Default `auto` mapping, aligned with the Material 3 window size classes:
34
+ * compact windows get the navigation bar, medium and expanded windows get the
35
+ * collapsed rail, large and extra-large windows get the expanded rail.
36
+ */
37
+ const DEFAULT_NAVIGATION_AUTO_VARIANTS = {
38
+ xs: 'bar',
39
+ sm: 'rail',
40
+ md: 'rail',
41
+ lg: 'rail-expanded',
42
+ xl: 'rail-expanded',
43
+ };
44
+ /** Variants that render labels beside the icon and support sections and dividers. */
45
+ const EXPANDED_NAVIGATION_VARIANTS = [
46
+ 'rail-expanded',
47
+ 'drawer',
48
+ 'modal',
49
+ ];
50
+
51
+ /**
52
+ * @file navigation-bar.component.ts
53
+ *
54
+ * Material Design 3 (Expressive) navigation component.
55
+ *
56
+ * A single adaptive component that renders every navigation surface described
57
+ * by the M3 specs — Navigation bar, collapsed Navigation rail, expanded
58
+ * Navigation rail, standard Navigation drawer and modal Navigation drawer —
59
+ * from one destination model.
60
+ *
61
+ * Design goals:
62
+ * - Zoneless / signal based: no `NgZone`, no `setTimeout`, no manual change detection.
63
+ * - `OnPush` + pre-computed render models: the template contains no method calls.
64
+ * - Zero-DOM active indicator and state layer (rendered as pseudo-elements).
65
+ * - Nested destinations expand inline in the wide variants and open in a single
66
+ * shared overlay in the compact ones — one overlay for the whole component,
67
+ * not one menu instance per destination.
68
+ * - Router integration that degrades gracefully when no `Router` is provided.
69
+ */
70
+ /** Default sprite geometry, applied when a `NavigationIconSprite` omits a field. */
71
+ const SPRITE_DEFAULT_SIZE = 24;
72
+ class NavigationBarComponent {
73
+ constructor() {
74
+ // ── Injected dependencies ──────────────────────────────────────────────────
75
+ this.media = inject(MediaObserver);
76
+ // Optional for the same reason `Router` is: the component must still render
77
+ // inside a bare test bed, where no application theme has been bootstrapped.
78
+ this.themeService = inject(ThemeService, { optional: true });
79
+ this.router = inject(Router, { optional: true });
80
+ this.directionality = inject(Directionality, { optional: true });
81
+ this.hostRef = inject(ElementRef);
82
+ this.destroyRef = inject(DestroyRef);
83
+ // ── Inputs ─────────────────────────────────────────────────────────────────
84
+ /** Flat list of destinations. Ignored when `sections` is provided. */
85
+ this.items = input([], /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
87
+ /** Grouped destinations. Section headlines and dividers only render in the expanded variants. */
88
+ this.sections = input([], /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []));
90
+ /** Rendering variant. `auto` resolves from the active breakpoint through `autoVariants`. */
91
+ this.variant = input('auto', /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
93
+ /** Breakpoint → variant map used when `variant` is `auto`. Missing entries fall back to the M3 defaults. */
94
+ this.autoVariants = input({}, /* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "autoVariants" }] : /* istanbul ignore next */ []));
96
+ /** Two-way bound id of the selected destination. The router, when active, takes precedence. */
97
+ this.selectedId = model(undefined, /* @ts-ignore */
98
+ ...(ngDevMode ? [{ debugName: "selectedId" }] : /* istanbul ignore next */ []));
99
+ /**
100
+ * Two-way bound ids of the expanded parent destinations.
101
+ * Leave unbound (`undefined`) to let the component manage the expansion state
102
+ * on its own, seeding it from `NavigationItem.expanded` and auto-opening the
103
+ * ancestors of the active destination.
104
+ */
105
+ this.expandedIds = model(undefined, /* @ts-ignore */
106
+ ...(ngDevMode ? [{ debugName: "expandedIds" }] : /* istanbul ignore next */ []));
107
+ /** Two-way bound open state of the modal drawer. Ignored by the other variants. */
108
+ this.open = model(false, /* @ts-ignore */
109
+ ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
110
+ /** Label visibility policy. */
111
+ this.labelVisibility = input('auto', /* @ts-ignore */
112
+ ...(ngDevMode ? [{ debugName: "labelVisibility" }] : /* istanbul ignore next */ []));
113
+ /** Icon / label arrangement inside a destination. */
114
+ this.itemLayout = input('auto', /* @ts-ignore */
115
+ ...(ngDevMode ? [{ debugName: "itemLayout" }] : /* istanbul ignore next */ []));
116
+ /** Vertical alignment of the `top` destination group inside a rail. */
117
+ this.alignment = input('top', /* @ts-ignore */
118
+ ...(ngDevMode ? [{ debugName: "alignment" }] : /* istanbul ignore next */ []));
119
+ /** Edge the rail / drawer is anchored to. Mirrored automatically in RTL. */
120
+ this.position = input('start', /* @ts-ignore */
121
+ ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
122
+ /** Headline rendered above the destinations in the expanded rail and in the drawer. */
123
+ this.headline = input(undefined, /* @ts-ignore */
124
+ ...(ngDevMode ? [{ debugName: "headline" }] : /* istanbul ignore next */ []));
125
+ /** When `true` a leading menu button is rendered; it emits `menuClick`. */
126
+ this.showMenuButton = input(false, { ...(ngDevMode ? { debugName: "showMenuButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
127
+ /** Material Symbols ligature used by the menu button. */
128
+ this.menuIcon = input('menu', /* @ts-ignore */
129
+ ...(ngDevMode ? [{ debugName: "menuIcon" }] : /* istanbul ignore next */ []));
130
+ /** Material Symbols ligature used by the expand / collapse chevron. */
131
+ this.expandIcon = input('expand_more', /* @ts-ignore */
132
+ ...(ngDevMode ? [{ debugName: "expandIcon" }] : /* istanbul ignore next */ []));
133
+ /** Where `hideWhenCompact` destinations are collapsed into the overflow menu. */
134
+ this.overflowMode = input('bar', /* @ts-ignore */
135
+ ...(ngDevMode ? [{ debugName: "overflowMode" }] : /* istanbul ignore next */ []));
136
+ /** Material Symbols ligature of the overflow destination. */
137
+ this.overflowIcon = input('more_vert', /* @ts-ignore */
138
+ ...(ngDevMode ? [{ debugName: "overflowIcon" }] : /* istanbul ignore next */ []));
139
+ /** Accessible name and tooltip of the overflow destination, which renders icon-only. */
140
+ this.overflowLabel = input('More', /* @ts-ignore */
141
+ ...(ngDevMode ? [{ debugName: "overflowLabel" }] : /* istanbul ignore next */ []));
142
+ /**
143
+ * Hard cap on the destinations rendered inline in the compact variants,
144
+ * applied per anchoring group. The overflow destination counts as one slot.
145
+ * `0` disables the cap; the M3 specs recommend 3 to 5 for the navigation bar.
146
+ */
147
+ this.maxVisibleItems = input(0, { ...(ngDevMode ? { debugName: "maxVisibleItems" } : /* istanbul ignore next */ {}), transform: numberAttribute });
148
+ /** Accessible name of the menu button. */
149
+ this.menuAriaLabel = input('Menu', /* @ts-ignore */
150
+ ...(ngDevMode ? [{ debugName: "menuAriaLabel" }] : /* istanbul ignore next */ []));
151
+ /** Accessible name of the navigation landmark. */
152
+ this.ariaLabel = input('Navigation', /* @ts-ignore */
153
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
154
+ /** When `true` a scrim is rendered behind the modal drawer. */
155
+ this.scrim = input(true, { ...(ngDevMode ? { debugName: "scrim" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
156
+ /** When `true` the modal drawer closes as soon as a destination is activated. */
157
+ this.closeOnSelect = input(true, { ...(ngDevMode ? { debugName: "closeOnSelect" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
158
+ /** When `true` the surface gets the M3 elevation-3 shadow. */
159
+ this.elevated = input(true, { ...(ngDevMode ? { debugName: "elevated" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
160
+ /** When `true` a 1px divider separates the surface from the page content. */
161
+ this.bordered = input(false, { ...(ngDevMode ? { debugName: "bordered" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
162
+ /** When `true` tooltips are shown for destinations whose label is not visible. */
163
+ this.tooltips = input(true, { ...(ngDevMode ? { debugName: "tooltips" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
164
+ /** When `true` the selection follows the current router URL. */
165
+ this.routerSync = input(true, { ...(ngDevMode ? { debugName: "routerSync" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
166
+ /** Route used to resolve relative `route` commands. Absolute resolution when omitted. */
167
+ this.relativeTo = input(undefined, /* @ts-ignore */
168
+ ...(ngDevMode ? [{ debugName: "relativeTo" }] : /* istanbul ignore next */ []));
169
+ /** Explicit surface width in pixels for the rail / drawer variants. `0` keeps the spec default. */
170
+ this.width = input(0, { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), transform: numberAttribute });
171
+ /** When `true` the whole surface is hidden (animated off-screen) without being destroyed. */
172
+ this.hidden = input(false, { ...(ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
173
+ // ── Outputs ────────────────────────────────────────────────────────────────
174
+ /** Emitted when a destination is activated by the user. */
175
+ this.itemSelected = output();
176
+ /** Emitted when the leading menu button is pressed. */
177
+ this.menuClick = output();
178
+ // ── View queries ───────────────────────────────────────────────────────────
179
+ /** Focusable destination elements, in DOM order; used for keyboard roving. */
180
+ this.itemElements = viewChildren('navItem', /* @ts-ignore */
181
+ ...(ngDevMode ? [{ debugName: "itemElements" }] : /* istanbul ignore next */ []));
182
+ /** Focusable entries of the floating submenu panel, in DOM order. */
183
+ this.panelElements = viewChildren('panelItem', /* @ts-ignore */
184
+ ...(ngDevMode ? [{ debugName: "panelElements" }] : /* istanbul ignore next */ []));
185
+ // ── Router state ───────────────────────────────────────────────────────────
186
+ /** Current router URL, kept in a signal so the template stays zoneless-friendly. */
187
+ this.routerUrl = signal(undefined, /* @ts-ignore */
188
+ ...(ngDevMode ? [{ debugName: "routerUrl" }] : /* istanbul ignore next */ []));
189
+ // ── Theme state ────────────────────────────────────────────────────────────
190
+ /**
191
+ * Ticks whenever the application theme moves. The emitted value is ignored on
192
+ * purpose: it is a change notification, not the answer.
193
+ *
194
+ * Reads `themeService`, so it MUST stay below the injected dependencies: moved
195
+ * above them it would read `undefined`, `?? EMPTY` would swallow it and the
196
+ * theme would silently stop propagating, with nothing to show for it at
197
+ * compile time.
198
+ */
199
+ this.themeChanged = toSignal(this.themeService?.changed ?? EMPTY, { initialValue: undefined });
200
+ /**
201
+ * `true` when the dark theme is active; selects the dark frame set of a sprite.
202
+ *
203
+ * The answer comes from `getTheme()`, the only one that resolves `auto`
204
+ * against the OS preference. `getTheme()` already reads a signal for the
205
+ * explicit modes, so `themeChanged()` is read for the one case that is not
206
+ * reactive on its own: mode `auto` plus a change of the OS colour scheme,
207
+ * which leaves the stored mode on `auto` and only travels through `changed`.
208
+ * Falls back to the light set when no `ThemeService` is provided.
209
+ */
210
+ this.isDark = computed(() => {
211
+ this.themeChanged();
212
+ return this.themeService?.getTheme() === 'dark';
213
+ }, /* @ts-ignore */
214
+ ...(ngDevMode ? [{ debugName: "isDark" }] : /* istanbul ignore next */ []));
215
+ // ── Submenu overlay state ──────────────────────────────────────────────────
216
+ /** Id of the destination whose children are currently shown in the floating panel. */
217
+ this.popupId = signal(undefined, /* @ts-ignore */
218
+ ...(ngDevMode ? [{ debugName: "popupId" }] : /* istanbul ignore next */ []));
219
+ /**
220
+ * Destination whose children are currently shown in the floating panel.
221
+ *
222
+ * Derived from the id and NOT stored as an object: the render model is rebuilt
223
+ * whenever the destinations, the resolved URLs or the theme change, and a
224
+ * stored object would keep the panel painting the sprite frames of the
225
+ * previous theme until the panel is closed and reopened.
226
+ *
227
+ * The search is recursive because a panel entry can itself own children and
228
+ * open a panel of its own, and those nested render models are not part of the
229
+ * top level of `visibleGroups`.
230
+ *
231
+ * Reads `visibleGroups`, which is declared further down: safe because
232
+ * `computed` is lazy and nothing reads this before the first render — the
233
+ * opposite of `themeChanged` above, which reads its dependency immediately.
234
+ */
235
+ this.popupItem = computed(() => {
236
+ const id = this.popupId();
237
+ if (id === undefined)
238
+ return undefined;
239
+ const find = (list) => {
240
+ for (const rendered of list) {
241
+ if (rendered.item.id === id)
242
+ return rendered;
243
+ const nested = find(rendered.children);
244
+ if (nested)
245
+ return nested;
246
+ }
247
+ return undefined;
248
+ };
249
+ for (const group of this.visibleGroups()) {
250
+ for (const section of group.sections) {
251
+ const hit = find(section.items);
252
+ if (hit)
253
+ return hit;
254
+ }
255
+ }
256
+ // The destination went away while its panel was open.
257
+ return undefined;
258
+ }, /* @ts-ignore */
259
+ ...(ngDevMode ? [{ debugName: "popupItem" }] : /* istanbul ignore next */ []));
260
+ /** Element the floating panel is anchored to. */
261
+ this.popupAnchor = signal(undefined, /* @ts-ignore */
262
+ ...(ngDevMode ? [{ debugName: "popupAnchor" }] : /* istanbul ignore next */ []));
263
+ // ── Derived state ──────────────────────────────────────────────────────────
264
+ /** Sections actually rendered: the `sections` input, or a single implicit section wrapping `items`. */
265
+ this.resolvedSections = computed(() => {
266
+ const sections = this.sections();
267
+ if (sections.length > 0)
268
+ return sections;
269
+ return [{ id: '__default', items: this.items() }];
270
+ }, /* @ts-ignore */
271
+ ...(ngDevMode ? [{ debugName: "resolvedSections" }] : /* istanbul ignore next */ []));
272
+ /** Every destination, nested ones included, in depth-first order. */
273
+ this.allItems = computed(() => {
274
+ const result = [];
275
+ const walk = (list) => {
276
+ for (const item of list) {
277
+ result.push(item);
278
+ if (item.children?.length)
279
+ walk(item.children);
280
+ }
281
+ };
282
+ for (const section of this.resolvedSections())
283
+ walk(section.items);
284
+ return result;
285
+ }, /* @ts-ignore */
286
+ ...(ngDevMode ? [{ debugName: "allItems" }] : /* istanbul ignore next */ []));
287
+ /** Map of destination id to the id of its parent destination. */
288
+ this.parentOf = computed(() => {
289
+ const result = new Map();
290
+ const walk = (list, parentId) => {
291
+ for (const item of list) {
292
+ if (parentId !== undefined)
293
+ result.set(item.id, parentId);
294
+ if (item.children?.length)
295
+ walk(item.children, item.id);
296
+ }
297
+ };
298
+ for (const section of this.resolvedSections())
299
+ walk(section.items);
300
+ return result;
301
+ }, /* @ts-ignore */
302
+ ...(ngDevMode ? [{ debugName: "parentOf" }] : /* istanbul ignore next */ []));
303
+ /** The variant to render, resolving `auto` against the active CDK breakpoint. */
304
+ this.resolvedVariant = computed(() => {
305
+ const variant = this.variant();
306
+ if (variant !== 'auto')
307
+ return variant;
308
+ const alias = this.media.currentBp();
309
+ return this.autoVariants()[alias] ?? DEFAULT_NAVIGATION_AUTO_VARIANTS[alias];
310
+ }, /* @ts-ignore */
311
+ ...(ngDevMode ? [{ debugName: "resolvedVariant" }] : /* istanbul ignore next */ []));
312
+ /** `true` for the variants that render labels beside icons and support sections. */
313
+ this.isExpanded = computed(() => EXPANDED_NAVIGATION_VARIANTS.includes(this.resolvedVariant()), /* @ts-ignore */
314
+ ...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
315
+ /** `true` when the surface is the modal drawer. */
316
+ this.isModal = computed(() => this.resolvedVariant() === 'modal', /* @ts-ignore */
317
+ ...(ngDevMode ? [{ debugName: "isModal" }] : /* istanbul ignore next */ []));
318
+ /** `true` when the modal drawer is currently open. */
319
+ this.isOverlayOpen = computed(() => this.isModal() && this.open(), /* @ts-ignore */
320
+ ...(ngDevMode ? [{ debugName: "isOverlayOpen" }] : /* istanbul ignore next */ []));
321
+ /** `true` when the surface must be visually hidden. */
322
+ this.isHidden = computed(() => this.hidden() || (this.isModal() && !this.open()), /* @ts-ignore */
323
+ ...(ngDevMode ? [{ debugName: "isHidden" }] : /* istanbul ignore next */ []));
324
+ /** Resolved icon / label arrangement. */
325
+ this.resolvedLayout = computed(() => {
326
+ if (this.isExpanded())
327
+ return 'horizontal';
328
+ const layout = this.itemLayout();
329
+ if (layout !== 'auto')
330
+ return layout;
331
+ // M3 Expressive: the navigation bar switches to a horizontal item layout from 600dp upwards.
332
+ return this.resolvedVariant() === 'bar' && this.media.currentBp() !== 'xs' ? 'horizontal' : 'vertical';
333
+ }, /* @ts-ignore */
334
+ ...(ngDevMode ? [{ debugName: "resolvedLayout" }] : /* istanbul ignore next */ []));
335
+ /** Resolved label visibility; the expanded variants always show labels. */
336
+ this.resolvedLabelVisibility = computed(() => {
337
+ if (this.isExpanded())
338
+ return 'labeled';
339
+ const visibility = this.labelVisibility();
340
+ return visibility === 'auto' ? 'labeled' : visibility;
341
+ }, /* @ts-ignore */
342
+ ...(ngDevMode ? [{ debugName: "resolvedLabelVisibility" }] : /* istanbul ignore next */ []));
343
+ /** `true` when the headline row (menu button, headline text) is rendered. */
344
+ this.showsHeader = computed(() => this.resolvedVariant() !== 'bar' && (this.showMenuButton() || (this.isExpanded() && !!this.headline())), /* @ts-ignore */
345
+ ...(ngDevMode ? [{ debugName: "showsHeader" }] : /* istanbul ignore next */ []));
346
+ /**
347
+ * Geometry of the active indicator:
348
+ * `compact` wraps the icon only (56x32 pill), `wide` wraps icon and label
349
+ * together, exactly as described by the M3 Expressive specs.
350
+ */
351
+ this.indicatorMode = computed(() => this.isExpanded() || this.resolvedLayout() === 'horizontal' ? 'wide' : 'compact', /* @ts-ignore */
352
+ ...(ngDevMode ? [{ debugName: "indicatorMode" }] : /* istanbul ignore next */ []));
353
+ /** Tooltip placement derived from the variant and from the anchoring edge. */
354
+ this.tooltipPosition = computed(() => {
355
+ if (this.resolvedVariant() === 'bar')
356
+ return 'above';
357
+ return this.position() === 'end' ? 'before' : 'after';
358
+ }, /* @ts-ignore */
359
+ ...(ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []));
360
+ /** Inline width override for the rail / drawer, or `undefined` to keep the spec default. */
361
+ this.widthStyle = computed(() => {
362
+ const width = this.width();
363
+ return width > 0 ? `${width}px` : undefined;
364
+ }, /* @ts-ignore */
365
+ ...(ngDevMode ? [{ debugName: "widthStyle" }] : /* istanbul ignore next */ []));
366
+ /** Map of destination id to resolved URL. Recomputed only when the destinations change. */
367
+ this.hrefs = computed(() => {
368
+ const result = new Map();
369
+ const router = this.router;
370
+ const relativeTo = this.relativeTo();
371
+ for (const item of this.allItems()) {
372
+ if (item.href) {
373
+ result.set(item.id, item.href);
374
+ continue;
375
+ }
376
+ if (item.route !== undefined && router) {
377
+ const commands = Array.isArray(item.route) ? [...item.route] : [item.route];
378
+ try {
379
+ const tree = router.createUrlTree(commands, {
380
+ queryParams: item.queryParams,
381
+ fragment: item.fragment,
382
+ relativeTo,
383
+ });
384
+ result.set(item.id, router.serializeUrl(tree));
385
+ }
386
+ catch {
387
+ // Invalid route commands: the destination degrades to a plain button.
388
+ }
389
+ }
390
+ }
391
+ return result;
392
+ }, /* @ts-ignore */
393
+ ...(ngDevMode ? [{ debugName: "hrefs" }] : /* istanbul ignore next */ []));
394
+ /**
395
+ * Static render model, rebuilt only when the destinations, the resolved URLs
396
+ * or the theme change — never when the selection or the expansion state
397
+ * changes. The theme is a dependency because sprite icons carry one frame set
398
+ * per theme, and the frames are baked into the inline style of the icon.
399
+ */
400
+ this.renderGroups = computed(() => {
401
+ const hrefs = this.hrefs();
402
+ const dark = this.isDark();
403
+ const counter = { value: 0 };
404
+ const top = [];
405
+ const bottom = [];
406
+ for (const section of this.resolvedSections()) {
407
+ const topItems = [];
408
+ const bottomItems = [];
409
+ for (const item of section.items) {
410
+ const rendered = NavigationBarComponent.buildRenderItem(item, section, undefined, 0, counter, hrefs, dark);
411
+ (item.align === 'bottom' ? bottomItems : topItems).push(rendered);
412
+ }
413
+ if (topItems.length > 0)
414
+ top.push({ section, items: topItems });
415
+ if (bottomItems.length > 0)
416
+ bottom.push({ section, items: bottomItems });
417
+ }
418
+ const groups = [];
419
+ if (top.length > 0)
420
+ groups.push({ align: 'top', sections: top });
421
+ if (bottom.length > 0)
422
+ groups.push({ align: 'bottom', sections: bottom });
423
+ return groups;
424
+ }, /* @ts-ignore */
425
+ ...(ngDevMode ? [{ debugName: "renderGroups" }] : /* istanbul ignore next */ []));
426
+ /** Id of the destination matching the current router URL, using longest-prefix matching. */
427
+ this.routerActiveId = computed(() => {
428
+ if (!this.routerSync())
429
+ return undefined;
430
+ const url = this.routerUrl();
431
+ if (!url)
432
+ return undefined;
433
+ const path = NavigationBarComponent.pathOf(url);
434
+ const hrefs = this.hrefs();
435
+ let best;
436
+ let bestLength = -1;
437
+ for (const item of this.allItems()) {
438
+ if (item.href || item.route === undefined)
439
+ continue;
440
+ const href = hrefs.get(item.id);
441
+ if (!href)
442
+ continue;
443
+ const target = NavigationBarComponent.pathOf(href);
444
+ const matches = item.exact
445
+ ? path === target
446
+ : path === target || path.startsWith(target.endsWith('/') ? target : `${target}/`);
447
+ if (matches && target.length > bestLength) {
448
+ best = item.id;
449
+ bestLength = target.length;
450
+ }
451
+ }
452
+ return best;
453
+ }, /* @ts-ignore */
454
+ ...(ngDevMode ? [{ debugName: "routerActiveId" }] : /* istanbul ignore next */ []));
455
+ /** Id of the currently active destination: router URL first, explicit selection as fallback. */
456
+ this.activeId = computed(() => this.routerActiveId() ?? this.selectedId(), /* @ts-ignore */
457
+ ...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
458
+ /**
459
+ * Expansion state used when `expandedIds` is left unbound: the destinations
460
+ * flagged `expanded`, plus every ancestor of the active destination.
461
+ */
462
+ this.defaultExpandedIds = computed(() => {
463
+ const result = new Set();
464
+ for (const item of this.allItems()) {
465
+ if (item.expanded)
466
+ result.add(item.id);
467
+ }
468
+ const parents = this.parentOf();
469
+ const visited = new Set();
470
+ let current = this.activeId();
471
+ while (current !== undefined && !visited.has(current)) {
472
+ visited.add(current);
473
+ const parent = parents.get(current);
474
+ if (parent === undefined)
475
+ break;
476
+ result.add(parent);
477
+ current = parent;
478
+ }
479
+ return [...result];
480
+ }, /* @ts-ignore */
481
+ ...(ngDevMode ? [{ debugName: "defaultExpandedIds" }] : /* istanbul ignore next */ []));
482
+ /** Ids of the parent destinations currently expanded. */
483
+ this.expandedSet = computed(() => new Set(this.expandedIds() ?? this.defaultExpandedIds()), /* @ts-ignore */
484
+ ...(ngDevMode ? [{ debugName: "expandedSet" }] : /* istanbul ignore next */ []));
485
+ /** `true` when the current variant collapses `hideWhenCompact` destinations into the overflow menu. */
486
+ this.overflowApplies = computed(() => {
487
+ const mode = this.overflowMode();
488
+ if (mode === 'never')
489
+ return false;
490
+ const variant = this.resolvedVariant();
491
+ return mode === 'bar' ? variant === 'bar' : variant === 'bar' || variant === 'rail';
492
+ }, /* @ts-ignore */
493
+ ...(ngDevMode ? [{ debugName: "overflowApplies" }] : /* istanbul ignore next */ []));
494
+ /**
495
+ * Render model actually walked by the template: the static model with the
496
+ * compact-only destinations moved into the overflow menu and the children of
497
+ * the expanded parents spliced in.
498
+ */
499
+ this.visibleGroups = computed(() => {
500
+ const inline = this.isExpanded();
501
+ const open = this.expandedSet();
502
+ const overflow = this.overflowApplies();
503
+ const max = this.maxVisibleItems();
504
+ // The bar ignores per-item anchoring, so both groups share a single row and
505
+ // therefore a single overflow entry.
506
+ let groups = this.resolvedVariant() === 'bar'
507
+ ? NavigationBarComponent.mergeGroups(this.renderGroups())
508
+ : this.renderGroups();
509
+ if (overflow || max > 0) {
510
+ groups = groups.map(group => this.applyOverflow(group, overflow, max));
511
+ }
512
+ if (!inline)
513
+ return groups;
514
+ const flatten = (list) => {
515
+ let expandedAny = false;
516
+ const result = [];
517
+ for (const rendered of list) {
518
+ result.push(rendered);
519
+ if (rendered.hasChildren && open.has(rendered.item.id)) {
520
+ expandedAny = true;
521
+ result.push(...flatten(rendered.children));
522
+ }
523
+ }
524
+ return expandedAny ? result : list;
525
+ };
526
+ return groups.map(group => ({
527
+ align: group.align,
528
+ sections: group.sections.map(section => ({
529
+ section: section.section,
530
+ items: flatten(section.items),
531
+ })),
532
+ }));
533
+ }, /* @ts-ignore */
534
+ ...(ngDevMode ? [{ debugName: "visibleGroups" }] : /* istanbul ignore next */ []));
535
+ /**
536
+ * Ids rendered with the selected styling. It is the active destination when it
537
+ * is on screen, otherwise every rendered parent hiding it — a collapsed branch
538
+ * or the overflow entry — so the user still sees where they are.
539
+ */
540
+ this.highlightedIds = computed(() => {
541
+ const active = this.activeId();
542
+ const result = new Set();
543
+ if (active === undefined)
544
+ return result;
545
+ const rendered = new Set();
546
+ const parents = [];
547
+ for (const group of this.visibleGroups()) {
548
+ for (const section of group.sections) {
549
+ for (const item of section.items) {
550
+ rendered.add(item.item.id);
551
+ if (item.hasChildren)
552
+ parents.push(item);
553
+ }
554
+ }
555
+ }
556
+ if (rendered.has(active)) {
557
+ result.add(active);
558
+ return result;
559
+ }
560
+ const contains = (list) => list.some(child => child.item.id === active || contains(child.children));
561
+ for (const parent of parents) {
562
+ if (contains(parent.children))
563
+ result.add(parent.item.id);
564
+ }
565
+ return result;
566
+ }, /* @ts-ignore */
567
+ ...(ngDevMode ? [{ debugName: "highlightedIds" }] : /* istanbul ignore next */ []));
568
+ /**
569
+ * Rows of the floating submenu panel. Nested destinations one level down are
570
+ * flattened under a heading, so the overflow menu can hold parents too.
571
+ */
572
+ this.popupEntries = computed(() => {
573
+ const parent = this.popupItem();
574
+ if (!parent)
575
+ return [];
576
+ const result = [];
577
+ for (const child of parent.children) {
578
+ if (child.hasChildren) {
579
+ result.push({ key: `${child.item.id}__heading`, label: child.item.label });
580
+ for (const grandChild of child.children) {
581
+ result.push({ key: grandChild.item.id, render: grandChild });
582
+ }
583
+ }
584
+ else {
585
+ result.push({ key: child.item.id, render: child });
586
+ }
587
+ }
588
+ return result;
589
+ }, /* @ts-ignore */
590
+ ...(ngDevMode ? [{ debugName: "popupEntries" }] : /* istanbul ignore next */ []));
591
+ /** `true` when the floating submenu panel must be shown. */
592
+ this.isPopupOpen = computed(() => !this.isExpanded() && !!this.popupItem(), /* @ts-ignore */
593
+ ...(ngDevMode ? [{ debugName: "isPopupOpen" }] : /* istanbul ignore next */ []));
594
+ /** Element the floating submenu panel is anchored to. */
595
+ this.popupOrigin = computed(() => this.popupAnchor() ?? this.hostRef.nativeElement, /* @ts-ignore */
596
+ ...(ngDevMode ? [{ debugName: "popupOrigin" }] : /* istanbul ignore next */ []));
597
+ /** Connected positions of the floating submenu panel, derived from the variant. */
598
+ this.popupPositions = computed(() => {
599
+ if (this.resolvedVariant() === 'bar') {
600
+ return [
601
+ { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 },
602
+ { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 },
603
+ ];
604
+ }
605
+ if (this.position() === 'end') {
606
+ return [
607
+ { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 },
608
+ { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 },
609
+ ];
610
+ }
611
+ return [
612
+ { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },
613
+ { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },
614
+ ];
615
+ }, /* @ts-ignore */
616
+ ...(ngDevMode ? [{ debugName: "popupPositions" }] : /* istanbul ignore next */ []));
617
+ /** `true` when the layout runs right-to-left; used to mirror the arrow keys. */
618
+ this.isRtl = computed(() => this.directionality?.value === 'rtl', /* @ts-ignore */
619
+ ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
620
+ const router = this.router;
621
+ if (router) {
622
+ this.routerUrl.set(router.url);
623
+ router.events
624
+ .pipe(filter((e) => e instanceof NavigationEnd), map(e => e.urlAfterRedirects), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
625
+ .subscribe(url => this.routerUrl.set(url));
626
+ }
627
+ }
628
+ // ── Event handlers ─────────────────────────────────────────────────────────
629
+ /**
630
+ * Activates a destination, or expands it when it owns nested destinations.
631
+ * A parent never navigates: it toggles its group inline in the wide variants
632
+ * and opens the floating panel in the compact ones.
633
+ * @param render - The render model of the activated destination.
634
+ * @param event - The originating mouse or keyboard event.
635
+ */
636
+ select(render, event) {
637
+ const item = render.item;
638
+ if (item.disabled) {
639
+ event.preventDefault();
640
+ return;
641
+ }
642
+ if (render.hasChildren) {
643
+ event.preventDefault();
644
+ if (this.isExpanded()) {
645
+ this.toggleExpanded(item.id);
646
+ }
647
+ else {
648
+ this.openPopup(render, event);
649
+ }
650
+ return;
651
+ }
652
+ // Let the browser handle modified clicks (new tab / new window) natively.
653
+ const mouse = event;
654
+ if (render.href && (mouse.ctrlKey || mouse.metaKey || mouse.shiftKey || mouse.button === 1)) {
655
+ return;
656
+ }
657
+ if (render.routed && render.href) {
658
+ event.preventDefault();
659
+ void this.router?.navigateByUrl(render.href);
660
+ }
661
+ this.selectedId.set(item.id);
662
+ this.itemSelected.emit({ item, section: render.section, parent: render.parent, index: render.index });
663
+ this.closePopup();
664
+ if (this.isModal() && this.closeOnSelect()) {
665
+ this.open.set(false);
666
+ }
667
+ }
668
+ /**
669
+ * Emits `menuClick` when the leading menu button is pressed.
670
+ */
671
+ onMenuClick() {
672
+ this.menuClick.emit();
673
+ }
674
+ /**
675
+ * Closes the modal drawer when the scrim is clicked.
676
+ */
677
+ onScrimClick() {
678
+ this.open.set(false);
679
+ }
680
+ /**
681
+ * Handles keyboard interaction: arrow keys move the focus between
682
+ * destinations, `Home` / `End` jump to the first / last one and `Escape`
683
+ * closes the floating submenu panel or the modal drawer.
684
+ *
685
+ * The same handler serves the surface and the floating panel, and it tells
686
+ * them apart by `currentTarget`: roving inside an open `role="menu"` must stay
687
+ * inside it, and a programmatic `focus()` is NOT stopped by the focus trap, so
688
+ * sharing one element list would send the focus onto the surface behind the
689
+ * overlay.
690
+ *
691
+ * @param event - The originating keyboard event.
692
+ */
693
+ onKeydown(event) {
694
+ if (event.key === 'Escape') {
695
+ if (this.popupItem()) {
696
+ event.preventDefault();
697
+ this.closePopup();
698
+ return;
699
+ }
700
+ if (this.isOverlayOpen()) {
701
+ event.preventDefault();
702
+ this.open.set(false);
703
+ return;
704
+ }
705
+ }
706
+ // The panel is always a vertical list, whatever the variant behind it.
707
+ const inPanel = event.currentTarget?.classList.contains('ars-nav-submenu') === true;
708
+ const horizontal = !inPanel && this.resolvedVariant() === 'bar';
709
+ const forward = horizontal ? (this.isRtl() ? 'ArrowLeft' : 'ArrowRight') : 'ArrowDown';
710
+ const backward = horizontal ? (this.isRtl() ? 'ArrowRight' : 'ArrowLeft') : 'ArrowUp';
711
+ let delta = 0;
712
+ if (event.key === forward)
713
+ delta = 1;
714
+ else if (event.key === backward)
715
+ delta = -1;
716
+ else if (event.key !== 'Home' && event.key !== 'End')
717
+ return;
718
+ const elements = inPanel ? this.panelElements() : this.itemElements();
719
+ if (elements.length === 0)
720
+ return;
721
+ const current = elements.findIndex(ref => ref.nativeElement === event.target);
722
+ let next;
723
+ if (event.key === 'Home')
724
+ next = 0;
725
+ else if (event.key === 'End')
726
+ next = elements.length - 1;
727
+ else if (current < 0)
728
+ next = 0;
729
+ else
730
+ next = (current + delta + elements.length) % elements.length;
731
+ event.preventDefault();
732
+ elements[next]?.nativeElement.focus();
733
+ }
734
+ // ── Public API ─────────────────────────────────────────────────────────────
735
+ /**
736
+ * Expands or collapses the parent destination with the given id.
737
+ * @param id - Identifier of the parent destination to toggle.
738
+ */
739
+ toggleExpanded(id) {
740
+ const next = new Set(this.expandedSet());
741
+ if (next.has(id))
742
+ next.delete(id);
743
+ else
744
+ next.add(id);
745
+ this.expandedIds.set([...next]);
746
+ }
747
+ /**
748
+ * Opens the floating submenu panel of a parent destination.
749
+ * @param render - The render model of the parent destination.
750
+ * @param event - The originating event, used to anchor the panel.
751
+ */
752
+ openPopup(render, event) {
753
+ const anchor = event.currentTarget;
754
+ this.popupAnchor.set(anchor ?? undefined);
755
+ this.popupId.set(this.popupItem()?.item.id === render.item.id ? undefined : render.item.id);
756
+ }
757
+ /**
758
+ * Closes the floating submenu panel.
759
+ */
760
+ closePopup() {
761
+ this.popupId.set(undefined);
762
+ // Otherwise the component keeps a reference to a detached element.
763
+ this.popupAnchor.set(undefined);
764
+ }
765
+ /**
766
+ * Opens the modal drawer. No-op for the other variants.
767
+ */
768
+ openDrawer() {
769
+ this.open.set(true);
770
+ }
771
+ /**
772
+ * Closes the modal drawer. No-op for the other variants.
773
+ */
774
+ closeDrawer() {
775
+ this.open.set(false);
776
+ }
777
+ /**
778
+ * Toggles the modal drawer. No-op for the other variants.
779
+ */
780
+ toggleDrawer() {
781
+ this.open.update(open => !open);
782
+ }
783
+ /**
784
+ * Moves the browser focus to the destination with the given id.
785
+ * @param id - Identifier of the destination to focus.
786
+ * @returns `true` when a matching destination was found and focused.
787
+ */
788
+ focusItem(id) {
789
+ for (const ref of this.itemElements()) {
790
+ if (ref.nativeElement.dataset['navId'] === id) {
791
+ ref.nativeElement.focus();
792
+ return true;
793
+ }
794
+ }
795
+ return false;
796
+ }
797
+ // ── Helpers ────────────────────────────────────────────────────────────────
798
+ /**
799
+ * Moves the compact-only destinations of a group into a synthesized overflow
800
+ * destination appended at the end of the group.
801
+ * @param group - The group to process.
802
+ * @param overflow - `true` when `hideWhenCompact` must be honoured.
803
+ * @param max - Hard cap on the inline destinations; `0` disables it.
804
+ * @returns The group with the overflow destination applied.
805
+ */
806
+ applyOverflow(group, overflow, max) {
807
+ const kept = [];
808
+ const overflowed = [];
809
+ group.sections.forEach((section, sectionIndex) => {
810
+ for (const render of section.items) {
811
+ if (overflow && render.item.hideWhenCompact)
812
+ overflowed.push(render);
813
+ else
814
+ kept.push({ sectionIndex, render });
815
+ }
816
+ });
817
+ const slots = kept.length + (overflowed.length > 0 ? 1 : 0);
818
+ if (max > 0 && slots > max) {
819
+ const moved = kept.splice(Math.max(1, max - 1));
820
+ for (const entry of moved)
821
+ overflowed.push(entry.render);
822
+ }
823
+ if (overflowed.length === 0)
824
+ return group;
825
+ const sections = group.sections.map((section, sectionIndex) => ({
826
+ section: section.section,
827
+ items: kept.filter(entry => entry.sectionIndex === sectionIndex).map(entry => entry.render),
828
+ }));
829
+ const last = sections[sections.length - 1];
830
+ sections[sections.length - 1] = {
831
+ section: last.section,
832
+ items: [...last.items, this.buildOverflowItem(overflowed)],
833
+ };
834
+ return { align: group.align, sections: sections.filter(section => section.items.length > 0) };
835
+ }
836
+ /**
837
+ * Builds the synthesized, icon-only overflow destination.
838
+ * @param children - The destinations moved into the overflow menu.
839
+ * @returns The render model of the overflow destination.
840
+ */
841
+ buildOverflowItem(children) {
842
+ const label = this.overflowLabel();
843
+ const icon = this.overflowIcon();
844
+ return {
845
+ item: { id: NAVIGATION_OVERFLOW_ID, label, icon },
846
+ index: -1,
847
+ depth: 0,
848
+ routed: false,
849
+ iconOff: icon,
850
+ iconOn: icon,
851
+ badgeText: '',
852
+ hasBadge: false,
853
+ iconOnly: true,
854
+ hasChildren: true,
855
+ children,
856
+ ariaLabel: label,
857
+ tooltip: label,
858
+ };
859
+ }
860
+ /**
861
+ * Merges the `top` and `bottom` groups into a single `top` group, combining
862
+ * the sections that share an id so `@for` track keys stay unique.
863
+ * @param groups - The groups to merge.
864
+ * @returns A single-group array, or the input when there is nothing to merge.
865
+ */
866
+ static mergeGroups(groups) {
867
+ if (groups.length < 2)
868
+ return groups;
869
+ const order = [];
870
+ const byId = new Map();
871
+ for (const group of groups) {
872
+ for (const section of group.sections) {
873
+ const existing = byId.get(section.section.id);
874
+ if (existing) {
875
+ byId.set(section.section.id, {
876
+ section: existing.section,
877
+ items: [...existing.items, ...section.items],
878
+ });
879
+ }
880
+ else {
881
+ order.push(section.section.id);
882
+ byId.set(section.section.id, section);
883
+ }
884
+ }
885
+ }
886
+ return [{ align: 'top', sections: order.map(id => byId.get(id)) }];
887
+ }
888
+ /**
889
+ * Builds the render model of a destination and, recursively, of its children.
890
+ * @param item - The source destination.
891
+ * @param section - The section the destination belongs to.
892
+ * @param parent - The parent destination, for nested destinations.
893
+ * @param depth - Nesting level of the destination.
894
+ * @param counter - Shared counter producing the flat destination index.
895
+ * @param hrefs - Map of destination id to resolved URL.
896
+ * @param dark - `true` when the dark theme is active, selecting the dark sprite frames.
897
+ * @returns The render model of the destination.
898
+ */
899
+ static buildRenderItem(item, section, parent, depth, counter, hrefs, dark) {
900
+ const href = hrefs.get(item.id);
901
+ // Icon precedence: registered SVG, then sprite sheet, then image, then ligature.
902
+ const svgOff = item.svgIcon;
903
+ const svgOn = item.activeSvgIcon ?? item.svgIcon;
904
+ const spriteStyle = NavigationBarComponent.buildSpriteStyle(item, dark);
905
+ const imageOff = spriteStyle || svgOff ? undefined : item.imageIcon;
906
+ const imageOn = spriteStyle || svgOn ? undefined : (item.activeImageIcon ?? item.imageIcon);
907
+ const index = counter.value++;
908
+ const children = (item.children ?? []).map(child => NavigationBarComponent.buildRenderItem(child, section, item, depth + 1, counter, hrefs, dark));
909
+ return {
910
+ item,
911
+ section: section.id === '__default' ? undefined : section,
912
+ parent,
913
+ index,
914
+ depth,
915
+ href,
916
+ routed: !!href && !item.href,
917
+ iconOff: svgOff || spriteStyle || imageOff ? undefined : item.icon,
918
+ iconOn: svgOn || spriteStyle || imageOn ? undefined : (item.activeIcon ?? item.icon),
919
+ svgOff,
920
+ svgOn,
921
+ imageOff,
922
+ imageOn,
923
+ spriteStyle,
924
+ badgeText: NavigationBarComponent.formatBadge(item),
925
+ hasBadge: !!item.badge,
926
+ iconOnly: false,
927
+ hasChildren: children.length > 0,
928
+ children,
929
+ ariaLabel: item.ariaLabel ?? item.label,
930
+ tooltip: item.tooltip ?? item.label,
931
+ };
932
+ }
933
+ /**
934
+ * Translates a sprite descriptor into the inline custom properties the
935
+ * stylesheet uses to size the icon and to shift `background-position` per
936
+ * interaction state.
937
+ *
938
+ * The sheet is rescaled through `background-size` instead of being drawn at
939
+ * its natural size: that is what lets a strip of 26px frames be painted at the
940
+ * 24px of the surrounding Material icons without the neighbouring frames
941
+ * bleeding into the box, and it makes the step between two frames exactly the
942
+ * rendered side.
943
+ *
944
+ * @param item - The destination whose sprite must be translated.
945
+ * @param dark - `true` when the dark theme is active, selecting the `dark` frame set.
946
+ * @returns The inline style map, or `undefined` when the destination uses no sprite.
947
+ */
948
+ static buildSpriteStyle(item, dark) {
949
+ const sprite = item.sprite;
950
+ if (!sprite)
951
+ return undefined;
952
+ // The inline indices are the light set; `dark` overrides only what differs.
953
+ const light = sprite;
954
+ const frames = dark && sprite.dark ? { ...light, ...sprite.dark } : light;
955
+ const normal = frames.normal ?? 0;
956
+ const hover = frames.hover ?? normal;
957
+ const active = frames.active ?? hover;
958
+ const disabled = frames.disabled ?? normal;
959
+ const source = sprite.size ?? SPRITE_DEFAULT_SIZE;
960
+ const size = sprite.renderSize ?? source;
961
+ const count = NavigationBarComponent.spriteFrameCount(sprite);
962
+ const vertical = (sprite.direction ?? 'vertical') === 'vertical';
963
+ return {
964
+ '--sp-url': `url("${sprite.url}")`,
965
+ '--sp-size': `${size}px`,
966
+ '--sp-sheet-x': vertical ? `${size}px` : `${size * count}px`,
967
+ '--sp-sheet-y': vertical ? `${size * count}px` : `${size}px`,
968
+ '--sp-step-x': vertical ? '0px' : `${-size}px`,
969
+ '--sp-step-y': vertical ? `${-size}px` : '0px',
970
+ '--sp-normal': `${normal}`,
971
+ '--sp-hover': `${hover}`,
972
+ '--sp-active': `${active}`,
973
+ '--sp-disabled': `${disabled}`,
974
+ };
975
+ }
976
+ /**
977
+ * Number of frames a sprite sheet holds, needed to rescale it.
978
+ * @param sprite - The sprite descriptor to measure.
979
+ * @returns The declared frame count, or the highest referenced index plus one.
980
+ */
981
+ static spriteFrameCount(sprite) {
982
+ if (sprite.frames !== undefined && sprite.frames > 0)
983
+ return sprite.frames;
984
+ const indices = [
985
+ sprite.normal, sprite.hover, sprite.active, sprite.disabled,
986
+ sprite.dark?.normal, sprite.dark?.hover, sprite.dark?.active, sprite.dark?.disabled,
987
+ ];
988
+ let highest = 0;
989
+ for (const index of indices) {
990
+ if (index !== undefined && index > highest)
991
+ highest = index;
992
+ }
993
+ return highest + 1;
994
+ }
995
+ /**
996
+ * Formats the badge content of a destination.
997
+ * @param item - The destination whose badge must be formatted.
998
+ * @returns The badge text, or an empty string for a dot badge / no badge.
999
+ */
1000
+ static formatBadge(item) {
1001
+ const badge = item.badge;
1002
+ if (!badge || badge.value === undefined)
1003
+ return '';
1004
+ if (typeof badge.value === 'number') {
1005
+ const max = badge.max ?? 999;
1006
+ return badge.value > max ? `${max}+` : `${badge.value}`;
1007
+ }
1008
+ return badge.value;
1009
+ }
1010
+ /**
1011
+ * Strips the query string and the fragment from a URL.
1012
+ * @param url - The URL to normalise.
1013
+ * @returns The path portion of the URL.
1014
+ */
1015
+ static pathOf(url) {
1016
+ const withoutFragment = url.split('#')[0] ?? '';
1017
+ return withoutFragment.split('?')[0] ?? '';
1018
+ }
1019
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: NavigationBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1020
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: NavigationBarComponent, isStandalone: true, selector: "navigation-bar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, sections: { classPropertyName: "sections", publicName: "sections", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, autoVariants: { classPropertyName: "autoVariants", publicName: "autoVariants", isSignal: true, isRequired: false, transformFunction: null }, selectedId: { classPropertyName: "selectedId", publicName: "selectedId", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, labelVisibility: { classPropertyName: "labelVisibility", publicName: "labelVisibility", isSignal: true, isRequired: false, transformFunction: null }, itemLayout: { classPropertyName: "itemLayout", publicName: "itemLayout", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, headline: { classPropertyName: "headline", publicName: "headline", isSignal: true, isRequired: false, transformFunction: null }, showMenuButton: { classPropertyName: "showMenuButton", publicName: "showMenuButton", isSignal: true, isRequired: false, transformFunction: null }, menuIcon: { classPropertyName: "menuIcon", publicName: "menuIcon", isSignal: true, isRequired: false, transformFunction: null }, expandIcon: { classPropertyName: "expandIcon", publicName: "expandIcon", isSignal: true, isRequired: false, transformFunction: null }, overflowMode: { classPropertyName: "overflowMode", publicName: "overflowMode", isSignal: true, isRequired: false, transformFunction: null }, overflowIcon: { classPropertyName: "overflowIcon", publicName: "overflowIcon", isSignal: true, isRequired: false, transformFunction: null }, overflowLabel: { classPropertyName: "overflowLabel", publicName: "overflowLabel", isSignal: true, isRequired: false, transformFunction: null }, maxVisibleItems: { classPropertyName: "maxVisibleItems", publicName: "maxVisibleItems", isSignal: true, isRequired: false, transformFunction: null }, menuAriaLabel: { classPropertyName: "menuAriaLabel", publicName: "menuAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, scrim: { classPropertyName: "scrim", publicName: "scrim", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, elevated: { classPropertyName: "elevated", publicName: "elevated", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, tooltips: { classPropertyName: "tooltips", publicName: "tooltips", isSignal: true, isRequired: false, transformFunction: null }, routerSync: { classPropertyName: "routerSync", publicName: "routerSync", isSignal: true, isRequired: false, transformFunction: null }, relativeTo: { classPropertyName: "relativeTo", publicName: "relativeTo", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedId: "selectedIdChange", expandedIds: "expandedIdsChange", open: "openChange", itemSelected: "itemSelected", menuClick: "menuClick" }, host: { properties: { "attr.data-variant": "resolvedVariant()", "attr.data-layout": "resolvedLayout()", "attr.data-align": "alignment()", "attr.data-position": "position()", "attr.data-labels": "resolvedLabelVisibility()", "attr.data-indicator": "indicatorMode()", "class.ars-navigation--open": "isOverlayOpen()", "class.ars-navigation--elevated": "elevated()", "class.ars-navigation--bordered": "bordered()", "class.ars-navigation--hidden": "isHidden()", "style.--ars-navigation-width": "widthStyle()" }, classAttribute: "ars-navigation" }, viewQueries: [{ propertyName: "itemElements", predicate: ["navItem"], descendants: true, isSignal: true }, { propertyName: "panelElements", predicate: ["panelItem"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isModal() && scrim()) {\n <div class=\"ars-nav__scrim\" aria-hidden=\"true\" (click)=\"onScrimClick()\"></div>\n}\n\n<nav class=\"ars-nav\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.role]=\"isModal() ? 'dialog' : undefined\"\n [attr.aria-modal]=\"isModal() ? 'true' : undefined\"\n [attr.inert]=\"isHidden() ? '' : undefined\"\n [cdkTrapFocus]=\"isOverlayOpen()\"\n [cdkTrapFocusAutoCapture]=\"isOverlayOpen()\"\n (keydown)=\"onKeydown($event)\">\n\n @let labels = resolvedLabelVisibility();\n @let wide = isExpanded();\n @let active = activeId();\n @let highlighted = highlightedIds();\n @let openIds = expandedSet();\n @let popupOpenId = popupItem()?.item.id;\n\n @if (showsHeader()) {\n <div class=\"ars-nav__header\">\n @if (showMenuButton()) {\n <button type=\"button\"\n class=\"ars-nav__menu\"\n [attr.aria-label]=\"menuAriaLabel()\"\n (click)=\"onMenuClick()\">\n <mat-icon aria-hidden=\"true\">{{ menuIcon() }}</mat-icon>\n </button>\n }\n @if (wide) {\n @if (headline(); as headlineText) {\n <h2 class=\"ars-nav__headline\">{{ headlineText }}</h2>\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__leading\"><ng-content select=\"[navHeader]\" /></div>\n <div class=\"ars-nav__fab\"><ng-content select=\"[navFab]\" /></div>\n\n @for (group of visibleGroups(); track group.align) {\n <div class=\"ars-nav__items\" [class.ars-nav__items--bottom]=\"group.align === 'bottom'\">\n @for (block of group.sections; track block.section.id) {\n\n @if (wide && block.section.label) {\n <h3 class=\"ars-nav__section-headline\">{{ block.section.label }}</h3>\n }\n\n @for (r of block.items; track r.item.id) {\n @let current = r.item.id === active;\n @let selected = highlighted.has(r.item.id);\n @let labelVisible = !r.iconOnly && (labels === 'labeled' || (labels === 'selected' && selected));\n @let branchOpen = r.hasChildren && openIds.has(r.item.id);\n @let svg = selected ? r.svgOn : r.svgOff;\n @let image = selected ? r.imageOn : r.imageOff;\n @let ligature = selected ? r.iconOn : r.iconOff;\n\n <!--\n The anchor and the button branches duplicate the inner markup on purpose:\n an `ng-template` + `ngTemplateOutlet` would allocate one extra embedded\n view per destination and lose the typed template context.\n -->\n @if (r.href && !r.hasChildren) {\n <a #navItem\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [attr.data-depth]=\"r.depth\"\n [attr.href]=\"r.item.disabled ? undefined : r.href\"\n [attr.target]=\"r.item.target\"\n [attr.rel]=\"r.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"current ? 'page' : undefined\"\n [attr.aria-disabled]=\"r.item.disabled ? 'true' : undefined\"\n [attr.tabindex]=\"r.item.disabled ? -1 : 0\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (r.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (image; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled' && !r.iconOnly) {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (wide && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #navItem\n type=\"button\"\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [class.ars-nav__item--parent]=\"r.hasChildren\"\n [class.ars-nav__item--icon-only]=\"r.iconOnly\"\n [attr.data-depth]=\"r.depth\"\n [disabled]=\"!!r.item.disabled\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"current ? 'page' : undefined\"\n [attr.aria-expanded]=\"r.hasChildren ? (wide ? branchOpen : popupOpenId === r.item.id) : undefined\"\n [attr.aria-haspopup]=\"r.hasChildren && !wide ? 'menu' : undefined\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (r.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (image; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled' && !r.iconOnly) {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (wide && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n @if (r.hasChildren && wide) {\n <mat-icon class=\"ars-nav__chevron\"\n [class.ars-nav__chevron--open]=\"branchOpen\"\n aria-hidden=\"true\">{{ expandIcon() }}</mat-icon>\n }\n </button>\n }\n }\n\n @if (wide && block.section.divider && !$last) {\n <hr class=\"ars-nav__divider\" aria-hidden=\"true\" />\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__footer\"><ng-content select=\"[navFooter]\" /></div>\n</nav>\n\n<!--\n One overlay for the whole component: the overflow entry and every parent\n destination of the compact variants reuse it, instead of allocating a menu\n instance per destination.\n-->\n<ng-template cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"popupOrigin()\"\n [cdkConnectedOverlayOpen]=\"isPopupOpen()\"\n [cdkConnectedOverlayPositions]=\"popupPositions()\"\n [cdkConnectedOverlayPush]=\"true\"\n (overlayOutsideClick)=\"closePopup()\"\n (detach)=\"closePopup()\">\n <div class=\"ars-nav-submenu\"\n role=\"menu\"\n [attr.aria-label]=\"popupItem()?.ariaLabel\"\n [cdkTrapFocus]=\"true\"\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onKeydown($event)\">\n @for (entry of popupEntries(); track entry.key) {\n @if (entry.render; as c) {\n @let childSelected = c.item.id === activeId();\n @let childSvg = childSelected ? c.svgOn : c.svgOff;\n @let childImage = childSelected ? c.imageOn : c.imageOff;\n @let childLigature = childSelected ? c.iconOn : c.iconOff;\n @if (c.href) {\n <a #panelItem\n class=\"ars-nav-submenu__item\"\n role=\"menuitem\"\n [class.ars-nav-submenu__item--selected]=\"childSelected\"\n [attr.href]=\"c.item.disabled ? undefined : c.href\"\n [attr.target]=\"c.item.target\"\n [attr.rel]=\"c.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-disabled]=\"c.item.disabled ? 'true' : undefined\"\n [attr.aria-current]=\"childSelected ? 'page' : undefined\"\n (click)=\"select(c, $event)\">\n @if (childSvg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (c.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (childImage; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (childLigature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n <span class=\"ars-nav-submenu__label\">{{ c.item.label }}</span>\n @if (c.badgeText) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.badgeText }}</span>\n } @else if (c.item.trailing) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #panelItem\n type=\"button\"\n class=\"ars-nav-submenu__item\"\n role=\"menuitem\"\n [class.ars-nav-submenu__item--selected]=\"childSelected\"\n [disabled]=\"!!c.item.disabled\"\n [attr.aria-current]=\"childSelected ? 'page' : undefined\"\n (click)=\"select(c, $event)\">\n @if (childSvg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (c.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (childImage; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (childLigature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n <span class=\"ars-nav-submenu__label\">{{ c.item.label }}</span>\n @if (c.badgeText) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.badgeText }}</span>\n } @else if (c.item.trailing) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.item.trailing }}</span>\n }\n </button>\n }\n } @else {\n <div class=\"ars-nav-submenu__heading\" role=\"presentation\">{{ entry.label }}</div>\n }\n }\n </div>\n</ng-template>\n", styles: [":host{--_container: var(--ars-navigation-container-color, var(--mat-sys-surface-container, #eff1ef));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));--_icon: var(--ars-navigation-icon-color, var(--mat-sys-on-surface-variant, #3f4947));--_icon-active: var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c));--_label: var(--ars-navigation-label-color, var(--mat-sys-on-surface-variant, #3f4947));--_label-active: var(--ars-navigation-active-label-color, var(--ars-color-secondary, #4a635f));--_headline: var(--ars-navigation-headline-color, var(--mat-sys-on-surface-variant, #3f4947));--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_badge: var(--ars-navigation-badge-color, var(--ars-color-error, #ff5449));--_badge-text: var(--ars-navigation-badge-text-color, #ffffff);--_divider: var(--ars-navigation-divider-color, var(--ars-color-divider, #757d87));--_scrim: var(--ars-navigation-scrim-color, rgba(0, 0, 0, .4));--_focus: var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_icon-hover-scale: var(--ars-navigation-icon-hover-scale, 1.12);--_icon-press-scale: var(--ars-navigation-icon-press-scale, .92);--_hover-opacity: .08;--_focus-opacity: .1;--_press-opacity: .1;--_rtl: 1;display:block;box-sizing:border-box;color:var(--_label);-webkit-tap-highlight-color:transparent}:host-context([dir=rtl]){--_rtl: -1}.ars-nav{box-sizing:border-box;display:flex;position:relative;background:var(--_container);color:var(--_label);overflow:hidden}.ars-nav__items{box-sizing:border-box;display:flex;min-height:0;min-width:0;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--_state) 25%,transparent) transparent}.ars-nav__header{box-sizing:border-box;display:flex;align-items:center;flex:none;gap:12px}.ars-nav__leading,.ars-nav__fab,.ars-nav__footer{box-sizing:border-box;flex:none}.ars-nav__leading:empty,.ars-nav__fab:empty,.ars-nav__footer:empty{display:none}.ars-nav__headline{margin:0;padding:0 16px;font-size:22px;line-height:28px;font-weight:400;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__section-headline{margin:0;padding:18px 16px 8px;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__divider{flex:none;margin:8px 16px;border:0;border-top:1px solid var(--_divider);opacity:.4}.ars-nav__menu{display:inline-flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--_icon);cursor:pointer;transition:background-color var(--_dur-short) var(--_easing)}.ars-nav__menu:hover{background:color-mix(in srgb,var(--_state) 8%,transparent)}.ars-nav__menu:focus-visible{outline:3px solid var(--_focus);outline-offset:2px}.ars-nav__item{box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;flex:none;margin:0;border:0;background:transparent;color:var(--_label);font:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;-webkit-tap-highlight-color:transparent}.ars-nav__item:focus-visible{outline:3px solid var(--_focus);outline-offset:-3px;border-radius:16px}.ars-nav__item--disabled,.ars-nav__item:disabled{cursor:default;opacity:.38;pointer-events:none}.ars-nav__icon-box{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;color:var(--_icon);transition:color var(--_dur) var(--_easing)}.ars-nav__icon{position:relative;z-index:1;width:24px;height:24px;font-size:24px;line-height:24px;font-variation-settings:\"FILL\" 0;transform:scale(1);transform-origin:center;transition:font-variation-settings var(--_dur, .25s) var(--_easing, cubic-bezier(.2, 0, 0, 1)),transform var(--_dur, .25s) var(--_easing, cubic-bezier(.2, 0, 0, 1))}.ars-nav__label{position:relative;z-index:1;min-width:0;font:var(--mat-sys-label-large, 500 14px/20px Roboto, sans-serif);letter-spacing:var(--mat-sys-label-large-tracking, .1px);color:var(--_label);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color var(--_dur) var(--_easing),opacity var(--_dur) var(--_easing),max-height var(--_dur) var(--_easing),margin var(--_dur) var(--_easing)}.ars-nav__label--hidden{opacity:0;max-height:0;margin:0!important;pointer-events:none}.ars-nav__trailing{position:relative;z-index:1;margin-inline-start:auto;padding-inline-start:12px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;color:var(--_label);white-space:nowrap}.ars-nav__badge{position:absolute;z-index:2;top:-6px;inset-inline-start:12px;box-sizing:border-box;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--_badge);color:var(--_badge-text);font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-align:center;white-space:nowrap}.ars-nav__badge--dot{top:-1px;inset-inline-start:16px;width:6px;min-width:6px;height:6px;padding:0;border-radius:3px}:host([data-indicator=compact]) .ars-nav__icon-box:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__icon-box:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before{opacity:1;transform:scaleX(1)}:host([data-indicator=compact]) .ars-nav__item:hover .ars-nav__icon-box:after{opacity:var(--_hover-opacity)}:host([data-indicator=compact]) .ars-nav__item:focus-visible .ars-nav__icon-box:after{opacity:var(--_focus-opacity)}:host([data-indicator=compact]) .ars-nav__item:active .ars-nav__icon-box:after{opacity:var(--_press-opacity)}:host([data-indicator=wide]) .ars-nav__item:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item--selected:before{opacity:1;transform:scaleX(1)}:host([data-indicator=wide]) .ars-nav__item:hover:after{opacity:var(--_hover-opacity)}:host([data-indicator=wide]) .ars-nav__item:focus-visible:after{opacity:var(--_focus-opacity)}:host([data-indicator=wide]) .ars-nav__item:active:after{opacity:var(--_press-opacity)}.ars-nav__item--selected .ars-nav__icon-box{color:var(--_icon-active)}.ars-nav__item--selected .ars-nav__icon{font-variation-settings:\"FILL\" 1}.ars-nav__item--selected .ars-nav__label{color:var(--_label-active)}:host([data-layout=vertical]) .ars-nav__item{flex-direction:column;justify-content:center}:host([data-layout=vertical]) .ars-nav__label{font:var(--mat-sys-label-medium, 500 12px/16px Roboto, sans-serif);letter-spacing:var(--mat-sys-label-medium-tracking, .5px);margin-top:6px;max-width:100%;text-align:center}:host([data-layout=horizontal]) .ars-nav__item{flex-direction:row;justify-content:flex-start}:host([data-layout=horizontal]) .ars-nav__label{margin-inline-start:4px}:host([data-variant=bar]){width:100%}:host([data-variant=bar]) .ars-nav{flex-direction:row;align-items:center;justify-content:space-around;width:100%;height:var(--ars-navigation-bar-height, 64px);padding:0 8px}:host([data-variant=bar]) .ars-nav__header,:host([data-variant=bar]) .ars-nav__leading,:host([data-variant=bar]) .ars-nav__fab,:host([data-variant=bar]) .ars-nav__footer,:host([data-variant=bar]) .ars-nav__section-headline,:host([data-variant=bar]) .ars-nav__divider,:host([data-variant=bar]) .ars-nav__trailing{display:none}:host([data-variant=bar]) .ars-nav__items{display:contents}:host([data-variant=bar]) .ars-nav__item{flex:1 1 0;min-width:0;height:100%}:host([data-variant=bar][data-layout=horizontal]) .ars-nav__item{justify-content:center;max-width:var(--ars-navigation-item-max-width, 168px);padding:0 12px}:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:before,:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:after{inset:12px 0}:host([data-variant=rail]){height:100%}:host([data-variant=rail]) .ars-nav{flex-direction:column;align-items:center;width:var(--ars-navigation-width, 96px);height:100%;padding:var(--ars-navigation-rail-top-padding, 20px) 0 8px}:host([data-variant=rail]) .ars-nav__header{flex-direction:column;margin-bottom:40px}:host([data-variant=rail]) .ars-nav__headline,:host([data-variant=rail]) .ars-nav__section-headline,:host([data-variant=rail]) .ars-nav__divider,:host([data-variant=rail]) .ars-nav__trailing{display:none}:host([data-variant=rail]) .ars-nav__fab{margin-bottom:40px}:host([data-variant=rail]) .ars-nav__items{flex:1 1 auto;flex-direction:column;align-items:center;gap:4px;width:100%;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail]) .ars-nav__item{justify-content:center;width:100%;height:64px;padding:0 4px}:host([data-variant=rail-expanded]),:host([data-variant=drawer]),:host([data-variant=modal]){height:100%}:host([data-variant=rail-expanded]) .ars-nav,:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{flex-direction:column;align-items:stretch;height:100%;padding:12px 0}:host([data-variant=rail-expanded]) .ars-nav__header,:host([data-variant=drawer]) .ars-nav__header,:host([data-variant=modal]) .ars-nav__header{padding:4px 8px 8px}:host([data-variant=rail-expanded]) .ars-nav__items,:host([data-variant=drawer]) .ars-nav__items,:host([data-variant=modal]) .ars-nav__items{flex:1 1 auto;flex-direction:column;gap:4px;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail-expanded]) .ars-nav__item,:host([data-variant=drawer]) .ars-nav__item,:host([data-variant=modal]) .ars-nav__item{height:56px;padding-block:0;padding-inline:calc(24px + var(--_depth-pad, 0px)) 24px;margin:0 var(--ars-navigation-item-inset, 20px)}:host([data-variant=rail-expanded]) .ars-nav__icon-box,:host([data-variant=drawer]) .ars-nav__icon-box,:host([data-variant=modal]) .ars-nav__icon-box{margin-inline-end:12px}:host([data-variant=rail-expanded]) .ars-nav__label,:host([data-variant=drawer]) .ars-nav__label,:host([data-variant=modal]) .ars-nav__label{flex:1 1 auto;margin-inline-start:0}:host([data-variant=rail-expanded]) .ars-nav{width:var(--ars-navigation-width, 220px)}:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{width:var(--ars-navigation-width, 360px)}:host([data-variant=modal]){position:fixed;inset:0;z-index:var(--ars-navigation-z-index, 1000);height:auto;pointer-events:none}:host([data-variant=modal]) .ars-nav{position:absolute;inset-block:0;inset-inline-start:0;pointer-events:auto;border-start-end-radius:16px;border-end-end-radius:16px;translate:calc(var(--_shift, 0%) * var(--_rtl)) 0;transition:translate var(--_dur-long) var(--_easing),visibility var(--_dur-long) var(--_easing)}:host([data-variant=modal][data-position=end]) .ars-nav{inset-inline-start:auto;inset-inline-end:0;border-radius:0;border-start-start-radius:16px;border-end-start-radius:16px}:host([data-variant=modal].ars-navigation--hidden) .ars-nav__scrim{opacity:0;pointer-events:none}:host([data-variant=modal].ars-navigation--hidden) .ars-nav{--_shift: -100%;visibility:hidden}:host([data-variant=modal][data-position=end].ars-navigation--hidden) .ars-nav{--_shift: 100%}.ars-nav__scrim{position:absolute;inset:0;background:var(--_scrim);opacity:1;pointer-events:auto;transition:opacity var(--_dur-long) var(--_easing)}:host(:not([data-variant=bar])) .ars-nav__items--bottom{flex:0 0 auto;margin-block-start:auto;overflow:visible}:host([data-align=center]) .ars-nav__items:not(.ars-nav__items--bottom){justify-content:safe center}:host([data-align=bottom]) .ars-nav__items:not(.ars-nav__items--bottom){justify-content:safe flex-end}:host(.ars-navigation--elevated) .ars-nav{box-shadow:0 1px 3px #0000004d,0 4px 8px 3px #00000026}:host(.ars-navigation--hidden):not([data-variant=modal]){display:none}.ars-nav__icon--image{object-fit:contain}.ars-nav__icon--sprite{display:inline-block;flex:none;width:var(--sp-size, 24px);height:var(--sp-size, 24px);background-image:var(--sp-url);background-repeat:no-repeat;background-size:var(--sp-sheet-x, auto) var(--sp-sheet-y, auto);background-position:calc(var(--sp-frame, var(--sp-normal, 0)) * var(--sp-step-x, 0px)) calc(var(--sp-frame, var(--sp-normal, 0)) * var(--sp-step-y, 0px))}.ars-nav__item:where(:hover,:focus-visible) .ars-nav__icon--sprite,.ars-nav-submenu__item:where(:hover,:focus-visible) .ars-nav__icon--sprite{--sp-frame: var(--sp-hover)}.ars-nav__item--selected .ars-nav__icon--sprite,.ars-nav-submenu__item--selected .ars-nav__icon--sprite{--sp-frame: var(--sp-active)}.ars-nav__item--disabled .ars-nav__icon--sprite,.ars-nav__item:where(:disabled) .ars-nav__icon--sprite,.ars-nav-submenu__item:where(:disabled,[aria-disabled=true]) .ars-nav__icon--sprite{--sp-frame: var(--sp-disabled)}.ars-nav__item:where(:hover,:focus-visible) .ars-nav__icon,.ars-nav-submenu__item:where(:hover,:focus-visible) .ars-nav__icon{transform:scale(var(--_icon-hover-scale, 1.12))}.ars-nav__item--selected .ars-nav__icon,.ars-nav-submenu__item--selected .ars-nav__icon{transform:scale(1)}.ars-nav__item:where(:active) .ars-nav__icon,.ars-nav-submenu__item:where(:active) .ars-nav__icon{transform:scale(var(--_icon-press-scale, .92));transition-duration:var(--_dur-short, .15s)}:host([data-variant=bar]) .ars-nav__item--icon-only{flex:0 0 auto;min-width:56px;max-width:72px}.ars-nav__chevron{position:relative;z-index:1;flex:none;margin-inline-start:8px;width:20px;height:20px;font-size:20px;line-height:20px;color:var(--_icon);rotate:0deg;transition:rotate var(--_dur) var(--_easing)}.ars-nav__chevron--open{rotate:180deg}.ars-nav__item[data-depth=\"1\"]{--_depth-pad: 24px}.ars-nav__item[data-depth=\"2\"]{--_depth-pad: 48px}.ars-nav__item[data-depth=\"3\"]{--_depth-pad: 72px}.ars-nav-submenu{--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_icon-hover-scale: var(--ars-navigation-icon-hover-scale, 1.12);--_icon-press-scale: var(--ars-navigation-icon-press-scale, .92);--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));box-sizing:border-box;display:flex;flex-direction:column;gap:2px;min-width:200px;max-width:320px;max-height:60vh;padding:8px;border-radius:12px;background:var(--ars-navigation-menu-container-color, var(--mat-sys-surface-container-high, #e7e9e8));color:var(--ars-navigation-label-color, var(--mat-sys-on-surface, #191c1b));box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026;overflow-y:auto;overscroll-behavior:contain}.ars-nav-submenu__item{box-sizing:border-box;display:flex;align-items:center;gap:12px;flex:none;min-height:48px;margin:0;padding:0 12px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:start;text-decoration:none;cursor:pointer;appearance:none}.ars-nav-submenu__item:hover{background:color-mix(in srgb,currentColor 8%,transparent)}.ars-nav-submenu__item:focus-visible{outline:3px solid var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));outline-offset:-3px}.ars-nav-submenu__item--selected{background:var(--_indicator);color:var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c))}.ars-nav-submenu__item--selected:where(:hover,:focus-visible){background:color-mix(in srgb,var(--_state) 8%,var(--_indicator))}.ars-nav-submenu__item:disabled,.ars-nav-submenu__item[aria-disabled=true]{opacity:.38;pointer-events:none}.ars-nav-submenu__heading{padding:12px 12px 4px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-transform:uppercase;opacity:.7}.ars-nav-submenu__heading:first-child{padding-top:4px}.ars-nav-submenu__label{flex:1 1 auto;min-width:0;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav-submenu__trailing{flex:none;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;opacity:.8}@media(prefers-reduced-motion:reduce){:host{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms;--_icon-hover-scale: 1;--_icon-press-scale: 1}:host([data-indicator=wide]) .ars-nav__item:before,:host([data-indicator=compact]) .ars-nav__icon-box:before{transform:none}.ars-nav-submenu{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms;--_icon-hover-scale: 1;--_icon-press-scale: 1}}@media(forced-colors:active){:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before,:host([data-indicator=wide]) .ars-nav__item--selected:before{background:Highlight;forced-color-adjust:none}.ars-nav__item:focus-visible{outline:3px solid CanvasText}}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1021
+ }
1022
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: NavigationBarComponent, decorators: [{
1023
+ type: Component,
1024
+ args: [{ selector: 'navigation-bar', standalone: true, imports: [MatIconModule, MatTooltipModule, CdkTrapFocus, CdkConnectedOverlay], changeDetection: ChangeDetectionStrategy.OnPush, host: {
1025
+ 'class': 'ars-navigation',
1026
+ '[attr.data-variant]': 'resolvedVariant()',
1027
+ '[attr.data-layout]': 'resolvedLayout()',
1028
+ '[attr.data-align]': 'alignment()',
1029
+ '[attr.data-position]': 'position()',
1030
+ '[attr.data-labels]': 'resolvedLabelVisibility()',
1031
+ '[attr.data-indicator]': 'indicatorMode()',
1032
+ '[class.ars-navigation--open]': 'isOverlayOpen()',
1033
+ '[class.ars-navigation--elevated]': 'elevated()',
1034
+ '[class.ars-navigation--bordered]': 'bordered()',
1035
+ '[class.ars-navigation--hidden]': 'isHidden()',
1036
+ '[style.--ars-navigation-width]': 'widthStyle()',
1037
+ }, template: "@if (isModal() && scrim()) {\n <div class=\"ars-nav__scrim\" aria-hidden=\"true\" (click)=\"onScrimClick()\"></div>\n}\n\n<nav class=\"ars-nav\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.role]=\"isModal() ? 'dialog' : undefined\"\n [attr.aria-modal]=\"isModal() ? 'true' : undefined\"\n [attr.inert]=\"isHidden() ? '' : undefined\"\n [cdkTrapFocus]=\"isOverlayOpen()\"\n [cdkTrapFocusAutoCapture]=\"isOverlayOpen()\"\n (keydown)=\"onKeydown($event)\">\n\n @let labels = resolvedLabelVisibility();\n @let wide = isExpanded();\n @let active = activeId();\n @let highlighted = highlightedIds();\n @let openIds = expandedSet();\n @let popupOpenId = popupItem()?.item.id;\n\n @if (showsHeader()) {\n <div class=\"ars-nav__header\">\n @if (showMenuButton()) {\n <button type=\"button\"\n class=\"ars-nav__menu\"\n [attr.aria-label]=\"menuAriaLabel()\"\n (click)=\"onMenuClick()\">\n <mat-icon aria-hidden=\"true\">{{ menuIcon() }}</mat-icon>\n </button>\n }\n @if (wide) {\n @if (headline(); as headlineText) {\n <h2 class=\"ars-nav__headline\">{{ headlineText }}</h2>\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__leading\"><ng-content select=\"[navHeader]\" /></div>\n <div class=\"ars-nav__fab\"><ng-content select=\"[navFab]\" /></div>\n\n @for (group of visibleGroups(); track group.align) {\n <div class=\"ars-nav__items\" [class.ars-nav__items--bottom]=\"group.align === 'bottom'\">\n @for (block of group.sections; track block.section.id) {\n\n @if (wide && block.section.label) {\n <h3 class=\"ars-nav__section-headline\">{{ block.section.label }}</h3>\n }\n\n @for (r of block.items; track r.item.id) {\n @let current = r.item.id === active;\n @let selected = highlighted.has(r.item.id);\n @let labelVisible = !r.iconOnly && (labels === 'labeled' || (labels === 'selected' && selected));\n @let branchOpen = r.hasChildren && openIds.has(r.item.id);\n @let svg = selected ? r.svgOn : r.svgOff;\n @let image = selected ? r.imageOn : r.imageOff;\n @let ligature = selected ? r.iconOn : r.iconOff;\n\n <!--\n The anchor and the button branches duplicate the inner markup on purpose:\n an `ng-template` + `ngTemplateOutlet` would allocate one extra embedded\n view per destination and lose the typed template context.\n -->\n @if (r.href && !r.hasChildren) {\n <a #navItem\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [attr.data-depth]=\"r.depth\"\n [attr.href]=\"r.item.disabled ? undefined : r.href\"\n [attr.target]=\"r.item.target\"\n [attr.rel]=\"r.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"current ? 'page' : undefined\"\n [attr.aria-disabled]=\"r.item.disabled ? 'true' : undefined\"\n [attr.tabindex]=\"r.item.disabled ? -1 : 0\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (r.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (image; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled' && !r.iconOnly) {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (wide && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #navItem\n type=\"button\"\n class=\"ars-nav__item\"\n [class.ars-nav__item--selected]=\"selected\"\n [class.ars-nav__item--disabled]=\"r.item.disabled\"\n [class.ars-nav__item--parent]=\"r.hasChildren\"\n [class.ars-nav__item--icon-only]=\"r.iconOnly\"\n [attr.data-depth]=\"r.depth\"\n [disabled]=\"!!r.item.disabled\"\n [attr.aria-label]=\"r.ariaLabel\"\n [attr.aria-current]=\"current ? 'page' : undefined\"\n [attr.aria-expanded]=\"r.hasChildren ? (wide ? branchOpen : popupOpenId === r.item.id) : undefined\"\n [attr.aria-haspopup]=\"r.hasChildren && !wide ? 'menu' : undefined\"\n [attr.data-nav-id]=\"r.item.id\"\n [matTooltip]=\"r.tooltip\"\n [matTooltipDisabled]=\"!tooltips() || labelVisible\"\n [matTooltipPosition]=\"tooltipPosition()\"\n (click)=\"select(r, $event)\">\n <span class=\"ars-nav__icon-box\">\n @if (svg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (r.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (image; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (ligature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n @if (r.hasBadge) {\n <span class=\"ars-nav__badge\"\n [class.ars-nav__badge--dot]=\"!r.badgeText\"\n [style.background-color]=\"r.item.badge?.color\"\n [attr.aria-label]=\"r.item.badge?.ariaLabel\">{{ r.badgeText }}</span>\n }\n </span>\n @if (labels !== 'unlabeled' && !r.iconOnly) {\n <span class=\"ars-nav__label\" [class.ars-nav__label--hidden]=\"!labelVisible\">{{ r.item.label }}</span>\n }\n @if (wide && r.item.trailing) {\n <span class=\"ars-nav__trailing\">{{ r.item.trailing }}</span>\n }\n @if (r.hasChildren && wide) {\n <mat-icon class=\"ars-nav__chevron\"\n [class.ars-nav__chevron--open]=\"branchOpen\"\n aria-hidden=\"true\">{{ expandIcon() }}</mat-icon>\n }\n </button>\n }\n }\n\n @if (wide && block.section.divider && !$last) {\n <hr class=\"ars-nav__divider\" aria-hidden=\"true\" />\n }\n }\n </div>\n }\n\n <div class=\"ars-nav__footer\"><ng-content select=\"[navFooter]\" /></div>\n</nav>\n\n<!--\n One overlay for the whole component: the overflow entry and every parent\n destination of the compact variants reuse it, instead of allocating a menu\n instance per destination.\n-->\n<ng-template cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"popupOrigin()\"\n [cdkConnectedOverlayOpen]=\"isPopupOpen()\"\n [cdkConnectedOverlayPositions]=\"popupPositions()\"\n [cdkConnectedOverlayPush]=\"true\"\n (overlayOutsideClick)=\"closePopup()\"\n (detach)=\"closePopup()\">\n <div class=\"ars-nav-submenu\"\n role=\"menu\"\n [attr.aria-label]=\"popupItem()?.ariaLabel\"\n [cdkTrapFocus]=\"true\"\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onKeydown($event)\">\n @for (entry of popupEntries(); track entry.key) {\n @if (entry.render; as c) {\n @let childSelected = c.item.id === activeId();\n @let childSvg = childSelected ? c.svgOn : c.svgOff;\n @let childImage = childSelected ? c.imageOn : c.imageOff;\n @let childLigature = childSelected ? c.iconOn : c.iconOff;\n @if (c.href) {\n <a #panelItem\n class=\"ars-nav-submenu__item\"\n role=\"menuitem\"\n [class.ars-nav-submenu__item--selected]=\"childSelected\"\n [attr.href]=\"c.item.disabled ? undefined : c.href\"\n [attr.target]=\"c.item.target\"\n [attr.rel]=\"c.item.target === '_blank' ? 'noopener noreferrer' : undefined\"\n [attr.aria-disabled]=\"c.item.disabled ? 'true' : undefined\"\n [attr.aria-current]=\"childSelected ? 'page' : undefined\"\n (click)=\"select(c, $event)\">\n @if (childSvg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (c.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (childImage; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (childLigature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n <span class=\"ars-nav-submenu__label\">{{ c.item.label }}</span>\n @if (c.badgeText) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.badgeText }}</span>\n } @else if (c.item.trailing) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.item.trailing }}</span>\n }\n </a>\n } @else {\n <button #panelItem\n type=\"button\"\n class=\"ars-nav-submenu__item\"\n role=\"menuitem\"\n [class.ars-nav-submenu__item--selected]=\"childSelected\"\n [disabled]=\"!!c.item.disabled\"\n [attr.aria-current]=\"childSelected ? 'page' : undefined\"\n (click)=\"select(c, $event)\">\n @if (childSvg; as svgName) {\n <mat-icon class=\"ars-nav__icon\" [svgIcon]=\"svgName\" aria-hidden=\"true\" />\n } @else if (c.spriteStyle; as spriteStyle) {\n <span class=\"ars-nav__icon ars-nav__icon--sprite\" [style]=\"spriteStyle\" aria-hidden=\"true\"></span>\n } @else if (childImage; as imageUrl) {\n <img class=\"ars-nav__icon ars-nav__icon--image\" [src]=\"imageUrl\" alt=\"\" loading=\"lazy\" decoding=\"async\" />\n } @else if (childLigature; as ligatureName) {\n <mat-icon class=\"ars-nav__icon\" aria-hidden=\"true\">{{ ligatureName }}</mat-icon>\n }\n <span class=\"ars-nav-submenu__label\">{{ c.item.label }}</span>\n @if (c.badgeText) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.badgeText }}</span>\n } @else if (c.item.trailing) {\n <span class=\"ars-nav-submenu__trailing\">{{ c.item.trailing }}</span>\n }\n </button>\n }\n } @else {\n <div class=\"ars-nav-submenu__heading\" role=\"presentation\">{{ entry.label }}</div>\n }\n }\n </div>\n</ng-template>\n", styles: [":host{--_container: var(--ars-navigation-container-color, var(--mat-sys-surface-container, #eff1ef));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));--_icon: var(--ars-navigation-icon-color, var(--mat-sys-on-surface-variant, #3f4947));--_icon-active: var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c));--_label: var(--ars-navigation-label-color, var(--mat-sys-on-surface-variant, #3f4947));--_label-active: var(--ars-navigation-active-label-color, var(--ars-color-secondary, #4a635f));--_headline: var(--ars-navigation-headline-color, var(--mat-sys-on-surface-variant, #3f4947));--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_badge: var(--ars-navigation-badge-color, var(--ars-color-error, #ff5449));--_badge-text: var(--ars-navigation-badge-text-color, #ffffff);--_divider: var(--ars-navigation-divider-color, var(--ars-color-divider, #757d87));--_scrim: var(--ars-navigation-scrim-color, rgba(0, 0, 0, .4));--_focus: var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_icon-hover-scale: var(--ars-navigation-icon-hover-scale, 1.12);--_icon-press-scale: var(--ars-navigation-icon-press-scale, .92);--_hover-opacity: .08;--_focus-opacity: .1;--_press-opacity: .1;--_rtl: 1;display:block;box-sizing:border-box;color:var(--_label);-webkit-tap-highlight-color:transparent}:host-context([dir=rtl]){--_rtl: -1}.ars-nav{box-sizing:border-box;display:flex;position:relative;background:var(--_container);color:var(--_label);overflow:hidden}.ars-nav__items{box-sizing:border-box;display:flex;min-height:0;min-width:0;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--_state) 25%,transparent) transparent}.ars-nav__header{box-sizing:border-box;display:flex;align-items:center;flex:none;gap:12px}.ars-nav__leading,.ars-nav__fab,.ars-nav__footer{box-sizing:border-box;flex:none}.ars-nav__leading:empty,.ars-nav__fab:empty,.ars-nav__footer:empty{display:none}.ars-nav__headline{margin:0;padding:0 16px;font-size:22px;line-height:28px;font-weight:400;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__section-headline{margin:0;padding:18px 16px 8px;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;color:var(--_headline);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav__divider{flex:none;margin:8px 16px;border:0;border-top:1px solid var(--_divider);opacity:.4}.ars-nav__menu{display:inline-flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--_icon);cursor:pointer;transition:background-color var(--_dur-short) var(--_easing)}.ars-nav__menu:hover{background:color-mix(in srgb,var(--_state) 8%,transparent)}.ars-nav__menu:focus-visible{outline:3px solid var(--_focus);outline-offset:2px}.ars-nav__item{box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;flex:none;margin:0;border:0;background:transparent;color:var(--_label);font:inherit;text-align:start;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;-webkit-tap-highlight-color:transparent}.ars-nav__item:focus-visible{outline:3px solid var(--_focus);outline-offset:-3px;border-radius:16px}.ars-nav__item--disabled,.ars-nav__item:disabled{cursor:default;opacity:.38;pointer-events:none}.ars-nav__icon-box{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;color:var(--_icon);transition:color var(--_dur) var(--_easing)}.ars-nav__icon{position:relative;z-index:1;width:24px;height:24px;font-size:24px;line-height:24px;font-variation-settings:\"FILL\" 0;transform:scale(1);transform-origin:center;transition:font-variation-settings var(--_dur, .25s) var(--_easing, cubic-bezier(.2, 0, 0, 1)),transform var(--_dur, .25s) var(--_easing, cubic-bezier(.2, 0, 0, 1))}.ars-nav__label{position:relative;z-index:1;min-width:0;font:var(--mat-sys-label-large, 500 14px/20px Roboto, sans-serif);letter-spacing:var(--mat-sys-label-large-tracking, .1px);color:var(--_label);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color var(--_dur) var(--_easing),opacity var(--_dur) var(--_easing),max-height var(--_dur) var(--_easing),margin var(--_dur) var(--_easing)}.ars-nav__label--hidden{opacity:0;max-height:0;margin:0!important;pointer-events:none}.ars-nav__trailing{position:relative;z-index:1;margin-inline-start:auto;padding-inline-start:12px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;color:var(--_label);white-space:nowrap}.ars-nav__badge{position:absolute;z-index:2;top:-6px;inset-inline-start:12px;box-sizing:border-box;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--_badge);color:var(--_badge-text);font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-align:center;white-space:nowrap}.ars-nav__badge--dot{top:-1px;inset-inline-start:16px;width:6px;min-width:6px;height:6px;padding:0;border-radius:3px}:host([data-indicator=compact]) .ars-nav__icon-box:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__icon-box:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:50% auto auto 50%;width:56px;height:32px;margin:-16px 0 0 -28px;border-radius:16px}:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before{opacity:1;transform:scaleX(1)}:host([data-indicator=compact]) .ars-nav__item:hover .ars-nav__icon-box:after{opacity:var(--_hover-opacity)}:host([data-indicator=compact]) .ars-nav__item:focus-visible .ars-nav__icon-box:after{opacity:var(--_focus-opacity)}:host([data-indicator=compact]) .ars-nav__item:active .ars-nav__icon-box:after{opacity:var(--_press-opacity)}:host([data-indicator=wide]) .ars-nav__item:before{content:\"\";position:absolute;z-index:0;background:var(--_indicator);opacity:0;transform:scaleX(.55);transition:opacity var(--_dur) var(--_easing),transform var(--_dur-long) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item:after{content:\"\";position:absolute;z-index:0;background:var(--_state);opacity:0;transition:opacity var(--_dur-short) var(--_easing);pointer-events:none;inset:0;border-radius:28px}:host([data-indicator=wide]) .ars-nav__item--selected:before{opacity:1;transform:scaleX(1)}:host([data-indicator=wide]) .ars-nav__item:hover:after{opacity:var(--_hover-opacity)}:host([data-indicator=wide]) .ars-nav__item:focus-visible:after{opacity:var(--_focus-opacity)}:host([data-indicator=wide]) .ars-nav__item:active:after{opacity:var(--_press-opacity)}.ars-nav__item--selected .ars-nav__icon-box{color:var(--_icon-active)}.ars-nav__item--selected .ars-nav__icon{font-variation-settings:\"FILL\" 1}.ars-nav__item--selected .ars-nav__label{color:var(--_label-active)}:host([data-layout=vertical]) .ars-nav__item{flex-direction:column;justify-content:center}:host([data-layout=vertical]) .ars-nav__label{font:var(--mat-sys-label-medium, 500 12px/16px Roboto, sans-serif);letter-spacing:var(--mat-sys-label-medium-tracking, .5px);margin-top:6px;max-width:100%;text-align:center}:host([data-layout=horizontal]) .ars-nav__item{flex-direction:row;justify-content:flex-start}:host([data-layout=horizontal]) .ars-nav__label{margin-inline-start:4px}:host([data-variant=bar]){width:100%}:host([data-variant=bar]) .ars-nav{flex-direction:row;align-items:center;justify-content:space-around;width:100%;height:var(--ars-navigation-bar-height, 64px);padding:0 8px}:host([data-variant=bar]) .ars-nav__header,:host([data-variant=bar]) .ars-nav__leading,:host([data-variant=bar]) .ars-nav__fab,:host([data-variant=bar]) .ars-nav__footer,:host([data-variant=bar]) .ars-nav__section-headline,:host([data-variant=bar]) .ars-nav__divider,:host([data-variant=bar]) .ars-nav__trailing{display:none}:host([data-variant=bar]) .ars-nav__items{display:contents}:host([data-variant=bar]) .ars-nav__item{flex:1 1 0;min-width:0;height:100%}:host([data-variant=bar][data-layout=horizontal]) .ars-nav__item{justify-content:center;max-width:var(--ars-navigation-item-max-width, 168px);padding:0 12px}:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:before,:host([data-variant=bar][data-indicator=wide]) .ars-nav__item:after{inset:12px 0}:host([data-variant=rail]){height:100%}:host([data-variant=rail]) .ars-nav{flex-direction:column;align-items:center;width:var(--ars-navigation-width, 96px);height:100%;padding:var(--ars-navigation-rail-top-padding, 20px) 0 8px}:host([data-variant=rail]) .ars-nav__header{flex-direction:column;margin-bottom:40px}:host([data-variant=rail]) .ars-nav__headline,:host([data-variant=rail]) .ars-nav__section-headline,:host([data-variant=rail]) .ars-nav__divider,:host([data-variant=rail]) .ars-nav__trailing{display:none}:host([data-variant=rail]) .ars-nav__fab{margin-bottom:40px}:host([data-variant=rail]) .ars-nav__items{flex:1 1 auto;flex-direction:column;align-items:center;gap:4px;width:100%;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail]) .ars-nav__item{justify-content:center;width:100%;height:64px;padding:0 4px}:host([data-variant=rail-expanded]),:host([data-variant=drawer]),:host([data-variant=modal]){height:100%}:host([data-variant=rail-expanded]) .ars-nav,:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{flex-direction:column;align-items:stretch;height:100%;padding:12px 0}:host([data-variant=rail-expanded]) .ars-nav__header,:host([data-variant=drawer]) .ars-nav__header,:host([data-variant=modal]) .ars-nav__header{padding:4px 8px 8px}:host([data-variant=rail-expanded]) .ars-nav__items,:host([data-variant=drawer]) .ars-nav__items,:host([data-variant=modal]) .ars-nav__items{flex:1 1 auto;flex-direction:column;gap:4px;overflow-y:auto;overscroll-behavior:contain}:host([data-variant=rail-expanded]) .ars-nav__item,:host([data-variant=drawer]) .ars-nav__item,:host([data-variant=modal]) .ars-nav__item{height:56px;padding-block:0;padding-inline:calc(24px + var(--_depth-pad, 0px)) 24px;margin:0 var(--ars-navigation-item-inset, 20px)}:host([data-variant=rail-expanded]) .ars-nav__icon-box,:host([data-variant=drawer]) .ars-nav__icon-box,:host([data-variant=modal]) .ars-nav__icon-box{margin-inline-end:12px}:host([data-variant=rail-expanded]) .ars-nav__label,:host([data-variant=drawer]) .ars-nav__label,:host([data-variant=modal]) .ars-nav__label{flex:1 1 auto;margin-inline-start:0}:host([data-variant=rail-expanded]) .ars-nav{width:var(--ars-navigation-width, 220px)}:host([data-variant=drawer]) .ars-nav,:host([data-variant=modal]) .ars-nav{width:var(--ars-navigation-width, 360px)}:host([data-variant=modal]){position:fixed;inset:0;z-index:var(--ars-navigation-z-index, 1000);height:auto;pointer-events:none}:host([data-variant=modal]) .ars-nav{position:absolute;inset-block:0;inset-inline-start:0;pointer-events:auto;border-start-end-radius:16px;border-end-end-radius:16px;translate:calc(var(--_shift, 0%) * var(--_rtl)) 0;transition:translate var(--_dur-long) var(--_easing),visibility var(--_dur-long) var(--_easing)}:host([data-variant=modal][data-position=end]) .ars-nav{inset-inline-start:auto;inset-inline-end:0;border-radius:0;border-start-start-radius:16px;border-end-start-radius:16px}:host([data-variant=modal].ars-navigation--hidden) .ars-nav__scrim{opacity:0;pointer-events:none}:host([data-variant=modal].ars-navigation--hidden) .ars-nav{--_shift: -100%;visibility:hidden}:host([data-variant=modal][data-position=end].ars-navigation--hidden) .ars-nav{--_shift: 100%}.ars-nav__scrim{position:absolute;inset:0;background:var(--_scrim);opacity:1;pointer-events:auto;transition:opacity var(--_dur-long) var(--_easing)}:host(:not([data-variant=bar])) .ars-nav__items--bottom{flex:0 0 auto;margin-block-start:auto;overflow:visible}:host([data-align=center]) .ars-nav__items:not(.ars-nav__items--bottom){justify-content:safe center}:host([data-align=bottom]) .ars-nav__items:not(.ars-nav__items--bottom){justify-content:safe flex-end}:host(.ars-navigation--elevated) .ars-nav{box-shadow:0 1px 3px #0000004d,0 4px 8px 3px #00000026}:host(.ars-navigation--hidden):not([data-variant=modal]){display:none}.ars-nav__icon--image{object-fit:contain}.ars-nav__icon--sprite{display:inline-block;flex:none;width:var(--sp-size, 24px);height:var(--sp-size, 24px);background-image:var(--sp-url);background-repeat:no-repeat;background-size:var(--sp-sheet-x, auto) var(--sp-sheet-y, auto);background-position:calc(var(--sp-frame, var(--sp-normal, 0)) * var(--sp-step-x, 0px)) calc(var(--sp-frame, var(--sp-normal, 0)) * var(--sp-step-y, 0px))}.ars-nav__item:where(:hover,:focus-visible) .ars-nav__icon--sprite,.ars-nav-submenu__item:where(:hover,:focus-visible) .ars-nav__icon--sprite{--sp-frame: var(--sp-hover)}.ars-nav__item--selected .ars-nav__icon--sprite,.ars-nav-submenu__item--selected .ars-nav__icon--sprite{--sp-frame: var(--sp-active)}.ars-nav__item--disabled .ars-nav__icon--sprite,.ars-nav__item:where(:disabled) .ars-nav__icon--sprite,.ars-nav-submenu__item:where(:disabled,[aria-disabled=true]) .ars-nav__icon--sprite{--sp-frame: var(--sp-disabled)}.ars-nav__item:where(:hover,:focus-visible) .ars-nav__icon,.ars-nav-submenu__item:where(:hover,:focus-visible) .ars-nav__icon{transform:scale(var(--_icon-hover-scale, 1.12))}.ars-nav__item--selected .ars-nav__icon,.ars-nav-submenu__item--selected .ars-nav__icon{transform:scale(1)}.ars-nav__item:where(:active) .ars-nav__icon,.ars-nav-submenu__item:where(:active) .ars-nav__icon{transform:scale(var(--_icon-press-scale, .92));transition-duration:var(--_dur-short, .15s)}:host([data-variant=bar]) .ars-nav__item--icon-only{flex:0 0 auto;min-width:56px;max-width:72px}.ars-nav__chevron{position:relative;z-index:1;flex:none;margin-inline-start:8px;width:20px;height:20px;font-size:20px;line-height:20px;color:var(--_icon);rotate:0deg;transition:rotate var(--_dur) var(--_easing)}.ars-nav__chevron--open{rotate:180deg}.ars-nav__item[data-depth=\"1\"]{--_depth-pad: 24px}.ars-nav__item[data-depth=\"2\"]{--_depth-pad: 48px}.ars-nav__item[data-depth=\"3\"]{--_depth-pad: 72px}.ars-nav-submenu{--_easing: var(--ars-navigation-easing, cubic-bezier(.2, 0, 0, 1));--_dur-short: var(--ars-navigation-duration-short, .15s);--_dur: var(--ars-navigation-duration, .25s);--_dur-long: var(--ars-navigation-duration-long, .4s);--_icon-hover-scale: var(--ars-navigation-icon-hover-scale, 1.12);--_icon-press-scale: var(--ars-navigation-icon-press-scale, .92);--_state: var(--ars-navigation-state-layer-color, var(--mat-sys-on-surface, #191c1b));--_indicator: var(--ars-navigation-indicator-color, var(--mat-sys-secondary-container, #cce8e2));box-sizing:border-box;display:flex;flex-direction:column;gap:2px;min-width:200px;max-width:320px;max-height:60vh;padding:8px;border-radius:12px;background:var(--ars-navigation-menu-container-color, var(--mat-sys-surface-container-high, #e7e9e8));color:var(--ars-navigation-label-color, var(--mat-sys-on-surface, #191c1b));box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026;overflow-y:auto;overscroll-behavior:contain}.ars-nav-submenu__item{box-sizing:border-box;display:flex;align-items:center;gap:12px;flex:none;min-height:48px;margin:0;padding:0 12px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:start;text-decoration:none;cursor:pointer;appearance:none}.ars-nav-submenu__item:hover{background:color-mix(in srgb,currentColor 8%,transparent)}.ars-nav-submenu__item:focus-visible{outline:3px solid var(--ars-navigation-focus-color, var(--ars-color-primary, #00a293));outline-offset:-3px}.ars-nav-submenu__item--selected{background:var(--_indicator);color:var(--ars-navigation-active-icon-color, var(--mat-sys-on-secondary-container, #0b1f1c))}.ars-nav-submenu__item--selected:where(:hover,:focus-visible){background:color-mix(in srgb,var(--_state) 8%,var(--_indicator))}.ars-nav-submenu__item:disabled,.ars-nav-submenu__item[aria-disabled=true]{opacity:.38;pointer-events:none}.ars-nav-submenu__heading{padding:12px 12px 4px;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;text-transform:uppercase;opacity:.7}.ars-nav-submenu__heading:first-child{padding-top:4px}.ars-nav-submenu__label{flex:1 1 auto;min-width:0;font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ars-nav-submenu__trailing{flex:none;font-size:11px;line-height:16px;font-weight:500;letter-spacing:.5px;opacity:.8}@media(prefers-reduced-motion:reduce){:host{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms;--_icon-hover-scale: 1;--_icon-press-scale: 1}:host([data-indicator=wide]) .ars-nav__item:before,:host([data-indicator=compact]) .ars-nav__icon-box:before{transform:none}.ars-nav-submenu{--_dur-short: 0ms;--_dur: 0ms;--_dur-long: 0ms;--_icon-hover-scale: 1;--_icon-press-scale: 1}}@media(forced-colors:active){:host([data-indicator=compact]) .ars-nav__item--selected .ars-nav__icon-box:before,:host([data-indicator=wide]) .ars-nav__item--selected:before{background:Highlight;forced-color-adjust:none}.ars-nav__item:focus-visible{outline:3px solid CanvasText}}\n"] }]
1038
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], sections: [{ type: i0.Input, args: [{ isSignal: true, alias: "sections", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], autoVariants: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoVariants", required: false }] }], selectedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedId", required: false }] }, { type: i0.Output, args: ["selectedIdChange"] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], labelVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVisibility", required: false }] }], itemLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemLayout", required: false }] }], alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], headline: [{ type: i0.Input, args: [{ isSignal: true, alias: "headline", required: false }] }], showMenuButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMenuButton", required: false }] }], menuIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuIcon", required: false }] }], expandIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandIcon", required: false }] }], overflowMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowMode", required: false }] }], overflowIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowIcon", required: false }] }], overflowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowLabel", required: false }] }], maxVisibleItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisibleItems", required: false }] }], menuAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuAriaLabel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], scrim: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrim", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], elevated: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevated", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], tooltips: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltips", required: false }] }], routerSync: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerSync", required: false }] }], relativeTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "relativeTo", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }], menuClick: [{ type: i0.Output, args: ["menuClick"] }], itemElements: [{ type: i0.ViewChildren, args: ['navItem', { isSignal: true }] }], panelElements: [{ type: i0.ViewChildren, args: ['panelItem', { isSignal: true }] }] } });
1039
+
1040
+ /*
1041
+ * Public API Surface of @arsedizioni/ars-utils/ui.navigation
1042
+ */
1043
+
1044
+ /**
1045
+ * Generated bundle index. Do not edit.
1046
+ */
1047
+
1048
+ export { DEFAULT_NAVIGATION_AUTO_VARIANTS, EXPANDED_NAVIGATION_VARIANTS, NAVIGATION_OVERFLOW_ID, NavigationBarComponent };
1049
+ //# sourceMappingURL=arsedizioni-ars-utils-ui.navigation.mjs.map