{"version":3,"file":"fold-ng.mjs","sources":["../../src/a11y/focus-trap.directive.ts","../../src/a11y/id.service.ts","../../src/a11y/scroll-region-registry.service.ts","../../src/dom/observe-element-width.ts","../../src/directives/surface.directive.ts","../../src/components/layout/app-shell/app-shell.component.ts","../../src/components/layout/app-shell/app-shell.component.html","../../src/color/palettes.ts","../../src/color/palette-registry.service.ts","../../src/color/contrast.ts","../../src/components/content/avatar/avatar.component.ts","../../src/components/content/avatar/avatar.component.html","../../src/components/content/avatar-detail/avatar-detail.component.ts","../../src/components/content/avatar-detail/avatar-detail.component.html","../../src/components/content/avatar-list/avatar-list.component.ts","../../src/components/content/avatar-list/avatar-list.component.html","../../src/components/content/badge/badge.component.ts","../../src/components/content/badge/badge.component.html","../../src/components/foundations/icon/icons/ui.icons.ts","../../src/components/foundations/icon/icons/nav.icons.ts","../../src/components/foundations/icon/icons/commerce.icons.ts","../../src/components/foundations/icon/icons/music.icons.ts","../../src/components/foundations/icon/icons/status.icons.ts","../../src/components/foundations/icon/icons/people.icons.ts","../../src/components/foundations/icon/icons/brands.icons.ts","../../src/components/foundations/icon/builtin-icons.ts","../../src/components/foundations/icon/icon-safety.ts","../../src/components/foundations/icon/icon-registry.service.ts","../../src/components/foundations/icon/icon-sprite.ts","../../src/components/foundations/icon/icon-sprite.service.ts","../../src/components/foundations/icon/icon.component.ts","../../src/components/foundations/icon/icon.component.html","../../src/tokens/tokens.catalog.ts","../../src/components/foundations/spinner/spinner.component.ts","../../src/components/foundations/spinner/spinner.component.html","../../src/components/actions/button/button.component.ts","../../src/components/actions/button/button.component.html","../../src/components/actions/button-icon/button-icon.component.ts","../../src/components/actions/button-icon/button-icon.component.html","../../src/components/forms/common-labels.ts","../../src/components/overlays/popover/placement.ts","../../src/components/overlays/popover/auto-update.ts","../../src/components/overlays/popover/popover.component.ts","../../src/components/overlays/popover/popover.component.html","../../src/components/overlays/popover/popover-trigger.directive.ts","../../src/components/overlays/info/info.component.ts","../../src/components/overlays/info/info.component.html","../../src/components/forms/input/label.component.ts","../../src/components/forms/input/input-base.component.ts","../../src/components/forms/input/input-base.component.html","../../src/components/forms/input/input-value.ts","../../src/components/forms/input/input.component.ts","../../src/components/forms/input/input.component.html","../../src/components/actions/inline-confirm/inline-confirm-labels.ts","../../src/components/actions/inline-confirm/inline-confirm.component.ts","../../src/components/actions/inline-confirm/inline-confirm.component.html","../../src/components/actions/danger-zone/danger-zone.component.ts","../../src/components/actions/danger-zone/danger-zone.component.html","../../src/components/actions/toggle-icon/toggle-icon.component.ts","../../src/components/actions/toggle-icon/toggle-icon.component.html","../../src/components/content/card/card.component.ts","../../src/components/content/card/card.component.html","../../src/components/content/element-title/element-title.component.ts","../../src/components/content/element-title/element-title.component.html","../../src/components/content/context-card/context-card.component.ts","../../src/components/content/context-card/context-card.component.html","../../src/a11y/field-id.directive.ts","../../src/components/forms/file-dropzone/file-dropzone.component.ts","../../src/components/forms/file-dropzone/file-dropzone.component.html","../../src/components/content/field/field-list.component.ts","../../src/components/content/field/field-list.component.html","../../src/components/content/field/field.component.ts","../../src/components/content/field/field.component.html","../../src/components/actions/link/link.component.ts","../../src/components/actions/link/link.component.html","../../src/components/navigation/menu/menu.component.ts","../../src/components/navigation/menu/menu.component.html","../../src/components/navigation/menu/menu-item.component.ts","../../src/components/navigation/menu/menu-item.component.html","../../src/components/navigation/menu/menu-separator.component.ts","../../src/components/navigation/menu/menu-separator.component.html","../../src/components/navigation/menu/menu-section.component.ts","../../src/components/navigation/menu/menu-section.component.html","../../src/a11y/scroll-lock.service.ts","../../src/components/navigation/nav-launcher/nav-launcher.tokens.ts","../../src/components/navigation/nav-launcher/nav-tile.component.ts","../../src/components/navigation/nav-launcher/nav-tile.component.html","../../src/components/navigation/nav-launcher/nav-group.component.ts","../../src/components/navigation/nav-launcher/nav-group.component.html","../../src/components/navigation/nav-launcher/nav-wave.ts","../../src/components/navigation/nav-launcher/nav-launcher.component.ts","../../src/components/navigation/nav-launcher/nav-launcher.component.html","../../src/components/content/hero-card/hero-card.component.ts","../../src/components/content/hero-card/hero-card.component.html","../../src/components/content/data-table/data-table-cell.directive.ts","../../src/components/content/data-table/data-table-row-card.directive.ts","../../src/components/content/data-table/data-table-row-detail.directive.ts","../../src/components/content/data-table/data-table-row-note.directive.ts","../../src/components/content/data-table/data-table-keyboard.ts","../../src/dom/fold-at.ts","../../src/components/forms/checkbox/checkbox.component.ts","../../src/components/forms/checkbox/checkbox.component.html","../../src/components/content/data-table/data-table-labels.ts","../../src/components/content/data-table/data-table.component.ts","../../src/components/content/data-table/data-table.component.html","../../src/directives/sticky-column.directive.ts","../../src/components/content/calendar/core/event.directive.ts","../../src/components/content/calendar/core/date.ts","../../src/components/content/calendar/core/time.ts","../../src/components/content/calendar/core/format.ts","../../src/components/content/calendar/core/labels.ts","../../src/components/content/calendar/core/locale.ts","../../src/components/content/calendar/core/chrome.directive.ts","../../src/components/content/calendar/core/keyboard.ts","../../src/components/content/calendar/core/roving-focus.ts","../../src/components/content/calendar/core/cell.ts","../../src/components/content/calendar/core/row-pack.ts","../../src/components/content/calendar/core/span.ts","../../src/components/content/calendar/core/month-grid.ts","../../src/components/content/calendar/core/slots.directive.ts","../../src/components/content/calendar/month/month.component.ts","../../src/components/content/calendar/month/month.component.html","../../src/components/content/calendar/core/filters.ts","../../src/components/content/calendar/core/columns.ts","../../src/components/content/calendar/week/week.component.ts","../../src/components/content/calendar/week/week.component.html","../../src/components/content/calendar/day/day.component.ts","../../src/components/content/calendar/day/day.component.html","../../src/components/content/calendar/list/list.component.ts","../../src/components/content/calendar/list/list.component.html","../../src/components/content/calendar/core/overlap.ts","../../src/components/content/calendar/core/timegrid.ts","../../src/components/content/calendar/timegrid/timegrid.component.ts","../../src/components/content/calendar/timegrid/timegrid.component.html","../../src/components/content/choice-row/choice-row.component.ts","../../src/components/content/choice-row/choice-row.component.html","../../src/directives/repeat-press.directive.ts","../../src/directives/elevated.directive.ts","../../src/directives/scroll-region.directive.ts","../../src/components/forms/input/number-settle.ts","../../src/components/forms/input/number-input.component.ts","../../src/components/forms/input/number-input.component.html","../../src/components/forms/input/textarea.component.ts","../../src/components/forms/input/textarea.component.html","../../src/components/forms/input/date.component.ts","../../src/components/forms/input/date.component.html","../../src/components/forms/input/time.component.ts","../../src/components/forms/input/time.component.html","../../src/components/forms/input/search.component.ts","../../src/components/forms/input/search.component.html","../../src/components/forms/input/select.component.ts","../../src/components/forms/input/select.component.html","../../src/components/forms/listbox/listbox-owner.ts","../../src/components/forms/listbox/option.component.ts","../../src/components/forms/listbox/optgroup.component.ts","../../src/components/forms/listbox/select-option.ts","../../src/components/forms/listbox/listbox-nav.ts","../../src/components/forms/listbox/listbox.component.ts","../../src/components/forms/listbox/listbox.component.html","../../src/components/forms/listbox/multiselect.component.ts","../../src/components/forms/listbox/multiselect.component.html","../../src/components/forms/password/password-rules.ts","../../src/components/forms/password/password-field.component.ts","../../src/components/forms/password/password-field.component.html","../../src/components/forms/view-toggle/view-toggle.component.ts","../../src/components/forms/view-toggle/view-toggle.component.html","../../src/components/forms/fieldset/fieldset.component.ts","../../src/components/forms/fieldset/fieldset.component.html","../../src/components/forms/slider/slider.component.ts","../../src/components/forms/slider/slider.component.html","../../src/components/forms/slider/range-slider.component.ts","../../src/components/forms/slider/range-slider.component.html","../../src/components/feedback/checklist/checklist.component.ts","../../src/components/feedback/checklist/checklist.component.html","../../src/components/feedback/meter/meter.component.ts","../../src/components/feedback/meter/meter.component.html","../../src/components/feedback/callout/callout.component.ts","../../src/components/feedback/callout/callout.component.html","../../src/components/feedback/disclosure/disclosure.component.ts","../../src/components/feedback/disclosure/disclosure.component.html","../../src/components/content/status-badge/status-badge.component.ts","../../src/components/content/status-badge/status-badge.component.html","../../src/components/content/timeline/timeline.component.ts","../../src/components/content/timeline/timeline.component.html","../../src/components/feedback/state/loading-state.component.ts","../../src/components/feedback/state/loading-state.component.html","../../src/components/feedback/state/empty-state.component.ts","../../src/components/feedback/state/empty-state.component.html","../../src/components/layout/aside-layout/aside-layout.component.ts","../../src/components/layout/aside-layout/aside-layout.component.html","../../src/components/layout/breakpoints.ts","../../src/components/layout/nav-layout/nav-layout.context.ts","../../src/components/layout/nav-layout/nav-layout.component.ts","../../src/components/layout/nav-layout/nav-layout.component.html","../../src/components/layout/page-layout/page-layout.component.ts","../../src/components/layout/page-layout/page-layout.component.html","../../src/components/layout/page-section/page-section.component.ts","../../src/components/layout/page-section/page-section.component.html","../../src/components/layout/hero-section/hero-section.component.ts","../../src/components/layout/hero-section/hero-section.component.html","../../src/components/content/paginator/paginator-labels.ts","../../src/components/content/paginator/paginator.component.ts","../../src/components/content/paginator/paginator.component.html","../../src/components/navigation/tab-tooltip.directive.ts","../../src/components/navigation/view-nav/view-nav.component.ts","../../src/components/navigation/view-nav/view-nav.component.html","../../src/components/navigation/breadcrumb/breadcrumb.component.ts","../../src/components/navigation/breadcrumb/breadcrumb.component.html","../../src/components/navigation/back-link/back-link.component.ts","../../src/components/navigation/back-link/back-link.component.html","../../src/components/navigation/tabs/tabs.component.ts","../../src/components/navigation/tabs/tabs.component.html","../../src/components/navigation/tabs/tab-panel.component.ts","../../src/components/feedback/toast/toast.component.ts","../../src/components/feedback/toast/toast.component.html","../../src/components/feedback/toast/toast.config.ts","../../src/components/feedback/toast/toast.service.ts","../../src/components/feedback/toast/toast-container.component.ts","../../src/components/feedback/toast/toast-container.component.html","../../src/components/overlays/panel/panel-component-outlet.directive.ts","../../src/components/overlays/panel/panel-ref.ts","../../src/components/overlays/panel/panel-labels.ts","../../src/components/overlays/panel/panel.types.ts","../../src/components/overlays/panel/panel-header.component.ts","../../src/components/overlays/panel/panel-header.component.html","../../src/components/overlays/panel/panel-defaults.ts","../../src/components/overlays/panel/panel-host.service.ts","../../src/components/overlays/panel/panel-host.component.ts","../../src/components/overlays/panel/panel-host.component.html","../../src/components/overlays/panel/panel-body.component.ts","../../src/components/overlays/panel/panel-footer.component.ts","../../src/components/overlays/panel/panel-toggle.ts","../../src/components/overlays/popover/dropdown-item.component.ts","../../src/components/overlays/popover/dropdown.component.ts","../../src/components/overlays/popover/dropdown.component.html","../../src/components/content/calendar/core/navigation.ts","../../src/components/content/calendar/toolbar/toolbar.component.ts","../../src/components/content/calendar/toolbar/toolbar.component.html","../../src/components/content/calendar/core/agenda.ts","../../src/components/content/calendar/agenda/agenda.component.ts","../../src/components/content/calendar/agenda/agenda.component.html","../../src/components/content/calendar/source-filter/source-filter.component.ts","../../src/components/content/calendar/source-filter/source-filter.component.html","../../src/public-api.ts","../../src/fold-ng.ts"],"sourcesContent":["import { DOCUMENT } from \"@angular/common\";\nimport { Directive, ElementRef, effect, inject, input } from \"@angular/core\";\n\n/**\n * A matched element is only truly focusable if it's rendered — `display:none`\n * and `visibility:hidden` descendants match the selector but can't take focus,\n * and focusing one would drop focus to the body. `offsetParent === null` catches\n * `display:none`; the size check catches a zero-box element still in flow.\n */\nfunction isVisible(el: HTMLElement): boolean {\n  if (el.hidden) {\n    return false;\n  }\n  const rects = el.getClientRects();\n  return el.offsetParent !== null || rects.length > 0;\n}\n\n/** Elements that can receive keyboard focus, minus explicitly-skipped ones. */\nconst FOCUSABLE_SELECTOR = [\n  \"a[href]\",\n  \"button:not([disabled])\",\n  \"textarea:not([disabled])\",\n  \"input:not([disabled])\",\n  \"select:not([disabled])\",\n  '[tabindex]:not([tabindex=\"-1\"])',\n].join(\",\");\n\n/**\n * Traps keyboard focus inside the host element while enabled — the a11y\n * contract every overlay must honour but which panels historically skipped.\n *\n * On enable it remembers the currently-focused element and moves focus to the\n * first focusable descendant (or the host itself). `Tab`/`Shift+Tab` wrap at\n * the boundaries so focus never escapes to the page behind. On disable or\n * destroy it restores focus to wherever it was before — so closing a panel\n * returns the user to the control that opened it.\n *\n * The host must be focusable as a fallback (`tabindex=\"-1\"`).\n */\n@Directive({\n  selector: \"[foldFocusTrap]\",\n  host: { \"(keydown)\": \"onKeydown($event)\" },\n})\nexport class FocusTrapDirective {\n  /** Bind `[foldFocusTrap]=\"open()\"` — the trap is live only while true. */\n  readonly enabled = input(true, { alias: \"foldFocusTrap\" });\n\n  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n  private readonly document = inject(DOCUMENT);\n  private previouslyFocused: HTMLElement | null = null;\n\n  constructor() {\n    effect((onCleanup) => {\n      if (!this.enabled()) {\n        return;\n      }\n      this.activate();\n      onCleanup(() => this.restore());\n    });\n  }\n\n  onKeydown(event: KeyboardEvent): void {\n    if (event.key !== \"Tab\" || !this.enabled()) {\n      return;\n    }\n    const focusables = this.focusable();\n    if (focusables.length === 0) {\n      event.preventDefault();\n      this.host.nativeElement.focus();\n      return;\n    }\n    const first = focusables[0];\n    const last = focusables[focusables.length - 1];\n    if (!first || !last) {\n      return;\n    }\n    const active = this.document.activeElement;\n    if (event.shiftKey && active === first) {\n      event.preventDefault();\n      last.focus();\n    } else if (!event.shiftKey && active === last) {\n      event.preventDefault();\n      first.focus();\n    }\n  }\n\n  private activate(): void {\n    const active = this.document.activeElement;\n    this.previouslyFocused = active instanceof HTMLElement ? active : null;\n    // `preventScroll`: entering an overlay must never scroll the page behind it.\n    // The default focus scroll used to drag the content sideways to reveal a\n    // panel still parked off-edge by its enter animation. Only here — a Tab\n    // *inside* the overlay should still scroll its target into view, and\n    // `restore()` should bring the trigger back into view on close.\n    (this.focusable()[0] ?? this.host.nativeElement).focus({\n      preventScroll: true,\n    });\n  }\n\n  private restore(): void {\n    this.previouslyFocused?.focus();\n    this.previouslyFocused = null;\n  }\n\n  private focusable(): HTMLElement[] {\n    const all = Array.from(\n      this.host.nativeElement.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR),\n    );\n    const visible = all.filter(isVisible);\n    // A non-rendering environment (SSR / jsdom) reports every element as\n    // zero-box; don't over-filter there — fall back to the raw matches.\n    return visible.length > 0 ? visible : all;\n  }\n}\n","import { Injectable } from \"@angular/core\";\n\n/**\n * Generates unique, SSR-safe element ids.\n *\n * A per-injector counter (`providedIn: 'root'` → one instance per application,\n * and a fresh one per request on the server) so the sequence is deterministic\n * in render order and therefore matches between server and client. That's the\n * point: `crypto.randomUUID()` returns a different value on the server than on\n * the client for the same element, which trips Angular hydration; a counter\n * reset per request does not, and can't collide across requests or grow\n * unbounded.\n *\n * Used by the labelled controls that own their id ({@link FoldInputComponent},\n * `fold-select`) and by {@link FoldFieldIdDirective} for loose native controls.\n */\n@Injectable({ providedIn: \"root\" })\nexport class FoldIdService {\n  private counter = 0;\n\n  /**\n   * The next unique id, e.g. `fold-input-3`.\n   * @param prefix a short, human-readable namespace for the id.\n   */\n  next(prefix = \"fold\"): string {\n    this.counter += 1;\n    return `${prefix}-${this.counter}`;\n  }\n}\n","import { Service } from \"@angular/core\";\n\n/** The class the registry toggles to freeze a region. The `overflow: hidden\n *  !important` rule ships in `tokens.css` so a freeze works in production, where\n *  only the tokens are imported. A class (not an inline style) is deliberate: it\n *  never clobbers a region's own inline `overflow-y` / stylesheet overflow, which\n *  reappears verbatim the moment the class is removed. */\nexport const FOLD_SCROLL_FROZEN_CLASS = \"fold-scroll-frozen\";\n\n/**\n * Registry of the live scroll regions in a shell — the shell's own content\n * scroll box and every `[foldScrollRegion]`.\n *\n * It exists so an overlay can freeze **the real scroll containers** at once, not\n * just `document.body`. In a `fold-app-shell` the scroll owner is an inner box\n * (`.content-scroll`), not `body`, so the body scroll-lock alone leaves the page\n * scrollable behind a modal panel. The panel host freezes this registry too, and\n * every registered region — the shell box and each nested `foldScrollRegion` —\n * stops scrolling until the overlay closes.\n *\n * `freeze()`/`unfreeze()` are **reference-counted** (like {@link ScrollLockService}):\n * stacked overlays each freeze once; the regions thaw only when the last unfreezes.\n * Freezing toggles {@link FOLD_SCROLL_FROZEN_CLASS} rather than writing inline\n * `overflow`, so a region's own overflow (inline binding or stylesheet) is never\n * clobbered — it simply returns when the class is removed.\n *\n * SSR-safe: registration only stores an element reference; the class toggles\n * happen in `freeze()`, which an overlay only calls in the browser.\n */\n@Service()\nexport class ScrollRegionRegistry {\n  /** The live regions. A `Set` so a double-register is idempotent. */\n  private readonly regions = new Set<HTMLElement>();\n  /** How many overlays currently hold the freeze. */\n  private freezes = 0;\n\n  /** Add a region. If a freeze is already active, the new region joins it. */\n  register(element: HTMLElement): void {\n    this.regions.add(element);\n    if (this.freezes > 0) {\n      element.classList.add(FOLD_SCROLL_FROZEN_CLASS);\n    }\n  }\n\n  /** Remove a region (on directive/shell teardown) and thaw it. */\n  unregister(element: HTMLElement): void {\n    this.regions.delete(element);\n    element.classList.remove(FOLD_SCROLL_FROZEN_CLASS);\n  }\n\n  /** Freeze every region's scroll (idempotent per matching `unfreeze()`). */\n  freeze(): void {\n    this.freezes += 1;\n    if (this.freezes === 1) {\n      for (const element of this.regions) {\n        element.classList.add(FOLD_SCROLL_FROZEN_CLASS);\n      }\n    }\n  }\n\n  /** Release one freeze; thaws the regions only when the last is released. */\n  unfreeze(): void {\n    if (this.freezes === 0) {\n      return;\n    }\n    this.freezes -= 1;\n    if (this.freezes === 0) {\n      for (const element of this.regions) {\n        element.classList.remove(FOLD_SCROLL_FROZEN_CLASS);\n      }\n    }\n  }\n\n  /** True while at least one overlay holds the freeze. */\n  get isFrozen(): boolean {\n    return this.freezes > 0;\n  }\n}\n","import {\n  DestroyRef,\n  ElementRef,\n  type Signal,\n  inject,\n  signal,\n} from \"@angular/core\";\n\n/**\n * A signal of an element's content-box **width** in px, kept live by a\n * `ResizeObserver`. Call it in an **injection context** (a component/directive\n * constructor or field initialiser); it wires the observer to the current\n * `ElementRef` — or an element you pass — and tears it down on destroy.\n *\n * This is the reusable half of container-responsiveness: the `ResizeObserver`\n * wiring, the SSR guard and the teardown, in one place. Each caller derives\n * whatever breakpoint policy it needs on top — a plain `computed(() => w() <=\n * 768)`, or a hysteretic state machine — instead of re-writing the observer.\n *\n * SSR / no-DOM safe: where `ResizeObserver` is undefined the signal stays at\n * its initial `0`, which every caller reads as \"not yet measured\" — and, for a\n * breakpoint, as the wide/default branch, the SSR-correct first paint. The\n * observer also ignores a `0` reading, so a detached or hidden element keeps\n * its last real width rather than flipping.\n *\n * @param element the element to observe; defaults to the injected host.\n * @returns a read-only signal of the current width in px (`0` until measured).\n */\nexport function observeElementWidth(\n  element?: ElementRef<HTMLElement> | HTMLElement,\n): Signal<number> {\n  const host =\n    element instanceof ElementRef\n      ? element.nativeElement\n      : (element ?? inject<ElementRef<HTMLElement>>(ElementRef).nativeElement);\n  const width = signal(0);\n  if (typeof ResizeObserver !== \"undefined\") {\n    const observer = new ResizeObserver((entries) => {\n      const measured = entries[0]?.contentRect.width ?? 0;\n      if (measured > 0) {\n        width.set(measured);\n      }\n    });\n    observer.observe(host);\n    inject(DestroyRef).onDestroy(() => observer.disconnect());\n  }\n  return width.asReadonly();\n}\n","import { Directive, input } from \"@angular/core\";\n\n/**\n * A named surface — the ground a subtree paints itself on. `page` is the\n * document body; `chrome` is application furniture (rails, header) that a theme\n * may colour differently from the page; `accent` is an **auto-inverting** region\n * filled with the brand accent, whose content re-points to a compatible\n * on-accent palette (see the `[data-surface=\"accent\"]` block in `semantic.css`).\n */\nexport type FoldSurfaceName = \"page\" | \"chrome\" | \"accent\";\n\n/**\n * `[foldSurface]` — declares the element a **named surface**, so a theme can\n * re-colour it without knowing anything about the component it lives in.\n *\n * It exists to let one theme mean two things by \"the same\" role. A uniform\n * theme (umbra, light) needs none of this — `text` is one colour everywhere.\n * But a theme that mixes a **light page with dark chrome** (navi) needs `text`,\n * `surface` and the brand to differ *per region*, which a single set of roles\n * cannot express. The surface is the seam a theme overrides across:\n *\n * ```css\n * [data-theme=\"navi\"] [data-surface=\"chrome\"] {\n *   --fold-color-text: var(--fold-ref-slate-50); / * light text on the dark rail * /\n * }\n * ```\n *\n * The directive only stamps `data-surface`; the theme owns the colours. Two\n * rules make it work, both in the token layer, neither in a component:\n * - `[data-surface] { color: var(--fold-color-text); }` — every surface resolves\n *   its own text, so a per-surface override actually lands (a custom-property\n *   override reaches only properties *resolved inside* the subtree, never a\n *   colour already inherited from an ancestor).\n * - a theme adds `[data-theme=\"…\"] [data-surface=\"chrome\"] { … }` for the\n *   surfaces it wants to diverge on.\n *\n * This replaces reaching into `fold-app-shell`'s internal class names from the\n * theme file — a coupling that pointed the wrong way (a renamed rail class\n * would have broken a theme silently). Any element can now be a chrome surface:\n * a shell rail, a dark hero on a light page, a footer, a preview pane.\n *\n * @selector `[foldSurface]`\n *\n * @example\n * ```html\n * <aside foldSurface=\"chrome\">…dark furniture on a light page…</aside>\n * ```\n */\n@Directive({\n  selector: \"[foldSurface]\",\n  standalone: true,\n  host: { \"[attr.data-surface]\": \"foldSurface()\" },\n})\nexport class FoldSurfaceDirective {\n  /** The surface this element is. Defaults to `page`, including a bare\n   *  `foldSurface` attribute (which the template binds as an empty string). */\n  readonly foldSurface = input<FoldSurfaceName, FoldSurfaceName | \"\">(\"page\", {\n    transform: (value) => (value === \"\" ? \"page\" : value),\n  });\n}\n","import { DOCUMENT, NgTemplateOutlet } from \"@angular/common\";\nimport {\n  Component,\n  DestroyRef,\n  ElementRef,\n  HostListener,\n  afterNextRender,\n  computed,\n  effect,\n  inject,\n  input,\n  model,\n  viewChild,\n} from \"@angular/core\";\nimport { FocusTrapDirective } from \"../../../a11y/focus-trap.directive\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { ScrollRegionRegistry } from \"../../../a11y/scroll-region-registry.service\";\nimport { observeElementWidth } from \"../../../dom/observe-element-width\";\nimport { FoldSurfaceDirective } from \"../../../directives/surface.directive\";\n\n/** Width (px) at or below which the rails collapse and the primary rail becomes\n *  a mobile drawer. Kept in lockstep with the `@media`/`@container` breakpoint\n *  in the stylesheet. */\nconst MOBILE_BREAKPOINT = 768;\n\n/**\n * `<fold-app-shell>` — the responsive application skeleton.\n *\n * A pure structural grid with four content slots: it owns the layout and the\n * responsive collapse, the app owns what fills the slots (nav, header, routed\n * content, overlays) and all state/routing. Rail visibility is driven from the\n * projected rail component itself (an empty `railSecondary` self-collapses).\n *\n * Sizing has two ergonomic paths that compose:\n * - **Typed inputs** (`railWidth`, `headerHeight`, `headerHeightMobile`) for the\n *   common case — plain px numbers, discoverable and type-checked in the\n *   template.\n * - **CSS variables** for the theming case — set `--fold-shell-*` on any ancestor\n *   to compose tokens (`var(--w-appMenu)`) or drive it from a media query. An\n *   unset input inherits the variable, so the two never fight.\n *\n * ```\n * ┌────────┬──────────────┬─────────────────────┐\n * │  rail  │ rail          │ header              │  ← header row (fixed height)\n * │ primary│ secondary     ├─────────────────────┤\n * │        │               │ subheader           │  ← optional band (0 when empty)\n * │        │               ├─────────────────────┤\n * │ (auto, │ (auto width,  │ content             │  ← content row (1fr)\n * │  self- │  self-        │ (position: relative │\n * │  sized)│  collapsing)  │  anchor for panels) │\n * │        │               ├─────────────────────┤\n * │        │               │ footer              │  ← footer row (auto — 0 when empty)\n * └────────┴──────────────┴─────────────────────┘\n * ```\n *\n * At ≤768px it becomes a single header + content + footer column and the rails\n * drop out. How the nav comes back is `mobileNav`:\n * - `\"drawer\"` (default) — the **primary** rail turns into an off-canvas drawer;\n *   bind `[(mobileNavOpen)]` and give the app a mobile-only hamburger to slide\n *   it in over a scrim (`Escape` / scrim / widening close it). Render the\n *   projected rail expanded in the drawer, since the collapsed icon rail is the\n *   desktop chrome.\n * - `\"none\"` — no built-in mobile nav; compose an `fold-nav-launcher` (a\n *   full-screen tile grid) bound to the same `mobileNavOpen`.\n *\n * ## Slots\n * | Attribute        | Region                                    |\n * |------------------|-------------------------------------------|\n * | `railPrimary`    | Left rail (intrinsic width — the rail component sizes itself; `railWidth` sets its base via `--fold-shell-rail-width`). At ≤768px it becomes the mobile drawer (see `mobileNavOpen`). |\n * | `railSecondary`  | Second rail (intrinsic width; a component that collapses to `0` hides itself). |\n * | `subheader`      | The band **under** the header — a nav sub-bar, a filter strip, a context ribbon. Same placement rule as the header (`subheaderLayout`: over the content column, or full width above the rails), and like the footer it is **self-collapsing**: an empty slot claims no row. Rendered as a plain `<div>`, so the band brings its own semantics (a `<nav>`, a toolbar). |\n * | `header`         | Top bar (content column, or full-width — see `headerLayout`). Rendered as `<header>` — project plain elements into it, not another `<header>`. |\n * | *(default)*      | The content region — routed pages, floating panels, overlays, banners. Rendered as the document's single `<main>`. **Full-bleed**: the shell adds no gutter, so a page can paint edge-to-edge (a full-width banner, a hero, a bleeding panel). Want the themed page gutter? Wrap the page in `fold-page-layout` — padding is *its* job, not the shell's. |\n * | `footer`         | Bottom bar — a player / status strip (`footerBehavior=\"pinned\"`, always in sight) or a legal / support footer (`footerBehavior=\"scroll\"`, revealed at the end of the content). Rendered as `<footer>` (the document's `contentinfo` landmark). **Content-sized and self-collapsing**: an empty slot takes no space (unlike the fixed-height header). Content column, or full-width — see `footerLayout`. |\n *\n * ## Sizing knobs\n * | Input                | CSS variable                       | Default | Meaning                    |\n * |----------------------|------------------------------------|---------|----------------------------|\n * | `railWidth`          | `--fold-shell-rail-width`           | `64px`  | Base width the primary rail reads (column is intrinsic). |\n * | `headerHeight`       | `--fold-shell-header-height`        | `56px`  | Header row height.         |\n * | `headerHeightMobile` | `--fold-shell-header-height-mobile` | `52px`  | Header height at ≤768px.    |\n * | `subheaderHeight`    | `--fold-shell-subheader-height`     | `52px`  | Subheader band height.     |\n * | `subheaderHeightMobile` | `--fold-shell-subheader-height-mobile` | `48px` | Subheader height at ≤768px. |\n *\n * ## Layout knobs\n * | Input          | Values                | Default   | Meaning                                    |\n * |----------------|-----------------------|-----------|--------------------------------------------|\n * | `headerLayout` | `\"inset\" \\| \"full\"`   | `\"inset\"` | `inset` = header sits over the content column (rails climb its side); `full` = header spans the full width, above the rails. |\n * | `subheaderLayout` | `\"inset\" \\| \"full\"` | `\"inset\"` | Same two positions as the header, for the band under it. Pair it with `headerLayout` — a `full` header over an `inset` sub-bar leaves the rails climbing only half the chrome. |\n * | `footerLayout` | `\"inset\" \\| \"full\"`   | `\"inset\"` | `inset` = footer sits under the content column (rails climb its side); `full` = footer spans the full width, below the rails (the usual player-bar look). Ignored when `footerBehavior=\"scroll\"`. |\n * | `footerBehavior`| `\"pinned\" \\| \"scroll\"`| `\"pinned\"`| `pinned` = the footer is a fixed row, **always in sight** (a player / status bar) — supports `inset` and `full`. `scroll` = the footer flows at the **end of the content**, revealed when you scroll to the bottom (a legal / support footer) — it lives in the content column (inset). A short page still pushes it to the bottom (the content grows to fill), and a tall page reveals it below the fold; you never manage that. |\n * | `scroll`       | `\"scroll\" \\| \"stage\"` | `\"scroll\"`| **Who owns the content scroll.** `scroll` (default) = the shell's content region owns the scroll; pages flow inside it (`fold-page-layout scroll=\"flow\"`), the chrome stays put, a `scroll` footer sits at the true end. `stage` = the content region is a fixed-height stage that does *not* scroll — the page fills it and scrolling happens inside `[foldScrollRegion]` areas (a mail-style split view). See `docs/scroll.md`. |\n *\n * ## Elevation (the floating look)\n * The shell owns **structure**, not skin — it drives no `floating` flag. To lift\n * a region into a rounded, shadowed card, put `foldElevated` on the element that\n * paints that region's background (a projected `fold-menu`, an `app-header`, a\n * content wrapper). It composes **per region** — float the rail while the main\n * stays flat, or float them all for an inset dashboard. The shell's only part is\n * the moat: a cell whose content is elevated **pads itself** (`:has`), revealing\n * the page-gutter around the card — padding, so a `height: 100%` region fits\n * with no overflow. `--fold-surface-inset` tunes the gutter. See\n * {@link FoldElevatedDirective}.\n *\n * ## Accessibility\n * The shell renders a **skip-link** as its first Tab stop — jumping keyboard\n * users past the rails straight to the `<main>` content (`skipLinkLabel` sets\n * its text). The `<main>` is focusable (`tabindex=\"-1\"`) so the jump lands; the\n * link moves focus directly rather than following the fragment, so it works\n * under hash routing too.\n *\n * The mobile **drawer is a real modal**, matching the panel host's bar: while\n * open it is a named `role=\"dialog\"` + `aria-modal=\"true\"` (`drawerLabel`), the\n * focus-trap moves focus in and restores it to the trigger on close, and every\n * other region (header, content, footer, second rail) is `inert` — so a\n * screen-reader's virtual cursor can't wander behind the open drawer.\n *\n * **Trigger contract (app-owned).** The shell owns the drawer/dialog; the app\n * owns the hamburger that opens it, so the shell can't set ARIA on that button —\n * it exposes what's needed and documents the wiring. For the pairing to be fully\n * announced, the hamburger should carry `[attr.aria-expanded]=\"navOpen()\"`,\n * `aria-haspopup=\"dialog\"`, and `[attr.aria-controls]=\"shell.drawerId\"` (read the\n * shell via a template ref, `#shell=\"foldAppShell\"`):\n *\n * ```html\n * <fold-app-shell #shell=\"foldAppShell\" [(mobileNavOpen)]=\"navOpen\">\n *   <app-menu railPrimary />\n *   <header header>\n *     <button\n *       class=\"hamburger\"\n *       aria-haspopup=\"dialog\"\n *       [attr.aria-expanded]=\"navOpen()\"\n *       [attr.aria-controls]=\"shell.drawerId\"\n *       (click)=\"navOpen.set(!navOpen())\"\n *     >☰</button>\n *   </header>\n *   <router-outlet />\n * </fold-app-shell>\n * ```\n *\n * @selector `fold-app-shell`\n *\n * @example\n * ```html\n * <fold-app-shell\n *   [railWidth]=\"72\"\n *   headerLayout=\"full\"\n *   [(mobileNavOpen)]=\"navOpen\"\n * >\n *   <app-menu railPrimary foldElevated /><!-- a floating rail; drop it for flat -->\n *   <app-workspace-rail railSecondary />\n *   <app-header header /><!-- its hamburger toggles navOpen at ≤768px -->\n *   <app-nav-bar subheader /><!-- optional; omit it and the band collapses -->\n *   <router-outlet />\n *   <!-- panels / overlays / banners also go in the default slot -->\n *   <app-player footer /><!-- optional; omit it and the footer row collapses -->\n * </fold-app-shell>\n * ```\n */\n@Component({\n  selector: \"fold-app-shell\",\n  standalone: true,\n  exportAs: \"foldAppShell\",\n  imports: [FoldSurfaceDirective, NgTemplateOutlet, FocusTrapDirective],\n  host: {\n    \"[style.--fold-shell-rail-width]\": \"railWidthVar()\",\n    \"[style.--fold-shell-header-height]\": \"headerHeightVar()\",\n    \"[style.--fold-shell-header-height-mobile]\": \"headerHeightMobileVar()\",\n    \"[style.--fold-shell-subheader-height]\": \"subheaderHeightVar()\",\n    \"[style.--fold-shell-subheader-height-mobile]\":\n      \"subheaderHeightMobileVar()\",\n    \"[class.header-full]\": 'headerLayout() === \"full\"',\n    \"[class.subheader-full]\": 'subheaderLayout() === \"full\"',\n    \"[class.footer-full]\": 'footerLayout() === \"full\"',\n    \"[class.footer-scroll]\": 'footerBehavior() === \"scroll\"',\n    \"[class.mobile-drawer]\": 'mobileNav() === \"drawer\"',\n    \"[class.mobile-nav-open]\": \"drawerOpen()\",\n    \"[attr.data-scroll]\": \"scroll()\",\n  },\n  templateUrl: \"./app-shell.component.html\",\n  styleUrl: \"./app-shell.component.scss\",\n})\nexport class FoldAppShellComponent {\n  /** Base width the primary rail reads in px (the column is intrinsic — the rail\n   *  component sizes itself). Omit to inherit `--fold-shell-rail-width` (64). */\n  readonly railWidth = input<number>();\n  /** Header row height in px. Omit to inherit `--fold-shell-header-height` (56). */\n  readonly headerHeight = input<number>();\n  /** Header height at ≤768px in px. Omit to inherit `--fold-shell-header-height-mobile` (52). */\n  readonly headerHeightMobile = input<number>();\n  /** Subheader band height in px. Omit to inherit `--fold-shell-subheader-height` (52). */\n  readonly subheaderHeight = input<number>();\n  /** Subheader band height at ≤768px in px. Omit to inherit `--fold-shell-subheader-height-mobile` (48). */\n  readonly subheaderHeightMobile = input<number>();\n\n  /** `\"full\"` spans the header across every column, above the rails; `\"inset\"` (default) keeps it over the content column. */\n  readonly headerLayout = input<\"inset\" | \"full\">(\"inset\");\n  /** `\"full\"` spans the subheader band across every column, above the rails, in step with a `\"full\"` header; `\"inset\"` (default) keeps it over the content column. The band claims a row only when something is projected into it. */\n  readonly subheaderLayout = input<\"inset\" | \"full\">(\"inset\");\n  /** `\"full\"` spans the footer across every column, below the rails (the usual player-bar look); `\"inset\"` (default) keeps it under the content column. The footer row is content-sized and collapses to `0` when the slot is empty. Ignored when `footerBehavior=\"scroll\"`. */\n  readonly footerLayout = input<\"inset\" | \"full\">(\"inset\");\n  /** `\"pinned\"` (default) keeps the footer always in sight as a fixed row (a player / status bar); `\"scroll\"` lets it flow at the end of the content, revealed when you scroll to the bottom (a legal / support footer). `scroll` is inset-only and makes the shell own the content scroll — project flow content, not a page that manages its own full-height scroll. */\n  readonly footerBehavior = input<\"pinned\" | \"scroll\">(\"pinned\");\n  /**\n   * Who owns the content region's scroll — the shell's single scroll switch.\n   * - `\"scroll\"` (default) — the shell's content region **owns** the scroll.\n   *   Pages flow inside it (`fold-page-layout` defaults to `scroll=\"flow\"`), the\n   *   header/rails stay put, and a `footerBehavior=\"scroll\"` footer sits at the\n   *   true end of the content. This is the document case — the vast majority.\n   * - `\"stage\"` — the content region is a **fixed-height stage** that does *not*\n   *   scroll; the page fills it and any scrolling happens inside\n   *   `[foldScrollRegion]` areas. This is the app case: a mail-style split view\n   *   where the list and the detail scroll independently and the viewport never\n   *   moves. A page that must scroll as a unit inside a stage sets\n   *   `fold-page-layout scroll=\"own\"`.\n   *\n   * The scroll always lives on an **inner** scroll box, never on the content\n   * region itself, so a docked overlay (the panel host) anchored to the region\n   * stays fixed over the frame instead of scrolling away with the content.\n   */\n  readonly scroll = input<\"scroll\" | \"stage\">(\"scroll\");\n\n  /** The skip-link's label — the first Tab stop, jumping keyboard users past the\n   *  rails straight to `<main>`. Override for a non-English app. */\n  readonly skipLinkLabel = input(\"Skip to content\");\n\n  /** The mobile drawer's accessible name — it becomes a `role=\"dialog\"` while\n   *  open, so it must be named. `\"Menu\"` by default (not `\"Navigation\"`, which\n   *  would echo the `<nav>` landmark inside). Override for a non-English app. */\n  readonly drawerLabel = input(\"Menu\");\n\n  private readonly document = inject(DOCUMENT);\n\n  /** SSR-safe id linking the skip-link to the `<main>` it targets. */\n  protected readonly contentId =\n    inject(FoldIdService).next(\"fold-shell-content\");\n\n  /**\n   * SSR-safe id on the mobile drawer (the primary rail). Public and reachable\n   * via `exportAs=\"foldAppShell\"` so the app's hamburger can point\n   * `aria-controls` at the dialog it opens — see the trigger contract in the\n   * class docs.\n   */\n  readonly drawerId = inject(FoldIdService).next(\"fold-shell-drawer\");\n\n  /**\n   * How the primary rail's navigation is reached on mobile:\n   * - `\"drawer\"` (default) — the built-in off-canvas drawer slides the projected\n   *   `[railPrimary]` in over a scrim (driven by `mobileNavOpen`).\n   * - `\"none\"` — the shell renders **no** mobile nav; the rails just drop out.\n   *   Compose your own, typically an {@link FoldNavLauncherComponent} bound to the\n   *   same `mobileNavOpen`, when a curated full-screen tile grid fits better than\n   *   sliding the desktop rail in.\n   */\n  readonly mobileNav = input<\"drawer\" | \"none\">(\"drawer\");\n\n  /**\n   * Two-way: is the mobile nav open?\n   *\n   * Below the mobile breakpoint the rails drop out; instead of vanishing, the\n   * **primary** rail becomes an off-canvas drawer this flag slides in. The app\n   * owns the trigger — a mobile-only hamburger in its header, bound\n   * `[(mobileNavOpen)]` — and typically flips it back to `false` on navigation;\n   * the shell owns the mechanics (slide-in, scrim, `Escape`, focus-trap). It is\n   * a no-op above the breakpoint (the rails are always in view there), and it\n   * resets to `false` on the way back to a wide viewport so a widened window\n   * never keeps a stuck drawer.\n   */\n  readonly mobileNavOpen = model(false);\n\n  /** The shell's own width, kept live by a shared `ResizeObserver` primitive. */\n  private readonly width = observeElementWidth();\n\n  /** The registry of live scroll regions. The shell registers its own content\n   *  scroll box so an overlay (the panel host) can freeze it — the scroll owner\n   *  here is this inner box, not `document.body`. */\n  private readonly scrollRegions = inject(ScrollRegionRegistry);\n  /** The inner content scroll box (`scroll` mode) / stage (`stage` mode). */\n  private readonly scrollBox = viewChild<ElementRef<HTMLElement>>(\"scrollBox\");\n\n  /** Whether the shell is narrow enough to collapse — tracked from its **own**\n   *  width, not the viewport, so the drawer engages in step with the CSS\n   *  collapse whether that fires on `@media` (the shell fills the viewport) or\n   *  `@container` (an embedded preview). `0` (unmeasured / SSR) reads as wide —\n   *  the SSR-safe first paint. */\n  private readonly isNarrow = computed(() => {\n    const w = this.width();\n    return w > 0 && w <= MOBILE_BREAKPOINT;\n  });\n\n  /** The drawer is live only in `drawer` mode, when the shell is narrow **and**\n   *  open — so the focus-trap and scrim never engage over a full-width rail, nor\n   *  when a `none`-mode shell defers the mobile nav to a launcher. */\n  protected readonly drawerOpen = computed(\n    () =>\n      this.mobileNav() === \"drawer\" && this.isNarrow() && this.mobileNavOpen(),\n  );\n\n  constructor() {\n    // Widening past the breakpoint closes the drawer so it can't linger as a\n    // stuck off-canvas panel once the rails are back in view.\n    effect(() => {\n      if (!this.isNarrow() && this.mobileNavOpen()) {\n        this.mobileNavOpen.set(false);\n      }\n    });\n\n    // Register the content scroll box so overlays can freeze it. Client-only\n    // (afterNextRender) — SSR has no live scroll to coordinate, and the view\n    // child is resolved by then.\n    afterNextRender(() => {\n      const box = this.scrollBox()?.nativeElement;\n      if (box) {\n        this.scrollRegions.register(box);\n      }\n    });\n    inject(DestroyRef).onDestroy(() => {\n      const box = this.scrollBox()?.nativeElement;\n      if (box) {\n        this.scrollRegions.unregister(box);\n      }\n    });\n  }\n\n  /** `Escape` closes the drawer — the same contract as the panel host. */\n  @HostListener(\"document:keydown.escape\")\n  protected onEscape(): void {\n    if (this.drawerOpen()) {\n      this.mobileNavOpen.set(false);\n    }\n  }\n\n  /** Dismiss the drawer — the scrim's click target. */\n  protected closeMobileNav(): void {\n    this.mobileNavOpen.set(false);\n  }\n\n  /**\n   * Skip-link activation. Moves focus to `<main>` directly instead of letting\n   * the browser follow the `#id` fragment — a hash-routing app (`withHashLocation`)\n   * would treat that fragment as a route change. `preventDefault` keeps the URL\n   * clean; the anchor keeps its `href` for link semantics and no-JS fallback.\n   */\n  protected skipToContent(event: Event): void {\n    event.preventDefault();\n    this.document.getElementById(this.contentId)?.focus();\n  }\n\n  /* Map each input to its CSS var — `null` when unset so the stylesheet\n     variable (or its fallback default) keeps winning; a set input overrides it. */\n  protected readonly railWidthVar = computed(() => pxVar(this.railWidth()));\n  protected readonly headerHeightVar = computed(() =>\n    pxVar(this.headerHeight()),\n  );\n  protected readonly headerHeightMobileVar = computed(() =>\n    pxVar(this.headerHeightMobile()),\n  );\n  protected readonly subheaderHeightVar = computed(() =>\n    pxVar(this.subheaderHeight()),\n  );\n  protected readonly subheaderHeightMobileVar = computed(() =>\n    pxVar(this.subheaderHeightMobile()),\n  );\n}\n\n/** A px length for a host CSS-var binding, or `null` to leave the var unset. */\nfunction pxVar(value: number | undefined): string | null {\n  return value === undefined ? null : `${value}px`;\n}\n","<!-- Skip-link: the first Tab stop — visually hidden until focused, then jumps\n     keyboard users past the rails to <main> (which is focusable, tabindex=-1). -->\n<a class=\"skip-link\" [href]=\"'#' + contentId\" (click)=\"skipToContent($event)\">{{\n  skipLinkLabel()\n}}</a>\n\n<!-- The primary rail. While the mobile drawer is open it is a real modal dialog\n     (named, aria-modal, focus-trapped) and every sibling region is inert — the\n     same bar the panel host holds; on desktop it's a plain nav rail. -->\n<div\n  class=\"rail-primary\"\n  [id]=\"drawerId\"\n  foldSurface=\"chrome\"\n  [foldFocusTrap]=\"drawerOpen()\"\n  [attr.role]=\"drawerOpen() ? 'dialog' : null\"\n  [attr.aria-modal]=\"drawerOpen() ? 'true' : null\"\n  [attr.aria-label]=\"drawerOpen() ? drawerLabel() : null\"\n  tabindex=\"-1\"\n>\n  <ng-content select=\"[railPrimary]\" />\n</div>\n<div\n  class=\"rail-secondary\"\n  foldSurface=\"chrome\"\n  [attr.inert]=\"drawerOpen() ? '' : null\"\n>\n  <ng-content select=\"[railSecondary]\" />\n</div>\n\n<!-- Mobile drawer scrim — only rendered while the drawer is actually open (the\n     shell is narrow AND mobileNavOpen). A darkening veil that dismisses on\n     click; Escape and widening close it too. aria-hidden: the focus-trapped\n     drawer + Escape are the accessible path, the scrim is a mouse convenience. -->\n@if (drawerOpen()) {\n  <div class=\"mobile-scrim\" (click)=\"closeMobileNav()\" aria-hidden=\"true\"></div>\n}\n<header\n  class=\"header\"\n  foldSurface=\"chrome\"\n  [attr.inert]=\"drawerOpen() ? '' : null\"\n>\n  <ng-content select=\"[header]\" />\n</header>\n\n<!-- The band under the header: a nav sub-bar, a filter strip, a context ribbon.\n     A plain <div> on purpose — <header> is taken, and the band's own semantics\n     (a <nav>, a toolbar) belong to what the app projects into it. Like the\n     footer, it claims a grid row only when something is actually projected. -->\n<div\n  class=\"subheader\"\n  foldSurface=\"chrome\"\n  [attr.inert]=\"drawerOpen() ? '' : null\"\n>\n  <ng-content select=\"[subheader]\" />\n</div>\n\n<!-- One footer, stamped in one of two positions — a grid row (pinned, always in\n     sight) or inside the content scroll (revealed on the way down). A single\n     <ng-content> in a template avoids duplicate-selector projection loss. -->\n<ng-template #footerTpl>\n  <footer\n    class=\"footer\"\n    [class.footer-inflow]=\"footerBehavior() === 'scroll'\"\n    foldSurface=\"chrome\"\n    [attr.inert]=\"drawerOpen() ? '' : null\"\n  >\n    <ng-content select=\"[footer]\" />\n  </footer>\n</ng-template>\n\n<!-- The content region is the fixed, positioned FRAME — never scrolls, so a\n     docked overlay (the panel host) anchored to it stays put. The scroll lives on\n     the inner `.content-scroll` box; because its containing block is this frame\n     (above the scroll box), an absolutely-positioned panel dock escapes the\n     scroll and floats over the frame. `.content-flow` grows to fill, so a short\n     page still pushes a trailing `scroll` footer to the true bottom. -->\n<main\n  class=\"content\"\n  foldSurface=\"page\"\n  [id]=\"contentId\"\n  tabindex=\"-1\"\n  [attr.inert]=\"drawerOpen() ? '' : null\"\n>\n  <div class=\"content-scroll fold-shell-scroll\" #scrollBox>\n    <div class=\"content-flow\"><ng-content /></div>\n    @if (footerBehavior() === \"scroll\") {\n      <ng-container [ngTemplateOutlet]=\"footerTpl\" />\n    }\n  </div>\n</main>\n@if (footerBehavior() !== \"scroll\") {\n  <ng-container [ngTemplateOutlet]=\"footerTpl\" />\n}\n","/**\n * Categorical auto-colour palettes + the seed→index hash.\n *\n * These are **data**, not semantic tokens: qualitative hues to tell entities\n * apart (avatars, org nodes…), theme-invariant, never a role. They live in TS\n * because a hash consumes them — they don't belong in the token CSS.\n *\n * The active palette is chosen once, app-wide, via {@link FoldPaletteRegistry} so a\n * given seed maps to the SAME colour everywhere (recognition). Consumers never\n * touch these arrays directly — they call `registry.colorFor(seed)`.\n */\n\n/**\n * The seed→hash used to pick a palette index. Kept byte-identical to the app's\n * historical avatar/org-member hash so migrating changes no existing colour.\n */\nexport function foldHashSeed(seed: string): number {\n  let hash = 0;\n  for (let i = 0; i < seed.length; i += 1) {\n    hash = seed.charCodeAt(i) + ((hash << 5) - hash);\n  }\n  return hash;\n}\n\n/** 10 vivid hues — the default. */\nconst VIVID = [\n  \"#63b3ed\",\n  \"#68d391\",\n  \"#f6ad55\",\n  \"#fc8181\",\n  \"#b794f4\",\n  \"#76e4f7\",\n  \"#fbb6ce\",\n  \"#f6e05e\",\n  \"#4fd1c5\",\n  \"#a3bffa\",\n] as const;\n\n/** 10 more, appended after VIVID to form the 20-colour `extended` palette. */\nconst VIVID_EXTRA = [\n  \"#f687b3\",\n  \"#9ae6b4\",\n  \"#fbd38d\",\n  \"#feb2b2\",\n  \"#d6bcfa\",\n  \"#81e6d9\",\n  \"#e9d8fd\",\n  \"#fefcbf\",\n  \"#bee3f8\",\n  \"#c6f6d5\",\n] as const;\n\n/** 10 soft, low-saturation hues (same hue order as VIVID). */\nconst PASTEL = [\n  \"#a8d8ea\",\n  \"#b5ead7\",\n  \"#ffdac1\",\n  \"#ffb7b2\",\n  \"#c7b6e8\",\n  \"#b2ebf2\",\n  \"#ffc8dd\",\n  \"#fdf6a8\",\n  \"#a0e7e5\",\n  \"#c5cae9\",\n] as const;\n\n/**\n * The curated named palettes. Add an entry → it becomes a usable, typed\n * {@link FoldAutoPaletteName} everywhere. `extended` deliberately starts with the\n * full `vivid` set so switching between them never recolours the first 10.\n */\nexport const FOLD_AUTO_PALETTES = {\n  vivid: VIVID,\n  extended: [...VIVID, ...VIVID_EXTRA],\n  pastel: PASTEL,\n} as const satisfies Record<string, readonly string[]>;\n\n/** A built-in palette name. */\nexport type FoldAutoPaletteName = keyof typeof FOLD_AUTO_PALETTES;\n\n/** A palette to apply: a built-in name, or a consumer's own colour list. */\nexport type FoldPaletteInput = FoldAutoPaletteName | readonly string[];\n\n/** Resolve a name or a raw list to a colour array (empty lists fall back to vivid). */\nexport function foldResolvePalette(input: FoldPaletteInput): readonly string[] {\n  const palette = typeof input === \"string\" ? FOLD_AUTO_PALETTES[input] : input;\n  return palette.length > 0 ? palette : FOLD_AUTO_PALETTES.vivid;\n}\n","import {\n  InjectionToken,\n  type Provider,\n  Service,\n  inject,\n  signal,\n} from \"@angular/core\";\nimport {\n  foldHashSeed,\n  foldResolvePalette,\n  type FoldPaletteInput,\n} from \"./palettes\";\n\n/** Bootstrap default for {@link FoldPaletteRegistry} — set via {@link provideFoldPalette}. */\nexport const FOLD_PALETTE_DEFAULT = new InjectionToken<FoldPaletteInput>(\n  \"fold.palette.default\",\n);\n\n/**\n * Configure the app-wide auto-colour palette at bootstrap (idiomatic, like\n * `provideRouter`). Accepts a built-in name OR a consumer's own colour list.\n *\n * ```ts\n * // app.config.ts\n * providers: [provideFoldPalette(\"pastel\")]        // a built-in\n * providers: [provideFoldPalette(MY_BRAND_COLORS)] // your own list\n * ```\n */\nexport function provideFoldPalette(palette: FoldPaletteInput): Provider {\n  return { provide: FOLD_PALETTE_DEFAULT, useValue: palette };\n}\n\n/**\n * The single source of truth for auto-colouring. Root singleton: every consumer\n * reads the SAME active palette, so a given seed (name/id) maps to the same\n * colour everywhere — that is the whole point (recognition). Switch the palette\n * app-wide with {@link use}; each `colorFor` reader recolours reactively.\n */\n@Service()\nexport class FoldPaletteRegistry {\n  private readonly _current = signal<readonly string[]>(\n    foldResolvePalette(\n      inject(FOLD_PALETTE_DEFAULT, { optional: true }) ?? \"vivid\",\n    ),\n  );\n\n  /** The active palette. Reading this in a reactive context tracks switches. */\n  readonly current = this._current.asReadonly();\n\n  /**\n   * Switch the whole app's palette — a built-in name or a custom colour list.\n   * Every `colorFor` reader updates in the same frame.\n   */\n  use(palette: FoldPaletteInput): void {\n    this._current.set(foldResolvePalette(palette));\n  }\n\n  /** Deterministic colour for a seed, from the active palette. Reactive. */\n  colorFor(seed: string): string {\n    const palette = this._current();\n    const idx = Math.abs(foldHashSeed(seed)) % palette.length;\n    // `_current` always holds a non-empty palette (foldResolvePalette falls back\n    // to `vivid`), so the modulo index resolves; the fallbacks are for the type.\n    return palette[idx] ?? palette[0] ?? \"transparent\";\n  }\n}\n","/**\n * Small WCAG colour-contrast helpers — used to pick a legible ink for text on a\n * categorical fill (avatar initials), and lockable by a contrast test.\n *\n * These operate on plain hex strings (`#rgb` / `#rrggbb`); a categorical palette\n * is qualitative *data* (hex is allowed there — rule 5.3), so contrast can't be\n * a token concern and lives here.\n */\n\n/** Parse `#rgb` / `#rrggbb` to `[r, g, b]` (0–255), or `null` if not a hex. */\nfunction parseHex(hex: string): [number, number, number] | null {\n  const h = hex.trim().replace(/^#/, \"\");\n  const full =\n    h.length === 3\n      ? h\n          .split(\"\")\n          .map((c) => c + c)\n          .join(\"\")\n      : h;\n  if (!/^[0-9a-fA-F]{6}$/.test(full)) {\n    return null;\n  }\n  return [\n    parseInt(full.slice(0, 2), 16),\n    parseInt(full.slice(2, 4), 16),\n    parseInt(full.slice(4, 6), 16),\n  ];\n}\n\n/** WCAG relative luminance of a hex colour, or `null` if it isn't a hex. */\nexport function foldLuminance(hex: string): number | null {\n  const rgb = parseHex(hex);\n  if (!rgb) {\n    return null;\n  }\n  const lin = (c: number): number => {\n    const s = c / 255;\n    return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n  };\n  return 0.2126 * lin(rgb[0]) + 0.7152 * lin(rgb[1]) + 0.0722 * lin(rgb[2]);\n}\n\n/** WCAG contrast ratio between two hex colours (1–21), or `null` if either\n *  isn't a hex. */\nexport function foldContrast(a: string, b: string): number | null {\n  const la = foldLuminance(a);\n  const lb = foldLuminance(b);\n  if (la === null || lb === null) {\n    return null;\n  }\n  const [hi, lo] = la >= lb ? [la, lb] : [lb, la];\n  return (hi + 0.05) / (lo + 0.05);\n}\n\n/**\n * The **more legible** of two inks for text drawn on `fill` — whichever has the\n * higher WCAG contrast. Picking the max (rather than thresholding luminance)\n * guarantees the best of the pair for *any* fill: at the black/white crossover\n * both inks already clear ~4.5:1, so every fill lands at or above it. A non-hex\n * `fill` falls back to `dark`.\n */\nexport function foldReadableInk(\n  fill: string,\n  dark: string,\n  light: string,\n): string {\n  const withDark = foldContrast(fill, dark);\n  const withLight = foldContrast(fill, light);\n  if (withDark === null || withLight === null) {\n    return dark;\n  }\n  return withDark >= withLight ? dark : light;\n}\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  inject,\n  input,\n  linkedSignal,\n} from \"@angular/core\";\nimport { FoldPaletteRegistry } from \"../../../color/palette-registry.service\";\nimport { foldReadableInk } from \"../../../color/contrast\";\n\n/** Ink for text on a light vs dark categorical fill. */\nconst DARK_INK = \"#1a202c\";\nconst LIGHT_INK = \"#ffffff\";\n\n/** Fill style — `ghost` dashes the outline (guests). */\nexport type FoldAvatarVariant = \"solid\" | \"ghost\";\n/** Status-ring colour — reuses the `fold-badge` status vocabulary. */\nexport type FoldAvatarRing =\n  \"none\" | \"accent\" | \"info\" | \"warning\" | \"alert\" | \"success\";\n/** Status-ring line style — `dotted` reads as scheduled / tentative. */\nexport type FoldAvatarRingStyle = \"solid\" | \"dotted\";\n\n/**\n * `<fold-avatar>` — a user/entity avatar with initials or an image.\n *\n * With `imageUrl` it shows the image; otherwise it shows initials on a\n * deterministic background colour taken from the app-wide {@link FoldPaletteRegistry}\n * (so the same seed is the same colour everywhere, and one `registry.use(...)`\n * recolours every avatar).\n *\n * A broken `imageUrl` falls back to the initials rather than the browser's\n * broken-image glyph (and retries when the URL changes).\n *\n * Three orthogonal state axes compose: `variant` (fill), `muted` (presence —\n * dim for an absence/inactive person), and `ring` + `ringStyle` (a status\n * outline). The component stays domain-agnostic: a screen maps its own states\n * (e.g. absent → `[muted]`, a scheduled arrival → `ring=\"accent\"`\n * `ringStyle=\"dotted\"`), the avatar just draws the primitives. The ring is a\n * redundant emphasis cue — never the sole carrier of a state — because on a\n * light page a soft status hue (amber/green) can't clear WCAG 3:1 as a thin\n * line (status-ring-contrast.spec.ts).\n *\n * ## Inputs\n *\n * | Input       | Type                   | Default   | Description                                     |\n * |-------------|------------------------|-----------|-------------------------------------------------|\n * | `name`      | `string` (required)    | —         | Full name — initials are derived automatically. |\n * | `size`      | `'sm' \\| 'md' \\| 'lg'` | `'md'`    | Avatar size (20px / 32px / 44px).               |\n * | `colorSeed` | `string`               | `name`    | String used to pick the deterministic colour.   |\n * | `variant`   | `'solid' \\| 'ghost'`   | `'solid'` | `'ghost'` renders a dashed border (for guests). |\n * | `square`    | `boolean`              | `false`   | Square shape with a small radius (for orgs).    |\n * | `imageUrl`  | `string`               | —         | Image/logo URL. Replaces initials when set; falls back to initials if it fails to load. |\n * | `muted`     | `boolean`              | `false`   | Dim the avatar (same hue, less intense) — absence / inactive. |\n * | `ring`      | `FoldAvatarRing`        | `'none'`  | A status outline (`accent`/`info`/`warning`/`alert`/`success`). |\n * | `ringStyle` | `'solid' \\| 'dotted'`  | `'solid'` | Ring line style — `dotted` for scheduled/tentative states. |\n *\n * @selector `fold-avatar`\n *\n * @example\n * ```html\n * <fold-avatar name=\"Clément Aubry\" size=\"lg\" />\n * <fold-avatar name=\"Léa Petit\" ring=\"accent\" ringStyle=\"dotted\" />\n * <fold-avatar name=\"Acme Corp\" square imageUrl=\"/logo.svg\" />\n * ```\n */\n@Component({\n  selector: \"fold-avatar\",\n  standalone: true,\n  templateUrl: \"./avatar.component.html\",\n  styleUrl: \"./avatar.component.scss\",\n})\nexport class FoldAvatarComponent {\n  private readonly palette = inject(FoldPaletteRegistry);\n\n  readonly name = input.required<string>();\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  readonly colorSeed = input<string | undefined>(undefined);\n  readonly variant = input<FoldAvatarVariant>(\"solid\");\n  readonly square = input(false, { transform: booleanAttribute });\n  readonly imageUrl = input<string | undefined>(undefined);\n  /** Dim the avatar (same hue, less intense) — for an absent / inactive person. */\n  readonly muted = input(false, { transform: booleanAttribute });\n  /** A status outline; `'none'` draws nothing. */\n  readonly ring = input<FoldAvatarRing>(\"none\");\n  /** Ring line style — `'dotted'` for scheduled / tentative states. */\n  readonly ringStyle = input<FoldAvatarRingStyle>(\"solid\");\n\n  /** True once the `<img>` fails to load. Resets whenever `imageUrl` changes,\n   *  so a corrected URL is retried rather than staying on the fallback. */\n  protected readonly imageFailed = linkedSignal(() => {\n    this.imageUrl();\n    return false;\n  });\n  /** Show the image only when a URL is set AND it has not failed — a broken URL\n   *  falls back to the initials instead of the browser's broken-image glyph. */\n  protected readonly showImage = computed(\n    () => Boolean(this.imageUrl()) && !this.imageFailed(),\n  );\n\n  /** Readable ink for the initials — the higher-contrast of dark/light ink on\n   *  the fill, so a custom palette stays legible. */\n  protected readonly onColor = computed(() =>\n    foldReadableInk(this.color(), DARK_INK, LIGHT_INK),\n  );\n\n  readonly initials = computed(() => {\n    const n = this.name().trim();\n    if (!n) {\n      return \"?\";\n    }\n    const [first = \"\", second = \"\"] = n.split(/\\s+/);\n    if (second) {\n      return (first.charAt(0) + second.charAt(0)).toUpperCase();\n    }\n    return n.substring(0, 2).toUpperCase();\n  });\n\n  /** Deterministic fill from the active palette (via the shared registry). */\n  readonly color = computed(() =>\n    this.palette.colorFor(this.colorSeed() ?? this.name()),\n  );\n}\n","@if (showImage()) {\n  <div\n    class=\"avatar has-image\"\n    [class.size-sm]=\"size() === 'sm'\"\n    [class.size-md]=\"size() === 'md'\"\n    [class.size-lg]=\"size() === 'lg'\"\n    [class.variant-ghost]=\"variant() === 'ghost'\"\n    [class.shape-square]=\"square()\"\n    [class.is-muted]=\"muted()\"\n    [attr.data-ring]=\"ring() === 'none' ? null : ring()\"\n    [attr.data-ring-style]=\"ringStyle()\"\n    [attr.title]=\"name()\"\n  >\n    <img\n      [src]=\"imageUrl()\"\n      [alt]=\"name()\"\n      class=\"avatar-img\"\n      (error)=\"imageFailed.set(true)\"\n    />\n  </div>\n} @else {\n  <div\n    class=\"avatar\"\n    [class.size-sm]=\"size() === 'sm'\"\n    [class.size-md]=\"size() === 'md'\"\n    [class.size-lg]=\"size() === 'lg'\"\n    [class.variant-ghost]=\"variant() === 'ghost'\"\n    [class.shape-square]=\"square()\"\n    [class.is-muted]=\"muted()\"\n    [attr.data-ring]=\"ring() === 'none' ? null : ring()\"\n    [attr.data-ring-style]=\"ringStyle()\"\n    [style.background]=\"variant() === 'solid' ? color() : ''\"\n    [style.color]=\"variant() === 'solid' ? onColor() : ''\"\n    [attr.title]=\"name()\"\n  >\n    {{ initials() }}\n  </div>\n}\n","import { booleanAttribute, Component, computed, input } from \"@angular/core\";\nimport {\n  FoldAvatarComponent,\n  type FoldAvatarRing,\n  type FoldAvatarRingStyle,\n} from \"../../content/avatar/avatar.component\";\n\n/**\n * `<fold-avatar-detail>` — an avatar next to one or two lines of text: the\n * canonical \"identity cell\". A bold `primary` line and an optional faded\n * `secondary` line (name + email, entity + subtitle, …). One line centres\n * against the avatar; two lines stack and centre as a block.\n *\n * The avatar's initials/colour derive from `avatarName` when set, else from\n * `primary` — so the common \"same text\" case needs no extra input.\n *\n * ## Inputs\n *\n * | Input        | Type                   | Default   | Description                                  |\n * |--------------|------------------------|-----------|----------------------------------------------|\n * | `primary`    | `string` (required)    | —         | Bold first line; default avatar name.        |\n * | `secondary`  | `string`               | `''`      | Faded second line; empty → single line.      |\n * | `avatarName` | `string`               | `primary` | Overrides the name used for initials/colour. |\n * | `size`       | `'sm' \\| 'md' \\| 'lg'` | `'md'`    | Avatar size.                                 |\n * | `variant`    | `'solid' \\| 'ghost'`   | `'solid'` | `'ghost'` dashes the avatar (guests).        |\n * | `square`     | `boolean`              | `false`   | Square avatar (orgs).                        |\n * | `imageUrl`   | `string`               | —         | Avatar image; replaces initials when set.    |\n * | `muted`      | `boolean`              | `false`   | Dim the avatar (absence / inactive).         |\n * | `ring`       | `FoldAvatarRing`        | `'none'`  | Status outline on the avatar.                |\n * | `ringStyle`  | `'solid' \\| 'dotted'`  | `'solid'` | Ring line style (`dotted` = scheduled).      |\n *\n * @selector `fold-avatar-detail`\n *\n * @example\n * ```html\n * <fold-avatar-detail primary=\"Alex Rivers\" secondary=\"alex@sh3pherd.dev\" />\n * <fold-avatar-detail primary=\"Acme Corp\" secondary=\"Organisation\" square />\n * ```\n */\n@Component({\n  selector: \"fold-avatar-detail\",\n  standalone: true,\n  imports: [FoldAvatarComponent],\n  templateUrl: \"./avatar-detail.component.html\",\n  styleUrl: \"./avatar-detail.component.scss\",\n})\nexport class FoldAvatarDetailComponent {\n  readonly primary = input.required<string>();\n  readonly secondary = input<string>(\"\");\n  readonly avatarName = input<string>(\"\");\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  readonly variant = input<\"solid\" | \"ghost\">(\"solid\");\n  readonly square = input(false, { transform: booleanAttribute });\n  readonly imageUrl = input<string | undefined>(undefined);\n  /** Dim the avatar — absence / inactive (forwarded to `fold-avatar`). */\n  readonly muted = input(false, { transform: booleanAttribute });\n  /** Status outline colour (forwarded to `fold-avatar`). */\n  readonly ring = input<FoldAvatarRing>(\"none\");\n  /** Ring line style (forwarded to `fold-avatar`). */\n  readonly ringStyle = input<FoldAvatarRingStyle>(\"solid\");\n\n  /** Falls back to the primary line when no explicit avatar name is given. */\n  readonly resolvedAvatarName = computed(\n    () => this.avatarName().trim() || this.primary(),\n  );\n\n  readonly hasSecondary = computed(() => this.secondary().trim().length > 0);\n}\n","<fold-avatar\n  [name]=\"resolvedAvatarName()\"\n  [size]=\"size()\"\n  [variant]=\"variant()\"\n  [square]=\"square()\"\n  [imageUrl]=\"imageUrl()\"\n  [muted]=\"muted()\"\n  [ring]=\"ring()\"\n  [ringStyle]=\"ringStyle()\"\n/>\n<span class=\"lines\">\n  <span class=\"primary\">{{ primary() }}</span>\n  @if (hasSecondary()) {\n    <span class=\"secondary\">{{ secondary() }}</span>\n  }\n</span>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  input,\n  numberAttribute,\n} from \"@angular/core\";\nimport {\n  FoldAvatarComponent,\n  type FoldAvatarVariant,\n  type FoldAvatarRing,\n  type FoldAvatarRingStyle,\n} from \"../../content/avatar/avatar.component\";\n\n/** One face in an {@link FoldAvatarListComponent} — the minimum an avatar needs,\n *  plus optional per-face identity/state. `variant` lives here (not on the list)\n *  because a single member can be a guest among members. */\nexport interface FoldAvatarListItem {\n  /** Full name — initials + deterministic colour derive from it. */\n  readonly name: string;\n  /** Image/logo URL. Replaces the initials when set. */\n  readonly imageUrl?: string;\n  /** Overrides the string used to pick the deterministic colour (else `name`). */\n  readonly colorSeed?: string;\n  /** Fill style — `ghost` for a guest among members. */\n  readonly variant?: FoldAvatarVariant;\n  /** Dim this face — absence / inactive. */\n  readonly muted?: boolean;\n  /** A status outline on this face. */\n  readonly ring?: FoldAvatarRing;\n  /** Ring line style for this face (`dotted` = scheduled / tentative). */\n  readonly ringStyle?: FoldAvatarRingStyle;\n}\n\n/**\n * `<fold-avatar-list>` — a row of slightly-overlapping avatars (the org-chart\n * \"who sits on this node\" cluster). Past `limit`, the remainder collapses into a\n * trailing `+N` chip (N = total − shown).\n *\n * Each face wears a ring in the surface colour so the overlap reads cleanly;\n * override `--fold-avatar-list-ring` when the list sits on a non-card surface.\n *\n * ## Inputs\n *\n * | Input     | Type                    | Default   | Description                                              |\n * |-----------|-------------------------|-----------|----------------------------------------------------------|\n * | `avatars` | `FoldAvatarListItem[]` (required) | — | The faces, in order.                                     |\n * | `limit`   | `number`                | `0`       | Max faces on the line (`0` = all). Extra → a `+N` chip.  |\n * | `top`     | `'first' \\| 'last'`     | `'first'` | Which end stacks on top — the overlap direction.         |\n * | `size`    | `'sm' \\| 'md' \\| 'lg'`  | `'md'`    | Avatar size (shared by every face + the chip).           |\n * | `square`  | `boolean`               | `false`   | Square faces (orgs) — uniform across the cluster.        |\n *\n * Per-face traits (`variant`/`muted`/`ring`/`ringStyle`) live on each\n * `FoldAvatarListItem`, since they vary member-by-member (a guest among members,\n * one person absent, another arriving).\n *\n * @selector `fold-avatar-list`\n *\n * @example\n * ```html\n * <fold-avatar-list [avatars]=\"occupants\" [limit]=\"4\" top=\"first\" />\n * ```\n */\n@Component({\n  selector: \"fold-avatar-list\",\n  standalone: true,\n  imports: [FoldAvatarComponent],\n  host: {\n    \"[class.size-sm]\": \"size() === 'sm'\",\n    \"[class.size-md]\": \"size() === 'md'\",\n    \"[class.size-lg]\": \"size() === 'lg'\",\n    \"[class.is-square]\": \"square()\",\n  },\n  templateUrl: \"./avatar-list.component.html\",\n  styleUrl: \"./avatar-list.component.scss\",\n})\nexport class FoldAvatarListComponent {\n  readonly avatars = input.required<readonly FoldAvatarListItem[]>();\n  /** Max faces shown; `0` shows them all. Past it, a `+N` chip closes the row. */\n  readonly limit = input(0, { transform: numberAttribute });\n  /** `'first'` = the leading face sits on top; `'last'` = the trailing one does. */\n  readonly top = input<\"first\" | \"last\">(\"first\");\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  readonly square = input(false, { transform: booleanAttribute });\n\n  /** The faces actually rendered (capped at `limit` when it bites). */\n  readonly visible = computed(() => {\n    const limit = this.limit();\n    const all = this.avatars();\n    return limit > 0 && all.length > limit ? all.slice(0, limit) : all;\n  });\n\n  /** How many faces the `+N` chip stands in for (`0` → no chip). */\n  readonly overflow = computed(\n    () => this.avatars().length - this.visible().length,\n  );\n\n  /** Paint order: the \"top\" end gets the highest z-index. */\n  protected z(index: number): number {\n    const count = this.visible().length;\n    return this.top() === \"first\" ? count - index : index + 1;\n  }\n}\n","@for (a of visible(); track $index) {\n  <span class=\"al-item\" [style.z-index]=\"z($index)\">\n    <fold-avatar\n      [name]=\"a.name\"\n      [imageUrl]=\"a.imageUrl\"\n      [colorSeed]=\"a.colorSeed\"\n      [size]=\"size()\"\n      [square]=\"square()\"\n      [variant]=\"a.variant ?? 'solid'\"\n      [muted]=\"a.muted ?? false\"\n      [ring]=\"a.ring ?? 'none'\"\n      [ringStyle]=\"a.ringStyle ?? 'solid'\"\n    />\n  </span>\n}\n@if (overflow() > 0) {\n  <span class=\"al-more\" [attr.title]=\"overflow() + ' more'\"\n    >+{{ overflow() }}</span\n  >\n}\n","import { Component, input } from \"@angular/core\";\n\n/**\n * Semantic colour variants for {@link FoldBadgeComponent}, mapped to design\n * tokens. Shared so other components (e.g. `fold-menu-item`'s badge) can tint a\n * badge from the same vocabulary.\n * - `accent` — teal, general purpose\n * - `info` — purple, informative / categorical\n * - `warning` — amber, attention needed\n * - `alert` — red, critical / error\n * - `success` — green, positive / complete\n */\nexport type FoldBadgeVariant =\n  \"neutral\" | \"accent\" | \"info\" | \"warning\" | \"alert\" | \"success\";\n\n/**\n * Badge / tag for labels, statuses, and categories.\n *\n * @selector `fold-badge`\n *\n * @example\n * ```html\n * <fold-badge content=\"In repertoire\" />\n * <fold-badge content=\"Jazz\" radius=\"square\" variant=\"info\" />\n * <fold-badge content=\"Pending\" variant=\"warning\" />\n * ```\n */\n@Component({\n  selector: \"fold-badge\",\n  standalone: true,\n  templateUrl: \"./badge.component.html\",\n  // Inline so the component is fully self-contained — no external asset to\n  // resolve or ship. Colours/sizes come entirely from fold-ng tokens.\n  styleUrl: \"./badge.component.scss\",\n  host: {\n    \"[class]\": 'variant() + \" \" + radius()',\n  },\n})\nexport class FoldBadgeComponent {\n  /** Text displayed inside the badge. */\n  readonly content = input.required<string>();\n\n  /**\n   * Border-radius preset.\n   * - `pill` — fully rounded (default)\n   * - `square` — small radius (like genre tags)\n   */\n  readonly radius = input<\"pill\" | \"square\">(\"pill\");\n\n  /**\n   * Semantic colour variant, mapped to design tokens.\n   * - `neutral` — dim + unsaturated, for counts and non-semantic tags\n   * - `accent` (default) — teal, general purpose\n   * - `info` — purple, informative / categorical\n   * - `warning` — amber, attention needed\n   * - `alert` — red, critical / error\n   * - `success` — green, positive / complete\n   */\n  readonly variant = input<FoldBadgeVariant>(\"accent\");\n}\n","{{ content() }}\n","// The UI icon set — inlined SVG (no .svg text-loader dependency) so the\n// package ships self-contained. Single-colour SVGs using `currentColor`, so\n// each icon inherits `color` from its host. Hand-maintained; keys are kebab-case.\nexport const UI_ICONS = {\n  \"add-doc\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m21.414 5h-4.414v-4.414zm.586 2v17h-20v-21a3 3 0 0 1 3-3h10v7zm-6 7h-3v-3h-2v3h-3v2h3v3h2v-3h3z\"/></svg>',\n  archive:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 8v13H3V8\"/><rect x=\"1\" y=\"3\" width=\"22\" height=\"5\" rx=\"1\"/><path d=\"M10 12h4\"/></svg>',\n  \"arrow-back\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M19 12H5M12 19l-7-7 7-7\"/></svg>',\n  \"arrow-right\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14M12 5l7 7-7 7\"/></svg>',\n  bin: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M22,4H17V2a2,2,0,0,0-2-2H9A2,2,0,0,0,7,2V4H2V6H4V21a3,3,0,0,0,3,3H17a3,3,0,0,0,3-3V6h2ZM9,2h6V4H9Zm9,19a1,1,0,0,1-1,1H7a1,1,0,0,1-1-1V6H18Z\"/><rect x=\"9\" y=\"10\" width=\"2\" height=\"8\"/><rect x=\"13\" y=\"10\" width=\"2\" height=\"8\"/></svg>',\n  calendar:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3.25\" y=\"4.75\" width=\"17.5\" height=\"16\" rx=\"2.25\"/><path d=\"M3.25 9.5h17.5\"/><path d=\"M8 3.25v3\"/><path d=\"M16 3.25v3\"/><path d=\"M7.5 13.25h2\"/><path d=\"M11 13.25h2\"/><path d=\"M14.5 13.25h2\"/><path d=\"M7.5 16.75h2\"/><path d=\"M11 16.75h2\"/></svg>',\n  chat: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17L4 17.17V4h16v12z\"/></svg>',\n  \"check-circle\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\" fill=\"none\"><circle cx=\"24\" cy=\"24\" r=\"24\" fill=\"currentColor\" opacity=\"0.12\"/><path d=\"M16 24l6 6 10-12\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>',\n  check:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 6L9 17l-5-5\"/></svg>',\n  \"chevron-down\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M5,9H19l-6.293,6.293a1,1,0,0,1-1.414,0Z\"/></svg>',\n  \"chevron-left\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 18l-6-6 6-6\"/></svg>',\n  \"chevron-right\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 18l6-6-6-6\"/></svg>',\n  \"chevron-up\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19,15.293H5L11.293,9a1,1,0,0,1,1.414,0Z\"/></svg>',\n  close:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\"><path d=\"M18 6L6 18M6 6l12 12\"/></svg>',\n  code: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16 18l6-6-6-6M8 6l-6 6 6 6\"/></svg>',\n  \"collapse-all\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M17 11l-5-5-5 5M17 18l-5-5-5 5\"/></svg>',\n  copy: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\"/><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"/></svg>',\n  door: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16\"/><line x1=\"3\" y1=\"21\" x2=\"21\" y2=\"21\"/><circle cx=\"14.5\" cy=\"12.5\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/></svg>',\n  download:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M9.878,18.122a3,3,0,0,0,4.244,0l3.211-3.211A1,1,0,0,0,15.919,13.5l-2.926,2.927L13,1a1,1,0,0,0-1-1h0a1,1,0,0,0-1,1l-.009,15.408L8.081,13.5a1,1,0,0,0-1.414,1.415Z\"/><path d=\"M23,16h0a1,1,0,0,0-1,1v4a1,1,0,0,1-1,1H3a1,1,0,0,1-1-1V17a1,1,0,0,0-1-1H1a1,1,0,0,0-1,1v4a3,3,0,0,0,3,3H21a3,3,0,0,0,3-3V17A1,1,0,0,0,23,16Z\"/></svg>',\n  edit: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 20h9\"/><path d=\"M16.5 3.5a2.121 2.121 0 1 1 3 3L7 19l-4 1 1-4z\"/></svg>',\n  \"expand-all\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7 13l5 5 5-5M7 6l5 5 5-5\"/></svg>',\n  \"eye-off\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24\"/><line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"/></svg>',\n  eye: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>',\n  \"file-add\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"/><polyline points=\"14 2 14 8 20 8\"/><line x1=\"12\" y1=\"18\" x2=\"12\" y2=\"12\"/><line x1=\"9\" y1=\"15\" x2=\"15\" y2=\"15\"/></svg>',\n  filter:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 3H2l8 9.46V19l4 2v-8.54L22 3z\"/></svg>',\n  \"folder-open\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z\"/></svg>',\n  folder:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M21,3H12.236l-4-2H3A3,3,0,0,0,0,4V23H24V6A3,3,0,0,0,21,3ZM3,3H7.764l4,2H21a1,1,0,0,1,1,1v.881L2,6.994V4A1,1,0,0,1,3,3ZM2,21V8.994l20-.113V21Z\"/></svg>',\n  globe:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M12 3C6.5 3 2 9 2 12s4.5 9 10 9 10-6 10-9-4.5-9-10-9z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>',\n  grid: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\"/></svg>',\n  list: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M3 6h18M3 10h18M3 14h18M3 18h18\"/></svg>',\n  inbox:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"22 12 16 12 14 15 10 15 8 12 2 12\"/><path d=\"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\"/></svg>',\n  lock: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/></svg>',\n  hash: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"4\" y1=\"9\" x2=\"20\" y2=\"9\"/><line x1=\"4\" y1=\"15\" x2=\"20\" y2=\"15\"/><line x1=\"10\" y1=\"3\" x2=\"8\" y2=\"21\"/><line x1=\"16\" y1=\"3\" x2=\"14\" y2=\"21\"/></svg>',\n  phone:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.9.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z\"/></svg>',\n  mail: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\"/><path d=\"m3 7 9 6 9-6\"/></svg>',\n  menu: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M4 7h16a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2zm16 4H4a1 1 0 0 0 0 2h16a1 1 0 0 0 0-2zm0 6H4a1 1 0 0 0 0 2h16a1 1 0 0 0 0-2z\"/></svg>',\n  \"more-vertical\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><circle cx=\"12\" cy=\"5\" r=\"1.8\"/><circle cx=\"12\" cy=\"12\" r=\"1.8\"/><circle cx=\"12\" cy=\"19\" r=\"1.8\"/></svg>',\n  palette:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2a10 10 0 1 0 3 19.5c-.5-.5-.7-1.3-.5-2 .3-1 1.3-1.5 2.3-1.5H19a3 3 0 0 0 3-3c0-6.6-4.5-13-10-13z\"/><circle cx=\"7.5\" cy=\"10.5\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"10.5\" cy=\"7.5\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"13.5\" cy=\"7.5\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"16.5\" cy=\"10.5\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/></svg>',\n  \"playlist-add\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 10H3v2h11v-2zm0-4H3v2h11V6zM3 16h7v-2H3v2zm12 0h2v-3h3v-2h-3v-3h-2v3h-3v2h3v3z\"/></svg>',\n  plus: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\"><path d=\"M12 5v14M5 12h14\"/></svg>',\n  minus:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\"><path d=\"M5 12h14\"/></svg>',\n  redo: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20.5 7.5h-10a6 6 0 0 0 0 12H17\"/><path d=\"M16.5 3.5l4 4-4 4\"/></svg>',\n  reload:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M1 4v6h6\"/><path d=\"M3.51 15a9 9 0 102.13-9.36L1 10\"/></svg>',\n  reset:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>',\n  save: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\"/><polyline points=\"17 21 17 13 7 13 7 21\"/><polyline points=\"7 3 7 8 15 8\"/></svg>',\n  search:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><circle cx=\"11\" cy=\"11\" r=\"7\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\"></circle><line x1=\"16.5\" y1=\"16.5\" x2=\"21\" y2=\"21\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"></line></svg>',\n  sliders:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><line x1=\"4\" y1=\"6\" x2=\"20\" y2=\"6\"/><line x1=\"8\" y1=\"12\" x2=\"16\" y2=\"12\"/><line x1=\"11\" y1=\"18\" x2=\"13\" y2=\"18\"/></svg>',\n  undo: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3.5 7.5h10a6 6 0 0 1 0 12H7\"/><path d=\"M7.5 3.5 3.5 7.5l4 4\"/></svg>',\n  ungroup:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 9l-6-6-6 6\"/><path d=\"M12 3v18\"/><path d=\"M3 21h18\"/></svg>',\n  upload:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M22,16v5a1,1,0,0,1-1,1H3a1,1,0,0,1-1-1V16H0v5a3,3,0,0,0,3,3H21a3,3,0,0,0,3-3V16Z\"/><path d=\"M11.967,0A2.993,2.993,0,0,0,9.845.874L5.926,4.793,7.34,6.207l3.634-3.633L11,19l2,0L12.974,2.588l3.619,3.619,1.414-1.414L14.088.874A2.991,2.991,0,0,0,11.967,0Z\"/></svg>',\n  view: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m23.705,18.549c-.896-1.325-2.959-3.549-6.705-3.549s-5.81,2.224-6.705,3.549c-.391.577-.392,1.323,0,1.902.896,1.325,2.96,3.549,6.706,3.549s5.809-2.224,6.705-3.549c.391-.578.391-1.324,0-1.902Zm-6.705,2.951c-1.105,0-2-.895-2-2s.895-2,2-2,2,.895,2,2-.895,2-2,2Zm-8.362.072c-.852-1.262-.851-2.888.001-4.146,1.116-1.651,3.689-4.427,8.361-4.427,3.311,0,5.568,1.395,7,2.796V5c0-2.761-2.239-5-5-5H5C2.239,0,0,2.239,0,5v13c0,2.761,2.239,5,5,5h4.797c-.489-.506-.872-1.004-1.159-1.428Zm2.362-16.572h7c.552,0,1,.448,1,1s-.448,1-1,1h-7c-.552,0-1-.448-1-1s.448-1,1-1Zm0,5h7c.552,0,1,.448,1,1s-.448,1-1,1h-7c-.552,0-1-.448-1-1s.448-1,1-1Zm-4.5-5.5c.828,0,1.5.672,1.5,1.5s-.672,1.5-1.5,1.5-1.5-.672-1.5-1.5.672-1.5,1.5-1.5Zm0,5c.828,0,1.5.672,1.5,1.5s-.672,1.5-1.5,1.5-1.5-.672-1.5-1.5.672-1.5,1.5-1.5Zm0,8c-.828,0-1.5-.672-1.5-1.5s.672-1.5,1.5-1.5,1.5.672,1.5,1.5-.672,1.5-1.5,1.5Z\"/></svg>',\n  wrench:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z\"/></svg>',\n} as const;\n","// The Navigation icon set — inlined SVG (no .svg text-loader dependency) so the\n// package ships self-contained. Single-colour SVGs using `currentColor`, so\n// each icon inherits `color` from its host. Hand-maintained; keys are kebab-case.\nexport const NAV_ICONS = {\n  absence:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9.5 1.5 14.5 6.5M14.5 1.5 9.5 6.5\"/><path d=\"M9 11v-1a4 4 0 0 1 6 0v1\"/><rect x=\"2.5\" y=\"11\" width=\"19\" height=\"2.6\" rx=\"0.7\"/><path d=\"M4.5 13.6V22M19.5 13.6V22\"/><path d=\"M7.5 16.6h9M8.5 16.6V22M15.5 16.6V22\"/></svg>',\n  bell: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9\"/><path d=\"M13.73 21a2 2 0 0 1-3.46 0\"/></svg>',\n  company:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"7\" width=\"18\" height=\"14\" rx=\"2\"/><path d=\"M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M3 13h18\"/></svg>',\n  contracts:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2.5\" y=\"2.5\" width=\"12\" height=\"17\" rx=\"2\"/><path d=\"M5.5 6.5h3M5.5 9.5h5.5M5.5 12.5h5.5\"/><path d=\"M5.5 15.8l1.6 1.6 3-3.4\"/><path d=\"M12 20.5 14.59 19.16 21.28 8.29 18.72 6.71 12.03 17.58Z\"/><path d=\"M12.03 17.58 14.59 19.16M17.94 7.99 20.49 9.56\"/></svg>',\n  help: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\"/><line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"/></svg>',\n  home: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 11l9-8 9 8v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1z\"/></svg>',\n  login:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><g transform=\"translate(24,0) scale(-1,1)\"><path d=\"M24,1.5V22.5c0,.83-.67,1.5-1.5,1.5s-1.5-.67-1.5-1.5V1.5c0-.83,.67-1.5,1.5-1.5s1.5,.67,1.5,1.5Zm-6.5,9H4.25l3.33-3.46c.57-.6,.56-1.55-.04-2.12-.6-.58-1.55-.56-2.12,.04L1.03,9.52c-.66,.66-1.03,1.54-1.03,2.48s.36,1.81,1.01,2.45l4.41,4.59c.29,.31,.69,.46,1.08,.46s.75-.14,1.04-.42c.6-.57,.62-1.52,.04-2.12l-3.33-3.46h13.25c.83,0,1.5-.67,1.5-1.5s-.67-1.5-1.5-1.5Z\"/></g></svg>',\n  logout:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M24,1.5V22.5c0,.83-.67,1.5-1.5,1.5s-1.5-.67-1.5-1.5V1.5c0-.83,.67-1.5,1.5-1.5s1.5,.67,1.5,1.5Zm-6.5,9H4.25l3.33-3.46c.57-.6,.56-1.55-.04-2.12-.6-.58-1.55-.56-2.12,.04L1.03,9.52c-.66,.66-1.03,1.54-1.03,2.48s.36,1.81,1.01,2.45l4.41,4.59c.29,.31,.69,.46,1.08,.46s.75-.14,1.04-.42c.6-.57,.62-1.52,.04-2.12l-3.33-3.46h13.25c.83,0,1.5-.67,1.5-1.5s-.67-1.5-1.5-1.5Z\"/></svg>',\n  music:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 17V5l10-2v12\"/><circle cx=\"7\" cy=\"17\" r=\"2.5\"/><circle cx=\"17\" cy=\"15\" r=\"2.5\"/></svg>',\n  \"org-chart\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3h7zM7 9H4V5h3v4zm10 6h3v4h-3v-4zm0-10v4h3V5h-3z\"/></svg>',\n  planning:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3.25\" y=\"5\" width=\"17.5\" height=\"15.5\" rx=\"2.25\"/><path d=\"M3.25 9h17.5\"/><path d=\"M7.5 5V3.2M12 5V3.2M16.5 5V3.2\"/><circle cx=\"7.5\" cy=\"2.5\" r=\"1.1\"/><circle cx=\"12\" cy=\"2.5\" r=\"1.1\"/><circle cx=\"16.5\" cy=\"2.5\" r=\"1.1\"/><path d=\"M7.9 11.05 10.6 13.75M10.6 11.05 7.9 13.75\"/><rect x=\"13.15\" y=\"10.8\" width=\"3.2\" height=\"3.2\" rx=\"0.6\"/><rect x=\"7.65\" y=\"15.4\" width=\"3.2\" height=\"3.2\" rx=\"0.6\"/><path d=\"M13.4 15.65 16.1 18.35M16.1 15.65 13.4 18.35\"/></svg>',\n  program:\n    '<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m20 0h-16c-2.206 0-4 1.794-4 4v16c0 2.206 1.794 4 4 4h16c2.206 0 4-1.794 4-4v-16c0-2.206-1.794-4-4-4zm-3 6v5h-5v-5zm6 0v5h-5v-5zm-12 5h-5v-5h5zm-5 1h5v5h-5zm0 6h5v5h-5zm6 0h5v5h-5zm0-1v-5h5v5zm6-5h5v5h-5zm5-8v1h-17v-4h14c1.654 0 3 1.346 3 3zm-19-3h1v4h-4v-1c0-1.654 1.346-3 3-3zm-3 19v-14h4v17h-1c-1.654 0-3-1.346-3-3zm19 3h-2v-5h5v2c0 1.654-1.346 3-3 3zm-13.392-14.814c.189-.202.507-.21.707-.021l.853.804c.038.038.084.037.112.01l1.381-1.332c.199-.192.516-.186.707.013.192.199.186.516-.013.707l-1.375 1.325c-.205.205-.477.308-.749.308-.274 0-.55-.104-.76-.314l-.842-.794c-.201-.189-.21-.506-.021-.707zm15.759 11.475c.192.199.186.516-.013.707l-1.375 1.325c-.205.205-.477.308-.749.308-.274 0-.55-.104-.76-.314l-.842-.794c-.201-.189-.21-.506-.021-.707s.507-.21.707-.021l.853.804c.039.037.083.038.112.01l1.381-1.332c.2-.191.516-.185.707.013zm-6.013-5.293-1.375 1.325c-.205.205-.477.308-.749.308-.274 0-.55-.104-.76-.314l-.842-.794c-.201-.189-.21-.506-.021-.707.188-.201.506-.211.707-.021l.853.804c.039.038.083.037.112.01l1.381-1.332c.199-.191.516-.186.707.013.192.199.186.516-.013.707z\"/></svg>',\n  settings:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"3\"/><path d=\"M19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-1.8-.3 1.6 1.6 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.6 1.6 0 0 0-1-1.5 1.6 1.6 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.6 1.6 0 0 0 .3-1.8 1.6 1.6 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1A1.6 1.6 0 0 0 4.6 9a1.6 1.6 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.8.3H9a1.6 1.6 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.6 1.6 0 0 0 1 1.5 1.6 1.6 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.8V9a1.6 1.6 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1z\"/></svg>',\n  show: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"13\" rx=\"2\"/><path d=\"M8 21h8M12 17v4\"/></svg>',\n  stats:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 20h18\"/><rect x=\"5\" y=\"10\" width=\"3\" height=\"10\"/><rect x=\"10.5\" y=\"6\" width=\"3\" height=\"14\"/><rect x=\"16\" y=\"13\" width=\"3\" height=\"7\"/></svg>',\n  \"theme-dark\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z\"/></svg>',\n  \"theme-light\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"5\"/><line x1=\"12\" y1=\"1\" x2=\"12\" y2=\"3\"/><line x1=\"12\" y1=\"21\" x2=\"12\" y2=\"23\"/><line x1=\"4.22\" y1=\"4.22\" x2=\"5.64\" y2=\"5.64\"/><line x1=\"18.36\" y1=\"18.36\" x2=\"19.78\" y2=\"19.78\"/><line x1=\"1\" y1=\"12\" x2=\"3\" y2=\"12\"/><line x1=\"21\" y1=\"12\" x2=\"23\" y2=\"12\"/><line x1=\"4.22\" y1=\"19.78\" x2=\"5.64\" y2=\"18.36\"/><line x1=\"18.36\" y1=\"5.64\" x2=\"19.78\" y2=\"4.22\"/></svg>',\n  timeline:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\"/><path d=\"M3 10h18M8 5v14M13 10v9\"/></svg>',\n  library:\n    '<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"32\" y=\"96\" width=\"64\" height=\"368\" rx=\"16\" ry=\"16\" style=\"fill:none;stroke:currentColor;stroke-linejoin:round;stroke-width:32px\"/><line x1=\"112\" y1=\"224\" x2=\"240\" y2=\"224\" style=\"fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px\"/><line x1=\"112\" y1=\"400\" x2=\"240\" y2=\"400\" style=\"fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px\"/><rect x=\"112\" y=\"160\" width=\"128\" height=\"304\" rx=\"16\" ry=\"16\" style=\"fill:none;stroke:currentColor;stroke-linejoin:round;stroke-width:32px\"/><rect x=\"256\" y=\"48\" width=\"96\" height=\"416\" rx=\"16\" ry=\"16\" style=\"fill:none;stroke:currentColor;stroke-linejoin:round;stroke-width:32px\"/><path d=\"M422.46,96.11l-40.4,4.25c-11.12,1.17-19.18,11.57-17.93,23.1l34.92,321.59c1.26,11.53,11.37,20,22.49,18.84l40.4-4.25c11.12-1.17,19.18-11.57,17.93-23.1L445,115C443.69,103.42,433.58,94.94,422.46,96.11Z\" style=\"fill:none;stroke:currentColor;stroke-linejoin:round;stroke-width:32px\"/></svg>',\n} as const;\n","// The commerce / e-commerce icon set — cart, catalogue, payment, fulfilment.\n// Inlined SVG (no .svg text-loader dependency) so the package ships\n// self-contained. Single-colour stroke SVGs using `currentColor`, so each icon\n// inherits `color` from its host. Hand-maintained; keys are kebab-case and unique\n// across categories. Feather/Lucide geometry (24×24, stroke-width 2, round joins).\nconst S =\n  '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">';\n\nexport const COMMERCE_ICONS = {\n  // ── Cart & checkout ─────────────────────────────────────────────\n  \"shopping-cart\": `${S}<circle cx=\"9\" cy=\"21\" r=\"1\"/><circle cx=\"20\" cy=\"21\" r=\"1\"/><path d=\"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6\"/></svg>`,\n  \"shopping-bag\": `${S}<path d=\"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z\"/><path d=\"M3 6h18\"/><path d=\"M16 10a4 4 0 0 1-8 0\"/></svg>`,\n  basket: `${S}<path d=\"M5.5 9h13l-1.13 9.06a2 2 0 0 1-1.98 1.94H8.61a2 2 0 0 1-1.98-1.94z\"/><path d=\"m8.5 9 3-6 3 6\"/><path d=\"M9.5 13v3\"/><path d=\"M14.5 13v3\"/></svg>`,\n\n  // ── Catalogue & products ────────────────────────────────────────\n  package: `${S}<path d=\"M16.5 9.4 7.5 4.21\"/><path d=\"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z\"/><path d=\"M3.27 6.96 12 12.01l8.73-5.05\"/><path d=\"M12 22.08V12\"/></svg>`,\n  \"package-check\": `${S}<path d=\"M16 16.5V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-3 1.73\"/><path d=\"M3.3 7 12 12l3-1.7\"/><path d=\"M12 22V12\"/><path d=\"M21 8.5V16a2 2 0 0 1-1 1.73l-7 4a2 2 0 0 1-1.5.24\"/><path d=\"m16.5 19.5 2 2 4-4\"/></svg>`,\n  tag: `${S}<path d=\"M20.59 13.41 13.42 20.58a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z\"/><path d=\"M7 7h.01\"/></svg>`,\n  tags: `${S}<path d=\"M9 5H4a2 2 0 0 0-2 2v5l7.59 7.59a2 2 0 0 0 2.82 0l4.18-4.18a2 2 0 0 0 0-2.82z\"/><path d=\"M6 9.5h.01\"/><path d=\"m14 4 6.59 6.59a2 2 0 0 1 0 2.82L16 18\"/></svg>`,\n  barcode: `${S}<path d=\"M3 5v14\"/><path d=\"M6.5 5v14\"/><path d=\"M10 5v14\"/><path d=\"M14 5v14\"/><path d=\"M17.5 5v14\"/><path d=\"M21 5v14\"/></svg>`,\n  \"qr-code\": `${S}<rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/><path d=\"M14 14h3v3h-3z\"/><path d=\"M20 14h1\"/><path d=\"M14 20h1\"/><path d=\"M20 17v4\"/><path d=\"M17 20h4\"/></svg>`,\n  gift: `${S}<path d=\"M20 12v9a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9\"/><rect x=\"2\" y=\"7\" width=\"20\" height=\"5\" rx=\"1\"/><path d=\"M12 22V7\"/><path d=\"M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z\"/><path d=\"M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z\"/></svg>`,\n\n  // ── Payment & billing ───────────────────────────────────────────\n  \"credit-card\": `${S}<rect x=\"2\" y=\"5\" width=\"20\" height=\"14\" rx=\"2\"/><path d=\"M2 10h20\"/></svg>`,\n  wallet: `${S}<path d=\"M20 12V7H5a2 2 0 0 1 0-4h13a1 1 0 0 1 1 1v3\"/><path d=\"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4\"/><path d=\"M18 12a2 2 0 0 0 0 4h4v-4z\"/></svg>`,\n  receipt: `${S}<path d=\"M4 2v20l2.5-1.5L9 22l2.5-1.5L14 22l2.5-1.5L19 22l1-1V2l-2.5 1.5L15 2l-2.5 1.5L10 2 7.5 3.5 5 2z\"/><path d=\"M8 8h8\"/><path d=\"M8 12h8\"/><path d=\"M8 16h5\"/></svg>`,\n  coins: `${S}<circle cx=\"8\" cy=\"8\" r=\"6\"/><path d=\"M18.09 10.37A6 6 0 1 1 10.34 18\"/><path d=\"M7 6h1v4\"/><path d=\"m16.71 13.88.7.71-2.82 2.82\"/></svg>`,\n  banknote: `${S}<rect x=\"2\" y=\"6\" width=\"20\" height=\"12\" rx=\"2\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/><path d=\"M6 12h.01\"/><path d=\"M18 12h.01\"/></svg>`,\n  percent: `${S}<path d=\"M19 5 5 19\"/><circle cx=\"6.5\" cy=\"6.5\" r=\"2.5\"/><circle cx=\"17.5\" cy=\"17.5\" r=\"2.5\"/></svg>`,\n\n  // ── Fulfilment & delivery ───────────────────────────────────────\n  truck: `${S}<path d=\"M14 18V6a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h1\"/><path d=\"M14 9h4l3 3v5a1 1 0 0 1-1 1h-1\"/><circle cx=\"6\" cy=\"18\" r=\"2\"/><circle cx=\"17\" cy=\"18\" r=\"2\"/><path d=\"M8 18h6\"/></svg>`,\n  store: `${S}<path d=\"M4 9.5V20a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V9.5\"/><path d=\"M2 9.5 3.6 4a1 1 0 0 1 1-.75h14.8a1 1 0 0 1 1 .75L22 9.5a3 3 0 0 1-6 0 3 3 0 0 1-6 0 3 3 0 0 1-6 0z\"/><path d=\"M9 21v-5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v5\"/></svg>`,\n  warehouse: `${S}<path d=\"M22 8.35V20a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V8.35a2 2 0 0 1 1.26-1.86l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35z\"/><path d=\"M6 10h12\"/><path d=\"M6 14h12\"/><path d=\"M6 18h12\"/></svg>`,\n  \"map-pin\": `${S}<path d=\"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z\"/><circle cx=\"12\" cy=\"10\" r=\"3\"/></svg>`,\n  \"package-return\": `${S}<path d=\"M9 14 4 9l5-5\"/><path d=\"M4 9h11a5 5 0 0 1 5 5v0a5 5 0 0 1-5 5h-4\"/></svg>`,\n} as const;\n","// The Music / transport icon set — inlined SVG (no .svg text-loader dependency) so the\n// package ships self-contained. Single-colour SVGs using `currentColor`, so\n// each icon inherits `color` from its host. Hand-maintained; keys are kebab-case.\nexport const MUSIC_ICONS = {\n  \"fast-forward\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z\"/></svg>',\n  fire: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M16.074,3.781c-1.39-1.106-2.703-2.152-3.691-3.333L12.006-.002l-.384,.444c-1.491,1.722-1.905,3.821-2.238,5.508-.405,2.051-.654,3.037-1.884,3.037-.198,0-.35-.069-.492-.224-.607-.663-.687-2.586-.594-3.643l.123-1.403-.98,1.011c-1.418,1.463-4.057,4.186-4.057,8.771,0,5.79,4.71,10.5,10.5,10.5s10.5-4.71,10.5-10.5c0-4.603-3.267-7.204-6.426-9.719Zm-6.902,18.048c-1.56-1.562-1.56-4.101-.022-5.639l2.851-2.522,2.828,2.502c1.559,1.561,1.559,4.1,0,5.659-1.559,1.559-4.097,1.561-5.657,0Zm6.643,.365c1.642-1.962,1.563-4.888-.301-6.752l-3.513-3.11-3.536,3.13c-1.843,1.842-1.921,4.766-.279,6.731-3.343-1.473-5.685-4.813-5.685-8.694,0-3.233,1.37-5.396,2.888-7.122,.036,1.015,.221,2.338,.882,3.06,.329,.359,.753,.549,1.229,.549,2.107,0,2.476-1.867,2.865-3.844,.294-1.492,.624-3.164,1.655-4.595,.984,1.066,2.177,2.016,3.431,3.014,2.974,2.368,6.049,4.816,6.049,8.937,0,3.882-2.343,7.222-5.686,8.695Z\"/></svg>',\n  \"heart-border\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z\"/></svg>',\n  heart:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M17.5.917a6.4,6.4,0,0,0-5.5,3.3A6.4,6.4,0,0,0,6.5.917,6.8,6.8,0,0,0,0,7.967c0,6.775,10.956,14.6,11.422,14.932l.578.409.578-.409C13.044,22.569,24,14.742,24,7.967A6.8,6.8,0,0,0,17.5.917ZM12,20.846c-3.253-2.43-10-8.4-10-12.879a4.8,4.8,0,0,1,4.5-5.05A4.8,4.8,0,0,1,11,7.967h2a4.8,4.8,0,0,1,4.5-5.05A4.8,4.8,0,0,1,22,7.967C22,12.448,15.253,18.416,12,20.846Z\"/></svg>',\n  metronome:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m23.532,22.142c-.649,1.164-1.828,1.858-3.154,1.858H3.622c-1.326,0-2.505-.694-3.154-1.858-.655-1.173-.624-2.556.082-3.698L9.017,4.722c.578-.937,1.466-1.533,2.483-1.683V0h1v3.039c1.02.152,1.906.747,2.483,1.683l1.131,1.833-.589.949-1.392-2.256c-.494-.799-1.252-1.242-2.136-1.247-.878.005-1.636.448-2.13,1.247L1.4,18.969c-.512.83-.534,1.834-.059,2.687.47.842,1.323,1.345,2.281,1.345h16.756c.958,0,1.812-.503,2.281-1.345.475-.853.453-1.856-.059-2.687l-4.142-6.712.589-.949,4.403,7.135c.706,1.143.736,2.525.082,3.698Zm-9.247-8.852l6.462-10.401.85.527-6.491,10.449c.552.544.895,1.3.895,2.135,0,1.654-1.346,3-3,3s-3-1.346-3-3,1.346-3,3-3c.46,0,.895.104,1.285.29Zm.715,2.71c0-1.103-.897-2-2-2s-2,.897-2,2,.897,2,2,2,2-.897,2-2Z\"/></svg>',\n  microphone:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z\"/><path d=\"M19 10v2a7 7 0 0 1-14 0v-2\"/><line x1=\"12\" y1=\"19\" x2=\"12\" y2=\"23\"/><line x1=\"8\" y1=\"23\" x2=\"16\" y2=\"23\"/></svg>',\n  \"music-file\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m14.707,0H4.5c-1.379,0-2.5,1.121-2.5,2.5v21.5h20V7.293L14.707,0Zm.293,1.707l5.293,5.293h-5.293V1.707ZM3,23V2.5c0-.827.673-1.5,1.5-1.5h9.5v7h7v15H3Zm9-10.5v3.001c-.418-.314-.938-.501-1.5-.501-1.379,0-2.5,1.121-2.5,2.5s1.121,2.5,2.5,2.5,2.5-1.121,2.5-2.5v-5c0-.275.225-.5.5-.5h2.5v-1h-2.5c-.827,0-1.5.673-1.5,1.5Zm-1.5,6.5c-.827,0-1.5-.673-1.5-1.5s.673-1.5,1.5-1.5,1.5.673,1.5,1.5-.673,1.5-1.5,1.5Z\"/></svg>',\n  \"music-note\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 18V5l12-2v13\"/><circle cx=\"6\" cy=\"18\" r=\"3\"/><circle cx=\"18\" cy=\"16\" r=\"3\"/></svg>',\n  mute: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51A8.796 8.796 0 0 0 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06a8.99 8.99 0 0 0 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z\"/></svg>',\n  \"next-track\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M16 6h2v12h-2zM6 18l8.5-6L6 6z\"/></svg>',\n  pause:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M6 4h4v16H6zM14 4h4v16h-4z\"/></svg>',\n  \"play-circle\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z\"/></svg>',\n  play: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19.765,9.458,4.98.019v24l14.779-9.473a3.007,3.007,0,0,0,.006-5.088Zm-1.08,3.395-11.7,7.5V3.677l11.707,7.474a1,1,0,0,1-.007,1.7Z\"/></svg>',\n  \"prev-track\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M6 6h2v12H6zm3.5 6l8.5 6V6z\"/></svg>',\n  repeat:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z\"/></svg>',\n  rewind:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z\"/></svg>',\n  volume:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z\"/></svg>',\n  waveform:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M2 20h.01M7 20v-4M12 20v-8M17 20V8M22 4v16\"/></svg>',\n} as const;\n","// The Status icon set — inlined SVG (no .svg text-loader dependency) so the\n// package ships self-contained. Single-colour SVGs using `currentColor`, so\n// each icon inherits `color` from its host. Hand-maintained; keys are kebab-case.\nexport const STATUS_ICONS = {\n  alert:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"12\" y1=\"7\" x2=\"12\" y2=\"13\"/><line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"/></svg>',\n  award:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m23.664,0h-8.475l-2.97,6.003c-.073-.002-.146-.003-.22-.003-.076,0-.152,0-.228.003L8.811,0H.324l4.637,9.399c-1.227,1.538-1.961,3.486-1.961,5.601,0,4.962,4.038,9,9,9s9-4.038,9-9c0-2.121-.738-4.072-1.97-5.612L23.664,0Zm-7.854,1h6.243l-3.751,7.582c-1.334-1.311-3.074-2.209-5.011-2.489l2.52-5.093ZM1.933,1h6.256l2.513,5.094c-1.943.282-3.686,1.186-5.021,2.504L1.933,1Zm18.067,14c0,4.411-3.589,8-8,8s-8-3.589-8-8S7.589,7,12,7s8,3.589,8,8Zm-7.244-5.135h-1.494l-.897,3.135h-3.365v1.453l2.318,1.336-1.081,2.955,1.158.86,2.614-2.074,2.609,2.093,1.205-.831-1.171-2.969,2.347-1.377v-1.445h-3.347l-.896-3.135Zm.652,5.528l1.14,2.892-2.536-2.034-2.535,2.011,1.067-2.919-2.328-1.343h2.902l.89-3.11.89,3.11h2.884l-2.375,1.393Z\"/></svg>',\n  clock:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12,24C5.383,24,0,18.617,0,12S5.383,0,12,0s12,5.383,12,12-5.383,12-12,12ZM12,1C5.935,1,1,5.935,1,12s4.935,11,11,11,11-4.935,11-11S18.065,1,12,1Zm5,11.5c0-.276-.224-.5-.5-.5h-4.5V5.5c0-.276-.224-.5-.5-.5s-.5,.224-.5,.5v7c0,.276,.224,.5,.5,.5h5c.276,0,.5-.224,.5-.5Z\"/></svg>',\n  completed:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m13,11h4v1h-4v-1ZM21,2v19.5c0,1.378-1.121,2.5-2.5,2.5H5.5c-1.379,0-2.5-1.122-2.5-2.5V2h5.05c.232-1.14,1.243-2,2.45-2h3c1.207,0,2.218.86,2.45,2h5.05Zm-1,1h-5v-.5c0-.827-.673-1.5-1.5-1.5h-3c-.827,0-1.5.673-1.5,1.5v.5h-5v18.5c0,.827.673,1.5,1.5,1.5h13c.827,0,1.5-.673,1.5-1.5V3Zm-11.216,7.952c-.056.056-.18.055-.241-.006l-1.778-1.721-.695.719,1.772,1.716c.221.22.514.341.825.341s.604-.122.821-.339l3.362-3.305-.701-.713-3.365,3.308Zm4.216,7.048h4v-1h-4v1Zm-4.216-1.048c-.056.057-.18.055-.241-.006l-1.778-1.721-.695.719,1.772,1.716c.221.22.514.341.825.341s.604-.122.821-.339l3.362-3.305-.701-.713-3.365,3.308Z\"/></svg>',\n  diamond:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m23.517,6.252l-3.691-5.167c-.485-.679-1.273-1.085-2.108-1.085H6.282c-.835,0-1.623.406-2.108,1.085L.483,6.252c-.665.931-.636,2.208.07,3.105l11.447,14.657,11.446-14.655c.707-.899.736-2.177.071-3.107Zm-4.504-4.585s3.764,5.276,3.795,5.333h-5.951l-2.065-6h2.926c.513,0,.997.249,1.295.667Zm-10.812,5.333l2.065-6h3.468l2.065,6h-7.598Zm7.626,1l-3.827,12.675-3.827-12.675h7.653ZM4.987,1.667c.298-.418.782-.667,1.295-.667h2.926l-2.065,6H1.193c.031-.057,3.795-5.333,3.795-5.333Zm-3.967,6.333h6.108l4.013,13.29L1.34,8.74c-.173-.219-.279-.475-.319-.74Zm11.838,13.291l4.013-13.291h6.108c-.04.265-.147.522-.32.742l-9.801,12.548Z\"/></svg>',\n  info: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"11\"/><line x1=\"12\" y1=\"8\" x2=\"12.01\" y2=\"8\"/></svg>',\n  lightning:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M11.762,24h-3.493l3.5-9H5c-.659,0-1.262-.304-1.655-.833-.393-.529-.509-1.195-.318-1.826L8.39,0h8.875l-3.5,8h5.201c.761,0,1.43,.4,1.79,1.071s.324,1.45-.097,2.084l-8.897,12.845Zm-2.031-1h1.507l8.593-12.406c.208-.314,.227-.71,.043-1.05-.183-.341-.522-.544-.909-.544h-6.73L15.735,1h-6.69L3.964,12.686c-.078,.271-.019,.613,.184,.886,.203,.272,.513,.429,.853,.429H13.231l-3.5,9Z\"/></svg>',\n  \"offline-bolt\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2.02c-5.51 0-9.98 4.47-9.98 9.98s4.47 9.98 9.98 9.98 9.98-4.47 9.98-9.98S17.51 2.02 12 2.02zM11.48 20v-6.26H8L13 4v6.26h3.35L11.48 20z\"/></svg>',\n  shield:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"/></svg>',\n  warning:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"/><line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"/><line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"/></svg>',\n  \"x-circle\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"/><line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"/></svg>',\n  star: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M12 .587l3.668 7.431 8.2 1.192-5.934 5.783 1.401 8.169L12 18.897l-7.335 3.855 1.401-8.169L.132 9.21l8.2-1.192z\"/></svg>',\n} as const;\n","// The People icon set — inlined SVG (no .svg text-loader dependency) so the\n// package ships self-contained. Single-colour SVGs using `currentColor`, so\n// each icon inherits `color` from its host. Hand-maintained; keys are kebab-case.\nexport const PEOPLE_ICONS = {\n  briefcase:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2\" y=\"7\" width=\"20\" height=\"14\" rx=\"2\" ry=\"2\"/><path d=\"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16\"/></svg>',\n  \"give-rights\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m11,11c0-1.654-1.346-3-3-3H3c-1.654,0-3,1.346-3,3v2h11v-2Zm-5.5-4c1.93,0,3.5-1.57,3.5-3.5S7.43,0,5.5,0s-3.5,1.57-3.5,3.5,1.57,3.5,3.5,3.5Zm18.5,14v3h-13v-3c0-1.654,1.346-3,3-3h7c1.654,0,3,1.346,3,3Zm-6.5-4c2.481,0,4.5-2.019,4.5-4.5s-2.019-4.5-4.5-4.5-4.5,2.019-4.5,4.5,2.019,4.5,4.5,4.5Zm-9.081,1.594c.774.775.774,2.037,0,2.812l-2.507,2.507-1.414-1.414,1.498-1.498h-2.997c-1.654,0-3-1.346-3-3v-3h2v3c0,.552.449,1,1,1h3.006l-1.508-1.498,1.414-1.414,2.506,2.506Z\"/></svg>',\n  \"graduation-cap\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M2.5 9.5 12 5l9.5 4.5L12 14 2.5 9.5Z\"/><path d=\"M6 11.5v4.25c0 1.5 2.7 2.75 6 2.75s6-1.25 6-2.75V11.5\"/><path d=\"M21 9.5v5\"/></svg>',\n  \"group-lead\":\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M7,14c-2.21,0-4-1.79-4-4s1.79-4,4-4,4,1.79,4,4-1.79,4-4,4Zm7,10H0v-5c0-1.65,1.35-3,3-3H11c1.65,0,3,1.35,3,3v5ZM21,0H8c-1.65,0-3,1.35-3,3v1.35c.63-.22,1.3-.35,2-.35,2.74,0,5.05,1.84,5.77,4.35l2.23,2.23,3.59-3.59h-2.59v-2h4c1.1,0,2,.9,2,2v4h-2v-2.59l-5,5-2.15-2.15c-.23,1.06-.74,2.01-1.44,2.78,2.23,.18,4.05,1.81,4.49,3.96h8.1V3c0-1.65-1.35-3-3-3Z\"/></svg>',\n  king: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m21,24H3v-3.5c0-2.481,2.019-4.5,4.5-4.5h9c2.481,0,4.5,2.019,4.5,4.5v3.5Zm-3-16H6c0,3.309,2.691,6,6,6s6-2.691,6-6Zm-3-5l-3-3-3,3L6,0v6h12V0l-3,3Z\"/></svg>',\n  leader:\n    '<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m12 14c2.206 0 4-1.794 4-4s-1.794-4-4-4-4 1.794-4 4 1.794 4 4 4zm0-6c1.103 0 2 .897 2 2s-.897 2-2 2-2-.897-2-2 .897-2 2-2zm4-3h-8v-5l2 2.231 2-2.231 2 2.231 2-2.231zm2-3.376v2.396c2.423 1.827 4 4.719 4 7.981s-1.577 6.154-4 7.981v-.981c0-1.654-1.346-3-3-3h-6c-1.654 0-3 1.346-3 3v.981c-2.423-1.827-4-4.719-4-7.981s1.577-6.154 4-7.981v-2.396c-3.581 2.078-6 5.946-6 10.376 0 6.617 5.383 12 12 12s12-5.383 12-12c0-4.43-2.419-8.298-6-10.376zm-10 19.535v-2.159c0-.551.448-1 1-1h6c.552 0 1 .449 1 1v2.159c-1.226.538-2.578.841-4 .841s-2.774-.303-4-.841z\"/></svg>',\n  referral:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m16.664,11.497l-3.94,3.503,3.94,3.503-1.328,1.494-4.497-3.997h-1.838v-2h1.838l4.497-3.997,1.328,1.494Zm-13.164-.497c1.381,0,2.5-1.119,2.5-2.5s-1.119-2.5-2.5-2.5-2.5,1.119-2.5,2.5,1.119,2.5,2.5,2.5Zm1.5,1h-3c-1.103,0-2,.897-2,2v2h7v-2c0-1.103-.897-2-2-2Zm15.5-7c1.381,0,2.5-1.119,2.5-2.5s-1.119-2.5-2.5-2.5-2.5,1.119-2.5,2.5,1.119,2.5,2.5,2.5Zm1.5,1h-3c-1.103,0-2,.897-2,2v2h7v-2c0-1.103-.897-2-2-2Zm1,10.5c0-1.381-1.119-2.5-2.5-2.5s-2.5,1.119-2.5,2.5,1.119,2.5,2.5,2.5,2.5-1.119,2.5-2.5Zm-1,3.5h-3c-1.103,0-2,.897-2,2v2h7v-2c0-1.103-.897-2-2-2Z\"/></svg>',\n  user: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"/></svg>',\n  team: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M18,8c-2.206,0-4-1.794-4-4S15.794,0,18,0s4,1.794,4,4-1.794,4-4,4Zm-6,7c-2.206,0-4-1.794-4-4s1.794-4,4-4,4,1.794,4,4-1.794,4-4,4Zm-6-7c-2.206,0-4-1.794-4-4S3.794,0,6,0s4,1.794,4,4-1.794,4-4,4Zm12,14v-2.5c0-1.93-1.57-3.5-3.5-3.5h-5c-1.93,0-3.5,1.57-3.5,3.5v2.5H0v2H24v-2h-6ZM7.157,14.532c-.726-.991-1.157-2.211-1.157-3.532,0-.341,.035-.674,.09-1H3.5c-1.933,0-3.5,1.567-3.5,3.5v2.5H5.261c.513-.62,1.161-1.12,1.896-1.468Zm13.343-4.532h-2.59c.055,.326,.09,.659,.09,1,0,1.321-.431,2.54-1.157,3.532,.734,.348,1.383,.849,1.896,1.468h5.261v-2.5c0-1.933-1.567-3.5-3.5-3.5Z\"/></svg>',\n  work: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z\"/></svg>',\n} as const;\n","// The Brand icon set — inlined SVG (no .svg text-loader dependency) so the\n// package ships self-contained. Single-colour SVGs using `currentColor`, so\n// each icon inherits `color` from its host. Hand-maintained; keys are kebab-case.\nexport const BRANDS_ICONS = {\n  discord:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028 14.09 14.09 0 001.226-1.994.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z\"/></svg>',\n  slack:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z\"/></svg>',\n  teams:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19.404 4.5a2.25 2.25 0 110 4.5 2.25 2.25 0 010-4.5zM12 3a3.75 3.75 0 110 7.5A3.75 3.75 0 0112 3zm-9.404 1.5a2.25 2.25 0 110 4.5 2.25 2.25 0 010-4.5zM21 11.25h-3.75a1.5 1.5 0 00-1.5 1.5v6.75A4.5 4.5 0 0020.25 24a3.75 3.75 0 003.75-3.75v-7.5A1.5 1.5 0 0021 11.25zM14.25 12.75v6.75A4.5 4.5 0 019.75 24h-.5A4.5 4.5 0 014.75 19.5v-6.75a1.5 1.5 0 011.5-1.5h6.5a1.5 1.5 0 011.5 1.5z\"/></svg>',\n  telegram:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M11.944 0A12 12 0 000 12a12 12 0 0012 12 12 12 0 0012-12A12 12 0 0012 0a12 12 0 00-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 01.171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z\"/></svg>',\n  whatsapp:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z\"/></svg>',\n  github:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222 0 1.606-.014 2.898-.014 3.293 0 .322.216.694.825.576C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"/></svg>',\n  linkedin:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.225 0z\"/></svg>',\n  fold: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 511 511\" fill=\"currentColor\"><path d=\"M509.807,159.545c0.016-0.026,0.036-0.047,0.052-0.073c0.033-0.053,0.058-0.108,0.09-0.162 c0.078-0.131,0.153-0.263,0.222-0.399c0.047-0.091,0.09-0.183,0.132-0.275c0.06-0.129,0.116-0.259,0.169-0.391 c0.042-0.105,0.08-0.211,0.116-0.317c0.041-0.121,0.081-0.242,0.116-0.366c0.035-0.122,0.066-0.244,0.094-0.367 c0.026-0.111,0.05-0.223,0.071-0.336c0.025-0.138,0.046-0.275,0.063-0.413c0.013-0.103,0.026-0.207,0.034-0.312 c0.013-0.149,0.019-0.298,0.023-0.447c0.002-0.064,0.01-0.126,0.01-0.19c0-0.038-0.005-0.076-0.006-0.114 c-0.002-0.141-0.011-0.282-0.021-0.423c-0.008-0.114-0.015-0.228-0.029-0.341c-0.014-0.116-0.034-0.231-0.053-0.346 c-0.022-0.132-0.043-0.265-0.071-0.394c-0.021-0.094-0.048-0.187-0.072-0.28c-0.038-0.144-0.075-0.288-0.12-0.428 c-0.028-0.086-0.062-0.17-0.093-0.255c-0.052-0.141-0.102-0.281-0.162-0.418c-0.041-0.095-0.089-0.186-0.135-0.279 c-0.059-0.12-0.115-0.241-0.18-0.358c-0.062-0.112-0.131-0.219-0.199-0.328c-0.058-0.093-0.113-0.187-0.175-0.276 c-0.082-0.119-0.172-0.234-0.261-0.349c-0.058-0.075-0.113-0.151-0.174-0.224c-0.093-0.111-0.193-0.216-0.293-0.322 c-0.068-0.072-0.134-0.146-0.205-0.216c-0.093-0.091-0.192-0.177-0.29-0.264c-0.09-0.08-0.18-0.16-0.274-0.235 c-0.086-0.069-0.176-0.133-0.265-0.198c-0.117-0.086-0.234-0.169-0.356-0.248c-0.031-0.02-0.059-0.044-0.091-0.063l-64-40 c-0.044-0.027-0.089-0.048-0.133-0.074c-0.089-0.053-0.176-0.107-0.267-0.156c-0.056-0.03-0.112-0.058-0.168-0.086 c-0.09-0.046-0.181-0.088-0.273-0.13c-0.073-0.034-0.145-0.069-0.22-0.101c-0.052-0.022-0.104-0.041-0.156-0.061 c-0.122-0.048-0.244-0.092-0.367-0.133c-0.045-0.015-0.087-0.035-0.133-0.049c-0.014-0.004-0.028-0.007-0.041-0.011 c-0.044-0.013-0.088-0.024-0.132-0.037c-0.143-0.042-0.286-0.077-0.43-0.11c-0.055-0.012-0.109-0.029-0.164-0.04 c-0.036-0.007-0.072-0.01-0.108-0.017c-0.146-0.027-0.292-0.049-0.439-0.068c-0.105-0.013-0.21-0.026-0.316-0.035 c-0.129-0.011-0.257-0.017-0.386-0.021c-0.123-0.004-0.246-0.007-0.368-0.005c-0.112,0.002-0.223,0.008-0.335,0.015 c-0.044,0.003-0.088,0.003-0.132,0.006c-0.029,0.002-0.058,0.001-0.087,0.004c-0.061,0.006-0.121,0.017-0.181,0.024 c-0.103,0.012-0.206,0.028-0.309,0.044c-0.034,0.005-0.068,0.009-0.101,0.015c-0.046,0.008-0.092,0.011-0.137,0.02 c-0.056,0.011-0.11,0.027-0.165,0.039c-0.103,0.022-0.205,0.049-0.308,0.075c-0.128,0.033-0.255,0.067-0.38,0.107 c-0.11,0.035-0.218,0.074-0.326,0.114c-0.08,0.029-0.161,0.054-0.239,0.086c-0.033,0.013-0.065,0.031-0.098,0.045 c-0.117,0.049-0.231,0.104-0.345,0.159c-0.078,0.038-0.158,0.073-0.235,0.113c-0.008,0.004-0.017,0.007-0.025,0.012l-114.566,61.102 l-68.1-83.234c-0.003-0.004-0.007-0.007-0.01-0.011c-0.021-0.026-0.043-0.051-0.065-0.077c-0.053-0.063-0.111-0.12-0.166-0.181 c-0.106-0.118-0.212-0.237-0.326-0.348c-0.066-0.065-0.139-0.124-0.208-0.186c-0.109-0.099-0.216-0.199-0.331-0.292 c-0.109-0.087-0.225-0.166-0.338-0.248c-0.009-0.006-0.017-0.013-0.026-0.019c-0.075-0.053-0.147-0.111-0.224-0.162 c-0.115-0.076-0.238-0.142-0.358-0.212c-0.091-0.053-0.18-0.11-0.273-0.159c-0.112-0.059-0.23-0.108-0.346-0.161 c-0.107-0.049-0.212-0.103-0.321-0.147c-0.104-0.042-0.212-0.075-0.319-0.112c-0.127-0.045-0.253-0.092-0.382-0.13 c-0.016-0.005-0.032-0.012-0.048-0.016c-0.114-0.033-0.228-0.053-0.342-0.08c-0.103-0.024-0.205-0.052-0.31-0.072 c-0.044-0.008-0.087-0.018-0.131-0.026L24.818,44.114c-0.074-0.013-0.147-0.017-0.221-0.028c-0.135-0.02-0.269-0.039-0.404-0.052 c-0.124-0.012-0.246-0.018-0.369-0.023c-0.117-0.005-0.234-0.009-0.351-0.009c-0.134,0-0.267,0.005-0.4,0.013 c-0.108,0.006-0.217,0.014-0.325,0.024c-0.134,0.013-0.267,0.031-0.399,0.052c-0.11,0.017-0.219,0.036-0.328,0.057 c-0.126,0.025-0.25,0.054-0.374,0.086c-0.115,0.029-0.23,0.061-0.344,0.096c-0.115,0.035-0.227,0.073-0.34,0.114 c-0.119,0.043-0.236,0.088-0.353,0.137c-0.108,0.045-0.213,0.094-0.319,0.144c-0.114,0.054-0.227,0.11-0.339,0.17 c-0.109,0.059-0.215,0.121-0.32,0.185c-0.101,0.061-0.202,0.123-0.301,0.189c-0.116,0.078-0.228,0.16-0.339,0.244 c-0.058,0.044-0.12,0.082-0.177,0.128c-0.027,0.021-0.049,0.045-0.076,0.067c-0.112,0.092-0.219,0.19-0.326,0.289 c-0.077,0.071-0.156,0.141-0.23,0.215c-0.096,0.096-0.185,0.198-0.276,0.299c-0.075,0.084-0.152,0.166-0.222,0.252 c-0.08,0.098-0.154,0.202-0.229,0.305c-0.07,0.095-0.142,0.189-0.207,0.286c-0.068,0.103-0.129,0.21-0.192,0.317 c-0.062,0.104-0.126,0.206-0.182,0.312c-0.056,0.106-0.105,0.217-0.156,0.326c-0.053,0.113-0.108,0.225-0.155,0.34 c-0.044,0.106-0.08,0.216-0.119,0.325c-0.044,0.124-0.09,0.248-0.127,0.374c-0.031,0.104-0.056,0.212-0.083,0.319 c-0.034,0.136-0.068,0.271-0.094,0.408c-0.007,0.035-0.018,0.069-0.024,0.104c-0.014,0.076-0.018,0.151-0.029,0.227 c-0.019,0.132-0.038,0.264-0.05,0.397c-0.012,0.124-0.018,0.247-0.023,0.37c-0.005,0.118-0.009,0.236-0.009,0.354 c0,0.132,0.006,0.263,0.013,0.394c0.006,0.111,0.014,0.221,0.025,0.332c0.013,0.132,0.031,0.262,0.051,0.392 c0.017,0.112,0.037,0.224,0.059,0.335c0.025,0.124,0.053,0.246,0.085,0.368c0.03,0.117,0.062,0.233,0.097,0.349 c0.035,0.113,0.073,0.225,0.113,0.336c0.043,0.119,0.088,0.238,0.137,0.355c0.045,0.107,0.093,0.213,0.143,0.318 c0.054,0.114,0.11,0.227,0.17,0.339c0.058,0.109,0.121,0.214,0.184,0.32c0.061,0.102,0.123,0.203,0.19,0.302 c0.077,0.115,0.159,0.226,0.242,0.336c0.044,0.059,0.082,0.121,0.129,0.179l47.852,59.815H7.5c-0.068,0-0.133,0.008-0.2,0.01 c-0.138,0.004-0.276,0.01-0.414,0.021c-0.121,0.01-0.241,0.024-0.36,0.039c-0.117,0.015-0.234,0.033-0.35,0.053 c-0.132,0.023-0.262,0.051-0.391,0.081c-0.104,0.024-0.207,0.051-0.31,0.08c-0.133,0.037-0.263,0.077-0.393,0.122 c-0.101,0.034-0.201,0.071-0.301,0.11c-0.123,0.048-0.244,0.098-0.363,0.152c-0.106,0.048-0.211,0.099-0.315,0.152 c-0.107,0.055-0.213,0.111-0.317,0.171c-0.111,0.063-0.22,0.13-0.328,0.199c-0.093,0.06-0.184,0.121-0.274,0.184 c-0.11,0.077-0.217,0.158-0.323,0.242c-0.086,0.068-0.169,0.137-0.251,0.208c-0.099,0.086-0.197,0.174-0.292,0.265 c-0.087,0.083-0.17,0.168-0.253,0.255c-0.082,0.086-0.162,0.174-0.24,0.265c-0.091,0.106-0.178,0.215-0.263,0.326 c-0.041,0.053-0.085,0.1-0.125,0.154c-0.023,0.032-0.041,0.065-0.063,0.097c-0.086,0.122-0.165,0.247-0.244,0.373 c-0.053,0.086-0.108,0.172-0.157,0.259c-0.069,0.123-0.132,0.249-0.195,0.376c-0.048,0.097-0.097,0.194-0.141,0.292 c-0.052,0.118-0.097,0.239-0.143,0.36c-0.042,0.111-0.086,0.222-0.123,0.335c-0.036,0.111-0.066,0.225-0.097,0.339 c-0.035,0.126-0.07,0.252-0.097,0.379c-0.023,0.105-0.039,0.212-0.058,0.318c-0.024,0.139-0.048,0.278-0.064,0.418 c-0.012,0.101-0.018,0.203-0.025,0.306c-0.011,0.147-0.02,0.295-0.022,0.442C0.005,123.419,0,123.457,0,123.497 c0,0.068,0.008,0.133,0.01,0.2c0.004,0.138,0.009,0.276,0.021,0.414c0.01,0.121,0.024,0.24,0.039,0.36 c0.015,0.118,0.033,0.235,0.054,0.351c0.023,0.131,0.051,0.261,0.081,0.39c0.025,0.105,0.051,0.209,0.08,0.312 c0.037,0.132,0.077,0.261,0.121,0.39c0.035,0.103,0.072,0.204,0.112,0.305c0.047,0.121,0.097,0.241,0.15,0.359 c0.049,0.108,0.101,0.215,0.154,0.321c0.054,0.105,0.109,0.209,0.167,0.311c0.064,0.113,0.133,0.224,0.203,0.334 c0.058,0.091,0.118,0.181,0.18,0.269c0.078,0.111,0.16,0.22,0.245,0.327c0.067,0.084,0.135,0.167,0.205,0.248 c0.086,0.1,0.175,0.198,0.268,0.294c0.082,0.086,0.167,0.169,0.254,0.251c0.087,0.082,0.174,0.163,0.266,0.242 c0.106,0.091,0.215,0.177,0.325,0.262c0.053,0.041,0.1,0.085,0.155,0.125l172.304,125.312l-31.29,203.386 c-0.004,0.024-0.007,0.048-0.011,0.073l-0.004,0.024c-0.005,0.031-0.005,0.061-0.009,0.092c-0.03,0.213-0.054,0.426-0.066,0.638 c-0.005,0.084-0.002,0.166-0.004,0.249c-0.003,0.159-0.007,0.318-0.001,0.476c0.005,0.124,0.019,0.245,0.03,0.367 c0.011,0.116,0.018,0.232,0.034,0.347c0.02,0.143,0.049,0.284,0.077,0.425c0.019,0.094,0.034,0.189,0.057,0.282 c0.034,0.144,0.077,0.284,0.119,0.425c0.027,0.091,0.052,0.182,0.083,0.272c0.045,0.13,0.097,0.257,0.149,0.385 c0.04,0.099,0.078,0.199,0.123,0.296c0.05,0.109,0.106,0.215,0.161,0.321c0.058,0.112,0.114,0.224,0.177,0.333 c0.051,0.088,0.108,0.172,0.162,0.258c0.076,0.12,0.152,0.24,0.236,0.356c0.053,0.073,0.11,0.143,0.165,0.214 c0.093,0.12,0.186,0.239,0.287,0.354c0.06,0.068,0.125,0.132,0.187,0.199c0.102,0.108,0.203,0.216,0.312,0.318 c0.081,0.076,0.168,0.147,0.253,0.22c0.096,0.083,0.191,0.167,0.292,0.245c0.123,0.096,0.253,0.183,0.383,0.271 c0.071,0.048,0.138,0.099,0.21,0.144c0.181,0.114,0.369,0.218,0.561,0.317c0.027,0.014,0.051,0.03,0.078,0.044 c0.003,0.001,0.006,0.002,0.009,0.004c0.253,0.126,0.514,0.238,0.783,0.336c0.067,0.024,0.135,0.041,0.202,0.063 c0.184,0.061,0.37,0.119,0.561,0.166c0.126,0.031,0.252,0.053,0.378,0.078c0.094,0.018,0.185,0.043,0.281,0.058 c0.032,0.005,0.063,0.003,0.095,0.007c0.347,0.049,0.694,0.082,1.04,0.082c0.004,0,0.008-0.001,0.011-0.001c0.001,0,0.003,0,0.004,0 c0.31,0,0.615-0.026,0.918-0.064c0.06-0.008,0.119-0.015,0.179-0.024c0.619-0.092,1.217-0.261,1.783-0.498 c0.055-0.023,0.109-0.045,0.163-0.069c0.274-0.122,0.541-0.258,0.798-0.412c0.047-0.028,0.091-0.06,0.137-0.089 c0.216-0.136,0.424-0.283,0.625-0.439c0.06-0.046,0.12-0.091,0.178-0.139c0.223-0.185,0.435-0.384,0.636-0.595 c0.05-0.053,0.098-0.108,0.147-0.162c0.202-0.224,0.394-0.458,0.569-0.706c0.005-0.008,0.012-0.015,0.017-0.022 c0.189-0.272,0.356-0.56,0.509-0.858c0.012-0.024,0.029-0.045,0.041-0.069l54.781-109.563l181.501-78.913 c0.049-0.021,0.093-0.048,0.141-0.07c0.145-0.067,0.288-0.137,0.429-0.213c0.013-0.007,0.027-0.013,0.041-0.02 c0.023-0.012,0.046-0.021,0.069-0.034c0.052-0.029,0.1-0.064,0.152-0.094c0.113-0.067,0.225-0.137,0.334-0.21 c0.072-0.048,0.145-0.093,0.215-0.143c0.027-0.019,0.052-0.041,0.079-0.061c0.082-0.06,0.162-0.123,0.241-0.187 c0.019-0.015,0.041-0.025,0.06-0.041c0.019-0.016,0.036-0.034,0.055-0.05c0.07-0.058,0.137-0.117,0.204-0.178 c0.066-0.06,0.13-0.122,0.194-0.183c0.004-0.004,0.008-0.007,0.012-0.011c0.028-0.027,0.058-0.05,0.086-0.078 c0.021-0.021,0.04-0.043,0.061-0.064c0.05-0.052,0.099-0.104,0.148-0.157c0.062-0.068,0.121-0.138,0.181-0.208 c0.058-0.067,0.118-0.133,0.173-0.202c0.032-0.04,0.062-0.08,0.093-0.12c0.025-0.032,0.05-0.064,0.074-0.096 c0.026-0.036,0.049-0.074,0.075-0.11c0.008-0.011,0.015-0.023,0.023-0.034c0.058-0.082,0.118-0.163,0.172-0.247 c0.017-0.027,0.034-0.053,0.051-0.08c0.058-0.093,0.111-0.189,0.165-0.284c0.051-0.09,0.104-0.178,0.151-0.269 c0.002-0.004,0.005-0.008,0.007-0.013c0.007-0.014,0.014-0.028,0.021-0.042c0.054-0.107,0.102-0.219,0.151-0.329 c0.04-0.09,0.083-0.179,0.119-0.271c0.006-0.015,0.013-0.03,0.019-0.045c0.046-0.118,0.084-0.239,0.124-0.36 c0.006-0.017,0.012-0.034,0.018-0.051c0.007-0.022,0.019-0.042,0.026-0.064l0.03-0.096c0.001-0.002,0.001-0.004,0.002-0.006 l33.681-106.656h71.113c0.005,0,0.01,0.001,0.014,0.001c0.017,0,0.034-0.003,0.051-0.003c0.277-0.002,0.549-0.02,0.818-0.051 c0.076-0.009,0.151-0.023,0.226-0.034c0.218-0.032,0.432-0.071,0.643-0.121c0.078-0.018,0.155-0.039,0.232-0.06 c0.216-0.058,0.427-0.126,0.634-0.203c0.065-0.024,0.131-0.046,0.196-0.072c0.269-0.108,0.532-0.227,0.785-0.364 c0.006-0.003,0.012-0.008,0.018-0.011c0.239-0.131,0.468-0.277,0.691-0.433c0.084-0.059,0.165-0.122,0.246-0.184 c0.149-0.113,0.293-0.231,0.432-0.354c0.08-0.071,0.16-0.141,0.237-0.216c0.185-0.178,0.361-0.364,0.526-0.56 c0.019-0.022,0.039-0.041,0.058-0.063C509.476,160.039,509.646,159.795,509.807,159.545z M426.814,130.763l-38.29,121.253 l-57.435-70.199L426.814,130.763z M41.816,62.386l195.301,34.875l-55.8,139.5L41.816,62.386z M374.591,258.674l-180.335-13.872 l55.488-138.719L374.591,258.674z M212.629,337.089L193.3,259.773l167.518,12.886L212.629,337.089z M199.551,346.624l-33.364,66.728 l19.065-123.924L199.551,346.624z M142.792,212.618L30.564,130.997h46.932L142.792,212.618z M443.736,126.989l33.613,21.008h-40.247 L443.736,126.989z\"/></svg>',\n  paypal:\n    '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z\"/></svg>',\n  x: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\"/></svg>',\n} as const;\n","import { UI_ICONS } from \"./icons/ui.icons\";\nimport { NAV_ICONS } from \"./icons/nav.icons\";\nimport { COMMERCE_ICONS } from \"./icons/commerce.icons\";\nimport { MUSIC_ICONS } from \"./icons/music.icons\";\nimport { STATUS_ICONS } from \"./icons/status.icons\";\nimport { PEOPLE_ICONS } from \"./icons/people.icons\";\nimport { BRANDS_ICONS } from \"./icons/brands.icons\";\n\n/**\n * The package's built-in icon set — the shared, reusable catalogue. Keys are\n * **kebab-case** and unique across categories; values are single-colour SVG\n * markup using `currentColor`, so an icon inherits `color` from its host.\n *\n * The SVGs are inlined (not `.svg` file imports) so the package is fully\n * self-contained — no build-tool loader config leaks to a consumer.\n *\n * A consumer extends this set at runtime — never by editing this file — through\n * {@link FoldIconRegistry} (`provideFoldIcons()` at bootstrap, or `register()` later).\n */\nexport const FOLD_BUILTIN_ICONS = {\n  ...UI_ICONS,\n  ...NAV_ICONS,\n  ...COMMERCE_ICONS,\n  ...MUSIC_ICONS,\n  ...STATUS_ICONS,\n  ...PEOPLE_ICONS,\n  ...BRANDS_ICONS,\n} as const;\n\n/**\n * The built-in catalogue grouped by category, in display order — the single\n * source of truth for tooling that browses icons by theme (e.g. the\n * `fold-icon-devtool`). Each source file owns its slice; this list only names\n * and orders them. Host-registered icons are *not* here — they carry no\n * built-in category, so tooling buckets them separately.\n */\nexport const FOLD_BUILTIN_ICON_CATEGORIES = [\n  { id: \"ui\", label: \"UI\", names: namesOf(UI_ICONS) },\n  { id: \"nav\", label: \"Navigation\", names: namesOf(NAV_ICONS) },\n  { id: \"commerce\", label: \"Commerce\", names: namesOf(COMMERCE_ICONS) },\n  { id: \"music\", label: \"Music\", names: namesOf(MUSIC_ICONS) },\n  { id: \"status\", label: \"Status\", names: namesOf(STATUS_ICONS) },\n  { id: \"people\", label: \"People\", names: namesOf(PEOPLE_ICONS) },\n  { id: \"brands\", label: \"Brands\", names: namesOf(BRANDS_ICONS) },\n] as const;\n\n/**\n * The keys of an icon slice, keeping their literal type. `Object.keys` only ever\n * promises `string`, so the narrowing goes through a **checked predicate** — no\n * assertion (rule 2.1), and every name kept is genuinely a key of the object.\n */\nfunction namesOf<T extends object>(icons: T): (keyof T & string)[] {\n  const known = (name: string): name is keyof T & string => name in icons;\n  return Object.keys(icons).filter(known);\n}\n\n/** A built-in icon category id (`\"ui\"`, `\"commerce\"`, …). */\nexport type FoldIconCategoryId =\n  (typeof FOLD_BUILTIN_ICON_CATEGORIES)[number][\"id\"];\n\n/** Every built-in icon name — derived from the registry keys (autocompletes). */\nexport type FoldBuiltinIconName = keyof typeof FOLD_BUILTIN_ICONS;\n\n/**\n * The names a consumer has added on top of the built-in set — **empty here, and\n * meant to be augmented**. Declare your app's icons once, derived from the very\n * object you register, so the two can never drift:\n *\n * ```ts\n * export const APP_ICONS = { \"my-logo\": \"<svg …>\" } as const;\n *\n * declare module \"fold-ng\" {\n *   interface FoldCustomIcons extends Record<keyof typeof APP_ICONS, true> {}\n * }\n *\n * // app.config.ts\n * providers: [provideFoldIcons(APP_ICONS)];\n * ```\n *\n * **Overriding a built-in needs no declaration.** `bin` is already a known name,\n * so re-registering it with your own art type-checks as it stands — the registry\n * merges consumer entries over the built-ins.\n */\nexport interface FoldCustomIcons {}\n\n/**\n * The `name` a `fold-icon` accepts: a built-in, or one the consumer declared via\n * {@link FoldCustomIcons}.\n *\n * This used to be `FoldBuiltinIconName | (string & {})` — autocomplete for the\n * built-ins, but any string admitted. A typo (`\"trahs\"`) and a name that simply\n * doesn't exist (`\"alert\"`, before it did) both compiled, and surfaced only as a\n * `console.warn` and a hole where the glyph should be. Six such holes were live\n * across three apps when this was tightened.\n */\nexport type FoldIconName = FoldBuiltinIconName | keyof FoldCustomIcons;\n","import type { FoldIconSet } from \"./icon-registry.service\";\n\n/**\n * The trust contract for icon markup.\n *\n * A registered icon's markup is injected into the shared sprite **unsanitised**\n * (`insertAdjacentHTML` of the authored `<svg>`, so its `stroke` / `fill` /\n * `viewBox` survive intact). That trust is only sound for **static, authored**\n * markup: never register a string derived from user input.\n *\n * This guard is the backstop, not the sanitiser it cannot be. It rejects the\n * two shapes that have no place in a static icon — a non-`<svg>` root, and\n * `<script>` / inline `on*=` event handlers — so an obvious mistake fails loud\n * at registration instead of silently shipping a stored-XSS sink. It runs on\n * consumer input only; the built-in catalogue is authored in-package.\n */\nconst SVG_ROOT = /^\\s*<svg[\\s>]/i;\nconst UNSAFE = /<script[\\s/>]|\\son\\w+\\s*=/i;\n\n/** Assert a single icon's markup is a static, trusted `<svg>` string. */\nexport function assertSvgIcon(name: string, svg: string): void {\n  if (!SVG_ROOT.test(svg)) {\n    throw new Error(\n      `[fold-icon] icon \"${name}\" must be a literal <svg …> string — ` +\n        `icon markup is rendered unsanitised, so it must be static and trusted.`,\n    );\n  }\n  if (UNSAFE.test(svg)) {\n    throw new Error(\n      `[fold-icon] icon \"${name}\" must not contain <script> or inline event ` +\n        `handlers (on*=) — icon markup must be static and trusted.`,\n    );\n  }\n}\n\n/** Assert every entry of a consumer-supplied icon set passes {@link assertSvgIcon}. */\nexport function assertIconSet(icons: FoldIconSet): void {\n  for (const [name, svg] of Object.entries(icons)) {\n    assertSvgIcon(name, svg);\n  }\n}\n","import {\n  InjectionToken,\n  type Provider,\n  Service,\n  type WritableSignal,\n  inject,\n  signal,\n} from \"@angular/core\";\nimport { FOLD_BUILTIN_ICONS } from \"./builtin-icons\";\nimport type { FoldIconName } from \"./builtin-icons\";\nimport { assertIconSet, assertSvgIcon } from \"./icon-safety\";\n\n/** A `name → SVG markup` map — the shape both built-in and custom icons take. */\nexport type FoldIconSet = Readonly<Record<string, string>>;\n\n/** Consumer icons merged in at bootstrap — set via {@link provideFoldIcons}. */\nexport const ICON_OVERRIDES = new InjectionToken<FoldIconSet>(\n  \"fold.icons.overrides\",\n);\n\n/**\n * Register app-specific icons at bootstrap (idiomatic, like `provideRouter`).\n * They merge on top of the built-in set — a custom entry with a built-in key\n * overrides it.\n *\n * ```ts\n * // app.config.ts\n * providers: [provideFoldIcons({ \"my-logo\": \"<svg …>…</svg>\" })]\n * ```\n *\n * **Trust contract:** icon markup is rendered unsanitised (see `fold-icon`), so\n * every value must be a static, authored `<svg>` string — never derived from\n * user input. The registry asserts this at seed time and throws on obviously\n * unsafe markup, but it is a backstop, not a sanitiser.\n */\nexport function provideFoldIcons(icons: FoldIconSet): Provider {\n  return { provide: ICON_OVERRIDES, useValue: icons };\n}\n\n/**\n * The single source of truth for icon lookup. Root singleton seeded with the\n * package's {@link FOLD_BUILTIN_ICONS}; a consumer adds its own via\n * {@link provideFoldIcons} (bootstrap) or {@link register}/{@link registerMany}\n * (runtime). `fold-icon` resolves every `name` through here.\n *\n * Consumer-supplied markup passes the {@link assertSvgIcon} trust guard on the\n * way in (seed, `register`, `registerMany`); the built-in catalogue is authored\n * in-package and trusted as-is.\n */\n@Service()\nexport class FoldIconRegistry {\n  private readonly _icons: WritableSignal<FoldIconSet>;\n\n  constructor() {\n    const overrides = inject(ICON_OVERRIDES, { optional: true }) ?? {};\n    assertIconSet(overrides);\n    this._icons = signal<FoldIconSet>({ ...FOLD_BUILTIN_ICONS, ...overrides });\n  }\n\n  /** Register (or override) a single icon at runtime. */\n  register(name: string, svg: string): void {\n    assertSvgIcon(name, svg);\n    this._icons.update((icons) => ({ ...icons, [name]: svg }));\n  }\n\n  /** Register (or override) several icons at once. */\n  registerMany(icons: FoldIconSet): void {\n    assertIconSet(icons);\n    this._icons.update((current) => ({ ...current, ...icons }));\n  }\n\n  /** The SVG markup for a name, or `undefined` if unknown. Reactive. */\n  resolve(name: string): string | undefined {\n    return this._icons()[name];\n  }\n\n  /** Whether a name is registered. Reactive. */\n  has(name: string): boolean {\n    return name in this._icons();\n  }\n\n  /** Every registered icon name (built-ins + runtime additions), sorted.\n   *  Reactive — recomputes when an icon is registered. Powers tooling that\n   *  browses the live catalogue (e.g. the `fold-icon-devtool`).\n   *\n   *  Typed as {@link FoldIconName}, so a browser of the catalogue can hand each\n   *  name straight back to `fold-icon`. `Object.keys` only ever promises\n   *  `string`, so the narrowing goes through a **checked predicate** rather than\n   *  an assertion (rule 2.1): every name kept is one the registry resolves. */\n  names(): FoldIconName[] {\n    const icons = this._icons();\n    const registered = (name: string): name is FoldIconName => name in icons;\n    return Object.keys(icons).filter(registered).sort();\n  }\n}\n","/**\n * Shared-sprite plumbing for `fold-icon`.\n *\n * Instead of injecting an icon's markup into every `<fold-icon>` (N copies of\n * the same paths for N instances), each unique icon is added **once** to a\n * hidden document-level sprite as a `<symbol>`, and every instance renders a\n * lightweight `<svg><use href=\"#…\"/></svg>` that references it. The DOM holds\n * one copy of the paths no matter how many times the icon renders.\n */\n\n/** The id prefix shared by every symbol in the sprite. */\nexport const FOLD_ICON_SYMBOL_PREFIX = \"fold-icon-\";\n\n/** The id of the single hidden sprite `<svg>` appended to the document. */\nexport const FOLD_ICON_SPRITE_ID = \"fold-icon-sprite\";\n\n/** The symbol id for an icon name — what a `<use href>` points at. */\nexport function foldIconSymbolId(name: string): string {\n  return `${FOLD_ICON_SYMBOL_PREFIX}${name}`;\n}\n\n/**\n * Convert an authored `<svg>…</svg>` string into a `<symbol id=…>…</symbol>`\n * for the sprite. The root `<svg>`'s presentation attributes (`viewBox`,\n * `fill`, `stroke`, `stroke-*`) carry onto the symbol so a `<use>` renders it\n * identically; `xmlns` / `width` / `height` are dropped — the instance `<svg>`\n * owns the rendered size, and `xmlns` is redundant inside an HTML-parsed SVG.\n *\n * Runs on markup already vetted by the registry's trust guard, so the input is\n * a static, well-formed `<svg>`.\n */\nexport function foldIconToSymbol(name: string, svg: string): string {\n  const open = /<svg\\b([^>]*)>/i.exec(svg);\n  const attrs = (open?.[1] ?? \"\")\n    .replace(/\\s+xmlns(:\\w+)?\\s*=\\s*([\"'])[\\s\\S]*?\\2/gi, \"\")\n    .replace(/\\s+(width|height)\\s*=\\s*([\"'])[\\s\\S]*?\\2/gi, \"\")\n    .trim();\n  const inner = svg\n    .replace(/^[\\s\\S]*?<svg\\b[^>]*>/i, \"\")\n    .replace(/<\\/svg\\s*>\\s*$/i, \"\");\n  return `<symbol id=\"${foldIconSymbolId(name)}\"${attrs ? ` ${attrs}` : \"\"}>${inner}</symbol>`;\n}\n","import { DOCUMENT } from \"@angular/common\";\nimport { Service, inject } from \"@angular/core\";\nimport {\n  FOLD_ICON_SPRITE_ID,\n  foldIconSymbolId,\n  foldIconToSymbol,\n} from \"./icon-sprite\";\n\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\n/**\n * The single hidden SVG sprite that backs every `fold-icon`.\n *\n * Root singleton. Each unique icon is added once as a `<symbol>`; instances\n * reference it by id through `<use>`, so the DOM holds one copy of an icon's\n * paths however many times it renders (the win over per-instance `[innerHTML]`).\n *\n * **Lazy:** only icons actually rendered are added, so an SSR page ships just\n * the icons it uses — each once — not the whole catalogue.\n *\n * **SSR + hydration:** on the server the sprite is appended to `<body>` during\n * render and serialised into the HTML, so `<use>` resolves on first paint (no\n * icon flash before hydration). On the client the service adopts that existing\n * sprite instead of creating a second one, and seeds its added-set from the\n * symbols already present — so hydration never double-adds.\n */\n@Service()\nexport class FoldIconSprite {\n  private readonly document = inject(DOCUMENT);\n  private readonly added = new Set<string>();\n  private sprite: Element | null = null;\n\n  /** Ensure `name`'s symbol is in the sprite; idempotent. `markup` is the raw,\n   *  trust-guarded SVG string from the registry. */\n  ensure(name: string, markup: string): void {\n    const id = foldIconSymbolId(name);\n    if (this.added.has(id)) {\n      return;\n    }\n    const sprite = this.resolveSprite();\n    if (!sprite) {\n      return; // no document body (non-DOM host) — instance renders nothing\n    }\n    // resolveSprite may have just seeded `added` from an SSR-serialised sprite.\n    if (this.added.has(id)) {\n      return;\n    }\n    sprite.insertAdjacentHTML(\"beforeend\", foldIconToSymbol(name, markup));\n    this.added.add(id);\n  }\n\n  /** The mounted sprite, creating it (or adopting the SSR one) on first use. */\n  private resolveSprite(): Element | null {\n    if (this.sprite) {\n      return this.sprite;\n    }\n    const body = this.document.body;\n    if (!body) {\n      return null;\n    }\n    const existing = this.document.getElementById(FOLD_ICON_SPRITE_ID);\n    if (existing) {\n      existing\n        .querySelectorAll(\"symbol[id]\")\n        .forEach((symbol) => this.added.add(symbol.id));\n      this.sprite = existing;\n      return existing;\n    }\n    const svg = this.document.createElementNS(SVG_NS, \"svg\");\n    svg.setAttribute(\"id\", FOLD_ICON_SPRITE_ID);\n    svg.setAttribute(\"aria-hidden\", \"true\");\n    svg.setAttribute(\n      \"style\",\n      \"position:absolute;width:0;height:0;overflow:hidden\",\n    );\n    body.appendChild(svg);\n    this.sprite = svg;\n    return svg;\n  }\n}\n","import { Component, computed, effect, inject, input } from \"@angular/core\";\nimport { FoldIconRegistry } from \"./icon-registry.service\";\nimport { FoldIconSprite } from \"./icon-sprite.service\";\nimport { foldIconSymbolId } from \"./icon-sprite\";\nimport type { FoldIconName } from \"./builtin-icons\";\n\n/** Size presets map to an icon-size token; a number is interpreted as pixels. */\nexport type FoldIconSize = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | number;\n\n/** Semantic tint. Unset = inherit the context's `currentColor` (the default —\n *  an icon matches whatever it sits in); set it to override with a role colour. */\nexport type FoldIconTone = \"primary\" | \"secondary\" | \"muted\" | \"faded\";\n\n/** Tone → the semantic text/role colour token it paints with. */\nconst TONE_COLOR: Record<FoldIconTone, string> = {\n  primary: \"var(--fold-color-primary-text)\",\n  secondary: \"var(--fold-color-text-secondary)\",\n  muted: \"var(--fold-color-text-muted)\",\n  faded: \"var(--fold-color-text-faded)\",\n};\n\n/** Preset → `--fold-icon-size-*` token, with a px fallback so an icon still\n *  renders if a consumer loads the component without the token layer. */\nconst SIZE_VAR: Record<Exclude<FoldIconSize, number>, string> = {\n  xs: \"var(--fold-icon-size-xs, 12px)\",\n  sm: \"var(--fold-icon-size-sm, 16px)\",\n  md: \"var(--fold-icon-size-md, 20px)\",\n  lg: \"var(--fold-icon-size-lg, 24px)\",\n  xl: \"var(--fold-icon-size-xl, 32px)\",\n};\n\n/**\n * `fold-icon` — the single surface for all SVG icons.\n *\n * Icons resolve through the {@link FoldIconRegistry} (built-in set + any the\n * consumer registered), keyed by a typed {@link FoldIconName}. Each unique icon\n * is added once to a shared hidden sprite (see {@link FoldIconSprite}); the\n * component itself renders a lightweight `<svg><use href=\"#…\"/></svg>` that\n * references it, so the DOM holds one copy of an icon's paths however many times\n * it renders. Colour + size come from CSS (`currentColor` + a `--icon-size`\n * custom property) and inherit across the `<use>` into the symbol, so the SVG\n * takes its `color` from the host.\n *\n * @selector `fold-icon`\n *\n * @example\n * ```html\n * <fold-icon name=\"search\" />\n * <fold-icon name=\"bin\" size=\"lg\" />\n * <fold-icon name=\"heart\" [size]=\"18\" />\n * <fold-icon name=\"star\" tone=\"primary\" />  <!-- accent tint, ignores context -->\n * <fold-icon name=\"edit\" title=\"Edit track\" />  <!-- a11y label -->\n * ```\n */\n@Component({\n  selector: \"fold-icon\",\n  standalone: true,\n  host: {\n    // Paint the tone colour on the host so it flows into the SVG via\n    // currentColor; unset → no inline colour, the icon inherits its context.\n    \"[style.color]\": \"toneColor()\",\n  },\n  templateUrl: \"./icon.component.html\",\n  styleUrl: \"./icon.component.scss\",\n})\nexport class FoldIconComponent {\n  /** Icon name — a built-in (autocompleted) or a consumer-registered string. */\n  readonly name = input.required<FoldIconName>();\n\n  /** Size — token (`xs…xl`) or explicit pixel number. Defaults to `md`. */\n  readonly size = input<FoldIconSize>(\"md\");\n\n  /** Semantic tint — `primary` · `secondary` · `muted` · `faded`. Unset (default)\n   *  inherits `currentColor`, so the icon matches whatever it sits in. */\n  readonly tone = input<FoldIconTone>();\n\n  /** Optional accessible label. Set → `aria-label`; unset → `aria-hidden`. */\n  readonly title = input<string>();\n\n  private readonly registry = inject(FoldIconRegistry);\n  private readonly sprite = inject(FoldIconSprite);\n\n  /** The `#symbol` reference for `<use>`, or null when the name is unknown\n   *  (renders nothing). Pure — sprite population lives in the effect below. */\n  readonly href = computed<string | null>(() =>\n    this.registry.has(this.name()) ? `#${foldIconSymbolId(this.name())}` : null,\n  );\n\n  /** Resolves the size input to a CSS length string for `--icon-size`. */\n  readonly sizeVar = computed<string>(() => {\n    const s = this.size();\n    return typeof s === \"number\" ? `${s}px` : SIZE_VAR[s];\n  });\n\n  /** The tone's colour token, or null to inherit `currentColor` (no override). */\n  readonly toneColor = computed<string | null>(() => {\n    const t = this.tone();\n    return t ? TONE_COLOR[t] : null;\n  });\n\n  constructor() {\n    // Mount the shown icon's symbol in the shared sprite (a DOM side effect, so\n    // it lives here and not in `href`), and warn on an unknown name. Reactive:\n    // registering an icon later both mounts its symbol and resolves the `<use>`.\n    effect(() => {\n      const name = this.name();\n      const markup = this.registry.resolve(name);\n      if (markup) {\n        this.sprite.ensure(name, markup);\n      } else {\n        console.warn(`[fold-icon] unknown icon: \"${name}\"`);\n      }\n    });\n  }\n}\n","<svg\n  class=\"icon-root\"\n  role=\"img\"\n  [attr.aria-label]=\"title() || null\"\n  [attr.aria-hidden]=\"title() ? null : 'true'\"\n  [style.--icon-size]=\"sizeVar()\"\n>\n  @if (href(); as ref) {\n    <use [attr.href]=\"ref\" />\n  }\n</svg>\n","/**\n * The design tokens, as a typed source-of-truth.\n *\n * These lists are the CONTRACT. The token contract test asserts that the CSS\n * declares exactly these tokens — for colours, that the `:root` (dark) and\n * `[data-theme=\"lumen\"]` blocks each declare exactly the colour set (parity);\n * for scales, that `scales.css` declares exactly the radius/type steps. Add a\n * token here and to the CSS in the same change, or the test fails. That is how\n * the theme stays complete and drift-free.\n *\n * They also power typed `fold*Var` helpers so call sites get autocomplete and a\n * compile error on a misspelt token.\n */\nexport const FOLD_SEMANTIC_COLOR_TOKENS = [\n  /* ── Surfaces ─────────────────────────────────────────────── */\n  /** Page background — the surface behind everything. */\n  \"bg-page\",\n  /** Top header bar. */\n  \"bg-header\",\n  /** Rail 1 — the app menu. */\n  \"bg-rail-primary\",\n  /** Rail 2 — the workspace menu. */\n  \"bg-rail-secondary\",\n  /** Rail 3 — tertiary nav (e.g. a `fold-view-nav` section sidebar). */\n  \"bg-rail-tertiary\",\n\n  /* ── Brand ────────────────────────────────────────────────── */\n  /**\n   * The mark itself — a logo tile, a wordmark glyph. It IDENTIFIES, so unlike\n   * `primary` it must NOT flip polarity: a mark that is teal on the page and\n   * pale blue on the rail has stopped being the mark.\n   *\n   * `primary` does two jobs — it carries the brand AND it carries foreground\n   * affordances (an active icon, a focus ring), and on a dark chrome the second\n   * has to lighten to stay legible while the first must not. Splitting them is\n   * the same move `on-info|warning|alert|success` made when `on-primary` was\n   * serving both a brand fill and a status fill.\n   *\n   * A scoped sub-block may never redeclare these two — that is precisely what\n   * would re-introduce the flip.\n   */\n  \"brand\",\n  /** Text or icon rendered on top of a solid `brand` fill. */\n  \"on-brand\",\n\n  /* ── Primary / accent ─────────────────────────────────────── */\n  /** Primary / accent — brand teal (solid). */\n  \"primary\",\n  /** Primary in a hover/active state. */\n  \"primary-strong\",\n  /** Text or icon rendered on top of a solid `primary` fill. */\n  \"on-primary\",\n  /** Readable primary tint for text on a `primary-surface`. */\n  \"primary-text\",\n  /** Faint primary-tinted background (chips, highlights). */\n  \"primary-surface\",\n  /** Border for a `primary-surface`. */\n  \"primary-border\",\n\n  /* ── Info (purple) ────────────────────────────────────────── */\n  \"info\",\n  /** Text or icon rendered on top of a solid `info` fill. */\n  \"on-info\",\n  \"info-text\",\n  \"info-surface\",\n  \"info-border\",\n\n  /* ── Warning (amber) ──────────────────────────────────────── */\n  \"warning\",\n  /** Text or icon rendered on top of a solid `warning` fill. */\n  \"on-warning\",\n  \"warning-text\",\n  \"warning-surface\",\n  \"warning-border\",\n\n  /* ── Alert (red) ──────────────────────────────────────────── */\n  \"alert\",\n  /** Text or icon rendered on top of a solid `alert` fill. */\n  \"on-alert\",\n  \"alert-text\",\n  \"alert-surface\",\n  \"alert-border\",\n\n  /* ── Success (green) ──────────────────────────────────────── */\n  \"success\",\n  /** Text or icon rendered on top of a solid `success` fill. */\n  \"on-success\",\n  \"success-text\",\n  \"success-surface\",\n  \"success-border\",\n\n  /* ── Text ─────────────────────────────────────────────────── */\n  /** Default body text. */\n  \"text\",\n  /** De-emphasised text. */\n  \"text-secondary\",\n  /** Faint / hint text. */\n  \"text-muted\",\n  /** Dimmest text — counts, hints. */\n  \"text-faded\",\n\n  /* ── Neutral surfaces + border ────────────────────────────── */\n  /** Solid raised content surface (cards, panels). */\n  \"surface-card\",\n  /** Deeper solid surface for large containers (tables, page-level cards). */\n  \"surface-sunken\",\n  /** Faint tinted fill (idle chips, subtle rows). */\n  \"surface-subtle\",\n  /** Slightly stronger fill (raised). */\n  \"surface-raised\",\n  /** Solid raised hover surface (list rows, menu/tab items). */\n  \"surface-hover\",\n  /**\n   * One step AWAY from its container, in whichever direction the theme's\n   * polarity dictates — a card's header or footer band, a strip that has to\n   * detach from the body it sits on. Dark themes lighten it, light themes\n   * darken it, and the component never has to know which.\n   */\n  \"surface-band\",\n  /** Neutral hairline border. */\n  \"border\",\n  /** Fainter hairline — row dividers, subtle edges (below `border`). */\n  \"border-subtle\",\n\n  /* ── Glass ────────────────────────────────────────────────── */\n  /** Translucent frosted overlay (panels, floating menus). */\n  \"glass\",\n  /** Hairline border on a glass surface. */\n  \"glass-border\",\n\n  /* ── Scrim ────────────────────────────────────────────────── */\n  /** Darkening veil behind a modal layer (the mobile nav drawer). */\n  \"scrim\",\n] as const;\n\nexport type FoldSemanticColorToken =\n  (typeof FOLD_SEMANTIC_COLOR_TOKENS)[number];\n\n/** Border-radius scale. `lg` is a real large radius; `pill` is the capsule. */\nexport const FOLD_RADIUS_TOKENS = [\n  \"xs\",\n  \"sm\",\n  \"md\",\n  \"lg\",\n  \"pill\",\n  \"round\",\n] as const;\n\nexport type FoldRadiusToken = (typeof FOLD_RADIUS_TOKENS)[number];\n\n/**\n * Font-family scale (`--fold-font-*`). Two faces — the base and the tabular/code\n * one — plus one **role**: `label`, the micro-label register (a section title in\n * `eyebrow` skin, a data-table column head, an `element-title` eyebrow). No\n * `display` face: nothing renders one.\n *\n * `label` is a role, not a face: it defaults to `inherit`, so it changes nothing\n * until a host names a face for it.\n */\nexport const FOLD_FONT_TOKENS = [\"sans\", \"mono\", \"label\"] as const;\n\nexport type FoldFontToken = (typeof FOLD_FONT_TOKENS)[number];\n\n/**\n * Type (font-size) scale. `base` is body copy (14px) and sits above `md`\n * (13px): it names the reference step, not a rung on the t-shirt ladder.\n */\nexport const FOLD_TEXT_TOKENS = [\n  \"2xs\",\n  \"xs\",\n  \"sm\",\n  \"md\",\n  \"base\",\n  \"lg\",\n  \"xl\",\n  \"2xl\",\n] as const;\n\nexport type FoldTextToken = (typeof FOLD_TEXT_TOKENS)[number];\n\n/**\n * Weight scale (`--fold-weight-*`). `extrabold` is the display weight — hero\n * headings only, always with `tracking-tightest` and a fluid size.\n */\nexport const FOLD_WEIGHT_TOKENS = [\n  \"regular\",\n  \"medium\",\n  \"semibold\",\n  \"bold\",\n  \"extrabold\",\n] as const;\n\nexport type FoldWeightToken = (typeof FOLD_WEIGHT_TOKENS)[number];\n\n/** Leading scale (`--fold-leading-*`) — unitless line-heights. */\nexport const FOLD_LEADING_TOKENS = [\n  \"none\",\n  \"tight\",\n  \"snug\",\n  \"normal\",\n  \"relaxed\",\n] as const;\n\nexport type FoldLeadingToken = (typeof FOLD_LEADING_TOKENS)[number];\n\n/** Tracking scale (`--fold-tracking-*`) — letter-spacing per role. */\nexport const FOLD_TRACKING_TOKENS = [\n  \"tightest\",\n  \"tighter\",\n  \"tight\",\n  \"normal\",\n  \"wide\",\n  \"caps\",\n] as const;\n\nexport type FoldTrackingToken = (typeof FOLD_TRACKING_TOKENS)[number];\n\n/** Icon-size scale — the length a `fold-icon` renders at, per size preset. */\nexport const FOLD_ICON_SIZE_TOKENS = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const;\n\nexport type FoldIconSizeToken = (typeof FOLD_ICON_SIZE_TOKENS)[number];\n\n/** Space (gap / padding / margin) scale. */\nexport const FOLD_SPACE_TOKENS = [\n  \"xs\",\n  \"sm\",\n  \"md\",\n  \"lg\",\n  \"xl\",\n  \"2xl\",\n  \"3xl\",\n  \"4xl\",\n  \"5xl\",\n] as const;\n\nexport type FoldSpaceToken = (typeof FOLD_SPACE_TOKENS)[number];\n\n/** Rail-width scale — the nav-rail hierarchy's shared widths, named to pair with\n *  the `--fold-color-bg-rail-*` colours (primary app menu → secondary workspace /\n *  aside → tertiary in-page nav). */\nexport const FOLD_RAIL_TOKENS = [\"primary\", \"secondary\", \"tertiary\"] as const;\n\nexport type FoldRailToken = (typeof FOLD_RAIL_TOKENS)[number];\n\n/** Motion scale — `transition` shorthands (duration + easing). */\nexport const FOLD_MOTION_TOKENS = [\"fast\", \"base\", \"slow\"] as const;\n\nexport type FoldMotionToken = (typeof FOLD_MOTION_TOKENS)[number];\n\n/** Backdrop-blur radii (`--fold-blur-*`). */\nexport const FOLD_BLUR_TOKENS = [\"glass\"] as const;\n\nexport type FoldBlurToken = (typeof FOLD_BLUR_TOKENS)[number];\n\n/**\n * Elevation scale — full `box-shadow` values. The shared depth language: a\n * component never spells its own shadow, it names a level. Theme-invariant\n * (black ink via `color-mix`, which reads acceptably on both themes), so they\n * live with the scales. `panel-*` are the directional side-panel shadows.\n */\nexport const FOLD_SHADOW_TOKENS = [\n  \"sm\",\n  \"md\",\n  \"lg\",\n  \"panel-right\",\n  \"panel-left\",\n] as const;\n\nexport type FoldShadowToken = (typeof FOLD_SHADOW_TOKENS)[number];\n\n/** The full custom-property name for a semantic colour token. */\nexport function foldColorProperty(token: FoldSemanticColorToken): string {\n  return `--fold-color-${token}`;\n}\n\n/** A ready-to-use `var(--fold-color-…)` reference for a semantic colour token. */\nexport function foldColorVar(token: FoldSemanticColorToken): string {\n  return `var(${foldColorProperty(token)})`;\n}\n\n/** A ready-to-use `var(--fold-radius-…)` reference. */\nexport function foldRadiusVar(token: FoldRadiusToken): string {\n  return `var(--fold-radius-${token})`;\n}\n\n/** A ready-to-use `var(--fold-font-…)` reference. */\nexport function foldFontVar(token: FoldFontToken): string {\n  return `var(--fold-font-${token})`;\n}\n\n/** A ready-to-use `var(--fold-text-…)` reference. */\nexport function foldTextVar(token: FoldTextToken): string {\n  return `var(--fold-text-${token})`;\n}\n\n/** A ready-to-use `var(--fold-weight-…)` reference. */\nexport function foldWeightVar(token: FoldWeightToken): string {\n  return `var(--fold-weight-${token})`;\n}\n\n/** A ready-to-use `var(--fold-leading-…)` reference. */\nexport function foldLeadingVar(token: FoldLeadingToken): string {\n  return `var(--fold-leading-${token})`;\n}\n\n/** A ready-to-use `var(--fold-tracking-…)` reference. */\nexport function foldTrackingVar(token: FoldTrackingToken): string {\n  return `var(--fold-tracking-${token})`;\n}\n\n/** A ready-to-use `var(--fold-icon-size-…)` reference. */\nexport function foldIconSizeVar(token: FoldIconSizeToken): string {\n  return `var(--fold-icon-size-${token})`;\n}\n\n/** A ready-to-use `var(--fold-space-…)` reference. */\nexport function foldSpaceVar(token: FoldSpaceToken): string {\n  return `var(--fold-space-${token})`;\n}\n\n/** A ready-to-use `var(--fold-motion-…)` reference. */\nexport function foldMotionVar(token: FoldMotionToken): string {\n  return `var(--fold-motion-${token})`;\n}\n\n/** A ready-to-use `var(--fold-blur-…)` reference. */\nexport function foldBlurVar(token: FoldBlurToken): string {\n  return `var(--fold-blur-${token})`;\n}\n\n/** A ready-to-use `var(--fold-shadow-…)` reference. */\nexport function foldShadowVar(token: FoldShadowToken): string {\n  return `var(--fold-shadow-${token})`;\n}\n","import { Component, computed, input } from \"@angular/core\";\nimport { foldIconSizeVar } from \"../../../tokens/tokens.catalog\";\nimport type { FoldIconSizeToken } from \"../../../tokens/tokens.catalog\";\n\n/** Spinner size — an icon-size token (`xs…xl`) or an explicit pixel number. */\nexport type FoldSpinnerSize = FoldIconSizeToken | number;\n\n/**\n * `fold-spinner` — an indeterminate loading indicator: a rotating arc drawn in\n * `currentColor`, sized off the same scale as `fold-icon` so it drops into a\n * button in place of its glyph without shifting layout.\n *\n * Give it a `label` when it stands alone (it becomes `role=\"status\"` +\n * `aria-label`, so assistive tech announces the wait). Leave `label` unset when\n * it lives inside something that already announces busy-ness (a button with\n * `aria-busy`) — it then renders `aria-hidden`, purely decorative.\n *\n * Honours `prefers-reduced-motion`: the rotation stops and a fuller static ring\n * is shown instead, so the indicator still reads as \"busy\" without animating.\n *\n * @selector `fold-spinner`\n *\n * @example\n * ```html\n * <fold-spinner label=\"Loading contracts\" />\n * <fold-spinner size=\"sm\" />           <!-- decorative, inside a busy control -->\n * <fold-spinner [size]=\"18\" />\n * ```\n */\n@Component({\n  selector: \"fold-spinner\",\n  standalone: true,\n  templateUrl: \"./spinner.component.html\",\n  styleUrl: \"./spinner.component.scss\",\n  host: {\n    \"[style.--fold-spinner-size]\": \"sizeVar()\",\n    \"[attr.role]\": \"label() ? 'status' : null\",\n    \"[attr.aria-label]\": \"label() ?? null\",\n    \"[attr.aria-hidden]\": \"label() ? null : 'true'\",\n  },\n})\nexport class FoldSpinnerComponent {\n  /** Size — an icon-size token (`xs…xl`, default `md`) or a pixel number. */\n  readonly size = input<FoldSpinnerSize>(\"md\");\n\n  /** Accessible label. Set → `role=\"status\"` + `aria-label`; unset → decorative. */\n  readonly label = input<string>();\n\n  /** Resolves the size to a CSS length for `--fold-spinner-size`. */\n  readonly sizeVar = computed<string>(() => {\n    const s = this.size();\n    return typeof s === \"number\" ? `${s}px` : foldIconSizeVar(s);\n  });\n}\n","<svg class=\"fold-spinner-svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n  <circle class=\"fold-spinner-track\" cx=\"12\" cy=\"12\" r=\"9\" />\n  <circle class=\"fold-spinner-head\" cx=\"12\" cy=\"12\" r=\"9\" />\n</svg>\n","import {\n  Component,\n  ElementRef,\n  ViewEncapsulation,\n  booleanAttribute,\n  computed,\n  inject,\n  input,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldSpinnerComponent } from \"../../foundations/spinner/spinner.component\";\nimport type { FoldIconSize } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport type {\n  FoldButtonEmphasis,\n  FoldButtonIntent,\n  FoldButtonShape,\n  FoldButtonSize,\n} from \"./button.types\";\n\n/** Leading/trailing icon size, derived from the button `size`. */\nconst ICON_SIZE: Record<FoldButtonSize, FoldIconSize> = {\n  sm: 14,\n  md: 16,\n  lg: 18,\n};\n\n/**\n * `[foldButton]` — the design-system button, applied to a **real** `<button>`\n * or `<a>` (never a custom tag). The host element stays a native control, so it\n * keeps everything the platform gives it: a `<button>` gets `type`/`disabled`\n * and form submission; an `<a>` gets `href`/`routerLink`/`target`. This mirrors\n * how Angular Material ships `matButton`, and it's why a \"link that looks like a\n * button\" needs no second component.\n *\n * The label is projected (text, icons, or both). `variant` + `size` + `shape`\n * apply as host classes so the surface stays token-only. Use native `(click)` —\n * on a disabled button the platform blocks it; on a disabled anchor the surface\n * is `pointer-events: none` and activation is prevented.\n *\n * @example\n * ```html\n * <button foldButton (click)=\"save()\">Save</button>\n * <button foldButton emphasis=\"outline\" intent=\"neutral\" size=\"sm\" (click)=\"cancel()\">Cancel</button>\n * <button foldButton emphasis=\"solid\" intent=\"danger\" (click)=\"delete()\">Delete</button>\n * <button foldButton [disabled]=\"!form.valid\" type=\"submit\">Submit</button>\n * <a foldButton emphasis=\"outline\" intent=\"neutral\" routerLink=\"/contracts\">Contracts</a>\n * ```\n *\n * ## Theming its voice\n *\n * A brand's buttons speak in a register — a display family, a weight, capitals,\n * a corner, a floor height — and that register is the same on every button of\n * the app. Six custom properties carry it, all inherited, so an app states it\n * **once** on a root and never again:\n *\n * - `--fold-button-font` · `--fold-button-weight` · `--fold-button-tracking` ·\n *   `--fold-button-transform` — the type.\n * - `--fold-button-radius` — the corner (a `shape=\"pill\"` still wins; asking\n *   for a pill is a more specific intent than a theme's default corner).\n * - `--fold-button-min-height` — the floor, for a design with a touch target\n *   taller than the label needs.\n *\n * They exist because outside always LOSES: `:host(.md)` carries an attribute\n * and a class, so an app's own class cannot outrank it. Without a hook, a\n * screen that needs its own register hand-rolls the button — and then the\n * design system stops being where buttons are decided.\n *\n * `font-size` and `padding` are deliberately NOT hooks: they belong to the size\n * presets. A voice is a register, not a scale, and an app that overrode the\n * size from here would flatten `sm`/`md`/`lg` into one button wearing three\n * names.\n *\n * ```css\n * [data-theme='my-app'] {\n *   --fold-button-font: 'Archivo', sans-serif;\n *   --fold-button-weight: 900;\n *   --fold-button-transform: uppercase;\n *   --fold-button-tracking: 0.04em;\n * }\n * ```\n *\n * A `foldButton` expects a **text label** (projected) for its accessible name.\n * For an icon-only affordance use `fold-button-icon` (which takes a `tooltip`);\n * the leading/trailing `icon` inputs here are decorations beside a label.\n *\n * @selector `button[foldButton], a[foldButton]`\n */\n@Component({\n  selector: \"button[foldButton], a[foldButton]\",\n  standalone: true,\n  imports: [FoldIconComponent, FoldSpinnerComponent],\n  templateUrl: \"./button.component.html\",\n  styleUrl: \"./button.component.scss\",\n  encapsulation: ViewEncapsulation.Emulated,\n  host: {\n    \"[class]\":\n      '\"fold-button \" + emphasis() + \" \" + intent() + \" \" + size() + \" \" + shape()',\n    \"[class.block]\": \"block()\",\n    \"[class.is-disabled]\": \"disabled()\",\n    \"[class.is-loading]\": \"loading()\",\n    // Loading blocks interaction like disabled, but keeps the surface lit (spinner\n    // shown) rather than dimmed. <button> takes native disabled + type; <a> can't,\n    // so it gets the ARIA equivalents (the surface is pointer-events:none either way).\n    \"[attr.disabled]\": \"isButton && blocked() ? true : null\",\n    \"[attr.type]\": \"isButton ? type() : null\",\n    \"[attr.aria-disabled]\": \"!isButton && blocked() ? true : null\",\n    \"[attr.aria-busy]\": \"loading() ? true : null\",\n    \"[attr.tabindex]\": \"!isButton && blocked() ? -1 : null\",\n    \"(click)\": \"onClick($event)\",\n  },\n})\nexport class FoldButtonComponent {\n  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  /** True when the host is a `<button>` (vs an `<a>`) — fixed for the element's life. */\n  protected readonly isButton =\n    this.host.nativeElement.tagName.toLowerCase() === \"button\";\n\n  /**\n   * Fill level — `solid` (default, filled) · `soft` (tinted surface) · `outline`\n   * (transparent + hairline). The *how loud* axis; pair with {@link intent}.\n   *\n   * The default is `solid` because the default is what an app writes when it\n   * writes nothing, and what it writes most is the **primary action** of a\n   * screen — the one thing it wants pressed. A tinted default made the loudest\n   * button on a page the one someone had remembered to mark up, so emphasis\n   * tracked authoring effort rather than importance. Reach for `soft` and\n   * `outline` deliberately, for the actions that accompany that one.\n   */\n  readonly emphasis = input<FoldButtonEmphasis>(\"solid\");\n\n  /**\n   * Semantic intent — `primary` (default, accent) · `neutral` · `warning` ·\n   * `danger`. The *what it means* axis. Orthogonal to {@link emphasis}, so e.g.\n   * `emphasis=\"solid\" intent=\"danger\"` is a filled destructive button.\n   */\n  readonly intent = input<FoldButtonIntent>(\"primary\");\n\n  /** Size preset controlling font-size, padding, and radius. */\n  readonly size = input<FoldButtonSize>(\"md\");\n\n  /** Corner shape — `rounded` (default) or `pill` (fully rounded). */\n  readonly shape = input<FoldButtonShape>(\"rounded\");\n\n  /** Stretch to fill the container's width (block-level) instead of hugging its label. */\n  readonly block = input(false, { transform: booleanAttribute });\n\n  /**\n   * Leading icon — a shorthand for the common \"icon + label\" button. The size\n   * is derived from {@link size}, so it stays consistent. For anything else\n   * (trailing content, custom markup) project it instead.\n   */\n  readonly icon = input<FoldIconName>();\n  /** Trailing icon (after the label). */\n  readonly iconTrailing = input<FoldIconName>();\n\n  /** Icon size for {@link icon} / {@link iconTrailing}, from the button size. */\n  readonly iconSize = computed<FoldIconSize>(() => ICON_SIZE[this.size()]);\n\n  /**\n   * Native `type` of the host — only meaningful on a `<button>` (ignored on an\n   * `<a>`). Defaults to `button` so a form-embedded button never submits by\n   * accident.\n   */\n  readonly type = input<\"button\" | \"submit\" | \"reset\">(\"button\");\n\n  /** Disable the control — dims it and blocks activation (native on a button, ARIA on an anchor). */\n  readonly disabled = input(false, { transform: booleanAttribute });\n\n  /**\n   * Show a spinner in place of the leading icon and go busy: blocks activation\n   * and sets `aria-busy`, but keeps the surface lit (not dimmed like `disabled`).\n   * The spinner is icon-sized, so the button width doesn't jump.\n   */\n  readonly loading = input(false, { transform: booleanAttribute });\n\n  /** Interaction is blocked while disabled OR loading. */\n  protected readonly blocked = computed(\n    () => this.disabled() || this.loading(),\n  );\n\n  /** Swallow activation while blocked (covers keyboard-activated anchors). */\n  onClick(event: Event): void {\n    if (this.blocked()) {\n      event.preventDefault();\n      event.stopImmediatePropagation();\n    }\n  }\n}\n","@if (loading()) {\n  <fold-spinner [size]=\"iconSize()\" aria-hidden=\"true\" />\n} @else if (icon(); as ic) {\n  <fold-icon [name]=\"ic\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n}\n<ng-content />\n@if (iconTrailing(); as ic) {\n  <fold-icon [name]=\"ic\" [size]=\"iconSize()\" aria-hidden=\"true\" />\n}\n","import {\n  Component,\n  booleanAttribute,\n  computed,\n  input,\n  output,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldSpinnerComponent } from \"../../foundations/spinner/spinner.component\";\nimport type { FoldIconSize } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport type {\n  FoldButtonIconShape,\n  FoldButtonIconSize,\n  FoldButtonIconTone,\n} from \"./button-icon.types\";\n\n/**\n * `<fold-button-icon>` — the icon-only **momentary** button: a one-shot action\n * whose label is the icon (toolbars, transport, inline row actions, carets, …).\n * It never claims a pressed state — no `aria-pressed` — so assistive tech reads\n * it as a plain button. For a binary on/off control (mute, mask, pin), use\n * `fold-toggle-icon`. For a button with text, use `fold-button`.\n *\n * `shape` / `size` / `tone` surface as `data-*` attributes so the token-only\n * SCSS targets them (the surface is shared with `fold-toggle-icon`). A `tooltip`\n * sets both `title` and `aria-label` — strongly recommended, since there is no\n * visible label.\n *\n * @example\n * ```html\n * <fold-button-icon icon=\"edit\" tooltip=\"Edit\" (clicked)=\"edit()\" />\n * <fold-button-icon icon=\"play\" shape=\"round\" tone=\"accent\" size=\"lg\" (clicked)=\"play()\" />\n * <fold-button-icon icon=\"bin\" tone=\"critical\" tooltip=\"Delete\" (clicked)=\"delete()\" />\n * ```\n *\n * @selector `fold-button-icon`\n */\n@Component({\n  selector: \"fold-button-icon\",\n  standalone: true,\n  imports: [FoldIconComponent, FoldSpinnerComponent],\n  templateUrl: \"./button-icon.component.html\",\n  styleUrl: \"./button-icon.component.scss\",\n  host: {\n    \"[attr.data-shape]\": \"shape()\",\n    \"[attr.data-size]\": \"size()\",\n    \"[attr.data-tone]\": \"tone()\",\n    \"[attr.data-loading]\": \"loading() ? '' : null\",\n  },\n})\nexport class FoldButtonIconComponent {\n  /** Icon to render (typed against the registry). */\n  readonly icon = input.required<FoldIconName>();\n\n  /** Surface shape — `square` (default) or `round` (transport, big actions). */\n  readonly shape = input<FoldButtonIconShape>(\"square\");\n\n  /** Hit-area preset — `xs` 22px · `sm` 28px · `md` 32px (default) · `lg` 38px. */\n  readonly size = input<FoldButtonIconSize>(\"md\");\n\n  /** Visual tone — `ghost` (default) · `accent` (filled) · `critical` (alert). */\n  readonly tone = input<FoldButtonIconTone>(\"ghost\");\n\n  /** Disable the button — dims it and blocks pointer events. */\n  readonly disabled = input(false, { transform: booleanAttribute });\n\n  /** Swap the icon for a spinner and go busy — blocks activation, stays lit. */\n  readonly loading = input(false, { transform: booleanAttribute });\n\n  /** Tooltip text — sets both `title` and `aria-label`. Strongly recommended. */\n  readonly tooltip = input<string>();\n\n  /** Native `type` of the inner `<button>`. */\n  readonly type = input<\"button\" | \"submit\">(\"button\");\n\n  /** Emitted on click (passes the native `MouseEvent`). */\n  readonly clicked = output<MouseEvent>();\n\n  /** Resolves the icon size from the button size preset. */\n  readonly iconSize = computed<FoldIconSize>(() => {\n    switch (this.size()) {\n      case \"xs\":\n        return \"xs\"; // 12px\n      case \"sm\":\n        return \"sm\"; // 16px\n      case \"md\":\n        return \"sm\"; // 16px in a 32px hit-area\n      case \"lg\":\n        return \"md\"; // 20px in a 38px hit-area\n    }\n  });\n\n  onClick(e: MouseEvent): void {\n    if (this.disabled() || this.loading()) {\n      return;\n    }\n    this.clicked.emit(e);\n  }\n}\n","<button\n  [type]=\"type()\"\n  [disabled]=\"disabled() || loading()\"\n  [attr.title]=\"tooltip() || null\"\n  [attr.aria-label]=\"tooltip() || null\"\n  [attr.aria-busy]=\"loading() ? 'true' : null\"\n  (click)=\"onClick($event)\"\n>\n  @if (loading()) {\n    <fold-spinner [size]=\"iconSize()\" aria-hidden=\"true\" />\n  } @else {\n    <fold-icon [name]=\"icon()\" [size]=\"iconSize()\" />\n  }\n</button>\n","import { InjectionToken, type Provider } from \"@angular/core\";\n\n/**\n * The handful of words the package says **on its own**, scattered across\n * components rather than owned by one.\n *\n * Every other label cluster in fold-ng belongs to a single component\n * (`fold-paginator`, `fold-data-table`, …) and gets its own token. These four do\n * not: `optional` sits on every labelled field, `info` on every help bubble,\n * `clear` on a clearable control, `loading` on a placeholder that can appear\n * anywhere. Left as per-instance inputs only, a non-English app had to repeat\n * the same translation at every call site — 25 `optionalLabel=\"facultatif\"`\n * across 9 files in the app that prompted this — or, worse, forget one and ship\n * a lone English word into an otherwise translated screen.\n *\n * Precedence, as everywhere in the package: **English default ← app-wide\n * provider ← the component's own input**. The per-instance input still wins, for\n * the field whose help bubble deserves a sentence of its own.\n */\nexport interface FoldCommonLabels {\n  /** The word inside a label's `(optional)` marker. */\n  readonly optional: string;\n  /** Accessible name of a help-bubble trigger (`fold-info`, `info` inputs). */\n  readonly info: string;\n  /** Accessible name of a control's clear (×) affordance. */\n  readonly clear: string;\n  /** Message of a `fold-loading` placeholder given no `message`. */\n  readonly loading: string;\n}\n\n/** The English defaults — the base every override merges onto. */\nexport const FOLD_COMMON_DEFAULT_LABELS: FoldCommonLabels = {\n  optional: \"optional\",\n  info: \"More information\",\n  clear: \"Clear\",\n  loading: \"Loading...\",\n};\n\n/** App-wide shared labels; defaults to English. */\nexport const FOLD_COMMON_LABELS = new InjectionToken<FoldCommonLabels>(\n  \"FOLD_COMMON_LABELS\",\n  { factory: () => FOLD_COMMON_DEFAULT_LABELS },\n);\n\n/**\n * Provide the package's shared labels once at bootstrap. Partial — any key you\n * omit keeps its English default.\n *\n * @example\n * ```ts\n * // app.config.ts\n * providers: [\n *   provideFoldCommonLabels({\n *     optional: \"facultatif\",\n *     info: \"En savoir plus\",\n *     clear: \"Effacer\",\n *     loading: \"Chargement…\",\n *   }),\n * ];\n * ```\n */\nexport function provideFoldCommonLabels(\n  labels: Partial<FoldCommonLabels>,\n): Provider {\n  return {\n    provide: FOLD_COMMON_LABELS,\n    useValue: { ...FOLD_COMMON_DEFAULT_LABELS, ...labels },\n  };\n}\n","/**\n * Zero-dependency placement math for {@link FoldPopoverComponent}. Pure and\n * framework-free so it unit-tests without a DOM: give it the anchor rect, the\n * floating size and the viewport, get back the `{ x, y }` to pin the floating\n * element (viewport coordinates, for `position: fixed`) plus the placement it\n * actually resolved to after collision handling.\n *\n * Three middlewares, in the order a good popover applies them:\n * 1. **flip** — pick the best-fitting side: keep the preferred one if it fits,\n *    else its opposite, else whichever has the most room (so a bottom menu opens\n *    upward near the fold instead of spilling offscreen).\n * 2. **size** — report the space available on the chosen side (`maxWidth` /\n *    `maxHeight`), so the caller caps the panel and scrolls the overflow instead\n *    of letting it run off the viewport.\n * 3. **shift** — slide along the cross axis to stay within the viewport padding,\n *    without leaving the anchor's side.\n *\n * We deliberately do not depend on Floating UI — fold ships no runtime deps.\n */\n\n/** The side of the anchor the floating element sits on. */\nexport type FoldPopoverSide = \"top\" | \"bottom\" | \"left\" | \"right\";\n/** Alignment of the floating element along the anchor's cross axis. */\nexport type FoldPopoverAlign = \"start\" | \"center\" | \"end\";\n/** A full placement: a side, optionally suffixed with an alignment. */\nexport type FoldPopoverPlacement =\n  FoldPopoverSide | `${FoldPopoverSide}-${FoldPopoverAlign}`;\n\n/** A rectangle in viewport coordinates (a subset of `DOMRect`). */\nexport interface FoldRect {\n  readonly x: number;\n  readonly y: number;\n  readonly width: number;\n  readonly height: number;\n}\n\nexport interface FoldPlacementInput {\n  /** The trigger's bounding rect, in viewport coordinates. */\n  readonly anchor: FoldRect;\n  /** The floating element's measured size. */\n  readonly floating: { readonly width: number; readonly height: number };\n  /** Preferred placement before collision handling. */\n  readonly placement: FoldPopoverPlacement;\n  /**\n   * Ordered fallbacks tried (after the preferred) when the preferred side can't\n   * fit — the first that fits wins, else the roomiest of all candidates. Each\n   * may change side *and* alignment. Defaults to the opposite side.\n   */\n  readonly fallbackPlacements?: readonly FoldPopoverPlacement[] | undefined;\n  /** Gap between the anchor and the floating element, in px. */\n  readonly offset: number;\n  /** Viewport size (usually `innerWidth` / `innerHeight`). */\n  readonly viewport: { readonly width: number; readonly height: number };\n  /** Minimum gap kept between the floating element and the viewport edge. */\n  readonly padding: number;\n}\n\nexport interface FoldPlacementResult {\n  readonly x: number;\n  readonly y: number;\n  /** The placement after flip — drives the arrow / `data-placement`. */\n  readonly placement: FoldPopoverPlacement;\n  /** Space available to the floating element on the resolved side, minus\n   *  padding — the consumer caps `max-width` / `max-height` to these and lets\n   *  the panel scroll (the `size` middleware). */\n  readonly maxWidth: number;\n  readonly maxHeight: number;\n}\n\nconst OPPOSITE: Record<FoldPopoverSide, FoldPopoverSide> = {\n  top: \"bottom\",\n  bottom: \"top\",\n  left: \"right\",\n  right: \"left\",\n};\n\nfunction isSide(value: string): value is FoldPopoverSide {\n  return (\n    value === \"top\" ||\n    value === \"bottom\" ||\n    value === \"left\" ||\n    value === \"right\"\n  );\n}\n\nfunction isAlign(value: string): value is FoldPopoverAlign {\n  return value === \"start\" || value === \"center\" || value === \"end\";\n}\n\nfunction parse(placement: FoldPopoverPlacement): {\n  side: FoldPopoverSide;\n  align: FoldPopoverAlign;\n} {\n  const [rawSide, rawAlign] = placement.split(\"-\");\n  const side: FoldPopoverSide =\n    rawSide !== undefined && isSide(rawSide) ? rawSide : \"bottom\";\n  const align: FoldPopoverAlign =\n    rawAlign !== undefined && isAlign(rawAlign) ? rawAlign : \"center\";\n  return { side, align };\n}\n\n/** Is `side` on the vertical axis (floating above/below the anchor)? */\nfunction isVertical(side: FoldPopoverSide): boolean {\n  return side === \"top\" || side === \"bottom\";\n}\n\n/** Room available between the anchor and the viewport edge on a given side. */\nfunction roomFor(\n  side: FoldPopoverSide,\n  anchor: FoldRect,\n  viewport: { width: number; height: number },\n): number {\n  switch (side) {\n    case \"top\":\n      return anchor.y;\n    case \"bottom\":\n      return viewport.height - (anchor.y + anchor.height);\n    case \"left\":\n      return anchor.x;\n    case \"right\":\n      return viewport.width - (anchor.x + anchor.width);\n  }\n}\n\n/** Main-axis coordinate (the side offset) for a resolved side. */\nfunction mainAxisCoord(\n  side: FoldPopoverSide,\n  anchor: FoldRect,\n  floating: { width: number; height: number },\n  offset: number,\n): number {\n  switch (side) {\n    case \"top\":\n      return anchor.y - floating.height - offset;\n    case \"bottom\":\n      return anchor.y + anchor.height + offset;\n    case \"left\":\n      return anchor.x - floating.width - offset;\n    case \"right\":\n      return anchor.x + anchor.width + offset;\n  }\n}\n\n/** Cross-axis coordinate before shifting, from the alignment. */\nfunction crossAxisCoord(\n  side: FoldPopoverSide,\n  align: FoldPopoverAlign,\n  anchor: FoldRect,\n  floating: { width: number; height: number },\n): number {\n  const vertical = isVertical(side);\n  const anchorStart = vertical ? anchor.x : anchor.y;\n  const anchorSize = vertical ? anchor.width : anchor.height;\n  const floatSize = vertical ? floating.width : floating.height;\n  switch (align) {\n    case \"start\":\n      return anchorStart;\n    case \"end\":\n      return anchorStart + anchorSize - floatSize;\n    case \"center\":\n      return anchorStart + anchorSize / 2 - floatSize / 2;\n  }\n}\n\n/** Clamp a value into `[min, max]`; if the range is inverted, return `min`. */\nfunction clamp(value: number, min: number, max: number): number {\n  if (max < min) {\n    return min;\n  }\n  return Math.min(Math.max(value, min), max);\n}\n\n/** Room needed on a placement's main axis to fit the floating element. */\nfunction needFor(\n  side: FoldPopoverSide,\n  floating: { width: number; height: number },\n): number {\n  return isVertical(side) ? floating.height : floating.width;\n}\n\n/**\n * Choose the placement (**flip**): try the preferred, then each fallback (the\n * opposite side by default); the first whose side fits the floating element\n * wins. If none fit, take whichever has the most room — the `size` middleware\n * then caps + scrolls the overflow, so it degrades gracefully.\n */\nfunction choosePlacement(input: FoldPlacementInput): {\n  side: FoldPopoverSide;\n  align: FoldPopoverAlign;\n} {\n  const preferred = parse(input.placement);\n  const opposite: FoldPopoverPlacement =\n    preferred.align === \"center\"\n      ? OPPOSITE[preferred.side]\n      : `${OPPOSITE[preferred.side]}-${preferred.align}`;\n  const fallbacks = input.fallbackPlacements ?? [opposite];\n  const candidates = [input.placement, ...fallbacks];\n  let best = preferred;\n  let bestRoom = -Infinity;\n  for (const candidate of candidates) {\n    const parsed = parse(candidate);\n    const room = roomFor(parsed.side, input.anchor, input.viewport);\n    if (room >= needFor(parsed.side, input.floating) + input.offset) {\n      return parsed;\n    }\n    if (room > bestRoom) {\n      bestRoom = room;\n      best = parsed;\n    }\n  }\n  return best;\n}\n\n/**\n * Resolve `{ x, y, placement, maxWidth, maxHeight }` for a floating element.\n * Order: **flip** (choose the best-fitting side) → **size** (available space on\n * that side, for the caller to cap + scroll) → **shift** (slide along the cross\n * axis to stay in the viewport).\n */\nexport function computePlacement(\n  input: FoldPlacementInput,\n): FoldPlacementResult {\n  const { anchor, floating, offset, viewport, padding } = input;\n  const chosen = choosePlacement(input);\n  const side = chosen.side;\n  const align = chosen.align;\n\n  // size: the room on the chosen side (main axis) and the viewport (cross axis).\n  const maxMain = Math.max(\n    0,\n    roomFor(side, anchor, viewport) - offset - padding,\n  );\n  const crossViewport = isVertical(side) ? viewport.width : viewport.height;\n  const maxCross = Math.max(0, crossViewport - 2 * padding);\n  const maxHeight = isVertical(side) ? maxMain : maxCross;\n  const maxWidth = isVertical(side) ? maxCross : maxMain;\n\n  // position with the effective (capped) size so a scrolled panel still sits\n  // flush against the anchor and shifts within the viewport.\n  const eff = {\n    width: Math.min(floating.width, maxWidth),\n    height: Math.min(floating.height, maxHeight),\n  };\n  let x: number;\n  let y: number;\n  if (isVertical(side)) {\n    y = mainAxisCoord(side, anchor, eff, offset);\n    x = crossAxisCoord(side, align, anchor, eff);\n    x = clamp(x, padding, viewport.width - eff.width - padding);\n  } else {\n    x = mainAxisCoord(side, anchor, eff, offset);\n    y = crossAxisCoord(side, align, anchor, eff);\n    y = clamp(y, padding, viewport.height - eff.height - padding);\n  }\n\n  const placement: FoldPopoverPlacement =\n    align === \"center\" ? side : `${side}-${align}`;\n  return { x, y, placement, maxWidth, maxHeight };\n}\n","/**\n * Keep a floating element pinned to its anchor: call `onChange` whenever\n * anything that could move the anchor or resize either element happens —\n * scrolling (capture phase, so nested scroll containers count), a window\n * resize, or a size change of the anchor / floating element (`ResizeObserver`).\n * Returns a teardown that removes every listener. Mirrors Floating UI's\n * `autoUpdate`, dependency-free and scoped to fold's needs.\n */\nexport function autoUpdate(\n  anchor: HTMLElement | null,\n  floating: HTMLElement,\n  onChange: () => void,\n): () => void {\n  if (typeof window === \"undefined\") {\n    return () => undefined;\n  }\n  window.addEventListener(\"scroll\", onChange, true);\n  window.addEventListener(\"resize\", onChange);\n  const ro =\n    typeof ResizeObserver === \"undefined\" ? null : new ResizeObserver(onChange);\n  if (ro) {\n    if (anchor) {\n      ro.observe(anchor);\n    }\n    ro.observe(floating);\n  }\n  return () => {\n    window.removeEventListener(\"scroll\", onChange, true);\n    window.removeEventListener(\"resize\", onChange);\n    ro?.disconnect();\n  };\n}\n","import {\n  afterRenderEffect,\n  booleanAttribute,\n  Component,\n  effect,\n  ElementRef,\n  inject,\n  input,\n  model,\n  Renderer2,\n  RendererStyleFlags2,\n  viewChild,\n} from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { computePlacement, type FoldPopoverPlacement } from \"./placement\";\nimport { autoUpdate } from \"./auto-update\";\n\n/**\n * `<fold-popover>` — an anchored floating layer. Project a trigger\n * (`[foldPopoverTrigger]`) and any content; the content renders in the native\n * **top layer** (via the `popover` attribute, so it escapes `overflow: hidden`\n * and every `z-index`) and is positioned against the trigger with a\n * dependency-free flip/shift engine ({@link computePlacement}).\n *\n * Controlled or uncontrolled through `[(open)]`. Dismissal is owned here\n * (outside-click + `Escape`) rather than the browser's light-dismiss, so\n * re-clicking the trigger toggles cleanly instead of reopening. Opening moves\n * focus into the panel; closing returns it to the trigger. The trigger gets\n * `aria-haspopup` / `aria-expanded` / `aria-controls` wired automatically.\n *\n * For an actions menu with `role=\"menu\"` + keyboard, use `fold-dropdown`, which\n * is built on this.\n *\n * The panel's width is `max-content`; to make it match the trigger (a select-like\n * dropdown), read the published `--fold-popover-anchor-width` in the panel's CSS\n * (e.g. `min-width: var(--fold-popover-anchor-width)`) — it tracks the trigger.\n *\n * @selector `fold-popover`\n *\n * The trigger carries `[foldPopoverTrigger]`; the floating content is marked\n * `foldPopoverPanel`.\n *\n * @example\n * ```html\n * <fold-popover placement=\"bottom-end\">\n *   <button foldButton foldPopoverTrigger>Filters</button>\n *   <div foldPopoverPanel class=\"my-panel\">…</div>\n * </fold-popover>\n * ```\n */\n@Component({\n  selector: \"fold-popover\",\n  standalone: true,\n  templateUrl: \"./popover.component.html\",\n  styleUrl: \"./popover.component.scss\",\n  host: {\n    class: \"fold-popover\",\n    \"(click)\": \"onHostClick($event)\",\n    \"(keydown.arrowdown)\": \"onArrowDown($event)\",\n  },\n})\nexport class FoldPopoverComponent {\n  private readonly renderer = inject(Renderer2);\n  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  /** Preferred placement before collision handling. @default \"bottom-start\" */\n  readonly placement = input<FoldPopoverPlacement>(\"bottom-start\");\n  /** Ordered placements to try when the preferred can't fit (default: the\n   *  opposite side). The first that fits wins, else the roomiest. */\n  readonly fallbackPlacements = input<readonly FoldPopoverPlacement[]>();\n  /** Gap between the trigger and the panel, in px. @default 8 */\n  readonly offset = input(8);\n  /** Minimum gap kept from the viewport edge, in px. @default 8 */\n  readonly padding = input(8);\n  /** Move focus into the panel on open. @default true (a dropdown sets false to\n   *  focus its first item instead). */\n  readonly autoFocus = input(true);\n  /** Show a small arrow pointing at the trigger. @default false */\n  readonly arrow = input(false, { transform: booleanAttribute });\n  /** Two-way open state — drive it, or let the trigger toggle it. */\n  readonly open = model(false);\n\n  /** SSR-safe id linking the trigger's `aria-controls` to the panel. */\n  readonly panelId = inject(FoldIdService).next(\"fold-popover\");\n  /** Override the trigger's `aria-controls` target — point it at the real\n   *  controlled element (e.g. an inner `role=\"listbox\"`) when the panel is just a\n   *  wrapper. @default the panel's own id. */\n  readonly ariaControls = input<string>();\n\n  private readonly panel = viewChild<ElementRef<HTMLElement>>(\"panel\");\n  private readonly inner = viewChild<ElementRef<HTMLElement>>(\"inner\");\n  private readonly arrowEl = viewChild<ElementRef<HTMLElement>>(\"arrow\");\n\n  /**\n   * The marked trigger — the projected `[foldPopoverTrigger]`. Found by DOM\n   * query on the host (projected content is a DOM descendant of the host), so it\n   * resolves regardless of how deeply it is re-projected (e.g. through\n   * `fold-dropdown`) — a content query would not survive the re-projection. Used\n   * to anchor against and to detect trigger clicks.\n   */\n  private markedTrigger(): HTMLElement | null {\n    return this.host.nativeElement.querySelector<HTMLElement>(\n      \"[foldPopoverTrigger]\",\n    );\n  }\n\n  private static readonly FOCUSABLE =\n    \"button, a[href], input, select, textarea, [tabindex]\";\n\n  /**\n   * The focusable trigger — the marked element itself if it's focusable, else\n   * the first focusable inside it (e.g. `fold-button-icon`'s inner `<button>`).\n   * This is what receives focus + the aria wiring, so a wrapper trigger is still\n   * fully keyboard-accessible.\n   */\n  private focusableTrigger(): HTMLElement | null {\n    const marked = this.markedTrigger();\n    if (!marked) {\n      return null;\n    }\n    if (marked.matches(FoldPopoverComponent.FOCUSABLE)) {\n      return marked;\n    }\n    return marked.querySelector<HTMLElement>(FoldPopoverComponent.FOCUSABLE);\n  }\n\n  constructor() {\n    // Keep the trigger's aria in sync — all on the focusable element, so a\n    // screen reader announces haspopup/expanded/controls on the control it lands\n    // on. `haspopup` comes from the marked element's attribute value.\n    effect(() => {\n      const open = this.open();\n      const focusable = this.focusableTrigger();\n      const marked = this.markedTrigger();\n      if (!focusable || !marked) {\n        return;\n      }\n      const hp = marked.getAttribute(\"foldpopovertrigger\");\n      const haspopup =\n        hp === \"menu\" || hp === \"listbox\" || hp === \"true\" ? hp : \"dialog\";\n      this.renderer.setAttribute(focusable, \"aria-haspopup\", haspopup);\n      this.renderer.setAttribute(\n        focusable,\n        \"aria-controls\",\n        this.ariaControls() ?? this.panelId,\n      );\n      this.renderer.setAttribute(focusable, \"aria-expanded\", String(open));\n    });\n\n    // Open/close the native popover + own the dismissal and positioning.\n    afterRenderEffect((onCleanup) => {\n      const el = this.panel()?.nativeElement;\n      if (!el || typeof document === \"undefined\") {\n        return;\n      }\n      const supported = typeof el.showPopover === \"function\";\n      if (this.open()) {\n        if (supported && !el.matches(\":popover-open\")) {\n          el.showPopover();\n        }\n        this.reposition();\n        if (this.autoFocus()) {\n          el.focus({ preventScroll: true });\n        }\n\n        const onDown = (event: Event): void => {\n          const target = event.target;\n          if (!(target instanceof Node)) {\n            return;\n          }\n          const inPanel = el.contains(target);\n          const inTrigger = this.markedTrigger()?.contains(target) ?? false;\n          if (!inPanel && !inTrigger) {\n            this.open.set(false);\n          }\n        };\n        const onKey = (event: KeyboardEvent): void => {\n          if (event.key === \"Escape\") {\n            this.open.set(false);\n          }\n        };\n        document.addEventListener(\"pointerdown\", onDown, true);\n        document.addEventListener(\"keydown\", onKey, true);\n        // Keep pinned while open: scroll / resize / element-resize.\n        const stopAutoUpdate = autoUpdate(this.markedTrigger(), el, () =>\n          this.reposition(),\n        );\n        onCleanup(() => {\n          document.removeEventListener(\"pointerdown\", onDown, true);\n          document.removeEventListener(\"keydown\", onKey, true);\n          stopAutoUpdate();\n        });\n      } else if (supported && el.matches(\":popover-open\")) {\n        // Only pull focus back to the trigger if it's still inside the closing\n        // panel (Escape / select) or nowhere in particular (a click on blank\n        // space → body). If it already moved elsewhere — Tab to the next field,\n        // a click on another control — leave it there instead of yanking it back.\n        const active = document.activeElement;\n        const restore =\n          !active || active === document.body || el.contains(active);\n        el.hidePopover();\n        if (restore) {\n          this.focusableTrigger()?.focus({ preventScroll: true });\n        }\n      }\n    });\n  }\n\n  /** Position the panel against the trigger: flip → size (cap + scroll) → shift,\n   *  then place the arrow. */\n  private reposition(): void {\n    const panel = this.panel()?.nativeElement;\n    const anchorEl = this.markedTrigger();\n    if (!panel || !anchorEl) {\n      return;\n    }\n    const anchor = anchorEl.getBoundingClientRect();\n    const result = computePlacement({\n      anchor,\n      floating: { width: panel.offsetWidth, height: panel.offsetHeight },\n      placement: this.placement(),\n      fallbackPlacements: this.fallbackPlacements(),\n      offset: this.offset(),\n      viewport: { width: window.innerWidth, height: window.innerHeight },\n      padding: this.padding(),\n    });\n    this.renderer.setStyle(panel, \"position\", \"fixed\");\n    this.renderer.setStyle(panel, \"left\", `${result.x}px`);\n    this.renderer.setStyle(panel, \"top\", `${result.y}px`);\n    this.renderer.setStyle(panel, \"margin\", \"0\");\n    // Expose the trigger width so a panel can match it (a select-like dropdown):\n    // read `var(--fold-popover-anchor-width)` in the projected panel's CSS.\n    this.renderer.setStyle(\n      panel,\n      \"--fold-popover-anchor-width\",\n      `${anchor.width}px`,\n      RendererStyleFlags2.DashCase,\n    );\n    this.renderer.setAttribute(panel, \"data-placement\", result.placement);\n    // Apply the size caps only when positive — a degenerate 0-size viewport\n    // (SSR / detached) must not collapse the panel to nothing.\n    this.applyCap(panel, \"max-width\", result.maxWidth);\n    this.applyCap(this.inner()?.nativeElement, \"max-height\", result.maxHeight);\n    this.positionArrow(result.placement, anchor, result.x, result.y);\n  }\n\n  /** Set a `max-*` cap in px, but only when positive (skip a degenerate 0). */\n  private applyCap(\n    el: HTMLElement | undefined,\n    prop: string,\n    value: number,\n  ): void {\n    if (!el) {\n      return;\n    }\n    if (value > 0) {\n      this.renderer.setStyle(el, prop, `${value}px`);\n    } else {\n      this.renderer.removeStyle(el, prop);\n    }\n  }\n\n  /** Center the arrow on the anchor along the cross axis, clamped to the panel. */\n  private positionArrow(\n    placement: FoldPopoverPlacement,\n    anchor: DOMRect,\n    x: number,\n    y: number,\n  ): void {\n    const arrow = this.arrowEl()?.nativeElement;\n    const panel = this.panel()?.nativeElement;\n    if (!arrow || !panel) {\n      return;\n    }\n    const side = placement.split(\"-\")[0];\n    const s = 11; // arrow box, px (matches .fpop-arrow)\n    const inset = 6; // keep clear of the rounded corner\n    const set = (prop: string, value: string): void =>\n      this.renderer.setStyle(arrow, prop, value);\n    for (const p of [\"top\", \"bottom\", \"left\", \"right\"]) {\n      this.renderer.removeStyle(arrow, p);\n    }\n    if (side === \"top\" || side === \"bottom\") {\n      const raw = anchor.x + anchor.width / 2 - x - s / 2;\n      set(\n        \"left\",\n        `${Math.max(inset, Math.min(raw, panel.offsetWidth - s - inset))}px`,\n      );\n      set(side === \"bottom\" ? \"top\" : \"bottom\", `${-s / 2}px`);\n    } else {\n      const raw = anchor.y + anchor.height / 2 - y - s / 2;\n      set(\n        \"top\",\n        `${Math.max(inset, Math.min(raw, panel.offsetHeight - s - inset))}px`,\n      );\n      set(side === \"right\" ? \"left\" : \"right\", `${-s / 2}px`);\n    }\n  }\n\n  protected onHostClick(event: MouseEvent): void {\n    const target = event.target;\n    if (\n      target instanceof Node &&\n      (this.markedTrigger()?.contains(target) ?? false)\n    ) {\n      this.open.update((v) => !v);\n    }\n  }\n\n  protected onArrowDown(event: Event): void {\n    const target = event.target;\n    if (\n      target instanceof Node &&\n      (this.markedTrigger()?.contains(target) ?? false)\n    ) {\n      event.preventDefault();\n      this.open.set(true);\n    }\n  }\n}\n","<ng-content />\n<div #panel class=\"fpop-panel\" popover=\"manual\" [id]=\"panelId\" tabindex=\"-1\">\n  @if (arrow()) {\n    <div #arrow class=\"fpop-arrow\" aria-hidden=\"true\"></div>\n  }\n  <div #inner class=\"fpop-inner\">\n    <ng-content select=\"[foldPopoverPanel]\" />\n  </div>\n</div>\n","import { Directive, ElementRef, inject, input } from \"@angular/core\";\n\n/**\n * Marks the element inside a `<fold-popover>` that opens it — apply to a real,\n * focusable control (a `foldButton`), or a wrapper whose first focusable child\n * is the control (a `fold-button-icon`). The popover anchors to this element,\n * and wires `aria-haspopup` / `aria-expanded` / `aria-controls` onto the\n * focusable control. The value picks the `aria-haspopup` token — it is reflected\n * to the marker attribute so both `foldPopoverTrigger=\"menu\"` and\n * `[foldPopoverTrigger]=\"expr\"` work.\n *\n * ```html\n * <fold-popover>\n *   <button foldButton foldPopoverTrigger=\"menu\">Actions</button>\n *   …panel…\n * </fold-popover>\n * ```\n *\n * @selector `[foldPopoverTrigger]`\n */\n@Directive({\n  selector: \"[foldPopoverTrigger]\",\n  standalone: true,\n  host: { \"[attr.foldpopovertrigger]\": \"haspopup()\" },\n})\nexport class FoldPopoverTriggerDirective {\n  /** The trigger's host element. */\n  readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n  /**\n   * `aria-haspopup` value. @default \"dialog\" (use \"menu\" for a dropdown). Bare\n   * `foldPopoverTrigger` (no value) keeps the default.\n   */\n  readonly haspopup = input<FoldTriggerHaspopup, string>(\"dialog\", {\n    alias: \"foldPopoverTrigger\",\n    transform: (value) =>\n      value === \"menu\" || value === \"listbox\" || value === \"true\"\n        ? value\n        : \"dialog\",\n  });\n}\n\ntype FoldTriggerHaspopup = \"menu\" | \"dialog\" | \"listbox\" | \"true\";\n","import {\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  inject,\n  input,\n} from \"@angular/core\";\nimport { FOLD_COMMON_LABELS } from \"../../forms/common-labels\";\nimport type { FoldPopoverPlacement } from \"../popover/placement\";\nimport { FoldPopoverComponent } from \"../popover/popover.component\";\nimport { FoldPopoverTriggerDirective } from \"../popover/popover-trigger.directive\";\n\n/**\n * `<fold-info>` — the small `i` that answers \"what is this?\".\n *\n * A round, quiet trigger at the end of a label line or in a card's corner; on\n * click it reveals a sentence or two in a popover. It is the affordance for\n * explanation that is **worth reading once and not worth taking permanent\n * space**: a hint under a field is read every time and must stay to one line,\n * while the *why* behind a setting takes a paragraph and would push the next\n * control down for a reader who already knows it.\n *\n * Built on {@link FoldPopoverComponent}, not a hand-positioned bubble: the panel\n * rides the native top layer, so it escapes any `overflow: hidden` (a chart\n * card, a scroll region) and every `z-index`, and `Escape` / outside-click /\n * `aria-haspopup` + `aria-expanded` + `aria-controls` come with it.\n *\n * A click, not a hover: hover-only help is unreachable on a touch screen and\n * hostile to anyone whose pointer isn't steady. The cursor still reads `help`.\n *\n * @selector `fold-info`\n *\n * @example\n * ```html\n * <fold-info text=\"Everything after this delay is bookable — before it, nothing.\" />\n * ```\n */\n@Component({\n  selector: \"fold-info\",\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [FoldPopoverComponent, FoldPopoverTriggerDirective],\n  templateUrl: \"./info.component.html\",\n  styleUrl: \"./info.component.scss\",\n})\nexport class FoldInfoComponent {\n  /** The explanation. One or two sentences — past that, it wants a page. */\n  readonly text = input.required<string>();\n  /**\n   * Accessible name of the trigger. English by default; a consumer localises it\n   * — and should say what it explains (\"More information about the lead time\")\n   * when several sit on the same screen.\n   * @default 'More information'\n   */\n  readonly label = input<string | undefined>();\n  /**\n   * Where the panel opens. `bottom-end` by default because the trigger usually\n   * sits at the **end** of a label line or a card header, where a panel growing\n   * further outward would leave the viewport.\n   */\n  readonly placement = input<FoldPopoverPlacement>(\"bottom-end\");\n\n  private readonly common = inject(FOLD_COMMON_LABELS);\n\n  /** English default ← app-wide provider ← this instance's own input. */\n  protected readonly triggerLabel = computed(\n    () => this.label() ?? this.common.info,\n  );\n}\n","<fold-popover [placement]=\"placement()\" arrow>\n  <button\n    foldPopoverTrigger\n    type=\"button\"\n    class=\"fi-trigger\"\n    [attr.aria-label]=\"triggerLabel()\"\n  >\n    <span aria-hidden=\"true\">i</span>\n  </button>\n  <div foldPopoverPanel class=\"fi-panel\">{{ text() }}</div>\n</fold-popover>\n","import {\n  Component,\n  booleanAttribute,\n  computed,\n  inject,\n  input,\n} from \"@angular/core\";\nimport { FOLD_COMMON_LABELS } from \"../common-labels\";\n\n/**\n * `<fold-label>` — the label element for a form control: the text plus an optional\n * required marker. Package-internal; the input controls render it through\n * {@link FoldInputBaseComponent}, so consumers never place it themselves. Kept\n * separate so the label + asterisk styling lives in one place (reusable later by\n * checkbox / radio groups).\n *\n * @selector `fold-label`\n */\n@Component({\n  selector: \"fold-label\",\n  standalone: true,\n  template: `<label [attr.for]=\"for()\"\n    >{{ text() }}\n    @if (required()) {\n      <span class=\"req\" aria-hidden=\"true\">*</span>\n    } @else if (optional()) {\n      <span class=\"opt\">({{ optionalWord() }})</span>\n    }\n  </label>`,\n  styleUrl: \"./label.component.scss\",\n})\nexport class FoldLabelComponent {\n  /** The label text. */\n  readonly text = input.required<string>();\n  /** The id of the control this labels (`<label for>`). */\n  readonly for = input<string>();\n  /** Show the required marker (`*`). Takes precedence over {@link optional}. */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Show a lighter, parenthesised optional marker after the label. */\n  readonly optional = input(false, { transform: booleanAttribute });\n  /** The word inside the optional marker's parentheses. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n\n  private readonly common = inject(FOLD_COMMON_LABELS);\n\n  /** English default ← app-wide provider ← this instance's own input. */\n  protected readonly optionalWord = computed(\n    () => this.optionalLabel() ?? this.common.optional,\n  );\n}\n","import { booleanAttribute, Component, input } from \"@angular/core\";\nimport { FoldInfoComponent } from \"../../overlays/info/info.component\";\nimport { FoldLabelComponent } from \"./label.component\";\n\n/**\n * `<fold-input-base>` — the shared field chrome around a form control: an optional\n * label (with required marker) above, the projected control, and an optional hint\n * below. Package-internal — each control ({@link FoldInputComponent},\n * `fold-number-input`, `fold-select`) composes it in its own template and projects\n * its native element in, so the label / required / hint (and, later, error)\n * markup lives in exactly one place instead of being duplicated per control.\n *\n * The control owns its id and passes it as {@link for} so the label associates\n * with it — no cross-encapsulation wiring, because the label and the control sit\n * in the same component template.\n *\n * **{@link hint} vs {@link info}.** A hint is one line the reader should see\n * without asking — a format, a unit, a constraint. An explanation that takes a\n * sentence or two doesn't belong under every field: it pushes the next control\n * down and gets skipped anyway. That's {@link info} — an `i` at the end of the\n * label line, revealing the text in a popover. The two compose: keep the hint\n * short, put the *why* behind the `i`. That `i` is {@link FoldInfoComponent}, a\n * primitive of its own, so the same affordance is available where there is no\n * field at all — a dashboard card's corner, a table header.\n *\n * @selector `fold-input-base`\n */\n@Component({\n  selector: \"fold-input-base\",\n  standalone: true,\n  imports: [FoldLabelComponent, FoldInfoComponent],\n  templateUrl: \"./input-base.component.html\",\n  styleUrl: \"./input-base.component.scss\",\n})\nexport class FoldInputBaseComponent {\n  /** Label text; omit for no label. */\n  readonly label = input<string>();\n  /** Id of the projected control, for the `<label for>` association. */\n  readonly for = input<string>();\n  /** Show the required marker on the label. */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Show a lighter `(optional)` marker on the label (ignored when required). */\n  readonly optional = input(false, { transform: booleanAttribute });\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n  /** Helper text shown under the control. */\n  readonly hint = input<string>();\n  /** Error message shown under the control; when set, it replaces the hint. */\n  readonly error = input<string>();\n  /**\n   * Longer explanation, revealed by an `i` button at the end of the label line.\n   * For the sentence or two a {@link hint} can't carry — what the setting really\n   * changes, why a format is required. Needs a {@link label} to sit next to.\n   */\n  readonly info = input<string>();\n  /** Accessible name of the info button. @default 'More information' */\n  readonly infoLabel = input<string | undefined>();\n}\n","@if (label(); as labelText) {\n  <div class=\"ib-label-row\">\n    <fold-label\n      [text]=\"labelText\"\n      [for]=\"for()\"\n      [required]=\"required()\"\n      [optional]=\"optional()\"\n      [optionalLabel]=\"optionalLabel()\"\n    />\n    @if (info(); as infoText) {\n      <fold-info [text]=\"infoText\" [label]=\"infoLabel()\" />\n    }\n  </div>\n}\n\n<ng-content />\n\n@if (error(); as errorText) {\n  <p\n    class=\"ib-msg ib-error\"\n    role=\"alert\"\n    [attr.id]=\"for() ? for() + '-error' : null\"\n  >\n    {{ errorText }}\n  </p>\n} @else if (hint(); as hintText) {\n  <p class=\"ib-msg ib-hint\" [attr.id]=\"for() ? for() + '-hint' : null\">\n    {{ hintText }}\n  </p>\n}\n","/** Read `.value` off an input/select/textarea event target as a string, without `$any()`. */\nexport function readInputValue(event: Event): string {\n  const target = event.target;\n  if (target instanceof HTMLInputElement) {\n    return target.value;\n  }\n  if (target instanceof HTMLSelectElement) {\n    return target.value;\n  }\n  if (target instanceof HTMLTextAreaElement) {\n    return target.value;\n  }\n  return \"\";\n}\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  ElementRef,\n  inject,\n  input,\n  model,\n  signal,\n  viewChild,\n} from \"@angular/core\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport { FoldInputBaseComponent } from \"./input-base.component\";\nimport { readInputValue } from \"./input-value\";\n\n/**\n * `<fold-input>` — the text-input control (`value: string`): the *edit* half of a\n * record, where {@link FoldFieldComponent} is the *read* half. It renders an\n * optional label + a native `<input>` styled to the tokens, plus the field\n * chrome from {@link FoldInputBaseComponent} (label / required / hint / error).\n * When bound via `[formField]`, it surfaces the field's first validation error\n * under the input once touched. For numeric fields use {@link\n * FoldNumberInputComponent} — a separate control so each keeps its true value\n * type instead of a `string | number` union.\n *\n * Integrates with signal forms via the `FormValueControl` contract (bind with\n * `[formField]`), or drive it standalone with `[(value)]` / `(valueChange)`.\n * Variant, size and alignment are applied as host classes (`:host(.sm.center)`).\n *\n * @selector `fold-input`\n *\n * @example\n * ```html\n * <!-- Signal-forms field -->\n * <fold-input placeholder=\"Version name…\" [formField]=\"form.label\" />\n *\n * <!-- Standalone two-way -->\n * <fold-input size=\"sm\" placeholder=\"Filter…\" [(value)]=\"term\" />\n *\n * <!-- Read-only display -->\n * <fold-input [value]=\"title\" [readOnly]=\"true\" />\n * ```\n */\n@Component({\n  selector: \"fold-input\",\n  standalone: true,\n  imports: [FoldInputBaseComponent, FoldIconComponent],\n  templateUrl: \"./input.component.html\",\n  styleUrl: \"./input.component.scss\",\n  host: {\n    \"[class]\": 'size() + \" \" + align() + \" \" + variant()',\n  },\n})\nexport class FoldInputComponent implements FormValueControl<string> {\n  /** The bound value — a `model()` so signal forms' `FormField` and `[(value)]`\n   *  both keep it in sync. */\n  readonly value = model<string>(\"\");\n  /** Disabled state — bound automatically by `FormField` from the field. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — set on blur (so `FormField` marks the field\n   *  touched), and kept in sync with the field's touched state. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField` from the field. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n  /**\n   * Native input type (text-like only; use {@link FoldNumberInputComponent} for numbers).\n   * @default 'text'\n   */\n  readonly type = input<\"text\" | \"email\" | \"password\" | \"tel\" | \"url\">(\"text\");\n  /** On a `password` input, offer a reveal (eye) toggle to show/hide the value. */\n  readonly revealable = input(false, { transform: booleanAttribute });\n  /** Accessible name of the reveal control while hidden. @default 'Show password' */\n  readonly revealLabel = input(\"Show password\");\n  /** Accessible name of the reveal control while shown. @default 'Hide password' */\n  readonly hideLabel = input(\"Hide password\");\n\n  /**\n   * Size preset controlling height, font-size, padding and border-radius.\n   * - `sm` — compact (text-sm, tight padding) — inline table edits, compact forms\n   * - `md` — standard (text-md) — default form fields\n   * - `lg` — large (text-lg, generous padding) — prominent inputs\n   * @default 'md'\n   */\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n\n  /**\n   * Text alignment inside the input.\n   * - `start` — left-aligned (default for text)\n   * - `center` — centered (useful for short number fields like BPM, duration)\n   * @default 'start'\n   */\n  readonly align = input<\"start\" | \"center\">(\"start\");\n\n  /**\n   * Visual variant.\n   * - `default` — solid `--fold-color-surface-card` fill + focus glow ring;\n   *   standalone forms (auth, profile, dialogs).\n   * - `panel` — flatter `--fold-color-surface-raised` fill, no focus glow, roomier\n   *   box (own padding / `radius-sm` / content-height, so `size` only drives the\n   *   font); reproduces the legacy side-panel `.field-input`.\n   * @default 'default'\n   */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n\n  /** Optional label displayed above the input. */\n  readonly label = input<string>();\n\n  /** Show a required marker on the label (and set the native `required`). */\n  readonly required = input(false, { transform: booleanAttribute });\n\n  /** Show a lighter `(optional)` marker on the label (ignored when required). */\n  readonly optional = input(false, { transform: booleanAttribute });\n\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n  /**\n   * Longer explanation behind an `i` at the end of the label line — for the\n   * sentence or two a {@link hint} can't carry. Forwarded to `fold-input-base`.\n   */\n  readonly info = input<string>();\n  /** Accessible name of the info button. @default 'More information' */\n  readonly infoLabel = input<string | undefined>();\n\n  /**\n   * Accessible name for the control itself, when there is **no visible\n   * `label`** — a filter in a toolbar, a control whose meaning the surrounding\n   * text already carries. Without it such a control reaches assistive tech named\n   * only by its current value (\"Week\"), which says nothing about what it sets.\n   *\n   * Prefer a visible `label`: it names the control for *everyone*. Set this only\n   * where the design genuinely has no room — and never both, since `aria-label`\n   * would override the visible one and leave the two out of sync.\n   */\n  readonly ariaLabel = input<string | undefined>(undefined);\n  /** Optional helper text shown under the input. */\n  readonly hint = input<string>();\n\n  /** Placeholder text. */\n  readonly placeholder = input(\"\");\n\n  /**\n   * An icon drawn **inside the box, before the text** — a magnifier on a search\n   * field, a currency mark on an amount.\n   *\n   * The input reserves the room itself, so the glyph never sits on the text.\n   * Purely decorative: it is `aria-hidden`, and it never replaces a `label` or\n   * an `ariaLabel` — an icon is not an accessible name.\n   */\n  readonly leadingIcon = input<FoldIconName | undefined>(undefined);\n\n  /**\n   * Show a trailing **clear** button while the field holds text.\n   *\n   * The affordance every search box grows by hand: a conditional `×` that empties\n   * the value and gives the focus back, so typing can resume without a second\n   * click. Off by default — a form field that clears itself invites the accident\n   * it cannot undo.\n   *\n   * A `revealable` password wins the trailing slot: the two never make sense\n   * together, and hiding the reveal would be the worse of the two losses.\n   */\n  readonly clearable = input(false, { transform: booleanAttribute });\n\n  /** Accessible name of the clear button. Override it to translate. */\n  readonly clearLabel = input(\"Clear\");\n\n  /** Render as read-only. Named `readOnly` (not `readonly`) to avoid the\n   *  signal-forms `FormField` reserved `readonly` field-state binding. */\n  readonly readOnly = input(false);\n\n  /** Whether to autofocus on mount. */\n  readonly autofocus = input(false);\n\n  /**\n   * Native `autocomplete` attribute — passes through to the `<input>`.\n   *\n   * Recommended values for auth forms:\n   * - login email → `email` (or `username`)\n   * - login password → `current-password`\n   * - register email → `email`\n   * - register password → `new-password`\n   * - given / family names → `given-name` / `family-name`\n   *\n   * Browsers and password managers (Dashlane, 1Password, etc.) rely on\n   * this to fill credentials correctly and silence DOM warnings.\n   */\n  readonly autocomplete = input<string | null>(null);\n\n  /** Unique, SSR-safe id for label association (see {@link FoldIdService}). */\n  readonly inputId = inject(FoldIdService).next(\"fold-input\");\n\n  /** The native control — the clear button hands the focus back to it. */\n  private readonly field = viewChild<ElementRef<HTMLInputElement>>(\"field\");\n\n  /** The message to show under the field: the first error, once touched. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n\n  /** `aria-describedby` target: the error when shown, else the hint, else none. */\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  /** Is the password currently revealed (shown as plain text)? */\n  protected readonly revealed = signal(false);\n  /** Whether to render the reveal toggle — a `revealable` password input. */\n  protected readonly showReveal = computed(\n    () => this.revealable() && this.type() === \"password\",\n  );\n  /** The native `type` to render — `text` while a password is revealed. */\n  protected readonly effectiveType = computed(() =>\n    this.showReveal() && this.revealed() ? \"text\" : this.type(),\n  );\n  /** The reveal control's accessible name, tracking its state. */\n  protected readonly revealAria = computed(() =>\n    this.revealed() ? this.hideLabel() : this.revealLabel(),\n  );\n\n  /**\n   * Whether to render the clear button: asked for, something to clear, and a\n   * field that can still be edited. A `×` over a read-only value would promise\n   * a gesture the control refuses.\n   */\n  protected readonly showClear = computed(\n    () =>\n      this.clearable() &&\n      this.value() !== \"\" &&\n      !this.disabled() &&\n      !this.readOnly() &&\n      !this.showReveal(),\n  );\n\n  protected toggleReveal(): void {\n    this.revealed.update((shown) => !shown);\n  }\n\n  /** Empties the field and returns the focus, so typing resumes in place. */\n  protected clear(): void {\n    this.value.set(\"\");\n    this.field()?.nativeElement.focus();\n  }\n\n  /** Handles native input event. `value.set()` also fires the model's\n   *  auto `valueChange` output for standalone `(valueChange)` consumers. */\n  onInputChange(event: Event): void {\n    this.value.set(readInputValue(event));\n  }\n\n  /** Mark the field touched on blur, so errors can surface. */\n  protected onBlur(): void {\n    this.touched.set(true);\n  }\n}\n","<fold-input-base\n  [label]=\"label()\"\n  [for]=\"inputId\"\n  [required]=\"required()\"\n  [optional]=\"optional()\"\n  [optionalLabel]=\"optionalLabel()\"\n  [info]=\"info()\"\n  [infoLabel]=\"infoLabel()\"\n  [hint]=\"hint()\"\n  [error]=\"errorMessage()\"\n>\n  <div class=\"in-field\">\n    @if (leadingIcon(); as glyph) {\n      <fold-icon class=\"in-lead\" [name]=\"glyph\" size=\"sm\" aria-hidden=\"true\" />\n    }\n    <input\n      #field\n      [id]=\"inputId\"\n      [class.has-lead]=\"leadingIcon() !== undefined\"\n      [class.has-reveal]=\"showReveal() || showClear()\"\n      [attr.type]=\"effectiveType()\"\n      [attr.placeholder]=\"placeholder()\"\n      [attr.readonly]=\"readOnly() || null\"\n      [attr.disabled]=\"disabled() || null\"\n      [attr.required]=\"required() || null\"\n      [attr.aria-invalid]=\"errorMessage() ? true : null\"\n      [attr.aria-describedby]=\"describedBy()\"\n      [attr.aria-label]=\"ariaLabel()\"\n      [attr.autocomplete]=\"autocomplete()\"\n      [value]=\"value()\"\n      (input)=\"onInputChange($event)\"\n      (blur)=\"onBlur()\"\n    />\n    @if (showReveal()) {\n      <button\n        type=\"button\"\n        class=\"in-reveal\"\n        [attr.aria-label]=\"revealAria()\"\n        [attr.aria-pressed]=\"revealed()\"\n        [disabled]=\"disabled() || readOnly()\"\n        (click)=\"toggleReveal()\"\n      >\n        <fold-icon\n          [name]=\"revealed() ? 'eye-off' : 'eye'\"\n          size=\"sm\"\n          aria-hidden=\"true\"\n        />\n      </button>\n    } @else if (showClear()) {\n      <button\n        type=\"button\"\n        class=\"in-reveal\"\n        [attr.aria-label]=\"clearLabel()\"\n        (click)=\"clear()\"\n      >\n        <fold-icon name=\"close\" size=\"sm\" aria-hidden=\"true\" />\n      </button>\n    }\n  </div>\n</fold-input-base>\n","import { InjectionToken, type Provider } from \"@angular/core\";\n\n/**\n * Every user-facing / accessible string the inline-confirm renders. The\n * `typePrompt` is a function of the value to match, so a locale can reword the\n * whole sentence rather than translate a fixed template. All defaults are\n * English — a non-English app overrides them once via\n * {@link provideFoldInlineConfirmLabels}, or per instance via the `labels` input.\n */\nexport interface FoldInlineConfirmLabels {\n  /** Label of the confirm button. */\n  readonly confirm: string;\n  /** Label of the cancel button. */\n  readonly cancel: string;\n  /** `aria-label` of the icon-only cancel button (`cancelIcon`). */\n  readonly cancelAria: string;\n  /** Confirm-button label while `loading`. */\n  readonly busy: string;\n  /** Accessible name of the confirmation group that replaces the trigger. */\n  readonly group: string;\n  /** Placeholder + prompt for the secret field (`password`, no `match`). */\n  readonly secret: string;\n  /** The type-to-confirm prompt, e.g. `(\"prod\") => \"Type prod to confirm\"`. */\n  readonly typePrompt: (match: string) => string;\n}\n\n/** The English defaults — the base every override merges onto. */\nexport const FOLD_INLINE_CONFIRM_DEFAULT_LABELS: FoldInlineConfirmLabels = {\n  confirm: \"Confirm\",\n  cancel: \"Cancel\",\n  cancelAria: \"Cancel\",\n  busy: \"Working…\",\n  group: \"Confirm action\",\n  secret: \"Password\",\n  typePrompt: (match) => `Type ${match} to confirm`,\n};\n\n/** App-wide inline-confirm labels; defaults to English. */\nexport const FOLD_INLINE_CONFIRM_LABELS =\n  new InjectionToken<FoldInlineConfirmLabels>(\"FOLD_INLINE_CONFIRM_LABELS\", {\n    factory: () => FOLD_INLINE_CONFIRM_DEFAULT_LABELS,\n  });\n\n/**\n * Provide app-wide inline-confirm labels once at bootstrap. Partial — any key\n * you omit keeps its English default.\n *\n * @example\n * ```ts\n * // app.config.ts\n * providers: [\n *   provideFoldInlineConfirmLabels({\n *     confirm: \"Confirmer\",\n *     cancel: \"Annuler\",\n *     typePrompt: (m) => `Saisissez ${m} pour confirmer`,\n *   }),\n * ];\n * ```\n */\nexport function provideFoldInlineConfirmLabels(\n  labels: Partial<FoldInlineConfirmLabels>,\n): Provider {\n  return {\n    provide: FOLD_INLINE_CONFIRM_LABELS,\n    useValue: { ...FOLD_INLINE_CONFIRM_DEFAULT_LABELS, ...labels },\n  };\n}\n","import {\n  afterRenderEffect,\n  booleanAttribute,\n  Component,\n  computed,\n  ElementRef,\n  inject,\n  input,\n  model,\n  output,\n  signal,\n  viewChild,\n} from \"@angular/core\";\nimport { FoldButtonComponent } from \"../button/button.component\";\nimport type { FoldButtonIntent, FoldButtonSize } from \"../button/button.types\";\nimport { FoldButtonIconComponent } from \"../button-icon/button-icon.component\";\nimport { FoldInputComponent } from \"../../forms/input/input.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport {\n  FOLD_INLINE_CONFIRM_LABELS,\n  type FoldInlineConfirmLabels,\n} from \"./inline-confirm-labels\";\n\n/**\n * `<fold-inline-confirm>` — an in-place \"are you sure?\" affordance. The host\n * projects a **trigger** (a real, focusable control — a `foldButton`, a\n * `fold-button-icon`); on activation the trigger is replaced *in the same slot*\n * by a confirm/cancel row, so a destructive action is guarded without a modal\n * and without the layout jumping. Emits `confirmed` / `cancelled`.\n *\n * Three families, chosen by input:\n *\n * - **Simple** (default) — trigger → `Confirm` · `Cancel`. `confirmed` emits `\"\"`.\n * - **Type-to-confirm** — set `match`: the confirm button stays disabled until\n *   the user types the value (case-insensitive, trimmed). `confirmed` emits the\n *   typed text.\n * - **Secret** — set `password` (no `match`): a masked field that confirms once\n *   non-empty. `confirmed` emits the secret, so a handler can post it to the\n *   server (which is the only place a password can actually be checked).\n *\n * `Escape` cancels; `Enter` in the field confirms when valid. Opening moves\n * focus to the field (typed families) or the confirm button (simple), and\n * cancelling returns focus to the trigger.\n *\n * @selector `fold-inline-confirm`\n *\n * @example\n * ```html\n * <!-- simple -->\n * <fold-inline-confirm (confirmed)=\"remove()\">\n *   <fold-button-icon icon=\"trash\" tooltip=\"Delete\" />\n * </fold-inline-confirm>\n *\n * <!-- type-to-confirm -->\n * <fold-inline-confirm [match]=\"node.name\" (confirmed)=\"archive()\">\n *   <button foldButton emphasis=\"outline\" intent=\"danger\">Delete node</button>\n * </fold-inline-confirm>\n *\n * <!-- password-gated -->\n * <fold-inline-confirm password (confirmed)=\"deleteAccount($event)\">\n *   <button foldButton intent=\"danger\">Delete account</button>\n * </fold-inline-confirm>\n *\n * <!-- async: keep it open + show a spinner until the request settles -->\n * <fold-inline-confirm\n *   keepOpenOnConfirm\n *   [loading]=\"pending()\"\n *   [(open)]=\"confirmOpen\"\n *   confirmIcon=\"bin\"\n *   cancelIcon=\"close\"\n *   (confirmed)=\"onDelete()\">\n *   <fold-button-icon icon=\"bin\" tooltip=\"Delete\" />\n * </fold-inline-confirm>\n * ```\n */\n@Component({\n  selector: \"fold-inline-confirm\",\n  standalone: true,\n  imports: [FoldButtonComponent, FoldButtonIconComponent, FoldInputComponent],\n  templateUrl: \"./inline-confirm.component.html\",\n  styleUrl: \"./inline-confirm.component.scss\",\n  host: { \"[class.is-open]\": \"open()\" },\n})\nexport class FoldInlineConfirmComponent {\n  private readonly defaults = inject(FOLD_INLINE_CONFIRM_LABELS);\n\n  /** Intent (colour) of the confirm button. @default \"danger\" */\n  readonly intent = input<FoldButtonIntent>(\"danger\");\n  /** Optional warning shown above the confirm row. */\n  readonly message = input<string>();\n  /**\n   * The exact text the user must type to confirm (type-to-confirm family).\n   * Empty → the simple family. Matching is case-insensitive + trimmed.\n   */\n  readonly match = input<string>(\"\");\n  /**\n   * Mask the field and confirm on any non-empty value (secret family). A\n   * password can't be verified in the browser, so this only *collects* it —\n   * `confirmed` emits it for the handler to send to the server. Ignored when\n   * `match` is set.\n   */\n  readonly password = input(false, { transform: booleanAttribute });\n  /** Placeholder for the typed / secret field. */\n  readonly placeholder = input<string>();\n  /** Pending state — disables the buttons and shows the `busy` label. */\n  readonly loading = input(false, { transform: booleanAttribute });\n  /** Control density. @default \"sm\" */\n  readonly size = input<FoldButtonSize>(\"sm\");\n  /** Optional leading icon on the confirm button (e.g. `\"bin\"` on \"Delete\"). */\n  readonly confirmIcon = input<FoldIconName>();\n  /**\n   * Render the cancel as an icon-only button of the given icon (e.g. `\"close\"`)\n   * instead of a labelled button. Unset → a labelled cancel. The name is your\n   * choice from the icon registry.\n   */\n  readonly cancelIcon = input<FoldIconName>();\n  /**\n   * Keep the affordance open after `confirmed` fires, so an async handler can\n   * show `loading` and then close it via `[(open)]`. Default: close on confirm\n   * (the right behaviour for synchronous / optimistic actions).\n   */\n  readonly keepOpenOnConfirm = input(false, { transform: booleanAttribute });\n  /** Per-instance label overrides, merged over the app-wide + English defaults. */\n  readonly labels = input<Partial<FoldInlineConfirmLabels>>();\n\n  /** Emitted when the user confirms — carries the typed text (or `\"\"`). */\n  readonly confirmed = output<string>();\n  /** Emitted when the user cancels (button or `Escape`). */\n  readonly cancelled = output();\n\n  /**\n   * Whether the confirm affordance (vs. the trigger) is showing. Two-way, so a\n   * parent can drive it — open it programmatically, or close it when an async\n   * `confirmed` handler settles (paired with `keepOpenOnConfirm`).\n   */\n  readonly open = model(false);\n  /** The text currently typed in the field. */\n  protected readonly typed = signal(\"\");\n\n  private readonly triggerEl =\n    viewChild<ElementRef<HTMLElement>>(\"triggerWrap\");\n  private readonly groupEl = viewChild<ElementRef<HTMLElement>>(\"groupEl\");\n\n  /** SSR-safe id tying the message to the confirm group. */\n  protected readonly msgId = inject(FoldIdService).next(\"fold-inline-confirm\");\n\n  /** Effective labels: English defaults ← app-wide provider ← per-instance input. */\n  protected readonly l = computed<FoldInlineConfirmLabels>(() => ({\n    ...this.defaults,\n    ...this.labels(),\n  }));\n\n  /** True when a value must be typed before confirming. */\n  protected readonly needsInput = computed(\n    () => this.match().length > 0 || this.password(),\n  );\n\n  /** Whether the typed value satisfies the gate (match, or non-empty secret). */\n  protected readonly inputValid = computed<boolean>(() => {\n    const m = this.match().trim();\n    if (m.length > 0) {\n      return this.typed().trim().toLowerCase() === m.toLowerCase();\n    }\n    if (this.password()) {\n      return this.typed().length > 0;\n    }\n    return true;\n  });\n\n  /** The confirm button is live once the gate is satisfied and nothing pends. */\n  protected readonly canConfirm = computed(\n    () => this.inputValid() && !this.loading(),\n  );\n\n  protected readonly fieldType = computed<\"text\" | \"password\">(() =>\n    this.password() && this.match().length === 0 ? \"password\" : \"text\",\n  );\n\n  /** Prompt above a typed field: the match sentence, or the secret label. */\n  protected readonly prompt = computed<string>(() => {\n    const m = this.match().trim();\n    return m.length > 0 ? this.l().typePrompt(m) : this.l().secret;\n  });\n\n  /** Has the affordance ever opened? Gates focus-return so mount doesn't steal. */\n  private opened = false;\n\n  constructor() {\n    // One place owns focus, after render (so the target has been (re)painted):\n    // opening → move focus into the affordance (the field, else the confirm\n    // button); closing after a prior open → return focus to the trigger. The\n    // `opened` gate stops the initial closed render from grabbing focus.\n    afterRenderEffect(() => {\n      if (this.open()) {\n        this.opened = true;\n        const root = this.groupEl()?.nativeElement;\n        const target = this.needsInput()\n          ? root?.querySelector<HTMLElement>(\"input\")\n          : root?.querySelector<HTMLElement>(\"button\");\n        target?.focus();\n      } else if (this.opened) {\n        this.triggerEl()\n          ?.nativeElement.querySelector<HTMLElement>(\"button, a\")\n          ?.focus();\n      }\n    });\n  }\n\n  /** Start the confirm flow (called by the projected trigger's click). */\n  protected activate(): void {\n    this.typed.set(\"\");\n    this.open.set(true);\n  }\n\n  /** Complete the confirmation, emitting the typed value (or `\"\"`). */\n  protected confirm(): void {\n    if (!this.canConfirm()) {\n      return;\n    }\n    const value = this.typed();\n    if (!this.keepOpenOnConfirm()) {\n      this.open.set(false);\n      this.typed.set(\"\");\n    }\n    this.confirmed.emit(value);\n  }\n\n  /** Abort and restore the trigger (focus returns via the render effect). */\n  protected cancel(): void {\n    // Both cancel buttons are disabled while loading; Escape must match, or a\n    // mid-flight (async) action could be cancelled out from under the parent.\n    if (this.loading()) {\n      return;\n    }\n    this.open.set(false);\n    this.typed.set(\"\");\n    this.cancelled.emit();\n  }\n}\n","@if (!open()) {\n  <!-- Idle: the host's projected trigger. A click anywhere in it starts the\n       flow; the trigger itself stays a real focusable control (button / anchor),\n       so keyboard activation is native (Enter/Space → click) — no extra\n       role/tabindex, and no keydown handler that would double-fire. -->\n  <span #triggerWrap class=\"fic-trigger\" (click)=\"activate()\">\n    <ng-content />\n  </span>\n} @else {\n  <div\n    #groupEl\n    class=\"fic-confirm\"\n    role=\"group\"\n    [attr.aria-label]=\"l().group\"\n    (keydown.escape)=\"cancel(); $event.stopPropagation()\"\n  >\n    @if (message(); as text) {\n      <p class=\"fic-message\" [id]=\"msgId\">{{ text }}</p>\n    }\n\n    @if (needsInput()) {\n      <fold-input\n        class=\"fic-field\"\n        [label]=\"prompt()\"\n        [type]=\"fieldType()\"\n        [size]=\"size() === 'lg' ? 'lg' : 'sm'\"\n        [placeholder]=\"placeholder() ?? ''\"\n        [autocomplete]=\"password() ? 'current-password' : 'off'\"\n        [(value)]=\"typed\"\n        (keydown.enter)=\"confirm()\"\n      />\n    }\n\n    <div class=\"fic-actions\">\n      <button\n        foldButton\n        emphasis=\"solid\"\n        [intent]=\"intent()\"\n        [size]=\"size()\"\n        [icon]=\"confirmIcon()\"\n        [disabled]=\"!canConfirm()\"\n        [attr.aria-describedby]=\"message() ? msgId : null\"\n        (click)=\"confirm()\"\n      >\n        {{ loading() ? l().busy : l().confirm }}\n      </button>\n\n      @if (cancelIcon(); as icon) {\n        <fold-button-icon\n          [icon]=\"icon\"\n          tone=\"ghost\"\n          [size]=\"size()\"\n          [disabled]=\"loading()\"\n          [tooltip]=\"l().cancelAria\"\n          (clicked)=\"cancel()\"\n        />\n      } @else {\n        <button\n          foldButton\n          emphasis=\"soft\"\n          intent=\"neutral\"\n          [size]=\"size()\"\n          [disabled]=\"loading()\"\n          (click)=\"cancel()\"\n        >\n          {{ l().cancel }}\n        </button>\n      }\n    </div>\n  </div>\n}\n","import {\n  ChangeDetectionStrategy,\n  Component,\n  inject,\n  input,\n  output,\n} from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldButtonComponent } from \"../button/button.component\";\nimport type { FoldButtonIntent } from \"../button/button.types\";\nimport { FoldInlineConfirmComponent } from \"../inline-confirm/inline-confirm.component\";\n\n/**\n * `<fold-danger-zone>` — the framed region for **destructive** actions on a\n * settings page (delete an entity, close an account). A title, a projected\n * explanation, and an optional guarded action.\n *\n * **Two appearances:**\n * - `filled` (default) — the whole block is alert-tinted; a compact \"delete X\"\n *   region (e.g. at the foot of a panel).\n * - `section` — a **danger *section***: an alert-bordered card with a\n *   **normal-background body**, so it can host ordinary content (rows,\n *   descriptions, forms) with only the frame + heading signalling danger — the\n *   GitHub \"Danger Zone\" look.\n *\n * **The confirm reveals on click.** The destructive control is a projected-free\n * `actionLabel` button; activating it opens an in-place {@link\n * FoldInlineConfirmComponent} — a simple \"are you sure?\", or (with\n * `confirmPhrase`) a type-to-confirm field that must be retyped before the action\n * arms. The input is never shown until the button is clicked. `(confirmed)` fires\n * with the typed text (or `\"\"`). Omit `actionLabel` for a framed danger section\n * with no action of its own.\n *\n * ```html\n * <fold-danger-zone\n *   appearance=\"section\"\n *   title=\"Delete workspace\"\n *   actionLabel=\"Delete workspace\"\n *   [confirmPhrase]=\"workspace.name\"\n *   (confirmed)=\"delete()\"\n * >\n *   <p>This permanently deletes the workspace and everything in it. It cannot be undone.</p>\n * </fold-danger-zone>\n * ```\n *\n * @selector `fold-danger-zone`\n */\n@Component({\n  selector: \"fold-danger-zone\",\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [FoldIconComponent, FoldButtonComponent, FoldInlineConfirmComponent],\n  templateUrl: \"./danger-zone.component.html\",\n  styleUrl: \"./danger-zone.component.scss\",\n  host: {\n    role: \"group\",\n    \"[attr.data-appearance]\": \"appearance()\",\n    \"[attr.aria-labelledby]\": \"titleId\",\n  },\n})\nexport class FoldDangerZoneComponent {\n  private readonly ids = inject(FoldIdService);\n\n  /** The region heading — also its accessible name. */\n  readonly title = input.required<string>();\n  /**\n   * `filled` (alert-tinted block) or `section` (alert-bordered card with a\n   * normal-background body — the danger *section*). @default 'filled'\n   */\n  readonly appearance = input<\"filled\" | \"section\">(\"filled\");\n  /** The destructive button's label. Omit for a framed danger section with no\n   *  action of its own. */\n  readonly actionLabel = input<string>();\n  /** The exact phrase the user must retype to arm the action (type-to-confirm).\n   *  Omit for a plain \"are you sure?\" reveal. */\n  readonly confirmPhrase = input<string>();\n  /** An optional warning shown above the confirm row when the action opens. */\n  readonly message = input<string>();\n  /** Colour of the destructive button. @default 'danger' */\n  readonly intent = input<FoldButtonIntent>(\"danger\");\n\n  /** Fires when the user confirms — carries the typed phrase (or `\"\"`). */\n  readonly confirmed = output<string>();\n\n  /** Stable id the host's `aria-labelledby` points at. */\n  protected readonly titleId = this.ids.next(\"fold-danger-zone\");\n}\n","<div class=\"dz-head\">\n  <fold-icon name=\"warning\" size=\"sm\" class=\"dz-icon\" aria-hidden=\"true\" />\n  <h3 class=\"dz-title\" [id]=\"titleId\">{{ title() }}</h3>\n</div>\n\n<div class=\"dz-body\">\n  <ng-content />\n</div>\n\n@if (actionLabel(); as label) {\n  <div class=\"dz-actions\">\n    <fold-inline-confirm\n      [match]=\"confirmPhrase() ?? ''\"\n      [message]=\"message() ?? ''\"\n      [intent]=\"intent()\"\n      (confirmed)=\"confirmed.emit($event)\"\n    >\n      <button foldButton emphasis=\"solid\" [intent]=\"intent()\">\n        {{ label }}\n      </button>\n    </fold-inline-confirm>\n  </div>\n}\n","import {\n  Component,\n  booleanAttribute,\n  computed,\n  input,\n  model,\n  output,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldSpinnerComponent } from \"../../foundations/spinner/spinner.component\";\nimport type { FoldIconSize } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport type {\n  FoldButtonIconShape,\n  FoldButtonIconSize,\n  FoldButtonIconTone,\n} from \"../button-icon/button-icon.types\";\n\n/**\n * `<fold-toggle-icon>` — the icon-only **toggle** button: a binary on/off\n * control whose label is the icon (mute, mask, pin, loop, show/hide). It renders\n * a pressed surface while on and **always** carries `aria-pressed` (`true`/\n * `false`), so assistive tech announces it as a toggle. Two-way bind the state\n * with `[(active)]`. For a one-shot action (delete, play-once, open), use\n * `fold-button-icon` — a momentary button that never claims a pressed state.\n *\n * Shares the icon-button surface (shape / size / tone) with `fold-button-icon`;\n * the two differ only in semantics, so their `shape` / `size` / `tone` inputs\n * and types are identical.\n *\n * @example\n * ```html\n * <fold-toggle-icon icon=\"eye\" tooltip=\"Toggle mask\" [(active)]=\"masked\" />\n * <fold-toggle-icon icon=\"repeat\" tooltip=\"Loop\" [(active)]=\"looping\" />\n * ```\n *\n * @selector `fold-toggle-icon`\n */\n@Component({\n  selector: \"fold-toggle-icon\",\n  standalone: true,\n  imports: [FoldIconComponent, FoldSpinnerComponent],\n  templateUrl: \"./toggle-icon.component.html\",\n  styleUrl: \"./toggle-icon.component.scss\",\n  host: {\n    \"[attr.data-shape]\": \"shape()\",\n    \"[attr.data-size]\": \"size()\",\n    \"[attr.data-tone]\": \"tone()\",\n    \"[attr.data-active]\": 'active() ? \"\" : null',\n    \"[attr.data-loading]\": \"loading() ? '' : null\",\n  },\n})\nexport class FoldToggleIconComponent {\n  /** Icon to render (typed against the registry). */\n  readonly icon = input.required<FoldIconName>();\n\n  /** Surface shape — `square` (default) or `round`. */\n  readonly shape = input<FoldButtonIconShape>(\"square\");\n\n  /** Hit-area preset — `xs` 22px · `sm` 28px · `md` 32px (default) · `lg` 38px. */\n  readonly size = input<FoldButtonIconSize>(\"md\");\n\n  /** Visual tone — `ghost` (default) · `accent` · `critical`. */\n  readonly tone = input<FoldButtonIconTone>(\"ghost\");\n\n  /** Two-way toggle state — renders pressed and drives `aria-pressed`. */\n  readonly active = model<boolean>(false);\n\n  /** Disable the button — dims it and blocks pointer events. */\n  readonly disabled = input(false, { transform: booleanAttribute });\n\n  /** Swap the icon for a spinner and go busy — blocks toggling, stays lit. */\n  readonly loading = input(false, { transform: booleanAttribute });\n\n  /** Tooltip text — sets both `title` and `aria-label`. Strongly recommended. */\n  readonly tooltip = input<string>();\n\n  /** Native `type` of the inner `<button>`. */\n  readonly type = input<\"button\" | \"submit\">(\"button\");\n\n  /** Emitted on toggle (passes the native `MouseEvent`), after `active` flips. */\n  readonly toggled = output<MouseEvent>();\n\n  /** Resolves the icon size from the button size preset. */\n  readonly iconSize = computed<FoldIconSize>(() => {\n    switch (this.size()) {\n      case \"xs\":\n        return \"xs\"; // 12px\n      case \"sm\":\n        return \"sm\"; // 16px\n      case \"md\":\n        return \"sm\"; // 16px in a 32px hit-area\n      case \"lg\":\n        return \"md\"; // 20px in a 38px hit-area\n    }\n  });\n\n  onClick(e: MouseEvent): void {\n    if (this.disabled() || this.loading()) {\n      return;\n    }\n    this.active.update((v) => !v);\n    this.toggled.emit(e);\n  }\n}\n","<button\n  [type]=\"type()\"\n  [disabled]=\"disabled() || loading()\"\n  [attr.title]=\"tooltip() || null\"\n  [attr.aria-label]=\"tooltip() || null\"\n  [attr.aria-pressed]=\"active() ? 'true' : 'false'\"\n  [attr.aria-busy]=\"loading() ? 'true' : null\"\n  (click)=\"onClick($event)\"\n>\n  @if (loading()) {\n    <fold-spinner [size]=\"iconSize()\" aria-hidden=\"true\" />\n  } @else {\n    <fold-icon [name]=\"icon()\" [size]=\"iconSize()\" />\n  }\n</button>\n","import { booleanAttribute, Component, input, output } from \"@angular/core\";\n\n/** Which band(s) carry a chrome treatment (a separator hairline or a raised\n *  tint): neither, just the header, just the footer, or both. */\nexport type FoldCardBandChrome = \"none\" | \"header\" | \"footer\" | \"both\";\n\n/** What the `separators` / `raisedBands` inputs accept: the {@link FoldCardBandChrome}\n *  enum, or a boolean shorthand — a bare attribute (`separators`, i.e. `\"\"`) or\n *  `true` means **both** bands; `false` means **none**. */\nexport type FoldCardBandChromeInput = FoldCardBandChrome | boolean | \"\";\n\n/** Coerce the band-chrome shorthand: bare attribute / `true` → `\"both\"`,\n *  `false` → `\"none\"`, an explicit enum value passes through unchanged. */\nexport function foldCardBandChrome(\n  value: FoldCardBandChromeInput,\n): FoldCardBandChrome {\n  if (value === \"\" || value === true) {\n    return \"both\";\n  }\n  if (value === false) {\n    return \"none\";\n  }\n  return value;\n}\n\n/**\n * `<fold-card>` — the canonical raised content surface: a solid\n * `surface-card` background, a hairline border and a consistent radius. Use it\n * anywhere the app would otherwise hand-roll a `background + border +\n * border-radius` block, so cards never drift on colour or corner.\n *\n * - `surface` — `card` (the raised card tint, default) · `sunken` (a deeper\n *   surface for large containers, below the card — the ref's second card tint;\n *   pairs with a fainter `border-subtle` hairline) · `accent` (an accent-filled\n *   card whose content sub-tree auto-inverts to a compatible on-accent palette).\n * - `radius` — `lg` (14px, default) · `md` · `sm`.\n * - `padding` — `md` (16px, default) · `none` · `sm` · `lg`. Sets the *body*\n *   padding; override with a custom value via `--fold-card-padding`.\n * - `interactive` — makes the whole card a clickable control (see below).\n * - `separators` — which bands get a hairline against the body:\n *   `none` (default) · `header` · `footer` · `both`.\n * - `raisedBands` — which bands are tinted a step above the surface (fainter on\n *   `sunken`): `none` (default) · `header` · `footer` · `both`.\n *\n * `separators` and `raisedBands` are per-band and independent axes, so a card can\n * have (say) a raised, un-separated header over a flush footer.\n *\n * Content projection:\n * - default slot → the card body.\n * - `[cardHeader]` → an optional header band above the body.\n * - `[cardFooter]` → an optional footer band below the body.\n *\n * The card is a flex column of three regions: the body always owns the `padding`,\n * the header/footer carry their own (independent) chrome padding, and the host\n * never pads. So the content padding is identical whether or not the bands show —\n * toggling a header/footer never shifts the body.\n *\n * **Interactive cards.** `interactive` turns the whole card into a real control:\n * the host gains `role=\"button\"`, `tabindex=\"0\"`, a focus ring and a hover lift,\n * and Enter / Space (or a click) emit `(activated)`. Give it an accessible name\n * with `ariaLabel` when the card's text isn't a sufficient label.\n * A `role=\"button\"` must not wrap other interactive controls — so an interactive\n * card must NOT contain buttons/links. For a card with its own inner actions,\n * keep it non-interactive and put a single primary `<a>`/`<button>` inside.\n *\n * ```html\n * <fold-card>Static content</fold-card>\n * <fold-card surface=\"sunken\" padding=\"lg\">Deep container</fold-card>\n * <fold-card separators=\"both\">\n *   <h3 cardHeader>Title</h3>\n *   Body content\n *   <div cardFooter>Actions</div>\n * </fold-card>\n * ```\n *\n * Sizing / escape hatches (CSS custom properties):\n * `--fold-card-padding` overrides the body padding; `--fold-card-overflow`\n * (default `clip`) lets content escape the rounded corners.\n *\n * @selector `fold-card`\n *\n * @example\n * ```html\n * <fold-card interactive ariaLabel=\"Open Acme Records\" (activated)=\"open()\">\n *   <h3>Acme Records</h3>\n *   <p>128 contracts · 96 active</p>\n * </fold-card>\n * ```\n */\n@Component({\n  selector: \"fold-card\",\n  standalone: true,\n  host: {\n    \"[class.s-sunken]\": \"surface() === 'sunken'\",\n    \"[class.s-accent]\": \"surface() === 'accent'\",\n    \"[attr.data-surface]\": \"surface() === 'accent' ? 'accent' : null\",\n    \"[class.r-sm]\": \"radius() === 'sm'\",\n    \"[class.r-md]\": \"radius() === 'md'\",\n    \"[class.p-none]\": \"padding() === 'none'\",\n    \"[class.p-sm]\": \"padding() === 'sm'\",\n    \"[class.p-lg]\": \"padding() === 'lg'\",\n    \"[class.is-interactive]\": \"interactive()\",\n    \"[class.sep-header]\": \"hasBand(separators(), 'header')\",\n    \"[class.sep-footer]\": \"hasBand(separators(), 'footer')\",\n    \"[class.raise-header]\": \"hasBand(raisedBands(), 'header')\",\n    \"[class.raise-footer]\": \"hasBand(raisedBands(), 'footer')\",\n    \"[attr.role]\": \"interactive() ? 'button' : null\",\n    \"[attr.tabindex]\": \"interactive() ? 0 : null\",\n    \"[attr.aria-label]\": \"interactive() ? (ariaLabel() ?? null) : null\",\n    \"(click)\": \"onActivate($event)\",\n    \"(keydown)\": \"onKeydown($event)\",\n  },\n  templateUrl: \"./card.component.html\",\n  styleUrl: \"./card.component.scss\",\n})\nexport class FoldCardComponent {\n  /** Surface tint — `card` (raised, default), `sunken` (deeper container), or\n   *  `accent` (an **accent-filled** card: the accent colour as ground, with the\n   *  whole content sub-tree auto-inverted to a compatible on-accent role-set —\n   *  text, borders, band gradation, and even nested buttons/links/icon-tiles\n   *  convert automatically). Use it to make a card in a grid stand out. */\n  readonly surface = input<\"card\" | \"sunken\" | \"accent\">(\"card\");\n  /** Corner radius — `lg` (default), `md`, or `sm`. */\n  readonly radius = input<\"sm\" | \"md\" | \"lg\">(\"lg\");\n  /** Body padding — `md` (default), `none`, `sm`, or `lg`; a custom value can be\n   *  set with the `--fold-card-padding` CSS variable. */\n  readonly padding = input<\"none\" | \"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Make the whole card a clickable control: `role=\"button\"` + `tabindex`, a\n   *  focus ring, a hover lift, and Enter/Space/click → `(activated)`. Must not\n   *  wrap other interactive controls (see the class docs). */\n  readonly interactive = input(false, { transform: booleanAttribute });\n  /** Accessible name for the interactive card, when its content isn't enough. */\n  readonly ariaLabel = input<string>();\n  /** Which bands get a hairline against the body — `none` (default), `header`,\n   *  `footer`, or `both`. Accepts a boolean shorthand: a bare `separators` (or\n   *  `[separators]=\"true\"`) means `both`; `false` means `none`. */\n  readonly separators = input<FoldCardBandChrome, FoldCardBandChromeInput>(\n    \"none\",\n    { transform: foldCardBandChrome },\n  );\n  /** Which bands are lifted with a subtle raised tint over the card surface\n   *  (fainter on `sunken`) — `none` (default), `header`, `footer`, or `both`.\n   *  Accepts the same boolean shorthand as {@link separators}. */\n  readonly raisedBands = input<FoldCardBandChrome, FoldCardBandChromeInput>(\n    \"none\",\n    { transform: foldCardBandChrome },\n  );\n\n  /** Fires when an `interactive` card is activated (click, Enter, or Space). */\n  readonly activated = output<Event>();\n\n  /** Whether a per-band chrome value applies to the given band. */\n  protected hasBand(\n    value: FoldCardBandChrome,\n    band: \"header\" | \"footer\",\n  ): boolean {\n    return value === band || value === \"both\";\n  }\n\n  protected onActivate(event: Event): void {\n    if (this.interactive()) {\n      this.activated.emit(event);\n    }\n  }\n\n  /** Enter/Space activate the card, matching the native button keyboard contract\n   *  (Space is prevented from scrolling the page). */\n  protected onKeydown(event: KeyboardEvent): void {\n    if (!this.interactive() || (event.key !== \"Enter\" && event.key !== \" \")) {\n      return;\n    }\n    event.preventDefault();\n    this.activated.emit(event);\n  }\n}\n","<div class=\"card-header\"><ng-content select=\"[cardHeader]\" /></div>\n<div class=\"card-body\"><ng-content /></div>\n<div class=\"card-footer\"><ng-content select=\"[cardFooter]\" /></div>\n","import { Component, computed, input } from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/**\n * `<fold-element-title>` — the label that heads a section, card or panel. Fully\n * input-driven (title / subtitle / icon), so a header is never hand-rolled and\n * the common case is a self-closing tag.\n *\n * Variants (emphasis):\n * - `eyebrow` (default) — 10px, muted, uppercase. Inline section label.\n * - `bar` — 11px, secondary, uppercase. For a divider header bar.\n * - `title` — normal-case, `text-md`, primary. A card/panel heading; a leading\n *   `icon` renders in a tile whose tone is set by `iconTone`\n *   (`neutral` raised · `primary` filled brand · `faded` dim).\n * - `caps` — uppercase at the title's size and in primary ink. The register for\n *   a REGION that announces itself: a well, a rail, a band. `eyebrow` whispers\n *   above a thing, `caps` names the thing — which is why it takes the full text\n *   colour and not the muted one.\n *\n * A trailing action (edit/add button, lock badge) projects into `[titleAction]`,\n * right-aligned. The title — not the action — is the heading for assistive tech.\n *\n * @selector `fold-element-title`\n *\n * @example\n * ```html\n * <fold-element-title title=\"Documents\" variant=\"bar\" />\n * <fold-element-title variant=\"title\" icon=\"company\" title=\"Contexte\" subtitle=\"Activité de l'espace\" />\n * <fold-element-title variant=\"caps\" title=\"Mes suivis\" subtitle=\"3 en cours\" />\n * <fold-element-title title=\"Poste\">\n *   <button titleAction (click)=\"edit()\">✎</button>\n * </fold-element-title>\n * ```\n */\n@Component({\n  selector: \"fold-element-title\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  host: {\n    \"[class.v-bar]\": \"variant() === 'bar'\",\n    \"[class.v-title]\": \"variant() === 'title'\",\n    \"[class.v-caps]\": \"variant() === 'caps'\",\n    \"[class.it-primary]\": \"iconTone() === 'primary'\",\n    \"[class.it-faded]\": \"iconTone() === 'faded'\",\n    // `title` is a heading input — strip the reflected native attribute so it\n    // never doubles as a browser tooltip.\n    \"[attr.title]\": \"null\",\n  },\n  templateUrl: \"./element-title.component.html\",\n  styleUrl: \"./element-title.component.scss\",\n})\nexport class FoldElementTitleComponent {\n  /** Leading icon glyph (raised tile in the `title` variant). */\n  readonly icon = input<FoldIconName>();\n  /** Icon tile tone (title variant) — `neutral` (raised), `primary` (filled brand), `faded` (dim). */\n  readonly iconTone = input<\"neutral\" | \"primary\" | \"faded\">(\"neutral\");\n  /** The heading text. */\n  readonly title = input.required<string>();\n  /** Optional secondary line under the title. */\n  readonly subtitle = input<string>();\n  /** Emphasis — `eyebrow` (10px muted), `bar` (11px secondary), `title` (text-md,\n   *  normal-case), `caps` (title-size uppercase, primary ink). */\n  readonly variant = input<\"eyebrow\" | \"bar\" | \"title\" | \"caps\">(\"eyebrow\");\n  /** Heading outline depth exposed to assistive tech (`aria-level`). */\n  readonly level = input(2);\n  /** Optional `id` on the heading span, so a container can name a region with\n   *  `aria-labelledby` (e.g. a `fold-page-section`'s `<section>`). */\n  readonly headingId = input<string>();\n\n  protected readonly iconSize = computed(() =>\n    this.variant() === \"title\" ? \"md\" : \"sm\",\n  );\n}\n","@if (icon(); as ic) {\n  <span class=\"et-icon\"><fold-icon [name]=\"ic\" [size]=\"iconSize()\" /></span>\n}\n<span class=\"et-main\">\n  <span class=\"et-row\">\n    <span\n      class=\"et-label\"\n      role=\"heading\"\n      [attr.id]=\"headingId()\"\n      [attr.aria-level]=\"level()\"\n      >{{ title() }}</span\n    >\n    <span class=\"et-action\"><ng-content select=\"[titleAction]\" /></span>\n  </span>\n  @if (subtitle(); as s) {\n    <span class=\"et-sub\">{{ s }}</span>\n  }\n</span>\n","import { Component, input } from \"@angular/core\";\nimport { FoldCardComponent } from \"../../content/card/card.component\";\nimport { FoldElementTitleComponent } from \"../../content/element-title/element-title.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/**\n * `<fold-context-card>` — a titled info card in three zones: a **header** (a\n * raised icon tile + title + subtitle), a **body** (the projected content — e.g.\n * label/value rows), and an optional **footer** action. Composes\n * {@link FoldCardComponent} for the surface, so it never re-rolls a card.\n *\n * - `icon` / `title` / `subtitle` — the header. `title` is required.\n * - default slot → the body.\n * - `[footer]` slot → a footer action (e.g. an `<fold-link>`); the footer and its\n *   divider are hidden when nothing is projected.\n *\n * @selector `fold-context-card`\n *\n * @example\n * ```html\n * <fold-context-card icon=\"company\" title=\"Contexte\" subtitle=\"Activité de l'espace\">\n *   <div class=\"row\">…</div>\n *   <fold-link footer icon=\"company\" (clicked)=\"openOrg()\">Voir l'organigramme</fold-link>\n * </fold-context-card>\n * ```\n */\n@Component({\n  selector: \"fold-context-card\",\n  standalone: true,\n  imports: [FoldCardComponent, FoldElementTitleComponent],\n  // `title` is a heading input — strip the native attribute a static\n  // `title=\"…\"` leaves behind, so it never doubles as a browser tooltip.\n  host: { \"[attr.title]\": \"null\" },\n  templateUrl: \"./context-card.component.html\",\n  styleUrl: \"./context-card.component.scss\",\n})\nexport class FoldContextCardComponent {\n  /** Header icon glyph. */\n  readonly icon = input<FoldIconName>();\n  /** Icon tile tone — `primary` (filled brand, default), `neutral` (raised), `faded` (dim). */\n  readonly iconTone = input<\"neutral\" | \"primary\" | \"faded\">(\"primary\");\n  /** Header title. */\n  readonly title = input.required<string>();\n  /** Optional line under the title. */\n  readonly subtitle = input<string>();\n}\n","<fold-card padding=\"none\">\n  <div class=\"cc-head\">\n    <fold-element-title\n      variant=\"title\"\n      [level]=\"3\"\n      [icon]=\"icon()\"\n      [iconTone]=\"iconTone()\"\n      [title]=\"title()\"\n      [subtitle]=\"subtitle()\"\n    />\n  </div>\n  <div class=\"cc-body\"><ng-content /></div>\n  <div class=\"cc-foot\"><ng-content select=\"[footer]\" /></div>\n</fold-card>\n","import { Directive, inject } from \"@angular/core\";\nimport { FoldIdService } from \"./id.service\";\n\n/**\n * Auto-assigns a unique, SSR-safe `id` to any native form control (`<input>`,\n * `<select>`, `<textarea>`) that has neither an `id` nor a `name`.\n *\n * You don't write `foldFieldId` on elements — the directive **auto-applies** by\n * selector. Add it to a component's `imports` once and every unidentified native\n * control in that component's template is fixed in one go, with no per-element\n * edit. It silences the browser's *\"A form field element should have an id or\n * name attribute\"* warning (autofill + accessibility), and the id it sets can be\n * targeted by a `<label for>`.\n *\n * The selector matches only controls missing **both** `id` and `name` — static\n * or bound (`[id]`/`[attr.id]`/`[name]` all count as present) — so it never\n * fights a control you've already identified. Components that render their own\n * labelled control ({@link FoldInputComponent}, `fold-select`) own their id\n * explicitly and are unaffected.\n */\n@Directive({\n  selector:\n    \"input:not([id]):not([name]),select:not([id]):not([name]),textarea:not([id]):not([name])\",\n  standalone: true,\n  host: { \"[id]\": \"autoId\" },\n})\nexport class FoldFieldIdDirective {\n  /** Assigned once at construction, in deterministic render order (SSR-safe). */\n  protected readonly autoId = inject(FoldIdService).next(\"fold-field\");\n}\n","import type { ElementRef } from \"@angular/core\";\nimport { Component, input, output, signal, viewChild } from \"@angular/core\";\nimport { FoldFieldIdDirective } from \"../../../a11y/field-id.directive\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\n\n/**\n * `<fold-file-dropzone>` — a file-picker dropzone: drag-over visuals, keyboard\n * activation, the hidden `<input type=\"file\">` plumbing, and it emits the picked\n * `File[]`. Presentational — it never talks to the network; the consumer decides\n * what to do with the files (upload now, buffer locally, …).\n *\n * Belongs to the **form** family, not the text-input family: it's a whole\n * drop-target affordance, not a labelled box, so it doesn't compose\n * `fold-input-base`.\n *\n * @selector `fold-file-dropzone`\n *\n * @example\n * ```html\n * <fold-file-dropzone\n *   accept=\".pdf,.png\"\n *   [hint]=\"'Max 5 Mo'\"\n *   (filesPicked)=\"onFiles($event)\"\n * />\n * ```\n */\n@Component({\n  selector: \"fold-file-dropzone\",\n  standalone: true,\n  imports: [FoldFieldIdDirective, FoldIconComponent],\n  templateUrl: \"./file-dropzone.component.html\",\n  styleUrl: \"./file-dropzone.component.scss\",\n})\nexport class FoldFileDropzoneComponent {\n  /** Comma-separated MIME or extension filter passed to the input. */\n  readonly accept = input<string>(\"\");\n  /** Multi-file pick. Defaults to true — the consumer can cap on its end. */\n  readonly multiple = input<boolean>(true);\n  /** Primary line of copy. English by default — the consumer localises. */\n  readonly label = input<string>(\"Drag a file or browse\");\n  /** Smaller helper line under the label (size limit, count remaining, …). */\n  readonly hint = input<string | null>(null);\n  /** Pending state — disables interaction and swaps the copy for a loading message. */\n  readonly busy = input<boolean>(false);\n  /** Loading message displayed while `busy` is true. */\n  readonly busyLabel = input<string>(\"Uploading…\");\n  /** Fully disable the dropzone (e.g. cap reached). */\n  readonly disabled = input<boolean>(false);\n\n  /** Emits the picked files (from browse or drop). */\n  readonly filesPicked = output<File[]>();\n\n  private readonly fileInput =\n    viewChild.required<ElementRef<HTMLInputElement>>(\"fileInput\");\n\n  /** Whether a drag is currently hovering the zone (drives the `.over` state). */\n  readonly isDragOver = signal(false);\n\n  openFilePicker(): void {\n    if (this.disabled() || this.busy()) {\n      return;\n    }\n    this.fileInput().nativeElement.click();\n  }\n\n  onFilesSelected(target: EventTarget | null): void {\n    if (!(target instanceof HTMLInputElement)) {\n      return;\n    }\n    if (!target.files || target.files.length === 0) {\n      return;\n    }\n    this.filesPicked.emit(Array.from(target.files));\n    // Reset so re-picking the same file fires `change` again.\n    target.value = \"\";\n  }\n\n  onDragOver(event: DragEvent): void {\n    if (this.disabled() || this.busy()) {\n      return;\n    }\n    event.preventDefault();\n    this.isDragOver.set(true);\n  }\n\n  onDragLeave(): void {\n    this.isDragOver.set(false);\n  }\n\n  onDrop(event: DragEvent): void {\n    event.preventDefault();\n    this.isDragOver.set(false);\n    if (this.disabled() || this.busy()) {\n      return;\n    }\n    const files = event.dataTransfer?.files;\n    if (!files || files.length === 0) {\n      return;\n    }\n    this.filesPicked.emit(Array.from(files));\n  }\n}\n","<div\n  class=\"dropzone\"\n  [class.over]=\"isDragOver()\"\n  [class.busy]=\"busy()\"\n  [class.disabled]=\"disabled()\"\n  role=\"button\"\n  tabindex=\"0\"\n  [attr.aria-disabled]=\"disabled() || busy()\"\n  (click)=\"openFilePicker()\"\n  (keydown.enter)=\"openFilePicker()\"\n  (keydown.space)=\"openFilePicker(); $event.preventDefault()\"\n  (dragover)=\"onDragOver($event)\"\n  (dragleave)=\"onDragLeave()\"\n  (drop)=\"onDrop($event)\"\n>\n  <fold-icon name=\"upload\" [size]=\"22\" />\n  @if (busy()) {\n    <span class=\"label\">{{ busyLabel() }}</span>\n  } @else {\n    <span class=\"label\">{{ label() }}</span>\n    @if (hint(); as h) {\n      <small class=\"hint\">{{ h }}</small>\n    }\n  }\n  <input\n    #fileInput\n    type=\"file\"\n    [accept]=\"accept()\"\n    [multiple]=\"multiple()\"\n    [disabled]=\"disabled() || busy()\"\n    hidden\n    (change)=\"onFilesSelected($event.target)\"\n  />\n</div>\n","import { Component } from \"@angular/core\";\n\n/**\n * `<fold-field-list>` — the read-only counterpart of a form: a description list\n * (`<dl>`) of label/value pairs. It's what fills the *display* side of a detail\n * page (the recap), where `fold-input` fills the *edit* side. Nothing here is\n * interactive — it renders values you already know, not fields you type into.\n *\n * Put {@link FoldFieldComponent} children inside it:\n *\n * ```html\n * <fold-field-list>\n *   <fold-field label=\"Contract type\">CDI</fold-field>\n *   <fold-field label=\"Job title\" [empty]=\"!c.jobTitle\">{{ c.jobTitle }}</fold-field>\n *   <fold-field label=\"Compensation\">\n *     <span class=\"chip\">{{ c.salary }}</span>\n *   </fold-field>\n * </fold-field-list>\n * ```\n *\n * **Why a component and not a mixin:** it guarantees the real semantics —\n * `dl > dt > dd`, so screen readers announce each value as the definition of its\n * label. A copy-pasted `div > span + span` (what every detail page hand-rolls)\n * looks the same but is an accessibility dead end; a mixin can't fix the markup.\n *\n * **How the encapsulation is kept clean (no `::ng-deep`):** the list owns *all*\n * the layout — the `<dl>` is a two-column grid (`label | value`), and a grid\n * positions its items *by their place in the box tree*, not by a selector that\n * has to match them. The `dt`/`dd` are contributed by each `fold-field`\n * (`display: contents`), yet the grid still lays them out. Appearance (type,\n * colour, the empty state) lives on the field, where the elements are declared.\n * Layout at the container, style at the cell — neither reaches across the wall.\n *\n * Zero-input theming via CSS custom properties on the host:\n * `--fold-field-list-label-width` (160px — the fixed label column) ·\n * `--fold-field-list-col-gap` (16px, label→value) ·\n * `--fold-field-list-row-gap` (10px, between rows). Shrink the label width when\n * the list sits in a narrow rail.\n *\n * @selector `fold-field-list`\n */\n@Component({\n  selector: \"fold-field-list\",\n  standalone: true,\n  templateUrl: \"./field-list.component.html\",\n  styleUrl: \"./field-list.component.scss\",\n})\nexport class FoldFieldListComponent {}\n","<dl class=\"fl\">\n  <ng-content />\n</dl>\n","import { booleanAttribute, Component, input } from \"@angular/core\";\n\n/**\n * `<fold-field>` — one read-only label/value pair inside a\n * {@link FoldFieldListComponent}. It renders a `<dt>` (the {@link label}) and a\n * `<dd>` (the value, projected), so the pair is a real term/definition a screen\n * reader announces together.\n *\n * **This is not `fold-input`.** They are the two opposite halves of a record:\n * `fold-input` is *edit* mode — a control you focus and type into, bound to a\n * Signal Form field. `fold-field` is *read* mode — a value already known, shown\n * as text. A read-only input would still be a heavyweight control (border,\n * focus, keyboard) pretending to be static; a field is just `dt`/`dd`.\n *\n * The value is the default slot, so it takes rich content (chips, links, an\n * icon), not only a string:\n *\n * ```html\n * <fold-field label=\"Job title\">{{ c.jobTitle }}</fold-field>\n * <fold-field label=\"Status\"><span class=\"chip\">Active</span></fold-field>\n * <fold-field label=\"End date\" [empty]=\"!c.endDate\">{{ c.endDate | date }}</fold-field>\n * ```\n *\n * Missing values are a first-class state: set {@link empty} and the field shows\n * the {@link placeholder} (`—` by default) in a muted italic instead of the\n * projected content — so the caller writes the toggle once (`[empty]=\"!value\"`)\n * rather than repeating a `{{ value || '—' }}` fallback and a class binding at\n * every site.\n *\n * The host is `display: contents`: the `dt`/`dd` it renders become direct\n * children of the list's `<dl>` grid, which is what lets the list lay them out\n * without reaching through view encapsulation. Appearance (type scale, colour,\n * the empty style) is owned here; the grid geometry is owned by the list.\n *\n * @selector `fold-field`\n */\n@Component({\n  selector: \"fold-field\",\n  standalone: true,\n  templateUrl: \"./field.component.html\",\n  styleUrl: \"./field.component.scss\",\n})\nexport class FoldFieldComponent {\n  /** The term — rendered as the `<dt>` label (small, uppercase, muted). */\n  readonly label = input.required<string>();\n\n  /**\n   * Mark the value as absent. When `true`, the field shows {@link placeholder}\n   * in a muted italic and ignores the projected content — the single source of\n   * truth for \"no value\" so callers don't hand-roll a fallback + a class each\n   * time.\n   */\n  readonly empty = input(false, { transform: booleanAttribute });\n\n  /** What to show in place of an {@link empty} value. */\n  readonly placeholder = input(\"—\");\n}\n","<dt class=\"fl-key\">{{ label() }}</dt>\n@if (empty()) {\n  <dd class=\"fl-val fl-empty\">{{ placeholder() }}</dd>\n} @else {\n  <dd class=\"fl-val\"><ng-content /></dd>\n}\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  input,\n  output,\n} from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/**\n * `<fold-link>` — an inline text link / link-button: accent-coloured, underline\n * on hover, with optional leading + trailing icons (a nav chevron, an external\n * glyph). Renders an `<a>` when given `href`, otherwise a `<button>` that emits\n * `(clicked)` — so the same look serves both navigation and in-app actions.\n *\n * - `tone` — `accent` (default, brand link) · `muted` (secondary).\n * - `icon` / `trailingIcon` — optional glyphs around the label.\n * - `disabled` — button mode only.\n * - `target` / `rel` — anchor mode only. Setting `target=\"_blank\"` auto-applies\n *   `rel=\"noopener noreferrer\"` (safe by default); override with an explicit\n *   `rel`.\n *\n * @selector `fold-link`\n *\n * @example\n * ```html\n * <fold-link icon=\"company\" trailingIcon=\"chevron-right\" (clicked)=\"openOrg()\">\n *   Voir l'organigramme\n * </fold-link>\n * <fold-link href=\"https://sh3pherd.dev/docs\" target=\"_blank\" tone=\"muted\">\n *   Documentation\n * </fold-link>\n * ```\n */\n@Component({\n  selector: \"fold-link\",\n  standalone: true,\n  imports: [NgTemplateOutlet, FoldIconComponent],\n  host: { \"[class.tone-muted]\": \"tone() === 'muted'\" },\n  templateUrl: \"./link.component.html\",\n  styleUrl: \"./link.component.scss\",\n})\nexport class FoldLinkComponent {\n  /** Leading icon glyph. */\n  readonly icon = input<FoldIconName>();\n  /** Trailing icon glyph (e.g. a nav chevron). */\n  readonly trailingIcon = input<FoldIconName>();\n  /** Colour role — `accent` (default) or `muted`. */\n  readonly tone = input<\"accent\" | \"muted\">(\"accent\");\n  /** When set, the link renders as an `<a href>` instead of a button. */\n  readonly href = input<string>();\n  /** Anchor target (e.g. `_blank`). Anchor mode only. */\n  readonly target = input<string>();\n  /** Anchor `rel`. Anchor mode only. Defaults to `noopener noreferrer` when\n   *  `target=\"_blank\"`; set explicitly to override. */\n  readonly rel = input<string>();\n  /** Disable the button form (no effect on the `href` form). */\n  readonly disabled = input(false, { transform: booleanAttribute });\n  /** Fires on click in the button form; carries the `MouseEvent`. */\n  readonly clicked = output<MouseEvent>();\n\n  /** Resolved `rel` — the explicit value, or a safe default for a new tab. */\n  protected readonly resolvedRel = computed(\n    () =>\n      this.rel() ?? (this.target() === \"_blank\" ? \"noopener noreferrer\" : null),\n  );\n}\n","<ng-template #inner>\n  @if (icon(); as i) {\n    <fold-icon [name]=\"i\" size=\"sm\" />\n  }\n  <span class=\"lnk-label\"><ng-content /></span>\n  @if (trailingIcon(); as t) {\n    <fold-icon [name]=\"t\" size=\"sm\" />\n  }\n</ng-template>\n@if (href(); as h) {\n  <a\n    class=\"lnk\"\n    [href]=\"h\"\n    [attr.target]=\"target() ?? null\"\n    [attr.rel]=\"resolvedRel()\"\n  >\n    <ng-container [ngTemplateOutlet]=\"inner\" />\n  </a>\n} @else {\n  <button\n    type=\"button\"\n    class=\"lnk\"\n    [disabled]=\"disabled()\"\n    (click)=\"clicked.emit($event)\"\n  >\n    <ng-container [ngTemplateOutlet]=\"inner\" />\n  </button>\n}\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport {\n  Component,\n  DestroyRef,\n  ElementRef,\n  afterNextRender,\n  booleanAttribute,\n  computed,\n  inject,\n  input,\n  model,\n  signal,\n  viewChild,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\n\n/**\n * How menu items colour on hover and when active:\n * - `follow` — take the enclosing section's colour (falls back to neutral for\n *   section-less items, e.g. the footer).\n * - `neutral` — a plain grey tint, no accent.\n * - `primary` — the app's primary accent.\n */\nexport type FoldMenuTint = \"follow\" | \"neutral\" | \"primary\";\n\n/**\n * The rail's depth in the shell hierarchy — picks its background tint so a\n * primary rail and a secondary (e.g. workspace) rail read as different layers:\n * `primary` (default) · `secondary` · `tertiary`.\n */\nexport type FoldMenuLevel = \"primary\" | \"secondary\" | \"tertiary\";\n\n/**\n * Where the collapse toggle sits. `auto` follows band presence (first in the\n * footer, else last in the header, else last in the body); the others pin it to\n * a specific band.\n */\nexport type FoldMenuTogglePlacement = \"auto\" | \"footer\" | \"header\" | \"body\";\n\n/**\n * `<fold-menu>` — a vertical icon navigation rail (the app's primary menu shell).\n *\n * Structural + presentational: it owns the rail column, its top/body/bottom\n * bands and the tooltip escape (`overflow: visible`); the app fills the slots\n * and keeps all routing, auth and data. Sits inside the shell's `railPrimary`.\n *\n * ## Options\n * - `collapsible` — render a chevron toggle that flips `expanded`.\n * - `expanded` (two-way) — `true` widens the rail and reveals inline labels;\n *   `false` is the icon rail (icon-only, hover tooltips). **Left unbound it\n *   follows `collapsible`:** `<fold-menu collapsible>` boots **expanded** (you\n *   added a way to collapse, so open is the natural start), a bare `<fold-menu>`\n *   boots the icon rail. Bind it (`[expanded]` / `[(expanded)]`) to be\n *   authoritative — an explicit value always wins.\n *\n * ## Slots\n * | Attribute   | Band                                                        |\n * |-------------|-------------------------------------------------------------|\n * | `header`    | Top — brand, workspace launcher, dividers.                  |\n * | *(default)* | The nav items — `[fold-menu-item]` + `<fold-menu-separator>`. |\n * | `footer`    | Bottom (pinned) — secondary actions, account. Hidden when empty. |\n *\n * @selector `fold-menu`\n *\n * @example\n * ```html\n * <fold-menu collapsible [(expanded)]=\"open()\">\n *   <div header>…brand…</div>\n *   <fold-menu-separator label=\"Workspace\" color=\"#7c5bbf\" />\n *   <a fold-menu-item [icon]=\"i.icon\" [label]=\"i.label\"\n *      [routerLink]=\"i.route\" routerLinkActive #r=\"routerLinkActive\"\n *      [active]=\"r.isActive\"></a>\n *   <div footer>…account…</div>\n * </fold-menu>\n * ```\n */\n@Component({\n  selector: \"fold-menu\",\n  standalone: true,\n  imports: [FoldIconComponent, NgTemplateOutlet],\n  templateUrl: \"./menu.component.html\",\n  styleUrl: \"./menu.component.scss\",\n  host: {\n    \"[class.expanded]\": \"isExpanded()\",\n    \"[attr.data-tint]\": \"tint()\",\n    \"[attr.data-level]\": \"level()\",\n  },\n})\nexport class FoldMenuComponent {\n  /** Show a chevron toggle that flips `expanded`. */\n  readonly collapsible = input(false, { transform: booleanAttribute });\n  /**\n   * Two-way. `true` widens the rail and reveals inline labels; `false` is the\n   * icon rail. **`undefined` (the default) means \"unset\"** — the effective state\n   * then follows `collapsible` (see {@link isExpanded}), so a bare `collapsible`\n   * menu opens without the consumer having to bind it. A bound value is always\n   * authoritative.\n   */\n  readonly expanded = model<boolean | undefined>(undefined);\n  /** How items tint on hover / when active (`follow` = section colour). */\n  readonly tint = input<FoldMenuTint>(\"follow\");\n  /** Rail depth → background tint (`primary` default / `secondary` / `tertiary`). */\n  readonly level = input<FoldMenuLevel>(\"primary\");\n  /** Pin the collapse toggle to a band, or `auto` to follow band presence. */\n  readonly togglePlacement = input<FoldMenuTogglePlacement>(\"auto\");\n  /**\n   * The rail's accessible name, set on its `<nav>` landmark.\n   *\n   * Optional for a lone rail — the page's only `<nav>` needs no name. It stops\n   * being optional the moment the shell carries **two** rails: an app rail and\n   * a workspace rail both announce as \"navigation\", and nothing tells them\n   * apart. Name both, or neither.\n   */\n  readonly navLabel = input<string>();\n\n  private readonly headRef =\n    viewChild.required<ElementRef<HTMLElement>>(\"head\");\n  private readonly footRef =\n    viewChild.required<ElementRef<HTMLElement>>(\"foot\");\n  private readonly hasHeader = signal(false);\n  private readonly hasFooter = signal(false);\n\n  /**\n   * The effective expanded state everything renders from: the bound `expanded`\n   * when set, else it follows `collapsible` (a collapsible rail boots open, a\n   * plain one boots as the icon rail). Encodes the sensible default without a\n   * warning — the short `<fold-menu collapsible>` Just Works.\n   */\n  protected readonly isExpanded = computed<boolean>(\n    () => this.expanded() ?? this.collapsible(),\n  );\n\n  /**\n   * The band the toggle renders into: the `togglePlacement` override when set,\n   * else auto — first in the footer, else last in the header, else the body.\n   */\n  protected readonly resolvedPlacement = computed<\"footer\" | \"header\" | \"body\">(\n    () => {\n      const forced = this.togglePlacement();\n      if (forced !== \"auto\") {\n        return forced;\n      }\n      return this.hasFooter() ? \"footer\" : this.hasHeader() ? \"header\" : \"body\";\n    },\n  );\n\n  constructor() {\n    const destroyRef = inject(DestroyRef);\n    afterNextRender(() => {\n      const head = this.headRef().nativeElement;\n      const foot = this.footRef().nativeElement;\n      const sync = (): void => {\n        this.hasHeader.set(this.slotFilled(head));\n        this.hasFooter.set(this.slotFilled(foot));\n      };\n      sync();\n      const observer = new MutationObserver(sync);\n      observer.observe(head, { childList: true });\n      observer.observe(foot, { childList: true });\n      destroyRef.onDestroy(() => observer.disconnect());\n    });\n  }\n\n  /** True when a band holds projected content (ignoring the toggle itself). */\n  private slotFilled(band: HTMLElement): boolean {\n    for (const child of Array.from(band.children)) {\n      if (!child.classList.contains(\"menu-toggle\")) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  protected toggle(): void {\n    this.expanded.set(!this.isExpanded());\n  }\n}\n","<div\n  class=\"menu-head\"\n  [class.head-has-toggle]=\"collapsible() && resolvedPlacement() === 'header'\"\n  #head\n>\n  <ng-content select=\"[header]\" />\n  @if (collapsible() && resolvedPlacement() === \"header\") {\n    <ng-container [ngTemplateOutlet]=\"toggleTpl\" />\n  }\n</div>\n\n<nav class=\"menu-body\" [attr.aria-label]=\"navLabel() ?? null\">\n  <ng-content />\n  @if (collapsible() && resolvedPlacement() === \"body\") {\n    <ng-container [ngTemplateOutlet]=\"toggleTpl\" />\n  }\n</nav>\n\n<div\n  class=\"menu-foot\"\n  [class.foot-has-toggle]=\"collapsible() && resolvedPlacement() === 'footer'\"\n  #foot\n>\n  @if (collapsible() && resolvedPlacement() === \"footer\") {\n    <ng-container [ngTemplateOutlet]=\"toggleTpl\" />\n  }\n  <ng-content select=\"[footer]\" />\n</div>\n\n<ng-template #toggleTpl>\n  <button\n    type=\"button\"\n    class=\"menu-toggle\"\n    [attr.aria-label]=\"isExpanded() ? 'Collapse menu' : 'Expand menu'\"\n    (click)=\"toggle()\"\n  >\n    <fold-icon\n      [name]=\"isExpanded() ? 'chevron-left' : 'chevron-right'\"\n      [size]=\"14\"\n    />\n  </button>\n</ng-template>\n","import { Component, booleanAttribute, computed, input } from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport {\n  FoldBadgeComponent,\n  type FoldBadgeVariant,\n} from \"../../content/badge/badge.component\";\n\n/**\n * Badge tone for a menu item. `follow` (the default) tints the badge with the\n * item's own accent — i.e. the section colour, or whatever the menu's `tint`\n * resolves to — so it matches the item's hover/active look. The rest are the\n * shared {@link FoldBadgeVariant} semantic colours.\n */\nexport type FoldMenuItemBadgeTone = \"follow\" | FoldBadgeVariant;\n\n/** Solid accent colour per semantic tone (drives the dot + follow-pill). */\nconst TONE_ACCENT: Record<FoldBadgeVariant, string> = {\n  neutral: \"var(--fold-color-text-muted)\",\n  accent: \"var(--fold-color-primary)\",\n  info: \"var(--fold-color-info)\",\n  warning: \"var(--fold-color-warning)\",\n  alert: \"var(--fold-color-alert)\",\n  success: \"var(--fold-color-success)\",\n};\n\n/**\n * `[fold-menu-item]` — an icon rail item. It is an **attribute** component, put\n * on the caller's own `<a>`/`<button>` so routing stays theirs (`routerLink` +\n * `routerLinkActive`). It renders the icon + a hover tooltip (`label`); `active`\n * lights the accent indicator (bind it from `routerLinkActive`'s `isActive`).\n *\n * A {@link badge} adds a status tag / count that renders in both rail modes:\n * a corner dot (or count bubble, for a number) when the rail is collapsed to\n * icons, and the full badge pill after the label when expanded. It stays an\n * input (not projected content) because only this component knows its rail\n * mode, and that mode dictates where the badge belongs. {@link badgeTone}\n * colours both modes from a single accent — `follow` (default) matches the\n * item's own tint, the semantic tones reuse the `fold-badge` palette.\n *\n * @selector `a[fold-menu-item]`, `button[fold-menu-item]`\n *\n * @example\n * ```html\n * <a fold-menu-item [icon]=\"'home'\" [label]=\"'Home'\"\n *    routerLink=\"/home\" routerLinkActive #r=\"routerLinkActive\"\n *    [active]=\"r.isActive\"></a>\n *\n * <a fold-menu-item icon=\"bell\" label=\"Alerts\" [badge]=\"3\"></a>\n * <a fold-menu-item icon=\"star\" label=\"Directive\" badge=\"new\" badgeTone=\"info\"></a>\n * ```\n */\n@Component({\n  selector: \"a[fold-menu-item], button[fold-menu-item]\",\n  standalone: true,\n  imports: [FoldIconComponent, FoldBadgeComponent],\n  templateUrl: \"./menu-item.component.html\",\n  styleUrl: \"./menu-item.component.scss\",\n  host: {\n    \"[class.is-active]\": \"active()\",\n    \"[attr.aria-label]\": \"ariaLabel()\",\n    \"[style.--mi-badge-accent]\": \"badgeAccent()\",\n  },\n})\nexport class FoldMenuItemComponent {\n  readonly icon = input.required<FoldIconName>();\n  /** The label shown in the hover tooltip (also the accessible name). */\n  readonly label = input.required<string>();\n  /** Lights the active indicator — bind from `routerLinkActive`. */\n  readonly active = input(false, { transform: booleanAttribute });\n  /**\n   * Optional badge: a text tag (`\"new\"`, `\"beta\"`) or a count (`3`). Empty\n   * string / nullish renders nothing; a count of `0` is treated as nothing.\n   */\n  readonly badge = input<string | number>();\n  /** Badge colour — `follow` (default) tracks the item's tint, or a semantic tone. */\n  readonly badgeTone = input<FoldMenuItemBadgeTone>(\"follow\");\n\n  /** Whether the badge is a numeric count (drives the collapsed bubble). */\n  protected readonly isCount = computed(() => typeof this.badge() === \"number\");\n\n  /** Whether a badge should render at all (non-empty text / non-zero count). */\n  protected readonly hasBadge = computed(() => {\n    const b = this.badge();\n    return b !== undefined && b !== \"\" && b !== 0;\n  });\n\n  /** Whether the tone tracks the item's accent (vs a semantic `fold-badge`). */\n  protected readonly isFollowTone = computed(\n    () => this.badgeTone() === \"follow\",\n  );\n\n  /** The badge's accent colour — the item's tint, or the semantic tone's. */\n  protected readonly badgeAccent = computed(() => {\n    const tone = this.badgeTone();\n    return tone === \"follow\" ? \"var(--mi-accent)\" : TONE_ACCENT[tone];\n  });\n\n  /** Semantic variant for the expanded `fold-badge` (unused when following). */\n  protected readonly badgeVariant = computed<FoldBadgeVariant>(() => {\n    const tone = this.badgeTone();\n    return tone === \"follow\" ? \"accent\" : tone;\n  });\n\n  /** Badge text for the expanded pill (`fold-badge` needs a string). */\n  protected readonly badgeText = computed(() => {\n    const b = this.badge();\n    return b === undefined ? \"\" : String(b);\n  });\n\n  /** Collapsed corner label: the (capped) count, or empty for a text tag dot. */\n  protected readonly dotText = computed(() => {\n    const b = this.badge();\n    if (typeof b !== \"number\") {\n      return \"\";\n    }\n    return b > 99 ? \"99+\" : String(b);\n  });\n\n  /** Accessible name folding the badge in, so both rail modes announce it. */\n  protected readonly ariaLabel = computed(() =>\n    this.hasBadge() ? `${this.label()}, ${this.badgeText()}` : null,\n  );\n}\n","<fold-icon [name]=\"icon()\" [size]=\"18\" class=\"mi-icon\" />\n\n<!-- Collapsed rail: a corner dot, or a count bubble for a number. -->\n@if (hasBadge()) {\n  <span class=\"mi-dot\" [class.mi-dot-count]=\"isCount()\" aria-hidden=\"true\">{{\n    dotText()\n  }}</span>\n}\n\n<span class=\"mi-tip\">{{ label() }}</span>\n\n<!-- Expanded rail: the badge pill, pushed to the row's trailing edge. `follow`\n     tints from the item's own accent; the semantic tones reuse fold-badge. -->\n@if (hasBadge()) {\n  @if (isFollowTone()) {\n    <span class=\"mi-badge mi-badge-follow\">{{ badgeText() }}</span>\n  } @else {\n    <fold-badge\n      class=\"mi-badge\"\n      [content]=\"badgeText()\"\n      [variant]=\"badgeVariant()\"\n    />\n  }\n}\n","import { Component, input } from \"@angular/core\";\n\n/**\n * `<fold-menu-separator>` — a section break inside `<fold-menu>`.\n *\n * Collapsed (icon rail): a short mark centered between items — a plain divider,\n * or a colour bar when `color` is set. Expanded: a section header — the colour\n * dot + the uppercase `label`. It follows the menu's state via `:host-context`.\n *\n * @selector `fold-menu-separator`\n *\n * @example\n * ```html\n * <fold-menu-separator label=\"Workspace\" color=\"#7c5bbf\" />\n * ```\n */\n@Component({\n  selector: \"fold-menu-separator\",\n  standalone: true,\n  templateUrl: \"./menu-separator.component.html\",\n  styleUrl: \"./menu-separator.component.scss\",\n})\nexport class FoldMenuSeparatorComponent {\n  /** Section label — shown only when the menu is expanded. */\n  readonly label = input<string>();\n  /** Accent colour for the mark/dot (any CSS colour); omit for a neutral line. */\n  readonly color = input<string>();\n}\n","<span class=\"sep-mark\" [style.background]=\"color() || null\"></span>\n@if (label()) {\n  <span class=\"sep-label\">{{ label() }}</span>\n}\n","import {\n  Component,\n  booleanAttribute,\n  computed,\n  contentChildren,\n  input,\n  model,\n} from \"@angular/core\";\nimport { FoldMenuSeparatorComponent } from \"./menu-separator.component\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldMenuItemComponent } from \"./menu-item.component\";\n\n/** Distinct ids for the header → items `aria-controls` link. */\nlet sectionUid = 0;\n\n/**\n * `<fold-menu-section>` — a labelled group inside `<fold-menu>`. It renders a\n * `<fold-menu-separator>` (same `label` / `color` inputs) then projects the\n * section's `fold-menu-item`s beneath it.\n *\n * The `color` is published as the `--fold-menu-section-color` custom property on\n * the host, so it cascades to the projected items: they pick the section's tint\n * up on hover (see `menu-item.component.scss`). Omit `color` for a neutral\n * section.\n *\n * Set `collapsible` to turn the header into a fold toggle (chevron) — a long\n * grouped nav can then be tidied down to the sections that matter. The\n * {@link collapsed} state is two-way bindable and starts open; a section that\n * holds the **active** item always shows regardless, so the current page is\n * never hidden. Folding only applies in the expanded rail — collapsed (icon\n * only) there is no header to click, so every item stays visible.\n *\n * @selector `fold-menu-section`\n *\n * @example\n * ```html\n * <fold-menu-section label=\"Workspace\" color=\"#7c5bbf\" collapsible>\n *   <button fold-menu-item icon=\"home\" label=\"Home\"></button>\n *   <button fold-menu-item icon=\"music\" label=\"Music\"></button>\n * </fold-menu-section>\n * ```\n */\n@Component({\n  selector: \"fold-menu-section\",\n  standalone: true,\n  imports: [FoldMenuSeparatorComponent, FoldIconComponent],\n  templateUrl: \"./menu-section.component.html\",\n  styleUrl: \"./menu-section.component.scss\",\n  host: { \"[style.--fold-menu-section-color]\": \"color() ?? null\" },\n})\nexport class FoldMenuSectionComponent {\n  /** Section label — shown only when the menu is expanded. */\n  readonly label = input<string>();\n  /** Accent colour tinting the separator and the items' hover state. */\n  readonly color = input<string>();\n  /** Turn the header into a fold toggle for the section's items. */\n  readonly collapsible = input(false, { transform: booleanAttribute });\n  /** Fold state (two-way). Starts open; ignored while the section is active. */\n  readonly collapsed = model(false);\n\n  /** Projected items — read to keep the active one's section always open. */\n  private readonly items = contentChildren(FoldMenuItemComponent, {\n    descendants: true,\n  });\n  private readonly hasActiveItem = computed(() =>\n    this.items().some((item) => item.active()),\n  );\n\n  /** Effective open state: not collapsed, or force-open for the active item. */\n  protected readonly open = computed(\n    () => !this.collapsed() || this.hasActiveItem(),\n  );\n\n  /** Stable id linking the toggle's `aria-controls` to the items region. */\n  protected readonly bodyId = `fold-menu-section-${(sectionUid += 1)}`;\n\n  protected toggle(): void {\n    this.collapsed.update((v) => !v);\n  }\n}\n","@if (collapsible()) {\n  <button\n    type=\"button\"\n    class=\"section-head\"\n    [attr.aria-expanded]=\"open()\"\n    [attr.aria-controls]=\"bodyId\"\n    (click)=\"toggle()\"\n  >\n    <fold-menu-separator [label]=\"label()\" [color]=\"color()\" />\n    <fold-icon\n      class=\"section-chevron\"\n      [class.is-open]=\"open()\"\n      name=\"chevron-right\"\n      [size]=\"12\"\n      aria-hidden=\"true\"\n    />\n  </button>\n} @else {\n  <fold-menu-separator [label]=\"label()\" [color]=\"color()\" />\n}\n\n<div\n  class=\"section-items\"\n  [id]=\"bodyId\"\n  [class.foldable]=\"collapsible()\"\n  [class.is-collapsed]=\"!open()\"\n>\n  <ng-content />\n</div>\n","import { DOCUMENT } from \"@angular/common\";\nimport { Service, inject } from \"@angular/core\";\n\n/**\n * Reference-counted body scroll lock for overlays (panels, modals).\n *\n * Multiple overlays can be open at once (e.g. a panel over a page that also\n * locked). Each `lock()` bumps a counter; the body's `overflow` is only frozen\n * on the first lock and restored on the last `unlock()`, so nested overlays\n * never fight over the style or restore it prematurely. The pre-lock value is\n * captured and put back verbatim (not hardcoded to `''`).\n *\n * SSR-safe: `DOCUMENT` is always provided; on the server the style write is a\n * harmless no-op against a detached document.\n */\n@Service()\nexport class ScrollLockService {\n  private readonly document = inject(DOCUMENT);\n  private locks = 0;\n  private previousOverflow = \"\";\n\n  /** Freeze body scroll (idempotent per matching `unlock()`). */\n  lock(): void {\n    if (this.locks === 0) {\n      this.previousOverflow = this.document.body.style.overflow;\n      this.document.body.style.overflow = \"hidden\";\n    }\n    this.locks += 1;\n  }\n\n  /** Release one lock; restores scroll only when the last lock is released. */\n  unlock(): void {\n    if (this.locks === 0) {\n      return;\n    }\n    this.locks -= 1;\n    if (this.locks === 0) {\n      this.document.body.style.overflow = this.previousOverflow;\n    }\n  }\n\n  /** True while at least one lock is held. */\n  get isLocked(): boolean {\n    return this.locks > 0;\n  }\n}\n","import { InjectionToken, type Signal } from \"@angular/core\";\n\n/**\n * What a {@link FoldNavGroupComponent} needs from the launcher above it.\n *\n * A token rather than the component class, for one reason: the launcher queries\n * its groups (`contentChildren`) and a group asks the launcher to descend. Typed\n * against the classes, that is an import cycle. The token is the seam — it names\n * the two verbs and nothing else, so neither file imports the other.\n */\nexport interface FoldNavLauncherHost {\n  /** The id of the group currently open, or `null` at level 1. */\n  readonly openGroupId: Signal<string | null>;\n  /** Is the launcher mid-transition? A second tap during it must be ignored. */\n  readonly busy: Signal<boolean>;\n  /** Descend into a group. No-op while busy, or if the id is unknown. */\n  drill(groupId: string): void;\n  /** Climb back to level 1. */\n  back(): void;\n}\n\nexport const FOLD_NAV_LAUNCHER = new InjectionToken<FoldNavLauncherHost>(\n  \"FOLD_NAV_LAUNCHER\",\n);\n\n/**\n * What a tile needs from the group it sits in — only \"am I on the open sheet?\".\n *\n * A projected tile resolves this through the element injector, which follows the\n * DECLARATION tree: the consumer writes its tiles inside `<fold-nav-group>`, so\n * they find the group. A tile written straight into the launcher finds nothing\n * and stays a square — which is exactly the distinction we want it to make.\n */\nexport interface FoldNavGroupContext {\n  /** Is this group's sheet the one on screen? */\n  readonly isOpen: Signal<boolean>;\n}\n\nexport const FOLD_NAV_GROUP = new InjectionToken<FoldNavGroupContext>(\n  \"FOLD_NAV_GROUP\",\n);\n","import {\n  booleanAttribute,\n  Component,\n  ElementRef,\n  computed,\n  inject,\n  input,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport type { FoldMenuItemBadgeTone } from \"../menu/menu-item.component\";\nimport { FOLD_NAV_GROUP } from \"./nav-launcher.tokens\";\n\n/** How a row's glyph and hint are inked — neutral, or the warning tone. */\nexport type FoldNavTileTone = \"neutral\" | \"warning\";\n\n/**\n * `[fold-nav-tile]` — one destination in a {@link FoldNavLauncherComponent}.\n *\n * An **attribute** component on the caller's own `<a>`/`<button>`, so routing +\n * activation stay theirs (`routerLink`, `(click)`) — mirroring\n * {@link FoldMenuItemComponent}.\n *\n * ## Two presentations, decided by where it sits\n * - Written straight into the launcher, it is a **square tile** in the grid.\n * - Written inside a {@link FoldNavGroupComponent}, it is a **row** on that\n *   group's sheet: glyph, label, hint, chevron.\n *\n * Nothing is passed to say which — the tile resolves its group through the\n * element injector, which follows the tree the consumer wrote. A second level\n * is a list and not a grid on purpose: \"Mercuriale templates\" does not fit in a\n * square, and a list is read with the thumb.\n *\n * `icon` is **optional**, because a second-level entry may not have one\n * (`FoldViewNavItem.icon` is optional too, and these rows mirror a rail). A row\n * with no icon falls back to a status dot rather than shifting its label — so a\n * list with a hole in it still reads as a column.\n *\n * @selector `a[fold-nav-tile]`, `button[fold-nav-tile]`\n *\n * @example\n * ```html\n * <!-- level 1: a square that goes somewhere -->\n * <a fold-nav-tile icon=\"home\" label=\"Home\" routerLink=\"/\"></a>\n *\n * <!-- level 2: rows on a group's sheet -->\n * <fold-nav-group icon=\"catalog\" label=\"Catalogue\">\n *   <a fold-nav-tile icon=\"product\" label=\"Products\" hint=\"128 sheets\" routerLink=\"/products\"></a>\n *   <a fold-nav-tile icon=\"publish\" label=\"Publishing\" hint=\"3 waiting\" tone=\"warning\" routerLink=\"/publish\"></a>\n * </fold-nav-group>\n * ```\n */\n@Component({\n  selector: \"a[fold-nav-tile], button[fold-nav-tile]\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  templateUrl: \"./nav-tile.component.html\",\n  styleUrl: \"./nav-tile.component.scss\",\n  host: {\n    class: \"fold-nav-tile\",\n    \"[class.is-row]\": \"isRow()\",\n    \"[class.is-filled]\": \"variant() === 'filled'\",\n    \"[class.is-accent]\": \"variant() === 'accent'\",\n    \"[class.is-active]\": \"active()\",\n    \"[attr.data-tone]\": \"tone()\",\n    \"[attr.aria-current]\": \"active() ? 'page' : null\",\n    \"[attr.aria-label]\": \"ariaLabel()\",\n  },\n})\nexport class FoldNavTileComponent {\n  /**\n   * The tile's icon. Optional at level 2, where a row with none falls back to a\n   * status dot; a square tile without one shows its label's initial, so the\n   * grid keeps its rhythm either way.\n   */\n  readonly icon = input<FoldIconName>();\n  /** The label (also the accessible name of the control). */\n  readonly label = input.required<string>();\n  /**\n   * Secondary text, on the row's right — a count, a state, a source\n   * (\"128 sheets\", \"Shopify\"). **Level 2 only**: a square tile has no room for\n   * it, and a value that renders in one place and vanishes in another is worse\n   * than one that never rendered.\n   */\n  readonly hint = input<string>();\n  /** `neutral` (default) or `warning` — inks the row's glyph and hint. */\n  readonly tone = input<FoldNavTileTone>(\"neutral\");\n  /**\n   * `\"surface\"` (default, subtle raised) · `\"accent\"` (primary-tinted — what a\n   * group's tile wears) · `\"filled\"` (solid primary, the flat app-icon look).\n   */\n  readonly variant = input<\"surface\" | \"accent\" | \"filled\">(\"surface\");\n  /** Lights the active indicator — the current destination. */\n  readonly active = input(false, { transform: booleanAttribute });\n\n  /**\n   * Optional badge: a count (`3`) or a short text tag (`\"new\"`). Nullish, `\"\"`\n   * and a count of **`0`** all render nothing, so a caller can pass a raw count\n   * and let zero mean \"nothing to say\" rather than pre-mapping it to `null`.\n   */\n  readonly badge = input<string | number>();\n\n  /** Badge colour — `follow` (default) tracks the tile's look, or a semantic tone. */\n  readonly badgeTone = input<FoldMenuItemBadgeTone>(\"follow\");\n\n  /**\n   * The host element. The group focuses its first entry on the way down, and\n   * the launcher measures the wave's origin from these — both need the node,\n   * and reaching for it through the DOM from outside would be guesswork.\n   */\n  readonly hostEl: HTMLElement =\n    inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n  /** The group this tile sits on, if any — `null` means level 1. */\n  private readonly group = inject(FOLD_NAV_GROUP, { optional: true });\n\n  /** A row rather than a square: the tile is on a group's sheet. */\n  protected readonly isRow = computed(() => this.group !== null);\n\n  /** A square tile with no icon still needs a fixed glyph — its initial. */\n  protected readonly initial = computed(() => this.label().charAt(0));\n\n  /** Whether a badge renders at all (non-empty text / non-zero count). */\n  protected readonly hasBadge = computed(() => {\n    const b = this.badge();\n    return b !== undefined && b !== \"\" && b !== 0;\n  });\n\n  /** The badge's text — a count over 99 is capped, as in the collapsed rail. */\n  protected readonly badgeText = computed(() => {\n    const b = this.badge();\n    if (b === undefined) {\n      return \"\";\n    }\n    return typeof b === \"number\" && b > 99 ? \"99+\" : String(b);\n  });\n\n  /**\n   * Accessible name folding badge and hint in. Both bubbles are `aria-hidden`:\n   * read on their own they would announce a bare \"3\" or \"128 sheets\", detached\n   * from what they count.\n   */\n  protected readonly ariaLabel = computed(() => {\n    const parts = [this.label()];\n    if (this.hasBadge()) {\n      parts.push(this.badgeText());\n    }\n    const hint = this.hint();\n    if (hint !== undefined && hint !== \"\" && this.isRow()) {\n      parts.push(hint);\n    }\n    return parts.length > 1 ? parts.join(\", \") : null;\n  });\n}\n","@if (isRow()) {\n  <!-- Niveau 2. Une entrée sans icône retombe sur un POINT, à la même largeur\n       de gouttière : une ligne muette ne doit pas décaler la colonne. -->\n  @if (icon(); as name) {\n    <span class=\"nt-lead\"><fold-icon [name]=\"name\" [size]=\"17\" /></span>\n  } @else {\n    <span class=\"nt-lead\"><span class=\"nt-dot\" aria-hidden=\"true\"></span></span>\n  }\n  <span class=\"nt-row-label\">{{ label() }}</span>\n  @if (hint(); as h) {\n    <span class=\"nt-hint\" aria-hidden=\"true\">{{ h }}</span>\n  }\n  <span class=\"nt-chevron\" aria-hidden=\"true\">›</span>\n} @else {\n  @if (icon(); as name) {\n    <fold-icon [name]=\"name\" [size]=\"26\" class=\"nt-icon\" />\n  } @else {\n    <span class=\"nt-icon nt-initial\" aria-hidden=\"true\">{{ initial() }}</span>\n  }\n  <span class=\"nt-label\"\n    ><span class=\"nt-label-text\">{{ label() }}</span></span\n  >\n\n  <!-- Pastille de coin, comme celle du rail replié. `aria-hidden` — le compte\n       atteint les technologies d'assistance par l'`aria-label` composé. -->\n  @if (hasBadge()) {\n    <span class=\"nt-badge\" [attr.data-tone]=\"badgeTone()\" aria-hidden=\"true\">{{\n      badgeText()\n    }}</span>\n  }\n}\n","import {\n  Component,\n  ElementRef,\n  computed,\n  contentChildren,\n  inject,\n  input,\n} from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport type { FoldMenuItemBadgeTone } from \"../menu/menu-item.component\";\nimport { FoldNavTileComponent } from \"./nav-tile.component\";\nimport {\n  FOLD_NAV_GROUP,\n  FOLD_NAV_LAUNCHER,\n  type FoldNavGroupContext,\n} from \"./nav-launcher.tokens\";\n\n/**\n * `<fold-nav-group>` — a launcher tile that opens a **second level** instead of\n * going somewhere.\n *\n * There is no `level` to drive and no mode to switch: **a tile that contains\n * tiles is a group**. The launcher discovers depth by content query, exactly as\n * {@link FoldMultiselectComponent} discovers its `fold-optgroup`. Two levels and\n * no more — at a third this stops being a launcher and becomes a tree.\n *\n * ```html\n * <fold-nav-launcher [(open)]=\"navOpen\">\n *   <a fold-nav-tile icon=\"home\" label=\"Home\" routerLink=\"/\"></a>\n *\n *   <fold-nav-group icon=\"catalog\" label=\"PIM\">\n *     <a fold-nav-tile icon=\"product\" label=\"Products\" routerLink=\"/pim/products\"></a>\n *     <a fold-nav-tile icon=\"category\" label=\"Categories\" routerLink=\"/pim/categories\"></a>\n *   </fold-nav-group>\n * </fold-nav-launcher>\n * ```\n *\n * ## Why it isn't given a count\n * The header says \"7 entries\" and that number is **derived**, never passed: a\n * count that is declared beside the list it counts is a second source of truth,\n * and the first time someone adds a tile without touching it, the header starts\n * lying. The group can see its own children; it counts them.\n *\n * ## The tile that survives the transition\n * On the way down the group's tile does not leave with its sisters — it becomes\n * the **anchor** in the level-2 header, at pastille size. It is the only element\n * that crosses the transition, so it is the only landmark the eye needs.\n *\n * @selector `fold-nav-group`\n */\n@Component({\n  selector: \"fold-nav-group\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  templateUrl: \"./nav-group.component.html\",\n  styleUrl: \"./nav-group.component.scss\",\n  providers: [{ provide: FOLD_NAV_GROUP, useExisting: FoldNavGroupComponent }],\n  host: {\n    class: \"fold-nav-group\",\n    \"[attr.data-open]\": \"isOpen() ? '' : null\",\n  },\n})\nexport class FoldNavGroupComponent implements FoldNavGroupContext {\n  /** The group's icon — worn by its tile, then by the level-2 anchor. */\n  readonly icon = input<FoldIconName>();\n  /** The group's name — its tile's label, then the level-2 heading. */\n  readonly label = input.required<string>();\n  /** Optional corner badge on the tile, read exactly as a tile's own. */\n  readonly badge = input<string | number>();\n  /** Badge colour — `follow` (default) or a semantic tone. */\n  readonly badgeTone = input<FoldMenuItemBadgeTone>(\"follow\");\n  /**\n   * How the sheet's entry count is said, given the count. Default is English;\n   * pass a function for another language, or for a different noun.\n   */\n  readonly entryCountLabel = input<(count: number) => string>((count) =>\n    count === 1 ? \"1 entry\" : `${String(count)} entries`,\n  );\n\n  /** SSR-safe identity — how the launcher names the open group. */\n  readonly groupId = inject(FoldIdService).next(\"fold-nav-group\");\n\n  /** The host element — the launcher needs it to measure the wave's origin. */\n  readonly hostEl: HTMLElement =\n    inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n  private readonly launcher = inject(FOLD_NAV_LAUNCHER, { optional: true });\n\n  /** The rows on this group's sheet. Their count IS the header's count. */\n  private readonly entries = contentChildren(FoldNavTileComponent);\n\n  /** How many entries the sheet holds. */\n  readonly entryCount = computed(() => this.entries().length);\n\n  /** Is this group's sheet the one on screen? */\n  readonly isOpen = computed(\n    () => this.launcher?.openGroupId() === this.groupId,\n  );\n\n  /** The tile's fallback glyph when no icon is given — the label's initial. */\n  protected readonly initial = computed(() => this.label().charAt(0));\n\n  /** Whether a badge renders at all (non-empty text / non-zero count). */\n  protected readonly hasBadge = computed(() => {\n    const b = this.badge();\n    return b !== undefined && b !== \"\" && b !== 0;\n  });\n\n  /** The badge's text — a count over 99 is capped, as in the collapsed rail. */\n  protected readonly badgeText = computed(() => {\n    const b = this.badge();\n    if (b === undefined) {\n      return \"\";\n    }\n    return typeof b === \"number\" && b > 99 ? \"99+\" : String(b);\n  });\n\n  /**\n   * The tile's accessible name, folding in the badge and what the tile does.\n   * \"Opens\" matters: the control is a `button` that reveals a level, not a link\n   * — announcing it like its neighbours would promise a destination.\n   */\n  protected readonly tileLabel = computed(() =>\n    this.hasBadge() ? `${this.label()}, ${this.badgeText()}` : this.label(),\n  );\n\n  /** Move focus to the group's own tile — where the launcher returns it. */\n  focusTile(): void {\n    this.hostEl.querySelector<HTMLElement>(\".ng-face\")?.focus();\n  }\n\n  /** Move focus to the sheet's first entry — where the launcher sends it. */\n  focusFirstEntry(): void {\n    this.entries()[0]?.hostEl.focus();\n  }\n\n  /** Descend. The launcher owns the transition; the tile only asks. */\n  protected drill(): void {\n    this.launcher?.drill(this.groupId);\n  }\n}\n","<!-- LA FACE — la tuile du niveau 1. Un `button` et non un lien : elle n'a pas de\n     destination, elle ouvre un niveau. `aria-expanded` le dit, et la région\n     `aria-live` du lanceur annonce ce qui s'est ouvert. -->\n<button\n  type=\"button\"\n  class=\"ng-face\"\n  [attr.aria-expanded]=\"isOpen()\"\n  [attr.aria-label]=\"tileLabel()\"\n  (click)=\"drill()\"\n>\n  @if (icon(); as name) {\n    <fold-icon [name]=\"name\" [size]=\"26\" class=\"ng-glyph\" />\n  } @else {\n    <span class=\"ng-glyph ng-initial\" aria-hidden=\"true\">{{ initial() }}</span>\n  }\n  <span class=\"ng-label\">\n    <span class=\"ng-label-text\">{{ label() }}</span>\n    <!-- Le chevron marque une SECONDE fois ce que le fond teinté dit déjà : la\n         couleur seule ne survit ni au niveau de gris ni à `forced-colors`. -->\n    <span class=\"ng-chevron\" aria-hidden=\"true\">›</span>\n  </span>\n  @if (hasBadge()) {\n    <span class=\"ng-badge\" [attr.data-tone]=\"badgeTone()\" aria-hidden=\"true\">{{\n      badgeText()\n    }}</span>\n  }\n</button>\n\n<!-- LA FEUILLE — le niveau 2. Toujours dans le DOM : les liens projetés\n     gardent leur identité, leur focus et leur état actif d'un niveau à\n     l'autre. C'est le CSS qui la sort de la grille quand elle s'ouvre. -->\n<div class=\"ng-sheet\" [attr.inert]=\"isOpen() ? null : ''\">\n  <ng-content />\n</div>\n","/** The launcher's transition phases. */\nexport type FoldNavPhase = \"idle\" | \"down\" | \"up\";\n\n/** One staged element and, when it is a group, its identity as the origin. */\nexport interface FoldNavWaveItem {\n  readonly hostEl: HTMLElement;\n}\n\n/**\n * Write the wave onto a set of elements.\n *\n * Direct DOM writes, deliberately. The step is each item's **distance from the\n * touched tile**, and no item can work that out alone: it would have to know\n * both its own index and where a finger landed on a sibling. The launcher is\n * the only thing that knows both — so the launcher stages the wave, and the\n * stylesheet reads `--fold-nl-step`. An element that is never staged has no\n * step, so it enters in one block: a tile used outside a launcher still works.\n *\n * @param items    the elements to stage, in DOM order\n * @param originEl the touched tile, or `null` — the wave then starts at the first\n * @param phase    `down` marks the leavers, `up` the rows on their way out\n * @param settled  the cascade is over: hand the transform back to `:active`\n */\nexport function stageWave(\n  items: readonly HTMLElement[],\n  originEl: HTMLElement | null,\n  phase: FoldNavPhase,\n  settled: boolean,\n): void {\n  const hit = originEl ? Math.max(items.indexOf(originEl), 0) : 0;\n  for (const [index, el] of items.entries()) {\n    el.style.setProperty(\"--fold-nl-step\", String(Math.abs(index - hit)));\n    mark(el, \"data-leaving\", phase === \"down\");\n    mark(el, \"data-anchor\", phase === \"down\" && el === originEl);\n    mark(el, \"data-settled\", settled && phase === \"idle\");\n  }\n}\n\n/**\n * Stage the level-2 rows. Their cascade runs down the list, not out from a\n * finger: the sheet arrives as one movement from the bottom, and there is no\n * touched row to start from.\n */\nexport function stageRows(\n  rows: readonly HTMLElement[],\n  phase: FoldNavPhase,\n  settled: boolean,\n): void {\n  for (const [index, el] of rows.entries()) {\n    el.style.setProperty(\"--fold-nl-step\", String(index));\n    mark(el, \"data-leaving\", phase === \"up\");\n    mark(el, \"data-settled\", settled && phase === \"idle\");\n  }\n}\n\n/** The items' hosts in DOM order — the order the wave has to travel in. */\nexport function inDomOrder(\n  groups: readonly FoldNavWaveItem[][],\n): HTMLElement[] {\n  return groups\n    .flat()\n    .map((item) => item.hostEl)\n    .sort((a, b) =>\n      (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0\n        ? -1\n        : 1,\n    );\n}\n\n/** Set or remove a marker attribute — `toggleAttribute` with an explicit force. */\nfunction mark(el: HTMLElement, name: string, on: boolean): void {\n  if (on) {\n    el.setAttribute(name, \"\");\n  } else {\n    el.removeAttribute(name);\n  }\n}\n","import {\n  Component,\n  DestroyRef,\n  HostListener,\n  Injector,\n  afterNextRender,\n  booleanAttribute,\n  computed,\n  contentChildren,\n  effect,\n  inject,\n  input,\n  model,\n  signal,\n} from \"@angular/core\";\nimport { FocusTrapDirective } from \"../../../a11y/focus-trap.directive\";\nimport { FoldSurfaceDirective } from \"../../../directives/surface.directive\";\nimport { ScrollLockService } from \"../../../a11y/scroll-lock.service\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldNavGroupComponent } from \"./nav-group.component\";\nimport { FoldNavTileComponent } from \"./nav-tile.component\";\nimport { FOLD_NAV_LAUNCHER } from \"./nav-launcher.tokens\";\nimport {\n  inDomOrder,\n  stageRows,\n  stageWave,\n  type FoldNavPhase,\n} from \"./nav-wave\";\n\n/** How long the descent runs before level 2 takes over (ms). */\nconst DRILL_MS = 260;\n/** How long the climb back runs (ms). */\nconst BACK_MS = 200;\n/** When the entrance cascade is over and `:active` gets the transform back (ms). */\nconst SETTLE_MS = 760;\n/** Horizontal travel that counts as a \"swipe right\" (px). */\nconst SWIPE_PX = 56;\n\n/**\n * `<fold-nav-launcher>` — the full-screen mobile navigation, in **two levels**.\n *\n * A grid of large tiles; a tile that contains tiles (a {@link FoldNavGroupComponent})\n * opens a second level instead of going somewhere. It owns the whole overlay\n * contract: scrim, `Escape` / close-button dismissal, focus-trap, body\n * scroll-lock — and, from v2, the descent itself.\n *\n * ## The transition is the wayfinding\n * There is no breadcrumb. **The tile you touch becomes the header of the level\n * it opens** — it is the only element that survives the transition, so it is\n * the only landmark the eye needs. Its sisters leave in a **wave that starts\n * under your finger** (26 ms per step of distance, not per position in the\n * list), rising as they blur — upward, where the finger is not going. The way\n * back is the exact inverse: same curve, same cascade, opposite direction.\n *\n * ## What it owes assistive tech\n * Motion tells a sighted user where they went and nothing at all to anyone\n * else, so none of this is left to the animation:\n * - **Focus follows the level** — down to the sheet's first entry, and back to\n *   the tile it came from.\n * - **`Escape` is contextual** — at level 2 it climbs, at level 1 it closes.\n *   Two gestures, one key, in that order.\n * - **The level is announced** — a polite live region says \"PIM, 7 entries\".\n * - **The swipe is a bonus, not the path.** It doubles the back button.\n *\n * ```html\n * <fold-app-shell mobileNav=\"none\" [(mobileNavOpen)]=\"navOpen\">…</fold-app-shell>\n *\n * <fold-nav-launcher [(open)]=\"navOpen\" eyebrow=\"LFC B2B\" heading=\"Admin\">\n *   <a fold-nav-tile icon=\"home\" label=\"Home\" routerLink=\"/\"></a>\n *   <fold-nav-group icon=\"catalog\" label=\"PIM\">\n *     <a fold-nav-tile icon=\"product\" label=\"Products\" routerLink=\"/pim/products\"></a>\n *   </fold-nav-group>\n *   <div footer>…account, sign-out…</div>\n * </fold-nav-launcher>\n * ```\n *\n * @selector `fold-nav-launcher`\n */\n@Component({\n  selector: \"fold-nav-launcher\",\n  standalone: true,\n  imports: [FocusTrapDirective, FoldIconComponent, FoldSurfaceDirective],\n  templateUrl: \"./nav-launcher.component.html\",\n  styleUrl: \"./nav-launcher.component.scss\",\n  providers: [\n    { provide: FOLD_NAV_LAUNCHER, useExisting: FoldNavLauncherComponent },\n  ],\n})\nexport class FoldNavLauncherComponent {\n  /** Two-way open state — bind to the shell's `mobileNavOpen`. */\n  readonly open = model(false);\n  /** Accessible name for the launcher dialog. */\n  readonly label = input(\"Navigation\");\n  /** Small uppercase line above the heading — the tenant, the environment. */\n  readonly eyebrow = input<string>();\n  /** The level-1 heading. Level 2 replaces it with the group's own name. */\n  readonly heading = input<string>();\n  /** Close-button label, for a non-English app. */\n  readonly closeLabel = input(\"Close navigation\");\n  /** Back-button label, for a non-English app. */\n  readonly backLabel = input(\"Back\");\n  /**\n   * The translucent treatment. Off by default and that is the position, not an\n   * oversight: glass costs a compositing layer per plane, and text contrast\n   * drops about a step on a 50 % plane. The launcher stays dark either way —\n   * glass brightens the light that crosses a surface, never the surface.\n   */\n  readonly glass = input(false, { transform: booleanAttribute });\n  /**\n   * Grid column count. `\"auto\"` (default) scales to the number of level-1\n   * items: ≤4 → 2 columns, more → 3.\n   */\n  readonly columns = input<number | \"auto\">(\"auto\");\n\n  /** Level-1 tiles — those written straight into the launcher. */\n  private readonly tiles = contentChildren(FoldNavTileComponent);\n  /** The groups — each one a tile that opens a level. */\n  private readonly groups = contentChildren(FoldNavGroupComponent);\n\n  /** Which group's sheet is on screen, or `null` at level 1. */\n  private readonly openGroup = signal<FoldNavGroupComponent | null>(null);\n  /** The group being descended into, while the wave plays. */\n  private readonly pending = signal<FoldNavGroupComponent | null>(null);\n  /** `down` / `up` while a transition runs — a second tap must be ignored. */\n  private readonly phase = signal<FoldNavPhase>(\"idle\");\n  /** Has the entrance cascade finished? Then `:active` gets the transform back. */\n  private readonly settled = signal(false);\n\n  readonly openGroupId = computed(() => this.openGroup()?.groupId ?? null);\n  readonly busy = computed(() => this.phase() !== \"idle\");\n\n  /** `1` or `2` — what the dialog paints and what the dots say. */\n  protected readonly level = computed(() => (this.openGroup() ? 2 : 1));\n\n  /** The group whose tile is the anchor: the open one, or the one being opened. */\n  protected readonly anchor = computed(\n    () => this.openGroup() ?? this.pending(),\n  );\n\n  /** The resolved column count (always a number for the grid var). */\n  protected readonly resolvedCols = computed(() => {\n    const cols = this.columns();\n    if (cols !== \"auto\") {\n      return cols;\n    }\n    return this.tiles().length + this.groups().length <= 4 ? 2 : 3;\n  });\n\n  /** The sheet's subtitle — derived from the group's own children, never passed. */\n  protected readonly entryCountText = computed(() => {\n    const group = this.openGroup();\n    return group ? group.entryCountLabel()(group.entryCount()) : \"\";\n  });\n\n  /**\n   * What the live region says. Empty at level 1 on purpose: closing a sheet is\n   * already announced by the focus landing back on its tile, and a second\n   * message on top of that is noise.\n   */\n  protected readonly announcement = computed(() => {\n    const group = this.openGroup();\n    return group ? `${group.label()}, ${this.entryCountText()}` : \"\";\n  });\n\n  private readonly injector = inject(Injector);\n  private readonly scrollLock = inject(ScrollLockService);\n  private locked = false;\n  private settleTimer: ReturnType<typeof setTimeout> | undefined;\n  private phaseTimer: ReturnType<typeof setTimeout> | undefined;\n  private swipeFrom: number | null = null;\n\n  constructor() {\n    // Freeze the page scroll behind the full-screen launcher while it is open.\n    effect(() => {\n      const shouldLock = this.open();\n      if (shouldLock && !this.locked) {\n        this.scrollLock.lock();\n        this.locked = true;\n      } else if (!shouldLock && this.locked) {\n        this.scrollLock.unlock();\n        this.locked = false;\n      }\n    });\n\n    // Closing resets the depth. Re-opening onto a sheet from a previous visit\n    // would drop you somewhere you never asked to be.\n    effect(() => {\n      if (this.open()) {\n        this.restage();\n      } else {\n        this.openGroup.set(null);\n        this.pending.set(null);\n        this.phase.set(\"idle\");\n      }\n    });\n\n    // The wave's origin is the touched tile, so its delays can only be written\n    // once that tile is known — and re-written every time the level changes.\n    effect(() => this.stage(this.pending() ?? this.openGroup(), this.phase()));\n\n    inject(DestroyRef).onDestroy(() => {\n      clearTimeout(this.settleTimer);\n      clearTimeout(this.phaseTimer);\n      if (this.locked) {\n        this.scrollLock.unlock();\n        this.locked = false;\n      }\n    });\n  }\n\n  /** Descend into a group. Ignored mid-transition, and on an unknown id. */\n  drill(groupId: string): void {\n    const group = this.groups().find((g) => g.groupId === groupId);\n    if (!group || this.busy() || this.openGroup()) {\n      return;\n    }\n    this.pending.set(group);\n    this.phase.set(\"down\");\n    this.settled.set(false);\n    clearTimeout(this.phaseTimer);\n    this.phaseTimer = setTimeout(() => {\n      this.openGroup.set(group);\n      this.pending.set(null);\n      this.phase.set(\"idle\");\n      this.restage();\n      // Focus follows the level. Without this the trap keeps the caret on a\n      // tile that is no longer on screen, and the next Tab starts from nowhere.\n      this.focusAfterRender(() => group.focusFirstEntry());\n    }, DRILL_MS);\n  }\n\n  /** Climb back to level 1, returning focus to the tile we came from. */\n  back(): void {\n    const group = this.openGroup();\n    if (!group || this.busy()) {\n      return;\n    }\n    this.phase.set(\"up\");\n    this.settled.set(false);\n    clearTimeout(this.phaseTimer);\n    this.phaseTimer = setTimeout(() => {\n      this.openGroup.set(null);\n      this.phase.set(\"idle\");\n      this.restage();\n      this.focusAfterRender(() => group.focusTile());\n    }, BACK_MS);\n  }\n\n  /**\n   * `Escape` is contextual: at level 2 it climbs, at level 1 it closes. Two\n   * gestures, one key, in that order — the same order the back button and the\n   * close button sit in on screen.\n   */\n  @HostListener(\"document:keydown.escape\")\n  protected onEscape(): void {\n    if (!this.open()) {\n      return;\n    }\n    if (this.openGroup()) {\n      this.back();\n      return;\n    }\n    this.close();\n  }\n\n  /** Dismiss — the close-button target. */\n  protected close(): void {\n    this.open.set(false);\n  }\n\n  /** A swipe to the right climbs a level — a bonus on top of the back button. */\n  protected onPointerDown(event: PointerEvent): void {\n    this.swipeFrom = event.clientX;\n  }\n\n  protected onPointerUp(event: PointerEvent): void {\n    const from = this.swipeFrom;\n    this.swipeFrom = null;\n    if (from !== null && event.clientX - from > SWIPE_PX) {\n      this.back();\n    }\n  }\n\n  /**\n   * A click on the launcher's empty surface dismisses it — anywhere that is not\n   * a tile, the sheet, or a control.\n   *\n   * The scrim carried this handler and could never fire it: `.nl-dialog` is\n   * `position: fixed; inset: 0` at a higher z-index, so it covers the scrim\n   * whole. The gesture people expect from a full-screen overlay simply did not\n   * exist, while the markup claimed it did.\n   */\n  protected onSurfaceClick(event: Event): void {\n    const target = event.target;\n    // The launcher's OWN surfaces only — never an allow-list of what may be\n    // projected into it. Anything a consumer puts in the grid keeps its own\n    // clicks, without this component having to know what it is.\n    if (!(target instanceof Element)) {\n      return;\n    }\n    if (\n      target.classList.contains(\"nl-dialog\") ||\n      target.classList.contains(\"nl-body\") ||\n      target.classList.contains(\"nl-grid\")\n    ) {\n      this.close();\n    }\n  }\n\n  /** Replay the entrance cascade, then hand the transform back to `:active`. */\n  private restage(): void {\n    this.settled.set(false);\n    clearTimeout(this.settleTimer);\n    this.settleTimer = setTimeout(() => {\n      this.settled.set(true);\n      this.stage(this.openGroup(), \"idle\");\n    }, SETTLE_MS);\n  }\n\n  /**\n   * Move focus once the new level is actually on screen.\n   *\n   * Setting the level is a signal write; the sheet is still `inert` and its\n   * rows still unrendered until change detection has run. Focusing there and\n   * then silently failed, and the trap fell back to the first control in the\n   * dialog — the close button. So the caret landed on \"dismiss\" every time\n   * someone opened a section.\n   */\n  private focusAfterRender(move: () => void): void {\n    afterNextRender(move, { injector: this.injector });\n  }\n\n  /** Re-write the wave for the current origin and phase. */\n  private stage(\n    origin: FoldNavGroupComponent | null,\n    phase: FoldNavPhase,\n  ): void {\n    const items = inDomOrder([[...this.tiles()], [...this.groups()]]);\n    stageWave(items, origin?.hostEl ?? null, phase, this.settled());\n\n    const sheet = this.openGroup()?.hostEl;\n    const rows = sheet\n      ? [...sheet.querySelectorAll<HTMLElement>(\".fold-nav-tile\")]\n      : [];\n    stageRows(rows, phase, this.settled());\n  }\n}\n","@if (open()) {\n  <div class=\"nl-scrim\" aria-hidden=\"true\"></div>\n  <!-- Le gestionnaire de renvoi vit sur le DIALOGUE, pas sur le voile : le\n       dialogue est `position: fixed; inset: 0` par-dessus, donc un clic\n       n'atteignait jamais le voile. Le clavier sort par `Escape`. -->\n  <!-- Une SURFACE DE CHROME, et pas seulement un fond sombre : sans cette\n       déclaration le lanceur peignait le sol du rail tout en lisant l'encre de\n       la PAGE — texte sombre sur sombre, et des tuiles claires au milieu d'un\n       panneau noir, sous tout thème mixte (navi). Peindre le sol d'une famille\n       sans en rejoindre la polarité, c'est en revendiquer la moitié. -->\n  <div\n    class=\"nl-dialog\"\n    foldSurface=\"chrome\"\n    role=\"dialog\"\n    aria-modal=\"true\"\n    [attr.aria-label]=\"label()\"\n    [attr.data-level]=\"level()\"\n    [attr.data-glass]=\"glass() ? '' : null\"\n    [foldFocusTrap]=\"open()\"\n    tabindex=\"-1\"\n    (click)=\"onSurfaceClick($event)\"\n  >\n    <!-- Le voile de l'option verre. Sans lui, le flou n'a rien à flouter et on\n         n'obtient que des panneaux plus sombres. -->\n    <div class=\"nl-veil\" aria-hidden=\"true\"></div>\n\n    <header class=\"nl-head\">\n      @if (anchor(); as group) {\n        <button\n          type=\"button\"\n          class=\"nl-back\"\n          [attr.aria-label]=\"backLabel()\"\n          (click)=\"back()\"\n        >\n          <fold-icon name=\"chevron-left\" size=\"sm\" />\n        </button>\n        <!-- L'ANCRE. La tuile touchée ne disparaît pas : elle remonte ici, à\n             sa taille de pastille. Cliquable, parce que l'élément qui a servi\n             de porte doit aussi servir de sortie. -->\n        <button\n          type=\"button\"\n          class=\"nl-anchor\"\n          [attr.aria-label]=\"backLabel()\"\n          (click)=\"back()\"\n        >\n          @if (group.icon(); as name) {\n            <fold-icon [name]=\"name\" size=\"sm\" />\n          } @else {\n            <span aria-hidden=\"true\">{{ group.label().charAt(0) }}</span>\n          }\n        </button>\n        <span class=\"nl-titles\">\n          <span class=\"nl-title\">{{ group.label() }}</span>\n          <span class=\"nl-sub\">{{ entryCountText() }}</span>\n        </span>\n      } @else {\n        <span class=\"nl-titles\">\n          @if (eyebrow(); as e) {\n            <span class=\"nl-eyebrow\">{{ e }}</span>\n          }\n          @if (heading(); as h) {\n            <span class=\"nl-heading\">{{ h }}</span>\n          }\n        </span>\n      }\n\n      <button\n        type=\"button\"\n        class=\"nl-close\"\n        [attr.aria-label]=\"closeLabel()\"\n        (click)=\"close()\"\n      >\n        <fold-icon name=\"close\" size=\"md\" />\n      </button>\n    </header>\n\n    <div\n      class=\"nl-body\"\n      (pointerdown)=\"onPointerDown($event)\"\n      (pointerup)=\"onPointerUp($event)\"\n    >\n      <!-- La grille porte les DEUX niveaux : un groupe ouvert sort de la\n           grille et couvre ce corps, sans que rien ne bouge dans le DOM. -->\n      <div class=\"nl-grid\" [style.--nav-cols]=\"resolvedCols()\">\n        <ng-content />\n      </div>\n    </div>\n\n    <div class=\"nl-foot\">\n      <ng-content select=\"[footer]\" />\n    </div>\n\n    <!-- Les deux crans de profondeur. `aria-hidden` : la région vive dit la\n         même chose en mots, et un lecteur d'écran n'a que faire de deux\n         pastilles. -->\n    <div class=\"nl-dots\" aria-hidden=\"true\">\n      <span class=\"nl-dot\" [class.is-on]=\"level() === 1\"></span>\n      <span class=\"nl-dot\" [class.is-on]=\"level() === 2\"></span>\n    </div>\n\n    <!-- La descente est MUETTE sans ceci : l'animation ne compense rien. -->\n    <p class=\"nl-live\" aria-live=\"polite\">{{ announcement() }}</p>\n  </div>\n}\n","import { Component, booleanAttribute, input } from \"@angular/core\";\n\n/**\n * `<fold-hero-card>` — a prominent header **card** (bordered surface). Same base\n * as {@link FoldCardComponent} (surface + border + radius + padding); lay the\n * content out inside however you like and project it via `<ng-content>`. For a\n * full-bleed, borderless page splash use `<fold-hero-section>` instead.\n *\n * Two orthogonal axes decide the look — a **base surface** and an optional\n * decorative **accent** painted on top of it (so any base can carry any accent):\n *\n * **`surface`** — the base fill:\n * - `card` (default) — the standard raised card (`surface-card`).\n * - `sunken` — the deep container tint (`surface-sunken` + fainter border).\n * - `primary` — a solid primary fill; text flips to `on-primary`.\n *\n * **`accent`** — a transparent gradient + glow overlay:\n * - `none` (default) — no overlay.\n * - `subtle` — a faint diagonal wash toward the deep tint + a soft corner glow.\n * - `gradient` — a primary-tinted wash + primary border + a stronger corner glow.\n *\n * **`accentBar`** — orthogonal: a primary accent bar down the left edge.\n *\n * ```html\n * <fold-hero-card surface=\"sunken\" accent=\"subtle\" accentBar>…</fold-hero-card>\n * <fold-hero-card accent=\"gradient\">…</fold-hero-card>\n * ```\n *\n * @selector `fold-hero-card`\n */\n@Component({\n  selector: \"fold-hero-card\",\n  standalone: true,\n  host: {\n    \"[class.s-sunken]\": \"surface() === 'sunken'\",\n    \"[class.s-primary]\": \"surface() === 'primary'\",\n    // a solid primary ground is an accent surface: auto-invert the content too.\n    \"[attr.data-surface]\": \"surface() === 'primary' ? 'accent' : null\",\n    \"[class.a-subtle]\": \"accent() === 'subtle'\",\n    \"[class.a-gradient]\": \"accent() === 'gradient'\",\n    \"[class.has-bar]\": \"accentBar()\",\n    \"[class.p-sm]\": \"padding() === 'sm'\",\n    \"[class.p-md]\": \"padding() === 'md'\",\n  },\n  templateUrl: \"./hero-card.component.html\",\n  styleUrl: \"./hero-card.component.scss\",\n})\nexport class FoldHeroCardComponent {\n  /** Base fill — `card` (default) · `sunken` (deep tint) · `primary` (solid fill). */\n  readonly surface = input<\"card\" | \"sunken\" | \"primary\">(\"card\");\n  /** Decorative overlay — `none` (default) · `subtle` (diagonal + glow) · `gradient` (primary wash + glow). */\n  readonly accent = input<\"none\" | \"subtle\" | \"gradient\">(\"none\");\n  /** Inner padding — `lg` (default) · `md` · `sm`. */\n  readonly padding = input<\"sm\" | \"md\" | \"lg\">(\"lg\");\n  /** Add a primary accent bar down the left edge (composable with any surface). */\n  readonly accentBar = input(false, { transform: booleanAttribute });\n}\n","<ng-content />\n","import { Directive, TemplateRef, inject, input } from \"@angular/core\";\n\n/**\n * Marks an `<ng-template>` as the cell renderer for a column key inside\n * `<fold-data-table>`:\n *\n * ```html\n * <ng-template foldCell=\"status\" let-row let-i=\"index\"> … </ng-template>\n * ```\n *\n * The template context is `{ $implicit: row, index }`. Rows are typed via the\n * table's `[rows]`; the projected template's `let-row` is untyped by design (a\n * generic content-projected template can't carry the row type without heavy\n * machinery), so annotate through the parent component's typed helper methods.\n */\n@Directive({ selector: \"ng-template[foldCell]\", standalone: true })\nexport class FoldDataTableCellDirective {\n  /** The column `key` this template renders. */\n  readonly foldCell = input.required<string>();\n  readonly template = inject(TemplateRef);\n}\n","import { Directive, TemplateRef, inject } from \"@angular/core\";\n\n/**\n * Marks the `<ng-template>` that renders a whole row as a **custom mobile card**\n * inside `<fold-data-table mobileLayout=\"custom\">`:\n *\n * ```html\n * <ng-template foldRowCard let-row let-i=\"index\"> … </ng-template>\n * ```\n *\n * The template context is `{ $implicit: row, index }`. When `mobileLayout` is\n * `\"custom\"`, the table hides on narrow screens and this template renders once\n * per row instead of the auto label/value stack — the parent owns the mobile\n * presentation entirely (including any interactions it wants inside the card).\n *\n * As with cell templates, `let-row` is untyped by design — annotate through the\n * parent component's typed helpers.\n */\n@Directive({ selector: \"ng-template[foldRowCard]\", standalone: true })\nexport class FoldDataTableRowCardDirective {\n  readonly template = inject(TemplateRef);\n}\n","import { Directive, TemplateRef, inject } from \"@angular/core\";\n\n/**\n * Marks the `<ng-template>` that renders a row's **detail drawer**, opened in\n * place under the row it belongs to:\n *\n * ```html\n * <ng-template foldRowDetail let-row let-i=\"index\"> … </ng-template>\n * ```\n *\n * The template context is `{ $implicit: row, index }`.\n *\n * Its presence is what turns the feature on: the table grows a trailing toggle\n * column, and each row can open a full-width drawer beneath itself. Nothing to\n * enable, nothing to configure — a table with no detail template behaves\n * exactly as before.\n *\n * **In place, and not elsewhere.** A drawer keeps the list under the reader's\n * eyes: they opened a row to look at one thing, not to leave the place they\n * spent time finding. That is also why the drawer lives inside the CARD on a\n * narrow screen rather than falling back to a panel — same promise, same\n * gesture, whatever the width.\n *\n * As with cell templates, `let-row` is untyped by design — annotate through the\n * parent component's typed helpers.\n */\n@Directive({ selector: \"ng-template[foldRowDetail]\", standalone: true })\nexport class FoldDataTableRowDetailDirective {\n  readonly template = inject(TemplateRef);\n}\n","import { Directive, TemplateRef, inject } from \"@angular/core\";\n\n/**\n * Marks the `<ng-template>` that renders a row's **note** — a full-width line\n * that sits under its row and is **always visible**:\n *\n * ```html\n * <fold-data-table [rowNote]=\"isLate\" …>\n *   <ng-template foldRowNote let-row let-i=\"index\">\n *     <fold-callout variant=\"warning\">…</fold-callout>\n *   </ng-template>\n * </fold-data-table>\n * ```\n *\n * The template context is `{ $implicit: row, index }`.\n *\n * **A note is not a drawer.** {@link FoldDataTableRowDetailDirective} hides\n * something until asked and grows a toggle column to ask with; a note hides\n * nothing, so there is nothing to reveal, no chevron, and no `aria-expanded`.\n * Reach for a note when the row's own cells cannot hold what must be read at\n * the same moment as the row — a warning that comes with the action answering\n * it, a refusal and its reason.\n *\n * 🔴 **It takes TWO halves, and the second is not ceremony.** The template says\n * *what* a note looks like; the `rowNote` predicate says *which* rows have one.\n * Without the predicate every row would emit a `<tr>` — empty for most of them,\n * and an empty row is not invisible: a screen reader walks into it and\n * announces a blank line per record. The predicate is what keeps the table\n * honest about how many rows it has.\n *\n * As with cell templates, `let-row` is untyped by design — annotate through the\n * parent component's typed helpers.\n */\n@Directive({ selector: \"ng-template[foldRowNote]\", standalone: true })\nexport class FoldDataTableRowNoteDirective {\n  readonly template = inject(TemplateRef);\n}\n","/**\n * Roving-tabindex DOM helpers for `fold-data-table` body rows — pure functions\n * that move focus between `<tr>` siblings, so the component's keydown handler\n * stays thin and they are unit-testable without a component fixture.\n */\n\n/**\n * Is this element part of the roving group?\n *\n * A body row carries `tabindex`; a detail drawer does not. Without this test,\n * an arrow key landing on an open drawer would call `focus()` on something that\n * cannot take it — focus would stay put and the navigation would appear to jam\n * on exactly the rows the reader had opened.\n */\nfunction navigable(node: Element | null): node is HTMLElement {\n  return node instanceof HTMLElement && node.hasAttribute(\"tabindex\");\n}\n\n/** Focus the adjacent NAVIGABLE row (Arrow Up/Down), skipping any drawer. */\nexport function focusAdjacentRow(\n  from: EventTarget | null,\n  edge: \"nextElementSibling\" | \"previousElementSibling\",\n): void {\n  if (!(from instanceof Element)) {\n    return;\n  }\n  let sibling = from[edge];\n  while (sibling !== null && !navigable(sibling)) {\n    sibling = sibling[edge];\n  }\n  if (navigable(sibling)) {\n    sibling.focus();\n  }\n}\n\n/** Focus the first / last navigable row in the same body (Home / End). */\nexport function focusEdgeRow(\n  from: EventTarget | null,\n  edge: \"firstElementChild\" | \"lastElementChild\",\n): void {\n  if (!(from instanceof Element)) {\n    return;\n  }\n  let target = from.parentElement?.[edge] ?? null;\n  const step =\n    edge === \"firstElementChild\"\n      ? \"nextElementSibling\"\n      : \"previousElementSibling\";\n  while (target !== null && !navigable(target)) {\n    target = target[step];\n  }\n  if (navigable(target)) {\n    target.focus();\n  }\n}\n","import { type Signal, computed, effect, signal } from \"@angular/core\";\n\n/**\n * Dead band (px) between folding and unfolding.\n *\n * Wider than any scrollbar: folding makes the content taller, which can bring a\n * scrollbar in and take ~15px of width back — enough to cross a single\n * threshold again and flip forever. A dead band wider than that breaks the\n * loop.\n */\nexport const FOLD_HYSTERESIS = 32;\n\n/**\n * A hysteretic \"is it narrow?\" signal, driven by a measured width.\n *\n * Extracted on its second consumer — `fold-nav-layout` folds its rail this way,\n * `fold-data-table` switches to cards the same way, and both have the same\n * scrollbar feedback loop. A plain `width() <= threshold` does not: it flickers\n * at the boundary, and the flicker is the bug, not the threshold.\n *\n * Call it in an injection context (the `effect` needs one). Reads `0` as \"not\n * yet measured\" and stays wide, which is the SSR-correct first paint — the same\n * convention `observeElementWidth` uses.\n *\n * @param width a live width signal, typically `observeElementWidth()`.\n * @param threshold the fold point in px; may itself be a signal (an `input`).\n */\nexport function foldAt(\n  width: Signal<number>,\n  threshold: Signal<number> | number,\n): Signal<boolean> {\n  const point =\n    typeof threshold === \"number\" ? computed(() => threshold) : threshold;\n  const folded = signal(false);\n  effect(() => {\n    const w = width();\n    if (w === 0) {\n      return;\n    }\n    const fold = point();\n    if (!folded() && w <= fold) {\n      folded.set(true);\n    } else if (folded() && w > fold + FOLD_HYSTERESIS) {\n      folded.set(false);\n    }\n  });\n  return folded.asReadonly();\n}\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  effect,\n  inject,\n  input,\n  isDevMode,\n  model,\n} from \"@angular/core\";\nimport type {\n  FormCheckboxControl,\n  ValidationError,\n} from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\n\n/**\n * `<fold-checkbox>` — the boolean form control. A **native** `<input\n * type=\"checkbox\">` (so keyboard, focus, the `checkbox` role, form submission\n * and `indeterminate` all come for free) is visually replaced by a tokenised\n * box + check/dash mark: best-in-class semantics with full visual control.\n *\n * Drive it standalone with `[(checked)]` / `(checkedChange)`, or bind a signal\n * form field with `[formField]` (it implements `FormCheckboxControl`, whose\n * value member is `checked` — not `value` — so the field's value **is** the\n * checked state; `disabled`, `touched` and `errors` are wired by `FormField`).\n * `indeterminate` renders the mixed state\n * (e.g. a \"select all\" over a partial selection); it is a visual cue only —\n * clicking a mixed box checks it, as natively.\n *\n * Accessible by construction: the box is decorative, the native input carries\n * the semantics; a visible `label` wraps the input (click-to-toggle) and names\n * it, otherwise pass `ariaLabel`. Focus-visible ring, `prefers-reduced-motion`\n * and `forced-colors` are all handled.\n *\n * @selector `fold-checkbox`\n *\n * @example\n * ```html\n * <fold-checkbox label=\"Remember me\" [(checked)]=\"remember\" />\n * <fold-checkbox ariaLabel=\"Select row\" [checked]=\"selected\" (checkedChange)=\"toggle()\" />\n * <fold-checkbox label=\"I accept the terms\" required [formField]=\"form.consent\" />\n * ```\n */\n@Component({\n  selector: \"fold-checkbox\",\n  standalone: true,\n  templateUrl: \"./checkbox.component.html\",\n  styleUrl: \"./checkbox.component.scss\",\n  host: { \"[class]\": \"size()\" },\n})\nexport class FoldCheckboxComponent implements FormCheckboxControl {\n  /** Checked state — the signal-forms field value. Bind with `[(checked)]`,\n   *  `(checkedChange)`, or `[formField]`. */\n  readonly checked = model<boolean>(false);\n\n  /** Disabled state — bound automatically by `FormField`. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — set on blur so `FormField` can surface errors. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField` from the field. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n\n  /** Mixed / tri-state visual (native `indeterminate`, a property not attribute). */\n  readonly indeterminate = input(false, { transform: booleanAttribute });\n\n  /** Optional visible label — wraps the box, so clicking it toggles. */\n  readonly label = input<string>();\n  /** Accessible name when there is no visible `label`. */\n  readonly ariaLabel = input<string>();\n  /** Optional helper text shown under the control. */\n  readonly hint = input<string>();\n  /** Show a required marker on the label (and set the native `required`). */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Size preset — `sm` for dense rows/tables, `md` (default) for forms. */\n  readonly size = input<\"sm\" | \"md\">(\"md\");\n\n  /** Unique, SSR-safe id for label + message association. */\n  readonly inputId = inject(FoldIdService).next(\"fold-checkbox\");\n\n  /** The message under the control: the first error once touched, else the hint. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n  protected readonly message = computed<string | null>(\n    () => this.errorMessage() ?? this.hint() ?? null,\n  );\n\n  /** `aria-describedby` target: the error when shown, else the hint, else none. */\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  constructor() {\n    // Dev guard: a checkbox with no visible label and no ariaLabel has no\n    // accessible name — a hard a11y failure that is easy to miss.\n    effect(() => {\n      if (!isDevMode()) {\n        return;\n      }\n      if (!this.label() && !this.ariaLabel()) {\n        console.warn(\n          \"[fold-checkbox] has no accessible name: set `label` or `ariaLabel`.\",\n        );\n      }\n    });\n  }\n\n  /** Native change → sync the model (also fires the auto `checkedChange`). */\n  onChange(event: Event): void {\n    const target = event.target;\n    if (target instanceof HTMLInputElement) {\n      this.checked.set(target.checked);\n    }\n  }\n\n  protected onBlur(): void {\n    this.touched.set(true);\n  }\n}\n","<label class=\"cb\" [class.is-disabled]=\"disabled()\">\n  <input\n    #native\n    type=\"checkbox\"\n    class=\"cb-native\"\n    [id]=\"inputId\"\n    [checked]=\"checked()\"\n    [indeterminate]=\"indeterminate()\"\n    [disabled]=\"disabled()\"\n    [required]=\"required()\"\n    [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n    [attr.aria-describedby]=\"describedBy()\"\n    [attr.aria-invalid]=\"errorMessage() ? true : null\"\n    (change)=\"onChange($event)\"\n    (blur)=\"onBlur()\"\n  />\n  <span class=\"cb-box\" aria-hidden=\"true\">\n    <svg class=\"cb-mark cb-check\" viewBox=\"0 0 16 16\" fill=\"none\">\n      <path\n        d=\"M3.5 8.5l3 3 6-6.5\"\n        stroke=\"currentColor\"\n        stroke-width=\"2\"\n        stroke-linecap=\"round\"\n        stroke-linejoin=\"round\"\n      />\n    </svg>\n    <svg class=\"cb-mark cb-dash\" viewBox=\"0 0 16 16\" fill=\"none\">\n      <path\n        d=\"M4 8h8\"\n        stroke=\"currentColor\"\n        stroke-width=\"2\"\n        stroke-linecap=\"round\"\n      />\n    </svg>\n  </span>\n  @if (label(); as text) {\n    <span class=\"cb-label\"\n      >{{ text }}\n      @if (required()) {\n        <span class=\"cb-req\" aria-hidden=\"true\"> *</span>\n      }\n    </span>\n  }\n</label>\n@if (message(); as msg) {\n  <span\n    class=\"cb-msg\"\n    [class.is-error]=\"errorMessage()\"\n    [id]=\"errorMessage() ? inputId + '-error' : inputId + '-hint'\"\n    >{{ msg }}</span\n  >\n}\n","import { InjectionToken, type Provider } from \"@angular/core\";\n\n/**\n * Every user-facing / accessible string {@link FoldDataTableComponent} renders\n * that isn't supplied per row. Parameterised strings are functions so a locale\n * can reword, not just translate. All defaults are English — a non-English app\n * overrides them once via {@link provideFoldDataTableLabels}, or per instance\n * via the `labels` input. (Per-row names come from the `selectionLabel` input;\n * {@link FoldDataTableLabels.selectRow} is only the fallback when it's unset.)\n */\nexport interface FoldDataTableLabels {\n  /** `aria-label` of the select-all header checkbox. */\n  readonly selectAll: string;\n  /** Fallback `aria-label` of a row checkbox (used when no `selectionLabel`). */\n  readonly selectRow: string;\n  /** A sortable header's button `aria-label`, e.g. `(\"Name\") => \"Sort by Name\"`. */\n  readonly sortBy: (column: string) => string;\n  /** The loading spinner's accessible label. */\n  readonly loading: string;\n  /** A closed row's toggle `aria-label` — opens the detail drawer. */\n  readonly expandRow: string;\n  /** An open row's toggle `aria-label` — closes it. */\n  readonly collapseRow: string;\n}\n\n/** The English defaults — the base every override merges onto. */\nexport const FOLD_DATA_TABLE_DEFAULT_LABELS: FoldDataTableLabels = {\n  selectAll: \"Select all rows\",\n  selectRow: \"Select row\",\n  sortBy: (column) => `Sort by ${column}`,\n  loading: \"Loading…\",\n  expandRow: \"Show details\",\n  collapseRow: \"Hide details\",\n};\n\n/** App-wide data-table labels; defaults to English. */\nexport const FOLD_DATA_TABLE_LABELS = new InjectionToken<FoldDataTableLabels>(\n  \"FOLD_DATA_TABLE_LABELS\",\n  { factory: () => FOLD_DATA_TABLE_DEFAULT_LABELS },\n);\n\n/**\n * Provide app-wide data-table labels once at bootstrap. Partial — any key you\n * omit keeps its English default.\n *\n * @example\n * ```ts\n * providers: [\n *   provideFoldDataTableLabels({\n *     selectAll: \"Tout sélectionner\",\n *     sortBy: (c) => `Trier par ${c}`,\n *   }),\n * ];\n * ```\n */\nexport function provideFoldDataTableLabels(\n  labels: Partial<FoldDataTableLabels>,\n): Provider {\n  return {\n    provide: FOLD_DATA_TABLE_LABELS,\n    useValue: { ...FOLD_DATA_TABLE_DEFAULT_LABELS, ...labels },\n  };\n}\n","import {\n  Component,\n  type TemplateRef,\n  booleanAttribute,\n  numberAttribute,\n  computed,\n  contentChild,\n  contentChildren,\n  effect,\n  inject,\n  input,\n  isDevMode,\n  model,\n  output,\n  signal,\n} from \"@angular/core\";\nimport { NgClass, NgTemplateOutlet } from \"@angular/common\";\nimport { FoldDataTableCellDirective } from \"./data-table-cell.directive\";\nimport { FoldDataTableRowCardDirective } from \"./data-table-row-card.directive\";\nimport { FoldDataTableRowDetailDirective } from \"./data-table-row-detail.directive\";\nimport { FoldDataTableRowNoteDirective } from \"./data-table-row-note.directive\";\nimport { focusAdjacentRow, focusEdgeRow } from \"./data-table-keyboard\";\nimport { observeElementWidth } from \"../../../dom/observe-element-width\";\nimport { foldAt } from \"../../../dom/fold-at\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldSpinnerComponent } from \"../../foundations/spinner/spinner.component\";\nimport { FoldCheckboxComponent } from \"../../forms/checkbox/checkbox.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport type {\n  FoldTableColumn,\n  FoldTableEmpty,\n  FoldTableSort,\n  FoldTableRowNote,\n  FoldTableTone,\n} from \"./data-table.types\";\nimport {\n  FOLD_DATA_TABLE_LABELS,\n  type FoldDataTableLabels,\n} from \"./data-table-labels\";\n\n/** Default container width (px) at or below which the card layout takes over. */\nconst CARDS_AT = 600;\n\n/**\n * `fold-data-table` — a controlled, presentational roster table. The parent\n * supplies already-paged/sorted `rows`, a `columns` definition, and a\n * `<ng-template foldCell=\"<key>\">` per column for the cell content; the table\n * owns the chrome (sticky sortable header, row tone accents, focus/click, the\n * mobile card layout, the loading + empty states).\n *\n * Selection is a two-way model: bind `[(selected)]` with a set of row keys and\n * the table writes the next set back on any checkbox toggle — it renders the\n * checkbox column, the header select-all (with an indeterminate state over the\n * current rows), and the selected-row tint. Bind it one-way (`[selected]`) to\n * stay fully controlled.\n *\n * A row can open a **detail drawer in place**: project a\n * `<ng-template foldRowDetail let-row>` and the table grows a trailing toggle\n * column, opening the drawer beneath its row (inside the card, in the card\n * layout). Bind `[(expanded)]` with a set of row keys to control it, or let the\n * table own it. `expandMode` decides whether opening one closes the others —\n * `single` by default, because a drawer is usually read one at a time.\n *\n * The narrow-screen behaviour is the parent's choice, not an imposed one, via\n * `mobileLayout`: `scroll` (default — stay tabular, scroll horizontally),\n * `auto-cards` (each row stacks into a label/value card), or `custom` (the\n * parent supplies `<ng-template foldRowCard let-row>` and owns the card).\n *\n * Accessible by construction: the first column renders as `<th scope=\"row\">`\n * (screen readers announce each row by its identity cell), the sort direction\n * rides on `aria-sort` (the icon is decorative), clickable rows answer Enter and\n * Space and form a single roving-tabindex group (Arrow/Home/End move between\n * rows), and `caption` gives the table a visually-hidden name.\n *\n * Generic over the row type `T` so `rowKey`/`rowTone`/`rowClick` stay typed.\n * Cell templates are untyped (`let-row` is `any`) — render through the parent's\n * typed helpers.\n */\n@Component({\n  selector: \"fold-data-table\",\n  standalone: true,\n  imports: [\n    NgClass,\n    NgTemplateOutlet,\n    FoldIconComponent,\n    FoldSpinnerComponent,\n    FoldCheckboxComponent,\n  ],\n  templateUrl: \"./data-table.component.html\",\n  styleUrl: \"./data-table.component.scss\",\n})\nexport class FoldDataTableComponent<T> {\n  readonly columns = input.required<readonly FoldTableColumn<T>[]>();\n  readonly rows = input.required<readonly T[]>();\n  /** Stable row identity — defaults to the row index. */\n  readonly rowKey = input<(row: T, index: number) => string | number>();\n  /** Optional per-row semantic tone (left accent + tint). */\n  readonly rowTone = input<(row: T) => FoldTableTone>();\n  /**\n   * Which rows carry a **note** — the always-visible line a `foldRowNote`\n   * template draws beneath its row.\n   *\n   * Both halves are required for anything to render: this says *which* rows,\n   * the template says *what*. See {@link FoldDataTableRowNoteDirective} for why\n   * a row without a note must emit no `<tr>` at all.\n   */\n  readonly rowNote = input<FoldTableRowNote<T>>();\n  readonly sort = input<FoldTableSort | null>(null);\n  readonly empty = input<FoldTableEmpty>();\n  /** While `true`, shows a spinner instead of the empty state — a table that\n   *  is fetching reads as \"loading\", never as \"no data\". */\n  readonly loading = input(false, { transform: booleanAttribute });\n  /** Accessible table name, rendered as a visually-hidden `<caption>`. Set it\n   *  when the surrounding context does not already name the table for AT. */\n  readonly caption = input<string>();\n  /**\n   * Makes rows focusable + clickable (emits `rowClick`).\n   *\n   * It covers **both layouts**: a wide `<tr>` and a narrow card answer the same\n   * click, the same Enter/Space, and rove under the same arrow keys. Before\n   * 0.26.1 it reached the row only, so a table that opened a detail from\n   * `rowClick` went inert the moment its container narrowed — silently, since\n   * a card that ignores a tap throws nothing. (Fixed in 0.26.1.)\n   */\n  readonly clickable = input(false, { transform: booleanAttribute });\n  readonly zebra = input(false, { transform: booleanAttribute });\n  readonly hover = input(true, { transform: booleanAttribute });\n  /**\n   * How the table presents itself when its CONTAINER is too narrow.\n   *\n   * - `scroll` (default) — stay tabular; the body scrolls horizontally.\n   * - `cards` — one card per row. The content is the projected `foldRowCard`\n   *   template if there is one, otherwise a default label/value card.\n   *\n   * @see cardsAt for the width that decides.\n   */\n  readonly narrowLayout = input<\"scroll\" | \"cards\">(\"scroll\");\n\n  /** Container width (px) at or below which `cards` takes over. */\n  readonly cardsAt = input(CARDS_AT, { transform: numberAttribute });\n\n  /**\n   * Chrome around a projected `foldRowCard`.\n   *\n   * - `shell` (default) — the card wears the library's outline, radius, shadow,\n   *   tone rail and selected state, so a consumer supplies content and nothing\n   *   else.\n   * - `none` — a bare container; the parent takes everything back, including\n   *   the selection checkbox. This reproduces what `mobileLayout=\"custom\"`\n   *   rendered before the shell existed.\n   */\n  readonly rowCardChrome = input<\"shell\" | \"none\">(\"shell\");\n\n  /**\n   * @deprecated Use {@link narrowLayout} plus a projected `foldRowCard`.\n   *\n   * `custom` was redundant: projecting the template already said everything.\n   * `scroll` → the default · `auto-cards` → `narrowLayout=\"cards\"` ·\n   * `custom` → `narrowLayout=\"cards\"` + `<ng-template foldRowCard>`.\n   * Removed before 1.0.\n   */\n  readonly mobileLayout = input<\"scroll\" | \"auto-cards\" | \"custom\">(\"scroll\");\n  /** Row density — `compact` tightens padding for dense rosters. */\n  readonly density = input<\"comfortable\" | \"compact\">(\"comfortable\");\n  /** Pin the identity column while the body scrolls horizontally (wide tables). */\n  readonly stickyFirst = input(false, { transform: booleanAttribute });\n\n  /** Renders the checkbox column + header select-all. */\n  readonly selectable = input(false, { transform: booleanAttribute });\n  /**\n   * Selected row keys, as a **two-way model** — bind `[(selected)]` and the\n   * table writes the next set back on any toggle (it never mutates the set in\n   * place). One-way `[selected]` stays fully controlled. The one source of\n   * selection: there is no separate change output.\n   */\n  readonly selected = model<ReadonlySet<string | number>>(new Set());\n  /** Accessible label for a row's checkbox, e.g. `(row) => row.name`. */\n  readonly selectionLabel = input<(row: T) => string>();\n  /** Per-instance label overrides (merged over the app-wide / English defaults). */\n  readonly labels = input<Partial<FoldDataTableLabels>>();\n  /**\n   * The open rows, by key. A two-way model, exactly like `selected`: bind\n   * `[(expanded)]` and the table writes the next set on every toggle, or bind\n   * one-way to stay fully controlled.\n   */\n  readonly expanded = model<ReadonlySet<string | number>>(new Set());\n  /**\n   * Whether opening a row closes the others.\n   *\n   * `single` by default — a drawer is read, not compared, and two open at once\n   * push the rest of the list off the screen for no gain. `multi` when the\n   * drawers ARE the comparison.\n   */\n  readonly expandMode = input<\"single\" | \"multi\">(\"single\");\n\n  /** Emits the clicked sortable column's `key`. */\n  readonly sortChange = output<string>();\n  readonly rowClick = output<T>();\n\n  /** Key of the row that currently holds the single tab stop (roving tabindex). */\n  private readonly focusedKey = signal<string | number | null>(null);\n  /** The table's OWN width — the box that decides, not the window. */\n  private readonly width = observeElementWidth();\n\n  /**\n   * True while the table's own box is narrow.\n   *\n   * It used to be `matchMedia(\"(max-width: 700px)\")` — the VIEWPORT — and the\n   * mobile CSS repeated the same query. A table in a 480px panel on a 1920px\n   * screen stayed an unreadable table; the same table full-width on a tablet\n   * became cards for no reason. `_tab-bar.scss` states the rule the library\n   * keeps everywhere else: container width is the only axis.\n   *\n   * Hysteretic via the shared `foldAt`: switching to cards makes the content\n   * taller, which can bring a scrollbar in and hand ~15px of width back —\n   * enough to cross the threshold again and flip forever.\n   */\n  protected readonly isNarrow = foldAt(this.width, this.cardsAt);\n  private readonly injectedLabels = inject(FOLD_DATA_TABLE_LABELS);\n\n  /** Effective labels — the app-wide (or English) set, with the `labels` input on top. */\n  protected readonly l = computed<FoldDataTableLabels>(() => ({\n    ...this.injectedLabels,\n    ...this.labels(),\n  }));\n\n  constructor() {\n    // `mobileLayout` is deprecated; say so once, where the author will see it.\n    effect(() => {\n      if (isDevMode() && this.mobileLayout() !== \"scroll\") {\n        console.warn(\n          `[fold-data-table] \\`mobileLayout=\"${this.mobileLayout()}\"\\` is deprecated. ` +\n            `Use narrowLayout=\"cards\"` +\n            (this.mobileLayout() === \"custom\"\n              ? \" with a projected <ng-template foldRowCard>.\"\n              : \".\") +\n            \" It is removed before 1.0.\",\n        );\n      }\n    });\n\n    // Dev guard: a column that neither projects a template nor carries a\n    // `value` renders an empty cell — silently, and identically for every row,\n    // which reads as missing DATA rather than as a missing definition.\n    effect(() => {\n      if (!isDevMode()) {\n        return;\n      }\n      for (const column of this.columns()) {\n        if (\n          column.value === undefined &&\n          this.cellTemplate(column.key) === null\n        ) {\n          console.warn(\n            `[fold-data-table] column \"${column.key}\" has neither a value ` +\n              `accessor nor a <ng-template foldCell=\"${column.key}\">; its cells ` +\n              `render empty.`,\n          );\n        }\n      }\n    });\n\n    // Dev guard: `truncate` clips against the column `width`; without one it\n    // silently won't truncate. Warn so the misuse surfaces at authoring time.\n    effect(() => {\n      if (!isDevMode()) {\n        return;\n      }\n      for (const col of this.columns()) {\n        if (col.truncate && !col.width) {\n          console.warn(\n            `[fold-data-table] column \"${col.key}\" sets truncate but no width; ` +\n              `truncation needs a width to clip against.`,\n          );\n        }\n      }\n    });\n  }\n\n  private readonly cells = contentChildren(FoldDataTableCellDirective);\n  private readonly cellMap = computed(() => {\n    const map = new Map<string, TemplateRef<unknown>>();\n    for (const cell of this.cells()) {\n      map.set(cell.foldCell(), cell.template);\n    }\n    return map;\n  });\n\n  private readonly rowNoteTpl = contentChild(FoldDataTableRowNoteDirective);\n\n  /** The note template, or `null`. Paired with `rowNote` to decide each row. */\n  protected readonly rowNoteTemplate = computed<TemplateRef<unknown> | null>(\n    () => this.rowNoteTpl()?.template ?? null,\n  );\n\n  private readonly rowDetail = contentChild(FoldDataTableRowDetailDirective);\n\n  /** The drawer template, or `null`. Its PRESENCE is the feature switch. */\n  protected readonly rowDetailTemplate = computed<TemplateRef<unknown> | null>(\n    () => this.rowDetail()?.template ?? null,\n  );\n\n  protected readonly expandable = computed(\n    () => this.rowDetailTemplate() !== null,\n  );\n\n  /** Stable prefix for the drawer ids the toggles point at with `aria-controls`. */\n  private readonly uid = inject(FoldIdService).next(\"fold-data-table\");\n\n  protected detailId(row: T, index: number): string {\n    return `${this.uid}-detail-${this.keyOf(row, index)}`;\n  }\n\n  protected isRowExpanded(row: T, index: number): boolean {\n    return this.expanded().has(this.keyOf(row, index));\n  }\n\n  /** Toggles a row's drawer, honouring {@link expandMode}. */\n  protected toggleExpand(row: T, index: number): void {\n    const key = this.keyOf(row, index);\n    const open = this.expanded();\n    if (open.has(key)) {\n      const next = new Set(open);\n      next.delete(key);\n      this.expanded.set(next);\n      return;\n    }\n    this.expanded.set(\n      this.expandMode() === \"single\" ? new Set([key]) : new Set(open).add(key),\n    );\n  }\n\n  private readonly rowCard = contentChild(FoldDataTableRowCardDirective);\n  /**\n   * True while the narrow CARD layout is what renders — the table is not built\n   * at all in that state.\n   *\n   * `auto-cards` used to be a CSS rewrite of the table: the `<tr>` went\n   * `display: block`, its cells `display: flex`, the `<tbody>` `display: flex`.\n   * Changing the `display` of a table element **drops its implicit role**, so\n   * the table stopped being a table without becoming a list, and the `<thead>`\n   * stayed in the tree as orphaned headers. Rendering a real list instead is\n   * the fix; there is nothing left to hide.\n   */\n  protected readonly cardMode = computed(\n    () => this.isNarrow() && this.resolvedNarrowLayout() === \"cards\",\n  );\n\n  /** `narrowLayout`, with the deprecated `mobileLayout` folded in. */\n  private readonly resolvedNarrowLayout = computed<\"scroll\" | \"cards\">(() =>\n    this.mobileLayout() === \"scroll\" ? this.narrowLayout() : \"cards\",\n  );\n\n  /** The column that names the row — `primaryKey`, else the first one. */\n  protected readonly identityColumn = computed<FoldTableColumn<T> | null>(\n    () => {\n      const cols = this.columns();\n      const key = this.primaryKey();\n      return cols.find((c) => c.key === key) ?? cols[0] ?? null;\n    },\n  );\n\n  /**\n   * The small line above the identity: the second column, but only when it is\n   * a `truncate` one — that flag is how a table says \"this is a long, secondary\n   * string\" (a reference, a path), which is exactly what an overline is for.\n   */\n  protected readonly overlineColumn = computed<FoldTableColumn<T> | null>(\n    () => {\n      const rest = this.columns().filter(\n        (c) => c.key !== this.identityColumn()?.key,\n      );\n      const second = rest[0];\n      return second?.truncate === true ? second : null;\n    },\n  );\n\n  /** Everything else, as label/value pairs. */\n  protected readonly gridColumns = computed<readonly FoldTableColumn<T>[]>(\n    () => {\n      const skip = new Set(\n        [this.identityColumn()?.key, this.overlineColumn()?.key].filter(\n          (k): k is string => k !== undefined,\n        ),\n      );\n      return this.columns().filter((c) => !skip.has(c.key));\n    },\n  );\n\n  /** The custom mobile-card template, only when `mobileLayout=\"custom\"`. */\n  readonly rowCardTemplate = computed<TemplateRef<unknown> | null>(\n    () => this.rowCard()?.template ?? null,\n  );\n\n  /**\n   * The toolbar's surface level — the \"weight\" the title bar lends the table.\n   * All four map to fold surface tokens (never a hard-coded colour): `default`\n   * (a subtle header lift), `sunken` / `raised` (a step down / up the elevation\n   * ramp), and `accent` — a brand-filled bar whose projected content\n   * auto-inverts to the on-accent palette per theme (the shared\n   * `[data-surface=\"accent\"]` machinery).\n   */\n  readonly toolbarSurface = input<\"default\" | \"sunken\" | \"raised\" | \"accent\">(\n    \"default\",\n  );\n\n  /** The first column is the identity/primary cell (full-width on mobile). */\n  readonly primaryKey = computed(() => this.columns()[0]?.key ?? \"\");\n\n  /** Total ARIA column count (data columns + the checkbox column). */\n  readonly colCount = computed(\n    () =>\n      this.columns().length +\n      (this.selectable() ? 1 : 0) +\n      (this.expandable() ? 1 : 0),\n  );\n\n  /** Current row keys, in order — the roving-nav anchor set. */\n  private readonly rowKeys = computed(() =>\n    this.rows().map((row, i) => this.keyOf(row, i)),\n  );\n  /** The row that holds the single tab stop: the focused row while it still\n   *  exists, else the first row — so a removed/filtered focus never strands the\n   *  roving group with zero tab stops. */\n  private readonly activeRowKey = computed<string | number | null>(() => {\n    const focused = this.focusedKey();\n    const keys = this.rowKeys();\n    if (focused !== null && keys.includes(focused)) {\n      return focused;\n    }\n    return keys[0] ?? null;\n  });\n\n  cellTemplate(key: string): TemplateRef<unknown> | null {\n    return this.cellMap().get(key) ?? null;\n  }\n\n  /**\n   * What a cell prints when no template claims it.\n   *\n   * Empty rather than `undefined`: a column with neither template nor accessor\n   * is an authoring mistake, and the dev guard says so — the render's job is to\n   * stay quiet, not to print `undefined` in front of a user.\n   */\n  protected cellText(column: FoldTableColumn<T>, row: T): string {\n    const read = column.value;\n    return read === undefined ? \"\" : String(read(row));\n  }\n\n  keyOf(row: T, index: number): string | number {\n    return this.rowKey()?.(row, index) ?? index;\n  }\n\n  toneOf(row: T): FoldTableTone {\n    return this.rowTone()?.(row) ?? null;\n  }\n\n  /**\n   * Does this row draw a note? Both halves must be there — the template and the\n   * predicate. Either alone renders nothing, which is the quiet behaviour a\n   * half-wired table should have.\n   */\n  protected hasNote(row: T, index: number): boolean {\n    return (\n      this.rowNoteTemplate() !== null && (this.rowNote()?.(row, index) ?? false)\n    );\n  }\n\n  isSorted(key: string): boolean {\n    return this.sort()?.key === key;\n  }\n\n  /** The sort icon for a column: a neutral up/down (`expand-all`) when idle, or\n   *  the active direction chevron. Decorative — `aria-sort` on the `<th>` is the\n   *  accessible carrier, so these icons stay `aria-hidden` (fold-icon default). */\n  sortIcon(key: string): FoldIconName {\n    const sort = this.sort();\n    if (sort?.key !== key) {\n      return \"expand-all\";\n    }\n    return sort.dir === \"asc\" ? \"chevron-up\" : \"chevron-down\";\n  }\n\n  ariaSort(key: string): \"ascending\" | \"descending\" | \"none\" {\n    const sort = this.sort();\n    if (sort?.key !== key) {\n      return \"none\";\n    }\n    return sort.dir === \"asc\" ? \"ascending\" : \"descending\";\n  }\n\n  onRowActivate(row: T): void {\n    if (this.clickable()) {\n      this.rowClick.emit(row);\n    }\n  }\n\n  /* ── selection (controlled) ── */\n\n  isRowSelected(row: T, index: number): boolean {\n    return this.selected().has(this.keyOf(row, index));\n  }\n\n  /** All current rows selected (drives the header checkbox `checked`). */\n  readonly allSelected = computed(\n    () =>\n      this.rows().length > 0 &&\n      this.rows().every((row, i) => this.selected().has(this.keyOf(row, i))),\n  );\n\n  /** Some — but not all — current rows selected (header `indeterminate`). */\n  readonly someSelected = computed(\n    () =>\n      !this.allSelected() &&\n      this.rows().some((row, i) => this.selected().has(this.keyOf(row, i))),\n  );\n\n  toggleRow(row: T, index: number): void {\n    const next = new Set(this.selected());\n    const key = this.keyOf(row, index);\n    if (next.has(key)) {\n      next.delete(key);\n    } else {\n      next.add(key);\n    }\n    this.selected.set(next);\n  }\n\n  /** Select-all toggles every current row; if all are already in, clears them. */\n  toggleAll(): void {\n    const next = new Set(this.selected());\n    const select = !this.allSelected();\n    this.rows().forEach((row, i) => {\n      const key = this.keyOf(row, i);\n      if (select) {\n        next.add(key);\n      } else {\n        next.delete(key);\n      }\n    });\n    this.selected.set(next);\n  }\n\n  labelFor(row: T): string {\n    return this.selectionLabel()?.(row) ?? this.l().selectRow;\n  }\n\n  /* ── roving-tabindex keyboard navigation over clickable rows ── */\n\n  /** The single tab stop: the focused (or fallback first) row. */\n  rowTabIndex(row: T, index: number): 0 | -1 | null {\n    if (!this.clickable()) {\n      return null;\n    }\n    const active = this.activeRowKey();\n    return active !== null && this.keyOf(row, index) === active ? 0 : -1;\n  }\n\n  onRowFocus(row: T, index: number): void {\n    this.focusedKey.set(this.keyOf(row, index));\n  }\n\n  onRowKeydown(event: KeyboardEvent, row: T): void {\n    // Only when the row itself holds focus — never when the key bubbled up from\n    // an inner control (a link, a button, the selection checkbox), which owns it.\n    if (event.target !== event.currentTarget) {\n      return;\n    }\n    switch (event.key) {\n      case \"Enter\":\n        this.onRowActivate(row);\n        break;\n      case \" \":\n        this.onRowActivate(row);\n        event.preventDefault();\n        break;\n      case \"ArrowDown\":\n        focusAdjacentRow(event.currentTarget, \"nextElementSibling\");\n        event.preventDefault();\n        break;\n      case \"ArrowUp\":\n        focusAdjacentRow(event.currentTarget, \"previousElementSibling\");\n        event.preventDefault();\n        break;\n      case \"Home\":\n        focusEdgeRow(event.currentTarget, \"firstElementChild\");\n        event.preventDefault();\n        break;\n      case \"End\":\n        focusEdgeRow(event.currentTarget, \"lastElementChild\");\n        event.preventDefault();\n        break;\n      default:\n        break;\n    }\n  }\n}\n","<div\n  class=\"folddt-wrap\"\n  [class.folddt--zebra]=\"zebra()\"\n  [class.folddt--hover]=\"hover()\"\n  [class.folddt--narrow]=\"isNarrow()\"\n  [class.folddt--compact]=\"density() === 'compact'\"\n  [class.folddt--sticky-first]=\"stickyFirst()\"\n  [class.folddt--select]=\"selectable()\"\n>\n  <div\n    class=\"folddt-toolbar\"\n    [class.folddt-toolbar--sunken]=\"toolbarSurface() === 'sunken'\"\n    [class.folddt-toolbar--raised]=\"toolbarSurface() === 'raised'\"\n    [class.folddt-toolbar--accent]=\"toolbarSurface() === 'accent'\"\n    [attr.data-surface]=\"toolbarSurface() === 'accent' ? 'accent' : null\"\n  >\n    <ng-content select=\"[foldToolbar]\" />\n  </div>\n  @if (!cardMode()) {\n    <div class=\"folddt-scroll\">\n      <table class=\"folddt\" [attr.aria-colcount]=\"colCount()\">\n        @if (caption(); as cap) {\n          <caption class=\"folddt-caption\">\n            {{\n              cap\n            }}\n          </caption>\n        }\n        <thead>\n          <tr>\n            @if (selectable()) {\n              <th scope=\"col\" class=\"folddt-select-h\">\n                <fold-checkbox\n                  size=\"sm\"\n                  [ariaLabel]=\"l().selectAll\"\n                  [checked]=\"allSelected()\"\n                  [indeterminate]=\"someSelected()\"\n                  (checkedChange)=\"toggleAll()\"\n                />\n              </th>\n            }\n            @for (col of columns(); track col.key) {\n              <th\n                scope=\"col\"\n                [class.is-primary-h]=\"col.key === primaryKey()\"\n                [style.width]=\"col.width || null\"\n                [attr.aria-sort]=\"col.sortable ? ariaSort(col.key) : null\"\n              >\n                @if (col.sortable) {\n                  <button\n                    type=\"button\"\n                    class=\"folddt-th-sort\"\n                    [class.is-numeric]=\"col.numeric\"\n                    [class.right]=\"col.align === 'right'\"\n                    [class.center]=\"col.align === 'center'\"\n                    [attr.aria-label]=\"l().sortBy(col.label)\"\n                    (click)=\"sortChange.emit(col.key)\"\n                  >\n                    <span>{{ col.label }}</span>\n                    <fold-icon\n                      class=\"folddt-arrow\"\n                      [class.on]=\"isSorted(col.key)\"\n                      [name]=\"sortIcon(col.key)\"\n                      [size]=\"14\"\n                    />\n                  </button>\n                } @else {\n                  <span\n                    class=\"folddt-th-plain\"\n                    [class.is-numeric]=\"col.numeric\"\n                    [class.right]=\"col.align === 'right'\"\n                    [class.center]=\"col.align === 'center'\"\n                    >{{ col.label }}</span\n                  >\n                }\n              </th>\n            }\n            @if (expandable()) {\n              <!-- Une colonne sans nom : son en-tête est vide À DESSEIN, mais\n                   pas muette — le libellé part en texte masqué, sinon la\n                   dernière colonne est annoncée « colonne 8 ». -->\n              <th scope=\"col\" class=\"folddt-expand-h\">\n                <span class=\"folddt-sr\">{{ l().expandRow }}</span>\n              </th>\n            }\n          </tr>\n        </thead>\n        <tbody>\n          @for (row of rows(); track keyOf(row, $index); let i = $index) {\n            @let tone = toneOf(row);\n            <tr\n              class=\"folddt-row\"\n              [class.tone-warning]=\"tone === 'warning'\"\n              [class.tone-alert]=\"tone === 'alert'\"\n              [class.tone-success]=\"tone === 'success'\"\n              [class.clickable]=\"clickable()\"\n              [class.is-selected]=\"selectable() && isRowSelected(row, i)\"\n              [attr.tabindex]=\"rowTabIndex(row, i)\"\n              [attr.aria-selected]=\"selectable() ? isRowSelected(row, i) : null\"\n              (click)=\"onRowActivate(row)\"\n              (focus)=\"onRowFocus(row, i)\"\n              (keydown)=\"onRowKeydown($event, row)\"\n            >\n              @if (selectable()) {\n                <td class=\"folddt-cell folddt-cell--select\">\n                  <fold-checkbox\n                    size=\"sm\"\n                    [ariaLabel]=\"labelFor(row)\"\n                    [checked]=\"isRowSelected(row, i)\"\n                    (click)=\"$event.stopPropagation()\"\n                    (checkedChange)=\"toggleRow(row, i)\"\n                  />\n                </td>\n              }\n              @for (col of columns(); track col.key) {\n                @if (col.key === primaryKey()) {\n                  <th\n                    scope=\"row\"\n                    class=\"folddt-cell is-primary\"\n                    [class.is-numeric]=\"col.numeric\"\n                    [class.right]=\"col.align === 'right'\"\n                    [class.center]=\"col.align === 'center'\"\n                    [class.truncate]=\"col.truncate\"\n                    [ngClass]=\"col.cellClass || ''\"\n                    [attr.data-label]=\"col.label\"\n                  >\n                    @if (cellTemplate(col.key); as cell) {\n                      <ng-container\n                        [ngTemplateOutlet]=\"cell\"\n                        [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\"\n                      />\n                    } @else {\n                      {{ cellText(col, row) }}\n                    }\n                  </th>\n                } @else {\n                  <td\n                    class=\"folddt-cell\"\n                    [class.is-numeric]=\"col.numeric\"\n                    [class.right]=\"col.align === 'right'\"\n                    [class.center]=\"col.align === 'center'\"\n                    [class.truncate]=\"col.truncate\"\n                    [ngClass]=\"col.cellClass || ''\"\n                    [attr.data-label]=\"col.label\"\n                  >\n                    @if (cellTemplate(col.key); as cell) {\n                      <ng-container\n                        [ngTemplateOutlet]=\"cell\"\n                        [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\"\n                      />\n                    } @else {\n                      {{ cellText(col, row) }}\n                    }\n                  </td>\n                }\n              }\n              @if (expandable()) {\n                <td class=\"folddt-cell folddt-cell--expand\">\n                  <button\n                    type=\"button\"\n                    class=\"folddt-expand\"\n                    [attr.aria-expanded]=\"isRowExpanded(row, i)\"\n                    [attr.aria-controls]=\"detailId(row, i)\"\n                    [attr.aria-label]=\"\n                      isRowExpanded(row, i) ? l().collapseRow : l().expandRow\n                    \"\n                    (click)=\"$event.stopPropagation(); toggleExpand(row, i)\"\n                  >\n                    <fold-icon\n                      [name]=\"\n                        isRowExpanded(row, i) ? 'chevron-up' : 'chevron-down'\n                      \"\n                      [size]=\"16\"\n                    />\n                  </button>\n                </td>\n              }\n            </tr>\n            <!-- 🔴 **La note n'est pas un tiroir.** Elle est toujours là, donc\n                 elle ne porte ni bascule, ni `aria-expanded`, ni identifiant à\n                 contrôler : il n'y a rien à révéler. Comme la rangée du tiroir\n                 elle reste hors du groupe à navigation par flèches — un arrêt\n                 de plus pour une ligne qu'on lit sans la parcourir. -->\n            @if (hasNote(row, i)) {\n              <tr class=\"folddt-note-row\">\n                <td class=\"folddt-note\" [attr.colspan]=\"colCount()\">\n                  <ng-container\n                    [ngTemplateOutlet]=\"rowNoteTemplate()!\"\n                    [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\"\n                  />\n                </td>\n              </tr>\n            }\n            @if (expandable() && isRowExpanded(row, i)) {\n              <!-- La rangée du tiroir ne porte PAS de `tabindex` : elle reste\n                   hors du groupe à navigation par flèches, que les helpers\n                   savent enjamber. Une rangée focusable de plus ferait deux\n                   arrêts pour une seule ligne de tableau. -->\n              <tr class=\"folddt-detail-row\">\n                <td\n                  class=\"folddt-detail\"\n                  [id]=\"detailId(row, i)\"\n                  [attr.colspan]=\"colCount()\"\n                >\n                  <ng-container\n                    [ngTemplateOutlet]=\"rowDetailTemplate()!\"\n                    [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\"\n                  />\n                </td>\n              </tr>\n            }\n          }\n        </tbody>\n      </table>\n    </div>\n  } @else {\n    <!-- `role=\"list\"` on a <ul> looks redundant and is not: `list-style: none`\n         strips list semantics in Safari, which is exactly what the styling\n         does. One list, one shell — the projected template supplies the\n         CONTENT, the shell supplies the chrome (outline, tone, selection), so a\n         consumer never reinvents them. -->\n    <ul class=\"folddt-cardlist\" role=\"list\">\n      @for (row of rows(); track keyOf(row, $index); let i = $index) {\n        @let tone = toneOf(row);\n        <!-- A card answers the pointer and the keyboard exactly as the wide\n             row does — same handlers, same roving tabindex. Until 0.26.1 it\n             answered NEITHER: `clickable` reached the <tr> only, so every\n             consumer that opens a detail from `rowClick` lost its primary\n             gesture the moment the viewport narrowed, and nothing failed to\n             say so. A layout switch must not change what a table DOES. -->\n        <li\n          class=\"folddt-card\"\n          [class.is-bare]=\"rowCardChrome() === 'none' && rowCardTemplate()\"\n          [class.tone-warning]=\"tone === 'warning'\"\n          [class.tone-alert]=\"tone === 'alert'\"\n          [class.tone-success]=\"tone === 'success'\"\n          [class.clickable]=\"clickable()\"\n          [class.is-selected]=\"selectable() && isRowSelected(row, i)\"\n          [attr.tabindex]=\"rowTabIndex(row, i)\"\n          [attr.aria-selected]=\"selectable() ? isRowSelected(row, i) : null\"\n          (click)=\"onRowActivate(row)\"\n          (focus)=\"onRowFocus(row, i)\"\n          (keydown)=\"onRowKeydown($event, row)\"\n        >\n          @if (\n            selectable() && !(rowCardChrome() === \"none\" && rowCardTemplate())\n          ) {\n            <fold-checkbox\n              class=\"folddt-card-select\"\n              size=\"sm\"\n              [ariaLabel]=\"labelFor(row)\"\n              [checked]=\"isRowSelected(row, i)\"\n              (click)=\"$event.stopPropagation()\"\n              (checkedChange)=\"toggleRow(row, i)\"\n            />\n          }\n          <div class=\"folddt-card-body\">\n            @if (rowCardTemplate(); as card) {\n              <ng-container\n                [ngTemplateOutlet]=\"card\"\n                [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\"\n              />\n            } @else {\n              @if (overlineColumn(); as col) {\n                <p class=\"folddt-card-overline\">\n                  @if (cellTemplate(col.key); as cell) {\n                    <ng-container\n                      [ngTemplateOutlet]=\"cell\"\n                      [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\"\n                    />\n                  } @else {\n                    {{ cellText(col, row) }}\n                  }\n                </p>\n              }\n              @if (identityColumn(); as col) {\n                <p class=\"folddt-card-identity\">\n                  @if (cellTemplate(col.key); as cell) {\n                    <ng-container\n                      [ngTemplateOutlet]=\"cell\"\n                      [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\"\n                    />\n                  } @else {\n                    {{ cellText(col, row) }}\n                  }\n                </p>\n              }\n              <!-- A <dl> and not a `::before { content: attr(data-label) }`:\n                   generated content is not reliably announced, and a label/value\n                   pair IS a description list. It also lets the values line up in\n                   columns, which matters for amounts. -->\n              <dl class=\"folddt-card-grid\">\n                @for (col of gridColumns(); track col.key) {\n                  <!-- A <div> around each pair is valid inside a <dl> and is\n                       what puts the label ABOVE its value in one grid cell. -->\n                  <div class=\"folddt-card-pair\">\n                    <dt>{{ col.label }}</dt>\n                    <dd\n                      [class.is-numeric]=\"col.numeric\"\n                      [class.right]=\"col.align === 'right'\"\n                    >\n                      @if (cellTemplate(col.key); as cell) {\n                        <ng-container\n                          [ngTemplateOutlet]=\"cell\"\n                          [ngTemplateOutletContext]=\"{\n                            $implicit: row,\n                            index: i,\n                          }\"\n                        />\n                      } @else {\n                        {{ cellText(col, row) }}\n                      }\n                    </dd>\n                  </div>\n                }\n              </dl>\n            }\n            <!-- Dans la carte, la note suit les champs de la ligne : même\n                 promesse qu'en vue large, elle se lit avec la ligne et non\n                 ailleurs. -->\n            <!-- 🔴 The note stops the click. In the wide layout it is a\n                 SEPARATE <tr>, so activating it never activated the row; in a\n                 card it lives inside the clickable shell, and without this a\n                 tap on the note — or on a button the consumer put there —\n                 would also open the row. Same table, same gesture, both\n                 layouts. -->\n            @if (hasNote(row, i)) {\n              <div\n                class=\"folddt-note folddt-note--card\"\n                (click)=\"$event.stopPropagation()\"\n              >\n                <ng-container\n                  [ngTemplateOutlet]=\"rowNoteTemplate()!\"\n                  [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\"\n                />\n              </div>\n            }\n            @if (expandable()) {\n              <button\n                type=\"button\"\n                class=\"folddt-expand folddt-expand--card\"\n                [attr.aria-expanded]=\"isRowExpanded(row, i)\"\n                [attr.aria-controls]=\"detailId(row, i)\"\n                [attr.aria-label]=\"\n                  isRowExpanded(row, i) ? l().collapseRow : l().expandRow\n                \"\n                (click)=\"$event.stopPropagation(); toggleExpand(row, i)\"\n              >\n                <fold-icon\n                  [name]=\"isRowExpanded(row, i) ? 'chevron-up' : 'chevron-down'\"\n                  [size]=\"16\"\n                />\n              </button>\n              @if (isRowExpanded(row, i)) {\n                <!-- DANS la carte, et non sous la liste : c'est la même\n                     promesse que sur la table large — on ouvre une ligne sans\n                     quitter la place qu'on a mis du temps à trouver. -->\n                <div\n                  class=\"folddt-detail\"\n                  [id]=\"detailId(row, i)\"\n                  (click)=\"$event.stopPropagation()\"\n                >\n                  <ng-container\n                    [ngTemplateOutlet]=\"rowDetailTemplate()!\"\n                    [ngTemplateOutletContext]=\"{ $implicit: row, index: i }\"\n                  />\n                </div>\n              }\n            }\n          </div>\n        </li>\n      }\n    </ul>\n  }\n\n  @if (loading()) {\n    <div class=\"folddt-loading\">\n      <fold-spinner [label]=\"l().loading\" />\n    </div>\n  } @else if (rows().length === 0 && empty(); as e) {\n    <div class=\"folddt-empty\">\n      <div class=\"folddt-empty-t\">{{ e.title }}</div>\n      @if (e.subtitle) {\n        <div class=\"folddt-empty-s\">{{ e.subtitle }}</div>\n      }\n    </div>\n  }\n</div>\n","import { Directive, computed, input } from \"@angular/core\";\n\n/** Where the column pins while the main content scrolls past it. */\nexport type FoldStickyColumnAnchor = \"top\" | \"center\" | \"bottom\";\n\n/**\n * `[foldStickyColumn]` — turns its host into a sticky side column: a vertical\n * flex stack that sticks while the main content scrolls past it. Meant for an\n * `<aside>` so the semantics stay (`<aside foldStickyColumn>…</aside>`), dropping\n * the hand-rolled `.sidebar { display:flex; … position:sticky }` boilerplate\n * every page was repeating.\n *\n * Layout only — no template, no wrapper element (it can't add one; grouping\n * still needs the `<aside>`).\n *\n * Anchor + offset are inputs; the rest stays tunable via CSS custom properties\n * so a page keeps control of what varies:\n * - `sticky` (default `top`) — pin to `top`, `center`, or `bottom` of the\n *   scroll viewport.\n * - `stickyOffset` — distance from the pinned edge (a number = px, or any CSS\n *   length). Defaults to `var(--fold-sticky-column-offset, 84px)` (the header\n *   clearance); for `center` it nudges off dead-centre.\n * - `--fold-sticky-column-gap` (default `14px`) — the gap between stacked blocks.\n * - `--fold-sticky-column-position` (default `sticky`) — set to `static` in the\n *   page's own responsive breakpoint to un-stick when the layout stacks.\n *\n * @example\n * ```html\n * <aside foldStickyColumn>…</aside>                    <!-- top, header offset -->\n * <aside foldStickyColumn sticky=\"bottom\">…</aside>\n * <aside foldStickyColumn sticky=\"center\">…</aside>\n * <aside foldStickyColumn [stickyOffset]=\"24\">…</aside>\n * ```\n * ```scss\n * // in the page, at its own stacking breakpoint:\n * @media (max-width: 1040px) {\n *   aside[foldStickyColumn] { --fold-sticky-column-position: static; }\n * }\n * ```\n *\n * @selector `[foldStickyColumn]`\n */\n@Directive({\n  selector: \"[foldStickyColumn]\",\n  standalone: true,\n  host: {\n    \"[style.display]\": '\"flex\"',\n    \"[style.flexDirection]\": '\"column\"',\n    \"[style.alignSelf]\": \"alignSelfStyle()\",\n    \"[style.gap]\": '\"var(--fold-sticky-column-gap, 14px)\"',\n    \"[style.position]\": '\"var(--fold-sticky-column-position, sticky)\"',\n    \"[style.top]\": \"topStyle()\",\n    \"[style.bottom]\": \"bottomStyle()\",\n    \"[style.transform]\": \"transformStyle()\",\n  },\n})\nexport class FoldStickyColumnDirective {\n  /** Which viewport edge (or centre) the column pins to. */\n  readonly sticky = input<FoldStickyColumnAnchor>(\"top\");\n  /** Distance from the pinned edge — a number (px) or any CSS length. */\n  readonly stickyOffset = input<number | string>();\n\n  /** The offset as a CSS length; falls back to the header-clearance var. */\n  private readonly offsetCss = computed(() => {\n    const o = this.stickyOffset();\n    if (o === undefined) {\n      return \"var(--fold-sticky-column-offset, 84px)\";\n    }\n    return typeof o === \"number\" ? `${o}px` : o;\n  });\n\n  protected readonly topStyle = computed(() => {\n    switch (this.sticky()) {\n      case \"bottom\":\n        return \"auto\";\n      case \"center\":\n        return this.stickyOffset() === undefined\n          ? \"50%\"\n          : `calc(50% + ${this.offsetCss()})`;\n      default:\n        return this.offsetCss();\n    }\n  });\n\n  protected readonly bottomStyle = computed(() =>\n    this.sticky() === \"bottom\" ? this.offsetCss() : \"auto\",\n  );\n\n  /** The in-flow start position that makes `sticky` engage from scroll 0.\n   *  `sticky` pins only once the constraint is active at the element's natural\n   *  flow position: `top`/`center` (which pin the top edge, at 0 / 50%) need the\n   *  column at the *top* of its tall row (`start`); `bottom` needs it at the\n   *  *bottom* (`end`), else it starts off-screen and only catches mid-scroll. */\n  protected readonly alignSelfStyle = computed(() =>\n    this.sticky() === \"bottom\" ? \"end\" : \"start\",\n  );\n\n  /** Centre anchoring pins the top edge at 50%, then pulls back half its height. */\n  protected readonly transformStyle = computed(() =>\n    this.sticky() === \"center\" ? \"translateY(-50%)\" : \"none\",\n  );\n}\n","import { Directive, TemplateRef, inject } from \"@angular/core\";\n\nimport type { FoldCalendarBand, FoldCalendarEvent } from \"./types\";\n\n/** What an event template is handed. */\nexport interface FoldCalendarEventContext<T> {\n  /** The event to render — `let-event`. */\n  readonly $implicit: FoldCalendarEvent<T>;\n  /**\n   * The laid-out segment in the month view, `null` in the column views — so a\n   * template can react to a continuation edge where there is one, and does not\n   * have to pretend there is one where there is not.\n   */\n  readonly band: FoldCalendarBand<T> | null;\n}\n\n/**\n * Marks an `<ng-template>` as the renderer for every event chip inside a\n * calendar view, replacing the built-in icon + label + count row:\n *\n * ```html\n * <fold-calendar-month [(month)]=\"month\" [events]=\"events()\">\n *   <ng-template foldCalendarEvent let-event let-band=\"band\">\n *     <fold-avatar [name]=\"event.data.owner\" size=\"xs\" />\n *     <span>{{ event.label }}</span>\n *   </ng-template>\n * </fold-calendar-month>\n * ```\n *\n * `let-event` and `let-band` are **fully typed** under `strictTemplates`: the\n * directive is generic over the same `T` as the events it renders, and its\n * context guard carries that through, so `event.data` is the app's own record\n * with no cast.\n *\n * @selector `ng-template[foldCalendarEvent]`\n */\n@Directive({\n  selector: \"ng-template[foldCalendarEvent]\",\n  standalone: true,\n})\nexport class FoldCalendarEventDirective<T = unknown> {\n  readonly template =\n    inject<TemplateRef<FoldCalendarEventContext<T>>>(TemplateRef);\n\n  /** Teaches the template checker what `let-event` and `let-band` are. */\n  static ngTemplateContextGuard<T>(\n    _directive: FoldCalendarEventDirective<T>,\n    context: unknown,\n  ): context is FoldCalendarEventContext<T> {\n    // Compile-time only — Angular never calls this; the narrowing is the point.\n    return context !== undefined;\n  }\n}\n","/**\n * Plain-date arithmetic for the calendar family — `YYYY-MM-DD` in, `YYYY-MM-DD`\n * out. Framework-free and side-effect-free, so every rule here is unit-testable\n * without a TestBed.\n *\n * ## Why a string and not a `Date`\n * A calendar of all-day spans deals in **plain dates** — \"the 18th of May\",\n * with no instant and no zone. A `Date` is a timestamp, so the moment one\n * crosses a zone or a DST boundary the same span lands on a different cell:\n * `new Date(\"2026-05-18\")` is UTC midnight, which is the *17th* anywhere west\n * of Greenwich. Modelling the domain as `YYYY-MM-DD` removes that entire bug\n * class by construction, and buys three things for free: values compare\n * **lexicographically** (`a <= b` *is* \"on or before\"), they are `===`-equal\n * when they mean the same day (a `Date` never is), and they are already the\n * wire format every backend sends.\n *\n * {@link FoldTimelineNode} keeps a native `Date` on purpose — it plots dated\n * *instants* on a rail, which is the other domain.\n *\n * Arithmetic runs through `Date.UTC`, never local time: UTC has no DST, so a\n * day is always exactly 86 400 000 ms and \"add 1 day\" can never silently\n * return the same date twice (or skip one) around a clock change.\n *\n * ## Supported range\n * `0001-01-01` to `9999-12-31`. The four-digit year is what makes the\n * lexicographic guarantee hold, so it is enforced rather than assumed: years\n * below 1000 are zero-padded (`0099-12-31`, which still sorts correctly), and\n * arithmetic that walks past `9999-12-31` returns a five-digit string that\n * {@link foldIsCalendarDate} rejects — a value that fails the type's own\n * predicate rather than one that silently sorts before every other date.\n */\n\n/**\n * A plain calendar date — an ISO-8601 **date**, `YYYY-MM-DD`, with no time and\n * no zone. Inclusive wherever it bounds a range.\n *\n * A plain `string` alias, deliberately: it is the wire format, so a value read\n * from an API or a `<input type=\"date\">` has to flow in without a cast.\n * {@link foldIsCalendarDate} is the runtime guard, and every component that\n * takes one runs it in dev mode.\n */\nexport type FoldCalendarDate = string;\n\n/** A day of the week, as the anchor a calendar's weeks start on. */\nexport type FoldWeekday = \"mon\" | \"tue\" | \"wed\" | \"thu\" | \"fri\" | \"sat\" | \"sun\";\n\n/** Milliseconds in a UTC day — exact, since UTC has no DST. */\nconst MS_PER_DAY = 86_400_000;\n\n/** `FoldWeekday` → the index `Date.prototype.getUTCDay()` returns for it. */\nconst WEEKDAY_INDEX = {\n  sun: 0,\n  mon: 1,\n  tue: 2,\n  wed: 3,\n  thu: 4,\n  fri: 5,\n  sat: 6,\n} as const satisfies Record<FoldWeekday, number>;\n\n/** `getUTCDay()` index → the `FoldWeekday` it stands for. */\nconst WEEKDAY_AT = [\n  \"sun\",\n  \"mon\",\n  \"tue\",\n  \"wed\",\n  \"thu\",\n  \"fri\",\n  \"sat\",\n] as const satisfies readonly FoldWeekday[];\n\n/**\n * The days a calendar shades as the weekend by default. A separate fact from\n * the week's anchor day: a Sunday-first calendar still rests on Sat/Sun, and a\n * Saturday-first one (much of the Middle East) rests on Fri/Sat while starting\n * on Saturday — which is why the two are different inputs, not one derived\n * from the other.\n */\nexport const FOLD_DEFAULT_WEEKEND_DAYS = [\n  \"sat\",\n  \"sun\",\n] as const satisfies readonly FoldWeekday[];\n\n/** `YYYY-MM-DD`, structurally. Rejects `2026-5-1`, `2026-05-1`, junk suffixes. */\nconst DATE_PATTERN = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n/** Left-pads a 1–2 digit date part to the two digits the format requires. */\nfunction pad2(value: number): string {\n  return value < 10 ? `0${value}` : `${value}`;\n}\n\n/**\n * Left-pads a year to four digits. Year 99 has to render as `0099`, not `99`,\n * or it sorts before every other date and breaks the whole comparison model.\n */\nfunction pad4(value: number): string {\n  if (value >= 1000) {\n    return `${value}`;\n  }\n  if (value >= 100) {\n    return `0${value}`;\n  }\n  return value >= 10 ? `00${value}` : `000${value}`;\n}\n\n/**\n * Whether `value` is a well-formed **and real** plain date. Catches both a\n * malformed shape (`\"2026-5-1\"`) and an impossible day (`\"2026-02-30\"`), the\n * latter by round-tripping through UTC and checking the parts survived.\n */\nexport function foldIsCalendarDate(value: string): boolean {\n  if (!DATE_PATTERN.test(value)) {\n    return false;\n  }\n  const year = Number(value.slice(0, 4));\n  const month = Number(value.slice(5, 7));\n  const day = Number(value.slice(8, 10));\n  if (month < 1 || month > 12 || day < 1 || day > 31) {\n    return false;\n  }\n  const parsed = new Date(Date.UTC(year, month - 1, day));\n  return parsed.getUTCMonth() === month - 1 && parsed.getUTCDate() === day;\n}\n\n/**\n * Epoch milliseconds at UTC midnight of `date` — the internal representation\n * every computation here runs on. A malformed date yields `NaN`, which\n * propagates visibly rather than silently shifting a result.\n */\nfunction toUtcMs(date: FoldCalendarDate): number {\n  const year = Number(date.slice(0, 4));\n  const month = Number(date.slice(5, 7));\n  const day = Number(date.slice(8, 10));\n  const at = new Date(Date.UTC(year, month - 1, day));\n  // `Date.UTC` maps years 0–99 onto 1900–1999; only `setUTCFullYear` undoes it.\n  if (year < 100) {\n    at.setUTCFullYear(year, month - 1, day);\n  }\n  return at.getTime();\n}\n\n/** UTC midnight milliseconds back to `YYYY-MM-DD`. */\nfunction fromUtcMs(ms: number): FoldCalendarDate {\n  const at = new Date(ms);\n  return `${pad4(at.getUTCFullYear())}-${pad2(at.getUTCMonth() + 1)}-${pad2(at.getUTCDate())}`;\n}\n\n/**\n * `date` as a whole number of days since the epoch.\n *\n * The internal currency of anything that sorts, compares or clips a lot of\n * dates. Strings are the right **model** — they are the wire format and they\n * cannot carry a zone — but they are the wrong thing to compare a hundred\n * thousand times: every `foldDaysBetween` in a sort comparator re-parses two\n * strings and builds two `Date`s. Converting once at the door and working on\n * integers is 6× faster on the month grid's hot path, with the same output.\n *\n * Not on the public surface: it is a representation, not a model.\n */\nexport function foldToEpochDay(date: FoldCalendarDate): number {\n  return Math.round(toUtcMs(date) / MS_PER_DAY);\n}\n\n/** The inverse of {@link foldToEpochDay}. */\nexport function foldFromEpochDay(day: number): FoldCalendarDate {\n  return fromUtcMs(day * MS_PER_DAY);\n}\n\n/**\n * Today, read from the **local** clock — the day the user believes it is,\n * which is what a calendar highlights. Pass `now` to pin it (tests, a\n * workspace clock).\n */\nexport function foldToday(now: Date = new Date()): FoldCalendarDate {\n  return foldFromNativeDate(now);\n}\n\n/**\n * A native `Date` read as the plain date it shows on a **local** clock — the\n * inbound bridge, and the one conversion every consumer would otherwise write\n * by hand as `date.toISOString().slice(0, 10)`, which is UTC and therefore off\n * by a day for anyone west of Greenwich after 6pm. That is the exact bug this\n * whole module exists to remove, so the correct form ships with it.\n *\n * Pair with {@link foldToNativeDate} for the way out.\n */\nexport function foldFromNativeDate(date: Date): FoldCalendarDate {\n  return `${pad4(date.getFullYear())}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`;\n}\n\n/** `date` shifted by `days` (negative moves back). */\nexport function foldAddDays(\n  date: FoldCalendarDate,\n  days: number,\n): FoldCalendarDate {\n  return fromUtcMs(toUtcMs(date) + days * MS_PER_DAY);\n}\n\n/**\n * Whole days from `from` to `to` — signed, and **exclusive** (same day → `0`),\n * so a span's length is `foldDaysBetween(start, end) + 1`.\n */\nexport function foldDaysBetween(\n  from: FoldCalendarDate,\n  to: FoldCalendarDate,\n): number {\n  return Math.round((toUtcMs(to) - toUtcMs(from)) / MS_PER_DAY);\n}\n\n/**\n * `date` shifted by `months`, clamping the day to the target month's length so\n * the result is always a real date (31 Jan + 1 month → 28/29 Feb, never 3 Mar).\n */\nexport function foldAddMonths(\n  date: FoldCalendarDate,\n  months: number,\n): FoldCalendarDate {\n  const day = Number(date.slice(8, 10));\n  const target = new Date(utcMonthMs(date, months));\n  const lastDay = new Date(\n    lastDayOfMonthMs(target.getUTCFullYear(), target.getUTCMonth()),\n  ).getUTCDate();\n  return `${pad4(target.getUTCFullYear())}-${pad2(target.getUTCMonth() + 1)}-${pad2(Math.min(day, lastDay))}`;\n}\n\n/** The 1st of `date`'s month shifted by `months`, in epoch ms. */\nfunction utcMonthMs(date: FoldCalendarDate, months: number): number {\n  const year = Number(date.slice(0, 4));\n  const month = Number(date.slice(5, 7));\n  const at = new Date(Date.UTC(year, month - 1 + months, 1));\n  if (year < 100) {\n    at.setUTCFullYear(year, month - 1 + months, 1);\n  }\n  return at.getTime();\n}\n\n/** Day 0 of the following month — i.e. the last day of this one, in epoch ms. */\nfunction lastDayOfMonthMs(year: number, monthIndex: number): number {\n  const at = new Date(Date.UTC(year, monthIndex + 1, 0));\n  if (year < 100) {\n    at.setUTCFullYear(year, monthIndex + 1, 0);\n  }\n  return at.getTime();\n}\n\n/** The first day of `date`'s month. */\nexport function foldStartOfMonth(date: FoldCalendarDate): FoldCalendarDate {\n  return `${date.slice(0, 7)}-01`;\n}\n\n/** The last day of `date`'s month (28–31, leap years included). */\nexport function foldEndOfMonth(date: FoldCalendarDate): FoldCalendarDate {\n  const year = Number(date.slice(0, 4));\n  const month = Number(date.slice(5, 7));\n  return fromUtcMs(lastDayOfMonthMs(year, month - 1));\n}\n\n/**\n * The start of the week `date` falls in, for a calendar anchored on\n * `weekStartsOn`. Anchor-agnostic: a Monday-first and a Sunday-first calendar\n * ask the same question and get their own answer.\n */\nexport function foldStartOfWeek(\n  date: FoldCalendarDate,\n  weekStartsOn: FoldWeekday = \"mon\",\n): FoldCalendarDate {\n  const ms = toUtcMs(date);\n  const dayOfWeek = new Date(ms).getUTCDay();\n  const offset = (dayOfWeek - WEEKDAY_INDEX[weekStartsOn] + 7) % 7;\n  return fromUtcMs(ms - offset * MS_PER_DAY);\n}\n\n/**\n * `date`'s position in its week, `0` on the anchor day — the column a day\n * occupies in a 7-wide grid.\n */\nexport function foldWeekdayIndex(\n  date: FoldCalendarDate,\n  weekStartsOn: FoldWeekday = \"mon\",\n): number {\n  return (\n    (new Date(toUtcMs(date)).getUTCDay() - WEEKDAY_INDEX[weekStartsOn] + 7) % 7\n  );\n}\n\n/**\n * The ISO-8601 week number `date` falls in, `1`–`53`.\n *\n * ISO weeks always start on Monday and belong to the year holding their\n * **Thursday**, which is why 1 January is sometimes week 52 of the year before\n * — the rule European B2B reporting runs on, and the reason this cannot be\n * derived from the calendar's own `weekStartsOn`.\n */\nexport function foldIsoWeek(date: FoldCalendarDate): number {\n  const day = foldToEpochDay(date);\n  // Epoch day 0 is a Thursday, so `+3` puts Monday at 0.\n  const mondayOffset = (((day + 3) % 7) + 7) % 7;\n  const thursday = day - mondayOffset + 3;\n  const year = Number(foldFromEpochDay(thursday).slice(0, 4));\n  const firstThursdayWeek = foldToEpochDay(`${pad4(year)}-01-01`);\n  return Math.floor((thursday - firstThursdayWeek) / 7) + 1;\n}\n\n/** The ISO week-numbering year of `date` — not always its calendar year. */\nexport function foldIsoWeekYear(date: FoldCalendarDate): number {\n  const day = foldToEpochDay(date);\n  const mondayOffset = (((day + 3) % 7) + 7) % 7;\n  return Number(foldFromEpochDay(day - mondayOffset + 3).slice(0, 4));\n}\n\n/** Which day of the week `date` falls on, anchor-independent. */\nexport function foldWeekdayOf(date: FoldCalendarDate): FoldWeekday {\n  return WEEKDAY_AT[new Date(toUtcMs(date)).getUTCDay()] ?? \"sun\";\n}\n\n/**\n * Whether `date` is one of the days a calendar shades as the weekend.\n *\n * Takes the weekend **as data**, because it is not derivable from the week's\n * anchor: the two are independent locale facts. Deriving it — \"the last two\n * columns\" — shades Friday and Saturday on a Sunday-first calendar and calls\n * Sunday a working day, which is wrong everywhere it is used.\n *\n * @default FOLD_DEFAULT_WEEKEND_DAYS (`['sat', 'sun']`)\n */\nexport function foldIsWeekend(\n  date: FoldCalendarDate,\n  weekendDays: readonly FoldWeekday[] = FOLD_DEFAULT_WEEKEND_DAYS,\n): boolean {\n  return weekendDays.includes(foldWeekdayOf(date));\n}\n\n/**\n * Anything whose `toString()` opens with an ISO date — `Temporal.PlainDate`,\n * `PlainDateTime` and `ZonedDateTime` all do, and so does a plain string.\n *\n * Typed structurally on purpose: the package takes no dependency on `Temporal`\n * and works whether or not the runtime has it.\n */\nexport interface FoldIsoDateLike {\n  toString(): string;\n}\n\n/**\n * A `Temporal` value read as the plain date it starts with.\n *\n * `Temporal.PlainDate.toString()` **is** `YYYY-MM-DD` — the primitive this\n * module chose for correctness turns out to be exactly Temporal-shaped, which\n * no `Date`-based calendar can say. Going the other way needs no helper at all:\n * `Temporal.PlainDate.from(foldDate)` already accepts one of ours.\n *\n * A `PlainDateTime` or a `ZonedDateTime` drops its time here, which is the\n * point — this family plots whole days, and the day you mean is the one in the\n * value's own calendar and zone, not the one UTC would have given you.\n *\n * Returns `\"\"` for anything that is not an ISO date, so a bad value fails\n * {@link foldIsCalendarDate} rather than silently rendering the wrong month.\n */\nexport function foldFromTemporal(value: FoldIsoDateLike): FoldCalendarDate {\n  const candidate = value.toString().slice(0, 10);\n  return foldIsCalendarDate(candidate) ? candidate : \"\";\n}\n\n/**\n * A `Date` at **UTC midnight** of `date` — the bridge to `Intl.DateTimeFormat`\n * for month and weekday names. Format it with `timeZone: \"UTC\"`, or the local\n * zone will shift the label back a day west of Greenwich.\n */\nexport function foldToNativeDate(date: FoldCalendarDate): Date {\n  return new Date(toUtcMs(date));\n}\n","/**\n * Wall-clock time for the time grid — `HH:mm`, 24-hour, **no zone**.\n *\n * ## Why not an instant\n * The same decision as the date, for the same reason. A meeting at 09:00 is at\n * 09:00 on the wall the person is looking at; storing it as an instant means\n * every render re-derives that wall time from a zone, and the moment the zone\n * is wrong — a server default, a user travelling, a DST edge — the grid draws\n * the wrong hour. `\"09:00\"` cannot be wrong about which hour it means.\n *\n * The zone is the **app's** boundary, exactly like the date: convert once on\n * the way in ({@link foldFromTemporal} takes a `ZonedDateTime` and drops it to\n * the day and, here, the caller reads its `.hour`/`.minute`), and the calendar\n * never has to know.\n *\n * Times compare **lexicographically** like the dates do — `\"09:00\" < \"14:30\"` —\n * which is what makes overlap detection a string comparison rather than a\n * parse. `24:00` is legal and means the end of the day, so a span that runs to\n * midnight has an end greater than its start.\n */\n\n/** A wall-clock time, `HH:mm`, `00:00`–`24:00`. */\nexport type FoldCalendarTime = string;\n\n/** Minutes in a day — the grid's own unit. */\nexport const FOLD_MINUTES_PER_DAY = 1440;\n\n/** `HH:mm`, structurally. Rejects `9:00`, `09:00:00`, junk suffixes. */\nconst TIME_PATTERN = /^\\d{2}:\\d{2}$/;\n\n/**\n * Whether `value` is a well-formed **and real** wall-clock time.\n *\n * The shape check is not enough on its own: `\"10:75\"` and `\"23:60\"` both match\n * `HH:mm` and both sit under 1440 minutes, so a range check on the total would\n * wave them through. The fields are validated separately — minutes `00`–`59`,\n * hours `00`–`23`, plus the single `24:00` that means the end of the day — the\n * same rigour {@link foldIsCalendarDate} applies to `2026-02-30`.\n */\nexport function foldIsCalendarTime(value: string): boolean {\n  if (!TIME_PATTERN.test(value)) {\n    return false;\n  }\n  const hours = Number(value.slice(0, 2));\n  const minutes = Number(value.slice(3, 5));\n  if (minutes > 59 || hours > 24) {\n    return false;\n  }\n  // Hour 24 exists only as `24:00`, the exclusive end of the day.\n  return hours < 24 || minutes === 0;\n}\n\n/** Minutes since midnight — the number the grid positions on. */\nexport function foldToMinutes(time: FoldCalendarTime): number {\n  return Number(time.slice(0, 2)) * 60 + Number(time.slice(3, 5));\n}\n\n/** Minutes since midnight back to `HH:mm`, clamped to the day. */\nexport function foldFromMinutes(minutes: number): FoldCalendarTime {\n  const clamped = Math.max(\n    0,\n    Math.min(FOLD_MINUTES_PER_DAY, Math.round(minutes)),\n  );\n  const hours = Math.floor(clamped / 60);\n  const rest = clamped % 60;\n  return `${hours < 10 ? \"0\" : \"\"}${hours}:${rest < 10 ? \"0\" : \"\"}${rest}`;\n}\n\n/** `time` shifted by `minutes`, clamped to the day rather than wrapping. */\nexport function foldAddMinutes(\n  time: FoldCalendarTime,\n  minutes: number,\n): FoldCalendarTime {\n  return foldFromMinutes(foldToMinutes(time) + minutes);\n}\n","import { foldToNativeDate, type FoldCalendarDate } from \"./date\";\nimport { foldToMinutes, type FoldCalendarTime } from \"./time\";\n\n/**\n * Every date format the calendar family renders, in one table.\n *\n * They used to be five components' worth of inline `Intl.DateTimeFormat`\n * option bags — which is how the day view ended up asking for\n * `{ weekday: 'long', month: 'long' }` and printing \"Saturday May\", a phrase in\n * no locale. Side by side they can be read against each other, and a consumer\n * can see what a locale is actually asked for.\n *\n * `timeZone: 'UTC'` is not optional: a plain date is bridged to `Date` at UTC\n * midnight, so formatting it in the local zone would print the day before for\n * anyone west of Greenwich.\n *\n * `calendar: 'gregory'` is pinned for the same reason `timeZone` is: the grid\n * counts days and groups months in the Gregorian calendar (that is what a\n * `YYYY-MM-DD` string *is*), so the names beside those numbers must be Gregorian\n * too. Left to the locale's own default, `ar-SA` would print Hijri month names\n * over Gregorian day numbers on rows that break on Gregorian months — a\n * calendar contradicting itself. The family is Gregorian, localised into the\n * language of the locale, not into its calendar system; a non-Gregorian layout\n * is a separate widget this one does not pretend to be.\n */\nexport const FOLD_CALENDAR_FORMATS = {\n  /** Whole date, spelled out — accessible names. */\n  dateFull: { dateStyle: \"long\" },\n  /** Whole date **with its weekday** — a period title, where it is the heading. */\n  dateFullWeekday: { dateStyle: \"full\" },\n  /** `18 May 2026` — the ends of a week, which `formatRange` then joins. */\n  dayMonthYear: { day: \"numeric\", month: \"long\", year: \"numeric\" },\n  /** `Mon` — grid column headers. */\n  weekdayShort: { weekday: \"short\" },\n  /** `Monday` — a day heading, where there is room. */\n  weekdayLong: { weekday: \"long\" },\n  /** `May` — beside a day number, never on its own with a weekday. */\n  monthLong: { month: \"long\" },\n  /** `May` (abbreviated) — the agenda rail, where width is scarce. */\n  monthShort: { month: \"short\" },\n  /** `May 2026` — a period title. */\n  monthYear: { month: \"long\", year: \"numeric\" },\n  /** `18 May` — a span's ends, which `formatRange` then joins. */\n  dayMonthShort: { day: \"numeric\", month: \"short\" },\n  /** `09:00` in France, `9:00 AM` in the US — an hour down the grid's gutter. */\n  hourMark: { hour: \"numeric\", minute: \"2-digit\" },\n} as const satisfies Record<string, Intl.DateTimeFormatOptions>;\n\n/** A key of {@link FOLD_CALENDAR_FORMATS}. */\nexport type FoldCalendarFormat = keyof typeof FOLD_CALENDAR_FORMATS;\n\n/**\n * Formatters are expensive to build and perfectly reusable, so they are cached\n * per locale + format. The cache is module-level on purpose: two calendars in\n * the same locale should not each pay for their own.\n */\nconst CACHE = new Map<string, Intl.DateTimeFormat>();\n\n/** The `Intl` formatter for one locale and format, built at most once. */\nexport function foldCalendarFormatter(\n  locale: string | undefined,\n  format: FoldCalendarFormat,\n  override?: Intl.DateTimeFormatOptions,\n): Intl.DateTimeFormat {\n  const options = { ...FOLD_CALENDAR_FORMATS[format], ...override };\n  const cacheKey =\n    override === undefined\n      ? `${locale ?? \"\"}|${format}`\n      : `${locale ?? \"\"}|${format}|${JSON.stringify(options)}`;\n  const cached = CACHE.get(cacheKey);\n  if (cached !== undefined) {\n    return cached;\n  }\n  const built = new Intl.DateTimeFormat(locale, {\n    ...options,\n    timeZone: \"UTC\",\n    calendar: \"gregory\",\n  });\n  CACHE.set(cacheKey, built);\n  return built;\n}\n\n/** One plain date, formatted. */\nexport function foldFormatDate(\n  date: FoldCalendarDate,\n  locale: string | undefined,\n  format: FoldCalendarFormat,\n  override?: Intl.DateTimeFormatOptions,\n): string {\n  return foldCalendarFormatter(locale, format, override).format(\n    foldToNativeDate(date),\n  );\n}\n\n/**\n * A span, collapsed to one date when it covers a single day — `Intl`'s own\n * range formatter does that, and picks the locale's separator.\n */\nexport function foldFormatRange(\n  from: FoldCalendarDate,\n  to: FoldCalendarDate,\n  locale: string | undefined,\n  format: FoldCalendarFormat,\n  override?: Intl.DateTimeFormatOptions,\n): string {\n  return foldCalendarFormatter(locale, format, override).formatRange(\n    foldToNativeDate(from),\n    foldToNativeDate(to),\n  );\n}\n\n/** A day with no meaning of its own, used only to hang a wall-clock time on. */\nconst TIME_ANCHOR = Date.UTC(2026, 0, 1);\n\n/**\n * A wall-clock time in the locale's own convention — `14:00` in France, `2 PM`\n * in the United States. Formatted at UTC on a throwaway date, because the time\n * has no zone and no day: only its hours and minutes are real.\n */\nexport function foldFormatTime(\n  time: FoldCalendarTime,\n  locale: string | undefined,\n  override?: Intl.DateTimeFormatOptions,\n): string {\n  const at = new Date(TIME_ANCHOR + foldToMinutes(time) * 60_000);\n  return foldCalendarFormatter(locale, \"hourMark\", override).format(at);\n}\n","import { InjectionToken, type Provider } from \"@angular/core\";\n\n/**\n * Every string the calendar renders that does not come from the caller's data.\n *\n * Month and weekday names are deliberately **absent**: they come from\n * `Intl.DateTimeFormat` driven by the `locale` input, so a consumer gets all\n * ~200 locales for free instead of hand-translating twelve month names. What\n * remains here is the chrome — the words `Intl` cannot supply.\n */\nexport interface FoldCalendarLabels {\n  /** Accessible name of the grid itself. */\n  readonly grid: string;\n  /** Word marking the cell that is today, appended to its accessible name. */\n  readonly today: string;\n  /** The chip standing for events a week had no lane for. */\n  readonly moreEvents: (count: number) => string;\n  /**\n   * A count of events — announced on a day cell, and on a chip that collapses\n   * a group into one.\n   */\n  readonly eventCount: (count: number) => string;\n  /**\n   * Announced on a day cell that is showing fewer events than it holds — the\n   * lane budget is a visual limit, and a screen reader is told about it rather\n   * than silently given a smaller number.\n   */\n  readonly hiddenCount: (count: number) => string;\n  /** Label of the time grid's all-day strip. */\n  readonly allDay: string;\n  /** Accessible name of the time grid's scrollable hour area. */\n  readonly hours: string;\n  /** Header of the ISO week-number column — a symbol, not a sentence. */\n  readonly weekNumberShort: string;\n  /** Accessible reading of a week number, since the column header is a glyph. */\n  readonly weekNumber: (week: number) => string;\n  /** Shown by the day view when nothing sits on the day. */\n  readonly emptyDay: string;\n  /** Shown by the list view when the range holds nothing. */\n  readonly emptyRange: string;\n  /** The toolbar's jump-to-today button. */\n  readonly todayAction: string;\n  /** Accessible name of the toolbar's back control. */\n  readonly previousPeriod: string;\n  /** Accessible name of the toolbar's forward control. */\n  readonly nextPeriod: string;\n  /** Accessible name of the view switch. */\n  readonly viewSwitch: string;\n  /** The four view names, in the switch. */\n  readonly viewMonth: string;\n  readonly viewWeek: string;\n  readonly viewDay: string;\n  readonly viewList: string;\n  /** Accessible name of the agenda rail. */\n  readonly agenda: string;\n  /** Accessible name of the rail's slice switch — distinct from the rail itself. */\n  readonly agendaModes: string;\n  /** The agenda's two slices, in its own switch. */\n  readonly agendaTodo: string;\n  readonly agendaUpcoming: string;\n  /** Shown when the agenda's current slice is clear. */\n  readonly agendaEmptyTodo: string;\n  readonly agendaEmptyUpcoming: string;\n  /** Shown when `limit` stopped the rail short of what is actually ahead. */\n  readonly agendaMore: (days: number) => string;\n  /** Relative day names the agenda prefers over a date. */\n  readonly relativeToday: string;\n  readonly relativeTomorrow: string;\n  /** Accessible names of the rail's collapse control, in each state. */\n  readonly collapse: string;\n  readonly expand: string;\n  /** Accessible name of the source filter. */\n  readonly sourceFilter: string;\n  /** Reading of a source's state, e.g. `(\"Absences\", true) => \"Absences, shown\"`. */\n  readonly sourceState: (label: string, shown: boolean) => string;\n}\n\n/** The English defaults — the base every override merges onto. */\nexport const FOLD_CALENDAR_DEFAULT_LABELS: FoldCalendarLabels = {\n  grid: \"Calendar\",\n  today: \"today\",\n  moreEvents: (count) => `+${count} more`,\n  eventCount: (count) => (count === 1 ? \"1 event\" : `${count} events`),\n  hiddenCount: (count) => `${count} not shown`,\n  allDay: \"All day\",\n  hours: \"Hours\",\n  weekNumberShort: \"Wk\",\n  weekNumber: (week) => `Week ${week}`,\n  emptyDay: \"Nothing on this day.\",\n  emptyRange: \"Nothing in this range.\",\n  todayAction: \"Today\",\n  previousPeriod: \"Previous\",\n  nextPeriod: \"Next\",\n  viewSwitch: \"Calendar view\",\n  viewMonth: \"Month\",\n  viewWeek: \"Week\",\n  viewDay: \"Day\",\n  viewList: \"List\",\n  agenda: \"Agenda\",\n  agendaModes: \"Agenda slice\",\n  agendaTodo: \"To handle\",\n  agendaUpcoming: \"Upcoming\",\n  agendaEmptyTodo: \"Nothing to handle — all up to date.\",\n  agendaEmptyUpcoming: \"Nothing coming up.\",\n  agendaMore: (days) => (days === 1 ? \"1 more day\" : `${days} more days`),\n  relativeToday: \"Today\",\n  relativeTomorrow: \"Tomorrow\",\n  collapse: \"Collapse\",\n  expand: \"Expand\",\n  sourceFilter: \"Filter by source\",\n  sourceState: (label, shown) => `${label}, ${shown ? \"shown\" : \"hidden\"}`,\n};\n\n/** App-wide calendar labels; defaults to English. */\nexport const FOLD_CALENDAR_LABELS = new InjectionToken<FoldCalendarLabels>(\n  \"FOLD_CALENDAR_LABELS\",\n  { factory: () => FOLD_CALENDAR_DEFAULT_LABELS },\n);\n\n/** Provide calendar labels for the whole app, merged over the English defaults. */\nexport function provideFoldCalendarLabels(\n  labels: Partial<FoldCalendarLabels>,\n): Provider {\n  return {\n    provide: FOLD_CALENDAR_LABELS,\n    useValue: { ...FOLD_CALENDAR_DEFAULT_LABELS, ...labels },\n  };\n}\n","import type { FoldWeekday } from \"./date\";\n\n/**\n * What a locale says about its own week.\n *\n * `Intl` hands us every month and weekday name, and then most calendars stop\n * there and hard-code Monday — which is right in France and wrong in the United\n * States, Egypt and the Maldives. `Intl.Locale` also knows **which day the week\n * starts on and which days are the weekend**; asking is one call, and it turns\n * two inputs from \"the caller guesses\" into \"the caller overrides\".\n *\n * Support is uneven (`getWeekInfo()` in Chrome and Safari, the `weekInfo`\n * getter in older Firefox), so both shapes are probed and neither is assumed.\n * A runtime with neither falls back to Monday + Sat/Sun, which is the most\n * common answer and the previous behaviour.\n */\n\n/** A locale's week conventions. */\nexport interface FoldWeekInfo {\n  /** The day its calendars open on. */\n  readonly weekStartsOn: FoldWeekday;\n  /** The days it shades as the weekend. */\n  readonly weekendDays: readonly FoldWeekday[];\n}\n\n/** ISO-8601 day numbers, `1` = Monday … `7` = Sunday — what `Intl` returns. */\nconst ISO_DAY: readonly FoldWeekday[] = [\n  \"mon\",\n  \"tue\",\n  \"wed\",\n  \"thu\",\n  \"fri\",\n  \"sat\",\n  \"sun\",\n];\n\n/** What a runtime that cannot answer gets: the most common week in the world. */\nexport const FOLD_FALLBACK_WEEK_INFO: FoldWeekInfo = {\n  weekStartsOn: \"mon\",\n  weekendDays: [\"sat\", \"sun\"],\n};\n\nconst CACHE = new Map<string, FoldWeekInfo>();\n\n/** `1`–`7` → a weekday, ignoring anything out of range. */\nfunction toWeekday(isoDay: unknown): FoldWeekday | null {\n  if (typeof isoDay !== \"number\") {\n    return null;\n  }\n  return ISO_DAY[isoDay - 1] ?? null;\n}\n\n/** A no-argument method, narrowed without an assertion. */\nfunction isThunk(value: unknown): value is () => unknown {\n  return typeof value === \"function\";\n}\n\n/** The `{ firstDay, weekend }` shape, whichever way the runtime exposes it. */\nfunction readWeekInfo(locale: Intl.Locale): unknown {\n  if (\"getWeekInfo\" in locale) {\n    const method: unknown = locale.getWeekInfo;\n    if (isThunk(method)) {\n      return method.call(locale);\n    }\n  }\n  if (\"weekInfo\" in locale) {\n    return locale.weekInfo;\n  }\n  return null;\n}\n\n/** Narrows the probed value without trusting its shape. */\nfunction parseWeekInfo(raw: unknown): FoldWeekInfo | null {\n  if (typeof raw !== \"object\" || raw === null) {\n    return null;\n  }\n  const firstDay = \"firstDay\" in raw ? toWeekday(raw.firstDay) : null;\n  const weekendRaw = \"weekend\" in raw ? raw.weekend : null;\n  const weekend = Array.isArray(weekendRaw)\n    ? weekendRaw\n        .map(toWeekday)\n        .filter((day): day is FoldWeekday => day !== null)\n    : [];\n  if (firstDay === null) {\n    return null;\n  }\n  return {\n    weekStartsOn: firstDay,\n    weekendDays:\n      weekend.length > 0 ? weekend : FOLD_FALLBACK_WEEK_INFO.weekendDays,\n  };\n}\n\n/**\n * The week conventions of `locale` — its first day and its weekend.\n *\n * `undefined` asks the runtime for its own locale, which is what a calendar\n * with no `locale` input is already formatting in.\n */\nexport function foldLocaleWeekInfo(locale?: string): FoldWeekInfo {\n  const tag = locale ?? new Intl.DateTimeFormat().resolvedOptions().locale;\n  const cached = CACHE.get(tag);\n  if (cached !== undefined) {\n    return cached;\n  }\n  let info = FOLD_FALLBACK_WEEK_INFO;\n  try {\n    info = parseWeekInfo(readWeekInfo(new Intl.Locale(tag))) ?? info;\n  } catch {\n    // A malformed tag is the caller's bug, not a reason to render nothing.\n    info = FOLD_FALLBACK_WEEK_INFO;\n  }\n  CACHE.set(tag, info);\n  return info;\n}\n","import {\n  Directive,\n  computed,\n  contentChild,\n  inject,\n  input,\n} from \"@angular/core\";\n\nimport type { FoldWeekday } from \"./date\";\nimport { FoldCalendarEventDirective } from \"./event.directive\";\nimport {\n  foldFormatDate,\n  foldFormatRange,\n  foldFormatTime,\n  type FoldCalendarFormat,\n} from \"./format\";\nimport type { FoldCalendarDate } from \"./date\";\nimport { FOLD_CALENDAR_LABELS, type FoldCalendarLabels } from \"./labels\";\nimport { foldLocaleWeekInfo } from \"./locale\";\n\n/**\n * The three things every calendar view needs and none of them is about: its\n * labels, its locale, and the chip template a consumer may have projected.\n *\n * Applied through `hostDirectives`, so `locale` and `labels` are still ordinary\n * inputs on `<fold-calendar-month>`, `<fold-calendar-week>` and the rest — the\n * consumer sees no difference, and the five views stop carrying five identical\n * copies of the same eight lines.\n *\n * Internal — a view exposes it, it is never applied by hand.\n *\n * @example\n * ```ts\n * @Component({\n *   hostDirectives: [\n *     { directive: FoldCalendarChromeDirective, inputs: ['locale', 'labels'] },\n *   ],\n * })\n * export class FoldCalendarWeekComponent<T = unknown> {\n *   protected readonly chrome = inject(FoldCalendarChromeDirective);\n * }\n * ```\n */\n@Directive({ standalone: true })\nexport class FoldCalendarChromeDirective {\n  /** BCP-47 tag driving every `Intl` name; omitted, the runtime default. */\n  readonly locale = input<string>();\n  /** Per-instance label overrides, merged over the app-wide (or English) set. */\n  readonly labels = input<Partial<FoldCalendarLabels>>();\n  /**\n   * Per-instance `Intl` option overrides, merged over\n   * {@link FOLD_CALENDAR_FORMATS}. Labels let a locale translate; this lets it\n   * **reformat** — a numeric weekday header, a four-digit year, a narrow month.\n   */\n  readonly formats =\n    input<Partial<Record<FoldCalendarFormat, Intl.DateTimeFormatOptions>>>();\n\n  private readonly injectedLabels = inject(FOLD_CALENDAR_LABELS);\n  private readonly projectedEvent = contentChild(FoldCalendarEventDirective);\n\n  /** Effective labels — the app-wide (or English) set, with `labels` on top. */\n  readonly l = computed<FoldCalendarLabels>(() => ({\n    ...this.injectedLabels,\n    ...this.labels(),\n  }));\n\n  /** The custom chip template, when one is projected. */\n  readonly eventContent = computed(\n    () => this.projectedEvent()?.template ?? null,\n  );\n\n  /**\n   * What this locale says its week looks like — the default behind\n   * `weekStartsOn` and `weekendDays`, so a calendar is right in Cairo and\n   * Chicago without the caller having to know either.\n   */\n  readonly weekInfo = computed(() => foldLocaleWeekInfo(this.locale()));\n\n  /** The anchor a view should use: the caller's, else the locale's. */\n  anchor(explicit: FoldWeekday | undefined): FoldWeekday {\n    return explicit ?? this.weekInfo().weekStartsOn;\n  }\n\n  /** The weekend a view should shade: the caller's, else the locale's. */\n  weekend(\n    explicit: readonly FoldWeekday[] | undefined,\n  ): readonly FoldWeekday[] {\n    return explicit ?? this.weekInfo().weekendDays;\n  }\n\n  /** One date, in this view's locale and its format overrides. */\n  format(date: FoldCalendarDate, format: FoldCalendarFormat): string {\n    return foldFormatDate(\n      date,\n      this.locale(),\n      format,\n      this.formats()?.[format],\n    );\n  }\n\n  /** A wall-clock time, in this view's locale (24-hour, or AM/PM). */\n  formatTime(time: string): string {\n    return foldFormatTime(time, this.locale(), this.formats()?.hourMark);\n  }\n\n  /** A span, in this view's locale and its format overrides. */\n  formatRange(\n    from: FoldCalendarDate,\n    to: FoldCalendarDate,\n    format: FoldCalendarFormat,\n  ): string {\n    return foldFormatRange(\n      from,\n      to,\n      this.locale(),\n      format,\n      this.formats()?.[format],\n    );\n  }\n}\n","import {\n  foldAddDays,\n  foldAddMonths,\n  foldIsCalendarDate,\n  foldStartOfWeek,\n  type FoldCalendarDate,\n  type FoldWeekday,\n} from \"./date\";\n\n/**\n * Where a key press moves the focused day. Split out of the component because\n * \"what does ArrowDown mean on a calendar\" is a pure question about dates, and\n * answering it here means it can be tested without a grid, a DOM or a TestBed.\n *\n * {@link foldCalendarNextFocus} is public: it is the other half of the geometry\n * tier, and a hand-rolled date grid owes its users the same arrow keys as the\n * built-in one. {@link foldFocusDayCell} stays internal — it reads a\n * `data-fold-day` attribute this package writes, and exporting it would freeze\n * that attribute into the public contract.\n */\n\n/**\n * The day `key` moves focus to from `from`, or `null` when the key is not a\n * grid-navigation key and the component should leave the event alone.\n *\n * The mapping is the ARIA grid pattern applied to a date axis: horizontal keys\n * step a day, vertical keys step a **week** (the column stays put, which is the\n * whole point of a 7-wide grid), `Home`/`End` snap to the week's bounds, and\n * `PageUp`/`PageDown` page by month.\n */\nexport function foldCalendarNextFocus(\n  key: string,\n  from: FoldCalendarDate,\n  weekStartsOn: FoldWeekday = \"mon\",\n): FoldCalendarDate | null {\n  switch (key) {\n    case \"ArrowLeft\":\n      return foldAddDays(from, -1);\n    case \"ArrowRight\":\n      return foldAddDays(from, 1);\n    case \"ArrowUp\":\n      return foldAddDays(from, -7);\n    case \"ArrowDown\":\n      return foldAddDays(from, 7);\n    case \"Home\":\n      return foldStartOfWeek(from, weekStartsOn);\n    case \"End\":\n      return foldAddDays(foldStartOfWeek(from, weekStartsOn), 6);\n    case \"PageUp\":\n      return foldAddMonths(from, -1);\n    case \"PageDown\":\n      return foldAddMonths(from, 1);\n    default:\n      return null;\n  }\n}\n\n/**\n * Focuses the cell for `date` inside `grid`, reporting whether it was there to\n * focus.\n *\n * A `false` is the signal that the target lies outside the rendered grid — the\n * caller pages the calendar and defers the focus until the new cells exist.\n * Taking the root as an argument keeps this free of `document` (so it is a\n * no-op under SSR) and means there is exactly **one** answer to \"which element\n * is the grid\" — looking it up from the event target as well gave two.\n */\nexport function foldFocusDayCell(\n  grid: Element | null,\n  date: FoldCalendarDate,\n): boolean {\n  // A date can reach this from an input, and it is interpolated into a\n  // selector: anything that is not a plain date is a `SyntaxError` waiting to\n  // happen, so it is refused rather than escaped.\n  if (grid === null || !foldIsCalendarDate(date)) {\n    return false;\n  }\n  const cell = grid.querySelector(`[data-fold-day=\"${date}\"]`);\n  if (cell instanceof HTMLElement) {\n    cell.focus();\n    return true;\n  }\n  return false;\n}\n","import {\n  afterNextRender,\n  computed,\n  signal,\n  untracked,\n  type Injector,\n  type Signal,\n} from \"@angular/core\";\n\nimport type { FoldCalendarDate, FoldWeekday } from \"./date\";\nimport { foldCalendarNextFocus, foldFocusDayCell } from \"./keyboard\";\n\n/**\n * The single tab stop of a date grid, and the arrow keys that move it.\n *\n * A grid has **one** focusable cell at a time (the ARIA grid pattern), which\n * means three questions that have nothing to do with rendering a month: which\n * cell holds the stop, where does a key move it, and what happens when it moves\n * off the rendered window. Answering them here keeps the component about the\n * grid, and lets the rule be exercised without one.\n */\n\n/** What the roving focus needs from the grid it moves over. */\nexport interface FoldRovingFocusHost {\n  /** Every date currently rendered — focus may not leave it. */\n  readonly dates: Signal<ReadonlySet<FoldCalendarDate>>;\n  /** Where the stop sits before the user has moved it (today, else the 1st). */\n  readonly fallback: Signal<FoldCalendarDate | null>;\n  /** The anchor `Home`/`End` snap to. */\n  readonly weekStartsOn: Signal<FoldWeekday>;\n  /** The grid's root element, for the cell lookup. `null` under SSR. */\n  root(): HTMLElement | null;\n  /** Page the calendar to a date that is not on screen. */\n  page(date: FoldCalendarDate): void;\n  /** Used to schedule the post-render focus. */\n  readonly injector: Injector;\n}\n\nexport class FoldCalendarRovingFocus {\n  /** The day holding focus, once the user has moved it. */\n  private readonly focused = signal<FoldCalendarDate | null>(null);\n  /** A day to focus once the grid has re-rendered around a new period. */\n  private readonly deferred = signal<FoldCalendarDate | null>(null);\n\n  constructor(private readonly host: FoldRovingFocusHost) {}\n\n  /**\n   * The cell carrying the tab stop: the focused day while it is on screen,\n   * else the host's fallback — so paging never strands the grid without one.\n   */\n  readonly activeDate = computed<FoldCalendarDate | null>(() => {\n    const focused = this.focused();\n    if (focused !== null && this.host.dates().has(focused)) {\n      return focused;\n    }\n    return this.host.fallback();\n  });\n\n  tabIndexFor(date: FoldCalendarDate): 0 | -1 {\n    return date === this.activeDate() ? 0 : -1;\n  }\n\n  /** A cell took focus — by keyboard, or by a click. */\n  onFocus(date: FoldCalendarDate): void {\n    this.focused.set(date);\n  }\n\n  /**\n   * Applies `key` to the date axis, reporting whether it was a navigation key.\n   *\n   * The move happens in place when the target is on screen; when it is not, the\n   * host pages to it and the focus is deferred until the new cells exist.\n   */\n  move(key: string, from: FoldCalendarDate): boolean {\n    const next = foldCalendarNextFocus(key, from, this.host.weekStartsOn());\n    if (next === null) {\n      return false;\n    }\n    this.focused.set(next);\n    if (!foldFocusDayCell(this.host.root(), next)) {\n      this.host.page(next);\n      this.deferred.set(next);\n      this.focusAfterRender();\n    }\n    return true;\n  }\n\n  /**\n   * Focuses the deferred day once the grid has rendered around the new period.\n   *\n   * `afterNextRender` rather than an `effect`: the ordering of an effect against\n   * the DOM it wants to touch is not contracted and has already changed between\n   * Angular versions, and this way the SSR no-op is explicit. The request is\n   * **consumed**, or repeating the exact same move would be a no-op on the\n   * signal and drop focus onto `<body>`.\n   */\n  private focusAfterRender(): void {\n    afterNextRender(\n      () => {\n        const target = untracked(this.deferred);\n        if (target === null) {\n          return;\n        }\n        this.deferred.set(null);\n        foldFocusDayCell(this.host.root(), target);\n      },\n      { injector: this.host.injector },\n    );\n  }\n}\n","import {\n  foldFromEpochDay,\n  foldIsWeekend,\n  foldToEpochDay,\n  FOLD_DEFAULT_WEEKEND_DAYS,\n  type FoldCalendarDate,\n  type FoldWeekday,\n} from \"./date\";\nimport type { FoldCalendarDay, FoldCalendarEvent } from \"./types\";\n\n/**\n * The one place a {@link FoldCalendarDay} is built, shared by the month grid and\n * the column views so a cell means exactly the same thing in every view.\n *\n * Counts are keyed on the **epoch day**, not the date string: a grid builds\n * 35–42 of these per render and every string key would be parsed again to be\n * compared. The dates on the way out are still strings — that is the model.\n *\n * Internal — not part of the public surface.\n */\n\n/** What a day cell needs to know that the date alone cannot say. */\nexport interface FoldDayContext {\n  /** `YYYY-MM` of the month on display; decides `inMonth`. */\n  readonly month: string;\n  /** The day to flag as today, or `undefined` to flag none. */\n  readonly today: FoldCalendarDate | undefined;\n  /** Days shaded as the weekend. */\n  readonly weekendDays: readonly FoldWeekday[];\n  /** Events covering each day, counted once for the whole grid. */\n  readonly counts: ReadonlyMap<number, number>;\n  /** Events no lane could take, per day. Empty for views that never drop any. */\n  readonly hidden: ReadonlyMap<number, number>;\n}\n\n/** A day cell, with every flag a view needs to style it already resolved. */\nexport function foldMakeDay(\n  epochDay: number,\n  context: FoldDayContext,\n): FoldCalendarDay {\n  const date = foldFromEpochDay(epochDay);\n  return {\n    date,\n    dayOfMonth: Number(date.slice(8, 10)),\n    inMonth: date.slice(0, 7) === context.month,\n    isToday: date === context.today,\n    isWeekend: foldIsWeekend(date, context.weekendDays),\n    eventCount: context.counts.get(epochDay) ?? 0,\n    hiddenCount: context.hidden.get(epochDay) ?? 0,\n  };\n}\n\n/**\n * How many events cover each day of `[from, to]`, in a single pass.\n *\n * A view that asked each cell \"which events are on you?\" would re-scan the\n * whole feed once per cell — 35 filters per change-detection cycle on a month\n * grid. Walking the events instead costs one pass, and the count a cell needs\n * is then already there.\n */\nexport function foldCountByDay<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  fromDay: number,\n  toDay: number,\n): ReadonlyMap<number, number> {\n  const counts = new Map<number, number>();\n  for (const event of events) {\n    const a = foldToEpochDay(event.start);\n    const b = foldToEpochDay(event.end);\n    // Reversed ranges are normalised by the layout, so they are counted the\n    // same way here — otherwise a band would render on days reporting zero.\n    const start = Math.max(fromDay, Math.min(a, b));\n    const end = Math.min(toDay, Math.max(a, b));\n    for (let day = start; day <= end; day += 1) {\n      counts.set(day, (counts.get(day) ?? 0) + 1);\n    }\n  }\n  return counts;\n}\n\n/** No days dropped — the column views' `hidden` map. */\nexport const FOLD_NO_HIDDEN_DAYS: ReadonlyMap<number, number> = new Map();\n\n/** The weekend a caller left unset. */\nexport function foldWeekendOr(\n  weekendDays: readonly FoldWeekday[] | undefined,\n): readonly FoldWeekday[] {\n  return weekendDays ?? FOLD_DEFAULT_WEEKEND_DAYS;\n}\n","import type { FoldCalendarDate } from \"./date\";\nimport type { FoldLogicalSpan } from \"./span\";\nimport type { FoldCalendarBand } from \"./types\";\n\n/**\n * Packing spans into lanes across a row of days — the month grid's week row,\n * and the time grid's all-day strip, which are the same problem: spans that may\n * cross the row, a lane budget, and an honest account of what did not fit.\n *\n * Shared rather than copied, because \"a hidden span is charged to every day it\n * would have covered\" is a rule that has to mean the same thing in both.\n */\n\n/** The columns a span occupies once clipped to its week row. */\nfunction columnsOf<T>(\n  span: FoldLogicalSpan<T>,\n  weekStartDay: number,\n  dayCount: number,\n): { startColumn: number; endColumn: number } {\n  return {\n    startColumn: Math.max(0, span.startDay - weekStartDay),\n    endColumn: Math.min(dayCount - 1, span.endDay - weekStartDay),\n  };\n}\n\n/** One span placed in a lane, or `null` when the budget is spent. */\nfunction placeSpan<T>(\n  span: FoldLogicalSpan<T>,\n  week: { start: FoldCalendarDate; startDay: number; dayCount: number },\n  columns: { startColumn: number; endColumn: number },\n  laneEnds: number[],\n  maxLanes: number,\n): FoldCalendarBand<T> | null {\n  const { startColumn, endColumn } = columns;\n\n  // First lane whose occupant ends before this span starts; else a fresh one.\n  const reusable = laneEnds.findIndex((end) => end < startColumn);\n  const lane = reusable === -1 ? laneEnds.length : reusable;\n  if (lane >= maxLanes) {\n    return null;\n  }\n  laneEnds[lane] = endColumn;\n\n  const weekEndDay = week.startDay + week.dayCount - 1;\n  const startsHere = span.startDay >= week.startDay && !span.openStart;\n  const endsHere = span.endDay <= weekEndDay && !span.openEnd;\n  return {\n    key: `${span.key}@${week.start}`,\n    event: span.event,\n    startColumn,\n    endColumn,\n    lane,\n    continuesBefore: !startsHere,\n    continuesAfter: !endsHere,\n    groupSize: span.groupSize,\n    // A half-day edge only means something on the segment holding the real edge.\n    ...(startsHere && span.event.startHalfDay !== undefined\n      ? { startHalfDay: span.event.startHalfDay }\n      : {}),\n    ...(endsHere && span.event.endHalfDay !== undefined\n      ? { endHalfDay: span.event.endHalfDay }\n      : {}),\n  };\n}\n\n/**\n * Packs a row's candidates into lanes, and records what overflowed **per day**\n * — a row-wide total would say a week is crowded without saying which day to\n * look at, so each date carries its own count.\n */\nexport function foldPackRow<T>(\n  candidates: readonly FoldLogicalSpan<T>[],\n  week: { start: FoldCalendarDate; startDay: number; dayCount: number },\n  maxLanes: number,\n  hidden: Map<number, number>,\n): { bands: readonly FoldCalendarBand<T>[]; hiddenCount: number } {\n  const laneEnds: number[] = [];\n  const bands: FoldCalendarBand<T>[] = [];\n  let hiddenCount = 0;\n\n  for (const span of candidates) {\n    const columns = columnsOf(span, week.startDay, week.dayCount);\n    const band = placeSpan(span, week, columns, laneEnds, maxLanes);\n    if (band !== null) {\n      bands.push(band);\n      continue;\n    }\n    hiddenCount += 1;\n    // A hidden span is missing from every day it would have covered.\n    for (\n      let column = columns.startColumn;\n      column <= columns.endColumn;\n      column += 1\n    ) {\n      const day = week.startDay + column;\n      hidden.set(day, (hidden.get(day) ?? 0) + 1);\n    }\n  }\n  return { bands, hiddenCount };\n}\n","import { isDevMode } from \"@angular/core\";\n\nimport { foldToEpochDay, type FoldCalendarDate } from \"./date\";\nimport type { FoldCalendarEvent, FoldCalendarTone } from \"./types\";\n\n/**\n * What the month grid actually places: not events, but **spans** — an event\n * reduced to the range it occupies, with a group collapsed into one.\n *\n * Separate from the geometry because \"which events are one chip, and what does\n * that chip stand for\" is a question about the feed, while lane packing is a\n * question about the row. Answering them in one file made both harder to read.\n */\n\n/** An event (or a collapsed group of them) reduced to what layout cares about. */\nexport interface FoldLogicalSpan<T> {\n  readonly key: string;\n  readonly event: FoldCalendarEvent<T>;\n  readonly start: FoldCalendarDate;\n  readonly end: FoldCalendarDate;\n  /** {@link start} as an epoch day — what the grid sorts and clips on. */\n  readonly startDay: number;\n  /** {@link end} as an epoch day, inclusive. */\n  readonly endDay: number;\n  readonly groupSize: number;\n  readonly openStart: boolean;\n  readonly openEnd: boolean;\n}\n\n/**\n * How loudly a tone asks to be looked at. A collapsed group shows its most\n * severe member, so an alert inside a group is never hidden behind a member\n * that happens to come first.\n */\nconst TONE_SEVERITY = {\n  alert: 4,\n  warning: 3,\n  success: 2,\n  neutral: 1,\n  muted: 0,\n} as const satisfies Record<FoldCalendarTone, number>;\n\n/** Severity of an event's tone, `neutral` when it declares none. */\nfunction severityOf<T>(event: FoldCalendarEvent<T>): number {\n  return TONE_SEVERITY[event.tone ?? \"neutral\"];\n}\n\n/**\n * The span a single event occupies, with a reversed range put back in order.\n *\n * `end < start` is a caller bug, and left alone it renders **twice, wrongly**:\n * the grid's `grid-column: 5 / 2` is silently swapped by CSS so a band covers\n * days it does not cover, while every other view — which asks\n * `start <= day && end >= day` — reports the event as absent. Swapping makes\n * the two agree, and the dev warning names the event rather than leaving the\n * contradiction to be discovered in a screenshot.\n */\nfunction spanOf<T>(\n  event: FoldCalendarEvent<T>,\n  key: string,\n): FoldLogicalSpan<T> {\n  const reversed = event.end < event.start;\n  if (reversed && isDevMode()) {\n    console.warn(\n      `[fold-calendar] event \"${event.id}\" ends (${event.end}) before it starts (${event.start}); treating the range as reversed.`,\n    );\n  }\n  const start = reversed ? event.end : event.start;\n  const end = reversed ? event.start : event.end;\n  return {\n    key,\n    event,\n    start,\n    end,\n    startDay: foldToEpochDay(start),\n    endDay: foldToEpochDay(end),\n    groupSize: 1,\n    openStart: event.openStart === true,\n    openEnd: event.openEnd === true,\n  };\n}\n\n/** Warns once per render when two events share an id. */\nfunction warnDuplicateIds<T>(events: readonly FoldCalendarEvent<T>[]): void {\n  const seen = new Set<string>();\n  for (const event of events) {\n    if (seen.has(event.id)) {\n      console.warn(\n        `[fold-calendar] two events share the id \"${event.id}\". Ids must be unique per render — use \\`groupId\\` to collapse events on purpose.`,\n      );\n      return;\n    }\n    seen.add(event.id);\n  }\n}\n\n/**\n * Merges a member into the span standing for its group: the **union** of the\n * ranges (a group chip stopping short of a member it stands for would be a\n * lie), open on either side if **any** member is, and represented by the most\n * severe member so tone, icon, label and source all come from one event that\n * really exists.\n */\nfunction mergeMember<T>(\n  span: FoldLogicalSpan<T>,\n  member: FoldLogicalSpan<T>,\n): FoldLogicalSpan<T> {\n  const takeover = severityOf(member.event) > severityOf(span.event);\n  const opensFirst = span.startDay <= member.startDay;\n  const endsLast = span.endDay >= member.endDay;\n  return {\n    key: span.key,\n    event: takeover ? member.event : span.event,\n    start: opensFirst ? span.start : member.start,\n    end: endsLast ? span.end : member.end,\n    startDay: opensFirst ? span.startDay : member.startDay,\n    endDay: endsLast ? span.endDay : member.endDay,\n    groupSize: span.groupSize + 1,\n    openStart: span.openStart || member.openStart,\n    openEnd: span.openEnd || member.openEnd,\n  };\n}\n\n/**\n * One span per event, except where `groupId` asks for a collapsed chip.\n *\n * Identity keys carry the event's position, so two events that share an id stay\n * two spans: merging them would drop one silently, which is not something a\n * duplicated key should be able to do. Insertion order is preserved, so the\n * caller's ordering still decides ties.\n */\nexport function foldCollapseGroups<T>(\n  events: readonly FoldCalendarEvent<T>[],\n): readonly FoldLogicalSpan<T>[] {\n  if (isDevMode()) {\n    warnDuplicateIds(events);\n  }\n  const spans = new Map<string, FoldLogicalSpan<T>>();\n  events.forEach((event, index) => {\n    const key =\n      event.groupId === undefined\n        ? `event:${index}:${event.id}`\n        : `group:${event.groupId}`;\n    const incoming = spanOf(event, key);\n    const existing = spans.get(key);\n    spans.set(\n      key,\n      existing === undefined ? incoming : mergeMember(existing, incoming),\n    );\n  });\n  return [...spans.values()];\n}\n","import { isDevMode } from \"@angular/core\";\n\nimport { foldCountByDay, foldMakeDay, foldWeekendOr } from \"./cell\";\nimport { foldPackRow } from \"./row-pack\";\nimport { foldCollapseGroups, type FoldLogicalSpan } from \"./span\";\nimport {\n  foldEndOfMonth,\n  foldFromEpochDay,\n  foldIsCalendarDate,\n  foldStartOfMonth,\n  foldStartOfWeek,\n  foldToEpochDay,\n  type FoldCalendarDate,\n  type FoldWeekday,\n} from \"./date\";\nimport type {\n  FoldCalendarDay,\n  FoldCalendarEvent,\n  FoldCalendarWeek,\n} from \"./types\";\n\n/**\n * Month geometry — where every chip lands, and what did not fit.\n *\n * Packing spans into lanes is the one genuinely algorithmic part of a calendar,\n * so it lives on its own, framework-free apart from a dev-mode warning, and is\n * tested exhaustively without rendering anything.\n *\n * **Public on purpose.** `fold-calendar-month` is one consumer of this, not its\n * owner: an app that needs a month laid out but drawn its own way calls\n * `foldBuildMonthGrid` and renders the rows itself, and gets the packing, the\n * week-boundary clipping and the open edges for free. Pair it with\n * `foldCalendarNextFocus` for the keyboard, and with `FoldCalendarLabels` for\n * the strings.\n */\n\n/** How to build a month grid. */\nexport interface FoldMonthGridOptions {\n  /** Any date inside the month to display. */\n  readonly month: FoldCalendarDate;\n  /** Day the weeks start on. @default 'mon' */\n  readonly weekStartsOn?: FoldWeekday;\n  /** Days shaded as the weekend. @default ['sat', 'sun'] */\n  readonly weekendDays?: readonly FoldWeekday[] | undefined;\n  /** The day to flag as today; omit to flag none (an SSR-stable default). */\n  readonly today?: FoldCalendarDate | undefined;\n  /** Lanes a week row can stack before events spill into the overflow count. @default 3 */\n  readonly maxLanes?: number;\n  /**\n   * Always emit six week rows, so the grid keeps one height across months\n   * instead of reflowing between 4, 5 and 6 rows. @default false\n   */\n  readonly fixedWeeks?: boolean;\n}\n\n/** Columns in a week row. */\nconst DAYS_PER_WEEK = 7;\n\n/** Rows a fixed-height month grid always emits. */\nconst FIXED_WEEK_COUNT = 6;\n\n/** Lanes a week row stacks when the caller does not say. */\nconst DEFAULT_MAX_LANES = 3;\n\n/**\n * Every row's candidates, in one pass over the feed.\n *\n * Filtering the whole feed once per row is `O(rows × N)` and, worse, compares\n * strings; walking the feed once and dropping each span into the rows it\n * touches is `O(N)` on integers. At 5 000 events this part of the layout went\n * from 12.6 ms to 1.9 ms.\n *\n * Each row is then ordered the way a reader scans it: earliest start first, and\n * on a tie the longest span first, so the bars crossing the most days settle\n * into the top lanes.\n */\nfunction bucketByRow<T>(\n  spans: readonly FoldLogicalSpan<T>[],\n  firstRowDay: number,\n  rowCount: number,\n): readonly FoldLogicalSpan<T>[][] {\n  const rows: FoldLogicalSpan<T>[][] = Array.from(\n    { length: rowCount },\n    () => [],\n  );\n  const lastDay = firstRowDay + rowCount * DAYS_PER_WEEK - 1;\n\n  for (const span of spans) {\n    if (span.endDay < firstRowDay || span.startDay > lastDay) {\n      continue;\n    }\n    const from = Math.max(\n      0,\n      Math.floor((span.startDay - firstRowDay) / DAYS_PER_WEEK),\n    );\n    const to = Math.min(\n      rowCount - 1,\n      Math.floor((span.endDay - firstRowDay) / DAYS_PER_WEEK),\n    );\n    for (let row = from; row <= to; row += 1) {\n      rows[row]?.push(span);\n    }\n  }\n\n  for (const row of rows) {\n    row.sort((a, b) =>\n      a.startDay !== b.startDay\n        ? a.startDay - b.startDay\n        : b.endDay - b.startDay - (a.endDay - a.startDay),\n    );\n  }\n  return rows;\n}\n\n/**\n * Lanes a row may stack, as one number the whole grid agrees on.\n *\n * The clamp lives here alone: a component that also clamped would be a second\n * copy of the invariant, and the copy that forgot `NaN` would disable the lane\n * budget entirely (`lane >= NaN` is never true) while the grid template turned\n * `repeat(NaN, …)` into a dropped rule.\n */\nexport function foldClampLanes(value: number | undefined): number {\n  if (value === undefined || !Number.isFinite(value)) {\n    return DEFAULT_MAX_LANES;\n  }\n  return Math.max(0, Math.trunc(value));\n}\n\n/** The grid's own window — whole weeks, padded out when `fixedWeeks` asks. */\nfunction gridBounds(options: FoldMonthGridOptions): {\n  firstRowDay: number;\n  rowCount: number;\n} {\n  const weekStartsOn = options.weekStartsOn ?? \"mon\";\n  const firstRowDay = foldToEpochDay(\n    foldStartOfWeek(foldStartOfMonth(options.month), weekStartsOn),\n  );\n  const lastRowDay = foldToEpochDay(\n    foldStartOfWeek(foldEndOfMonth(options.month), weekStartsOn),\n  );\n  const naturalRows = (lastRowDay - firstRowDay) / DAYS_PER_WEEK + 1;\n  return {\n    firstRowDay,\n    rowCount:\n      options.fixedWeeks === true\n        ? Math.max(FIXED_WEEK_COUNT, naturalRows)\n        : naturalRows,\n  };\n}\n\n/**\n * Lays a month out as week rows with their events already packed into lanes.\n *\n * The grid runs from the week containing the 1st to the week containing the\n * last day, so it always starts and ends on whole weeks; `fixedWeeks` pads it\n * to six rows. Events outside that window are dropped, and an event crossing a\n * week boundary yields one band per week it touches.\n *\n * An unparseable `month` yields **no rows** rather than a grid of `Invalid\n * Date` cells, with a dev-mode warning naming the value.\n */\nexport function foldBuildMonthGrid<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  options: FoldMonthGridOptions,\n): readonly FoldCalendarWeek<T>[] {\n  if (!foldIsCalendarDate(options.month)) {\n    if (isDevMode()) {\n      console.warn(\n        `[fold-calendar] \"${options.month}\" is not a YYYY-MM-DD date; the grid is empty.`,\n      );\n    }\n    return [];\n  }\n\n  const maxLanes = foldClampLanes(options.maxLanes);\n  const { firstRowDay, rowCount } = gridBounds(options);\n  const rows = bucketByRow(foldCollapseGroups(events), firstRowDay, rowCount);\n\n  const hidden = new Map<number, number>();\n  const packed = rows.map((candidates, row) => {\n    const week = {\n      startDay: firstRowDay + row * DAYS_PER_WEEK,\n      start: foldFromEpochDay(firstRowDay + row * DAYS_PER_WEEK),\n      dayCount: DAYS_PER_WEEK,\n    };\n    return { week, ...foldPackRow(candidates, week, maxLanes, hidden) };\n  });\n\n  const context = {\n    month: options.month.slice(0, 7),\n    today: options.today,\n    weekendDays: foldWeekendOr(options.weekendDays),\n    counts: foldCountByDay(\n      events,\n      firstRowDay,\n      firstRowDay + rowCount * DAYS_PER_WEEK - 1,\n    ),\n    hidden,\n  };\n  return packed.map((row) => ({\n    start: row.week.start,\n    days: buildDays(row.week.startDay, context),\n    bands: row.bands,\n    hiddenCount: row.hiddenCount,\n  }));\n}\n\n/** The seven cells of one week row. */\nfunction buildDays(\n  weekStartDay: number,\n  context: Parameters<typeof foldMakeDay>[1],\n): readonly FoldCalendarDay[] {\n  return Array.from({ length: DAYS_PER_WEEK }, (_unused, offset) =>\n    foldMakeDay(weekStartDay + offset, context),\n  );\n}\n","import { Directive, TemplateRef, inject } from \"@angular/core\";\n\nimport type { FoldCalendarDate } from \"./date\";\nimport type { FoldCalendarDay, FoldCalendarEvent } from \"./types\";\n\n/**\n * The containers a calendar draws around its events, opened up as templates.\n *\n * The chip has always been replaceable ({@link FoldCalendarEventDirective});\n * these are the four places an app reaches for next — the cell behind the\n * chips, the heading above them, the period title, and the chip standing for\n * what did not fit. Each is a plain `<ng-template>` with a typed context, so\n * replacing one costs nothing and leaves the rest of the view alone.\n */\n\n/** What a day-cell template is handed. */\nexport interface FoldCalendarDayContext {\n  /** The cell to render — `let-day`. Carries its own counts and flags. */\n  readonly $implicit: FoldCalendarDay;\n}\n\n/**\n * Replaces the **inside of a month day cell** — by default just the day number.\n *\n * This is the hook for everything the calendar cannot know: a holiday marker, a\n * closure, \"3/8 staffed\", a price. The cell itself (the button, its focus\n * behaviour, its accessible name) stays the calendar's job.\n *\n * ```html\n * <ng-template foldCalendarDay let-day>\n *   <span>{{ day.dayOfMonth }}</span>\n *   @if (closed(day.date)) { <fold-icon name=\"lock\" size=\"xs\" /> }\n * </ng-template>\n * ```\n *\n * @selector `ng-template[foldCalendarDay]`\n */\n@Directive({ selector: \"ng-template[foldCalendarDay]\", standalone: true })\nexport class FoldCalendarDayDirective {\n  readonly template = inject<TemplateRef<FoldCalendarDayContext>>(TemplateRef);\n\n  static ngTemplateContextGuard(\n    _directive: FoldCalendarDayDirective,\n    context: unknown,\n  ): context is FoldCalendarDayContext {\n    // Compile-time only — Angular never calls this; the narrowing is the point.\n    return context !== undefined;\n  }\n}\n\n/** What a day-heading template is handed. */\nexport interface FoldCalendarHeadingContext<T> {\n  /** The day being headed — `let-date`. */\n  readonly $implicit: FoldCalendarDate;\n  /** The events filed under it, so a heading can count or summarise them. */\n  readonly events: readonly FoldCalendarEvent<T>[];\n}\n\n/**\n * Replaces the **day heading** of the agenda rail — by default a big day number\n * with a relative name beside it. Where an app puts a per-day count, a total,\n * or a quick action.\n *\n * @selector `ng-template[foldCalendarHeading]`\n */\n@Directive({ selector: \"ng-template[foldCalendarHeading]\", standalone: true })\nexport class FoldCalendarHeadingDirective<T = unknown> {\n  readonly template =\n    inject<TemplateRef<FoldCalendarHeadingContext<T>>>(TemplateRef);\n\n  static ngTemplateContextGuard<T>(\n    _directive: FoldCalendarHeadingDirective<T>,\n    context: unknown,\n  ): context is FoldCalendarHeadingContext<T> {\n    // Compile-time only — Angular never calls this; the narrowing is the point.\n    return context !== undefined;\n  }\n}\n\n/** What a toolbar-title template is handed. */\nexport interface FoldCalendarTitleContext {\n  /** The period name the toolbar would have rendered — `let-title`. */\n  readonly $implicit: string;\n  /** First day of the period on display. */\n  readonly from: FoldCalendarDate;\n  /** Last day of the period on display. */\n  readonly to: FoldCalendarDate;\n  /** The view the period belongs to. */\n  readonly view: string;\n}\n\n/**\n * Replaces the toolbar's **period title** — by default an `<h2>` holding\n * `foldViewTitle()`. Project one to change the wording, or to give the title a\n * heading level that fits the page's outline.\n *\n * @selector `ng-template[foldCalendarTitle]`\n */\n@Directive({ selector: \"ng-template[foldCalendarTitle]\", standalone: true })\nexport class FoldCalendarTitleDirective {\n  readonly template =\n    inject<TemplateRef<FoldCalendarTitleContext>>(TemplateRef);\n\n  static ngTemplateContextGuard(\n    _directive: FoldCalendarTitleDirective,\n    context: unknown,\n  ): context is FoldCalendarTitleContext {\n    // Compile-time only — Angular never calls this; the narrowing is the point.\n    return context !== undefined;\n  }\n}\n\n/** What an overflow-chip template is handed. */\nexport interface FoldCalendarOverflowContext {\n  /** How many events this day could not show — `let-count`. */\n  readonly $implicit: number;\n  /** The day they belong to. */\n  readonly date: FoldCalendarDate;\n}\n\n/**\n * Replaces the month view's **`+N` chip** — by default a small text button.\n * Where an app puts an avatar stack, or the trigger of a \"see all\" popover.\n *\n * @selector `ng-template[foldCalendarOverflow]`\n */\n@Directive({ selector: \"ng-template[foldCalendarOverflow]\", standalone: true })\nexport class FoldCalendarOverflowDirective {\n  readonly template =\n    inject<TemplateRef<FoldCalendarOverflowContext>>(TemplateRef);\n\n  static ngTemplateContextGuard(\n    _directive: FoldCalendarOverflowDirective,\n    context: unknown,\n  ): context is FoldCalendarOverflowContext {\n    // Compile-time only — Angular never calls this; the narrowing is the point.\n    return context !== undefined;\n  }\n}\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport {\n  Component,\n  ElementRef,\n  Injector,\n  booleanAttribute,\n  computed,\n  contentChild,\n  inject,\n  input,\n  model,\n  numberAttribute,\n  output,\n} from \"@angular/core\";\n\nimport type { FoldIconName } from \"../../../foundations/icon/builtin-icons\";\nimport { FoldIconComponent } from \"../../../foundations/icon/icon.component\";\nimport { FoldCalendarChromeDirective } from \"../core/chrome.directive\";\nimport {\n  foldAddDays,\n  foldIsoWeek,\n  foldStartOfWeek,\n  type FoldCalendarDate,\n  type FoldWeekday,\n} from \"../core/date\";\nimport { FoldCalendarRovingFocus } from \"../core/roving-focus\";\nimport { foldBuildMonthGrid, foldClampLanes } from \"../core/month-grid\";\nimport {\n  FoldCalendarDayDirective,\n  FoldCalendarOverflowDirective,\n} from \"../core/slots.directive\";\nimport type {\n  FoldCalendarBand,\n  FoldCalendarDay,\n  FoldCalendarDayModifiers,\n  FoldCalendarEvent,\n  FoldCalendarWeek,\n} from \"../core/types\";\n\n/** A Monday, used only to walk seven weekday names out of `Intl`. */\nconst WEEKDAY_SAMPLE = \"2026-01-05\";\n\n/** Keys that activate a day cell — the ones a `<button>` would have handled. */\nconst ACTIVATION_KEYS = new Set([\"Enter\", \" \", \"Spacebar\"]);\n\n/**\n * `<fold-calendar-month>` — a month grid where events span the days they cover.\n *\n * The grid is a **date axis**: seven columns of whole days, and over them a\n * layer of bands, each stretching from the column its event starts on to the\n * column it ends on. An event crossing a week boundary is drawn once per week\n * with an open edge on the side that continues, so a three-week holiday reads\n * as one thing rather than twenty-one chips.\n *\n * Dates are plain `YYYY-MM-DD` strings — see `calendar-date.ts` for why that,\n * and not `Date`.\n *\n * ## Inputs\n * | Input          | Type                          | Default       | Meaning |\n * |----------------|-------------------------------|---------------|---------|\n * | `month`        | `FoldCalendarDate`            | —             | **Two-way.** Any date in the month on display; keyboard paging writes back. |\n * | `events`       | `FoldCalendarEvent<T>[]`      | `[]`          | What to plot. Anything outside the grid is ignored. |\n * | `today`        | `FoldCalendarDate`            | —             | The day to mark. Omitted, nothing is marked — pass `foldToday()`. |\n * | `weekStartsOn` | `FoldWeekday`                 | the locale's   | Which day opens the row — `Intl.Locale` knows, so it is only an override. |\n * | `weekendDays`  | `FoldWeekday[]`               | the locale's   | Which days are shaded — a separate fact from the anchor, and also in the locale. |\n * | `showWeekNumbers` | `boolean`                  | `false`       | An ISO week number in a leading column. |\n * | `maxLanes`     | `number`                      | `3`           | Bands a week stacks before the rest collapse into overflow chips. |\n * | `fixedWeeks`   | `boolean`                     | `false`       | Always six rows, so the grid keeps one height across months. |\n * | `dayModifiers` | `(day) => string[]`           | —             | Extra names per cell, emitted as `data-fold-day-modifiers`. |\n * | `locale`       | `string`                      | runtime       | Drives month/weekday names through `Intl`. |\n * | `labels`       | `Partial<FoldCalendarLabels>` | —             | Per-instance overrides of the chrome strings. |\n *\n * ## Outputs\n * | Output          | Payload                | Fires on |\n * |-----------------|------------------------|----------|\n * | `dayClick`      | `FoldCalendarDate`     | A day cell activated by click, `Enter` or `Space`. |\n * | `eventClick`    | `FoldCalendarEvent<T>` | A band clicked. Grouped bands emit their representative. |\n * | `overflowClick` | `FoldCalendarDate`     | A `+N` chip — the **day** whose events overflowed, so the caller knows which one to open. |\n *\n * ## Templates\n * | Directive              | Replaces |\n * |------------------------|----------|\n * | `foldCalendarEvent`    | The inside of a band — icon + label + count. |\n * | `foldCalendarDay`      | The inside of a day cell — the day number. |\n * | `foldCalendarOverflow` | The `+N` chip. |\n *\n * ## Theming\n * | CSS variable                          | Default | Sets |\n * |---------------------------------------|---------|------|\n * | `--fold-calendar-month-header-row`    | `30px`  | Height of the day-number row. |\n * | `--fold-calendar-month-lane`          | `22px`  | Height of one band lane. |\n * | `--fold-calendar-month-row-min-height`| `112px` | Minimum height of a week row. |\n * | `--fold-calendar-month-daynum-size`   | `22px`  | The day number's round box. |\n * | `--fold-calendar-month-cell-padding`  | `--fold-space-sm` | Padding inside a day cell. |\n * | `--fold-calendar-month-week-number-width` | `34px` | The ISO week column, when shown. |\n * | `--fold-calendar-bar-width`           | `3px`   | The tone bar down a band's leading edge. |\n * | `--fold-calendar-band-radius`         | `--fold-radius-sm` | Band and chip corners. |\n * | `--fold-calendar-band-gutter`         | `--fold-space-xs` | Gap between a band and its cell edge. |\n *\n * ## Accessibility\n * The **date grid** is the ARIA structure: `role=\"grid\"` over rows of\n * `gridcell` days, with one roving tab stop (the focused day, else today, else\n * the 1st) and the grid pattern on the arrow keys — horizontal steps a day,\n * vertical steps a week, `Home`/`End` snap to the week, and `PageUp`/`PageDown`\n * page the month, writing back through `month`.\n *\n * Bands cannot be `gridcell`s — they span columns, which is the whole point —\n * so they are **`aria-hidden` mouse affordances**, and each day cell instead\n * announces its date, the today marker, its **event count** and, when the lane\n * budget hid some, **how many it is not showing**.\n *\n * That makes `dayClick` **load-bearing, not optional**: it is the accessible\n * path into an individual event. A month that handles only `eventClick` is a\n * view whose events no keyboard can reach — wire `dayClick` to a day or list\n * view, as the gallery does.\n *\n * @selector `fold-calendar-month`\n *\n * @example\n * ```html\n * <fold-calendar-month\n *   [(month)]=\"month\"\n *   [events]=\"events()\"\n *   [today]=\"today\"\n *   (dayClick)=\"openDay($event)\"\n *   (eventClick)=\"openEvent($event)\"\n * />\n * ```\n */\n@Component({\n  selector: \"fold-calendar-month\",\n  standalone: true,\n  imports: [NgTemplateOutlet, FoldIconComponent],\n  templateUrl: \"./month.component.html\",\n  styleUrl: \"./month.component.scss\",\n  hostDirectives: [\n    {\n      directive: FoldCalendarChromeDirective,\n      inputs: [\"locale\", \"labels\", \"formats\"],\n    },\n  ],\n  host: {\n    \"data-fold-calendar\": \"\",\n    role: \"grid\",\n    \"[attr.aria-label]\": \"chrome.l().grid\",\n    \"[class.has-week-numbers]\": \"showWeekNumbers()\",\n  },\n})\nexport class FoldCalendarMonthComponent<T = unknown> {\n  /** Any date inside the month on display. Two-way: keyboard paging writes back. */\n  readonly month = model.required<FoldCalendarDate>();\n  /** Events to plot; those missing the grid entirely are ignored. */\n  readonly events = input<readonly FoldCalendarEvent<T>[]>([]);\n  /** The day to mark as today. Omit and none is marked (an SSR-stable default). */\n  readonly today = input<FoldCalendarDate>();\n  /** Day the weeks start on. @default the locale's own first day */\n  readonly weekStartsOn = input<FoldWeekday>();\n  /** Days shaded as the weekend. @default the locale's own weekend */\n  readonly weekendDays = input<readonly FoldWeekday[]>();\n  /** Show the ISO week number in a leading column. */\n  readonly showWeekNumbers = input(false, { transform: booleanAttribute });\n  /** Bands a week stacks before the rest collapse into overflow chips. @default 3 */\n  readonly maxLanes = input(3, { transform: numberAttribute });\n  /** Always emit six rows, so the grid keeps one height across months. */\n  readonly fixedWeeks = input(false, { transform: booleanAttribute });\n  /** Extra names for a cell, emitted as `data-fold-day-modifiers`. */\n  readonly dayModifiers = input<FoldCalendarDayModifiers>();\n\n  /** A day cell was activated. */\n  readonly dayClick = output<FoldCalendarDate>();\n  /** A band was clicked; a grouped band emits its representative event. */\n  readonly eventClick = output<FoldCalendarEvent<T>>();\n  /** A `+N` chip was clicked, with the day whose events overflowed. */\n  readonly overflowClick = output<FoldCalendarDate>();\n\n  /** Labels, locale and the projected chip template — see the directive. */\n  protected readonly chrome = inject(FoldCalendarChromeDirective);\n\n  private readonly host = inject(ElementRef);\n  private readonly projectedDay = contentChild(FoldCalendarDayDirective);\n  private readonly projectedOverflow = contentChild(\n    FoldCalendarOverflowDirective,\n  );\n\n  /** The custom day-cell template, when one is projected. */\n  protected readonly dayContent = computed(\n    () => this.projectedDay()?.template ?? null,\n  );\n\n  /** The custom overflow-chip template, when one is projected. */\n  protected readonly overflowContent = computed(\n    () => this.projectedOverflow()?.template ?? null,\n  );\n\n  /**\n   * Lanes this grid stacks — clamped once, by the layout, and read back here so\n   * the geometry and the CSS row template can never disagree.\n   */\n  private readonly lanes = computed(() => foldClampLanes(this.maxLanes()));\n\n  /** The laid-out grid: week rows, their days, and their packed bands. */\n  /** The anchor in force: the caller's, else the one the locale declares. */\n  protected readonly anchor = computed(() =>\n    this.chrome.anchor(this.weekStartsOn()),\n  );\n\n  protected readonly weeks = computed<readonly FoldCalendarWeek<T>[]>(() =>\n    foldBuildMonthGrid(this.events(), {\n      month: this.month(),\n      weekStartsOn: this.anchor(),\n      weekendDays: this.chrome.weekend(this.weekendDays()),\n      maxLanes: this.lanes(),\n      fixedWeeks: this.fixedWeeks(),\n      today: this.today(),\n    }),\n  );\n\n  /** Column headers, walked out of `Intl` so every locale comes for free. */\n  protected readonly weekdayNames = computed<readonly string[]>(() => {\n    const sample = foldStartOfWeek(WEEKDAY_SAMPLE, this.anchor());\n    return Array.from({ length: 7 }, (_unused, offset) =>\n      this.chrome.format(foldAddDays(sample, offset), \"weekdayShort\"),\n    );\n  });\n\n  /**\n   * Columns before the first day. The week-number column is a real grid column,\n   * so everything placed by index — cells, bands, overflow chips — shifts with\n   * it, and nothing has to know why.\n   */\n  protected readonly columnOffset = computed(() =>\n    this.showWeekNumbers() ? 1 : 0,\n  );\n\n  /** The ISO week each row belongs to — always Monday-based, whatever the anchor. */\n  protected weekNumber(week: FoldCalendarWeek<T>): number {\n    return foldIsoWeek(week.start);\n  }\n\n  /**\n   * Row track sizes: the day-number row, one row per lane, then the overflow\n   * row. Both heights are themeable knobs, which is why they are `var()`s.\n   */\n  protected readonly rowTemplate = computed(\n    () =>\n      `var(--fold-calendar-month-header-row, 30px) repeat(${this.lanes()}, var(--fold-calendar-month-lane, 22px)) auto`,\n  );\n\n  /** The overflow chips' row — always the one after the last lane. */\n  protected readonly overflowRow = computed(() => this.lanes() + 2);\n\n  /** Every date the grid currently shows — the bound focus may not leave. */\n  private readonly gridDates = computed<ReadonlySet<FoldCalendarDate>>(\n    () =>\n      new Set(this.weeks().flatMap((week) => week.days.map((day) => day.date))),\n  );\n\n  /** Where the tab stop sits before the user moves it: today, else the 1st. */\n  private readonly defaultStop = computed<FoldCalendarDate | null>(() => {\n    const today = this.today();\n    if (today !== undefined && this.gridDates().has(today)) {\n      return today;\n    }\n    return (\n      this.weeks()\n        .flatMap((week) => week.days)\n        .find((day) => day.inMonth)?.date ?? null\n    );\n  });\n\n  /** The grid's single tab stop and the arrow keys that move it. */\n  private readonly focus = new FoldCalendarRovingFocus({\n    dates: this.gridDates,\n    fallback: this.defaultStop,\n    weekStartsOn: this.anchor,\n    root: () => this.rootElement(),\n    page: (date) => this.month.set(date),\n    injector: inject(Injector),\n  });\n\n  protected dayTabIndex(date: FoldCalendarDate): 0 | -1 {\n    return this.focus.tabIndexFor(date);\n  }\n\n  /** A cell's caller-supplied names, as one `~=`-matchable attribute. */\n  protected dayModifierAttr(day: FoldCalendarDay): string | null {\n    const names = this.dayModifiers()?.(day) ?? [];\n    return names.length === 0 ? null : names.join(\" \");\n  }\n\n  /**\n   * A day's accessible name: its date, the today marker, what sits on it, and\n   * what the lane budget is keeping from it.\n   */\n  protected dayLabel(day: FoldCalendarDay): string {\n    const labels = this.chrome.l();\n    const parts = [this.chrome.format(day.date, \"dateFull\")];\n    if (day.isToday) {\n      parts.push(labels.today);\n    }\n    if (day.eventCount > 0) {\n      parts.push(labels.eventCount(day.eventCount));\n    }\n    if (day.hiddenCount > 0) {\n      parts.push(labels.hiddenCount(day.hiddenCount));\n    }\n    return parts.join(\", \");\n  }\n\n  /** A band's text: the group's label when it stands for several events. */\n  protected bandLabel(band: FoldCalendarBand<T>): string {\n    if (band.groupSize > 1) {\n      return band.event.groupLabel ?? band.event.label;\n    }\n    return band.event.label;\n  }\n\n  /** The leading glyph — suppressed on a continuation, which has no real start. */\n  protected bandIcon(band: FoldCalendarBand<T>): FoldIconName | null {\n    if (band.continuesBefore) {\n      return null;\n    }\n    return band.event.icon ?? null;\n  }\n\n  protected onDayFocus(date: FoldCalendarDate): void {\n    this.focus.onFocus(date);\n  }\n\n  /** A cell is not a `<button>`, so activation is wired by hand. */\n  protected onDayKeydown(event: KeyboardEvent, date: FoldCalendarDate): void {\n    if (event.target !== event.currentTarget) {\n      return;\n    }\n    if (ACTIVATION_KEYS.has(event.key)) {\n      event.preventDefault();\n      this.dayClick.emit(date);\n      return;\n    }\n    if (this.focus.move(event.key, date)) {\n      event.preventDefault();\n    }\n  }\n\n  private rootElement(): HTMLElement | null {\n    const root: unknown = this.host.nativeElement;\n    return root instanceof HTMLElement ? root : null;\n  }\n}\n","<div class=\"foldcal-weekdays\" role=\"row\">\n  @if (showWeekNumbers()) {\n    <span class=\"foldcal-weekday foldcal-weeknum-head\" role=\"columnheader\">\n      {{ chrome.l().weekNumberShort }}\n    </span>\n  }\n  @for (name of weekdayNames(); track $index) {\n    <span class=\"foldcal-weekday\" role=\"columnheader\">{{ name }}</span>\n  }\n</div>\n\n@for (week of weeks(); track week.start) {\n  <div class=\"foldcal-week\" role=\"row\" [style.gridTemplateRows]=\"rowTemplate()\">\n    <!--\n      ISO weeks always start on Monday and belong to the year holding their\n      Thursday, so this is not derivable from the calendar's own anchor.\n    -->\n    @if (showWeekNumbers()) {\n      <span\n        class=\"foldcal-weeknum\"\n        role=\"rowheader\"\n        [attr.aria-label]=\"chrome.l().weekNumber(weekNumber(week))\"\n        >{{ weekNumber(week) }}</span\n      >\n    }\n    <!--\n      The cell is the focusable widget, as the ARIA grid pattern asks: a\n      <button> here would have its native role overwritten by role=\"gridcell\",\n      so activation is wired by hand instead.\n    -->\n    @for (day of week.days; track day.date; let column = $index) {\n      <div\n        class=\"foldcal-day\"\n        role=\"gridcell\"\n        [attr.data-fold-day]=\"day.date\"\n        [attr.data-fold-day-modifiers]=\"dayModifierAttr(day)\"\n        [class.is-outside]=\"!day.inMonth\"\n        [class.is-today]=\"day.isToday\"\n        [class.is-weekend]=\"day.isWeekend\"\n        [style.gridColumn]=\"column + 1 + columnOffset()\"\n        [attr.tabindex]=\"dayTabIndex(day.date)\"\n        [attr.aria-label]=\"dayLabel(day)\"\n        [attr.aria-current]=\"day.isToday ? 'date' : null\"\n        (click)=\"dayClick.emit(day.date)\"\n        (focus)=\"onDayFocus(day.date)\"\n        (keydown)=\"onDayKeydown($event, day.date)\"\n      >\n        @if (dayContent(); as projected) {\n          <ng-container\n            [ngTemplateOutlet]=\"projected\"\n            [ngTemplateOutletContext]=\"{ $implicit: day }\"\n          />\n        } @else {\n          <span class=\"foldcal-daynum\">{{ day.dayOfMonth }}</span>\n        }\n      </div>\n    }\n\n    <!--\n      Bands span columns, so they cannot be gridcells; they are hidden from\n      the a11y tree and each day cell announces its own event count instead.\n    -->\n    @for (band of week.bands; track band.key) {\n      <button\n        type=\"button\"\n        class=\"foldcal-band\"\n        aria-hidden=\"true\"\n        tabindex=\"-1\"\n        [attr.data-tone]=\"band.event.tone ?? 'neutral'\"\n        [class.continues-before]=\"band.continuesBefore\"\n        [class.continues-after]=\"band.continuesAfter\"\n        [class.half-start]=\"band.startHalfDay !== undefined\"\n        [class.half-end]=\"band.endHalfDay !== undefined\"\n        [style.gridColumn]=\"\n          band.startColumn +\n          1 +\n          columnOffset() +\n          ' / ' +\n          (band.endColumn + 2 + columnOffset())\n        \"\n        [style.gridRow]=\"band.lane + 2\"\n        [attr.title]=\"bandLabel(band)\"\n        (click)=\"eventClick.emit(band.event)\"\n      >\n        @if (chrome.eventContent(); as projected) {\n          <ng-container\n            [ngTemplateOutlet]=\"projected\"\n            [ngTemplateOutletContext]=\"{ $implicit: band.event, band: band }\"\n          />\n        } @else {\n          <span class=\"foldcal-band-bar\"></span>\n          @if (bandIcon(band); as icon) {\n            <fold-icon class=\"foldcal-band-icon\" [name]=\"icon\" size=\"sm\" />\n          }\n          <span class=\"foldcal-band-label\">{{ bandLabel(band) }}</span>\n          @if (band.groupSize > 1) {\n            <span class=\"foldcal-band-count\">{{ band.groupSize }}</span>\n          }\n        }\n      </button>\n    }\n\n    <!-- One chip per crowded day, in that day's own column. -->\n    @for (day of week.days; track day.date; let column = $index) {\n      @if (day.hiddenCount > 0) {\n        <button\n          type=\"button\"\n          class=\"foldcal-overflow\"\n          aria-hidden=\"true\"\n          tabindex=\"-1\"\n          [style.gridColumn]=\"column + 1 + columnOffset()\"\n          [style.gridRow]=\"overflowRow()\"\n          (click)=\"overflowClick.emit(day.date)\"\n        >\n          @if (overflowContent(); as projected) {\n            <ng-container\n              [ngTemplateOutlet]=\"projected\"\n              [ngTemplateOutletContext]=\"{\n                $implicit: day.hiddenCount,\n                date: day.date,\n              }\"\n            />\n          } @else {\n            {{ chrome.l().moreEvents(day.hiddenCount) }}\n          }\n        </button>\n      }\n    }\n  </div>\n}\n","import type { FoldCalendarDate } from \"./date\";\nimport type { FoldCalendarEvent } from \"./types\";\n\n/**\n * The three selections every view and every consumer makes over a feed.\n *\n * Deliberately the smallest, least coupled part of the family: an app that\n * wants the calendar's semantics — \"covers this day\", \"overlaps this window\",\n * \"belongs to a live feed\" — without any of its rendering imports only this.\n */\n\n/**\n * Events covering `date`, in the caller's order — the selection the week, day\n * and list views render, where chips stack in a column and need no packing.\n */\nexport function foldEventsOnDay<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  date: FoldCalendarDate,\n): readonly FoldCalendarEvent<T>[] {\n  return events.filter((event) => event.start <= date && event.end >= date);\n}\n\n/** Events overlapping `[from, to]` at all, in the caller's order. */\nexport function foldEventsInRange<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  from: FoldCalendarDate,\n  to: FoldCalendarDate,\n): readonly FoldCalendarEvent<T>[] {\n  return events.filter((event) => event.end >= from && event.start <= to);\n}\n\n/**\n * Events from the feeds in `active`, in the caller's order — the other half of\n * `fold-calendar-source-filter`, which owns only the selection.\n *\n * `null` means nothing has been switched off yet and everything passes; it is\n * the filter chips' own initial value, so the one function built to consume\n * that model accepts it rather than making every caller write the ternary.\n * An empty `Set` is the opposite — every feed switched off — which is why the\n * two are not collapsed.\n *\n * An event with no `sourceKey` belongs to no feed, so no chip can hide it and\n * it always passes.\n */\nexport function foldFilterBySource<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  active: ReadonlySet<string> | null,\n): readonly FoldCalendarEvent<T>[] {\n  if (active === null) {\n    return events;\n  }\n  return events.filter(\n    (event) => event.sourceKey === undefined || active.has(event.sourceKey),\n  );\n}\n","import {\n  FOLD_NO_HIDDEN_DAYS,\n  foldCountByDay,\n  foldMakeDay,\n  foldWeekendOr,\n} from \"./cell\";\nimport {\n  foldStartOfWeek,\n  foldToEpochDay,\n  type FoldCalendarDate,\n  type FoldWeekday,\n} from \"./date\";\nimport { foldEventsOnDay } from \"./filters\";\nimport type { FoldCalendarDayEvents, FoldCalendarEvent } from \"./types\";\n\n/**\n * Render models for the column views (week, day).\n *\n * Nothing is packed here: chips stack in a column, so a multi-day event simply\n * appears under every day it covers, and no event is ever dropped — which is\n * why these cells always report `hiddenCount: 0`.\n */\n\n/** How to build a column view. */\nexport interface FoldDayColumnsOptions {\n  /** Any date inside the range to display. */\n  readonly date: FoldCalendarDate;\n  /** Day the week starts on — ignored when building a single day. @default 'mon' */\n  readonly weekStartsOn?: FoldWeekday;\n  /** Days shaded as the weekend. @default ['sat', 'sun'] */\n  readonly weekendDays?: readonly FoldWeekday[] | undefined;\n  /** The day to flag as today; omit to flag none. */\n  readonly today?: FoldCalendarDate | undefined;\n}\n\n/** Columns in a week row. */\nconst DAYS_PER_WEEK = 7;\n\n/** One day cell plus the events covering it. */\nfunction dayWithEvents<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  epochDay: number,\n  month: string,\n  options: FoldDayColumnsOptions,\n  counts: ReadonlyMap<number, number>,\n): FoldCalendarDayEvents<T> {\n  const day = foldMakeDay(epochDay, {\n    month,\n    today: options.today,\n    weekendDays: foldWeekendOr(options.weekendDays),\n    counts,\n    hidden: FOLD_NO_HIDDEN_DAYS,\n  });\n  return { day, events: foldEventsOnDay(events, day.date) };\n}\n\n/**\n * The seven days of `date`'s week, each with the events covering it — the\n * render model of the week view.\n */\nexport function foldBuildWeek<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  options: FoldDayColumnsOptions,\n): readonly FoldCalendarDayEvents<T>[] {\n  const startDay = foldToEpochDay(\n    foldStartOfWeek(options.date, options.weekStartsOn ?? \"mon\"),\n  );\n  const month = options.date.slice(0, 7);\n  const counts = foldCountByDay(events, startDay, startDay + DAYS_PER_WEEK - 1);\n  return Array.from({ length: DAYS_PER_WEEK }, (_unused, offset) =>\n    dayWithEvents(events, startDay + offset, month, options, counts),\n  );\n}\n\n/** A single day with its events — the render model of the day view. */\nexport function foldBuildDay<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  options: FoldDayColumnsOptions,\n): FoldCalendarDayEvents<T> {\n  const day = foldToEpochDay(options.date);\n  return dayWithEvents(\n    events,\n    day,\n    options.date.slice(0, 7),\n    options,\n    foldCountByDay(events, day, day),\n  );\n}\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport { Component, computed, inject, input, output } from \"@angular/core\";\n\nimport { FoldIconComponent } from \"../../../foundations/icon/icon.component\";\nimport { FoldCalendarChromeDirective } from \"../core/chrome.directive\";\nimport { foldBuildWeek } from \"../core/columns\";\nimport type { FoldCalendarDate, FoldWeekday } from \"../core/date\";\nimport type { FoldCalendarDayEvents, FoldCalendarEvent } from \"../core/types\";\n\n/**\n * `<fold-calendar-week>` — one week as seven day columns of stacked chips.\n *\n * Where the month view packs spans into lanes, a week simply lists what covers\n * each day: a three-day event appears under all three, which is the reading a\n * week is for. Nothing spans, so nothing is clipped and there is no overflow.\n *\n * ## Inputs\n * | Input          | Type                     | Default | Meaning |\n * |----------------|--------------------------|---------|---------|\n * | `date`         | `FoldCalendarDate`       | —       | Any date in the week on display. |\n * | `events`       | `FoldCalendarEvent<T>[]` | `[]`    | What to list. |\n * | `today`        | `FoldCalendarDate`       | —       | The day to mark. |\n * | `weekStartsOn` | `FoldWeekday`            | the locale's | Which day opens the week — `Intl.Locale` knows. |\n * | `weekendDays`  | `FoldWeekday[]`          | the locale's | Which days are shaded. |\n * | `locale`       | `string`                 | runtime | Drives the column headers through `Intl`. |\n * | `labels`       | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |\n *\n * `date` is a plain input, not a `model`: this view never pages itself, so\n * writing back would be a promise it does not keep. Pair it with\n * `<fold-calendar-toolbar>`, which does own the paging.\n *\n * ## Theming\n * | CSS variable                          | Default | Sets |\n * |---------------------------------------|---------|------|\n * | `--fold-calendar-week-column-height`  | `320px` | Height of the day columns. |\n * | `--fold-calendar-bar-width`           | `3px`   | The tone bar down a chip's leading edge. |\n * | `--fold-calendar-band-radius`         | `--fold-radius-sm` | Chip corners. |\n *\n * ## Outputs\n * | Output       | Payload                | Fires on |\n * |--------------|------------------------|----------|\n * | `dayClick`   | `FoldCalendarDate`     | A column header activated. |\n * | `eventClick` | `FoldCalendarEvent<T>` | A chip activated. |\n *\n * ## Accessibility\n * Each column is a `<section>` named by its full date, holding a header button\n * and a list of chips. Because a chip sits **inside** the day it belongs to —\n * no spanning, no overlay — every control is a real child in the natural tab\n * order, so this view needs none of the month grid's roving-tabindex machinery\n * and every event is reachable by keyboard.\n *\n * @selector `fold-calendar-week`\n *\n * @example\n * ```html\n * <fold-calendar-week\n *   [(date)]=\"date\"\n *   [events]=\"events()\"\n *   [today]=\"today\"\n *   (eventClick)=\"open($event)\"\n * />\n * ```\n */\n@Component({\n  selector: \"fold-calendar-week\",\n  standalone: true,\n  imports: [NgTemplateOutlet, FoldIconComponent],\n  templateUrl: \"./week.component.html\",\n  styleUrl: \"./week.component.scss\",\n  hostDirectives: [\n    {\n      directive: FoldCalendarChromeDirective,\n      inputs: [\"locale\", \"labels\", \"formats\"],\n    },\n  ],\n})\nexport class FoldCalendarWeekComponent<T = unknown> {\n  /** Any date inside the week on display. */\n  readonly date = input.required<FoldCalendarDate>();\n  /** Events to list under the days they cover. */\n  readonly events = input<readonly FoldCalendarEvent<T>[]>([]);\n  /** The day to mark as today. */\n  readonly today = input<FoldCalendarDate>();\n  /** Day the week starts on. @default the locale's own first day */\n  readonly weekStartsOn = input<FoldWeekday>();\n  /** Days shaded as the weekend. @default ['sat', 'sun'] */\n  readonly weekendDays = input<readonly FoldWeekday[]>();\n\n  /** A column header was activated. */\n  readonly dayClick = output<FoldCalendarDate>();\n  /** A chip was activated. */\n  readonly eventClick = output<FoldCalendarEvent<T>>();\n\n  /** Labels, locale and the projected chip template — see the directive. */\n  protected readonly chrome = inject(FoldCalendarChromeDirective);\n\n  protected readonly columns = computed<readonly FoldCalendarDayEvents<T>[]>(\n    () =>\n      foldBuildWeek(this.events(), {\n        date: this.date(),\n        weekStartsOn: this.chrome.anchor(this.weekStartsOn()),\n        weekendDays: this.chrome.weekend(this.weekendDays()),\n        today: this.today(),\n      }),\n  );\n\n  protected weekdayName(column: FoldCalendarDayEvents<T>): string {\n    return this.chrome.format(column.day.date, \"weekdayShort\");\n  }\n\n  /** A column's accessible name: its date, the today marker, and what sits on it. */\n  protected columnLabel(column: FoldCalendarDayEvents<T>): string {\n    const labels = this.chrome.l();\n    const parts = [this.chrome.format(column.day.date, \"dateFull\")];\n    if (column.day.isToday) {\n      parts.push(labels.today);\n    }\n    if (column.day.eventCount > 0) {\n      parts.push(labels.eventCount(column.day.eventCount));\n    }\n    return parts.join(\", \");\n  }\n}\n","<div class=\"foldcalw\" [attr.aria-label]=\"chrome.l().grid\" role=\"group\">\n  @for (column of columns(); track column.day.date) {\n    <section\n      class=\"foldcalw-col\"\n      [class.is-today]=\"column.day.isToday\"\n      [class.is-weekend]=\"column.day.isWeekend\"\n      [attr.aria-label]=\"columnLabel(column)\"\n    >\n      <button\n        type=\"button\"\n        class=\"foldcalw-head\"\n        [attr.aria-current]=\"column.day.isToday ? 'date' : null\"\n        (click)=\"dayClick.emit(column.day.date)\"\n      >\n        <span class=\"foldcalw-weekday\">{{ weekdayName(column) }}</span>\n        <span class=\"foldcalw-daynum\">{{ column.day.dayOfMonth }}</span>\n      </button>\n\n      <ul class=\"foldcalw-list\">\n        @for (event of column.events; track event.id) {\n          <li>\n            <button\n              type=\"button\"\n              class=\"foldcal-chip\"\n              [attr.data-tone]=\"event.tone ?? 'neutral'\"\n              (click)=\"eventClick.emit(event)\"\n            >\n              @if (chrome.eventContent(); as projected) {\n                <ng-container\n                  [ngTemplateOutlet]=\"projected\"\n                  [ngTemplateOutletContext]=\"{ $implicit: event, band: null }\"\n                />\n              } @else {\n                <span class=\"foldcal-chip-bar\"></span>\n                @if (event.icon; as icon) {\n                  <fold-icon\n                    class=\"foldcal-chip-icon\"\n                    [name]=\"icon\"\n                    size=\"sm\"\n                  />\n                }\n                <span class=\"foldcal-chip-body\">\n                  <span class=\"foldcal-chip-label\">{{ event.label }}</span>\n                  @if (event.subline) {\n                    <span class=\"foldcal-chip-sub\">{{ event.subline }}</span>\n                  }\n                </span>\n              }\n            </button>\n          </li>\n        }\n      </ul>\n    </section>\n  }\n</div>\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport { Component, computed, inject, input, output } from \"@angular/core\";\n\nimport { FoldIconComponent } from \"../../../foundations/icon/icon.component\";\nimport { FoldCalendarChromeDirective } from \"../core/chrome.directive\";\nimport type { FoldCalendarDate } from \"../core/date\";\nimport { foldEventsOnDay } from \"../core/filters\";\nimport type { FoldCalendarEvent } from \"../core/types\";\n\n/**\n * `<fold-calendar-day>` — one day, its events listed in full.\n *\n * The end of the drill-down: where the month view has room only for a label,\n * this one has room for the subline too, so it is the view a `dayClick`\n * naturally lands on.\n *\n * ## Inputs\n * | Input    | Type                     | Default | Meaning |\n * |----------|--------------------------|---------|---------|\n * | `date`   | `FoldCalendarDate`       | —       | The day on display. |\n * | `events` | `FoldCalendarEvent<T>[]` | `[]`    | Filtered to those covering `date`. |\n * | `today`  | `FoldCalendarDate`       | —       | Marks the header when it matches. |\n * | `locale` | `string`                 | runtime | Drives the header through `Intl`. |\n * | `labels` | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |\n *\n * ## Outputs\n * | Output       | Payload                | Fires on |\n * |--------------|------------------------|----------|\n * | `eventClick` | `FoldCalendarEvent<T>` | A chip activated. |\n *\n * ## Slots\n * | Selector                       | Region |\n * |--------------------------------|--------|\n * | `button[empty]`, `a[empty]`, `div[empty]` | Under the empty message — the place for a \"new request\" action. |\n * | *(default)*                    | After the list. |\n *\n * The `empty` slot is **tag-qualified** (rule 4.8): `empty` is also an input on\n * `fold-field` and `fold-data-table`, and a bare `[empty]` selector would\n * capture either of them whole.\n *\n * ## Theming\n * | CSS variable                       | Default | Sets |\n * |------------------------------------|---------|------|\n * | `--fold-calendar-day-number-size`  | `--fold-text-3xl` | The big day number. |\n * | `--fold-calendar-bar-width`        | `3px`   | The tone bar down a chip's leading edge. |\n * | `--fold-calendar-band-radius`      | `--fold-radius-sm` | Chip corners. |\n *\n * @selector `fold-calendar-day`\n *\n * @example\n * ```html\n * <fold-calendar-day [date]=\"date()\" [events]=\"events()\" [today]=\"today\">\n *   <button empty foldButton (click)=\"request()\">New request</button>\n * </fold-calendar-day>\n * ```\n */\n@Component({\n  selector: \"fold-calendar-day\",\n  standalone: true,\n  imports: [NgTemplateOutlet, FoldIconComponent],\n  templateUrl: \"./day.component.html\",\n  styleUrl: \"./day.component.scss\",\n  hostDirectives: [\n    {\n      directive: FoldCalendarChromeDirective,\n      inputs: [\"locale\", \"labels\", \"formats\"],\n    },\n  ],\n})\nexport class FoldCalendarDayComponent<T = unknown> {\n  /** The day on display. */\n  readonly date = input.required<FoldCalendarDate>();\n  /** Events to filter down to this day. */\n  readonly events = input<readonly FoldCalendarEvent<T>[]>([]);\n  /** The day to mark as today. */\n  readonly today = input<FoldCalendarDate>();\n\n  /** A chip was activated. */\n  readonly eventClick = output<FoldCalendarEvent<T>>();\n\n  /** Labels, locale and the projected chip template — see the directive. */\n  protected readonly chrome = inject(FoldCalendarChromeDirective);\n\n  protected readonly dayEvents = computed<readonly FoldCalendarEvent<T>[]>(() =>\n    foldEventsOnDay(this.events(), this.date()),\n  );\n\n  protected readonly isToday = computed(() => this.date() === this.today());\n\n  /** `Saturday` — the weekday alone; the month sits beside the number. */\n  protected readonly weekdayName = computed(() =>\n    this.chrome.format(this.date(), \"weekdayLong\"),\n  );\n\n  /** `May` — read with the day number, which is why it is not in the line above. */\n  protected readonly monthName = computed(() =>\n    this.chrome.format(this.date(), \"monthLong\"),\n  );\n\n  protected readonly dayOfMonth = computed(() =>\n    Number(this.date().slice(8, 10)),\n  );\n\n  /** The header's accessible name: the full date, plus the today marker. */\n  protected readonly headerLabel = computed(() => {\n    const full = this.chrome.format(this.date(), \"dateFull\");\n    return this.isToday() ? `${full}, ${this.chrome.l().today}` : full;\n  });\n}\n","<section class=\"foldcald\" [attr.aria-label]=\"headerLabel()\">\n  <header class=\"foldcald-head\">\n    <span class=\"foldcald-weekday\">{{ weekdayName() }}</span>\n    <span\n      class=\"foldcald-daynum\"\n      [class.is-today]=\"isToday()\"\n      [attr.aria-current]=\"isToday() ? 'date' : null\"\n      >{{ dayOfMonth() }}</span\n    >\n    <span class=\"foldcald-month\">{{ monthName() }}</span>\n  </header>\n\n  @if (dayEvents().length === 0) {\n    <div class=\"foldcald-empty\">\n      <p>{{ chrome.l().emptyDay }}</p>\n      <!--\n        Tag-qualified (rule 4.8): `empty` is also an input on fold-field and\n        fold-data-table, and a bare [empty] selector would swallow either whole.\n      -->\n      <ng-content select=\"button[empty], a[empty], div[empty]\" />\n    </div>\n  } @else {\n    <ul class=\"foldcald-list\">\n      @for (event of dayEvents(); track event.id) {\n        <li>\n          <button\n            type=\"button\"\n            class=\"foldcal-chip foldcald-chip\"\n            [attr.data-tone]=\"event.tone ?? 'neutral'\"\n            (click)=\"eventClick.emit(event)\"\n          >\n            @if (chrome.eventContent(); as projected) {\n              <ng-container\n                [ngTemplateOutlet]=\"projected\"\n                [ngTemplateOutletContext]=\"{ $implicit: event, band: null }\"\n              />\n            } @else {\n              <span class=\"foldcal-chip-bar\"></span>\n              @if (event.icon; as icon) {\n                <fold-icon class=\"foldcal-chip-icon\" [name]=\"icon\" size=\"md\" />\n              }\n              <span class=\"foldcal-chip-body\">\n                <span class=\"foldcal-chip-label\">{{ event.label }}</span>\n                @if (event.subline) {\n                  <span class=\"foldcal-chip-sub\">{{ event.subline }}</span>\n                }\n              </span>\n            }\n          </button>\n        </li>\n      }\n    </ul>\n  }\n\n  <!-- Default slot: anything the qualified selector above did not claim still\n       lands somewhere visible instead of disappearing. -->\n  <ng-content />\n</section>\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport { Component, computed, inject, input, output } from \"@angular/core\";\n\nimport { FoldIconComponent } from \"../../../foundations/icon/icon.component\";\nimport { FoldCalendarChromeDirective } from \"../core/chrome.directive\";\nimport type { FoldCalendarDate } from \"../core/date\";\nimport { foldEventsInRange } from \"../core/filters\";\nimport type { FoldCalendarEvent } from \"../core/types\";\n\n/**\n * `<fold-calendar-list>` — everything in a range, in date order.\n *\n * The flat reading of the same data: no grid, no packing, so nothing is ever\n * hidden behind a lane budget. Each row leads with the span it covers, which\n * is what the grid views can only imply.\n *\n * For a sortable, column-configurable table instead, feed\n * `foldEventsInRange()` straight into {@link FoldDataTableComponent} — this\n * view stays deliberately small.\n *\n * ## Inputs\n * | Input    | Type                     | Default | Meaning |\n * |----------|--------------------------|---------|---------|\n * | `events` | `FoldCalendarEvent<T>[]` | `[]`    | Source events. |\n * | `from`   | `FoldCalendarDate`       | —       | Range start; omit to list everything. |\n * | `to`     | `FoldCalendarDate`       | —       | Range end; omit to list everything. |\n * | `locale` | `string`                 | runtime | Drives the span labels through `Intl`. |\n * | `labels` | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |\n *\n * ## Outputs\n * | Output       | Payload                | Fires on |\n * |--------------|------------------------|----------|\n * | `eventClick` | `FoldCalendarEvent<T>` | A row activated. |\n *\n * ## Theming\n * | CSS variable                       | Default | Sets |\n * |------------------------------------|---------|------|\n * | `--fold-calendar-list-date-width`  | `7rem`  | The leading date column — widen it for verbose locales. |\n * | `--fold-calendar-bar-width`        | `3px`   | The tone bar down a row's leading edge. |\n *\n * A projected `foldCalendarEvent` template replaces a row's **whole** inside,\n * as in every other view: the built-in bar and date belong to the default\n * rendering, not to the frame around it.\n *\n * @selector `fold-calendar-list`\n *\n * @example\n * ```html\n * <fold-calendar-list\n *   [events]=\"events()\"\n *   [from]=\"range().from\"\n *   [to]=\"range().to\"\n *   (eventClick)=\"open($event)\"\n * />\n * ```\n */\n@Component({\n  selector: \"fold-calendar-list\",\n  standalone: true,\n  imports: [NgTemplateOutlet, FoldIconComponent],\n  templateUrl: \"./list.component.html\",\n  styleUrl: \"./list.component.scss\",\n  hostDirectives: [\n    {\n      directive: FoldCalendarChromeDirective,\n      inputs: [\"locale\", \"labels\", \"formats\"],\n    },\n  ],\n})\nexport class FoldCalendarListComponent<T = unknown> {\n  /** Source events. */\n  readonly events = input<readonly FoldCalendarEvent<T>[]>([]);\n  /** Range start, inclusive. Omit (with `to`) to list every event given. */\n  readonly from = input<FoldCalendarDate>();\n  /** Range end, inclusive. */\n  readonly to = input<FoldCalendarDate>();\n  /** A row was activated. */\n  readonly eventClick = output<FoldCalendarEvent<T>>();\n\n  /** Labels, locale and the projected chip template — see the directive. */\n  protected readonly chrome = inject(FoldCalendarChromeDirective);\n\n  /** In range (when one is given), earliest first. */\n  protected readonly rows = computed<readonly FoldCalendarEvent<T>[]>(() => {\n    const from = this.from();\n    const to = this.to();\n    const scoped =\n      from === undefined || to === undefined\n        ? this.events()\n        : foldEventsInRange(this.events(), from, to);\n    return [...scoped].sort((a, b) =>\n      a.start < b.start ? -1 : a.start > b.start ? 1 : 0,\n    );\n  });\n\n  /**\n   * The span, collapsed to one date when it covers a single day — `Intl`'s\n   * own range formatter does that, and picks the locale's separator and its\n   * order, which is why this is not a translatable label.\n   */\n  protected rangeLabel(event: FoldCalendarEvent<T>): string {\n    return this.chrome.formatRange(event.start, event.end, \"dayMonthShort\");\n  }\n}\n","@if (rows().length === 0) {\n  <p class=\"foldcall-empty\">{{ chrome.l().emptyRange }}</p>\n} @else {\n  <ul class=\"foldcall\">\n    @for (event of rows(); track event.id) {\n      <li>\n        <!--\n          A projected template replaces the row's **whole** inside, exactly as\n          it does in the other four views. Rendering the bar and the date\n          outside the @if would make the same template mean something different\n          here, and drop a one-element template into a four-column grid.\n        -->\n        <button\n          type=\"button\"\n          class=\"foldcall-row\"\n          [class.is-custom]=\"chrome.eventContent() !== null\"\n          [attr.data-tone]=\"event.tone ?? 'neutral'\"\n          (click)=\"eventClick.emit(event)\"\n        >\n          @if (chrome.eventContent(); as projected) {\n            <ng-container\n              [ngTemplateOutlet]=\"projected\"\n              [ngTemplateOutletContext]=\"{ $implicit: event, band: null }\"\n            />\n          } @else {\n            <span class=\"foldcall-bar\"></span>\n            <span class=\"foldcall-when\">{{ rangeLabel(event) }}</span>\n            <span class=\"foldcall-body\">\n              @if (event.icon; as icon) {\n                <fold-icon class=\"foldcall-icon\" [name]=\"icon\" size=\"sm\" />\n              }\n              <span class=\"foldcall-label\">{{ event.label }}</span>\n            </span>\n            <span class=\"foldcall-sub\">{{ event.subline ?? \"\" }}</span>\n          }\n        </button>\n      </li>\n    }\n  </ul>\n}\n","/**\n * Where overlapping timed events sit side by side — the time grid's only\n * genuinely algorithmic part, and the same shape as the month's lane packing\n * turned ninety degrees: intervals over **minutes** instead of days, laid out\n * across the column's width instead of down its height.\n *\n * Pure, so the rule can be exercised exhaustively without a grid.\n */\n\n/** An interval to place, in minutes since midnight. */\nexport interface FoldOverlapInput {\n  readonly startMinute: number;\n  /** Exclusive: an event ending at 10:00 does not overlap one starting there. */\n  readonly endMinute: number;\n}\n\n/** Where one interval landed across the width. */\nexport interface FoldOverlapSlot {\n  /** Its column index inside the cluster, `0`-based. */\n  readonly column: number;\n  /** How many columns its cluster needed — the denominator of its width. */\n  readonly columns: number;\n}\n\n/**\n * The narrowest an event is allowed to get. Past this, three overlapping\n * meetings are three unreadable slivers, and a reader is better served by a\n * `+N` than by a column two pixels wide — which is the caller's call to make,\n * so this only reports the number.\n */\nconst MIN_VISIBLE_COLUMNS = 1;\n\n/** Whether two intervals actually share a minute. */\nfunction overlaps(a: FoldOverlapInput, b: FoldOverlapInput): boolean {\n  return a.startMinute < b.endMinute && b.startMinute < a.endMinute;\n}\n\n/**\n * Lays intervals out across the width, one slot per input, in input order.\n *\n * Two events that merely touch — one ends at 10:00, the next starts at 10:00 —\n * do **not** overlap and each keep the full width. That is the difference\n * between the month grid (inclusive days: touching means colliding) and a time\n * grid (exclusive minutes: touching means back-to-back), and getting it wrong\n * halves the width of every event in a packed morning.\n *\n * Events are grouped into **clusters** — runs connected by overlap — and each\n * cluster is widened only as far as it needs, so one triple-booked hour does\n * not narrow the rest of the day.\n */\nexport function foldLayOutOverlaps(\n  intervals: readonly FoldOverlapInput[],\n): readonly FoldOverlapSlot[] {\n  const order = intervals\n    .map((interval, index) => ({ interval, index }))\n    .sort((a, b) =>\n      a.interval.startMinute !== b.interval.startMinute\n        ? a.interval.startMinute - b.interval.startMinute\n        : b.interval.endMinute -\n          b.interval.startMinute -\n          (a.interval.endMinute - a.interval.startMinute),\n    );\n\n  const slots: FoldOverlapSlot[] = intervals.map(() => ({\n    column: 0,\n    columns: MIN_VISIBLE_COLUMNS,\n  }));\n\n  /** The cluster being filled: its members' indices and its lane end times. */\n  let cluster: number[] = [];\n  let laneEnds: number[] = [];\n\n  const closeCluster = (): void => {\n    for (const index of cluster) {\n      slots[index] = {\n        column: slots[index]?.column ?? 0,\n        columns: laneEnds.length,\n      };\n    }\n    cluster = [];\n    laneEnds = [];\n  };\n\n  for (const { interval, index } of order) {\n    // A cluster ends where nothing it holds is still running.\n    const stillRunning = laneEnds.some((end) => end > interval.startMinute);\n    if (!stillRunning && cluster.length > 0) {\n      closeCluster();\n    }\n\n    const reusable = laneEnds.findIndex((end) => end <= interval.startMinute);\n    const column = reusable === -1 ? laneEnds.length : reusable;\n    laneEnds[column] = interval.endMinute;\n    slots[index] = { column, columns: laneEnds.length };\n    cluster.push(index);\n  }\n  if (cluster.length > 0) {\n    closeCluster();\n  }\n\n  return slots;\n}\n\n/** Whether `a` and `b` would need separate columns — exported for tests. */\nexport function foldOverlaps(\n  a: FoldOverlapInput,\n  b: FoldOverlapInput,\n): boolean {\n  return overlaps(a, b);\n}\n","import {\n  FOLD_NO_HIDDEN_DAYS,\n  foldCountByDay,\n  foldMakeDay,\n  foldWeekendOr,\n} from \"./cell\";\nimport {\n  foldFromEpochDay,\n  foldStartOfWeek,\n  foldToEpochDay,\n  type FoldCalendarDate,\n  type FoldWeekday,\n} from \"./date\";\nimport { foldLayOutOverlaps, type FoldOverlapInput } from \"./overlap\";\nimport { foldPackRow } from \"./row-pack\";\nimport { foldCollapseGroups } from \"./span\";\nimport {\n  FOLD_MINUTES_PER_DAY,\n  foldToMinutes,\n  type FoldCalendarTime,\n} from \"./time\";\nimport type {\n  FoldCalendarBand,\n  FoldCalendarDay,\n  FoldCalendarEvent,\n} from \"./types\";\n\n/**\n * The time grid's geometry: hour columns with events placed **inside** a day,\n * and an all-day strip above them.\n *\n * The two halves are two different problems and stay two: a timed event is an\n * interval in minutes laid out across a column's width\n * ({@link foldLayOutOverlaps}), an all-day event is a span across days laid out\n * in lanes ({@link foldPackRow}) — the same packer the month grid uses, so a\n * three-day absence reads identically in both.\n *\n * Everything here is a **fraction of the visible window**, not a pixel: the\n * window is a caller's choice (`dayStart`/`dayEnd`), the height is CSS's, and a\n * layout that computed pixels would have to be told about both.\n */\n\n/** How to build a time grid. */\nexport interface FoldTimeGridOptions {\n  /** Any date inside the range to display. */\n  readonly date: FoldCalendarDate;\n  /** Days to show: `1` is a day view, `7` a week. @default 7 */\n  readonly dayCount?: number;\n  /** Snap the range to the week — ignored unless `dayCount` is 7. @default true */\n  readonly snapToWeek?: boolean;\n  /** Day the week starts on. @default 'mon' */\n  readonly weekStartsOn?: FoldWeekday;\n  /** Days shaded as the weekend. @default ['sat', 'sun'] */\n  readonly weekendDays?: readonly FoldWeekday[] | undefined;\n  /** The day to flag as today; omit to flag none. */\n  readonly today?: FoldCalendarDate | undefined;\n  /** First hour on screen. @default '00:00' */\n  readonly dayStart?: FoldCalendarTime;\n  /** Last hour on screen; `24:00` is midnight. @default '24:00' */\n  readonly dayEnd?: FoldCalendarTime;\n  /** Lanes the all-day strip stacks before events overflow. @default 2 */\n  readonly maxAllDayLanes?: number;\n}\n\n/** One timed event's slice of one day. */\nexport interface FoldCalendarBlock<T = unknown> {\n  /** Unique per slice (`<eventId>@<date>`) — the `@for` track key. */\n  readonly key: string;\n  readonly event: FoldCalendarEvent<T>;\n  /** Where it starts, as a fraction `0`–`1` of the visible window. */\n  readonly top: number;\n  /** How tall it is, as a fraction of the visible window. */\n  readonly height: number;\n  /** Its column inside its overlap cluster, `0`-based. */\n  readonly column: number;\n  /** How many columns the cluster needed — the denominator of the width. */\n  readonly columns: number;\n  /** It began before this day, or before the visible window. */\n  readonly continuesBefore: boolean;\n  /** It runs past this day, or past the visible window. */\n  readonly continuesAfter: boolean;\n}\n\n/** One day column: the cell it stands for, and the events inside it. */\nexport interface FoldTimeGridColumn<T = unknown> {\n  readonly day: FoldCalendarDay;\n  /** Timed events, in the caller's order. */\n  readonly blocks: readonly FoldCalendarBlock<T>[];\n}\n\n/** A laid-out time grid. */\nexport interface FoldTimeGrid<T = unknown> {\n  /** The day columns, earliest first. */\n  readonly columns: readonly FoldTimeGridColumn<T>[];\n  /** All-day spans across the strip on top, packed into lanes. */\n  readonly allDay: readonly FoldCalendarBand<T>[];\n  /** All-day spans no lane could take. */\n  readonly allDayHiddenCount: number;\n  /** The hour labels down the gutter, as `HH:mm`. */\n  readonly hours: readonly FoldCalendarTime[];\n  /** First minute on screen. */\n  readonly startMinute: number;\n  /** Last minute on screen. */\n  readonly endMinute: number;\n}\n\nconst DEFAULT_DAY_COUNT = 7;\nconst DEFAULT_ALL_DAY_LANES = 2;\nconst MINUTES_PER_HOUR = 60;\n\n/**\n * Whether an event is placed on the clock or on the strip.\n *\n * **Both** ends are needed: an event with only a start has no height, and one\n * with only an end has no origin. Half a time is a data bug, and treating it as\n * all-day is the reading that loses the least.\n */\nexport function foldIsTimed<T>(event: FoldCalendarEvent<T>): boolean {\n  return event.startTime !== undefined && event.endTime !== undefined;\n}\n\n/** The window a timed event occupies on one particular day, or `null`. */\nfunction minutesOnDay<T>(\n  event: FoldCalendarEvent<T>,\n  day: number,\n  startMinute: number,\n  endMinute: number,\n): { from: number; to: number; before: boolean; after: boolean } | null {\n  const firstDay = foldToEpochDay(event.start);\n  const lastDay = foldToEpochDay(event.end);\n  if (day < firstDay || day > lastDay) {\n    return null;\n  }\n  // A span crossing midnight runs to the end of each day it passes through:\n  // Monday 14:00 → Wednesday 10:00 is three blocks, not one impossible one.\n  const rawFrom =\n    day === firstDay ? foldToMinutes(event.startTime ?? \"00:00\") : 0;\n  const rawTo =\n    day === lastDay\n      ? foldToMinutes(event.endTime ?? \"24:00\")\n      : FOLD_MINUTES_PER_DAY;\n  const from = Math.max(startMinute, Math.min(rawFrom, rawTo));\n  const to = Math.min(endMinute, Math.max(rawFrom, rawTo));\n  if (to <= from) {\n    return null; // entirely outside the visible window\n  }\n  return {\n    from,\n    to,\n    before: day > firstDay || rawFrom < startMinute,\n    after: day < lastDay || rawTo > endMinute,\n  };\n}\n\n/** The grid's own window: which days, and which minutes of them. */\nfunction bounds(options: FoldTimeGridOptions): {\n  firstDay: number;\n  dayCount: number;\n  startMinute: number;\n  endMinute: number;\n} {\n  const dayCount = Math.max(\n    1,\n    Math.trunc(options.dayCount ?? DEFAULT_DAY_COUNT),\n  );\n  const snap = options.snapToWeek !== false && dayCount === DEFAULT_DAY_COUNT;\n  const firstDay = foldToEpochDay(\n    snap\n      ? foldStartOfWeek(options.date, options.weekStartsOn ?? \"mon\")\n      : options.date,\n  );\n  const startMinute = foldToMinutes(options.dayStart ?? \"00:00\");\n  const rawEnd = foldToMinutes(options.dayEnd ?? \"24:00\");\n  return {\n    firstDay,\n    dayCount,\n    startMinute,\n    // A window with no height would divide by zero downstream.\n    endMinute: rawEnd > startMinute ? rawEnd : FOLD_MINUTES_PER_DAY,\n  };\n}\n\n/** The hour marks inside the window, including the one it opens on. */\nfunction hourMarks(startMinute: number, endMinute: number): FoldCalendarTime[] {\n  const marks: FoldCalendarTime[] = [];\n  const first = Math.ceil(startMinute / MINUTES_PER_HOUR) * MINUTES_PER_HOUR;\n  for (let minute = first; minute < endMinute; minute += MINUTES_PER_HOUR) {\n    const hour = Math.floor(minute / MINUTES_PER_HOUR);\n    marks.push(`${hour < 10 ? \"0\" : \"\"}${hour}:00`);\n  }\n  return marks;\n}\n\n/**\n * Lays out `dayCount` days as hour columns plus an all-day strip.\n *\n * Timed events are placed on the clock; everything else — no times, or only one\n * of them — goes on the strip, where it spans days exactly as it does in the\n * month grid.\n */\nexport function foldBuildTimeGrid<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  options: FoldTimeGridOptions,\n): FoldTimeGrid<T> {\n  const { firstDay, dayCount, startMinute, endMinute } = bounds(options);\n  const span = endMinute - startMinute;\n\n  const timed = events.filter((event) => foldIsTimed(event));\n  const allDayEvents = events.filter((event) => !foldIsTimed(event));\n\n  const hidden = new Map<number, number>();\n  const strip = foldPackRow(\n    foldCollapseGroups(allDayEvents).filter(\n      (candidate) =>\n        candidate.endDay >= firstDay &&\n        candidate.startDay < firstDay + dayCount,\n    ),\n    {\n      start: foldFromEpochDay(firstDay),\n      startDay: firstDay,\n      dayCount,\n    },\n    Math.max(0, Math.trunc(options.maxAllDayLanes ?? DEFAULT_ALL_DAY_LANES)),\n    hidden,\n  );\n\n  const context = {\n    month: foldFromEpochDay(firstDay).slice(0, 7),\n    today: options.today,\n    weekendDays: foldWeekendOr(options.weekendDays),\n    counts: foldCountByDay(events, firstDay, firstDay + dayCount - 1),\n    hidden: FOLD_NO_HIDDEN_DAYS,\n  };\n\n  const columns = Array.from({ length: dayCount }, (_unused, offset) => {\n    const day = firstDay + offset;\n    const date = foldFromEpochDay(day);\n    const placed = timed\n      .map((event) => ({\n        event,\n        window: minutesOnDay(event, day, startMinute, endMinute),\n      }))\n      .filter(\n        (\n          candidate,\n        ): candidate is {\n          event: FoldCalendarEvent<T>;\n          window: NonNullable<ReturnType<typeof minutesOnDay>>;\n        } => candidate.window !== null,\n      );\n\n    const slots = foldLayOutOverlaps(\n      placed.map<FoldOverlapInput>(({ window }) => ({\n        startMinute: window.from,\n        endMinute: window.to,\n      })),\n    );\n\n    return {\n      day: foldMakeDay(day, context),\n      blocks: placed.map<FoldCalendarBlock<T>>(({ event, window }, index) => ({\n        key: `${event.id}@${date}`,\n        event,\n        top: (window.from - startMinute) / span,\n        height: (window.to - window.from) / span,\n        column: slots[index]?.column ?? 0,\n        columns: slots[index]?.columns ?? 1,\n        continuesBefore: window.before,\n        continuesAfter: window.after,\n      })),\n    };\n  });\n\n  return {\n    columns,\n    allDay: strip.bands,\n    allDayHiddenCount: strip.hiddenCount,\n    hours: hourMarks(startMinute, endMinute),\n    startMinute,\n    endMinute,\n  };\n}\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport {\n  Component,\n  computed,\n  inject,\n  input,\n  numberAttribute,\n  output,\n} from \"@angular/core\";\n\nimport { FoldIconComponent } from \"../../../foundations/icon/icon.component\";\nimport { FoldCalendarChromeDirective } from \"../core/chrome.directive\";\nimport type { FoldCalendarDate, FoldWeekday } from \"../core/date\";\nimport { foldToMinutes, type FoldCalendarTime } from \"../core/time\";\nimport {\n  foldBuildTimeGrid,\n  type FoldCalendarBlock,\n  type FoldTimeGridColumn,\n} from \"../core/timegrid\";\nimport type { FoldCalendarBand, FoldCalendarEvent } from \"../core/types\";\n\n/**\n * `<fold-calendar-timegrid>` — days as hour columns, with an all-day strip.\n *\n * The reading the other four cannot give: **when inside a day**. A meeting is a\n * block whose height is its duration and whose width is shared with whatever it\n * collides with; an absence is a band across the strip on top, spanning days\n * exactly as it does in the month view — the same packer draws both, so a\n * three-day leave request reads identically wherever it appears.\n *\n * Times are wall-clock `HH:mm`, never instants — the same decision as the date,\n * for the same reason. 09:00 is the hour on the wall; the app converts once at\n * its own boundary, and no zone can move a meeting after that.\n *\n * ## Inputs\n * | Input             | Type                     | Default   | Meaning |\n * |-------------------|--------------------------|-----------|---------|\n * | `date`            | `FoldCalendarDate`       | —         | Any date in the range. |\n * | `events`          | `FoldCalendarEvent<T>[]` | `[]`      | Timed events go on the clock, the rest on the strip. |\n * | `dayCount`        | `number`                 | `7`       | `1` is a day view, `7` a week. |\n * | `today`           | `FoldCalendarDate`       | —         | The column to mark. |\n * | `now`             | `FoldCalendarTime`       | —         | Draws the current-time line on `today`'s column. Passed in, never read from a clock — the package has none, and an SSR render must not invent one. |\n * | `dayStart`/`dayEnd` | `FoldCalendarTime`     | `00:00`/`24:00` | The visible window; `08:00`–`20:00` is a working day. |\n * | `weekStartsOn`    | `FoldWeekday`            | the locale's | Which day opens the week. |\n * | `weekendDays`     | `FoldWeekday[]`          | the locale's | Which columns are shaded. |\n * | `maxAllDayLanes`  | `number`                 | `2`       | Lanes the strip stacks before overflowing. |\n * | `locale`/`labels`/`formats` | —              | —         | See the other views. |\n *\n * ## Outputs\n * | Output       | Payload                | Fires on |\n * |--------------|------------------------|----------|\n * | `dayClick`   | `FoldCalendarDate`     | A column header activated. |\n * | `eventClick` | `FoldCalendarEvent<T>` | A block or an all-day band activated. |\n *\n * ## Theming\n * | CSS variable                          | Default | Sets |\n * |---------------------------------------|---------|------|\n * | `--fold-calendar-timegrid-height`     | `640px` | Height of the hour area. |\n * | `--fold-calendar-timegrid-gutter`     | `56px`  | Width of the hour labels. |\n * | `--fold-calendar-timegrid-lane`       | `20px`  | Height of one all-day lane. |\n * | `--fold-calendar-bar-width`           | `3px`   | The tone bar down a block's leading edge. |\n *\n * ## Accessibility\n * Every block and every band is a real `<button>` inside the column it belongs\n * to, so the tab order follows the day and this view needs none of the month\n * grid's roving-tabindex machinery. A block's accessible name carries its\n * **times**, which its position on the clock conveys only visually.\n *\n * @selector `fold-calendar-timegrid`\n *\n * @example\n * ```html\n * <fold-calendar-timegrid\n *   [date]=\"date()\"\n *   [events]=\"events()\"\n *   [today]=\"today\"\n *   [now]=\"now()\"\n *   dayStart=\"08:00\"\n *   dayEnd=\"20:00\"\n *   (eventClick)=\"open($event)\"\n * />\n * ```\n */\n@Component({\n  selector: \"fold-calendar-timegrid\",\n  standalone: true,\n  imports: [NgTemplateOutlet, FoldIconComponent],\n  templateUrl: \"./timegrid.component.html\",\n  styleUrl: \"./timegrid.component.scss\",\n  hostDirectives: [\n    {\n      directive: FoldCalendarChromeDirective,\n      inputs: [\"locale\", \"labels\", \"formats\"],\n    },\n  ],\n})\nexport class FoldCalendarTimegridComponent<T = unknown> {\n  /** Any date inside the range on display. */\n  readonly date = input.required<FoldCalendarDate>();\n  /** Events to plot; timed ones on the clock, the rest on the strip. */\n  readonly events = input<readonly FoldCalendarEvent<T>[]>([]);\n  /** Days to show: `1` is a day view, `7` a week. @default 7 */\n  readonly dayCount = input(7, { transform: numberAttribute });\n  /** The day to mark as today. */\n  readonly today = input<FoldCalendarDate>();\n  /**\n   * The current wall-clock time, for the \"now\" line. Passed in rather than\n   * read: this package owns no clock (`today` works the same way), and a\n   * server render that invented one would hydrate to a different position.\n   */\n  readonly now = input<FoldCalendarTime>();\n  /** First hour on screen. @default '00:00' */\n  readonly dayStart = input<FoldCalendarTime>(\"00:00\");\n  /** Last hour on screen. @default '24:00' */\n  readonly dayEnd = input<FoldCalendarTime>(\"24:00\");\n  /** Day the week starts on. @default the locale's own first day */\n  readonly weekStartsOn = input<FoldWeekday>();\n  /** Days shaded as the weekend. @default the locale's own weekend */\n  readonly weekendDays = input<readonly FoldWeekday[]>();\n  /** Lanes the all-day strip stacks before events overflow. @default 2 */\n  readonly maxAllDayLanes = input(2, { transform: numberAttribute });\n\n  /** A column header was activated. */\n  readonly dayClick = output<FoldCalendarDate>();\n  /** A block or an all-day band was activated. */\n  readonly eventClick = output<FoldCalendarEvent<T>>();\n\n  /** Labels, locale and the projected chip template — see the directive. */\n  protected readonly chrome = inject(FoldCalendarChromeDirective);\n\n  protected readonly grid = computed(() =>\n    foldBuildTimeGrid(this.events(), {\n      date: this.date(),\n      dayCount: this.dayCount(),\n      weekStartsOn: this.chrome.anchor(this.weekStartsOn()),\n      weekendDays: this.chrome.weekend(this.weekendDays()),\n      today: this.today(),\n      dayStart: this.dayStart(),\n      dayEnd: this.dayEnd(),\n      maxAllDayLanes: this.maxAllDayLanes(),\n    }),\n  );\n\n  /** Lane rows for the all-day strip, or none when nothing spans. */\n  protected readonly stripRows = computed(() => {\n    const lanes = this.grid().allDay.reduce(\n      (highest, band) => Math.max(highest, band.lane + 1),\n      0,\n    );\n    return `repeat(${lanes}, var(--fold-calendar-timegrid-lane, 20px))`;\n  });\n\n  /** Where the \"now\" line sits, as a fraction of the window, or `null`. */\n  protected readonly nowOffset = computed<number | null>(() => {\n    const time = this.now();\n    if (time === undefined) {\n      return null;\n    }\n    const { startMinute, endMinute } = this.grid();\n    const minute = foldToMinutes(time);\n    if (minute < startMinute || minute > endMinute) {\n      return null;\n    }\n    return (minute - startMinute) / (endMinute - startMinute);\n  });\n\n  protected weekdayName(column: FoldTimeGridColumn<T>): string {\n    return this.chrome.format(column.day.date, \"weekdayShort\");\n  }\n\n  protected hourLabel(hour: FoldCalendarTime): string {\n    return this.chrome.formatTime(hour);\n  }\n\n  /** A column's accessible name: its date, the today marker, and its load. */\n  protected columnLabel(column: FoldTimeGridColumn<T>): string {\n    const labels = this.chrome.l();\n    const parts = [this.chrome.format(column.day.date, \"dateFull\")];\n    if (column.day.isToday) {\n      parts.push(labels.today);\n    }\n    if (column.day.eventCount > 0) {\n      parts.push(labels.eventCount(column.day.eventCount));\n    }\n    return parts.join(\", \");\n  }\n\n  /**\n   * A block's accessible name — its times first, because where it sits on the\n   * clock is information a screen reader has no other way to get.\n   */\n  protected blockLabel(block: FoldCalendarBlock<T>): string {\n    const { startTime, endTime, label } = block.event;\n    if (startTime === undefined || endTime === undefined) {\n      return label;\n    }\n    return `${this.chrome.formatTime(startTime)} – ${this.chrome.formatTime(endTime)}, ${label}`;\n  }\n\n  /** A band's text: the group's label when it stands for several events. */\n  protected bandLabel(band: FoldCalendarBand<T>): string {\n    if (band.groupSize > 1) {\n      return band.event.groupLabel ?? band.event.label;\n    }\n    return band.event.label;\n  }\n}\n","<div class=\"foldcaltg\" [attr.aria-label]=\"chrome.l().grid\" role=\"group\">\n  <div class=\"foldcaltg-head\">\n    <span class=\"foldcaltg-corner\" aria-hidden=\"true\"></span>\n    @for (column of grid().columns; track column.day.date) {\n      <button\n        type=\"button\"\n        class=\"foldcaltg-dayhead\"\n        [class.is-today]=\"column.day.isToday\"\n        [class.is-weekend]=\"column.day.isWeekend\"\n        [attr.aria-label]=\"columnLabel(column)\"\n        [attr.aria-current]=\"column.day.isToday ? 'date' : null\"\n        (click)=\"dayClick.emit(column.day.date)\"\n      >\n        <span class=\"foldcaltg-weekday\">{{ weekdayName(column) }}</span>\n        <span class=\"foldcaltg-daynum\">{{ column.day.dayOfMonth }}</span>\n      </button>\n    }\n  </div>\n\n  <!-- The all-day strip: the same spanning bands the month grid draws. -->\n  @if (grid().allDay.length > 0) {\n    <div class=\"foldcaltg-allday\">\n      <span class=\"foldcaltg-gutter-label\">{{ chrome.l().allDay }}</span>\n      <div\n        class=\"foldcaltg-strip\"\n        [style.gridTemplateColumns]=\"\n          'repeat(' + grid().columns.length + ', 1fr)'\n        \"\n        [style.gridTemplateRows]=\"stripRows()\"\n      >\n        @for (band of grid().allDay; track band.key) {\n          <button\n            type=\"button\"\n            class=\"foldcal-chip foldcaltg-band\"\n            [attr.data-tone]=\"band.event.tone ?? 'neutral'\"\n            [class.continues-before]=\"band.continuesBefore\"\n            [class.continues-after]=\"band.continuesAfter\"\n            [style.gridColumn]=\"\n              band.startColumn + 1 + ' / ' + (band.endColumn + 2)\n            \"\n            [style.gridRow]=\"band.lane + 1\"\n            (click)=\"eventClick.emit(band.event)\"\n          >\n            @if (chrome.eventContent(); as projected) {\n              <ng-container\n                [ngTemplateOutlet]=\"projected\"\n                [ngTemplateOutletContext]=\"{\n                  $implicit: band.event,\n                  band: band,\n                }\"\n              />\n            } @else {\n              <span class=\"foldcal-chip-bar\"></span>\n              <span class=\"foldcal-chip-body\">\n                <span class=\"foldcal-chip-label\">{{ bandLabel(band) }}</span>\n              </span>\n            }\n          </button>\n        }\n      </div>\n    </div>\n  }\n\n  <!--\n    The hours scroll, so the region is a tab stop with a name: a scrollable\n    area a keyboard cannot reach is a scrollable area a keyboard user cannot\n    read (WCAG 2.1.1). Found by axe, not by looking at it.\n  -->\n  <div\n    class=\"foldcaltg-body\"\n    tabindex=\"0\"\n    role=\"group\"\n    [attr.aria-label]=\"chrome.l().hours\"\n  >\n    <!--\n      Positioned, not flowed: the label has to land on the same line as the rule\n      it names, and a flex column only gets there by coincidence.\n    -->\n    <div class=\"foldcaltg-gutter\" aria-hidden=\"true\">\n      @for (hour of grid().hours; track hour; let index = $index) {\n        <span\n          class=\"foldcaltg-hour\"\n          [class.is-first]=\"index === 0\"\n          [style.top.%]=\"(index / grid().hours.length) * 100\"\n          >{{ hourLabel(hour) }}</span\n        >\n      }\n    </div>\n\n    <div\n      class=\"foldcaltg-cols\"\n      [style.gridTemplateColumns]=\"'repeat(' + grid().columns.length + ', 1fr)'\"\n    >\n      @for (column of grid().columns; track column.day.date) {\n        <section\n          class=\"foldcaltg-col\"\n          [class.is-weekend]=\"column.day.isWeekend\"\n          [attr.aria-label]=\"columnLabel(column)\"\n        >\n          <!-- Hour rules, drawn per column so a column can be styled alone. -->\n          <span class=\"foldcaltg-rules\" aria-hidden=\"true\">\n            @for (hour of grid().hours; track hour) {\n              <span class=\"foldcaltg-rule\"></span>\n            }\n          </span>\n\n          @if (column.day.isToday && nowOffset() !== null) {\n            <span\n              class=\"foldcaltg-now\"\n              aria-hidden=\"true\"\n              [style.top.%]=\"(nowOffset() ?? 0) * 100\"\n            ></span>\n          }\n\n          @for (block of column.blocks; track block.key) {\n            <button\n              type=\"button\"\n              class=\"foldcaltg-block\"\n              [attr.data-tone]=\"block.event.tone ?? 'neutral'\"\n              [class.continues-before]=\"block.continuesBefore\"\n              [class.continues-after]=\"block.continuesAfter\"\n              [attr.aria-label]=\"blockLabel(block)\"\n              [style.top.%]=\"block.top * 100\"\n              [style.height.%]=\"block.height * 100\"\n              [style.insetInlineStart.%]=\"(block.column / block.columns) * 100\"\n              [style.width.%]=\"(1 / block.columns) * 100\"\n              (click)=\"eventClick.emit(block.event)\"\n            >\n              @if (chrome.eventContent(); as projected) {\n                <ng-container\n                  [ngTemplateOutlet]=\"projected\"\n                  [ngTemplateOutletContext]=\"{\n                    $implicit: block.event,\n                    band: null,\n                  }\"\n                />\n              } @else {\n                <span class=\"foldcaltg-block-bar\"></span>\n                <!-- The glyph sits beside the label, never above it: a\n                     half-hour block is one line tall and the icon would take\n                     it. -->\n                @if (block.event.icon; as icon) {\n                  <fold-icon\n                    class=\"foldcaltg-block-icon\"\n                    [name]=\"icon\"\n                    size=\"sm\"\n                  />\n                }\n                <span class=\"foldcaltg-block-body\">\n                  <span class=\"foldcaltg-block-label\">{{\n                    block.event.label\n                  }}</span>\n                  @if (block.event.subline) {\n                    <span class=\"foldcaltg-block-sub\">{{\n                      block.event.subline\n                    }}</span>\n                  }\n                </span>\n              }\n            </button>\n          }\n        </section>\n      }\n    </div>\n  </div>\n</div>\n","import { Component, input, output } from \"@angular/core\";\n\nexport type FoldChoiceOption = {\n  key: string;\n  label: string;\n  /** Optional trailing count badge (e.g. how many rows match this filter). */\n  count?: number;\n};\n\n/**\n * `<fold-choice-row>` — a horizontal single-select control.\n *\n * One row, one active option, emits the chosen `key`; the parent owns the\n * state and feeds it back via `activeKey`. Two layouts:\n *\n * - `segmented` (default) — equal-width buttons that fill the row, no wrap.\n *   The right shape for a small mode/segment toggle (2–4 options).\n * - `chips` — auto-width rounded chips that wrap. The right shape for a\n *   status/category filter above a table or list.\n *\n * @selector `fold-choice-row`\n *\n * @example\n * ```html\n * <fold-choice-row\n *   [options]=\"[{ key: 'manager', label: 'Manager' }, { key: 'member', label: 'Member' }]\"\n *   [activeKey]=\"role()\"\n *   (selected)=\"role.set($event)\"\n * />\n *\n * <fold-choice-row\n *   layout=\"chips\"\n *   [options]=\"statuses\"\n *   [activeKey]=\"status()\"\n *   ariaLabel=\"Filter by status\"\n *   (selected)=\"setStatus($event)\"\n * />\n * ```\n */\n@Component({\n  selector: \"fold-choice-row\",\n  standalone: true,\n  templateUrl: \"./choice-row.component.html\",\n  // Inline + token-driven. Colours theme via fold-ng; the layout constants\n  // (gaps, motion) are literals for now — a spacing/motion scale lands when a\n  // second component needs one.\n  styleUrl: \"./choice-row.component.scss\",\n})\nexport class FoldChoiceRowComponent {\n  /** The selectable options, in display order. */\n  readonly options = input.required<readonly FoldChoiceOption[]>();\n\n  /** The `key` of the currently selected option. */\n  readonly activeKey = input.required<string>();\n\n  /** `segmented` (equal-width, default) or `chips` (auto-width, wraps). */\n  readonly layout = input<\"segmented\" | \"chips\">(\"segmented\");\n\n  /** Accessible label for the group. */\n  readonly ariaLabel = input<string>(\"\");\n\n  /** Emits the `key` of the clicked option. */\n  readonly selected = output<string>();\n}\n","<div\n  class=\"choice-row\"\n  role=\"group\"\n  [class.segmented]=\"layout() === 'segmented'\"\n  [class.chips]=\"layout() === 'chips'\"\n  [attr.aria-label]=\"ariaLabel() || null\"\n>\n  @for (opt of options(); track opt.key) {\n    <button\n      type=\"button\"\n      class=\"choice\"\n      [class.is-active]=\"activeKey() === opt.key\"\n      [attr.aria-pressed]=\"activeKey() === opt.key\"\n      (click)=\"selected.emit(opt.key)\"\n    >\n      <span>{{ opt.label }}</span>\n      @if (opt.count !== undefined) {\n        <span class=\"choice-count\">{{ opt.count }}</span>\n      }\n    </button>\n  }\n</div>\n","import {\n  booleanAttribute,\n  DestroyRef,\n  Directive,\n  effect,\n  inject,\n  input,\n  output,\n} from \"@angular/core\";\n\n/**\n * `[foldRepeatPress]` — press-and-hold auto-repeat.\n *\n * Fires `(foldRepeatPress)` once immediately on pointer press, then keeps firing\n * on a fixed cadence while the pointer is held, stopping on release, leave,\n * cancel or destroy. Bind `[foldRepeatPressDisabled]` to a reactive bound (e.g.\n * \"at max\") so the repeat also stops the instant the action becomes unavailable\n * mid-hold — a plain `pointerup` is unreliable once the host button disables\n * itself under the finger.\n *\n * Keyboard activation is intentionally out of scope: it produces `click`, not\n * `pointerdown`, so wire a separate `(click)` handler for Enter/Space.\n *\n * @selector `[foldRepeatPress]`\n *\n * @example\n * ```html\n * <button\n *   foldRepeatPress\n *   [foldRepeatPressDisabled]=\"atMax()\"\n *   (foldRepeatPress)=\"step(1)\"\n * >+</button>\n * ```\n */\n@Directive({\n  selector: \"[foldRepeatPress]\",\n  standalone: true,\n  host: {\n    \"(pointerdown)\": \"start()\",\n    \"(pointerup)\": \"stop()\",\n    \"(pointerleave)\": \"stop()\",\n    \"(pointercancel)\": \"stop()\",\n  },\n})\nexport class FoldRepeatPressDirective {\n  /** Fires immediately on press, then repeatedly while the pointer is held. */\n  readonly repeat = output({ alias: \"foldRepeatPress\" });\n\n  /** When true, a press does nothing and any running repeat stops at once. */\n  readonly disabled = input(false, {\n    transform: booleanAttribute,\n    alias: \"foldRepeatPressDisabled\",\n  });\n\n  /** Delay before the auto-repeat begins, in ms. @default 350 */\n  readonly delay = input(350, { alias: \"foldRepeatPressDelay\" });\n\n  /** Cadence of the auto-repeat once started, in ms. @default 60 */\n  readonly period = input(60, { alias: \"foldRepeatPressPeriod\" });\n\n  private startTimer: ReturnType<typeof setTimeout> | null = null;\n  private tick: ReturnType<typeof setInterval> | null = null;\n\n  constructor() {\n    inject(DestroyRef).onDestroy(() => this.stop());\n    effect(() => {\n      if (this.disabled()) {\n        this.stop();\n      }\n    });\n  }\n\n  protected start(): void {\n    if (this.disabled()) {\n      return;\n    }\n    this.stop(); // never stack two hold cycles\n    this.repeat.emit();\n    this.startTimer = setTimeout(() => {\n      this.tick = setInterval(() => this.repeat.emit(), this.period());\n    }, this.delay());\n  }\n\n  protected stop(): void {\n    if (this.startTimer !== null) {\n      clearTimeout(this.startTimer);\n      this.startTimer = null;\n    }\n    if (this.tick !== null) {\n      clearInterval(this.tick);\n      this.tick = null;\n    }\n  }\n}\n","import { Directive, booleanAttribute, input } from \"@angular/core\";\n\n/**\n * `[foldElevated]` — raise a surface into a **rounded, shadowed card**.\n *\n * It stamps `data-elevated`; the token layer styles it (radius + shadow). It\n * rides on whatever background the element already paints — so a chrome rail\n * stays chrome-coloured, just lifted. Put it on the element that owns the\n * surface's background (a projected `fold-menu`, an `app-header`, a content\n * wrapper), never on a transparent wrapper (which would raise an invisible card).\n *\n * **Elevate ≠ inset.** The directive only *raises* (radius + shadow); it does\n * not inset itself. The gutter around a floating region is the **container's**\n * job — padding on the slot, never a child margin, so a `height: 100%` region\n * fits with no overflow (an `fold-app-shell` pads a cell whose content is\n * elevated). Radius/shadow are tokenised (`--fold-surface-radius` /\n * `--fold-surface-shadow`), so a scope can dial the elevation without a new input.\n *\n * @selector `[foldElevated]`\n * @example\n * ```html\n * <fold-menu railPrimary foldElevated />           <!-- always raised -->\n * <app-header header [foldElevated]=\"dense()\" />  <!-- conditional -->\n * ```\n */\n@Directive({\n  selector: \"[foldElevated]\",\n  standalone: true,\n  host: { \"[attr.data-elevated]\": \"foldElevated() ? '' : null\" },\n})\nexport class FoldElevatedDirective {\n  /** Raise this surface (a bare `foldElevated` attribute → `true`). */\n  readonly foldElevated = input(true, { transform: booleanAttribute });\n}\n","import {\n  DestroyRef,\n  Directive,\n  ElementRef,\n  computed,\n  inject,\n  input,\n} from \"@angular/core\";\nimport { ScrollRegionRegistry } from \"../a11y/scroll-region-registry.service\";\n\n/** Which axis a scroll region scrolls on. */\nexport type FoldScrollAxis = \"block\" | \"inline\" | \"both\";\n\n/**\n * `[foldScrollRegion]` — turns any element into a **bounded, coordinated scroll\n * box** without the consumer ever writing `overflow`.\n *\n * It is the one opt-in of the shell scroll system (`docs/scroll.md`): with\n * `fold-app-shell` owning the page scroll, a layout that genuinely needs an\n * independently-scrolling area (a split list/detail, a data-table body, a sticky\n * sidebar, a panel body) marks that area with this directive instead of\n * hand-rolling the three foot-guns. It:\n *\n * - sets `overflow: auto`, `min-height: 0` (and `min-width: 0` for the inline\n *   axis) and `overscroll-behavior: contain` — the three foot-guns, in one place;\n * - paints the thin house scrollbar (`scrollbar-width: thin`; the tokenised\n *   colour/radius lands with the scroll-system Slice C);\n * - **registers with the {@link ScrollRegionRegistry}**, so an overlay (the panel\n *   host) can freeze this region — alongside the shell's own scroll box — while a\n *   modal is open, robust to the scroll owner being the shell rather than `body`.\n *   The registry is injected optionally, so the directive is a useful bounded\n *   scroll box even outside a shell; the coordination is a bonus when one is present.\n *\n * The axis is the directive's own value (default `block` = vertical):\n * `foldScrollRegion` / `foldScrollRegion=\"block\"` (vertical), `=\"inline\"`\n * (horizontal), `=\"both\"`.\n *\n * @selector `[foldScrollRegion]`\n *\n * @example\n * ```html\n * <!-- a split view: the list scrolls on its own, the detail flows -->\n * <fold-aside-layout>\n *   <nav asideleft foldScrollRegion>…long list…</nav>\n *   <article>…detail…</article>\n * </fold-aside-layout>\n *\n * <div foldScrollRegion=\"both\" class=\"table-body\">…</div>\n * ```\n */\n@Directive({\n  selector: \"[foldScrollRegion]\",\n  standalone: true,\n  host: {\n    // The `fold-scroll-region` class carries the house scrollbar's WebKit/Blink\n    // `::-webkit-scrollbar` pseudo (which can't be an inline style) from the\n    // global rule in tokens.css; the standard scrollbar props are inline below.\n    class: \"fold-scroll-region\",\n    \"[style.overflowY]\": \"overflowY()\",\n    \"[style.overflowX]\": \"overflowX()\",\n    \"[style.minHeight]\": \"minHeight()\",\n    \"[style.minWidth]\": \"minWidth()\",\n    \"[style.overscrollBehavior]\": '\"contain\"',\n    // Keep the reading position when content above the region reflows (native\n    // overflow-anchor; covers content mutation — a viewport-resize correction\n    // is a deferred follow-up, see docs/scroll.md Slice C).\n    \"[style.overflowAnchor]\": '\"auto\"',\n    // The house scrollbar (Firefox / standard). Tokenised, with a currentColor\n    // fallback so the directive still paints a subtle thumb without tokens.css.\n    \"[style.scrollbarWidth]\": '\"thin\"',\n    \"[style.scrollbarColor]\": \"scrollbarColor\",\n  },\n})\nexport class FoldScrollRegionDirective {\n  /** The scroll axis; defaults to `block` (vertical), including a bare attribute. */\n  readonly foldScrollRegion = input<FoldScrollAxis, FoldScrollAxis | \"\">(\n    \"block\",\n    { transform: (value) => (value === \"\" ? \"block\" : value) },\n  );\n\n  /** `scrollbar-color: <thumb> <track>`, tokenised with a self-sufficient\n   *  fallback so the region paints a subtle thumb even without `tokens.css`. */\n  protected readonly scrollbarColor =\n    \"var(--fold-scrollbar-thumb, color-mix(in srgb, currentColor 24%, transparent)) var(--fold-scrollbar-track, transparent)\";\n\n  protected readonly overflowY = computed(() =>\n    this.foldScrollRegion() === \"inline\" ? null : \"auto\",\n  );\n  protected readonly overflowX = computed(() =>\n    this.foldScrollRegion() === \"block\" ? null : \"auto\",\n  );\n  /** A scrollable box must be shrinkable on its scroll axis, or flex/grid parents\n   *  pin it to content height and it never scrolls. */\n  protected readonly minHeight = computed(() =>\n    this.foldScrollRegion() === \"inline\" ? null : \"0\",\n  );\n  protected readonly minWidth = computed(() =>\n    this.foldScrollRegion() === \"block\" ? null : \"0\",\n  );\n\n  constructor() {\n    const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n    const registry = inject(ScrollRegionRegistry, { optional: true });\n    registry?.register(element);\n    inject(DestroyRef).onDestroy(() => registry?.unregister(element));\n  }\n}\n","/**\n * Pure numeric-settling helpers for {@link FoldNumberInputComponent}.\n *\n * Kept out of the component so \"what counts as a valid value\" is one small,\n * deterministic, independently-tested unit — blur and stepping both route\n * through {@link settleNumber}, so they can never diverge.\n */\nexport interface FoldNumberConstraints {\n  /** The effective step (> 0); also the grid spacing and the default precision. */\n  readonly step: number;\n  /** Lower bound, if any (the constraints object always carries the key). */\n  readonly min?: number | undefined;\n  /** Upper bound, if any (the constraints object always carries the key). */\n  readonly max?: number | undefined;\n  /** Decimal-place cap; when omitted, precision is derived from {@link step}. */\n  readonly decimals?: number | undefined;\n  /** Whether the value must land on the step grid. */\n  readonly snapToStep: boolean;\n}\n\n/** Decimal places carried by a finite number, robust to exponent form (`1e-7`). */\nexport function decimalsOf(n: number): number {\n  if (!Number.isFinite(n)) {\n    return 0;\n  }\n  const s = n.toString();\n  const eIndex = s.indexOf(\"e-\");\n  if (eIndex !== -1) {\n    const mantissa = s.slice(0, eIndex);\n    const dot = mantissa.indexOf(\".\");\n    const mantissaDecimals = dot === -1 ? 0 : mantissa.length - dot - 1;\n    return Number(s.slice(eIndex + 2)) + mantissaDecimals;\n  }\n  const dot = s.indexOf(\".\");\n  return dot === -1 ? 0 : s.length - dot - 1;\n}\n\n/** Snap to the nearest grid point `base + k·step` (base = `min` ?? 0). */\nfunction snapToGrid(n: number, c: FoldNumberConstraints): number {\n  const base = c.min ?? 0;\n  return base + Math.round((n - base) / c.step) * c.step;\n}\n\n/** Round to the effective precision (kills float drift like 0.1 + 0.2). */\nfunction round(n: number, c: FoldNumberConstraints): number {\n  const raw = c.decimals ?? decimalsOf(c.step);\n  const places = Math.min(100, Math.max(0, raw));\n  return Number(n.toFixed(places));\n}\n\n/** Clamp into the min/max bounds (each optional). */\nfunction clamp(n: number, c: FoldNumberConstraints): number {\n  let out = n;\n  if (c.min !== undefined) {\n    out = Math.max(c.min, out);\n  }\n  if (c.max !== undefined) {\n    out = Math.min(c.max, out);\n  }\n  return out;\n}\n\n/**\n * Resolve a raw number to a valid settled value: snap to the step grid (when\n * enabled) → round to the precision → clamp into `[min, max]`.\n */\nexport function settleNumber(n: number, c: FoldNumberConstraints): number {\n  const snapped = c.snapToStep ? snapToGrid(n, c) : n;\n  return clamp(round(snapped, c), c);\n}\n\n/**\n * Is `max` reachable on the step grid? False when `(max − base) % step ≠ 0`\n * (base = `min` ?? 0), i.e. the top bound sits between two grid points — with\n * snapping on, `max` is then only reachable off-grid via the clamp. No `max`\n * ⇒ nothing to misalign ⇒ true.\n */\nexport function isStepAligned(c: FoldNumberConstraints): boolean {\n  if (c.max === undefined) {\n    return true;\n  }\n  const steps = (c.max - (c.min ?? 0)) / c.step;\n  return Math.abs(steps - Math.round(steps)) < 1e-9;\n}\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport {\n  booleanAttribute,\n  Component,\n  computed,\n  effect,\n  inject,\n  input,\n  isDevMode,\n  model,\n} from \"@angular/core\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldRepeatPressDirective } from \"../../../directives/repeat-press.directive\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport { FoldInputBaseComponent } from \"./input-base.component\";\nimport { readInputValue } from \"./input-value\";\nimport {\n  isStepAligned,\n  settleNumber,\n  type FoldNumberConstraints,\n} from \"./number-settle\";\n\n/** The increment/decrement glyph: chevrons, `− / +`, or no buttons. */\nexport type FoldNumberSpinner = \"none\" | \"arrows\" | \"plusminus\";\n/** Where the spinner buttons sit: stacked inside the box, or flanking it. */\nexport type FoldNumberControls = \"inside\" | \"outside\";\n\n/**\n * `<fold-number-input>` — the numeric sibling of {@link FoldInputComponent}. Split\n * out on purpose: a number field's value is a `number`, not a string, so keeping\n * it separate lets each control carry its true type (`FormValueControl<number |\n * null>` here, `FormValueControl<string>` for text) instead of the leaky\n * `string | number` union one shared control would force onto every Signal Forms\n * field. It also keeps the number-only knobs ({@link min} / {@link max} /\n * {@link step}) off the text input.\n *\n * Empty is a first-class value: clearing the field sets `null` (not `0`, not\n * `NaN`), so an optional number reads correctly. Shares the exact visual shell as\n * `fold-input` (same tokens, sizes, variants) via `input-shell.scss`.\n *\n * @selector `fold-number-input`\n *\n * @example\n * ```html\n * <!-- Signal-forms field (form.bpm: number) -->\n * <fold-number-input placeholder=\"BPM\" [min]=\"0\" [formField]=\"form.bpm\" />\n *\n * <!-- Standalone two-way -->\n * <fold-number-input align=\"center\" [step]=\"0.5\" [(value)]=\"gain\" />\n * ```\n */\n@Component({\n  selector: \"fold-number-input\",\n  standalone: true,\n  imports: [\n    FoldInputBaseComponent,\n    FoldIconComponent,\n    FoldRepeatPressDirective,\n    NgTemplateOutlet,\n  ],\n  templateUrl: \"./number-input.component.html\",\n  styleUrl: \"./number-input.component.scss\",\n  host: {\n    \"[class]\": 'size() + \" \" + align() + \" \" + variant()',\n  },\n})\nexport class FoldNumberInputComponent implements FormValueControl<\n  number | null\n> {\n  /** The bound value — `null` when the field is empty. A `model()` so signal\n   *  forms' `FormField` and `[(value)]` both keep it in sync. */\n  readonly value = model<number | null>(null);\n  /** Disabled state — bound automatically by `FormField` from the field. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — set on blur (so `FormField` marks the field\n   *  touched), and kept in sync with the field's touched state. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField` from the field. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n\n  /** Size preset — see {@link FoldInputComponent.size}. @default 'md' */\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Text alignment inside the box. @default 'start' */\n  readonly align = input<\"start\" | \"center\">(\"start\");\n  /** Visual variant — see {@link FoldInputComponent.variant}. @default 'default' */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n\n  /** Optional label displayed above the input. */\n  readonly label = input<string>();\n  /** Show a required marker on the label (and set the native `required`). */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Show a lighter `(optional)` marker on the label (ignored when required). */\n  readonly optional = input(false, { transform: booleanAttribute });\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n  /**\n   * Longer explanation behind an `i` at the end of the label line — for the\n   * sentence or two a {@link hint} can't carry. Forwarded to `fold-input-base`.\n   */\n  readonly info = input<string>();\n  /** Accessible name of the info button. @default 'More information' */\n  readonly infoLabel = input<string | undefined>();\n  /** Optional helper text shown under the input. */\n  readonly hint = input<string>();\n  /** Placeholder text. */\n  readonly placeholder = input(\"\");\n  /** Render as read-only. Named `readOnly` to avoid the `FormField` reserved binding. */\n  readonly readOnly = input(false);\n\n  /** Minimum value — passthrough + bound by a field's `min` validator. */\n  readonly min = input<number | undefined>(undefined);\n  /** Maximum value — passthrough + bound by a field's `max` validator. */\n  readonly max = input<number | undefined>(undefined);\n  /** Increment applied by the spinner buttons / arrow keys. @default 1 */\n  readonly step = input<number | undefined>(undefined);\n\n  /** The step glyph — `plusminus` (`−`/`+`, default), `arrows` (chevrons), `none`. */\n  readonly spinner = input<FoldNumberSpinner>(\"plusminus\");\n  /** Where the buttons sit — `inside` the box (default) or `outside`, flanking it. */\n  readonly controls = input<FoldNumberControls>(\"inside\");\n\n  /** Show the {@link step} as a small suffix, so the increment is visible. */\n  readonly showStep = input(false, { transform: booleanAttribute });\n\n  /**\n   * Keep the value on the step grid. When on, a manually typed value snaps to\n   * the nearest valid `base + n·step` **on blur** (base is {@link min}, else 0),\n   * then clamps to min/max — so free typing is allowed while editing, and the\n   * settled value always respects the step. Off by default.\n   */\n  readonly snapToStep = input(false, { transform: booleanAttribute });\n\n  /**\n   * Cap the number of decimal places on the settled value: it is rounded to this\n   * many decimals when stepping and on blur. `undefined` = unconstrained (any\n   * decimals allowed). See {@link integer} for the `0` shorthand.\n   */\n  readonly decimals = input<number | undefined>(undefined);\n\n  /** Shorthand for `decimals = 0` — integers only. Takes precedence over {@link decimals}. */\n  readonly integer = input(false, { transform: booleanAttribute });\n\n  /** Unique, SSR-safe id for label association (see {@link FoldIdService}). */\n  readonly inputId = inject(FoldIdService).next(\"fold-number-input\");\n\n  /** The effective step (defaults to 1 when unset). */\n  protected readonly effectiveStep = computed(() => this.step() ?? 1);\n\n  /** The resolved decimal cap: `0` when {@link integer}, else {@link decimals}. */\n  private readonly maxDecimals = computed<number | undefined>(() =>\n    this.integer() ? 0 : this.decimals(),\n  );\n\n  /** The active numeric constraints — shared by settling and the alignment check. */\n  private readonly constraints = computed<FoldNumberConstraints>(() => ({\n    step: this.effectiveStep(),\n    min: this.min(),\n    max: this.max(),\n    decimals: this.maxDecimals(),\n    snapToStep: this.snapToStep(),\n  }));\n\n  /** The native `step` attribute — `1` for integers with no explicit step. */\n  protected readonly nativeStep = computed<number | undefined>(\n    () => this.step() ?? (this.integer() ? 1 : undefined),\n  );\n\n  /** At/below the min bound — the decrement button is disabled. */\n  protected readonly atMin = computed(() => {\n    const min = this.min();\n    const v = this.value();\n    return min !== undefined && v !== null && v <= min;\n  });\n\n  /** At/above the max bound — the increment button is disabled. */\n  protected readonly atMax = computed(() => {\n    const max = this.max();\n    const v = this.value();\n    return max !== undefined && v !== null && v >= max;\n  });\n\n  /** Whether any spinner button renders. */\n  protected readonly hasControls = computed(() => this.spinner() !== \"none\");\n  /** Non-interactive (disabled or read-only) → both buttons off. */\n  private readonly frozen = computed(() => this.disabled() || this.readOnly());\n  /** The increment button is disabled. */\n  protected readonly incDisabled = computed(\n    () => this.frozen() || this.atMax(),\n  );\n  /** The decrement button is disabled. */\n  protected readonly decDisabled = computed(\n    () => this.frozen() || this.atMin(),\n  );\n\n  /** The message to show under the field: the first error, once touched. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n\n  /** `aria-describedby` target: the error when shown, else the hint, else none. */\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  constructor() {\n    // Dev-only nudge: with snapping on, an off-grid `max` is only reachable via\n    // the clamp — usually a step/min/max mismatch the author wants to know about.\n    effect(() => {\n      if (this.snapToStep() && !isStepAligned(this.constraints())) {\n        this.warnStepMisaligned();\n      }\n    });\n  }\n\n  /** Parses the native value: empty or unparseable → `null`, otherwise a `number`. */\n  onInputChange(event: Event): void {\n    const raw = readInputValue(event);\n    if (raw === \"\") {\n      this.value.set(null);\n      return;\n    }\n    const parsed = Number(raw);\n    this.value.set(Number.isNaN(parsed) ? null : parsed);\n  }\n\n  /** On blur: mark touched; settle the value onto its constraints when any apply. */\n  protected onBlur(): void {\n    this.touched.set(true);\n    const v = this.value();\n    if (v === null || !Number.isFinite(v)) {\n      return;\n    }\n    if (this.snapToStep() || this.maxDecimals() !== undefined) {\n      this.value.set(this.settle(v));\n    }\n  }\n\n  /** Keyboard-only click (Enter/Space have `detail === 0`); pointer presses are\n   *  driven by {@link FoldRepeatPressDirective} so they don't double-step. */\n  protected onButtonClick(direction: 1 | -1, event: MouseEvent): void {\n    if (event.detail === 0) {\n      this.stepBy(direction);\n    }\n  }\n\n  /** Own the ↑/↓ arrows so keyboard stepping obeys snap/clamp/precision, not the\n   *  native `step` (which would only reconcile on blur). */\n  protected onArrow(direction: 1 | -1, event: Event): void {\n    event.preventDefault();\n    this.stepBy(direction);\n  }\n\n  /** A focused number field changes value on scroll — blur so the page scrolls\n   *  instead (blur on an unfocused input is a no-op). */\n  protected onWheel(event: WheelEvent): void {\n    if (event.target instanceof HTMLElement) {\n      event.target.blur();\n    }\n  }\n\n  /** The glyph for a step button in the given direction (arrows vs `− / +`). */\n  protected iconFor(direction: 1 | -1): FoldIconName {\n    if (this.spinner() === \"arrows\") {\n      return direction === 1 ? \"chevron-up\" : \"chevron-down\";\n    }\n    return direction === 1 ? \"plus\" : \"minus\";\n  }\n\n  /** Nudge the value by ±step, then settle it onto its constraints. */\n  protected stepBy(direction: 1 | -1): void {\n    if (this.disabled() || this.readOnly()) {\n      return;\n    }\n    const raw = (this.value() ?? 0) + direction * this.effectiveStep();\n    this.value.set(this.settle(raw));\n    this.touched.set(true);\n  }\n\n  /**\n   * Resolve a raw number to a valid settled value — the single source of truth\n   * for \"what counts as valid\", so blur and stepping never diverge. Delegates to\n   * the pure {@link settleNumber} with the current constraints.\n   */\n  private settle(n: number): number {\n    return settleNumber(n, this.constraints());\n  }\n\n  private warnStepMisaligned(): void {\n    if (isDevMode()) {\n      console.warn(\n        `[fold-number-input] max ${String(this.max())} is off the step grid ` +\n          `(${this.min() ?? 0} + k·${this.effectiveStep()}); with snapToStep it ` +\n          `is only reachable via the clamp, not by stepping.`,\n      );\n    }\n  }\n}\n","<fold-input-base\n  [label]=\"label()\"\n  [for]=\"inputId\"\n  [required]=\"required()\"\n  [optional]=\"optional()\"\n  [optionalLabel]=\"optionalLabel()\"\n  [info]=\"info()\"\n  [infoLabel]=\"infoLabel()\"\n  [hint]=\"hint()\"\n  [error]=\"errorMessage()\"\n>\n  <ng-template\n    #stepBtn\n    let-dir=\"dir\"\n    let-size=\"size\"\n    let-cls=\"cls\"\n    let-off=\"off\"\n  >\n    <button\n      type=\"button\"\n      tabindex=\"-1\"\n      aria-hidden=\"true\"\n      [class]=\"cls\"\n      [disabled]=\"off\"\n      [attr.aria-label]=\"dir === 1 ? 'Increment' : 'Decrement'\"\n      foldRepeatPress\n      [foldRepeatPressDisabled]=\"off\"\n      (foldRepeatPress)=\"stepBy(dir)\"\n      (click)=\"onButtonClick(dir, $event)\"\n    >\n      <fold-icon [name]=\"iconFor(dir)\" [size]=\"size\" />\n    </button>\n  </ng-template>\n\n  <div\n    class=\"ni-field\"\n    [class.ni-inside]=\"controls() === 'inside'\"\n    [class.ni-outside]=\"controls() === 'outside'\"\n  >\n    @if (hasControls() && controls() === \"outside\") {\n      <ng-container\n        *ngTemplateOutlet=\"\n          stepBtn;\n          context: {\n            dir: -1,\n            size: 'sm',\n            cls: 'ni-btn ni-dec',\n            off: decDisabled(),\n          }\n        \"\n      />\n    }\n\n    <div class=\"ni-box\">\n      <input\n        [id]=\"inputId\"\n        type=\"number\"\n        [attr.min]=\"min()\"\n        [attr.max]=\"max()\"\n        [attr.step]=\"nativeStep()\"\n        [attr.placeholder]=\"placeholder()\"\n        [attr.readonly]=\"readOnly() || null\"\n        [attr.disabled]=\"disabled() || null\"\n        [attr.required]=\"required() || null\"\n        [attr.aria-invalid]=\"errorMessage() ? true : null\"\n        [attr.aria-describedby]=\"describedBy()\"\n        [value]=\"value()\"\n        (input)=\"onInputChange($event)\"\n        (blur)=\"onBlur()\"\n        (keydown.arrowUp)=\"onArrow(1, $event)\"\n        (keydown.arrowDown)=\"onArrow(-1, $event)\"\n        (wheel)=\"onWheel($event)\"\n      />\n\n      @if (showStep() && step() != null) {\n        <span class=\"ni-step\" aria-hidden=\"true\">{{ step() }}</span>\n      }\n\n      @if (hasControls() && controls() === \"inside\") {\n        <span class=\"ni-stack\">\n          <ng-container\n            *ngTemplateOutlet=\"\n              stepBtn;\n              context: {\n                dir: 1,\n                size: 'xs',\n                cls: 'ni-stack-btn ni-inc',\n                off: incDisabled(),\n              }\n            \"\n          />\n          <ng-container\n            *ngTemplateOutlet=\"\n              stepBtn;\n              context: {\n                dir: -1,\n                size: 'xs',\n                cls: 'ni-stack-btn ni-dec',\n                off: decDisabled(),\n              }\n            \"\n          />\n        </span>\n      }\n    </div>\n\n    @if (hasControls() && controls() === \"outside\") {\n      <ng-container\n        *ngTemplateOutlet=\"\n          stepBtn;\n          context: {\n            dir: 1,\n            size: 'sm',\n            cls: 'ni-btn ni-inc',\n            off: incDisabled(),\n          }\n        \"\n      />\n    }\n  </div>\n</fold-input-base>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  inject,\n  input,\n  model,\n  numberAttribute,\n} from \"@angular/core\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldInputBaseComponent } from \"./input-base.component\";\nimport { readInputValue } from \"./input-value\";\n\n/**\n * `<fold-textarea>` — the multiline sibling of {@link FoldInputComponent}\n * (`value: string`): a note / description field. It shares the exact box chrome\n * (tokens, sizes, `panel` variant, focus/disabled) as `fold-input` via\n * `input-shell.scss`, and the label / required / hint / error chrome via {@link\n * FoldInputBaseComponent} — so a multiline field is no longer a hand-rolled native\n * `<textarea>` + duplicated box CSS.\n *\n * **No resize handle by design** — the box has a fixed row count and **wraps +\n * scrolls** its overflow (`resize: none; overflow-y: auto`), so it never breaks a\n * panel/form layout the way a user-draggable corner does. Height is driven by\n * `rows` (the box shares the control font / padding / radius but not a fixed\n * height).\n *\n * Integrates with signal forms via the `FormValueControl` contract (bind with\n * `[formField]`), or drive it standalone with `[(value)]` / `(valueChange)`.\n *\n * @selector `fold-textarea`\n *\n * @example\n * ```html\n * <!-- Signal-forms field -->\n * <fold-textarea label=\"Note\" [rows]=\"3\" [formField]=\"form.note\" />\n *\n * <!-- Standalone two-way -->\n * <fold-textarea placeholder=\"Consigne…\" [(value)]=\"note\" />\n * ```\n */\n@Component({\n  selector: \"fold-textarea\",\n  standalone: true,\n  imports: [FoldInputBaseComponent],\n  templateUrl: \"./textarea.component.html\",\n  styleUrl: \"./textarea.component.scss\",\n  host: {\n    \"[class]\": 'size() + \" \" + variant()',\n  },\n})\nexport class FoldTextareaComponent implements FormValueControl<string> {\n  /** The bound value — a `model()` so signal forms' `FormField` and `[(value)]`\n   *  both keep it in sync. */\n  readonly value = model<string>(\"\");\n  /** Disabled state — bound automatically by `FormField` from the field. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — set on blur, kept in sync with the field. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField` from the field. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n\n  /** Visible row count — the initial (and, with no resize, effective) height.\n   *  Overflow beyond it wraps and scrolls. @default 3 */\n  readonly rows = input(3, { transform: numberAttribute });\n\n  /** Size preset — see {@link FoldInputComponent.size}. @default 'md' */\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Visual variant — see {@link FoldInputComponent.variant}. @default 'default' */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n\n  /** Optional label displayed above the control. */\n  readonly label = input<string>();\n  /** Show a required marker on the label (and set the native `required`). */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Show a lighter `(optional)` marker on the label (ignored when required). */\n  readonly optional = input(false, { transform: booleanAttribute });\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n  /**\n   * Longer explanation behind an `i` at the end of the label line — for the\n   * sentence or two a {@link hint} can't carry. Forwarded to `fold-input-base`.\n   */\n  readonly info = input<string>();\n  /** Accessible name of the info button. @default 'More information' */\n  readonly infoLabel = input<string | undefined>();\n  /** Optional helper text shown under the control. */\n  readonly hint = input<string>();\n  /** Placeholder text. */\n  readonly placeholder = input(\"\");\n  /** Render as read-only. Named `readOnly` (not `readonly`) to avoid the\n   *  signal-forms `FormField` reserved `readonly` field-state binding. */\n  readonly readOnly = input(false);\n\n  /** Unique, SSR-safe id for label association (see {@link FoldIdService}). */\n  readonly inputId = inject(FoldIdService).next(\"fold-textarea\");\n\n  /** The message to show under the field: the first error, once touched. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n\n  /** `aria-describedby` target: the error when shown, else the hint, else none. */\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  /** Handles native input event. `value.set()` also fires the model's auto\n   *  `valueChange` output for standalone `(valueChange)` consumers. */\n  onInputChange(event: Event): void {\n    this.value.set(readInputValue(event));\n  }\n\n  /** Mark the field touched on blur, so errors can surface. */\n  protected onBlur(): void {\n    this.touched.set(true);\n  }\n}\n","<fold-input-base\n  [label]=\"label()\"\n  [for]=\"inputId\"\n  [required]=\"required()\"\n  [optional]=\"optional()\"\n  [optionalLabel]=\"optionalLabel()\"\n  [info]=\"info()\"\n  [infoLabel]=\"infoLabel()\"\n  [hint]=\"hint()\"\n  [error]=\"errorMessage()\"\n>\n  <textarea\n    [id]=\"inputId\"\n    [attr.rows]=\"rows()\"\n    [attr.placeholder]=\"placeholder()\"\n    [attr.readonly]=\"readOnly() || null\"\n    [attr.disabled]=\"disabled() || null\"\n    [attr.required]=\"required() || null\"\n    [attr.aria-invalid]=\"errorMessage() ? true : null\"\n    [attr.aria-describedby]=\"describedBy()\"\n    [value]=\"value()\"\n    (input)=\"onInputChange($event)\"\n    (blur)=\"onBlur()\"\n  ></textarea>\n</fold-input-base>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  inject,\n  input,\n  model,\n} from \"@angular/core\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldInputBaseComponent } from \"./input-base.component\";\nimport { readInputValue } from \"./input-value\";\n\n/** The native calendar-date input types `fold-date` wraps — they share the exact\n *  chrome and a `string` value; only the picker granularity differs. For a\n *  clock/time field use {@link FoldTimeComponent} (`fold-time`). */\nexport type FoldDateType = \"date\" | \"datetime-local\" | \"month\" | \"week\";\n\n/**\n * `<fold-date>` — the calendar-field sibling of {@link FoldInputComponent}: a thin\n * wrapper around a **native `<input type=\"date\">`** (and its family — `datetime-local`,\n * `month`, `week` via {@link type}), like `fold-select` wraps the native `<select>`.\n * It honours the project's Signal-Forms convention (native `[value]` / `(input)`)\n * and gives back a **typed `[(value)]`** (the native value string, `YYYY-MM-DD` for\n * a date) — so consumers stop hand-writing an `inputValue($event)` reader on a bare\n * `<input type=\"date\">`. For a time-of-day field, use the sibling {@link\n * FoldTimeComponent} (`fold-time`).\n *\n * The native pickers keep the OS calendar + mobile keyboard for free (same\n * reasoning as {@link FoldNumberInputComponent} staying `type=\"number\"`). This is\n * **not** a calendar popover — that's the `fold-calendar` family; this is the plain\n * field. Shares the exact box chrome (tokens, sizes, `panel` variant) via\n * `input-shell.scss` and the label / required / hint / error chrome via {@link\n * FoldInputBaseComponent}.\n *\n * @selector `fold-date`\n *\n * @example\n * ```html\n * <!-- A date field, signal-forms bound -->\n * <fold-date label=\"Date de livraison\" [formField]=\"form.date\" />\n *\n * <!-- A month field, standalone two-way -->\n * <fold-date type=\"month\" [(value)]=\"billingMonth\" />\n * ```\n */\n@Component({\n  selector: \"fold-date\",\n  standalone: true,\n  imports: [FoldInputBaseComponent],\n  templateUrl: \"./date.component.html\",\n  styleUrl: \"./date.component.scss\",\n  host: {\n    \"[class]\": 'size() + \" \" + variant()',\n  },\n})\nexport class FoldDateComponent implements FormValueControl<string> {\n  /** The bound value — the native input string (`YYYY-MM-DD`, `HH:mm`, …). A\n   *  `model()` so `FormField` and `[(value)]` both stay in sync. */\n  readonly value = model<string>(\"\");\n  /** Disabled state — bound automatically by `FormField` from the field. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — set on blur, kept in sync with the field. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField` from the field. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n\n  /** Which native temporal picker to render. @default 'date' */\n  readonly type = input<FoldDateType>(\"date\");\n  /** Native `min` bound (e.g. `2026-01-01`) — passes through to the input. Typed\n   *  `string | undefined` (not `| null`) to stay assignable to the signal-forms\n   *  `FormValueControl` reserved `min` field-state binding. */\n  readonly min = input<string | undefined>(undefined);\n  /** Native `max` bound — passes through to the input (see {@link min}). */\n  readonly max = input<string | undefined>(undefined);\n  /** Native `step` (e.g. `60` for whole-minute time) — passes through. */\n  readonly step = input<string | number | undefined>(undefined);\n\n  /** Size preset — see {@link FoldInputComponent.size}. @default 'md' */\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Visual variant — see {@link FoldInputComponent.variant}. @default 'default' */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n\n  /** Optional label displayed above the control. */\n  readonly label = input<string>();\n  /** Show a required marker on the label (and set the native `required`). */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Show a lighter `(optional)` marker on the label (ignored when required). */\n  readonly optional = input(false, { transform: booleanAttribute });\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n  /**\n   * Longer explanation behind an `i` at the end of the label line — for the\n   * sentence or two a {@link hint} can't carry. Forwarded to `fold-input-base`.\n   */\n  readonly info = input<string>();\n  /** Accessible name of the info button. @default 'More information' */\n  readonly infoLabel = input<string | undefined>();\n  /** Optional helper text shown under the control. */\n  readonly hint = input<string>();\n  /** Render as read-only. Named `readOnly` (not `readonly`) to avoid the\n   *  signal-forms `FormField` reserved `readonly` field-state binding. */\n  readonly readOnly = input(false);\n\n  /** Unique, SSR-safe id for label association (see {@link FoldIdService}). */\n  readonly inputId = inject(FoldIdService).next(\"fold-date\");\n\n  /** The message to show under the field: the first error, once touched. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n\n  /** `aria-describedby` target: the error when shown, else the hint, else none. */\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  /** Write the chosen native value back through the model. */\n  onInputChange(event: Event): void {\n    this.value.set(readInputValue(event));\n  }\n\n  /** Mark the field touched on blur, so errors can surface. */\n  protected onBlur(): void {\n    this.touched.set(true);\n  }\n}\n","<fold-input-base\n  [label]=\"label()\"\n  [for]=\"inputId\"\n  [required]=\"required()\"\n  [optional]=\"optional()\"\n  [optionalLabel]=\"optionalLabel()\"\n  [info]=\"info()\"\n  [infoLabel]=\"infoLabel()\"\n  [hint]=\"hint()\"\n  [error]=\"errorMessage()\"\n>\n  <input\n    [id]=\"inputId\"\n    class=\"date\"\n    [attr.type]=\"type()\"\n    [attr.min]=\"min()\"\n    [attr.max]=\"max()\"\n    [attr.step]=\"step()\"\n    [attr.readonly]=\"readOnly() || null\"\n    [attr.disabled]=\"disabled() || null\"\n    [attr.required]=\"required() || null\"\n    [attr.aria-invalid]=\"errorMessage() ? true : null\"\n    [attr.aria-describedby]=\"describedBy()\"\n    [value]=\"value()\"\n    (input)=\"onInputChange($event)\"\n    (blur)=\"onBlur()\"\n  />\n</fold-input-base>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  inject,\n  input,\n  model,\n} from \"@angular/core\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldInputBaseComponent } from \"./input-base.component\";\nimport { readInputValue } from \"./input-value\";\n\n/**\n * `<fold-time>` — the time-of-day sibling of {@link FoldDateComponent}: a thin\n * wrapper around a **native `<input type=\"time\">`**, like `fold-select` wraps the\n * native `<select>`. It honours the project's Signal-Forms convention (native\n * `[value]` / `(input)`) and gives back a **typed `[(value)]`** (the native value\n * string, `HH:mm`, or `HH:mm:ss` when a sub-minute `step` is set) — so consumers\n * stop hand-writing an `inputValue($event)` reader on a bare `<input type=\"time\">`.\n *\n * A separate control from `fold-date` (rather than a `type=\"time\"` on it) so each\n * reads for what it is at the call site — the same \"one control, one job\" split as\n * {@link FoldInputComponent} vs {@link FoldNumberInputComponent}. Shares the exact\n * box chrome (tokens, sizes, `panel` variant) via `input-shell.scss` and the label\n * / required / hint / error chrome via {@link FoldInputBaseComponent}.\n *\n * @selector `fold-time`\n *\n * @example\n * ```html\n * <!-- Signal-forms bound -->\n * <fold-time label=\"Heure de retrait\" [formField]=\"form.time\" />\n *\n * <!-- Standalone two-way, whole-minute steps -->\n * <fold-time [step]=\"60\" [(value)]=\"pickupTime\" />\n * ```\n */\n@Component({\n  selector: \"fold-time\",\n  standalone: true,\n  imports: [FoldInputBaseComponent],\n  templateUrl: \"./time.component.html\",\n  styleUrl: \"./date.component.scss\",\n  host: {\n    \"[class]\": 'size() + \" \" + variant()',\n  },\n})\nexport class FoldTimeComponent implements FormValueControl<string> {\n  /** The bound value — the native input string (`HH:mm` / `HH:mm:ss`). A\n   *  `model()` so `FormField` and `[(value)]` both stay in sync. */\n  readonly value = model<string>(\"\");\n  /** Disabled state — bound automatically by `FormField` from the field. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — set on blur, kept in sync with the field. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField` from the field. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n\n  /** Native `min` bound (e.g. `09:00`) — passes through to the input. Typed\n   *  `string | undefined` (not `| null`) to stay assignable to the signal-forms\n   *  `FormValueControl` reserved `min` field-state binding. */\n  readonly min = input<string | undefined>(undefined);\n  /** Native `max` bound (e.g. `18:00`) — passes through (see {@link min}). */\n  readonly max = input<string | undefined>(undefined);\n  /** Native `step` in seconds (e.g. `60` whole-minute, `1` seconds field). */\n  readonly step = input<string | number | undefined>(undefined);\n\n  /** Size preset — see {@link FoldInputComponent.size}. @default 'md' */\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Visual variant — see {@link FoldInputComponent.variant}. @default 'default' */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n\n  /** Optional label displayed above the control. */\n  readonly label = input<string>();\n  /** Show a required marker on the label (and set the native `required`). */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Show a lighter `(optional)` marker on the label (ignored when required). */\n  readonly optional = input(false, { transform: booleanAttribute });\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n  /**\n   * Longer explanation behind an `i` at the end of the label line — for the\n   * sentence or two a {@link hint} can't carry. Forwarded to `fold-input-base`.\n   */\n  readonly info = input<string>();\n  /** Accessible name of the info button. @default 'More information' */\n  readonly infoLabel = input<string | undefined>();\n  /** Optional helper text shown under the control. */\n  readonly hint = input<string>();\n  /** Render as read-only. Named `readOnly` (not `readonly`) to avoid the\n   *  signal-forms `FormField` reserved `readonly` field-state binding. */\n  readonly readOnly = input(false);\n\n  /** Unique, SSR-safe id for label association (see {@link FoldIdService}). */\n  readonly inputId = inject(FoldIdService).next(\"fold-time\");\n\n  /** The message to show under the field: the first error, once touched. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n\n  /** `aria-describedby` target: the error when shown, else the hint, else none. */\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  /** Write the chosen native value back through the model. */\n  onInputChange(event: Event): void {\n    this.value.set(readInputValue(event));\n  }\n\n  /** Mark the field touched on blur, so errors can surface. */\n  protected onBlur(): void {\n    this.touched.set(true);\n  }\n}\n","<fold-input-base\n  [label]=\"label()\"\n  [for]=\"inputId\"\n  [required]=\"required()\"\n  [optional]=\"optional()\"\n  [optionalLabel]=\"optionalLabel()\"\n  [info]=\"info()\"\n  [infoLabel]=\"infoLabel()\"\n  [hint]=\"hint()\"\n  [error]=\"errorMessage()\"\n>\n  <input\n    [id]=\"inputId\"\n    class=\"date\"\n    type=\"time\"\n    [attr.min]=\"min()\"\n    [attr.max]=\"max()\"\n    [attr.step]=\"step()\"\n    [attr.readonly]=\"readOnly() || null\"\n    [attr.disabled]=\"disabled() || null\"\n    [attr.required]=\"required() || null\"\n    [attr.aria-invalid]=\"errorMessage() ? true : null\"\n    [attr.aria-describedby]=\"describedBy()\"\n    [value]=\"value()\"\n    (input)=\"onInputChange($event)\"\n    (blur)=\"onBlur()\"\n  />\n</fold-input-base>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  DestroyRef,\n  inject,\n  input,\n  model,\n  output,\n} from \"@angular/core\";\nimport { FoldInputComponent } from \"./input.component\";\n\n/**\n * `<fold-search>` — a search box: the magnifier, the clear `×`, an optional\n * **announced result count**, and a **debounced emit**. `searchChange` fires only once typing pauses for\n * `delayMs`, so a fast typer triggers one query instead of one per keystroke;\n * the emitted term is trimmed and de-duplicated.\n *\n * `value` is a `model()`, and that is what makes it a control rather than a\n * one-way sensor. Bind it and the box becomes **steerable from outside** —\n * picking a filter elsewhere can empty the field, which a write-only search\n * cannot do: it would keep showing a term the results no longer honour.\n *\n * Two ways to use it, and they answer different questions:\n *\n * - `[(value)]` — the term as **state**, updated on every keystroke. Filtering\n *   an array already in memory wants this; a debounce there only adds lag.\n * - `(searchChange)` — the term as an **event**, once it settles. A request to\n *   a server wants this.\n *\n * They compose: bind both when a screen filters locally *and* refetches.\n * Writing `value` from outside never emits `searchChange` — whoever wrote it\n * already knows.\n *\n * @selector `fold-search`\n *\n * @example\n * ```html\n * <!-- Local filtering, instant, with the count beside the box -->\n * <fold-search\n *   placeholder=\"Filter…\"\n *   [(value)]=\"term\"\n *   [resultCount]=\"rows().length\"\n *   resultLabel=\"rows\" />\n *\n * <!-- Remote query, once typing settles -->\n * <fold-search\n *   placeholder=\"Search name, email, job…\"\n *   (searchChange)=\"store.setSearch($event)\" />\n * ```\n */\n@Component({\n  selector: \"fold-search\",\n  standalone: true,\n  imports: [FoldInputComponent],\n  templateUrl: \"./search.component.html\",\n  styleUrl: \"./search.component.scss\",\n  host: {\n    \"[class]\": \"placement()\",\n  },\n})\nexport class FoldSearchComponent {\n  /**\n   * The term in the box — the SOURCE of truth, not a copy of it.\n   *\n   * Two-way, so a screen can clear or preset it: choosing a category that\n   * supersedes the search empties the field in the same gesture, instead of\n   * leaving a stale term above results that ignore it.\n   */\n  readonly value = model(\"\");\n\n  readonly placeholder = input(\"\");\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Visual variant, forwarded to the inner `fold-input` (`panel` for side-panel\n   *  forms; `default` elsewhere). */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n\n  /**\n   * Accessible name, when the design leaves no room for a visible label — the\n   * magnifier is decorative and names nothing.\n   */\n  readonly ariaLabel = input<string | undefined>(undefined);\n\n  /** The `×` that empties the box. On by default: it is what a search box is. */\n  readonly clearable = input(true, { transform: booleanAttribute });\n\n  /** Accessible name of the clear button. Override it to translate. */\n  readonly clearLabel = input(\"Clear search\");\n\n  /**\n   * How many results the term found — `null` (the default) shows nothing.\n   *\n   * It belongs here rather than beside the box because it is the ANSWER to what\n   * the box asked, and because every screen that wrote it by hand forgot the\n   * same thing: a count that changes under a search has to be **announced**.\n   * It carries `role=\"status\"` and `aria-live=\"polite\"`, so a user who cannot\n   * see the grid still learns that four hundred rows became three.\n   */\n  readonly resultCount = input<number | null>(null);\n\n  /**\n   * The word after the number — « pièces », \"results\", \"matches\".\n   *\n   * A plain string and not a template: the count reads `12 pièces`, and a\n   * language that needs another order or a plural rule formats the whole thing\n   * upstream and passes it as {@link resultLabel} with `resultCount` left null…\n   * which it cannot. So: this covers `<number> <word>`, and anything else stays\n   * the consumer's own markup beside the box.\n   */\n  readonly resultLabel = input(\"results\");\n\n  /**\n   * Where the count sits: above the box, after it on the same line, or below.\n   *\n   * `end` and not `right` — the whole library lays out in **logical**\n   * properties, so the count follows the reading direction instead of pinning\n   * itself to a side of the screen.\n   */\n  readonly placement = input<\"top\" | \"end\" | \"bottom\">(\"end\");\n\n  /** Quiet period after the last keystroke before emitting, in ms. */\n  readonly delayMs = input(300);\n\n  /** Emits the trimmed term once typing pauses for `delayMs` (deduped). */\n  readonly searchChange = output<string>();\n\n  protected readonly showCount = computed(() => this.resultCount() !== null);\n\n  protected readonly countText = computed(\n    () => `${String(this.resultCount() ?? 0)} ${this.resultLabel()}`,\n  );\n\n  private timer: ReturnType<typeof setTimeout> | null = null;\n  private lastEmitted = \"\";\n\n  constructor() {\n    // A pending timer that outlives the view would fire a stray emit.\n    inject(DestroyRef).onDestroy(() => this.clear());\n  }\n\n  /**\n   * The value moves **now**, the event waits.\n   *\n   * The box must show what was typed on the keystroke — deferring the text\n   * itself would make the field feel broken — while the query it triggers is\n   * what deserves the quiet period. Clearing settles like any other edit: the\n   * empty term goes out after the same delay, so a consumer sees one contract\n   * and not two.\n   */\n  protected onInput(value: string): void {\n    this.value.set(value);\n    const term = value.trim();\n    this.clear();\n    this.timer = setTimeout(() => {\n      if (term !== this.lastEmitted) {\n        this.lastEmitted = term;\n        this.searchChange.emit(term);\n      }\n    }, this.delayMs());\n  }\n\n  private clear(): void {\n    if (this.timer !== null) {\n      clearTimeout(this.timer);\n      this.timer = null;\n    }\n  }\n}\n","@if (showCount() && placement() === \"top\") {\n  <p class=\"se-count\" role=\"status\" aria-live=\"polite\">{{ countText() }}</p>\n}\n\n<fold-input\n  type=\"text\"\n  leadingIcon=\"search\"\n  [clearable]=\"clearable()\"\n  [clearLabel]=\"clearLabel()\"\n  [placeholder]=\"placeholder()\"\n  [ariaLabel]=\"ariaLabel()\"\n  [size]=\"size()\"\n  [variant]=\"variant()\"\n  [value]=\"value()\"\n  (valueChange)=\"onInput($event)\"\n/>\n\n@if (showCount() && placement() !== \"top\") {\n  <p class=\"se-count\" role=\"status\" aria-live=\"polite\">{{ countText() }}</p>\n}\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  inject,\n  input,\n  model,\n} from \"@angular/core\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldInputBaseComponent } from \"./input-base.component\";\nimport { readInputValue } from \"./input-value\";\n\n/**\n * `<fold-select>` — the dropdown sibling of {@link FoldInputComponent} and\n * `fold-number-input`. A thin wrapper around a **native `<select>`** (like\n * `fold-slider` wraps the native range), so it honours the project's Signal-Forms\n * convention (native `[value]` / `(change)`) rather than a bespoke ARIA listbox.\n *\n * Options are **projected** as real `<option>` elements, matching how the app\n * already writes them, so migrating a raw `<select>` is a mechanical wrap:\n *\n * ```html\n * <fold-select label=\"Devise\" [(value)]=\"currency\" placeholder=\"Choisir…\">\n *   @for (c of currencies; track c) {\n *     <option [value]=\"c\">{{ c }}</option>\n *   }\n * </fold-select>\n * ```\n *\n * Shares the exact box chrome (tokens, sizes, `panel` variant) as `fold-input`\n * via `input-shell.scss`, and the label / required / hint / error chrome via\n * {@link FoldInputBaseComponent}. The value is the native string; parse to a\n * number/id in the consumer (as with a raw `<select>`).\n *\n * @selector `fold-select`\n */\n@Component({\n  selector: \"fold-select\",\n  standalone: true,\n  imports: [FoldInputBaseComponent, FoldIconComponent],\n  templateUrl: \"./select.component.html\",\n  styleUrl: \"./select.component.scss\",\n  host: {\n    \"[class]\": 'size() + \" \" + variant()',\n  },\n})\nexport class FoldSelectComponent implements FormValueControl<string> {\n  /** The selected value (the native option string). A `model()` so `FormField`\n   *  and `[(value)]` both stay in sync. */\n  readonly value = model<string>(\"\");\n  /** Disabled state — bound automatically by `FormField`. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — set on blur, kept in sync with the field. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField`. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n\n  /** Size preset — see {@link FoldInputComponent.size}. @default 'md' */\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Visual variant — see {@link FoldInputComponent.variant}. @default 'default' */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n\n  /** Optional label displayed above the control. */\n  readonly label = input<string>();\n  /** Show a required marker on the label (and set the native `required`). */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Show a lighter `(optional)` marker on the label (ignored when required). */\n  readonly optional = input(false, { transform: booleanAttribute });\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n  /**\n   * Longer explanation behind an `i` at the end of the label line — for the\n   * sentence or two a {@link hint} can't carry. Forwarded to `fold-input-base`.\n   */\n  readonly info = input<string>();\n  /** Accessible name of the info button. @default 'More information' */\n  readonly infoLabel = input<string | undefined>();\n  /**\n   * Accessible name for the control itself, when there is **no visible\n   * `label`** — a filter in a toolbar, a control whose meaning the surrounding\n   * text already carries. Without it such a control reaches assistive tech named\n   * only by its current value (\"Week\"), which says nothing about what it sets.\n   *\n   * Prefer a visible `label`: it names the control for *everyone*. Set this only\n   * where the design genuinely has no room — and never both, since `aria-label`\n   * would override the visible one and leave the two out of sync.\n   */\n  readonly ariaLabel = input<string | undefined>(undefined);\n  /** Optional helper text shown under the control. */\n  readonly hint = input<string>();\n  /** Optional placeholder — a leading, disabled option shown while empty. */\n  readonly placeholder = input<string>();\n\n  /** Unique, SSR-safe id for label association (see {@link FoldIdService}). */\n  readonly inputId = inject(FoldIdService).next(\"fold-select\");\n\n  /** The message to show under the field: the first error, once touched. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n\n  /** `aria-describedby` target: the error when shown, else the hint, else none. */\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  /** Write the chosen native value back through the model. */\n  onChange(event: Event): void {\n    this.value.set(readInputValue(event));\n  }\n\n  /** Mark the field touched on blur, so errors can surface. */\n  protected onBlur(): void {\n    this.touched.set(true);\n  }\n}\n","<fold-input-base\n  [label]=\"label()\"\n  [for]=\"inputId\"\n  [required]=\"required()\"\n  [optional]=\"optional()\"\n  [optionalLabel]=\"optionalLabel()\"\n  [info]=\"info()\"\n  [infoLabel]=\"infoLabel()\"\n  [hint]=\"hint()\"\n  [error]=\"errorMessage()\"\n>\n  <div class=\"sel-wrap\">\n    <select\n      [id]=\"inputId\"\n      class=\"sel\"\n      [disabled]=\"disabled()\"\n      [attr.required]=\"required() || null\"\n      [attr.aria-invalid]=\"errorMessage() ? true : null\"\n      [attr.aria-describedby]=\"describedBy()\"\n      [attr.aria-label]=\"ariaLabel()\"\n      [value]=\"value()\"\n      (change)=\"onChange($event)\"\n      (blur)=\"onBlur()\"\n    >\n      @if (placeholder(); as ph) {\n        <option value=\"\" disabled hidden>{{ ph }}</option>\n      }\n      <ng-content />\n    </select>\n    <fold-icon\n      name=\"chevron-down\"\n      size=\"sm\"\n      class=\"sel-caret\"\n      aria-hidden=\"true\"\n    />\n  </div>\n</fold-input-base>\n","import {\n  afterRenderEffect,\n  InjectionToken,\n  isDevMode,\n  type Signal,\n} from \"@angular/core\";\n\n/**\n * The contract a `fold-option` needs from whatever owns it — the single-select\n * `fold-listbox` or the multi-select `fold-multiselect`. Injected through a token\n * (not the concrete class) so an option stays decoupled from either component and\n * there is no circular import. Generic over the option value type `T`; the token\n * itself is erased to `unknown` (the option↔owner value link is a runtime\n * contract — content projection can't carry `T` statically).\n */\nexport interface FoldListboxOwner<T> {\n  /** Is this option's value currently selected? (equality vs. membership.) */\n  isSelected(value: T): boolean;\n  /** The keyboard-active option's id — the listbox's `aria-activedescendant`. */\n  readonly activeId: Signal<string | null>;\n}\n\nexport const FOLD_LISTBOX_OWNER = new InjectionToken<FoldListboxOwner<unknown>>(\n  \"FOLD_LISTBOX_OWNER\",\n);\n\n/**\n * Dev-only guard: warn (once per value) when a control holds a value with no\n * matching `<fold-option>` — a silent \"shows the placeholder\" bug otherwise, and\n * the runtime safety net for the value/option type link projection can't check at\n * compile time. Runs in an `afterRenderEffect` so option `value`s are set before\n * they're read (an eager `effect` would hit `NG0950` reading a required input too\n * early). Call from a component constructor (an injection context).\n *\n * `selected` yields the currently-held values (single-select passes `[]` or a\n * one-element array; multi-select its array), and `eq` is the owner's\n * `compareWith`, so object values match by identity, not reference.\n */\nexport function warnOnOrphanValue<T>(\n  selected: () => readonly T[],\n  options: () => readonly { value(): T }[],\n  eq: (a: T, b: T) => boolean,\n  tag: string,\n): void {\n  if (!isDevMode()) {\n    return;\n  }\n  const warned = new Set<T>();\n  afterRenderEffect(() => {\n    const opts = options();\n    if (opts.length === 0) {\n      return; // options may still be projecting — nothing to check against yet\n    }\n    for (const v of selected()) {\n      if (!warned.has(v) && !opts.some((o) => eq(o.value(), v))) {\n        warned.add(v);\n        console.warn(\n          `[${tag}] value ${String(v)} has no matching <fold-option>.`,\n        );\n      }\n    }\n  });\n}\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  ElementRef,\n  inject,\n  input,\n} from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FOLD_LISTBOX_OWNER } from \"./listbox-owner\";\n\n/**\n * `<fold-option>` — a single choice inside a {@link FoldListboxComponent}. Project\n * as many as you need; the label is whatever you put inside (plain text, or richer\n * content — an icon, a description). It reads the parent for its own `is-selected`\n * / `is-active` state (computed, so nothing is pushed in during change detection —\n * which would read this required `value` before it is set), and exposes a stable\n * id the listbox points `aria-activedescendant` at.\n *\n * ```html\n * <fold-listbox [(value)]=\"currency\">\n *   <fold-option value=\"EUR\">Euro</fold-option>\n *   <fold-option value=\"USD\" [disabled]=\"!usdAllowed\">US Dollar</fold-option>\n * </fold-listbox>\n * ```\n *\n * @selector `fold-option`\n */\n@Component({\n  selector: \"fold-option\",\n  standalone: true,\n  template: \"<ng-content />\",\n  styleUrl: \"./option.component.scss\",\n  host: {\n    role: \"option\",\n    \"[id]\": \"id\",\n    \"[attr.aria-selected]\": \"selected()\",\n    \"[attr.aria-disabled]\": \"disabled() || null\",\n    \"[class.is-active]\": \"active()\",\n    \"[class.is-selected]\": \"selected()\",\n    \"[class.is-disabled]\": \"disabled()\",\n  },\n})\nexport class FoldOptionComponent<T> {\n  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n  private readonly owner = inject(FOLD_LISTBOX_OWNER);\n\n  /** The value written back to the listbox when this option is chosen. */\n  readonly value = input.required<T>();\n  /** Disabled options are skipped by keyboard nav and can't be selected. */\n  readonly disabled = input(false, { transform: booleanAttribute });\n\n  /** Stable, SSR-safe id — the listbox points `aria-activedescendant` at it. */\n  readonly id = inject(FoldIdService).next(\"fold-option\");\n\n  /** Derived from the parent — evaluated lazily during this option's own render,\n   *  so the required `value` is always set by the time it's read. */\n  readonly selected = computed(() => this.owner.isSelected(this.value()));\n  readonly active = computed(() => this.owner.activeId() === this.id);\n\n  /** The option's visible text — used for the trigger label and type-ahead. */\n  get label(): string {\n    return this.host.nativeElement.textContent?.trim() ?? \"\";\n  }\n\n  /** Bring the option into view when it becomes keyboard-active. Optional-chained\n   *  so it's a no-op where `scrollIntoView` is absent (jsdom, non-DOM SSR). */\n  scrollIntoView(): void {\n    this.host.nativeElement.scrollIntoView?.({ block: \"nearest\" });\n  }\n}\n","import { Component, inject, input } from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\n\n/**\n * `<fold-optgroup>` — a labelled group of `<fold-option>`s inside a\n * {@link FoldListboxComponent} / {@link FoldMultiselectComponent}, the styleable\n * counterpart to the native `<optgroup>`. Purely presentational: it renders a\n * non-selectable header and projects its options, which the owning listbox still\n * discovers (it queries options with `descendants: true`) and roves across in\n * document order — so grouping changes the layout, never the keyboard model.\n *\n * `role=\"group\"` + `aria-labelledby` names the group for assistive tech; the\n * header carries no `role=\"option\"`, so keyboard nav skips straight over it.\n *\n * ```html\n * <fold-listbox [(value)]=\"city\">\n *   <fold-optgroup label=\"France\">\n *     <fold-option value=\"paris\">Paris</fold-option>\n *     <fold-option value=\"lyon\">Lyon</fold-option>\n *   </fold-optgroup>\n *   <fold-optgroup label=\"Italia\">\n *     <fold-option value=\"roma\">Roma</fold-option>\n *   </fold-optgroup>\n * </fold-listbox>\n * ```\n *\n * @selector `fold-optgroup`\n */\n@Component({\n  selector: \"fold-optgroup\",\n  standalone: true,\n  template:\n    '<span class=\"og-label\" [id]=\"labelId\">{{ label() }}</span><ng-content />',\n  styleUrl: \"./optgroup.component.scss\",\n  host: {\n    role: \"group\",\n    \"[attr.aria-labelledby]\": \"labelId\",\n  },\n})\nexport class FoldOptgroupComponent {\n  /** The group's visible heading — also its accessible name (`aria-labelledby`). */\n  readonly label = input.required<string>();\n\n  /** Stable, SSR-safe id the group's `aria-labelledby` points at. */\n  readonly labelId = inject(FoldIdService).next(\"fold-optgroup\");\n}\n","/**\n * A data-driven option for the array API of `fold-listbox` / `fold-multiselect`\n * (`[options]`). Use it — instead of projecting `<fold-option>` — when the list\n * is data, not markup: the value type is linked to the control's value at compile\n * time (no projection seam). For rich per-row content, project an\n * `<ng-template #option let-o>` alongside `[options]`; otherwise `label` renders.\n */\nexport interface FoldSelectOption<T> {\n  /** The value written back to the control when the row is chosen. */\n  readonly value: T;\n  /** The row's visible text (also the type-ahead + trigger label). */\n  readonly label: string;\n  /** Skip in keyboard nav and block selection. @default false */\n  readonly disabled?: boolean;\n}\n\n/**\n * A labelled group of options for the array API — the data-driven counterpart to\n * a projected `<fold-optgroup>`. Put groups (and/or plain options) in the\n * `[options]` array; the control renders each group's `options` under its\n * `label`, and keyboard nav still roves the flattened list in order.\n */\nexport interface FoldSelectOptionGroup<T> {\n  /** The group heading — its accessible name; not selectable. */\n  readonly label: string;\n  /** The options under this heading. */\n  readonly options: readonly FoldSelectOption<T>[];\n}\n\n/** One entry of the `[options]` array: a plain option or a labelled group. */\nexport type FoldSelectItem<T> = FoldSelectOption<T> | FoldSelectOptionGroup<T>;\n\n/** True when an `[options]` entry is a group (has nested `options`), not a leaf. */\nexport function isFoldSelectOptionGroup<T>(\n  item: FoldSelectItem<T>,\n): item is FoldSelectOptionGroup<T> {\n  return \"options\" in item;\n}\n","import { computed, signal, type Signal } from \"@angular/core\";\n\n/** The slice of a `fold-option` the keyboard core needs. The value is unused by\n *  the core (it navigates by id/label/disabled), so it stays erased. */\nexport interface FoldNavOption {\n  value(): unknown;\n  disabled(): boolean;\n  readonly label: string;\n  readonly id: string;\n  scrollIntoView(): void;\n}\n\n/** What the owning listbox does when the core resolves an intent. */\nexport interface FoldNavHandlers {\n  /** Activate the option at `index` (single-select commits + closes; multi\n   *  toggles + stays open). */\n  select(index: number): void;\n  /** Close the popup (Tab). */\n  close(): void;\n}\n\n/**\n * The shared roving/keyboard core for `fold-listbox` and `fold-multiselect`. It\n * owns the keyboard-active row (↑/↓ wrapping + disabled-skip, `Home`/`End`,\n * multi-letter type-ahead) and reports it as `activeId` for\n * `aria-activedescendant`; the owner decides what *selecting* means. Plain class,\n * no Angular decorators — instantiated in a component field.\n */\nexport class FoldListboxNav {\n  private readonly active = signal(-1);\n  /** The active option's id, or none — the listbox's `aria-activedescendant`. */\n  readonly activeId: Signal<string | null> = computed(\n    () => this.opts()[this.active()]?.id ?? null,\n  );\n\n  private typeBuffer = \"\";\n  private typeAt = 0;\n\n  constructor(\n    private readonly opts: () => readonly FoldNavOption[],\n    private readonly handlers: FoldNavHandlers,\n  ) {}\n\n  /** Index of the active row (or -1). */\n  activeIndex(): number {\n    return this.active();\n  }\n\n  /** Reset when the popup closes. */\n  reset(): void {\n    this.active.set(-1);\n  }\n\n  /** On open, arm `preferred` if it's a real row, else the first enabled one. */\n  arm(preferred: number): void {\n    this.setActive(preferred >= 0 ? preferred : this.edge(1));\n  }\n\n  /** Point at a row from a hover — no scroll, so the pointer doesn't jog the list. */\n  point(index: number): void {\n    if (index >= 0) {\n      this.active.set(index);\n    }\n  }\n\n  onKeydown(event: KeyboardEvent): void {\n    switch (event.key) {\n      case \"ArrowDown\":\n        event.preventDefault();\n        this.move(1);\n        break;\n      case \"ArrowUp\":\n        event.preventDefault();\n        this.move(-1);\n        break;\n      case \"Home\":\n        event.preventDefault();\n        this.setActive(this.edge(1));\n        break;\n      case \"End\":\n        event.preventDefault();\n        this.setActive(this.edge(-1));\n        break;\n      case \"Enter\":\n      case \" \":\n        event.preventDefault();\n        this.handlers.select(this.active());\n        break;\n      case \"Tab\":\n        this.handlers.close();\n        break;\n      default:\n        this.typeahead(event, (index) => this.setActive(index));\n    }\n  }\n\n  /** First (`dir` = 1) or last (`dir` = -1) enabled option index, or -1. */\n  private edge(dir: 1 | -1): number {\n    const opts = this.opts();\n    const order = [...opts.keys()];\n    for (const idx of dir === 1 ? order : order.reverse()) {\n      if (!opts[idx]?.disabled()) {\n        return idx;\n      }\n    }\n    return -1;\n  }\n\n  private move(delta: number): void {\n    const opts = this.opts();\n    let i = this.active();\n    let remaining = opts.length;\n    while (remaining > 0) {\n      i = (i + delta + opts.length) % opts.length;\n      if (!opts[i]?.disabled()) {\n        this.setActive(i);\n        return;\n      }\n      remaining -= 1;\n    }\n  }\n\n  private setActive(index: number): void {\n    if (index < 0) {\n      return;\n    }\n    this.active.set(index);\n    this.opts()[index]?.scrollIntoView();\n  }\n\n  /** Multi-letter type-ahead: keystrokes within 500 ms accumulate, so \"de\" jumps\n   *  to \"Delete\", not just the next \"d\". `onMatch` gets the matched index — the\n   *  open list arms it (`setActive`); a closed trigger commits it directly.\n   *  Returns true if the key was a type-ahead character (so a caller can stop). */\n  typeahead(event: KeyboardEvent, onMatch: (index: number) => void): boolean {\n    if (\n      event.key.length !== 1 ||\n      event.ctrlKey ||\n      event.metaKey ||\n      event.altKey\n    ) {\n      return false;\n    }\n    const now = Date.now();\n    this.typeBuffer =\n      now - this.typeAt > 500 ? event.key : this.typeBuffer + event.key;\n    this.typeAt = now;\n    const query = this.typeBuffer.toLowerCase();\n    const opts = this.opts();\n    const from = query.length === 1 ? 1 : 0;\n    const current = Math.max(this.active(), 0);\n    for (let i = 0; i < opts.length; i += 1) {\n      const idx = (current + from + i) % opts.length;\n      const o = opts[idx];\n      if (o && !o.disabled() && o.label.toLowerCase().startsWith(query)) {\n        onMatch(idx);\n        return true;\n      }\n    }\n    return true;\n  }\n}\n","import {\n  Component,\n  ElementRef,\n  afterRenderEffect,\n  booleanAttribute,\n  computed,\n  contentChild,\n  contentChildren,\n  inject,\n  input,\n  isDevMode,\n  model,\n  output,\n  type TemplateRef,\n  viewChild,\n  viewChildren,\n} from \"@angular/core\";\nimport { FOLD_COMMON_LABELS } from \"../common-labels\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldPopoverComponent } from \"../../overlays/popover/popover.component\";\nimport { FoldPopoverTriggerDirective } from \"../../overlays/popover/popover-trigger.directive\";\nimport type { FoldPopoverPlacement } from \"../../overlays/popover/placement\";\nimport { FoldInputBaseComponent } from \"../input/input-base.component\";\nimport { FoldOptionComponent } from \"./option.component\";\nimport { FoldOptgroupComponent } from \"./optgroup.component\";\nimport {\n  type FoldSelectItem,\n  type FoldSelectOption,\n  type FoldSelectOptionGroup,\n  isFoldSelectOptionGroup,\n} from \"./select-option\";\nimport { FoldListboxNav } from \"./listbox-nav\";\nimport {\n  FOLD_LISTBOX_OWNER,\n  warnOnOrphanValue,\n  type FoldListboxOwner,\n} from \"./listbox-owner\";\n\n/**\n * `<fold-listbox>` — a **styleable** single-select, the richer sibling of the\n * native-`<select>`-wrapping {@link FoldSelectComponent}. Reach for it when the\n * options need custom rendering the native popup can't give (an icon, a second\n * line, a status) — otherwise `fold-select` stays the lighter, mobile-native\n * default. For picking several values, use `fold-multiselect`.\n *\n * Built on {@link FoldPopoverComponent}: the popover owns positioning, the native\n * top layer, outside-click / `Escape` dismissal and focus return. On top of that\n * this adds the ARIA select pattern — a `role=\"listbox\"` that holds focus and\n * drives `aria-activedescendant`, full keyboard (↑/↓, `Home`/`End`, type-ahead,\n * `Enter`) — and Signal-Forms wiring (`FormValueControl<string>`), so `[formField]`\n * and `[(value)]` both work, exactly like `fold-input` / `fold-select`.\n *\n * ```html\n * <fold-listbox label=\"Devise\" [(value)]=\"currency\" placeholder=\"Choisir…\">\n *   <fold-option value=\"EUR\">Euro</fold-option>\n *   <fold-option value=\"USD\">US Dollar</fold-option>\n * </fold-listbox>\n * ```\n *\n * @selector `fold-listbox`\n */\n@Component({\n  selector: \"fold-listbox\",\n  standalone: true,\n  imports: [\n    FoldInputBaseComponent,\n    FoldIconComponent,\n    FoldOptionComponent,\n    FoldOptgroupComponent,\n    FoldPopoverComponent,\n    FoldPopoverTriggerDirective,\n    NgTemplateOutlet,\n  ],\n  templateUrl: \"./listbox.component.html\",\n  styleUrl: \"./listbox.component.scss\",\n  host: { \"[class]\": 'size() + \" \" + variant()' },\n  providers: [\n    { provide: FOLD_LISTBOX_OWNER, useExisting: FoldListboxComponent },\n  ],\n})\nexport class FoldListboxComponent<T>\n  implements FormValueControl<T | null>, FoldListboxOwner<T>\n{\n  /** Selected value (the chosen option's `value`), or `null` when nothing is\n   *  picked. A `model()` so `FormField` and `[(value)]` stay in sync. Generic\n   *  over the option value — `string` by inference, but `number`, an `enum` or\n   *  an object all work (objects need {@link compareWith}). */\n  readonly value = model<T | null>(null);\n  /** How two values are compared for selection — supply it for **object** values\n   *  (reference equality won't match); primitives (string/number/enum) don't need\n   *  it. @default `Object.is` */\n  readonly compareWith = input<(a: T, b: T) => boolean>();\n  /** Data-driven options — the alternative to projecting `<fold-option>`. When\n   *  set, the value type is linked to the options at compile time (no projection\n   *  seam). Entries can be plain options or labelled {@link FoldSelectOptionGroup}s\n   *  (the array counterpart to `<fold-optgroup>`). For rich rows, project\n   *  `<ng-template #option let-o>`. */\n  readonly options = input<readonly FoldSelectItem<T>[]>();\n  /** Disabled state — bound automatically by `FormField`. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — set on selection / blur, kept in sync with the field. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField`. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n  /** Two-way open state of the popup. */\n  readonly open = model(false);\n  /** Fires when the **user picks an option** — carries the chosen value, never\n   *  `null`. Use it for the common \"do X on selection\" case to skip the\n   *  `T | null` narrowing that `[(value)]` / `valueChange` require. Clearing the\n   *  value (the × button) does **not** fire this; observe `value`/`valueChange`\n   *  for that. */\n  readonly selectionChange = output<T>();\n\n  /** Size preset — see {@link FoldInputComponent.size}. @default 'md' */\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Visual variant — see {@link FoldInputComponent.variant}. @default 'default' */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n  /** Optional label displayed above the control. */\n  readonly label = input<string>();\n  /** Show a required marker on the label. */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Show a lighter `(optional)` marker on the label (ignored when required). */\n  readonly optional = input(false, { transform: booleanAttribute });\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n  /**\n   * Longer explanation behind an `i` at the end of the label line — for the\n   * sentence or two a {@link hint} can't carry. Forwarded to `fold-input-base`.\n   */\n  readonly info = input<string>();\n  /** Accessible name of the info button. @default 'More information' */\n  readonly infoLabel = input<string | undefined>();\n  /**\n   * Accessible name for the control itself, when there is **no visible\n   * `label`** — a filter in a toolbar, a control whose meaning the surrounding\n   * text already carries. Without it such a control reaches assistive tech named\n   * only by its current value (\"Week\"), which says nothing about what it sets.\n   *\n   * Prefer a visible `label`: it names the control for *everyone*. Set this only\n   * where the design genuinely has no room — and never both, since `aria-label`\n   * would override the visible one and leave the two out of sync.\n   */\n  readonly ariaLabel = input<string | undefined>(undefined);\n  /** Optional helper text shown under the control. */\n  readonly hint = input<string>();\n  /** Text shown on the trigger while nothing is selected. */\n  readonly placeholder = input<string>();\n  /** Preferred popup placement. @default 'bottom-start' */\n  readonly placement = input<FoldPopoverPlacement>(\"bottom-start\");\n  /** Show a clear (×) affordance on the trigger once a value is picked. */\n  readonly allowClear = input(false, { transform: booleanAttribute });\n  /** Accessible name of the clear button. @default 'Clear' */\n  readonly clearLabel = input<string | undefined>();\n\n  private readonly common = inject(FOLD_COMMON_LABELS);\n\n  /** English default ← app-wide provider ← this instance's own input. */\n  protected readonly clearWord = computed(\n    () => this.clearLabel() ?? this.common.clear,\n  );\n\n  /** Unique, SSR-safe id for label association (see {@link FoldIdService}). */\n  readonly inputId = inject(FoldIdService).next(\"fold-listbox\");\n  /** Id of the `role=\"listbox\"` element (own, distinct from the popover panel). */\n  protected readonly listId = `${this.inputId}-list`;\n\n  /** Rich per-row template for the `[options]` array API (`<ng-template #option>`). */\n  protected readonly optionTemplate =\n    contentChild<TemplateRef<{ $implicit: FoldSelectOption<T> }>>(\"option\");\n  // `descendants: true` so options nested inside a `<fold-optgroup>` are found,\n  // not only direct children — returned in document order, keeping roving order.\n  private readonly projectedOptions = contentChildren<FoldOptionComponent<T>>(\n    FoldOptionComponent,\n    { descendants: true },\n  );\n  private readonly renderedOptions =\n    viewChildren<FoldOptionComponent<T>>(FoldOptionComponent);\n  /** The live option instances, from whichever API is in use — the `[options]`\n   *  array (rendered in the view) when set, else the projected `<fold-option>`s. */\n  private readonly allOptions = computed(() =>\n    this.options() ? this.renderedOptions() : this.projectedOptions(),\n  );\n  private readonly list = viewChild<ElementRef<HTMLElement>>(\"list\");\n\n  /** Compare two values — the injected `compareWith`, else `Object.is`. Called\n   *  only where both operands are `T`, so no erasure leaks in. */\n  private eq(a: T, b: T): boolean {\n    const cmp = this.compareWith();\n    return cmp ? cmp(a, b) : Object.is(a, b);\n  }\n\n  /** Shared roving/keyboard core; single-select commits + closes on activation. */\n  private readonly nav = new FoldListboxNav(() => this.allOptions(), {\n    select: (index) => this.selectAt(index),\n    close: () => this.open.set(false),\n  });\n  /** `aria-activedescendant`, read by each `fold-option` for its `is-active`. */\n  readonly activeId = this.nav.activeId;\n\n  /** The selected option's label, for the trigger. */\n  protected readonly selectedLabel = computed<string | undefined>(() => {\n    const v = this.value();\n    return v === null\n      ? undefined\n      : this.allOptions().find((o) => this.eq(o.value(), v))?.label;\n  });\n  /** Whether the clear affordance is currently offered. */\n  protected readonly showClear = computed(\n    () => this.allowClear() && this.value() !== null && !this.disabled(),\n  );\n  /** The message to show under the field: the first error, once touched. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n  /** `aria-describedby` target: the error when shown, else the hint, else none. */\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  /** Has the popup been opened at least once this lifetime — so closing it (by\n   *  Escape, outside-click, Tab or a pick) can mark the field touched, exactly as\n   *  a native `<select>` does on blur. Without this a `required` select that the\n   *  user opens and dismisses would never surface its error. */\n  private hasOpened = false;\n\n  constructor() {\n    // On open, move focus into the list and arm the active row on the selection\n    // (or the first enabled option). Deferred to a microtask so it runs AFTER the\n    // popover's render effect has shown the panel in the same flush. On close,\n    // mark touched (blur parity).\n    afterRenderEffect(() => {\n      if (this.open()) {\n        this.hasOpened = true;\n        queueMicrotask(() => {\n          if (this.open()) {\n            this.list()?.nativeElement.focus();\n            this.nav.arm(this.selectedIndex());\n          }\n        });\n      } else {\n        this.nav.reset();\n        if (this.hasOpened) {\n          this.touched.set(true);\n        }\n      }\n    });\n    warnOnOrphanValue(\n      () => {\n        const v = this.value();\n        return v === null ? [] : [v];\n      },\n      () => this.allOptions(),\n      (a, b) => this.eq(a, b),\n      \"fold-listbox\",\n    );\n    if (isDevMode()) {\n      afterRenderEffect(() => {\n        if (this.options() && this.projectedOptions().length > 0) {\n          console.warn(\n            \"[fold-listbox] both `[options]` and projected <fold-option> given — the array wins, the projected ones are ignored.\",\n          );\n        }\n      });\n    }\n  }\n\n  /** A value is selected when it equals the current one (via `compareWith`). */\n  isSelected(value: T): boolean {\n    const v = this.value();\n    return v !== null && this.eq(v, value);\n  }\n\n  /** Narrow an `[options]` entry to a group, or `null` — lets the template\n   *  branch on the two shapes with each side fully typed (no `any`). */\n  protected asGroup(item: FoldSelectItem<T>): FoldSelectOptionGroup<T> | null {\n    return isFoldSelectOptionGroup(item) ? item : null;\n  }\n\n  /** Narrow an `[options]` entry to a plain option, or `null`. */\n  protected asOption(item: FoldSelectItem<T>): FoldSelectOption<T> | null {\n    return isFoldSelectOptionGroup(item) ? null : item;\n  }\n\n  /** Clear the selection (the `allowClear` ×). */\n  protected clear(event: Event): void {\n    event.stopPropagation(); // don't let the trigger open\n    this.value.set(null);\n    this.touched.set(true);\n  }\n\n  /** Open with the keys a native select opens on; otherwise type-ahead picks\n   *  directly without opening — native-`<select>` parity. */\n  protected onTriggerKeydown(event: KeyboardEvent): void {\n    if (this.open()) {\n      return;\n    }\n    if ([\"ArrowDown\", \"ArrowUp\", \"Enter\", \" \"].includes(event.key)) {\n      event.preventDefault();\n      this.open.set(true);\n      return;\n    }\n    this.nav.typeahead(event, (index) => this.selectAt(index));\n  }\n\n  /** Keyboard while the list is open and focused — delegated to the core. */\n  protected onListKeydown(event: KeyboardEvent): void {\n    this.nav.onKeydown(event);\n  }\n\n  /** Click on a row selects it (delegated, so projected rows need no wiring). */\n  protected onListClick(event: MouseEvent): void {\n    const o = this.enabledOptionFrom(event.target);\n    if (o) {\n      this.commit(o);\n    }\n  }\n\n  /** Hover arms the row, so pointer and keyboard share one active row. */\n  protected onListPointermove(event: PointerEvent): void {\n    const o = this.enabledOptionFrom(event.target);\n    if (o) {\n      this.nav.point(this.allOptions().indexOf(o));\n    }\n  }\n\n  /** Index of the selected option (or -1) — where the keyboard arms on open. */\n  private selectedIndex(): number {\n    const v = this.value();\n    if (v === null) {\n      return -1;\n    }\n    return this.allOptions().findIndex(\n      (o) => this.eq(o.value(), v) && !o.disabled(),\n    );\n  }\n\n  /** The enabled option under an event target, or null. */\n  private enabledOptionFrom(\n    target: EventTarget | null,\n  ): FoldOptionComponent<T> | null {\n    if (!(target instanceof Element)) {\n      return null;\n    }\n    const el = target.closest(\"[role='option']\");\n    const o = this.allOptions().find((opt) => opt.id === el?.id);\n    return o && !o.disabled() ? o : null;\n  }\n\n  private selectAt(index: number): void {\n    const o = this.allOptions()[index];\n    if (o && !o.disabled()) {\n      this.commit(o);\n    }\n  }\n\n  private commit(option: FoldOptionComponent<T>): void {\n    const picked = option.value();\n    this.value.set(picked);\n    this.selectionChange.emit(picked);\n    this.touched.set(true);\n    this.open.set(false);\n  }\n}\n","<fold-input-base\n  [label]=\"label()\"\n  [for]=\"inputId\"\n  [required]=\"required()\"\n  [optional]=\"optional()\"\n  [optionalLabel]=\"optionalLabel()\"\n  [info]=\"info()\"\n  [infoLabel]=\"infoLabel()\"\n  [hint]=\"hint()\"\n  [error]=\"errorMessage()\"\n>\n  <fold-popover\n    [(open)]=\"open\"\n    [autoFocus]=\"false\"\n    [ariaControls]=\"listId\"\n    [placement]=\"placement()\"\n    [fallbackPlacements]=\"['top-start', 'bottom-end', 'top-end']\"\n  >\n    <div class=\"lb-field\">\n      <button\n        type=\"button\"\n        class=\"lb-trigger\"\n        [class.has-clear]=\"showClear()\"\n        [id]=\"inputId\"\n        foldPopoverTrigger=\"listbox\"\n        [disabled]=\"disabled()\"\n        [attr.aria-invalid]=\"errorMessage() ? true : null\"\n        [attr.aria-describedby]=\"describedBy()\"\n        [attr.aria-label]=\"ariaLabel()\"\n        (keydown)=\"onTriggerKeydown($event)\"\n      >\n        @if (selectedLabel(); as lbl) {\n          <span class=\"lb-value\">{{ lbl }}</span>\n        } @else {\n          <span class=\"lb-placeholder\">{{ placeholder() }}</span>\n        }\n        <fold-icon\n          name=\"chevron-down\"\n          size=\"sm\"\n          class=\"lb-caret\"\n          aria-hidden=\"true\"\n        />\n      </button>\n      @if (showClear()) {\n        <button\n          type=\"button\"\n          class=\"lb-clear\"\n          [attr.aria-label]=\"clearWord()\"\n          (click)=\"clear($event)\"\n        >\n          <fold-icon name=\"close\" size=\"sm\" aria-hidden=\"true\" />\n        </button>\n      }\n    </div>\n\n    <div\n      #list\n      foldPopoverPanel\n      class=\"lb-list\"\n      role=\"listbox\"\n      tabindex=\"-1\"\n      [id]=\"listId\"\n      [attr.aria-label]=\"label()\"\n      [attr.aria-activedescendant]=\"activeId()\"\n      (keydown)=\"onListKeydown($event)\"\n      (click)=\"onListClick($event)\"\n      (pointermove)=\"onListPointermove($event)\"\n    >\n      @if (options(); as opts) {\n        @for (item of opts; track $index) {\n          @if (asGroup(item); as group) {\n            <fold-optgroup [label]=\"group.label\">\n              @for (o of group.options; track o.value) {\n                <fold-option [value]=\"o.value\" [disabled]=\"o.disabled ?? false\">\n                  @if (optionTemplate(); as tpl) {\n                    <ng-container\n                      [ngTemplateOutlet]=\"tpl\"\n                      [ngTemplateOutletContext]=\"{ $implicit: o }\"\n                    />\n                  } @else {\n                    {{ o.label }}\n                  }\n                </fold-option>\n              }\n            </fold-optgroup>\n          } @else if (asOption(item); as o) {\n            <fold-option [value]=\"o.value\" [disabled]=\"o.disabled ?? false\">\n              @if (optionTemplate(); as tpl) {\n                <ng-container\n                  [ngTemplateOutlet]=\"tpl\"\n                  [ngTemplateOutletContext]=\"{ $implicit: o }\"\n                />\n              } @else {\n                {{ o.label }}\n              }\n            </fold-option>\n          }\n        }\n      } @else {\n        <ng-content />\n      }\n    </div>\n  </fold-popover>\n</fold-input-base>\n","import {\n  Component,\n  ElementRef,\n  afterRenderEffect,\n  booleanAttribute,\n  computed,\n  contentChild,\n  contentChildren,\n  inject,\n  input,\n  isDevMode,\n  model,\n  type TemplateRef,\n  viewChild,\n  viewChildren,\n} from \"@angular/core\";\nimport { FOLD_COMMON_LABELS } from \"../common-labels\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldPopoverComponent } from \"../../overlays/popover/popover.component\";\nimport { FoldPopoverTriggerDirective } from \"../../overlays/popover/popover-trigger.directive\";\nimport type { FoldPopoverPlacement } from \"../../overlays/popover/placement\";\nimport { FoldInputBaseComponent } from \"../input/input-base.component\";\nimport { FoldOptionComponent } from \"./option.component\";\nimport { FoldOptgroupComponent } from \"./optgroup.component\";\nimport {\n  type FoldSelectItem,\n  type FoldSelectOption,\n  type FoldSelectOptionGroup,\n  isFoldSelectOptionGroup,\n} from \"./select-option\";\nimport { FoldListboxNav } from \"./listbox-nav\";\nimport {\n  FOLD_LISTBOX_OWNER,\n  warnOnOrphanValue,\n  type FoldListboxOwner,\n} from \"./listbox-owner\";\n\n/** Labels beyond this count collapse to a \"+N\" tail on the trigger summary. */\nconst SUMMARY_MAX = 3;\n\n/**\n * `<fold-multiselect>` — the multi-select sibling of {@link FoldListboxComponent}.\n * Same styleable popover + `fold-option` rows, but the value is a set: activating\n * a row **toggles** its membership and the panel **stays open**, so several picks\n * are one interaction. It's a separate component (not a `multiple` flag) because\n * the Signal-Forms value type is genuinely different — `readonly string[]`, not\n * `string` — so `[formField]` and `[(value)]` stay honestly typed.\n *\n * `role=\"listbox\"` + `aria-multiselectable`, full keyboard (↑/↓, `Home`/`End`,\n * type-ahead; `Enter`/`Space` toggle), and each selected row keeps its check. The\n * trigger summarises the selection (the chosen labels, joined).\n *\n * ```html\n * <fold-multiselect label=\"Genres\" [(value)]=\"genres\" placeholder=\"Pick a few…\">\n *   <fold-option value=\"rock\">Rock</fold-option>\n *   <fold-option value=\"jazz\">Jazz</fold-option>\n * </fold-multiselect>\n * ```\n *\n * @selector `fold-multiselect`\n */\n@Component({\n  selector: \"fold-multiselect\",\n  standalone: true,\n  imports: [\n    FoldInputBaseComponent,\n    FoldIconComponent,\n    FoldOptionComponent,\n    FoldOptgroupComponent,\n    FoldPopoverComponent,\n    FoldPopoverTriggerDirective,\n    NgTemplateOutlet,\n  ],\n  templateUrl: \"./multiselect.component.html\",\n  styleUrl: \"./multiselect.component.scss\",\n  host: { \"[class]\": 'size() + \" \" + variant()' },\n  providers: [\n    { provide: FOLD_LISTBOX_OWNER, useExisting: FoldMultiselectComponent },\n  ],\n})\nexport class FoldMultiselectComponent<T>\n  implements FormValueControl<readonly T[]>, FoldListboxOwner<T>\n{\n  /** Selected values. A `model()` so `FormField` and `[(value)]` stay in sync.\n   *  Generic over the option value (string by inference; number/enum/object all\n   *  work — objects need {@link compareWith}). */\n  readonly value = model<readonly T[]>([]);\n  /** How two values are compared for membership — supply it for **object**\n   *  values; primitives don't need it. @default `Object.is` */\n  readonly compareWith = input<(a: T, b: T) => boolean>();\n  /** Data-driven options — the alternative to projecting `<fold-option>`. When\n   *  set, the value type is linked to the options at compile time. Entries can be\n   *  plain options or labelled {@link FoldSelectOptionGroup}s (the array\n   *  counterpart to `<fold-optgroup>`). For rich rows, project\n   *  `<ng-template #option let-o>`. */\n  readonly options = input<readonly FoldSelectItem<T>[]>();\n  /** Disabled state — bound automatically by `FormField`. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — set on the first toggle, kept in sync with the field. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField`. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n  /** Two-way open state of the popup. */\n  readonly open = model(false);\n\n  /** Size preset — see {@link FoldInputComponent.size}. @default 'md' */\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Visual variant — see {@link FoldInputComponent.variant}. @default 'default' */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n  /** Optional label displayed above the control. */\n  readonly label = input<string>();\n  /** Show a required marker on the label. */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Show a lighter `(optional)` marker on the label (ignored when required). */\n  readonly optional = input(false, { transform: booleanAttribute });\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n  /**\n   * Longer explanation behind an `i` at the end of the label line — for the\n   * sentence or two a {@link hint} can't carry. Forwarded to `fold-input-base`.\n   */\n  readonly info = input<string>();\n  /** Accessible name of the info button. @default 'More information' */\n  readonly infoLabel = input<string | undefined>();\n  /** Optional helper text shown under the control. */\n  readonly hint = input<string>();\n  /** Text shown on the trigger while nothing is selected. */\n  readonly placeholder = input<string>();\n  /** Preferred popup placement. @default 'bottom-start' */\n  readonly placement = input<FoldPopoverPlacement>(\"bottom-start\");\n  /** Offer a **Select all** bulk action at the top of the panel (adds every\n   *  enabled option to the set). @default false */\n  readonly allowSelectAll = input(false, { transform: booleanAttribute });\n  /** Offer a **Clear** bulk action at the top of the panel (empties the set). The\n   *  multiselect counterpart to `fold-listbox`'s trigger `allowClear`. @default false */\n  readonly allowClear = input(false, { transform: booleanAttribute });\n  /** Label of the select-all action. @default 'Select all' */\n  readonly selectAllLabel = input(\"Select all\");\n  /** Label of the clear action. @default 'Clear' */\n  readonly clearLabel = input<string | undefined>();\n\n  private readonly common = inject(FOLD_COMMON_LABELS);\n\n  /** English default ← app-wide provider ← this instance's own input. */\n  protected readonly clearWord = computed(\n    () => this.clearLabel() ?? this.common.clear,\n  );\n\n  /** Unique, SSR-safe id for label association (see {@link FoldIdService}). */\n  readonly inputId = inject(FoldIdService).next(\"fold-multiselect\");\n  /** Id of the `role=\"listbox\"` element (own, distinct from the popover panel). */\n  protected readonly listId = `${this.inputId}-list`;\n\n  /** Rich per-row template for the `[options]` array API (`<ng-template #option>`). */\n  protected readonly optionTemplate =\n    contentChild<TemplateRef<{ $implicit: FoldSelectOption<T> }>>(\"option\");\n  // `descendants: true` so options nested inside a `<fold-optgroup>` are found,\n  // not only direct children — returned in document order, keeping roving order.\n  private readonly projectedOptions = contentChildren<FoldOptionComponent<T>>(\n    FoldOptionComponent,\n    { descendants: true },\n  );\n  private readonly renderedOptions =\n    viewChildren<FoldOptionComponent<T>>(FoldOptionComponent);\n  /** The live option instances, from whichever API is in use. */\n  private readonly allOptions = computed(() =>\n    this.options() ? this.renderedOptions() : this.projectedOptions(),\n  );\n  private readonly list = viewChild<ElementRef<HTMLElement>>(\"list\");\n\n  /** Compare two values — the injected `compareWith`, else `Object.is`. */\n  private eq(a: T, b: T): boolean {\n    const cmp = this.compareWith();\n    return cmp ? cmp(a, b) : Object.is(a, b);\n  }\n\n  /** Shared roving/keyboard core; multi-select toggles + stays open on activation. */\n  private readonly nav = new FoldListboxNav(() => this.allOptions(), {\n    select: (index) => this.toggle(index),\n    close: () => this.open.set(false),\n  });\n  /** `aria-activedescendant`, read by each `fold-option` for its `is-active`. */\n  readonly activeId = this.nav.activeId;\n\n  /** Fast-path membership: a `Set` when values compare by identity (the default,\n   *  O(1) per option), or `null` when a `compareWith` is supplied — then\n   *  membership falls back to a linear `eq` scan (correct for object values). */\n  private readonly selectedSet = computed(() =>\n    this.compareWith() ? null : new Set(this.value()),\n  );\n\n  /** The chosen labels (in option order) — joined, collapsing to \"…, +N\" past\n   *  {@link SUMMARY_MAX} so the trigger can't grow unbounded. */\n  protected readonly summaryLabel = computed<string | undefined>(() => {\n    if (this.value().length === 0) {\n      return undefined;\n    }\n    const labels = this.allOptions()\n      .filter((o) => this.isSelected(o.value()))\n      .map((o) => o.label);\n    if (labels.length === 0) {\n      return undefined;\n    }\n    if (labels.length <= SUMMARY_MAX) {\n      return labels.join(\", \");\n    }\n    return `${labels.slice(0, SUMMARY_MAX).join(\", \")} +${labels.length - SUMMARY_MAX}`;\n  });\n  /** The message to show under the field: the first error, once touched. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n  /** `aria-describedby` target: the error when shown, else the hint, else none. */\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  /** Whether the bulk-action bar shows at all (either affordance enabled, and\n   *  there is at least one option to act on). */\n  protected readonly showBulk = computed(\n    () =>\n      (this.allowSelectAll() || this.allowClear()) &&\n      this.allOptions().length > 0,\n  );\n  /** Every enabled option is already selected — nothing left for \"Select all\". */\n  protected readonly allEnabledSelected = computed(() => {\n    const enabled = this.allOptions().filter((o) => !o.disabled());\n    return (\n      enabled.length > 0 && enabled.every((o) => this.isSelected(o.value()))\n    );\n  });\n\n  /** Has the popup been opened this lifetime — so any close marks touched (blur\n   *  parity), even one that picked nothing. */\n  private hasOpened = false;\n\n  constructor() {\n    // On open, move focus into the list and arm on the first selected row (or the\n    // first enabled one). Deferred to a microtask so it runs AFTER the popover's\n    // render effect has shown the panel in the same flush. On close, mark touched.\n    afterRenderEffect(() => {\n      if (this.open()) {\n        this.hasOpened = true;\n        queueMicrotask(() => {\n          if (this.open()) {\n            this.list()?.nativeElement.focus();\n            this.nav.arm(this.firstSelectedIndex());\n          }\n        });\n      } else {\n        this.nav.reset();\n        if (this.hasOpened) {\n          this.touched.set(true);\n        }\n      }\n    });\n    warnOnOrphanValue(\n      () => this.value(),\n      () => this.allOptions(),\n      (a, b) => this.eq(a, b),\n      \"fold-multiselect\",\n    );\n    if (isDevMode()) {\n      afterRenderEffect(() => {\n        if (this.options() && this.projectedOptions().length > 0) {\n          console.warn(\n            \"[fold-multiselect] both `[options]` and projected <fold-option> given — the array wins, the projected ones are ignored.\",\n          );\n        }\n      });\n    }\n  }\n\n  /** A value is selected when it's in the current set (via `compareWith`). */\n  isSelected(value: T): boolean {\n    const set = this.selectedSet();\n    return set ? set.has(value) : this.value().some((v) => this.eq(v, value));\n  }\n\n  /** Narrow an `[options]` entry to a group, or `null` — lets the template\n   *  branch on the two shapes with each side fully typed (no `any`). */\n  protected asGroup(item: FoldSelectItem<T>): FoldSelectOptionGroup<T> | null {\n    return isFoldSelectOptionGroup(item) ? item : null;\n  }\n\n  /** Narrow an `[options]` entry to a plain option, or `null`. */\n  protected asOption(item: FoldSelectItem<T>): FoldSelectOption<T> | null {\n    return isFoldSelectOptionGroup(item) ? null : item;\n  }\n\n  /** Open with the keys a native select opens on. */\n  protected onTriggerKeydown(event: KeyboardEvent): void {\n    if (this.open()) {\n      return;\n    }\n    if ([\"ArrowDown\", \"ArrowUp\", \"Enter\", \" \"].includes(event.key)) {\n      event.preventDefault();\n      this.open.set(true);\n    }\n  }\n\n  /** Keyboard while the list is open and focused — delegated to the core. */\n  protected onListKeydown(event: KeyboardEvent): void {\n    this.nav.onKeydown(event);\n  }\n\n  /** Click on a row toggles it (delegated, so projected rows need no wiring). */\n  protected onListClick(event: MouseEvent): void {\n    const index = this.enabledIndexFrom(event.target);\n    if (index >= 0) {\n      this.toggle(index);\n    }\n  }\n\n  /** Hover arms the row, so pointer and keyboard share one active row. */\n  protected onListPointermove(event: PointerEvent): void {\n    const index = this.enabledIndexFrom(event.target);\n    if (index >= 0) {\n      this.nav.point(index);\n    }\n  }\n\n  /** Index of the first selected option (or -1) — where the keyboard arms on open. */\n  private firstSelectedIndex(): number {\n    return this.allOptions().findIndex(\n      (o) => this.isSelected(o.value()) && !o.disabled(),\n    );\n  }\n\n  /** Index of the enabled option under an event target, or -1. */\n  private enabledIndexFrom(target: EventTarget | null): number {\n    if (!(target instanceof Element)) {\n      return -1;\n    }\n    const el = target.closest(\"[role='option']\");\n    const opts = this.allOptions();\n    const index = opts.findIndex((o) => o.id === el?.id);\n    return index >= 0 && !opts[index]?.disabled() ? index : -1;\n  }\n\n  /** Add every enabled option to the set (keeps already-picked disabled ones);\n   *  the panel stays open. */\n  protected selectAll(): void {\n    const toAdd = this.allOptions()\n      .filter((o) => !o.disabled())\n      .map((o) => o.value())\n      .filter((v) => !this.isSelected(v));\n    if (toAdd.length > 0) {\n      this.value.set([...this.value(), ...toAdd]);\n      this.touched.set(true);\n    }\n  }\n\n  /** Empty the set (the bulk \"Clear\"). */\n  protected clearAll(): void {\n    if (this.value().length > 0) {\n      this.value.set([]);\n      this.touched.set(true);\n    }\n  }\n\n  /** Add or remove the option's value from the set; the panel stays open. */\n  private toggle(index: number): void {\n    const o = this.allOptions()[index];\n    if (!o || o.disabled()) {\n      return;\n    }\n    const v = o.value();\n    const current = this.value();\n    this.value.set(\n      this.isSelected(v)\n        ? current.filter((x) => !this.eq(x, v))\n        : [...current, v],\n    );\n    this.touched.set(true);\n  }\n}\n","<fold-input-base\n  [label]=\"label()\"\n  [for]=\"inputId\"\n  [required]=\"required()\"\n  [optional]=\"optional()\"\n  [optionalLabel]=\"optionalLabel()\"\n  [info]=\"info()\"\n  [infoLabel]=\"infoLabel()\"\n  [hint]=\"hint()\"\n  [error]=\"errorMessage()\"\n>\n  <fold-popover\n    [(open)]=\"open\"\n    [autoFocus]=\"false\"\n    [ariaControls]=\"listId\"\n    [placement]=\"placement()\"\n    [fallbackPlacements]=\"['top-start', 'bottom-end', 'top-end']\"\n  >\n    <button\n      type=\"button\"\n      class=\"lb-trigger\"\n      [id]=\"inputId\"\n      foldPopoverTrigger=\"listbox\"\n      [disabled]=\"disabled()\"\n      [attr.aria-invalid]=\"errorMessage() ? true : null\"\n      [attr.aria-describedby]=\"describedBy()\"\n      (keydown)=\"onTriggerKeydown($event)\"\n    >\n      @if (summaryLabel(); as lbl) {\n        <span class=\"lb-value\">{{ lbl }}</span>\n      } @else {\n        <span class=\"lb-placeholder\">{{ placeholder() }}</span>\n      }\n      <fold-icon\n        name=\"chevron-down\"\n        size=\"sm\"\n        class=\"lb-caret\"\n        aria-hidden=\"true\"\n      />\n    </button>\n\n    <div foldPopoverPanel class=\"lb-panel\">\n      @if (showBulk()) {\n        <div class=\"lb-bulk\" role=\"group\" aria-label=\"Bulk actions\">\n          @if (allowSelectAll()) {\n            <button\n              type=\"button\"\n              class=\"lb-bulk-btn\"\n              [disabled]=\"allEnabledSelected()\"\n              (click)=\"selectAll()\"\n            >\n              <fold-icon name=\"check-circle\" size=\"sm\" aria-hidden=\"true\" />\n              {{ selectAllLabel() }}\n            </button>\n          }\n          @if (allowClear()) {\n            <button\n              type=\"button\"\n              class=\"lb-bulk-btn\"\n              [disabled]=\"value().length === 0\"\n              (click)=\"clearAll()\"\n            >\n              <fold-icon name=\"close\" size=\"sm\" aria-hidden=\"true\" />\n              {{ clearWord() }}\n            </button>\n          }\n        </div>\n      }\n\n      <div\n        #list\n        class=\"lb-list\"\n        role=\"listbox\"\n        aria-multiselectable=\"true\"\n        tabindex=\"-1\"\n        [id]=\"listId\"\n        [attr.aria-label]=\"label()\"\n        [attr.aria-activedescendant]=\"activeId()\"\n        (keydown)=\"onListKeydown($event)\"\n        (click)=\"onListClick($event)\"\n        (pointermove)=\"onListPointermove($event)\"\n      >\n        @if (options(); as opts) {\n          @for (item of opts; track $index) {\n            @if (asGroup(item); as group) {\n              <fold-optgroup [label]=\"group.label\">\n                @for (o of group.options; track o.value) {\n                  <fold-option\n                    [value]=\"o.value\"\n                    [disabled]=\"o.disabled ?? false\"\n                  >\n                    @if (optionTemplate(); as tpl) {\n                      <ng-container\n                        [ngTemplateOutlet]=\"tpl\"\n                        [ngTemplateOutletContext]=\"{ $implicit: o }\"\n                      />\n                    } @else {\n                      {{ o.label }}\n                    }\n                  </fold-option>\n                }\n              </fold-optgroup>\n            } @else if (asOption(item); as o) {\n              <fold-option [value]=\"o.value\" [disabled]=\"o.disabled ?? false\">\n                @if (optionTemplate(); as tpl) {\n                  <ng-container\n                    [ngTemplateOutlet]=\"tpl\"\n                    [ngTemplateOutletContext]=\"{ $implicit: o }\"\n                  />\n                } @else {\n                  {{ o.label }}\n                }\n              </fold-option>\n            }\n          }\n        } @else {\n          <ng-content />\n        }\n      </div>\n    </div>\n  </fold-popover>\n</fold-input-base>\n","/**\n * One password requirement shown as a live-validating dot in\n * {@link FoldPasswordFieldComponent}. The predicate is deliberately just a\n * function, so any validation style drops in:\n *\n * - **regex** — `foldRegexRule('An uppercase letter', /[A-Z]/)`, or inline\n *   `{ label, test: (v) => /\\d/.test(v) }`.\n * - **zod** (no dependency added here) —\n *   `{ label: 'Valid', test: (v) => schema.safeParse(v).success }`.\n * - **anything** — length, an entropy score, a server-known blocklist, …\n */\nexport interface FoldPasswordRule {\n  /** Human-readable requirement, e.g. \"At least 8 characters\". */\n  readonly label: string;\n  /** Passes when the value satisfies the rule. */\n  readonly test: (value: string) => boolean;\n}\n\n/** Build a rule from a `RegExp` — the common case. */\nexport function foldRegexRule(\n  label: string,\n  pattern: RegExp,\n): FoldPasswordRule {\n  return { label, test: (value) => pattern.test(value) };\n}\n\n/**\n * A sensible default policy (English labels): 8+ characters, an uppercase and a\n * lowercase letter, and a digit. Override via the `rules` input for a different\n * policy or localised labels.\n */\nexport function foldDefaultPasswordRules(): readonly FoldPasswordRule[] {\n  return [\n    { label: \"At least 8 characters\", test: (v) => v.length >= 8 },\n    foldRegexRule(\"An uppercase letter\", /[A-Z]/),\n    foldRegexRule(\"A lowercase letter\", /[a-z]/),\n    foldRegexRule(\"A number\", /\\d/),\n  ];\n}\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  effect,\n  input,\n  model,\n  output,\n} from \"@angular/core\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldInputComponent } from \"../input/input.component\";\nimport {\n  foldDefaultPasswordRules,\n  type FoldPasswordRule,\n} from \"./password-rules\";\n\n/**\n * `<fold-password-field>` — a password input with a **live requirements\n * checklist**. Composes `fold-input[type=password][revealable]` (so it inherits\n * the tokened box, the label/hint/error chrome and the show/hide eye) and renders\n * a dot per {@link FoldPasswordRule} that turns on as the value satisfies it.\n *\n * The rules are **injected**, not hard-coded — a `RegExp` (via `foldRegexRule`),\n * a `zod` `safeParse`, a length check, anything (see {@link FoldPasswordRule}).\n * `rules` defaults to {@link foldDefaultPasswordRules}. `validChange` emits\n * whether every rule passes; Signal-Forms-native (`FormValueControl<string>`).\n *\n * ```html\n * <fold-password-field\n *   label=\"New password\"\n *   [(value)]=\"password\"\n *   (validChange)=\"ok.set($event)\"\n * />\n * ```\n *\n * @selector `fold-password-field`\n */\n@Component({\n  selector: \"fold-password-field\",\n  standalone: true,\n  imports: [FoldInputComponent, FoldIconComponent],\n  templateUrl: \"./password-field.component.html\",\n  styleUrl: \"./password-field.component.scss\",\n  exportAs: \"foldPasswordField\",\n})\nexport class FoldPasswordFieldComponent implements FormValueControl<string> {\n  /** The password value. A `model()` so `FormField` and `[(value)]` stay in sync. */\n  readonly value = model<string>(\"\");\n  /** Disabled state — bound automatically by `FormField`. */\n  readonly disabled = input<boolean>(false);\n  /** Two-way touched state — forwarded to the inner input (set on blur). */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField`, shown under the input. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n\n  /** Label above the field. @default 'Password' */\n  readonly label = input(\"Password\");\n  /** Placeholder text. */\n  readonly placeholder = input(\"\");\n  /** Helper text under the input (above the rules). */\n  readonly hint = input<string>();\n  /** Show a required marker on the label. */\n  readonly required = input(false, { transform: booleanAttribute });\n  /** Size preset — see {@link FoldInputComponent.size}. @default 'md' */\n  readonly size = input<\"sm\" | \"md\" | \"lg\">(\"md\");\n  /** Visual variant — see {@link FoldInputComponent.variant}. @default 'default' */\n  readonly variant = input<\"default\" | \"panel\">(\"default\");\n  /** Native `autocomplete`. @default 'new-password' */\n  readonly autocomplete = input<string | null>(\"new-password\");\n  /** Offer the reveal (eye) toggle. @default true */\n  readonly revealable = input(true, { transform: booleanAttribute });\n  /** `aria-label` of the reveal toggle when hidden — forwarded to the input. */\n  readonly revealLabel = input(\"Show password\");\n  /** `aria-label` of the reveal toggle when shown — forwarded to the input. */\n  readonly hideLabel = input(\"Hide password\");\n\n  /** The requirements to display and validate against. @default the built-ins. */\n  readonly rules = input<readonly FoldPasswordRule[]>(\n    foldDefaultPasswordRules(),\n  );\n  /** Built-in row marker: a filling `dot`, or a `check` tick on satisfied rows.\n   *  @default 'dot' */\n  readonly marker = input<\"dot\" | \"check\">(\"dot\");\n  /** Accessible name of the requirements list. @default 'Password requirements' */\n  readonly rulesLabel = input(\"Password requirements\");\n  /** Word prefixed to a satisfied rule for screen readers. @default 'met' */\n  readonly metLabel = input(\"met\");\n  /** Word prefixed to an unmet rule for screen readers. @default 'not met' */\n  readonly unmetLabel = input(\"not met\");\n\n  /** Emits whether every rule passes, on each change. */\n  readonly validChange = output<boolean>();\n\n  /** Each rule paired with its live pass/fail state. Public + `exportAs`, so a\n   *  custom `[rules]` projection can render its own list off the same state:\n   *  `#pw=\"foldPasswordField\"` then loop `pw.checklist()`. */\n  readonly checklist = computed(() =>\n    this.rules().map((r) => ({ label: r.label, met: r.test(this.value()) })),\n  );\n  /** True when every rule passes. */\n  protected readonly allValid = computed(() =>\n    this.checklist().every((r) => r.met),\n  );\n\n  constructor() {\n    // Surface validity to the parent as it changes (initial state included).\n    effect(() => this.validChange.emit(this.allValid()));\n  }\n}\n","<fold-input\n  type=\"password\"\n  [label]=\"label()\"\n  [placeholder]=\"placeholder()\"\n  [hint]=\"hint()\"\n  [required]=\"required()\"\n  [size]=\"size()\"\n  [variant]=\"variant()\"\n  [disabled]=\"disabled()\"\n  [revealable]=\"revealable()\"\n  [revealLabel]=\"revealLabel()\"\n  [hideLabel]=\"hideLabel()\"\n  [autocomplete]=\"autocomplete()\"\n  [errors]=\"errors()\"\n  [(value)]=\"value\"\n  [(touched)]=\"touched\"\n/>\n\n<!-- Project into `[rules]` to redesign the checklist off the same state\n     (`#pw=\"foldPasswordField\"` → `pw.checklist()`); otherwise the default list\n     below is the fallback content. -->\n<ng-content select=\"[rules]\">\n  @if (checklist().length) {\n    <ul class=\"pw-rules\" [attr.aria-label]=\"rulesLabel()\" aria-live=\"polite\">\n      @for (rule of checklist(); track rule.label) {\n        <li class=\"pw-rule\" [class.is-met]=\"rule.met\">\n          @if (marker() === \"check\") {\n            <span class=\"pw-mark\" aria-hidden=\"true\">\n              @if (rule.met) {\n                <fold-icon name=\"check\" size=\"sm\" />\n              }\n            </span>\n          } @else {\n            <span class=\"pw-dot\" aria-hidden=\"true\"></span>\n          }\n          <span class=\"pw-rule-label\">{{ rule.label }}</span>\n          <!-- The met/unmet word is real text (not just an attribute), so the\n               aria-live region actually announces a rule flipping. -->\n          <span class=\"pw-sr\"\n            >— {{ rule.met ? metLabel() : unmetLabel() }}</span\n          >\n        </li>\n      }\n    </ul>\n  }\n</ng-content>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  effect,\n  ElementRef,\n  inject,\n  input,\n  isDevMode,\n  model,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/**\n * A status marker on a segment — a small dot before its label, for a choice that\n * needs attention. `warning` (amber) is the common case: this option is\n * reachable and usable, but something behind it is incomplete.\n */\nexport type FoldViewToggleDot = \"neutral\" | \"warning\" | \"alert\" | \"success\";\n\n/** One segment of a {@link FoldViewToggleComponent}. */\nexport interface FoldViewToggleOption {\n  /** The value emitted when this segment is chosen. */\n  readonly value: string;\n  /** Optional leading icon. */\n  readonly icon?: FoldIconName;\n  /** Optional visible label. Omit for an icon-only segment (set `ariaLabel`). */\n  readonly label?: string;\n  /** Accessible name — required when there is no visible `label`. */\n  readonly ariaLabel?: string;\n  /** Disable this segment. */\n  readonly disabled?: boolean;\n  /**\n   * A status dot before the label — see {@link FoldViewToggleDot}.\n   *\n   * It is **decorative on its own**: a dot says \"look here\", never *what*. Say\n   * what, in words, beside the control — the toggle's job is the choice, not the\n   * explanation. `dotLabel` names it for assistive tech when the words alone\n   * would not reach a screen reader in time.\n   */\n  readonly dot?: FoldViewToggleDot;\n  /** Accessible name for the {@link dot}, appended to the segment's name. */\n  readonly dotLabel?: string;\n}\n\n/** How a {@link FoldViewToggleComponent} paints its selected segment. */\nexport type FoldViewToggleActiveStyle = \"solid\" | \"accent\" | \"raised\";\n\n/**\n * `<fold-view-toggle>` — a compact **segmented single-select** (Cards / Table, a\n * density switch, a chart mode…). Generic and zero-domain: pass `options` and\n * bind `[(value)]`. It's a proper `role=\"radiogroup\"` of `role=\"radio\"` segments\n * with roving tabindex and arrow-key selection (Home/End too), so it's a real\n * single-choice control, not two independent toggles.\n *\n * ```html\n * <fold-view-toggle\n *   ariaLabel=\"View\"\n *   [options]=\"[\n *     { value: 'cards', icon: 'grid', ariaLabel: 'Cards' },\n *     { value: 'table', icon: 'list', ariaLabel: 'Table' },\n *   ]\"\n *   [(value)]=\"view\"\n * />\n * ```\n *\n * @selector `fold-view-toggle`\n */\n@Component({\n  selector: \"fold-view-toggle\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  templateUrl: \"./view-toggle.component.html\",\n  styleUrl: \"./view-toggle.component.scss\",\n  host: { \"[class]\": \"size() + ' a-' + activeStyle()\" },\n})\nexport class FoldViewToggleComponent {\n  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  /** The segments, in order. */\n  readonly options = input.required<readonly FoldViewToggleOption[]>();\n  /** The selected value. `[(value)]` / `FormField`-friendly. */\n  readonly value = model.required<string>();\n  /** Accessible name of the group. */\n  readonly ariaLabel = input<string>();\n  /** Size preset. @default 'md' */\n  readonly size = input<\"sm\" | \"md\">(\"md\");\n  /**\n   * How the selected segment reads:\n   * - `solid` (default) — filled with the accent, label in the on-accent ink.\n   * - `accent` — a tinted accent surface: present, quieter, and it keeps the\n   *   segment's ink readable next to a lot of other colour.\n   * - `raised` — a neutral chip lifted by a shadow.\n   *\n   * `solid` is the default for the same reason a button is: a segmented control\n   * exists to show **which one is chosen**, and the chosen one should be the\n   * loudest thing in the control. The tint reads well on a calm card and thins\n   * out on a dense screen; the neutral chip left the distinction to an elevation\n   * that disappears entirely under `forced-colors`. Reach for `accent` or\n   * `raised` when the toggle sits beside something more important than itself.\n   */\n  readonly activeStyle = input<FoldViewToggleActiveStyle>(\"solid\");\n  /** Hide visible labels, keeping icons only (labels stay as accessible names). */\n  readonly iconOnly = input(false, { transform: booleanAttribute });\n\n  constructor() {\n    if (isDevMode()) {\n      effect(() => {\n        if (!this.ariaLabel()) {\n          console.warn(\n            \"[fold-view-toggle] no `ariaLabel` — a radiogroup needs an accessible name.\",\n          );\n        }\n      });\n    }\n  }\n\n  /** The segment holding the tab stop: the selected one when enabled, else the\n   *  first enabled — never a disabled (unfocusable) segment, so Tab always\n   *  reaches the group even if the selected value is disabled. */\n  protected readonly rovingValue = computed<string | null>(() => {\n    const options = this.options();\n    const selected = options.find((o) => o.value === this.value());\n    if (selected && !selected.disabled) {\n      return selected.value;\n    }\n    return options.find((o) => !o.disabled)?.value ?? null;\n  });\n\n  /** Pick a segment (no-op if disabled or already selected). */\n  protected select(option: FoldViewToggleOption): void {\n    if (!option.disabled) {\n      this.value.set(option.value);\n    }\n  }\n\n  /** Arrow keys move the selection between enabled segments (radiogroup pattern). */\n  protected onKeydown(event: KeyboardEvent): void {\n    const enabled = this.options().filter((o) => !o.disabled);\n    if (enabled.length === 0) {\n      return;\n    }\n    const next = this.nextValue(event.key, enabled);\n    if (next === null) {\n      return;\n    }\n    event.preventDefault();\n    this.value.set(next);\n    this.focusValue(next);\n  }\n\n  /** The value to move to for a nav key, or null if the key isn't one. */\n  private nextValue(\n    key: string,\n    enabled: readonly FoldViewToggleOption[],\n  ): string | null {\n    const current = Math.max(\n      enabled.findIndex((o) => o.value === this.value()),\n      0,\n    );\n    switch (key) {\n      case \"Home\":\n        return enabled[0]?.value ?? null;\n      case \"End\":\n        return enabled[enabled.length - 1]?.value ?? null;\n      case \"ArrowRight\":\n      case \"ArrowDown\":\n        return enabled[(current + 1) % enabled.length]?.value ?? null;\n      case \"ArrowLeft\":\n      case \"ArrowUp\":\n        return (\n          enabled[(current - 1 + enabled.length) % enabled.length]?.value ??\n          null\n        );\n      default:\n        return null;\n    }\n  }\n\n  private focusValue(value: string): void {\n    const index = this.options().findIndex((o) => o.value === value);\n    const buttons =\n      this.host.nativeElement.querySelectorAll<HTMLButtonElement>(\n        \"[role='radio']\",\n      );\n    buttons.item(index)?.focus();\n  }\n\n  /**\n   * The segment's accessible name — its own, plus the dot's meaning when it\n   * carries one. A dot is decorative in the DOM (`aria-hidden`), so without this\n   * a screen-reader user hears \"English\" where a sighted user sees \"English,\n   * something is missing\".\n   */\n  protected segmentName(option: FoldViewToggleOption): string | null {\n    const base = option.ariaLabel ?? option.label ?? null;\n    if (option.dotLabel === undefined) {\n      return base;\n    }\n    return base === null ? option.dotLabel : `${base} — ${option.dotLabel}`;\n  }\n}\n","<div\n  class=\"vt\"\n  role=\"radiogroup\"\n  [attr.aria-label]=\"ariaLabel()\"\n  (keydown)=\"onKeydown($event)\"\n>\n  @for (option of options(); track option.value) {\n    <button\n      type=\"button\"\n      role=\"radio\"\n      class=\"vt-btn\"\n      [class.is-on]=\"value() === option.value\"\n      [class.icon-only]=\"iconOnly() || !option.label\"\n      [attr.aria-checked]=\"value() === option.value\"\n      [attr.aria-label]=\"segmentName(option)\"\n      [attr.tabindex]=\"rovingValue() === option.value ? 0 : -1\"\n      [disabled]=\"option.disabled || null\"\n      [attr.title]=\"iconOnly() ? (option.label ?? option.ariaLabel) : null\"\n      (click)=\"select(option)\"\n    >\n      @if (option.dot; as dot) {\n        <span class=\"vt-dot\" [class]=\"dot\" aria-hidden=\"true\"></span>\n      }\n      @if (option.icon) {\n        <fold-icon [name]=\"option.icon\" size=\"sm\" aria-hidden=\"true\" />\n      }\n      @if (option.label && !iconOnly()) {\n        <span class=\"vt-label\">{{ option.label }}</span>\n      }\n    </button>\n  }\n</div>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  inject,\n  input,\n} from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FOLD_COMMON_LABELS } from \"../common-labels\";\n\n/** How the group's members are laid out. */\nexport type FoldFieldsetDirection = \"vertical\" | \"horizontal\";\n\n/**\n * Whether the group draws its own boundary.\n * - `plain` — spacing only; the legend and the whitespace do the grouping.\n * - `border` — a boxed group, for a set that sits among peers and has to be\n *   told apart from them at a glance.\n */\nexport type FoldFieldsetAppearance = \"plain\" | \"border\";\n\n/**\n * Which register the legend wears — the same two words `fold-page-section`\n * uses for its title, and deliberately so: a reader meets one vocabulary for\n * \"small and above the thing\" versus \"reads as prose\", not one per component.\n *\n * - `eyebrow` — small, uppercase, tracked, muted. The group is a **part of a\n *   form**, and its name should sit above the controls without competing with\n *   them.\n * - `heading` — plain, at the size of a field's own label. The group **is** one\n *   thing in the form's eyes (\"Créneaux de livraison\"), so its name reads at\n *   the same weight as the labels around it.\n */\nexport type FoldFieldsetLegendVariant = \"eyebrow\" | \"heading\";\n\n/**\n * Where the {@link FoldFieldsetComponent.hint} sits.\n *\n * - `under` — its own line below the legend. Room for a sentence; the default,\n *   because an instruction long enough to be worth writing rarely fits beside\n *   a name.\n * - `inline` — on the legend's line, right after it. For the short parenthetical\n *   that qualifies the name rather than instructing (\"lieux difficiles à\n *   localiser\"). Beyond a few words it pushes the legend around and wraps\n *   badly — that is what `under` is for.\n */\nexport type FoldFieldsetHintPosition = \"under\" | \"inline\";\n\n/**\n * A named group of form controls — the `<fieldset>` / `<legend>` pair, with its\n * browser styling neutralised and its rhythm on the token scale.\n *\n * **Why it exists.** The native pair is unusable as shipped: every consumer\n * writes the same six lines to undo it (`margin: 0; padding: 0; border: 0`,\n * then flex + gap, then `legend { padding: 0 }`). That reset appeared five\n * times across two apps, character for character, before this component was\n * written. Repetition that exact is not a coincidence — it is a missing\n * component.\n *\n * **Not a card, and not a section.** `fold-card` is a surface, `fold-page-section`\n * is a chapter of a page; this is the *accessible grouping* of controls that\n * answer one question.\n *\n * ## What the native element buys, and what this keeps\n *\n * - The **legend names the group**: assistive tech announces it with each\n *   control inside, so \"Gluten\" is heard as \"Allergens, Gluten\". A heading over\n *   a `<div>` looks identical and announces nothing — that is the whole reason\n *   to reach for a fieldset.\n * - {@link disabled} is the element's **unique superpower**: a disabled\n *   `<fieldset>` disables *every* control it contains, in one attribute, with\n *   no per-control wiring. Nothing else in HTML does this. (Per spec the first\n *   `<legend>` is exempt — controls inside it stay live.)\n * - {@link hint} is wired through `aria-describedby`, so the group's\n *   instruction (\"pick at least one\") is read out rather than merely printed.\n * - {@link optional} marks the **whole group** optional — a GPS point is two\n *   fields that are either both given or both skipped, and saying \"optional\"\n *   on each of them would say something else.\n * - {@link ariaLabel} names a group that must not show a visible legend. A\n *   group with **neither** is deliberately allowed and deliberately silent:\n *   that is the nested case, where the parent already named it.\n *\n * `--fold-fieldset-gap` themes the space between members. It defaults to the\n * **form rhythm** (`--fold-space-md`): a field is a label, a box and sometimes\n * a hint, and it needs air that three checkboxes do not. Compact groups —\n * checkboxes, time rows, radios — tighten it.\n *\n * @selector `fold-fieldset`\n *\n * @example\n * ```html\n * <fold-fieldset legend=\"Allergènes\" appearance=\"border\">\n *   <fold-checkbox label=\"Gluten\" />\n *   <fold-checkbox label=\"Fruits à coque\" />\n * </fold-fieldset>\n *\n * <fold-fieldset\n *   legend=\"Créneaux\"\n *   hint=\"Au moins un jour\"\n *   [disabled]=\"!enabled()\"\n * >…</fold-fieldset>\n * ```\n */\n@Component({\n  selector: \"fold-fieldset\",\n  standalone: true,\n  templateUrl: \"./fieldset.component.html\",\n  styleUrl: \"./fieldset.component.scss\",\n})\nexport class FoldFieldsetComponent {\n  private readonly ids = inject(FoldIdService);\n\n  /**\n   * The group's name, rendered as its `<legend>`.\n   *\n   * Empty renders **no** `<legend>` at all — an empty one is worse than none,\n   * it hands a screen reader a group with a blank name.\n   */\n  readonly legend = input(\"\");\n\n  /**\n   * The group's name when it must not be shown.\n   *\n   * Ignored when {@link legend} is set: two names for one group is how they\n   * drift apart. Reach for it when a visible heading outside the group already\n   * says it, and repeating it would read twice.\n   */\n  readonly ariaLabel = input(\"\");\n\n  /**\n   * An instruction for the group as a whole — « pick at least one », « optional ».\n   *\n   * Rendered under the legend AND pointed at by `aria-describedby`, so it is\n   * heard and not only seen. A hint that is only painted is a hint that half\n   * the readers never get.\n   */\n  readonly hint = input(\"\");\n\n  /**\n   * A lighter `(optional)` marker after the legend — the same one a\n   * {@link FoldLabelComponent} puts after a field's label, and the same word\n   * from the same provider.\n   *\n   * It exists because a group can be optional as a whole while none of its\n   * members is: a GPS point is two fields that are either both given or both\n   * skipped. Saying \"optional\" on each of them would say something else.\n   */\n  readonly optional = input(false, { transform: booleanAttribute });\n\n  /** The word inside the optional marker. @default 'optional' */\n  readonly optionalLabel = input<string | undefined>();\n\n  /**\n   * Where the hint sits. @default 'under'\n   *\n   * `aria-describedby` points at it either way — the position is where the eye\n   * finds it, never whether it is announced.\n   *\n   * Falls back to `under` when there is no legend: `inline` means \"on the\n   * legend's line\", and there is no line to sit on.\n   */\n  readonly hintPosition = input<FoldFieldsetHintPosition>(\"under\");\n\n  /**\n   * Disables **every control inside the group** — the native element's unique\n   * capability, and the reason to prefer it over a `div` even when the grouping\n   * is purely visual.\n   */\n  readonly disabled = input(false, { transform: booleanAttribute });\n\n  /**\n   * Which register the legend wears. @default 'eyebrow'\n   *\n   * Both exist in real forms and they say different things — see\n   * {@link FoldFieldsetLegendVariant}. Getting this wrong is not a cosmetic\n   * miss: an eyebrow over a group that is really one field makes the form look\n   * like it has more sections than it has questions.\n   */\n  readonly legendVariant = input<FoldFieldsetLegendVariant>(\"eyebrow\");\n\n  /** How the members flow. @default 'vertical' */\n  readonly direction = input<FoldFieldsetDirection>(\"vertical\");\n\n  /** Whether the group draws its boundary. @default 'plain' */\n  readonly appearance = input<FoldFieldsetAppearance>(\"plain\");\n\n  private readonly common = inject(FOLD_COMMON_LABELS);\n\n  /** English default ← app-wide provider ← this instance's own input. */\n  protected readonly optionalWord = computed(\n    () => this.optionalLabel() ?? this.common.optional,\n  );\n\n  /** Unique, SSR-safe id for the hint (see {@link FoldIdService}). */\n  protected readonly hintId = this.ids.next(\"fold-fieldset-hint\");\n\n  /** `aria-describedby` target — the hint when there is one, else nothing. */\n  protected readonly describedBy = computed(() =>\n    this.hint() === \"\" ? null : this.hintId,\n  );\n\n  /**\n   * The accessible name to set when no `<legend>` is rendered.\n   *\n   * `null` rather than `\"\"` so the attribute is **absent**: an empty\n   * `aria-label` on a group is a group that claims a name and gives none.\n   */\n  protected readonly label = computed(() =>\n    this.legend() !== \"\" || this.ariaLabel() === \"\" ? null : this.ariaLabel(),\n  );\n}\n","<fieldset\n  class=\"fs-box\"\n  [class]=\"[direction(), appearance(), legendVariant()]\"\n  [disabled]=\"disabled()\"\n  [attr.aria-label]=\"label()\"\n  [attr.aria-describedby]=\"describedBy()\"\n>\n  @if (legend() !== \"\") {\n    <legend class=\"fs-legend\">\n      {{ legend() }}\n      @if (optional()) {\n        <span class=\"fs-opt\">({{ optionalWord() }})</span>\n      }\n      @if (hint() !== \"\" && hintPosition() === \"inline\") {\n        <span class=\"fs-hint-inline\" [id]=\"hintId\">{{ hint() }}</span>\n      }\n    </legend>\n  }\n  @if (hint() !== \"\" && (hintPosition() === \"under\" || legend() === \"\")) {\n    <p class=\"fs-hint\" [id]=\"hintId\">{{ hint() }}</p>\n  }\n  <ng-content />\n</fieldset>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  inject,\n  input,\n  model,\n} from \"@angular/core\";\nimport type { FormValueControl, ValidationError } from \"@angular/forms/signals\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { readInputValue } from \"../../forms/input/input-value\";\n\n/**\n * `<fold-slider>` — a single-value range slider with the design-system track,\n * fill and thumb (a styled native `<input type=\"range\">`, so keyboard, focus and\n * the `slider` role are all native). The fill is a `--sl-pct` custom property, so\n * there is no overlay markup. For a min↔max pair, use {@link FoldRangeSliderComponent}.\n *\n * Integrates with signal forms via `FormValueControl<number>` (bind\n * `[formField]`), or drive it standalone with `[(value)]` / `(valueChange)`. A\n * visible `label` is a real `<label for>`; a `valueText` override is announced\n * to assistive tech through `aria-valuetext` (so a value that _means_ something —\n * `\"off\"`, `\"12:30\"` — reads as that, not the raw number).\n *\n * @selector `fold-slider`\n *\n * @example\n * ```html\n * <fold-slider label=\"Rail width\" [min]=\"48\" [max]=\"120\" [(value)]=\"width\" />\n * <fold-slider label=\"Volume\" [formField]=\"form.volume\" />\n * <fold-slider label=\"Min\" [max]=\"10\" [valueText]=\"min() || 'off'\" [(value)]=\"min\" />\n * ```\n */\n@Component({\n  selector: \"fold-slider\",\n  standalone: true,\n  templateUrl: \"./slider.component.html\",\n  styleUrl: \"./slider.component.scss\",\n})\nexport class FoldSliderComponent implements FormValueControl<number> {\n  /** The bound value — a `model()`, so `[(value)]` and signal forms both sync. */\n  readonly value = model<number>(0);\n  /** Minimum value (also the field's min validator via `FormField`). @default 0 */\n  readonly min = input<number | undefined>(0);\n  /** Maximum value (also the field's max validator via `FormField`). @default 100 */\n  readonly max = input<number | undefined>(100);\n  /** Increment granularity. @default 1 */\n  readonly step = input<number | undefined>(1);\n  /** Optional visible label (a real `<label for>`), also the accessible name. */\n  readonly label = input<string>();\n  /** Accessible name when there is no visible `label`. */\n  readonly ariaLabel = input<string>();\n  /** Override the displayed + announced value text — e.g. `'off'` for \"no bound\". */\n  readonly valueText = input<string>();\n  /** Show the current value next to the label. @default true */\n  readonly showValue = input(true, { transform: booleanAttribute });\n  /** Optional helper text shown under the track. */\n  readonly hint = input<string>();\n  /** Disable interaction. */\n  readonly disabled = input(false, { transform: booleanAttribute });\n  /** Two-way touched state — set on blur so `FormField` can surface errors. */\n  readonly touched = model<boolean>(false);\n  /** Validation errors — bound by `FormField` from the field. */\n  readonly errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n\n  /** Unique, SSR-safe id for label + message association. */\n  readonly inputId = inject(FoldIdService).next(\"fold-slider\");\n\n  /** Resolved bounds — the interface types min/max/step as `number | undefined`\n   *  (a `FormField` may leave a bound unset); fall back to the standalone defaults. */\n  protected readonly rMin = computed(() => this.min() ?? 0);\n  protected readonly rMax = computed(() => this.max() ?? 100);\n  protected readonly rStep = computed(() => this.step() ?? 1);\n\n  /** Fill percentage (0–100) of the track, from the value within [min, max]. */\n  protected readonly percent = computed<number>(() => {\n    const range = this.rMax() - this.rMin();\n    if (range <= 0) {\n      return 0;\n    }\n    const pct = ((this.value() - this.rMin()) / range) * 100;\n    return Math.max(0, Math.min(100, pct));\n  });\n\n  /** The value text to display: the explicit {@link valueText} override, else the number. */\n  protected readonly display = computed<string>(\n    () => this.valueText() ?? String(this.value()),\n  );\n\n  /** The message under the track: the first error once touched, else the hint. */\n  protected readonly errorMessage = computed<string | undefined>(() => {\n    if (!this.touched()) {\n      return undefined;\n    }\n    const first = this.errors()[0];\n    return first ? (first.message ?? first.kind) : undefined;\n  });\n  protected readonly message = computed<string | null>(\n    () => this.errorMessage() ?? this.hint() ?? null,\n  );\n  protected readonly describedBy = computed<string | null>(() => {\n    if (this.errorMessage()) {\n      return `${this.inputId}-error`;\n    }\n    return this.hint() ? `${this.inputId}-hint` : null;\n  });\n\n  protected onInput(event: Event): void {\n    this.value.set(Number(readInputValue(event)));\n  }\n\n  protected onBlur(): void {\n    this.touched.set(true);\n  }\n}\n","<div class=\"sl\">\n  @if (label() || showValue()) {\n    <div class=\"sl-head\">\n      @if (label(); as text) {\n        <label class=\"sl-label\" [for]=\"inputId\">{{ text }}</label>\n      }\n      @if (showValue()) {\n        <span class=\"sl-value\">{{ display() }}</span>\n      }\n    </div>\n  }\n  <input\n    [id]=\"inputId\"\n    class=\"sl-input\"\n    type=\"range\"\n    [min]=\"rMin()\"\n    [max]=\"rMax()\"\n    [step]=\"rStep()\"\n    [value]=\"value()\"\n    [disabled]=\"disabled()\"\n    [style.--sl-pct]=\"percent() + '%'\"\n    [attr.aria-label]=\"label() ? null : (ariaLabel() ?? null)\"\n    [attr.aria-valuetext]=\"valueText() ?? null\"\n    [attr.aria-describedby]=\"describedBy()\"\n    [attr.aria-invalid]=\"errorMessage() ? true : null\"\n    (input)=\"onInput($event)\"\n    (blur)=\"onBlur()\"\n  />\n  @if (message(); as msg) {\n    <span\n      class=\"sl-msg\"\n      [class.is-error]=\"errorMessage()\"\n      [id]=\"errorMessage() ? inputId + '-error' : inputId + '-hint'\"\n      >{{ msg }}</span\n    >\n  }\n</div>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  inject,\n  input,\n  model,\n  output,\n} from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { readInputValue } from \"../../forms/input/input-value\";\n\n/** A min↔max pair held by {@link FoldRangeSliderComponent}. */\nexport type FoldRangeValue = { min: number; max: number };\n\n/**\n * `<fold-range-slider>` — a dual-thumb range slider selecting a `{ min, max }`\n * window over `[min, max]`. Shares the design-system track / fill / thumb with\n * {@link FoldSliderComponent}. For a single value, use `fold-slider`.\n *\n * Two-way bound via `[(value)]` (a `model()`), or one-way `[value]` +\n * `(valueChange)`. The thumbs never cross (each clamps against the other). The\n * pair is a labelled `role=\"group\"`; each thumb announces its formatted value\n * through `aria-valuetext`, and the thumb names (`minLabel` / `maxLabel`) are\n * inputs so a non-English app can localise them.\n *\n * @selector `fold-range-slider`\n *\n * @example\n * ```html\n * <fold-range-slider label=\"BPM\" [min]=\"60\" [max]=\"220\" [step]=\"5\" [(value)]=\"bpm\" />\n * ```\n */\n@Component({\n  selector: \"fold-range-slider\",\n  standalone: true,\n  templateUrl: \"./range-slider.component.html\",\n  styleUrl: \"./range-slider.component.scss\",\n})\nexport class FoldRangeSliderComponent {\n  /** Label shown above the track (names the `role=\"group\"`). */\n  readonly label = input.required<string>();\n  /** Lower bound of the selectable range. @default 0 */\n  readonly min = input<number>(0);\n  /** Upper bound of the selectable range. @default 100 */\n  readonly max = input<number>(100);\n  /** Increment granularity. @default 1 */\n  readonly step = input<number>(1);\n  /** The current `{ min, max }` window; falls back to the full range when unset.\n   *  A `model()`, so `[(value)]` and `(valueChange)` both work. */\n  readonly value = model<FoldRangeValue | undefined>(undefined);\n  /** Fires when the **user drags a thumb** — carries the resolved `{ min, max }`,\n   *  never `undefined`. Use it for the common \"filter on change\" case to skip the\n   *  `FoldRangeValue | undefined` narrowing that `[(value)]` / `valueChange`\n   *  require. */\n  readonly rangeChange = output<FoldRangeValue>();\n  /** How the values are formatted for display + `aria-valuetext`. @default 'number' */\n  readonly unit = input<\"number\" | \"duration\">(\"number\");\n  /** Disable both thumbs. */\n  readonly disabled = input(false, { transform: booleanAttribute });\n  /** Accessible name suffix for the lower thumb. @default 'minimum' */\n  readonly minLabel = input(\"minimum\");\n  /** Accessible name suffix for the upper thumb. @default 'maximum' */\n  readonly maxLabel = input(\"maximum\");\n\n  /** Id of the visible label, so the group can point at it. */\n  readonly labelId = inject(FoldIdService).next(\"fold-range\");\n\n  protected readonly currentMin = computed(\n    () => this.value()?.min ?? this.min(),\n  );\n  protected readonly currentMax = computed(\n    () => this.value()?.max ?? this.max(),\n  );\n\n  protected readonly fillLeft = computed(() => {\n    const range = this.max() - this.min();\n    return range === 0 ? 0 : ((this.currentMin() - this.min()) / range) * 100;\n  });\n\n  protected readonly fillWidth = computed(() => {\n    const range = this.max() - this.min();\n    if (range === 0) {\n      return 100;\n    }\n    return ((this.currentMax() - this.currentMin()) / range) * 100;\n  });\n\n  protected formatValue(val: number): string {\n    if (this.unit() === \"duration\") {\n      const m = Math.floor(val / 60);\n      const s = val % 60;\n      return `${m}:${s.toString().padStart(2, \"0\")}`;\n    }\n    return String(val);\n  }\n\n  protected onMinChange(event: Event): void {\n    const val = Number(readInputValue(event));\n    this.commit({\n      min: Math.min(val, this.currentMax()),\n      max: this.currentMax(),\n    });\n  }\n\n  protected onMaxChange(event: Event): void {\n    const val = Number(readInputValue(event));\n    this.commit({\n      min: this.currentMin(),\n      max: Math.max(val, this.currentMin()),\n    });\n  }\n\n  private commit(next: FoldRangeValue): void {\n    this.value.set(next);\n    this.rangeChange.emit(next);\n  }\n}\n","<div class=\"rs\" role=\"group\" [attr.aria-labelledby]=\"labelId\">\n  <span class=\"rs-label\" [id]=\"labelId\">{{ label() }}</span>\n  <div class=\"rs-track-wrap\">\n    <div class=\"rs-track\">\n      <div\n        class=\"rs-fill\"\n        [style.left.%]=\"fillLeft()\"\n        [style.width.%]=\"fillWidth()\"\n      ></div>\n    </div>\n    <input\n      type=\"range\"\n      class=\"rs-thumb rs-thumb--min\"\n      [min]=\"min()\"\n      [max]=\"max()\"\n      [step]=\"step()\"\n      [value]=\"currentMin()\"\n      [disabled]=\"disabled()\"\n      [attr.aria-label]=\"label() + ' ' + minLabel()\"\n      [attr.aria-valuetext]=\"formatValue(currentMin())\"\n      (input)=\"onMinChange($event)\"\n    />\n    <input\n      type=\"range\"\n      class=\"rs-thumb rs-thumb--max\"\n      [min]=\"min()\"\n      [max]=\"max()\"\n      [step]=\"step()\"\n      [value]=\"currentMax()\"\n      [disabled]=\"disabled()\"\n      [attr.aria-label]=\"label() + ' ' + maxLabel()\"\n      [attr.aria-valuetext]=\"formatValue(currentMax())\"\n      (input)=\"onMaxChange($event)\"\n    />\n  </div>\n  <span class=\"rs-values\"\n    >{{ formatValue(currentMin()) }} – {{ formatValue(currentMax()) }}</span\n  >\n</div>\n","import { Component, input } from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/**\n * The state of one checklist item.\n * - `done` — satisfied.\n * - `todo` — not satisfied, and it matters (it blocks something).\n * - `optional` — not satisfied, and that is fine.\n */\nexport type FoldChecklistState = \"done\" | \"todo\" | \"optional\";\n\n/** One line of a {@link FoldChecklistComponent}. */\nexport interface FoldChecklistItem {\n  /** What is being checked, in the reader's words. */\n  readonly label: string;\n  readonly state: FoldChecklistState;\n}\n\n/**\n * A list of conditions and whether each is met — what is missing before a thing\n * can happen.\n *\n * The pattern's third appearance (a password field's rules, a danger zone's\n * preconditions, then a publication checklist), which is where a shape stops\n * being a coincidence.\n *\n * Every state is carried by a **glyph as well as a colour**: a green dot and an\n * amber one are the same dot in greyscale, in a forced-colors theme, and to a\n * large share of readers. The glyph is the state; the colour reinforces it.\n *\n * @selector `fold-checklist`\n *\n * @example\n * ```html\n * <fold-checklist [items]=\"[\n *   { label: 'Nom et famille', state: 'done' },\n *   { label: 'Poids net', state: 'todo' },\n *   { label: 'Nom EN', state: 'optional' },\n * ]\" />\n * ```\n */\n@Component({\n  selector: \"fold-checklist\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  templateUrl: \"./checklist.component.html\",\n  styleUrl: \"./checklist.component.scss\",\n})\nexport class FoldChecklistComponent {\n  /** The conditions, in the order they should be read. */\n  readonly items = input.required<readonly FoldChecklistItem[]>();\n\n  /**\n   * Screen-reader wording per state, prefixed to the label.\n   *\n   * A sighted reader gets the glyph; a screen reader would otherwise hear a\n   * bare list of labels with no indication of which are met. Overridable\n   * because it is user-facing text, and the library ships English.\n   */\n  /**\n   * The glyph per state — in the component, not spelled inline in the template.\n   *\n   * Three states, three distinct icons: this is the mapping the whole\n   * colour-is-not-enough rule rests on, and a table can be read (and broken in\n   * a test) where a nested ternary in a template cannot.\n   */\n  protected readonly glyph: Record<FoldChecklistState, FoldIconName> = {\n    done: \"check\",\n    todo: \"alert\",\n    optional: \"minus\",\n  };\n\n  readonly stateLabels = input<Record<FoldChecklistState, string>>({\n    done: \"Done:\",\n    todo: \"Missing:\",\n    optional: \"Optional:\",\n  });\n}\n","<ul class=\"cl-list\" role=\"list\">\n  @for (item of items(); track item.label) {\n    <li class=\"cl-item\" [class]=\"item.state\">\n      <fold-icon\n        class=\"cl-glyph\"\n        aria-hidden=\"true\"\n        [name]=\"glyph[item.state]\"\n        size=\"sm\"\n      />\n      <span class=\"cl-sr\">{{ stateLabels()[item.state] }}</span>\n      <span class=\"cl-label\">{{ item.label }}</span>\n    </li>\n  }\n</ul>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  inject,\n  input,\n  numberAttribute,\n} from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\n\n/** Tone of the filled portion — the meaning of the measurement, not its size. */\nexport type FoldMeterTone = \"accent\" | \"success\" | \"warning\" | \"alert\";\n\n/**\n * A read-only measurement within a known range — a completeness bar, a quota, a\n * score.\n *\n * **Not a progress bar and not a slider.** `fold-slider` is an\n * `input type=\"range\"`: focusable, draggable, and it announces itself as\n * something you can change. A meter announces a value already decided — you read\n * it and move on. Drawing one as a bare `div` (the usual shortcut) gives screen\n * readers nothing at all, which is why this exists.\n *\n * @selector `fold-meter`\n *\n * @example\n * ```html\n * <fold-meter label=\"Complétude\" [value]=\"6\" [max]=\"9\" />\n * <fold-meter label=\"Quota\" [value]=\"92\" [max]=\"100\" tone=\"warning\" showValue />\n * ```\n */\n@Component({\n  selector: \"fold-meter\",\n  standalone: true,\n  templateUrl: \"./meter.component.html\",\n  styleUrl: \"./meter.component.scss\",\n  host: {\n    \"[class]\": \"tone()\",\n  },\n})\nexport class FoldMeterComponent {\n  /**\n   * Accessible name — what is being measured.\n   *\n   * Required, and deliberately so: a bar with no name is a coloured rectangle.\n   * Pass the same words the surrounding heading uses.\n   */\n  readonly label = input.required<string>();\n\n  /** Current value, clamped into `[min, max]`. */\n  readonly value = input.required({ transform: numberAttribute });\n\n  /** Lower bound (default `0`). */\n  readonly min = input(0, { transform: numberAttribute });\n\n  /** Upper bound (default `100`). */\n  readonly max = input(100, { transform: numberAttribute });\n\n  /** Show `value / max` beside the bar. */\n  readonly showValue = input(false, { transform: booleanAttribute });\n\n  /** Tone of the fill. */\n  readonly tone = input<FoldMeterTone>(\"accent\");\n\n  /** Unique, SSR-safe id for label association (see {@link FoldIdService}). */\n  protected readonly labelId = inject(FoldIdService).next(\"fold-meter\");\n\n  /**\n   * The fill, in percent.\n   *\n   * Clamped rather than trusted: a value past `max` would paint outside the\n   * track, and an inverted range (`min > max`) would divide by a negative — the\n   * two ways a caller's arithmetic goes wrong.\n   */\n  protected readonly percent = computed(() => {\n    const min = this.min();\n    const span = this.max() - min;\n    if (span <= 0) {\n      return 0;\n    }\n    const ratio = (this.clamped() - min) / span;\n    return Math.round(ratio * 1000) / 10;\n  });\n\n  protected readonly clamped = computed(() =>\n    Math.min(Math.max(this.value(), this.min()), this.max()),\n  );\n}\n","<span class=\"m-row\">\n  <span class=\"m-label\" [id]=\"labelId\">{{ label() }}</span>\n  @if (showValue()) {\n    <span class=\"m-value\">{{ clamped() }} / {{ max() }}</span>\n  }\n</span>\n<span\n  class=\"m-track\"\n  role=\"meter\"\n  [attr.aria-labelledby]=\"labelId\"\n  [attr.aria-valuenow]=\"clamped()\"\n  [attr.aria-valuemin]=\"min()\"\n  [attr.aria-valuemax]=\"max()\"\n>\n  <span class=\"m-fill\" [style.inline-size.%]=\"percent()\"></span>\n</span>\n","import { booleanAttribute, Component, computed, input } from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/** Severity of a {@link FoldCalloutComponent} — colour + default icon. */\nexport type FoldCalloutVariant =\n  \"neutral\" | \"accent\" | \"info\" | \"success\" | \"warning\" | \"alert\";\n\n/** How the callout meets its container. */\nexport type FoldCalloutAppearance = \"inset\" | \"flat\";\n\n/** Default glyph per variant — overridable with the `icon` input. */\nconst DEFAULT_ICON: Record<FoldCalloutVariant, FoldIconName> = {\n  neutral: \"info\",\n  accent: \"lightning\",\n  info: \"info\",\n  success: \"completed\",\n  warning: \"warning\",\n  alert: \"warning\",\n};\n\n/**\n * `<fold-callout>` — a tinted message row: a status colour, an icon, a short\n * message, and optional actions on the trailing edge.\n *\n * Two appearances, and the difference is where it sits rather than how loud it\n * is:\n * - `inset` (default) — a bordered, rounded row **in** the flow, like a card.\n * - `flat` — a full-bleed band: no radius, no side borders, hairlines top and\n *   bottom only, so it reads as a strip **of** its container (drop one into a\n *   `<fold-card padding=\"none\">` and it spans the card edge to edge).\n *\n * The message is projected, so it can carry `<strong>`, links or a second\n * sentence. Colour comes from the status token families, so every theme is\n * handled without the callout knowing any of them. `accent` is the odd one:\n * it states no severity, it tints with the brand — for a callout that promotes\n * rather than warns (a new capability, a tip). Same name as `fold-badge`'s\n * brand tint, on purpose.\n *\n * ## Inputs\n * | Input        | Type                                                 | Default     |\n * |--------------|------------------------------------------------------|-------------|\n * | `variant`    | `neutral \\| accent \\| info \\| success \\| warning \\| alert` | `neutral` |\n * | `appearance` | `inset \\| flat`                                       | `inset`     |\n * | `icon`       | `FoldIconName` — overrides the variant's glyph         | —           |\n * | `announce`   | `boolean` — see below                                 | `false`     |\n *\n * `announce` is for a callout that **appears in response to something** (a\n * failed save, a quota just crossed): it turns the host into a live region so\n * a screen reader reads it out — assertively for `alert`, politely otherwise.\n * A callout that is simply part of the page stays a passive `note`; announcing\n * static content is noise, not accessibility.\n *\n * ## Slots\n * - default → the message.\n * - `[actions]` → trailing controls. Project a small control (`size=\"sm\"`) —\n *   a callout is a line of text, and a full-size button turns it into a bar.\n *   The callout cannot enforce it: view encapsulation puts projected content\n *   out of its reach.\n *\n * The resolved {@link role} and {@link ariaLive} are exposed (`exportAs:\n * \"foldCallout\"`) because `announce` changes nothing on screen — reading them\n * back is the only way to see it work.\n *\n * @selector `fold-callout`\n *\n * @example\n * ```html\n * <fold-callout variant=\"warning\">\n *   This contract is <strong>locked</strong> — no more edits.\n * </fold-callout>\n *\n * <fold-card padding=\"none\">\n *   <fold-callout variant=\"alert\" appearance=\"flat\" announce>\n *     Quota exceeded.\n *     <button foldButton actions size=\"sm\" variant=\"ghost\">Upgrade</button>\n *   </fold-callout>\n * </fold-card>\n * ```\n */\n@Component({\n  selector: \"fold-callout\",\n  standalone: true,\n  exportAs: \"foldCallout\",\n  imports: [FoldIconComponent],\n  host: {\n    \"[attr.role]\": \"role()\",\n    \"[attr.aria-live]\": \"ariaLive()\",\n    \"[class.v-neutral]\": \"variant() === 'neutral'\",\n    \"[class.v-accent]\": \"variant() === 'accent'\",\n    \"[class.v-info]\": \"variant() === 'info'\",\n    \"[class.v-success]\": \"variant() === 'success'\",\n    \"[class.v-warning]\": \"variant() === 'warning'\",\n    \"[class.v-alert]\": \"variant() === 'alert'\",\n    \"[class.is-flat]\": \"appearance() === 'flat'\",\n  },\n  templateUrl: \"./callout.component.html\",\n  styleUrl: \"./callout.component.scss\",\n})\nexport class FoldCalloutComponent {\n  readonly variant = input<FoldCalloutVariant>(\"neutral\");\n  readonly appearance = input<FoldCalloutAppearance>(\"inset\");\n  /** Override the variant's default glyph. */\n  readonly icon = input<FoldIconName>();\n  /** Announce this callout when it appears — see the class doc. */\n  readonly announce = input(false, { transform: booleanAttribute });\n\n  protected readonly iconName = computed<FoldIconName>(\n    () => this.icon() ?? DEFAULT_ICON[this.variant()],\n  );\n\n  /** The resolved ARIA role — public so a consumer (or the gallery) can show\n   *  what `announce` actually did, since it changes nothing visually. */\n  readonly role = computed(() => {\n    if (!this.announce()) {\n      return \"note\";\n    }\n    return this.variant() === \"alert\" ? \"alert\" : \"status\";\n  });\n\n  /** The resolved live-region politeness, or `null` when passive. */\n  readonly ariaLive = computed(() => {\n    if (!this.announce()) {\n      return null;\n    }\n    return this.variant() === \"alert\" ? \"assertive\" : \"polite\";\n  });\n}\n","<fold-icon class=\"callout-icon\" [name]=\"iconName()\" [size]=\"15\" />\n<span class=\"callout-body\"><ng-content /></span>\n<span class=\"callout-actions\"><ng-content select=\"[actions]\" /></span>\n","import { Component, inject, model } from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\n\n/**\n * `<fold-disclosure>` — one summary that toggles one collapsible panel. The\n * single primitive; an accordion is a *set* of these (one open at a time is the\n * consumer's job — bind each `open` and clear the others), so the library ships\n * the piece, not the policy.\n *\n * Not `<details>`: native `<details>` display-none's its content when closed,\n * which cannot animate. This drives the panel with a `grid-template-rows`\n * `0fr → 1fr` transition (the content stays in flow, just clipped to zero\n * height), and wires the disclosure ARIA by hand — the summary is a `button`\n * with `aria-expanded` pointing at the panel via `aria-controls`.\n *\n * Content projection:\n * - `[summary]` → the always-visible trigger label (text, or a richer row).\n * - default slot → the collapsible panel.\n *\n * Two-way `open` (`[(open)]`) reflects and controls the state; a one-way\n * `[open]=\"true\"` starts it expanded; `toggle()` on the host (`exportAs:\n * \"foldDisclosure\"`) flips it from a template.\n *\n * Colour is CSS custom properties so a plain disclosure and a loud call-to-open\n * are the same component: `--fold-disclosure-summary-bg` (transparent) and\n * `--fold-disclosure-summary-color` (text) tint the summary bar — set them to a\n * primary fill for a CTA.\n *\n * @selector `fold-disclosure`\n *\n * @example\n * ```html\n * <fold-disclosure>\n *   <span summary>How it works</span>\n *   <p>The panel, revealed on click.</p>\n * </fold-disclosure>\n * ```\n */\n@Component({\n  selector: \"fold-disclosure\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  exportAs: \"foldDisclosure\",\n  host: { \"[class.is-open]\": \"open()\" },\n  templateUrl: \"./disclosure.component.html\",\n  styleUrl: \"./disclosure.component.scss\",\n})\nexport class FoldDisclosureComponent {\n  /** Whether the panel is expanded. Two-way: `[(open)]`. */\n  readonly open = model(false);\n\n  /** Panel id, so the summary button can point `aria-controls` at it. */\n  protected readonly panelId = inject(FoldIdService).next(\"fold-disclosure\");\n\n  toggle(): void {\n    this.open.update((v) => !v);\n  }\n}\n","<button\n  type=\"button\"\n  class=\"disc-summary\"\n  [attr.aria-expanded]=\"open()\"\n  [attr.aria-controls]=\"panelId\"\n  (click)=\"toggle()\"\n>\n  <span class=\"disc-label\"><ng-content select=\"[summary]\" /></span>\n  <fold-icon class=\"disc-chevron\" name=\"chevron-down\" size=\"sm\" />\n</button>\n<div\n  class=\"disc-panel\"\n  [id]=\"panelId\"\n  role=\"region\"\n  [attr.aria-hidden]=\"!open()\"\n>\n  <div class=\"disc-panel-clip\">\n    <div class=\"disc-panel-content\"><ng-content /></div>\n  </div>\n</div>\n","import { Component, computed, input } from \"@angular/core\";\n\n/**\n * `<fold-status-badge>` — a coloured badge indicating a status. Unlike the\n * generic {@link FoldBadgeComponent}, this maps a **status key** to a colour, so\n * call sites pass a domain status rather than choosing a variant.\n *\n * **Supported statuses**\n * - `active` / `connected` — success (green)\n * - `draft` / `pending` — warning (amber)\n * - `suspended` / `error` — alert (red)\n * - `coming-soon` / `not_connected` — muted grey\n * - any other value (e.g. `terminated`) — neutral grey\n *\n * ```html\n * <fold-status-badge status=\"active\" />\n * <fold-status-badge status=\"pending\" label=\"En attente\" />\n * ```\n *\n * @selector `fold-status-badge`\n */\n@Component({\n  selector: \"fold-status-badge\",\n  standalone: true,\n  templateUrl: \"./status-badge.component.html\",\n  styleUrl: \"./status-badge.component.scss\",\n})\nexport class FoldStatusBadgeComponent {\n  /** The status key that determines the colour. */\n  readonly status = input.required<string>();\n  /** Display text — defaults to the raw `status` value. */\n  readonly label = input<string>(\"\");\n\n  /** Collapses synonym keys onto the canonical colour states. */\n  readonly normalizedStatus = computed(() => {\n    const s = this.status();\n    if (s === \"connected\") {\n      return \"active\";\n    }\n    if (s === \"error\") {\n      return \"suspended\";\n    }\n    if (s === \"not_connected\") {\n      return \"coming-soon\";\n    }\n    return s;\n  });\n}\n","<span class=\"badge\" [attr.data-status]=\"normalizedStatus()\">{{\n  label() || status()\n}}</span>\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  contentChild,\n  input,\n  output,\n  type TemplateRef,\n} from \"@angular/core\";\nimport { DatePipe, NgTemplateOutlet } from \"@angular/common\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/** Where a node's date renders relative to its label. */\nexport type FoldTimelineDatePlacement = \"above\" | \"below\" | \"inline\" | \"hidden\";\n\n/** One node of a {@link FoldTimelineComponent}. */\nexport interface FoldTimelineNode {\n  /** Stable track key. Also the click payload when {@link id} is `null`. */\n  readonly key: string;\n  /** Click payload; `null` means no id (see {@link clickable}). */\n  readonly id: string | null;\n  /**\n   * Force the node interactive (a `<button>`) or not, in either orientation.\n   * When omitted it defaults to `id !== null`. A clickable node emits `id ?? key`\n   * on click. Lets a horizontal step be clickable without a routing id, or an\n   * id-bearing node stay presentational.\n   */\n  readonly clickable?: boolean;\n  /** Primary label. */\n  readonly label: string;\n  /** Optional date, formatted with the `date` pipe (`mediumDate`). */\n  readonly date?: Date | null;\n  /** Pre-formatted date text — takes precedence over {@link date} when set. */\n  readonly displayDate?: string;\n  /** Optional dot icon. */\n  readonly icon?: FoldIconName;\n  /**\n   * Completion state (progress steppers). When set, it drives the accent\n   * (\"filled\") dot; when omitted, a non-clickable (`id === null`) node fills as\n   * an origin/anchor. So `done` and the inert-anchor rule are the same accent.\n   */\n  readonly done?: boolean;\n  /**\n   * Per-node dot style — **overrides** the timeline's {@link\n   * FoldTimelineComponent.variant}. `plain` fills the accent dot solid; `hollow`\n   * shows it as a ring (the outlined look of the vertical rail's clickable dots).\n   */\n  readonly variant?: \"plain\" | \"hollow\";\n  /**\n   * Opaque per-node metadata for a custom node template (see the projected\n   * `#node` template). The component never reads it — it's yours to branch on,\n   * e.g. `state: 'pending'` → render an \"en attente\" badge.\n   */\n  readonly state?: string;\n}\n\n/**\n * `<fold-timeline>` — a connected rail of nodes (dot + optional date + label),\n * in two orientations that share one primitive:\n *\n * - `orientation=\"vertical\"` (default) — a **navigable history**: a dot rail on\n *   the left; clickable nodes emit their id, a `null`-id node is an inert\n *   accented anchor.\n * - `orientation=\"horizontal\"` — a **progress stepper**: an optional `progress`\n *   fill line under the dots; each node's `done` drives its accent. Collapses to\n *   a vertical list on narrow viewports.\n *\n * Interactivity is per node, not per component, and works the same in both\n * orientations: a node renders as a `<button>` when it is clickable — by default\n * that means `id !== null`, but each node can force it via `clickable`. A\n * non-clickable node renders as a plain presentational element (never a disabled\n * button — so a purely-presentational timeline, e.g. a signature stepper, carries\n * no button semantics). The container is a `<nav>` landmark only when at least one\n * node is clickable; otherwise a labelled `role=\"group\"`.\n *\n * The accent (\"filled\") dot is `done ?? (id === null)`, so the inert anchor and a\n * `done` step are the same rule. Dots are round by default (`square` for\n * rounded-square), and each node's `icon` names its glyph. A node's date can be a\n * `Date` (formatted with the `date` pipe) or a pre-formatted `displayDate`, placed\n * above or below the label via `datePlacement`.\n *\n * **Surface-agnostic** — it renders content only (a labelled `<nav>` of nodes),\n * no card of its own, so the consumer places it inside whatever surface fits.\n * Presentational + generic: the consumer maps its domain data to\n * {@link FoldTimelineNode}s and owns the click meaning.\n *\n * **Custom node content** — project an `<ng-template #node let-n>` to replace a\n * node's label with arbitrary content (a badge, a status line, an action). The\n * timeline keeps ownership of the dot, date, layout and the derived progressbar;\n * the template only styles the label region. This is the escape hatch for\n * heterogeneous nodes without exploding the node interface into props.\n *\n * @selector `fold-timeline`\n *\n * @example\n * ```html\n * <fold-card surface=\"sunken\">\n *   <fold-timeline ariaLabel=\"History\" [nodes]=\"nodes()\" (nodeClick)=\"scrollTo($event)\" />\n * </fold-card>\n * <fold-timeline\n *   orientation=\"horizontal\"\n *   ariaLabel=\"Signature progress\"\n *   [progress]=\"pct()\"\n *   [nodes]=\"steps()\"\n * />\n * ```\n */\n@Component({\n  selector: \"fold-timeline\",\n  standalone: true,\n  imports: [DatePipe, NgTemplateOutlet, FoldIconComponent],\n  templateUrl: \"./timeline.component.html\",\n  styleUrl: \"./timeline.component.scss\",\n})\nexport class FoldTimelineComponent {\n  /** The ordered nodes to render. */\n  readonly nodes = input.required<readonly FoldTimelineNode[]>();\n  /** Rail direction — vertical history rail vs horizontal progress stepper. */\n  readonly orientation = input<\"vertical\" | \"horizontal\">(\"vertical\");\n  /**\n   * Progress-fill width (%) for the horizontal rail — an **override**. When\n   * `null` (default) the fill is derived from the ratio of `done` nodes, so the\n   * bar and the completed dots can never disagree. Ignored in vertical mode.\n   */\n  readonly progress = input<number | null>(null);\n  /** Accessible name for the timeline's `<nav>` landmark (screen-reader only). */\n  readonly ariaLabel = input<string>();\n  /** Tooltip (`title`) on the clickable nodes. */\n  readonly nodeTitle = input<string>(\"\");\n  /** Render the dots as rounded squares instead of circles. */\n  readonly square = input(false, { transform: booleanAttribute });\n  /** Default dot style for every node — a node's own `variant` overrides it. */\n  readonly variant = input<\"plain\" | \"hollow\">(\"plain\");\n  /**\n   * Where a node's date renders relative to its label — `above`/`below`\n   * (stacked), `inline` (on the same row), or `hidden` (not shown). Default\n   * `below`.\n   */\n  readonly datePlacement = input<FoldTimelineDatePlacement>(\"below\");\n\n  /** Emits a clicked node's `id ?? key` (never fires for non-clickable nodes). */\n  readonly nodeClick = output<string>();\n\n  /** Optional consumer template that renders a node's label region. */\n  protected readonly nodeTemplate =\n    contentChild<TemplateRef<{ $implicit: FoldTimelineNode }>>(\"node\");\n\n  /** Resolved interactivity: explicit `clickable`, else `id !== null`. */\n  protected isClickable(node: FoldTimelineNode): boolean {\n    return node.clickable ?? node.id !== null;\n  }\n\n  /** True when any node is clickable — the container is a `<nav>` only then. */\n  protected readonly interactive = computed(() =>\n    this.nodes().some((n) => this.isClickable(n)),\n  );\n\n  /** Count of completed nodes (drives the derived fill + the progressbar text). */\n  protected readonly doneCount = computed(\n    () => this.nodes().filter((n) => n.done).length,\n  );\n\n  /**\n   * Horizontal fill width (%): the explicit `progress` override when given, else\n   * derived so the fill reaches the last completed dot.\n   */\n  protected readonly fillPct = computed(() => {\n    const override = this.progress();\n    if (override !== null) {\n      return override;\n    }\n    const total = this.nodes().length;\n    const done = this.doneCount();\n    return total > 1 && done > 0 ? ((done - 1) / (total - 1)) * 100 : 0;\n  });\n\n  /** `aria-valuenow` for the progressbar — a clean integer. */\n  protected readonly fillNow = computed(() => Math.round(this.fillPct()));\n\n  /** `aria-valuetext` (\"2 / 4\") when completion is tracked via `done`. */\n  protected readonly stepText = computed(() => {\n    const done = this.doneCount();\n    return done > 0 ? `${done} / ${this.nodes().length}` : null;\n  });\n\n  /** Accent (\"filled\") dot: an explicit `done`, else the inert-anchor rule. */\n  protected isFilled(node: FoldTimelineNode): boolean {\n    return node.done ?? node.id === null;\n  }\n\n  /** Resolved dot style: the node's `variant` overrides the timeline default. */\n  protected isHollow(node: FoldTimelineNode): boolean {\n    return (node.variant ?? this.variant()) === \"hollow\";\n  }\n\n  protected onNode(node: FoldTimelineNode): void {\n    if (this.isClickable(node)) {\n      this.nodeClick.emit(node.id ?? node.key);\n    }\n  }\n}\n","<!-- Shared inner content of a node (dot + date + label). -->\n<ng-template #dot let-n>\n  <span class=\"dot\">\n    @if (n.icon; as ic) {\n      <fold-icon [name]=\"ic\" [size]=\"11\" />\n    }\n  </span>\n  <span class=\"txt\">\n    @if (datePlacement() !== \"hidden\") {\n      @if (n.displayDate; as dd) {\n        <span class=\"date\">{{ dd }}</span>\n      } @else if (n.date; as d) {\n        <span class=\"date\">{{ d | date: \"mediumDate\" }}</span>\n      }\n    }\n    @if (nodeTemplate(); as tpl) {\n      <ng-container\n        [ngTemplateOutlet]=\"tpl\"\n        [ngTemplateOutletContext]=\"{ $implicit: n }\"\n      />\n    } @else {\n      <span class=\"nlabel\">{{ n.label }}</span>\n    }\n  </span>\n</ng-template>\n\n<!-- The progress rail + the nodes — reused in both containers. -->\n<ng-template #body>\n  @if (orientation() === \"horizontal\") {\n    <span\n      class=\"rail\"\n      role=\"progressbar\"\n      aria-valuemin=\"0\"\n      aria-valuemax=\"100\"\n      [attr.aria-valuenow]=\"fillNow()\"\n      [attr.aria-valuetext]=\"stepText()\"\n      [attr.aria-label]=\"ariaLabel()\"\n    >\n      <span class=\"rail-fill\" [style.width.%]=\"fillPct()\"></span>\n    </span>\n  }\n  @for (n of nodes(); track n.key) {\n    @if (isClickable(n)) {\n      <button\n        type=\"button\"\n        class=\"node\"\n        [class.filled]=\"isFilled(n)\"\n        [class.hollow]=\"isHollow(n)\"\n        [title]=\"nodeTitle()\"\n        (click)=\"onNode(n)\"\n      >\n        <ng-container\n          [ngTemplateOutlet]=\"dot\"\n          [ngTemplateOutletContext]=\"{ $implicit: n }\"\n        />\n      </button>\n    } @else {\n      <div\n        class=\"node inert\"\n        [class.filled]=\"isFilled(n)\"\n        [class.hollow]=\"isHollow(n)\"\n      >\n        <ng-container\n          [ngTemplateOutlet]=\"dot\"\n          [ngTemplateOutletContext]=\"{ $implicit: n }\"\n        />\n      </div>\n    }\n  }\n</ng-template>\n\n@if (interactive()) {\n  <nav\n    class=\"tlv\"\n    [class.h]=\"orientation() === 'horizontal'\"\n    [class.square]=\"square()\"\n    [class.date-above]=\"datePlacement() === 'above'\"\n    [class.date-inline]=\"datePlacement() === 'inline'\"\n    [attr.aria-label]=\"ariaLabel()\"\n  >\n    <ng-container [ngTemplateOutlet]=\"body\" />\n  </nav>\n} @else {\n  <div\n    class=\"tlv\"\n    role=\"group\"\n    [class.h]=\"orientation() === 'horizontal'\"\n    [class.square]=\"square()\"\n    [class.date-above]=\"datePlacement() === 'above'\"\n    [class.date-inline]=\"datePlacement() === 'inline'\"\n    [attr.aria-label]=\"ariaLabel()\"\n  >\n    <ng-container [ngTemplateOutlet]=\"body\" />\n  </div>\n}\n","import { Component, computed, inject, input } from \"@angular/core\";\nimport { FOLD_COMMON_LABELS } from \"../../forms/common-labels\";\nimport { FoldSpinnerComponent } from \"../../foundations/spinner/spinner.component\";\nimport type { FoldSpinnerSize } from \"../../foundations/spinner/spinner.component\";\n\n/**\n * `<fold-loading>` — a centered loading placeholder: a spinner over a muted\n * message. The host is a `role=\"status\"` / `aria-live=\"polite\"` region, so the\n * message is announced to assistive tech; the spinner is decorative. Drop it\n * anywhere a section is waiting on data — it stretches to fill (`flex: 1`).\n *\n * @selector `fold-loading`\n *\n * @example\n * ```html\n * <fold-loading />\n * <fold-loading message=\"Loading company…\" />\n * <fold-loading size=\"lg\" message=\"Crunching numbers…\" />\n * ```\n */\n@Component({\n  selector: \"fold-loading\",\n  standalone: true,\n  imports: [FoldSpinnerComponent],\n  templateUrl: \"./loading-state.component.html\",\n  // Inline + tokens only, so the component is fully self-contained.\n  styleUrl: \"./loading-state.component.scss\",\n  host: {\n    role: \"status\",\n    \"aria-live\": \"polite\",\n  },\n})\nexport class FoldLoadingStateComponent {\n  /** Text to display. Defaults to \"Loading...\". */\n  readonly message = input<string | undefined>();\n\n  /** Spinner size — an icon-size token (`xs…xl`, default `md`) or a pixel number. */\n  readonly size = input<FoldSpinnerSize>(\"md\");\n\n  private readonly common = inject(FOLD_COMMON_LABELS);\n\n  /** English default ← app-wide provider ← this instance's own input. */\n  protected readonly text = computed(\n    () => this.message() ?? this.common.loading,\n  );\n}\n","<div class=\"loading\">\n  <fold-spinner [size]=\"size()\" aria-hidden=\"true\" />\n  @if (text(); as message) {\n    <span>{{ message }}</span>\n  }\n</div>\n","import { Component, input } from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconSize } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/**\n * `<fold-empty-state>` — centered empty state with an optional icon, a title, an\n * optional subtitle and an optional action.\n *\n * The glyph comes from `icon` — a registered icon name, the common case:\n *\n * ```html\n * <fold-empty-state icon=\"inbox\" title=\"Nothing here\" />\n * ```\n *\n * Content projection carries a custom illustration and the action:\n * - `[empty-icon]` — projected above the title, for art the registry can't hold\n *   (a bespoke SVG, an image). It **wins** over `icon` when both are given.\n * - default `ng-content` — projected below the subtitle (typically a button)\n *\n * `tone=\"alert\"` turns it into an error state (red title + icon); the default\n * `neutral` tone is the plain empty state.\n *\n * @selector `fold-empty-state`\n *\n * @example\n * ```html\n * <fold-empty-state\n *   title=\"No company yet\"\n *   subtitle=\"Create your company space to manage artists, teams and contracts.\"\n * >\n *   <svg empty-icon width=\"40\" height=\"40\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n *     <path d=\"M19,3H5C3.346…\" />\n *   </svg>\n *   <button foldButton (click)=\"create()\">+ Create</button>\n * </fold-empty-state>\n *\n * <fold-empty-state tone=\"alert\" title=\"Failed to load\" />\n * ```\n */\n@Component({\n  selector: \"fold-empty-state\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  // `[attr.title]: null` strips the native attribute a static `title=\"…\"`\n  // leaves behind, so the heading input never doubles as a browser tooltip.\n  host: { \"[class.alert]\": \"tone() === 'alert'\", \"[attr.title]\": \"null\" },\n  templateUrl: \"./empty-state.component.html\",\n  styleUrl: \"./empty-state.component.scss\",\n})\nexport class FoldEmptyStateComponent {\n  /** The bold primary line. */\n  readonly title = input.required<string>();\n  /** Optional muted secondary line. */\n  readonly subtitle = input(\"\");\n  /**\n   * The glyph above the title, by registered name — the common case, so the\n   * caller doesn't have to know a slot exists.\n   *\n   * A **projected** `[empty-icon]` wins: the slot stays the way to supply art\n   * the registry can't hold (rule 4.7's illustration exception).\n   */\n  readonly icon = input<FoldIconName>();\n\n  /** Size of the `icon` glyph. Projected art sizes itself. @default 'xl' */\n  readonly iconSize = input<FoldIconSize>(\"xl\");\n\n  /** `alert` renders an error state (red title + icon); `neutral` is default. */\n  readonly tone = input<\"neutral\" | \"alert\">(\"neutral\");\n}\n","<div class=\"empty\">\n  <div class=\"empty-icon\">\n    <ng-content select=\"[empty-icon]\" />\n    <!-- Precedence is decided in CSS (`:has`), not by DOM order: sitting side\n         by side here, both would simply render. -->\n    @if (icon(); as name) {\n      <fold-icon [name]=\"name\" [size]=\"iconSize()\" />\n    }\n  </div>\n  <p class=\"empty-title\">{{ title() }}</p>\n  @if (subtitle()) {\n    <p class=\"empty-sub\">{{ subtitle() }}</p>\n  }\n  <div class=\"empty-action\">\n    <ng-content />\n  </div>\n</div>\n","import { booleanAttribute, Component, computed, input } from \"@angular/core\";\n\n/** Which rail(s) sit on the band ground. A side, never a bare boolean: a band\n *  has a side, and `band` alone would not say which. */\nexport type FoldAsideBand = \"none\" | \"left\" | \"right\" | \"both\";\n\n/**\n * `<fold-aside-layout>` — a centered, self-scrolling content column flanked by\n * up to two sticky side rails. The detail-page archetype: a stack of\n * `fold-page-section`s in the middle, sticky asides beside it, collapsing to a\n * single column on narrow viewports.\n *\n * Content goes in three slots; the grid adapts to whichever rails are filled\n * (via `:has()`), so an omitted rail simply drops its column (reactively, even\n * if the rail appears/disappears at runtime):\n * - default slot — the centre content column (the scroll-length driver): every\n *   element that isn't tagged as a rail. Its blocks are stacked for you.\n * - `[asideLeft]` — optional left rail (e.g. a timeline); its presence turns on\n *   the third column. Tag each element that belongs in it.\n * - `[asideRight]` — the right rail (history, actions…). Tag each element.\n *\n * Rail content is tagged per-element (not wrapped in one node) so the layout\n * stacks it directly — that's what lets it style the projected blocks without\n * reaching through view encapsulation.\n *\n * Scroll-agnostic: the asides stick relative to the page's own scroll\n * container (its ancestor), so a page keeps whatever scroll it already owns —\n * the layout just drops the grid + `position: sticky` + responsive boilerplate\n * every detail page was hand-rolling. It inlines the same sticky flow as\n * `foldStickyColumn` (top anchor) because it owns its columns, and pairs with a\n * `fold-page-section` stack in the centre.\n *\n * Inputs are kept minimal: optional a11y labels ({@link asideLeftLabel} /\n * {@link asideRightLabel}) — set one and that rail becomes a labelled\n * `complementary` landmark, leave it unset and the rail is a plain container\n * (no anonymous landmark noise) — plus {@link topOffset}, a convenience over the\n * sticky-offset var. Everything else is CSS custom properties on the host. Each\n * of the three tracks is a var: `--fold-aside-layout-rail-width`\n * (220px) · `--fold-aside-layout-center-width` (`minmax(0, 1fr)`) ·\n * `--fold-aside-layout-side-width` (300px). Rails default to a fixed width and\n * the centre flexes; set all three to `minmax(0, 1fr)` for **equal columns**.\n * Also `--fold-aside-layout-gap` (28px) · `--fold-aside-layout-max` (1240px) ·\n * `--fold-aside-layout-top` (24px, the sticky offset — override per rail with\n * `--fold-aside-layout-left-top` / `--fold-aside-layout-right-top`) ·\n * `--fold-aside-layout-rail-max` (the cap above which a taller-than-viewport rail\n * scrolls internally instead of being clipped by `sticky`). The page still owns\n * the scroll container the asides stick within.\n *\n * ```scss\n * // three equal columns\n * fold-aside-layout {\n *   --fold-aside-layout-rail-width: minmax(0, 1fr);\n *   --fold-aside-layout-center-width: minmax(0, 1fr);\n *   --fold-aside-layout-side-width: minmax(0, 1fr);\n * }\n * ```\n *\n * @selector `fold-aside-layout`\n *\n * @example\n * ```html\n * <fold-aside-layout>\n *   <app-timeline asideLeft />\n *\n *   <app-header />\n *   <fold-page-section title=\"…\">…</fold-page-section>\n *\n *   <app-history asideRight />\n *   <app-actions asideRight />\n * </fold-aside-layout>\n * ```\n */\n@Component({\n  selector: \"fold-aside-layout\",\n  standalone: true,\n  templateUrl: \"./aside-layout.component.html\",\n  styleUrl: \"./aside-layout.component.scss\",\n  host: {\n    \"[style.--fold-aside-layout-top]\": \"topOffsetCss()\",\n    \"[class.stack-left-first]\": \"stackLeftFirst()\",\n    \"[attr.data-band]\": \"band() === 'none' ? null : band()\",\n    \"[class.is-bleed]\": \"bleed()\",\n  },\n})\nexport class FoldAsideLayoutComponent {\n  /**\n   * When the layout collapses to one column, place the left rail **above** the\n   * centre instead of below it. Use it when the rail is navigation (a tab-nav),\n   * so the menu still precedes the content it drives; leave it off for a\n   * companion rail (a timeline, history) where the content should come first.\n   */\n  readonly stackLeftFirst = input(false, { transform: booleanAttribute });\n\n  /**\n   * Which rail(s) sit on the **band** ground — `--fold-color-surface-band`, one\n   * step away from the page in whichever direction the theme's polarity\n   * dictates. It is the same role, and the same gesture, as `fold-card`'s\n   * `raisedBands` and `fold-page-layout`'s `headerBand`.\n   *\n   * A banded rail **closes the column gutter** and separates with a hairline\n   * instead. That is not decoration: a ground held 28px away from the content\n   * it accompanies does not read as a band, it reads as a floating card. The\n   * reading space moves inside — the rail pays its own padding\n   * (`--fold-aside-layout-band-pad`), and the centre pays the matching inset on\n   * that side — so switching the band on does not change how wide the content\n   * reads.\n   *\n   * Once the layout collapses to one column there are no columns to separate,\n   * so the band keeps only its ground and its padding.\n   */\n  readonly band = input<FoldAsideBand>(\"none\");\n\n  /**\n   * Break out of the page gutter to span the layout edge-to-edge — it cancels\n   * `--fold-page-gutter-effective`, the gutter a `fold-page-layout` actually\n   * pays, so it stays flush at every breakpoint (including below 640px, where\n   * the page halves its inset). Only meaningful inside a `fold-page-layout`.\n   *\n   * Reach for it when the rails carry a `band`: a banded rail held off the page\n   * edge by a gutter is the floating card the band exists to replace. Set\n   * `--fold-aside-layout-pad: 0` with it, or the layout pays an inset of its\n   * own on top of the one you just cancelled.\n   */\n  readonly bleed = input(false, { transform: booleanAttribute });\n  /**\n   * Accessible label for the left rail. Set it and the rail is exposed as a\n   * labelled `complementary` landmark; leave it unset and the rail is a plain\n   * container (no landmark), so screen readers aren't given an anonymous region.\n   */\n  readonly asideLeftLabel = input<string>();\n  /** Accessible label for the right rail — same rule as {@link asideLeftLabel}. */\n  readonly asideRightLabel = input<string>();\n\n  /**\n   * The rails' sticky offset — a number (px) or any CSS length. A convenience\n   * over the `--fold-aside-layout-top` var (which it sets); leave it unset to keep\n   * the 24px default or a per-rail `--fold-aside-layout-left-top` /\n   * `-right-top` override.\n   *\n   * It's the gap the rail keeps from the top **once it sticks** (i.e. after you\n   * scroll). At rest the rail already lines up with the centre via the shared\n   * grid padding, and `sticky` only ever pushes down, never up — so an offset\n   * *below* the grid's top padding has no visible effect until you scroll (a\n   * value like `0`–`20` looks inert on a page padded by 28px). Raise the offset\n   * past the padding to push the resting rail down; to pull it up, shrink\n   * `--fold-aside-layout-pad` instead.\n   */\n  readonly topOffset = input<number | string>();\n\n  /** The offset as a CSS length, or `null` to leave the var untouched. */\n  protected readonly topOffsetCss = computed(() => {\n    const o = this.topOffset();\n    if (o === undefined) {\n      return null;\n    }\n    return typeof o === \"number\" ? `${o}px` : o;\n  });\n}\n","<div class=\"al-grid\">\n  <div\n    class=\"al-aside al-aside-left\"\n    [attr.role]=\"asideLeftLabel() ? 'complementary' : null\"\n    [attr.aria-label]=\"asideLeftLabel() || null\"\n  >\n    <ng-content select=\"[asideLeft]\" />\n  </div>\n  <div class=\"al-center\"><ng-content /></div>\n  <div\n    class=\"al-aside al-aside-right\"\n    [attr.role]=\"asideRightLabel() ? 'complementary' : null\"\n    [attr.aria-label]=\"asideRightLabel() || null\"\n  >\n    <ng-content select=\"[asideRight]\" />\n  </div>\n</div>\n","/**\n * The width thresholds the nav family shares, in px.\n *\n * One number, one place. They were three literals in three files with nothing\n * coordinating them — the rail folded on 720 (container), the table switched to\n * cards on 700 (viewport), and the nav gap tightened on 640 (viewport) — so the\n * fold and the spacing could flip independently of each other.\n *\n * All of these are measured on a component's OWN box (`observeElementWidth`),\n * never on the window: `_tab-bar.scss` states the principle — \"container width\n * is the only axis\" — and this is where it is kept.\n */\n\n/**\n * Below this, a nav column has no room for page rhythm: the gap between a bar\n * and the content it introduces tightens so the two read as one block.\n */\nexport const FOLD_NARROW = 640;\n","import {\n  InjectionToken,\n  type Signal,\n  type WritableSignal,\n} from \"@angular/core\";\n\n/**\n * The slice of a {@link FoldNavLayoutComponent} that a projected bar reads to\n * follow the layout — exposed through DI so a `fold-view-nav` / `fold-tabs` with\n * `direction=\"auto\"` orients itself without the consumer wiring `tl.stacked()`.\n */\nexport interface FoldNavLayoutContext {\n  /**\n   * True when the layout currently stacks the bar **above** the content (a `top`\n   * placement, or a `side` rail that has folded) — i.e. the bar should be\n   * horizontal. False when it sits as a vertical rail beside the content.\n   */\n  readonly stacked: Signal<boolean>;\n\n  /**\n   * Written by the projected bar, read by the layout: true while the bar shows\n   * icons only.\n   *\n   * The context used to run ONE way — the bar knew everything about the layout\n   * and the layout nothing about the bar — so `collapsed` (the bar's prop) and\n   * the rail width (the layout's) had no way to meet. `fold-view-nav`'s own\n   * JSDoc said to \"narrow the layout's `--fold-nav-layout-rail-width` to\n   * match\", by hand, at every call site. A system does not delegate that.\n   */\n  readonly barCollapsed: WritableSignal<boolean>;\n}\n\n/** DI handle for the nearest {@link FoldNavLayoutComponent}, if any. */\nexport const FOLD_NAV_LAYOUT = new InjectionToken<FoldNavLayoutContext>(\n  \"FOLD_NAV_LAYOUT\",\n);\n","import {\n  computed,\n  Component,\n  input,\n  numberAttribute,\n  signal,\n} from \"@angular/core\";\nimport { observeElementWidth } from \"../../../dom/observe-element-width\";\nimport { foldAt } from \"../../../dom/fold-at\";\nimport { FOLD_NARROW } from \"../breakpoints\";\nimport {\n  FOLD_NAV_LAYOUT,\n  type FoldNavLayoutContext,\n} from \"./nav-layout.context\";\n\n/**\n * `<fold-nav-layout>` — pairs a tab bar with the content it drives, and owns the\n * one thing every tabbed page hand-rolls: where the nav sits.\n *\n * - `placement=\"top\"` (default) — the nav above the content.\n * - `placement=\"side\"` — the nav as a rail beside the content, folding back on\n *   top when the layout gets narrower than {@link foldAt} (so the menu always\n *   precedes the content it drives, never below it).\n *\n * Content projection — the bar stays yours (tabs, active key, events):\n * - `[tabNav]` → the bar. Project a {@link FoldViewNavComponent} if the tabs\n *   **navigate** (route between views) or a {@link FoldTabsComponent} if they\n *   **switch panels in place** — this layout is agnostic, it only places the bar.\n * - default slot → the content (routed views, or the tabs' `fold-tab-panel`s).\n *\n * **A11y lives in the bar, not here.** `fold-view-nav` brings `<nav>` +\n * `aria-current`; `fold-tabs` brings the full `role=\"tablist\"` widget with its\n * `fold-tab-panel`s. This component adds no tab semantics — it only decides where\n * the bar sits and folds it responsively.\n *\n * A side rail needs a *vertical* bar, a folded one a *horizontal* bar. The\n * projected bar handles that itself with `direction=\"auto\"` (its default) — it\n * reads this layout through DI ({@link FoldNavLayoutContext}), no wiring:\n *\n * ```html\n * <fold-nav-layout placement=\"side\">\n *   <fold-view-nav tabNav [items]=\"items\" />\n *   <router-outlet />\n * </fold-nav-layout>\n * ```\n *\n * The layout also exposes {@link stacked} via `exportAs` for consumers that want\n * to read the folded state themselves.\n *\n * **Two roles — same component, composed differently.**\n * - **Page scaffold** — the tab rail *is* the page's primary structure: use it\n *   directly (usually `placement=\"side\"`), the folded bar leading the content.\n * - **Tabbed section** — a tabbed block *inside* a page, among other sections.\n *   Don't reach for a new mode — wrap it in a {@link FoldPageSectionComponent}.\n *   The section owns the title, the `<section>` + heading semantics, the vertical\n *   rhythm and the optional `bleed`; tab-layout stays pure placement. It paints\n *   nothing (no card), so it sits **flat** — add `bleed` on the section for an\n *   edge-to-edge band. The rail folds on the **section's** width (it measures\n *   itself), not the viewport, so nested tabs collapse on their own.\n *\n * ```html\n * <!-- a tabbed section: flat structure (page-section) + tab placement -->\n * <fold-page-section title=\"Settings\" bleed>\n *   <fold-nav-layout placement=\"side\">\n *     <fold-view-nav tabNav [items]=\"items\" />\n *     <app-settings-panel />\n *   </fold-nav-layout>\n * </fold-page-section>\n * ```\n *\n * Sizing is CSS custom properties: `--fold-nav-layout-gap` (16px) and\n * `--fold-nav-layout-rail-width` — the side-rail track, defaulting to the shared\n * `--fold-rail-tertiary` (200px). That's the **tertiary** step of the rail\n * hierarchy — the same level the `--fold-color-bg-rail-tertiary` colour names\n * (app menu → workspace → in-page nav) — so every rail in the app stays on one\n * scale. Override the local var per instance.\n *\n * @selector `fold-nav-layout`\n */\n@Component({\n  selector: \"fold-nav-layout\",\n  standalone: true,\n  exportAs: \"foldNavLayout\",\n  host: {\n    \"[class.is-row]\": \"!stacked()\",\n    \"[class.bar-collapsed]\": \"barCollapsed()\",\n    \"[class.is-narrow]\": \"narrow()\",\n  },\n  providers: [\n    { provide: FOLD_NAV_LAYOUT, useExisting: FoldNavLayoutComponent },\n  ],\n  templateUrl: \"./nav-layout.component.html\",\n  styleUrl: \"./nav-layout.component.scss\",\n})\nexport class FoldNavLayoutComponent implements FoldNavLayoutContext {\n  /** Where the nav sits: above the content, or as a rail beside it. */\n  readonly placement = input<\"top\" | \"side\">(\"top\");\n  /** Width (px) at or below which a `side` nav folds back on top. */\n  readonly foldAt = input(720, { transform: numberAttribute });\n\n  /** The layout's own width, kept live by the shared `ResizeObserver` primitive. */\n  private readonly width = observeElementWidth();\n\n  /** Whether a `side` rail has folded. Hysteretic — see `foldAt`. */\n  private readonly folded = foldAt(this.width, this.foldAt);\n\n  /**\n   * Whether the nav currently sits **above** the content — always true for\n   * `top`, and true for `side` once the layout has folded.\n   * Bind a projected bar's `direction` to it.\n   */\n  readonly stacked = computed(\n    () => this.placement() === \"top\" || this.folded(),\n  );\n\n  /**\n   * Set by the projected bar (see {@link FoldNavLayoutContext.barCollapsed}).\n   * A collapsed bar is icon-only, so its rail hugs its icons instead of holding\n   * a 200px track with ~166px of nothing in it.\n   */\n  readonly barCollapsed = signal(false);\n\n  /**\n   * Narrow enough that the gap to the content should tighten.\n   *\n   * Measured on the layout's OWN box, not the viewport. The gap used to sit\n   * behind `@media (max-width: 640px)` while the fold sat behind a container\n   * width, so the two could disagree: a narrow layout on a wide screen kept a\n   * 16px gap while folded, and a wide layout on a phone got 4px.\n   */\n  readonly narrow = computed(\n    () => this.width() > 0 && this.width() <= FOLD_NARROW,\n  );\n}\n","<div class=\"tl-nav\"><ng-content select=\"[tabNav]\" /></div>\n<div class=\"tl-body\"><ng-content /></div>\n","import {\n  booleanAttribute,\n  Component,\n  contentChild,\n  Directive,\n  input,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/**\n * Marks a custom page title projected into {@link FoldPageLayoutComponent} — put\n * it on inline heading content when the plain `icon` + `title` inputs aren't\n * enough (an avatar, a two-tone title, a live status). It renders inside the\n * page's `<h1>`, so keep it inline and text-like. Its presence switches the\n * header on in place of the input-driven title.\n *\n * @example\n * ```html\n * <fold-page-layout>\n *   <span pageTitle><fold-avatar … /> Acme Records</span>\n * </fold-page-layout>\n * ```\n */\n@Directive({ selector: \"[pageTitle]\", standalone: true })\nexport class FoldPageTitleDirective {}\n\n/**\n * `<fold-page-layout>` — the vertical scaffold for a settings/admin-style page:\n * an optional `icon` + `title` header with a description slot, an optional\n * top-right actions slot, and a body that stacks its children with a consistent\n * rhythm. Pair it with {@link FoldPageSectionComponent} for grouped sub-sections.\n *\n * **It owns the page gutter, not the width.** The `fold-app-shell` content region\n * is full-bleed (so a page can paint edge-to-edge); this component supplies the\n * themed margins via its own padding, and otherwise **fills whatever width it is\n * given**. It does *not* cap the column — narrowing a block to a readable measure\n * is the content's job (wrap that block in your own max-width container), never\n * the page scaffold's. The *horizontal* gutter is a single token,\n * `--fold-page-gutter` (fluid default `clamp(1rem, 4vw, 2rem)` — 16→32px) —\n * retune it per page/theme, or set it to `0` for a bleeding dashboard. A\n * {@link FoldPageSectionComponent} with `bleed` cancels exactly that token to\n * span the page edge-to-edge (a full-width band amid padded content), so the two\n * never desync — including on the fluid gutter. The *vertical* rhythm between\n * stacked elements is its own token, `--fold-page-gap` (fluid default\n * `clamp(1.25rem, 3vw, 2rem)` — 20→32px, a gentler curve than the gutter),\n * retunable the same way.\n *\n * Content projection:\n * - default slot → the page body (sections, cards, banners…).\n * - `[pageEyebrow]` → the row **above** the title: a {@link FoldBreadcrumbComponent}\n *   trail, a {@link FoldBackLinkComponent}, a kicker label. It is the one header\n *   row the layout does not restyle — a trail and a kicker share no typography,\n *   so what you project keeps its own face. A breadcrumb placed here should name\n *   the **ancestors only** (`[currentPage]=\"false\"`): the page's own `<h1>` is\n *   the current page, and repeating it in the trail is noise. Projecting an\n *   eyebrow alone does **not** switch the header on — an eyebrow without a title\n *   is a label with nothing to label.\n * - `[pageTitle]` ({@link FoldPageTitleDirective}) → a custom title, rendered\n *   inside the `<h1>` in place of the `icon` + `title` inputs, for when a plain\n *   string won't do (an avatar, a two-tone title). Its presence alone switches\n *   the header on.\n * - `[titleBadge]` → an inline pill beside the title (e.g. a status/kind badge).\n * - `[pageSubtitle]` → the line **directly under the title**, set tight against\n *   it: the page's identifying FACTS (a reference, a category, a count), not\n *   prose. It is a different register from `[description]` and that is the whole\n *   reason it exists — a facts line pushed into the description slot reads with\n *   a paragraph's spacing, which is a paragraph's promise. Both can appear: the\n *   facts sit tight, the prose gets its own room below.\n * - `p[description]` → the intro under the title. A **slot**, not a string\n *   input: a description that needs a `<code>`, a link or a second sentence is\n *   the common case, not the exception. It must be a `<p description>` — the\n *   selector is tag-qualified on purpose, so a body child that carries its own\n *   `description` input (e.g. `<fold-page-section description=\"…\">`) is not\n *   swallowed into the header. The layout styles what you project (muted, small,\n *   full column width) so the markup stays yours. Project nothing and the header\n *   is just the title. Cap the line with `--fold-page-desc-measure` on a fluid page.\n * - `[pageActions]` → the top-right header slot (e.g. an export button).\n *\n * ```html\n * <fold-page-layout icon=\"grid\" title=\"Facturation\">\n *   <p description>Abonnement de l'entreprise et gestion des paiements.</p>\n *   <button pageActions>Exporter</button>\n *   <fold-page-section title=\"Moyens de paiement\">…</fold-page-section>\n * </fold-page-layout>\n * ```\n *\n * ## Who owns the scroll\n * The `scroll` input decides whether the page is its own scroll box:\n * - **`flow` (default)** — the page owns **no** scroll; it flows inside its\n *   host's scroll region (typically the `fold-app-shell` content, which owns the\n *   scroll). This is the \"never manage scroll again\" default — the page just\n *   grows and the shell scrolls, so a shell footer at the end of the content is\n *   always reachable and there is never a page-inside-shell double scrollbar.\n * - **`own`** — the page is its own scroll box (the legacy behaviour):\n *   `overflow-y: auto` + `overscroll-behavior: contain`, filling the height its\n *   frame gives it. Reach for it only when the page must scroll as a self-\n *   contained unit — dropped into a `stage` shell (whose content region does not\n *   scroll) or a bare fixed-height container. See the shell's `scroll` knob and\n *   `docs/scroll.md`.\n *\n * @selector `fold-page-layout`\n */\n@Component({\n  selector: \"fold-page-layout\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  // `title` is a heading input — strip the native attribute a static\n  // `title=\"…\"` leaves behind, so it never doubles as a browser tooltip.\n  host: {\n    \"[attr.title]\": \"null\",\n    \"[attr.data-scroll]\": \"scroll()\",\n    \"[attr.data-separator]\": \"separator() ? '' : null\",\n    \"[attr.data-header-band]\": \"headerBand() ? '' : null\",\n    \"[attr.data-header-bleed]\": \"headerBleed() ? '' : null\",\n  },\n  templateUrl: \"./page-layout.component.html\",\n  styleUrl: \"./page-layout.component.scss\",\n})\nexport class FoldPageLayoutComponent {\n  /** The page heading (`<h1>`). Omit for a header-less page — or when the page\n   *  already carries its `<h1>` elsewhere (e.g. a leading `fold-hero-section`),\n   *  so a page never ends up with two top-level headings. */\n  readonly title = input<string>();\n  /** An optional leading icon shown beside the title. */\n  readonly icon = input<FoldIconName>();\n\n  /**\n   * Draw a hairline rule under the header, closing it off from the body.\n   *\n   * Off by default: on a page whose body is a stack of cards, the header is\n   * already separated by the page rhythm and a rule would just add ink. Turn it\n   * on when the body runs flush against the header — a form, a table, sections\n   * with no surface of their own — and the header would otherwise read as the\n   * first row of the content.\n   */\n  readonly separator = input(false, { transform: booleanAttribute });\n\n  /**\n   * Break the header out of the page gutter so it spans the layout\n   * edge-to-edge. It cancels `--fold-page-gutter-effective` — the gutter the\n   * page actually pays — and pays it back as inner padding, so the text column\n   * does not move.\n   *\n   * **Orthogonal to `headerBand`**, and that is the point: the reach and the\n   * ground are two decisions. A full-width rule under the header (with\n   * `separator`) is a common, quiet treatment that has nothing to do with\n   * painting a band; requiring the band to get the reach forced ink on a page\n   * that only wanted a line.\n   */\n  readonly headerBleed = input(false, { transform: booleanAttribute });\n\n  /**\n   * Paint the header on the **band** ground — `--fold-color-surface-band`, one\n   * step away from the page in whichever direction the theme's polarity\n   * dictates (darker on a light theme, lighter on a dark one).\n   *\n   * This is an **elevation**, not a surface. `foldSurface` re-points *ink* and\n   * never paints a ground (see `docs/surfaces.md`), and `chrome` / `accent` are\n   * identities — \"the header is furniture, not content\" is neither. It is the\n   * same gesture `fold-card` makes with `raisedBands`, and it names the same\n   * role, so a header band and a card's header band always agree.\n   *\n   * It flushes to the page's **top** edge on its own — a ground that starts\n   * below the page padding reads as a floating strip rather than as the page's\n   * head. For its horizontal reach, add `headerBleed`; for a closing hairline,\n   * `separator`. Three attributes, three decisions.\n   */\n  readonly headerBand = input(false, { transform: booleanAttribute });\n\n  /**\n   * Who owns the page's scroll:\n   * - `\"flow\"` (default) — the page flows inside its host's scroll (the shell\n   *   owns the scroll); the page has no scroll box of its own.\n   * - `\"own\"` — the page is its own scroll box (`overflow-y: auto`), for a page\n   *   dropped into a non-scrolling `stage` shell or a bare fixed-height frame.\n   */\n  readonly scroll = input<\"flow\" | \"own\">(\"flow\");\n\n  /** A projected `[pageTitle]`, if any — switches the header on for a custom\n   *  title even without the `title` input. */\n  protected readonly customTitle = contentChild(FoldPageTitleDirective);\n}\n","@if (title() || customTitle()) {\n  <header class=\"page-head\">\n    <!-- The eyebrow sits ABOVE the whole row, not inside the text column: the\n         actions align on the TITLE's line, and a breadcrumb over the title must\n         not drag them up with it. -->\n    <div class=\"page-eyebrow\"><ng-content select=\"[pageEyebrow]\" /></div>\n    <div class=\"page-head-row\">\n      <div class=\"page-head-text\">\n        <h1 class=\"page-title\">\n          @if (title(); as t) {\n            @if (icon(); as ic) {\n              <fold-icon class=\"page-icon\" [name]=\"ic\" [size]=\"22\" />\n            }\n            <span>{{ t }}</span>\n          }\n          <ng-content select=\"[pageTitle]\" />\n          <span class=\"page-title-badge\"\n            ><ng-content select=\"[titleBadge]\"\n          /></span>\n        </h1>\n        <div class=\"page-subtitle\"><ng-content select=\"[pageSubtitle]\" /></div>\n        <div class=\"page-desc\"><ng-content select=\"p[description]\" /></div>\n      </div>\n      <div class=\"page-actions\"><ng-content select=\"[pageActions]\" /></div>\n    </div>\n  </header>\n}\n<div class=\"page-body\"><ng-content /></div>\n","import {\n  booleanAttribute,\n  Component,\n  inject,\n  input,\n  model,\n} from \"@angular/core\";\nimport {\n  FoldIconComponent,\n  type FoldIconTone,\n} from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\n\n/** The register a {@link FoldPageSectionComponent} title wears. A skin over the\n *  same `h2`, never a change of heading semantics. */\nexport type FoldSectionTitleVariant = \"eyebrow\" | \"heading\";\n\n/**\n * `<fold-page-section>` — a titled, semantic **`<section>`** grouping of page\n * content inside a {@link FoldPageLayoutComponent}: a `title` + optional\n * `description`, a right-aligned actions slot, and the content below.\n *\n * **It is structure, not a box.** The `title` renders a real **`<h2>`** (a\n * genuine section heading under the page's `<h1>`, not a decorative eyebrow) and\n * the region is a `<section>` named by it (`aria-labelledby`) — so a page reads\n * as an outline to assistive tech. Set `headingLevel` to correct the `aria-level`\n * where a section nests deeper. It paints nothing: transparent, no border, no\n * radius. For a **visual box**, wrap the content in a {@link FoldCardComponent} —\n * the two are orthogonal and compose (a section can hold a card; a card never\n * needs to know about the page).\n *\n * Content projection:\n * - default slot → the section content.\n * - `[sectionActions]` → the right-aligned header slot, beside the `title`.\n * - `[sectionHeader]` → a **bespoke** header, used *instead of* `title` when the\n *   default `<h2>` isn't enough (e.g. project a {@link FoldElementTitleComponent}\n *   with an icon tile + subtitle). The projected header owns its own heading\n *   semantics.\n *\n * The section's vertical rhythm — the head↔body gap, and the `stack` body's\n * item gap — is a single token, `--fold-page-section-gap` (default the `lg`\n * space); retune it per section or theme.\n *\n * Two orthogonal helpers, both independent of the title:\n * - `stack` — lay the body out as an evenly-spaced vertical stack (form fields).\n * - `bleed` — break the section out of the page gutter to span the layout\n *   edge-to-edge (a full-width band amid padded sections). It cancels exactly\n *   `--fold-page-gutter` — the same token {@link FoldPageLayoutComponent} pads\n *   with — so it stays flush at every breakpoint and never overflows. As the\n *   **first** band it also swallows the page's top padding (a hero flush to the\n *   top); as the **last**, the bottom padding (a footer band). A band in the\n *   middle keeps the vertical rhythm. Only meaningful inside an `fold-page-layout`.\n *\n * ```html\n * <fold-page-section title=\"Moyens de paiement\" description=\"Le moyen par défaut…\">\n *   <button sectionActions>Ajouter</button>\n *   …\n * </fold-page-section>\n *\n * <!-- bespoke header instead of the default h2 -->\n * <fold-page-section>\n *   <fold-element-title sectionHeader variant=\"title\" icon=\"company\" title=\"Contexte\" />\n *   …\n * </fold-page-section>\n *\n * <!-- need a box? compose with fold-card -->\n * <fold-page-section title=\"Documents\">\n *   <fold-card surface=\"sunken\">…</fold-card>\n * </fold-page-section>\n * ```\n *\n * @selector `fold-page-section`\n */\n@Component({\n  selector: \"fold-page-section\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  host: {\n    \"[class.stack]\": \"stack()\",\n    \"[class.is-bleed]\": \"bleed()\",\n    \"[attr.data-title-variant]\": \"titleVariant()\",\n    \"[attr.data-separator]\": \"separator() ? '' : null\",\n    \"[attr.data-collapsible]\": \"collapsible() ? '' : null\",\n    \"[attr.data-open]\": \"collapsible() && !open() ? null : ''\",\n    // `title` is a heading input — strip the reflected native attribute so it\n    // never doubles as a browser tooltip.\n    \"[attr.title]\": \"null\",\n  },\n  templateUrl: \"./page-section.component.html\",\n  styleUrl: \"./page-section.component.scss\",\n})\nexport class FoldPageSectionComponent {\n  /** The section heading (rendered small + uppercase; the region's a11y name). */\n  readonly title = input<string>();\n  /** An optional leading icon beside the title. */\n  readonly icon = input<FoldIconName>();\n  /** Tint of the leading icon — forwarded to `fold-icon`'s `tone`. Defaults to\n   *  `secondary` (a muted ink, a step below the title). */\n  readonly iconTone = input<FoldIconTone>(\"secondary\");\n  /** A one-line description under the title. */\n  readonly description = input<string>();\n  /**\n   * Which register the title wears — a **skin**, never a change of semantics.\n   * The heading is the same `h2` either way, with the same `aria-level` and the\n   * same region name; only its face changes.\n   *\n   * - `eyebrow` (default) — the micro-label register: 2xs, bold, uppercase,\n   *   tracked, in `--fold-font-label`, exactly what a data-table column head and\n   *   a `fold-element-title` eyebrow already wear. A section title is a **label\n   *   for the block below it**, and at page scale a stack of base-size headings\n   *   competes with the very content it is supposed to label.\n   * - `heading` — a plain base-size title, for a page where a section really is\n   *   a chapter and its title should read as prose.\n   */\n  readonly titleVariant = input<FoldSectionTitleVariant>(\"eyebrow\");\n  /**\n   * Close the section head on a hairline — the same gesture as\n   * `fold-page-layout`'s `separator`, for the same reason: when the body runs\n   * flush against the head, the head reads as its first row.\n   */\n  readonly separator = input(false, { transform: booleanAttribute });\n\n  /**\n   * Let the reader fold the section's **body** away.\n   *\n   * What collapses is the body, and nothing else: the title, its subtitle, its\n   * description and its `[sectionActions]` stay in place. That line is the whole\n   * difference between folding and hiding — a tab hid the section's STATE along\n   * with its fields, so you could not tell what was missing without opening\n   * every one. Folded here, the section still says what it is and what it is\n   * doing; you just stop looking at its inputs.\n   *\n   * Consequences of that rule, both deliberate: the actions remain clickable\n   * while folded (a section can be saved without unfolding it), and the toggle\n   * is the TITLE, not the whole header — a button around the header would have\n   * swallowed those actions into itself.\n   */\n  readonly collapsible = input(false, { transform: booleanAttribute });\n\n  /**\n   * Whether the body is showing. Two-way, and **open by default**: a section\n   * that starts folded is a section someone has to discover.\n   */\n  readonly open = model(true);\n\n  protected toggle(): void {\n    this.open.update((value) => !value);\n  }\n  /** Heading depth exposed to assistive tech (`aria-level`) — set it so sections\n   *  nest correctly under the page's `<h1>` (2 by default). */\n  readonly headingLevel = input(2);\n  /** Lay the body out as an evenly-spaced vertical stack of form fields. */\n  readonly stack = input(false, { transform: booleanAttribute });\n  /** Break out of the page gutter to span the layout edge-to-edge — cancels\n   *  `--fold-page-gutter` exactly, so it stays flush at every breakpoint. As the\n   *  first/last band it also flushes to the page's top/bottom edge. Only\n   *  meaningful inside an `fold-page-layout`. */\n  readonly bleed = input(false, { transform: booleanAttribute });\n\n  /** SSR-safe id on the heading, so the `<section>` names its region with\n   *  `aria-labelledby` (only when there's a title). */\n  protected readonly headingId =\n    inject(FoldIdService).next(\"fold-page-section\");\n\n  /** Body id, so the title button can point `aria-controls` at it. Derived from\n   *  the heading's so the two always name the same section. */\n  protected readonly bodyId = `${this.headingId}-body`;\n}\n","<section class=\"ps-root\" [attr.aria-labelledby]=\"title() ? headingId : null\">\n  @if (title() || description()) {\n    <div class=\"section-head\">\n      @if (title(); as t) {\n        <div class=\"section-head-row\">\n          <h2\n            class=\"section-title\"\n            [id]=\"headingId\"\n            [attr.aria-level]=\"headingLevel() === 2 ? null : headingLevel()\"\n          >\n            @if (collapsible()) {\n              <!-- Le bouton est le TITRE, pas l'en-tête : un bouton autour de\n                   l'en-tête aurait avalé `[sectionActions]` — « Enregistrer »\n                   dans un `<button>` est inerte, et invalide. -->\n              <button\n                type=\"button\"\n                class=\"section-toggle\"\n                [attr.aria-expanded]=\"open()\"\n                [attr.aria-controls]=\"bodyId\"\n                (click)=\"toggle()\"\n              >\n                <fold-icon\n                  class=\"section-chevron\"\n                  name=\"chevron-down\"\n                  size=\"sm\"\n                  aria-hidden=\"true\"\n                />\n                @if (icon(); as ic) {\n                  <fold-icon [name]=\"ic\" size=\"sm\" [tone]=\"iconTone()\" />\n                }\n                <span class=\"section-title-text\">{{ t }}</span>\n              </button>\n            } @else {\n              @if (icon(); as ic) {\n                <fold-icon [name]=\"ic\" size=\"sm\" [tone]=\"iconTone()\" />\n              }\n              <span class=\"section-title-text\">{{ t }}</span>\n            }\n          </h2>\n          <div class=\"section-actions\">\n            <ng-content select=\"[sectionActions]\" />\n          </div>\n        </div>\n      }\n      <div class=\"section-subtitle\">\n        <ng-content select=\"[sectionSubtitle]\" />\n      </div>\n      @if (description()) {\n        <p class=\"section-desc\">{{ description() }}</p>\n      }\n    </div>\n  }\n  <!-- A bespoke header — project [sectionHeader] (e.g. a fold-element-title with\n       an icon tile) INSTEAD of `title` when the default h2 isn't enough. The\n       parent owns its heading semantics. -->\n  <ng-content select=\"[sectionHeader]\" />\n  <!-- Seul le CORPS se replie. Le titre, son sous-titre, sa description et ses\n       actions restent en place : c'est ce qui sépare replier de cacher. -->\n  <div class=\"section-body\" [id]=\"bodyId\" [hidden]=\"collapsible() && !open()\">\n    <ng-content />\n  </div>\n</section>\n","import { Component, booleanAttribute, input } from \"@angular/core\";\n\n/**\n * `<fold-hero-section>` — a full-bleed **page splash**: the borderless intro\n * band at the top of a page (wordmark, title, lede, call-to-action). Unlike\n * {@link FoldHeroCardComponent} (a bordered card you drop anywhere), this is a\n * layout primitive — it breaks the page gutter to span edge-to-edge and carries\n * the page's `<h1>`.\n *\n * Meant as a **direct child of `fold-page-layout`**: it cancels exactly the\n * gutter + top padding the layout applies (the same `--fold-page-gutter` /\n * `--fold-page-pad-top` tokens), so the band sits flush to the edges. A soft\n * brand-tinted wash reads it as the hero, closed by a hairline at the bottom.\n *\n * Two content lanes:\n * - default slot — the centred column (eyebrow · title · lede · actions).\n * - `[heroBackdrop]` — decorative layer painted *behind* the content\n *   (a watermark, a glow); rendered `aria-hidden`, so keep it purely visual.\n *\n * ```html\n * <fold-hero-section>\n *   <span heroBackdrop class=\"watermark\">v1</span>\n *   <fold-badge content=\"Angular 22\" />\n *   <h1>Fold</h1>\n *   <p>A signals-first design system.</p>\n * </fold-hero-section>\n * ```\n *\n * @selector `fold-hero-section`\n */\n@Component({\n  selector: \"fold-hero-section\",\n  standalone: true,\n  host: {\n    \"[class.align-start]\": \"align() === 'start'\",\n    \"[class.no-wash]\": \"!wash()\",\n  },\n  templateUrl: \"./hero-section.component.html\",\n  styleUrl: \"./hero-section.component.scss\",\n})\nexport class FoldHeroSectionComponent {\n  /** Column alignment — `center` (default) · `start` (left-aligned). */\n  readonly align = input<\"center\" | \"start\">(\"center\");\n  /** Paint the brand-tinted gradient wash (default). Set `false` for a plain surface band. */\n  readonly wash = input(true, { transform: booleanAttribute });\n}\n","<div class=\"hs-backdrop\" aria-hidden=\"true\">\n  <ng-content select=\"[heroBackdrop]\" />\n</div>\n<div class=\"hs-content\">\n  <ng-content />\n</div>\n","import { InjectionToken, type Provider } from \"@angular/core\";\n\n/**\n * Every user-facing / accessible string the paginator renders. Parameterised\n * strings (the visible range, a page's aria-label) are functions so a locale\n * can reorder or reword them, not just translate a fixed template. All defaults\n * are English — a non-English app overrides them once via\n * {@link provideFoldPaginatorLabels}, or per instance via the `labels` input.\n */\nexport interface FoldPaginatorLabels {\n  /** `aria-label` of the page-size `<select>`. */\n  readonly pageSize: string;\n  /** Trailing text after the size selector, e.g. \"per page\". */\n  readonly perPage: string;\n  /** `aria-label` of the page-navigation `<nav>`. */\n  readonly nav: string;\n  /** Previous-page button `aria-label`. */\n  readonly previous: string;\n  /** Next-page button `aria-label`. */\n  readonly next: string;\n  /** Shown in place of the range when there are no items. */\n  readonly empty: string;\n  /** A page button's `aria-label`, e.g. `(3) => \"Page 3\"`. */\n  readonly page: (page: number) => string;\n  /** The visible range label, e.g. `(21, 30, 237) => \"21–30 of 237\"`. */\n  readonly range: (start: number, end: number, total: number) => string;\n}\n\n/** The English defaults — the base every override merges onto. */\nexport const FOLD_PAGINATOR_DEFAULT_LABELS: FoldPaginatorLabels = {\n  pageSize: \"Items per page\",\n  perPage: \"per page\",\n  nav: \"Pagination\",\n  previous: \"Previous page\",\n  next: \"Next page\",\n  empty: \"No items\",\n  page: (page) => `Page ${page}`,\n  range: (start, end, total) => `${start}–${end} of ${total}`,\n};\n\n/** App-wide paginator labels; defaults to English. */\nexport const FOLD_PAGINATOR_LABELS = new InjectionToken<FoldPaginatorLabels>(\n  \"FOLD_PAGINATOR_LABELS\",\n  { factory: () => FOLD_PAGINATOR_DEFAULT_LABELS },\n);\n\n/**\n * Provide app-wide paginator labels once at bootstrap. Partial — any key you\n * omit keeps its English default.\n *\n * @example\n * ```ts\n * // app.config.ts\n * providers: [\n *   provideFoldPaginatorLabels({\n *     perPage: \"par page\",\n *     previous: \"Page précédente\",\n *     range: (s, e, t) => `${s}–${e} sur ${t}`,\n *   }),\n * ];\n * ```\n */\nexport function provideFoldPaginatorLabels(\n  labels: Partial<FoldPaginatorLabels>,\n): Provider {\n  return {\n    provide: FOLD_PAGINATOR_LABELS,\n    useValue: { ...FOLD_PAGINATOR_DEFAULT_LABELS, ...labels },\n  };\n}\n","import {\n  afterRenderEffect,\n  booleanAttribute,\n  Component,\n  computed,\n  ElementRef,\n  inject,\n  input,\n  output,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport {\n  FOLD_PAGINATOR_LABELS,\n  type FoldPaginatorLabels,\n} from \"./paginator-labels\";\n\n/**\n * Item representing one slot in the page navigation bar.\n * Either a concrete page number (1-indexed) or an ellipsis gap.\n */\nexport type FoldPageItem = { kind: \"page\"; page: number } | { kind: \"gap\" };\n\n/** Which control a page change should refocus after the parent re-renders. */\ntype RefocusTarget = \"active\" | \"prev\" | \"next\";\n\n/**\n * `fold-paginator` — presentational, fully controlled.\n *\n * Designed for **server-side pagination** (offset/limit): the parent owns\n * `currentPage`, `pageSize` and `totalItems`, fires the HTTP call on\n * `(pageChange)` / `(pageSizeChange)`, then feeds the new values back in. The\n * component tolerates a lagging or out-of-range `currentPage` — the visible\n * range, the active button and the prev/next guards all use an internally\n * clamped page, so a stale value can never render a nonsensical range.\n *\n * Renders: `[page size selector] [items range] [‹ 1 2 3 … N ›]`.\n *\n * **Accessible:** the `<nav>`, both arrows, each page (`aria-current=\"page\"` on\n * the active one) and the size selector carry labels, all overridable for i18n\n * via {@link provideFoldPaginatorLabels} (English by default) or the `labels`\n * input. After a page change it moves focus to the control the user was on (the\n * active page, or the prev/next arrow while it stays enabled) so keyboard focus\n * is never dropped to `<body>`.\n *\n * @selector `fold-paginator`\n *\n * @example\n * ```html\n * <fold-paginator\n *   [currentPage]=\"page()\"\n *   [pageSize]=\"size()\"\n *   [totalItems]=\"total()\"\n *   (pageChange)=\"loadPage($event)\"\n *   (pageSizeChange)=\"changeSize($event)\" />\n * ```\n */\n@Component({\n  selector: \"fold-paginator\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  templateUrl: \"./paginator.component.html\",\n  styleUrl: \"./paginator.component.scss\",\n})\nexport class FoldPaginatorComponent {\n  /** 1-indexed current page. */\n  readonly currentPage = input.required<number>();\n\n  /** Total number of items across all pages (drives `totalPages` + range label). */\n  readonly totalItems = input.required<number>();\n\n  /**\n   * Number of items per page (must be > 0). Optional: when omitted, the first\n   * of {@link pageSizeOptions} is used, so the common case only needs\n   * `currentPage` + `totalItems`. Everything visible derives from the effective\n   * size, so a control-it-later parent stays consistent.\n   */\n  readonly pageSize = input<number>();\n\n  /** Selectable page sizes. Set `[]` to hide the size selector entirely. */\n  readonly pageSizeOptions = input<readonly number[]>([10, 25, 50, 100]);\n\n  /** The size actually in effect: the `pageSize` input, else the first option. */\n  readonly effectivePageSize = computed<number>(() => {\n    const size = this.pageSize();\n    if (size !== undefined && size > 0) {\n      return size;\n    }\n    return this.pageSizeOptions()[0] ?? 10;\n  });\n\n  /**\n   * How many page buttons to render on each side of the current page\n   * between the first/last anchors. Example with `siblingCount: 1`:\n   * `1 … 4 [5] 6 … 10`.\n   * @default 1\n   */\n  readonly siblingCount = input<number>(1);\n\n  /** Disables all controls (both page nav and size selector). */\n  readonly disabled = input(false, { transform: booleanAttribute });\n\n  /** Per-instance label overrides (merged over the app-wide / English defaults). */\n  readonly labels = input<Partial<FoldPaginatorLabels>>();\n\n  /** Fires with the new 1-indexed page number. */\n  readonly pageChange = output<number>();\n\n  /** Fires with the newly selected page size. */\n  readonly pageSizeChange = output<number>();\n\n  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n  private readonly injectedLabels = inject(FOLD_PAGINATOR_LABELS);\n\n  /** Effective labels — the app-wide (or English) set, with the `labels` input on top. */\n  readonly l = computed<FoldPaginatorLabels>(() => ({\n    ...this.injectedLabels,\n    ...this.labels(),\n  }));\n\n  // ─── Derived state ────────────────────────────────────────────\n\n  /** Total pages, minimum 1 so the UI always shows at least \"1 of 1\". */\n  readonly totalPages = computed<number>(() => {\n    const size = this.effectivePageSize();\n    const total = this.totalItems();\n    if (size <= 0 || total <= 0) {\n      return 1;\n    }\n    return Math.ceil(total / size);\n  });\n\n  /** The current page clamped into `[1, totalPages]` — the value everything\n   *  visible derives from, so a lagging/out-of-range parent never shows a\n   *  broken range or highlights a phantom page. */\n  readonly page = computed<number>(() =>\n    Math.min(Math.max(this.currentPage(), 1), this.totalPages()),\n  );\n\n  /** Sanitised sibling count — a non-negative integer. */\n  private readonly siblings = computed<number>(() =>\n    Math.max(0, Math.floor(this.siblingCount())),\n  );\n\n  /** The rendered size options, always including the current `pageSize` (so the\n   *  `<select>` can never silently show a value the parent isn't using). */\n  readonly sizeOptions = computed<readonly number[]>(() => {\n    const opts = this.pageSizeOptions();\n    const size = this.effectivePageSize();\n    if (opts.includes(size)) {\n      return opts;\n    }\n    return [...opts, size].sort((a, b) => a - b);\n  });\n\n  /** Zero-indexed start / end of the currently visible range (for the label). */\n  readonly rangeStart = computed<number>(() => {\n    if (this.totalItems() === 0) {\n      return 0;\n    }\n    return (this.page() - 1) * this.effectivePageSize() + 1;\n  });\n\n  readonly rangeEnd = computed<number>(() =>\n    Math.min(this.page() * this.effectivePageSize(), this.totalItems()),\n  );\n\n  readonly canGoPrev = computed<boolean>(\n    () => !this.disabled() && this.page() > 1,\n  );\n  readonly canGoNext = computed<boolean>(\n    () => !this.disabled() && this.page() < this.totalPages(),\n  );\n\n  /**\n   * Page buttons to render, with ellipsis gaps.\n   *\n   * Algorithm: always render page 1 and page N; render `siblingCount`\n   * pages on each side of the current page; insert a single `gap` between\n   * any two non-contiguous blocks.\n   */\n  readonly pageItems = computed<FoldPageItem[]>(() => {\n    const total = this.totalPages();\n    const current = this.page();\n    const sibs = this.siblings();\n\n    // Small enough to show every page — no ellipsis needed.\n    // `5 + 2*sibs` = first + last + current + 2*sibs around current + 2 gap slots.\n    if (total <= 5 + 2 * sibs) {\n      return Array.from({ length: total }, (_, i) => ({\n        kind: \"page\" as const,\n        page: i + 1,\n      }));\n    }\n\n    const leftSibling = Math.max(current - sibs, 2);\n    const rightSibling = Math.min(current + sibs, total - 1);\n\n    const showLeftGap = leftSibling > 2;\n    const showRightGap = rightSibling < total - 1;\n\n    const items: FoldPageItem[] = [{ kind: \"page\", page: 1 }];\n\n    if (showLeftGap) {\n      items.push({ kind: \"gap\" });\n    }\n\n    for (let p = leftSibling; p <= rightSibling; p++) {\n      items.push({ kind: \"page\", page: p });\n    }\n\n    if (showRightGap) {\n      items.push({ kind: \"gap\" });\n    }\n\n    items.push({ kind: \"page\", page: total });\n    return items;\n  });\n\n  // ─── Focus management (keep keyboard focus after a page change) ─\n\n  private refocus: RefocusTarget | null = null;\n  private lastFocusedPage = -1;\n\n  constructor() {\n    // Browser-only, runs after the DOM reflects the new page. When a page\n    // change originated from a click here, move focus to the control the user\n    // was on so it is never dropped to <body>.\n    afterRenderEffect(() => {\n      const page = this.page();\n      if (this.refocus !== null && page !== this.lastFocusedPage) {\n        this.applyRefocus(this.refocus);\n        this.refocus = null;\n      }\n      this.lastFocusedPage = page;\n    });\n  }\n\n  private applyRefocus(target: RefocusTarget): void {\n    const root = this.host.nativeElement;\n    const active = root.querySelector<HTMLElement>(\".page-btn.is-active\");\n    let el: HTMLElement | null = active;\n    if (target === \"prev\" && this.canGoPrev()) {\n      el = root.querySelector<HTMLElement>(\".nav-btn--prev\");\n    } else if (target === \"next\" && this.canGoNext()) {\n      el = root.querySelector<HTMLElement>(\".nav-btn--next\");\n    }\n    el?.focus();\n  }\n\n  // ─── Handlers ─────────────────────────────────────────────────\n\n  goToPage(page: number, via: RefocusTarget = \"active\"): void {\n    if (this.disabled()) {\n      return;\n    }\n    const clamped = Math.max(1, Math.min(page, this.totalPages()));\n    if (clamped === this.page()) {\n      return;\n    }\n    this.refocus = via;\n    this.pageChange.emit(clamped);\n  }\n\n  prev(): void {\n    if (this.canGoPrev()) {\n      this.goToPage(this.page() - 1, \"prev\");\n    }\n  }\n\n  next(): void {\n    if (this.canGoNext()) {\n      this.goToPage(this.page() + 1, \"next\");\n    }\n  }\n\n  onPageSizeChange(raw: string): void {\n    const size = Number(raw);\n    if (\n      Number.isFinite(size) &&\n      size > 0 &&\n      size !== this.effectivePageSize()\n    ) {\n      this.pageSizeChange.emit(size);\n    }\n  }\n}\n","@let labels = l();\n@let sizes = sizeOptions();\n\n<div class=\"paginator-left\">\n  @if (pageSizeOptions().length > 0) {\n    <label class=\"page-size\">\n      <select\n        #pageSizeSelect\n        class=\"page-size__select\"\n        [value]=\"effectivePageSize()\"\n        [disabled]=\"disabled()\"\n        (change)=\"onPageSizeChange(pageSizeSelect.value)\"\n        [attr.aria-label]=\"labels.pageSize\"\n      >\n        @for (opt of sizes; track opt) {\n          <option [value]=\"opt\" [selected]=\"opt === effectivePageSize()\">\n            {{ opt }}\n          </option>\n        }\n      </select>\n      <span class=\"page-size__label\">{{ labels.perPage }}</span>\n    </label>\n  }\n\n  @if (totalItems() > 0) {\n    <span class=\"range\">{{\n      labels.range(rangeStart(), rangeEnd(), totalItems())\n    }}</span>\n  } @else {\n    <span class=\"range range--empty\">{{ labels.empty }}</span>\n  }\n</div>\n\n<nav class=\"pages\" [attr.aria-label]=\"labels.nav\">\n  <button\n    type=\"button\"\n    class=\"nav-btn nav-btn--prev\"\n    [disabled]=\"!canGoPrev()\"\n    (click)=\"prev()\"\n    [attr.aria-label]=\"labels.previous\"\n  >\n    <fold-icon name=\"chevron-left\" [size]=\"15\" />\n  </button>\n\n  @for (item of pageItems(); track $index) {\n    @if (item.kind === \"page\") {\n      <button\n        type=\"button\"\n        class=\"page-btn\"\n        [class.is-active]=\"item.page === page()\"\n        [attr.aria-current]=\"item.page === page() ? 'page' : null\"\n        [attr.aria-label]=\"labels.page(item.page)\"\n        [disabled]=\"disabled()\"\n        (click)=\"goToPage(item.page)\"\n      >\n        {{ item.page }}\n      </button>\n    } @else {\n      <span class=\"gap\" aria-hidden=\"true\">…</span>\n    }\n  }\n\n  <button\n    type=\"button\"\n    class=\"nav-btn nav-btn--next\"\n    [disabled]=\"!canGoNext()\"\n    (click)=\"next()\"\n    [attr.aria-label]=\"labels.next\"\n  >\n    <fold-icon name=\"chevron-right\" [size]=\"15\" />\n  </button>\n</nav>\n","import {\n  afterNextRender,\n  DestroyRef,\n  Directive,\n  ElementRef,\n  effect,\n  inject,\n  input,\n  signal,\n} from \"@angular/core\";\nimport { autoUpdate } from \"../overlays/popover/auto-update\";\nimport {\n  computePlacement,\n  type FoldPopoverSide,\n} from \"../overlays/popover/placement\";\n\n/** Distance between the icon and its tooltip, in px. */\nconst OFFSET = 6;\n/** Keep-inside-the-viewport padding, in px. */\nconst PADDING = 8;\n\n/**\n * Turns a collapsed tab's label into a **top-layer** tooltip.\n *\n * The label used to be `position: absolute` inside the bar, which worked only\n * as long as the bar never clipped. It does now: a busy collapsed horizontal\n * bar scrolls, and a scroller clips — that is what it is. Absolute positioning\n * and a scroll container cannot both be satisfied.\n *\n * The top layer settles it. The element stays exactly where it is in the DOM —\n * so the accessible name of the item is unchanged — but a shown `popover`\n * renders above everything, escaping every ancestor's overflow, with no\n * ancestor `overflow: visible` to arrange and nothing to reserve room for.\n *\n * Positioning reuses the popover family's own primitives rather than a second\n * implementation: `computePlacement` (flip + shift, so a tooltip near the\n * viewport edge moves to the other side instead of spilling) and `autoUpdate`\n * (so it follows while the bar scrolls under the pointer).\n */\n@Directive({\n  selector: \"[foldTabTooltip]\",\n  standalone: true,\n  host: { \"[attr.popover]\": \"enabled() ? 'manual' : null\" },\n})\nexport class FoldTabTooltipDirective {\n  /** True while this label acts as a tooltip rather than inline text. */\n  readonly foldTabTooltip = input(false);\n\n  /** Which side of the item it sits on — `right` on a rail, `bottom` on a bar. */\n  readonly tooltipSide = input<FoldPopoverSide>(\"right\");\n\n  private readonly host =\n    inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n  private readonly enabledState = signal(false);\n  private stopFollowing: (() => void) | null = null;\n  /* Tracked, not read back off the element: `hidePopover()` throws when it is\n     not open, and `:popover-open` is a selector happy-dom rejects outright — a\n     DOMException on every teardown in the unit suite. */\n  private open = false;\n\n  /** Mirrors {@link foldTabTooltip}, but never leaves a popover open behind it. */\n  protected readonly enabled = this.enabledState.asReadonly();\n\n  constructor() {\n    effect(() => {\n      const on = this.foldTabTooltip();\n      if (!on) {\n        this.hide();\n      }\n      this.enabledState.set(on);\n    });\n\n    const destroyRef = inject(DestroyRef);\n    destroyRef.onDestroy(() => this.hide());\n\n    // Resolved after render, not in the constructor: an item built from an\n    // `ng-template` is created detached, so `closest()` finds nothing yet — the\n    // listeners would bind to null and the tooltip would never open.\n    afterNextRender(() => {\n      const item = this.host.closest<HTMLElement>(\".tab-bar-item\");\n      if (item === null) {\n        return;\n      }\n      const show = (): void => this.show(item);\n      const hide = (): void => this.hide();\n      item.addEventListener(\"pointerenter\", show);\n      item.addEventListener(\"pointerleave\", hide);\n      item.addEventListener(\"focus\", show);\n      item.addEventListener(\"blur\", hide);\n      destroyRef.onDestroy(() => {\n        item.removeEventListener(\"pointerenter\", show);\n        item.removeEventListener(\"pointerleave\", hide);\n        item.removeEventListener(\"focus\", show);\n        item.removeEventListener(\"blur\", hide);\n      });\n    });\n  }\n\n  private show(item: HTMLElement | null): void {\n    if (!this.enabledState() || item === null) {\n      return;\n    }\n    if (typeof this.host.showPopover !== \"function\") {\n      return; // SSR, or a browser without the top layer — no tooltip, no crash.\n    }\n    this.host.showPopover();\n    this.open = true;\n    const place = (): void => this.place(item);\n    place();\n    this.stopFollowing = autoUpdate(item, this.host, place);\n  }\n\n  private place(item: HTMLElement): void {\n    const anchor = item.getBoundingClientRect();\n    const floating = this.host.getBoundingClientRect();\n    const { x, y } = computePlacement({\n      anchor,\n      floating: { width: floating.width, height: floating.height },\n      placement: this.tooltipSide(),\n      offset: OFFSET,\n      viewport: { width: window.innerWidth, height: window.innerHeight },\n      padding: PADDING,\n    });\n    this.host.style.left = `${x}px`;\n    this.host.style.top = `${y}px`;\n  }\n\n  private hide(): void {\n    this.stopFollowing?.();\n    this.stopFollowing = null;\n    if (!this.open) {\n      return;\n    }\n    this.open = false;\n    this.host.hidePopover();\n  }\n}\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport {\n  booleanAttribute,\n  Component,\n  computed,\n  effect,\n  inject,\n  input,\n  model,\n} from \"@angular/core\";\nimport { RouterLink, RouterLinkActive } from \"@angular/router\";\nimport { FoldBadgeComponent } from \"../../content/badge/badge.component\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldTabTooltipDirective } from \"../tab-tooltip.directive\";\nimport type { FoldPopoverSide } from \"../../overlays/popover/placement\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport { FOLD_NAV_LAYOUT } from \"../../layout/nav-layout/nav-layout.context\";\nimport { FOLD_NARROW } from \"../../layout/breakpoints\";\nimport { observeElementWidth } from \"../../../dom/observe-element-width\";\n\nexport type FoldViewNavItem = {\n  /** Unique key — identifies the item; a button item writes it to `activeKey`. */\n  key: string;\n  /** Display label. */\n  label: string;\n  /** Optional leading icon, by registry name (rendered as an `fold-icon`). */\n  icon?: FoldIconName;\n  /** Optional trailing badge (e.g. a count). `undefined`/`null` hides it. */\n  badge?: string | number | null;\n  /**\n   * Router target — makes this item a real `routerLink` `<a>`: cmd/middle-click\n   * opens a new tab, the URL is a deep link, and the active state is driven\n   * automatically by `routerLinkActive` (no `activeKey` needed). Accepts the\n   * same value as `[routerLink]` — a path string or a commands array.\n   */\n  link?: string | unknown[];\n  /** External URL — renders a plain `<a href>` (no router). */\n  href?: string;\n  /** Disable the item: non-interactive + dimmed. */\n  disabled?: boolean;\n};\n\n/**\n * `<fold-view-nav>` — a **navigation** bar styled as tabs: a `<nav>` whose items\n * *go somewhere*. Give each item a `link` (or `href`) and it renders a real\n * `<a>` — so cmd/middle-click opens a new tab, the URL is a deep link, and the\n * active item is driven automatically by `routerLinkActive` +\n * `aria-current=\"page\"`. Without a link an item is a `<button>` that drives the\n * `activeKey` **two-way model** — bind `[(activeKey)]` for view switching with\n * no route.\n *\n * **Navigation, not the tabs widget.** Reach for this when a tab routes / switches\n * views. When tabs toggle **layered panels in place** (same URL), use\n * {@link FoldTabsComponent} — same look, but the ARIA Tabs pattern\n * (`role=\"tablist\"`, arrow keys, `tabpanel`).\n *\n * - `activeStyle` — `underline` (accent border) or `fill` (accent pill).\n * - `direction` — `auto` (default: follows a wrapping `fold-nav-layout`, else\n *   vertical), `vertical`, or `horizontal`.\n *\n * @selector `fold-view-nav`\n *\n * @example\n * ```html\n * <!-- real navigation: link items, active state automatic -->\n * <fold-view-nav [items]=\"[\n *   { key: 'members', label: 'Members', link: 'members', badge: 3 },\n *   { key: 'settings', label: 'Settings', link: 'settings' },\n * ]\" />\n * <router-outlet />\n * ```\n */\n@Component({\n  selector: \"fold-view-nav\",\n  standalone: true,\n  imports: [\n    NgTemplateOutlet,\n    FoldIconComponent,\n    FoldBadgeComponent,\n    RouterLink,\n    RouterLinkActive,\n    FoldTabTooltipDirective,\n  ],\n  templateUrl: \"./view-nav.component.html\",\n  // Inline + token-driven. Neutral 1px lines use --fold-color-border /\n  // -surface-raised so they flip correctly in light mode (the app original\n  // hard-coded white-alpha, which would vanish on a light background).\n  styleUrl: \"./view-nav.component.scss\",\n  host: {\n    // A standalone horizontal bar owns the gap to the content it heads, matching\n    // fold-nav-layout. Inside a layout, the layout owns that gap (these two\n    // classes never both apply there); the SCSS keys the margin on their\n    // conjunction. Vertical is a side rail, not a header — no block-end margin.\n    \"[class.is-standalone]\": \"isStandalone()\",\n    \"[class.is-horizontal]\": \"resolvedDirection() === 'horizontal'\",\n    \"[class.is-sticky]\": \"sticky()\",\n    \"[class.is-narrow]\": \"narrow()\",\n  },\n})\nexport class FoldViewNavComponent {\n  /** The items to render, in order. */\n  readonly items = input.required<readonly FoldViewNavItem[]>();\n\n  /**\n   * The active item's `key`, as a **two-way model** — for **button** items (no\n   * `link`). Bind `[(activeKey)]` and a click writes the new key back; there is\n   * no separate change output (the model is the one way). Link items ignore it:\n   * their active state comes from the URL via `routerLinkActive`.\n   *\n   * **Deliberately `string`, where {@link FoldTabsComponent.activeKey} is\n   * generic.** This model has a zero value — `\"\"`, \"no item selected\", the state\n   * a bar of pure link items sits in forever. No caller's union of view keys\n   * contains `\"\"`, so a generic `K` here would have to be `K | \"\"` and hand the\n   * narrowing back to the caller — the very burden the generic exists to remove.\n   * `fold-tabs` has no such zero value (`model.required`), which is why it can.\n   */\n  readonly activeKey = model<string>(\"\");\n\n  /** How the active item reads: accent underline, or accent fill. */\n  readonly activeStyle = input<\"underline\" | \"fill\">(\"underline\");\n\n  /**\n   * Bar orientation. Defaults to `auto`: inside a `fold-nav-layout` it follows\n   * the layout (vertical rail, horizontal once folded) with no wiring; on its\n   * own it is `vertical` — the readable-first shape, reading as the app's\n   * **third navigation rail** (app menu → workspace → in-page views, the\n   * `--fold-rail-tertiary` level). Force `horizontal` for a page-level top bar.\n   */\n  readonly direction = input<\"horizontal\" | \"vertical\" | \"auto\">(\"auto\");\n\n  /**\n   * Density — pure padding/typography:\n   * - `compact` (default) — inline / popover bars.\n   * - `comfortable` — a prominent, page-level bar.\n   */\n  readonly size = input<\"compact\" | \"comfortable\">(\"compact\");\n\n  /**\n   * How items share the bar's width — a separate axis from {@link size}.\n   *\n   * - `start` (default) — each item takes the width of its own content.\n   * - `stretch` — items divide the bar's width equally (a bottom tab bar).\n   *\n   * `size` used to decide this in passing: `compact` stretched, `comfortable`\n   * hugged, while the prop documented itself as \"pure padding/typography\". One\n   * prop quietly steering two axes is the thing `button-icon`/`toggle-icon` and\n   * `view-nav`/`tabs` were each split apart to stop doing.\n   *\n   * Vertical bars ignore it — a rail stacks, it does not share a width.\n   */\n  readonly justify = input<\"start\" | \"stretch\">(\"start\");\n\n  /**\n   * Collapse the bar to icons (independent of {@link size}). **Horizontal**, an\n   * icon accordion: every item but the active one drops to its icon, the active\n   * one keeps its label. **Vertical**, a collapsed icon rail (like a folded\n   * menu): every item shows just its icon, its label a hover/focus tooltip and\n   * its count a corner bubble. A wrapping `fold-nav-layout` narrows its own\n   * track to match — the bar tells it, there is nothing to post by hand. An item with no icon falls back to a square glyph of its label's\n   * initial, so the rail stays icon-width whether or not items carry icons.\n   * Toggle it from your own breakpoint when the bar is too tight.\n   */\n  readonly collapsed = input(false, { transform: booleanAttribute });\n\n  /**\n   * `transparent` (default — blends with the app, so the items read directly) or\n   * `surface` (a filled bar that carries its own rail background).\n   */\n  readonly background = input<\"transparent\" | \"surface\">(\"transparent\");\n\n  /**\n   * Pin the bar to the top of its scroll container, so a long view can be\n   * navigated without scrolling back up. Pair it with the default\n   * `background=\"surface\"`: a `transparent` bar would let the content scroll\n   * through it. Bleeding the bar to the page's edges stays the page's business\n   * — the page owns the gutter.\n   */\n  readonly sticky = input(false, { transform: booleanAttribute });\n\n  /** The nearest layout, if any — lets `direction=\"auto\"` follow it. */\n  private readonly layout = inject(FOLD_NAV_LAYOUT, { optional: true });\n\n  /**\n   * No wrapping `fold-nav-layout`. Standalone, the bar owns its gap to the\n   * following content; inside a layout, the layout owns it (avoiding a double\n   * gap).\n   */\n  protected readonly isStandalone = computed(() => this.layout === null);\n\n  /** The bar's own width — the box a standalone bar tightens its gap against. */\n  private readonly width = observeElementWidth();\n\n  /** Narrow enough to tighten the gap. Its own box, never the window. */\n  protected readonly narrow = computed(\n    () => this.width() > 0 && this.width() <= FOLD_NARROW,\n  );\n\n  constructor() {\n    // Tell the layout the bar is icon-only, so its rail track can hug it. The\n    // context runs both ways now: `collapsed` is the bar's prop and the rail\n    // width the layout's, and they had no way to meet.\n    effect(() => this.layout?.barCollapsed.set(this.collapsed()));\n  }\n\n  /** Which side a collapsed tooltip sits on: a rail pushes right, a bar down. */\n  protected readonly tooltipSide = computed<FoldPopoverSide>(() =>\n    this.resolvedDirection() === \"vertical\" ? \"right\" : \"bottom\",\n  );\n\n  /**\n   * True when this item's label is a TOOLTIP rather than inline text: every\n   * item on a collapsed rail, and every inactive one on a collapsed bar (the\n   * active one keeps its label inline).\n   *\n   * A tooltip label is `display: none` until shown — a `[popover]` is — so the\n   * item also takes an explicit `aria-label`. The old `opacity: 0` left the\n   * text in the accessibility tree; the top layer does not, and an icon with no\n   * name is worse than a clipped tooltip.\n   */\n  protected isTooltip(active: boolean): boolean {\n    return (\n      this.collapsed() && (this.resolvedDirection() === \"vertical\" || !active)\n    );\n  }\n\n  /** `direction` with `auto` resolved against the wrapping layout. */\n  protected readonly resolvedDirection = computed<\"horizontal\" | \"vertical\">(\n    () => {\n      const d = this.direction();\n      if (d !== \"auto\") {\n        return d;\n      }\n      return this.layout?.stacked() ? \"horizontal\" : \"vertical\";\n    },\n  );\n}\n","<nav\n  class=\"tab-bar\"\n  [class.style-underline]=\"activeStyle() === 'underline'\"\n  [class.style-fill]=\"activeStyle() === 'fill'\"\n  [class.dir-vertical]=\"resolvedDirection() === 'vertical'\"\n  [class.size-comfortable]=\"size() === 'comfortable'\"\n  [class.justify-stretch]=\"justify() === 'stretch'\"\n  [class.is-collapsed]=\"collapsed()\"\n  [class.bg-surface]=\"background() === 'surface'\"\n>\n  @for (item of items(); track item.key) {\n    @if (item.disabled) {\n      <button\n        type=\"button\"\n        class=\"tab-bar-item is-disabled\"\n        disabled\n        aria-disabled=\"true\"\n        [attr.aria-label]=\"isTooltip(false) ? item.label : null\"\n      >\n        <ng-container\n          [ngTemplateOutlet]=\"body\"\n          [ngTemplateOutletContext]=\"{ $implicit: item, active: false }\"\n        />\n      </button>\n    } @else if (item.link !== undefined) {\n      <a\n        class=\"tab-bar-item\"\n        [routerLink]=\"item.link\"\n        routerLinkActive=\"is-active\"\n        #rla=\"routerLinkActive\"\n        [attr.aria-current]=\"rla.isActive ? 'page' : null\"\n        [attr.aria-label]=\"isTooltip(rla.isActive) ? item.label : null\"\n      >\n        <ng-container\n          [ngTemplateOutlet]=\"body\"\n          [ngTemplateOutletContext]=\"{ $implicit: item, active: rla.isActive }\"\n        />\n      </a>\n    } @else if (item.href !== undefined) {\n      <a\n        class=\"tab-bar-item\"\n        [href]=\"item.href\"\n        [class.is-active]=\"activeKey() === item.key\"\n        [attr.aria-current]=\"activeKey() === item.key ? 'page' : null\"\n        [attr.aria-label]=\"\n          isTooltip(activeKey() === item.key) ? item.label : null\n        \"\n      >\n        <ng-container\n          [ngTemplateOutlet]=\"body\"\n          [ngTemplateOutletContext]=\"{\n            $implicit: item,\n            active: activeKey() === item.key,\n          }\"\n        />\n      </a>\n    } @else {\n      <button\n        type=\"button\"\n        class=\"tab-bar-item\"\n        [class.is-active]=\"activeKey() === item.key\"\n        [attr.aria-current]=\"activeKey() === item.key ? 'page' : null\"\n        [attr.aria-label]=\"\n          isTooltip(activeKey() === item.key) ? item.label : null\n        \"\n        (click)=\"activeKey.set(item.key)\"\n      >\n        <ng-container\n          [ngTemplateOutlet]=\"body\"\n          [ngTemplateOutletContext]=\"{\n            $implicit: item,\n            active: activeKey() === item.key,\n          }\"\n        />\n      </button>\n    }\n  }\n</nav>\n\n<!-- One item's inner content, shared by the link / button branches. -->\n<ng-template #body let-item let-active=\"active\">\n  @if (item.icon; as ic) {\n    <fold-icon class=\"tab-bar-icon\" [name]=\"ic\" size=\"sm\" />\n  } @else if (collapsed()) {\n    <!-- Collapsed needs a fixed glyph; an icon-less item falls back to its\n         initial so the rail stays icon-width and the label still tooltips. -->\n    <span class=\"tab-bar-icon tab-bar-initial\" aria-hidden=\"true\">{{\n      item.label.charAt(0)\n    }}</span>\n  }\n  <span\n    class=\"tab-bar-label\"\n    [foldTabTooltip]=\"isTooltip(active)\"\n    [tooltipSide]=\"tooltipSide()\"\n    >{{ item.label }}</span\n  >\n  @if (item.badge !== undefined && item.badge !== null) {\n    <fold-badge\n      class=\"tab-bar-badge\"\n      [content]=\"item.badge + ''\"\n      [variant]=\"active ? 'accent' : 'neutral'\"\n    />\n  }\n</ng-template>\n","import { ChangeDetectionStrategy, Component, input } from \"@angular/core\";\nimport { RouterLink } from \"@angular/router\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\n\n/**\n * One crumb in a {@link FoldBreadcrumbComponent} trail. A crumb links via **either**\n * an Angular `routerLink` (in-app) **or** a plain `href` (external / a non-router\n * app); give neither for a non-interactive step. The **last** item is rendered as\n * the current page (never a link) unless the trail declares\n * `[currentPage]=\"false\"` — see {@link FoldBreadcrumbComponent.currentPage}.\n */\nexport interface FoldBreadcrumbItem {\n  /** The crumb's visible text. */\n  readonly label: string;\n  /** Angular router target — a `routerLink` commands string or array. Takes\n   *  precedence over {@link href}. */\n  readonly routerLink?: string | unknown[];\n  /** Plain URL — for an external crumb, or an app that doesn't use the router. */\n  readonly href?: string;\n}\n\n/**\n * `<fold-breadcrumb>` — a hierarchical trail of links to the current page. Data\n * driven: pass `[items]`; each crumb links by `routerLink` **or** `href`, so it\n * works in a router app and degrades to plain anchors without one (importing it\n * never forces `@angular/router` — `RouterLink` is only instantiated on a crumb\n * that actually sets `routerLink`). The last item renders as the current page\n * (`aria-current=\"page\"`), not a link — unless the trail names ancestors ONLY,\n * for which see {@link currentPage}. Chevron separators are decorative.\n *\n * ```html\n * <fold-breadcrumb\n *   [items]=\"[\n *     { label: 'Accueil', routerLink: '/' },\n *     { label: 'Catalogue', routerLink: '/catalogue' },\n *     { label: 'Café d’Isère' },\n *   ]\"\n * />\n * ```\n *\n * @selector `fold-breadcrumb`\n */\n@Component({\n  selector: \"fold-breadcrumb\",\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [RouterLink, FoldIconComponent],\n  templateUrl: \"./breadcrumb.component.html\",\n  styleUrl: \"./breadcrumb.component.scss\",\n  host: {\n    role: \"navigation\",\n    \"[attr.aria-label]\": \"ariaLabel()\",\n  },\n})\nexport class FoldBreadcrumbComponent {\n  /** The trail, root first; the last item is the current page. */\n  readonly items = input.required<readonly FoldBreadcrumbItem[]>();\n  /** Accessible name of the navigation landmark. @default 'Breadcrumb' */\n  readonly ariaLabel = input(\"Breadcrumb\");\n  /**\n   * Does the last crumb stand for the **current page**?\n   *\n   * `true` (default) — the trail ends *on* the page you are reading: the last\n   * crumb is emphasised, never a link, and carries `aria-current=\"page\"`.\n   *\n   * `false` — the trail names the **ancestors only**, and the page's own `<h1>`\n   * is the current page (the shape a breadcrumb takes when it sits above a\n   * title, e.g. in `fold-page-layout`'s `[pageEyebrow]`). The last crumb then\n   * behaves like any other: a link when it carries a target, plain text when it\n   * does not, and no `aria-current` anywhere — because claiming a parent is the\n   * current page tells a screen reader something untrue, and repeating the\n   * heading as a final crumb is noise a sighted reader has to skip.\n   */\n  readonly currentPage = input(true);\n}\n","<ol class=\"bc-list\">\n  @for (item of items(); track $index; let last = $last) {\n    <li class=\"bc-item\">\n      @if (last && currentPage()) {\n        <span class=\"bc-node bc-current\" aria-current=\"page\">{{\n          item.label\n        }}</span>\n      } @else if (item.routerLink !== undefined) {\n        <a class=\"bc-node bc-link\" [routerLink]=\"item.routerLink\">{{\n          item.label\n        }}</a>\n      } @else if (item.href !== undefined) {\n        <a class=\"bc-node bc-link\" [href]=\"item.href\">{{ item.label }}</a>\n      } @else {\n        <span class=\"bc-node\">{{ item.label }}</span>\n      }\n\n      @if (!last) {\n        <fold-icon\n          class=\"bc-sep\"\n          name=\"chevron-right\"\n          size=\"sm\"\n          aria-hidden=\"true\"\n        />\n      }\n    </li>\n  }\n</ol>\n","import {\n  ChangeDetectionStrategy,\n  Component,\n  inject,\n  input,\n} from \"@angular/core\";\nimport { Location } from \"@angular/common\";\nimport { RouterLink } from \"@angular/router\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/**\n * `<fold-back-link>` — the “← Back” affordance for a detail page. Three modes,\n * picked by which input is set:\n * - `routerLink` — an in-app `<a routerLink>` to a specific parent route.\n * - `href` — a plain `<a href>` (external, or a non-router app).\n * - neither — a `<button>` that goes **back in history** (`Location.back()`).\n *\n * Router-coupled but degradable: importing it never forces `@angular/router`\n * (`RouterLink` only instantiates on a `routerLink`), and the history-back mode\n * needs no router at all.\n *\n * ```html\n * <fold-back-link routerLink=\"/contrats\" label=\"Tous les contrats\" />\n * <fold-back-link href=\"/dashboard\" />\n * <fold-back-link />            <!-- history back -->\n * ```\n *\n * @selector `fold-back-link`\n */\n@Component({\n  selector: \"fold-back-link\",\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [RouterLink, FoldIconComponent],\n  templateUrl: \"./back-link.component.html\",\n  styleUrl: \"./back-link.component.scss\",\n})\nexport class FoldBackLinkComponent {\n  private readonly location = inject(Location);\n\n  /** The link text. @default 'Back' */\n  readonly label = input(\"Back\");\n  /** Angular router target — takes precedence over {@link href}. When both this\n   *  and `href` are unset, the control is a history-back button. */\n  readonly routerLink = input<string | unknown[]>();\n  /** Plain URL target (external, or a non-router app). */\n  readonly href = input<string>();\n  /** Leading icon. @default 'chevron-left' */\n  readonly icon = input<FoldIconName>(\"chevron-left\");\n\n  /** History-back navigation, for the button mode. */\n  protected goBack(): void {\n    this.location.back();\n  }\n}\n","@if (routerLink(); as link) {\n  <a class=\"bl\" [routerLink]=\"link\">\n    <fold-icon class=\"bl-icon\" [name]=\"icon()\" size=\"sm\" aria-hidden=\"true\" />\n    <span>{{ label() }}</span>\n  </a>\n} @else if (href(); as url) {\n  <a class=\"bl\" [href]=\"url\">\n    <fold-icon class=\"bl-icon\" [name]=\"icon()\" size=\"sm\" aria-hidden=\"true\" />\n    <span>{{ label() }}</span>\n  </a>\n} @else {\n  <button type=\"button\" class=\"bl\" (click)=\"goBack()\">\n    <fold-icon class=\"bl-icon\" [name]=\"icon()\" size=\"sm\" aria-hidden=\"true\" />\n    <span>{{ label() }}</span>\n  </button>\n}\n","import {\n  booleanAttribute,\n  Component,\n  computed,\n  ElementRef,\n  inject,\n  input,\n  model,\n  viewChildren,\n} from \"@angular/core\";\nimport { FoldBadgeComponent } from \"../../content/badge/badge.component\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport { FoldTabTooltipDirective } from \"../tab-tooltip.directive\";\nimport type { FoldPopoverSide } from \"../../overlays/popover/placement\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FOLD_NAV_LAYOUT } from \"../../layout/nav-layout/nav-layout.context\";\n\n/**\n * A tab in a {@link FoldTabsComponent} bar.\n *\n * Generic over the **key** so a caller whose sections are a closed union\n * (`\"overview\" | \"settings\"`) keeps that type end to end: the bar writes it back\n * already narrowed, and a panel bound to a key outside the union is a compile\n * error. Defaults to `string`, so an untyped caller is unaffected.\n */\nexport type FoldTabItem<K extends string = string> = {\n  /** Unique key — identifies the tab / its panel, emitted on change. */\n  key: K;\n  /** Display label. */\n  label: string;\n  /** Optional leading icon. */\n  icon?: FoldIconName;\n  /** Optional trailing count badge. `undefined`/`null` hides it. */\n  badge?: string | number | null;\n};\n\n/**\n * The read side a {@link FoldTabPanelComponent} needs to wire itself to a tab —\n * exposed by `fold-tabs` via `exportAs=\"foldTabs\"`. Decouples the panel from the\n * concrete component.\n */\nexport interface FoldTabsContext<K extends string = string> {\n  /** The active tab's key. */\n  activeKey(): K;\n  /** The DOM id of the tab for `key` (a panel's `aria-labelledby`). */\n  tabId(key: K): string;\n  /** The DOM id of the panel for `key` (a tab's `aria-controls`). */\n  panelId(key: K): string;\n}\n\n/**\n * `<fold-tabs>` — the **in-page tabs widget** (the ARIA Tabs pattern): a\n * `role=\"tablist\"` of `role=\"tab\"` buttons that switch layered panels **without\n * navigating**. Arrow keys move between tabs (roving tabindex — only the active\n * tab is in the Tab order), `Home`/`End` jump to the ends, and each tab is wired\n * to its panel via `aria-controls` ↔ `aria-labelledby`.\n *\n * Pair it with one {@link FoldTabPanelComponent} per key, handed the bar via a\n * template ref so the two coordinate across slots (e.g. inside a\n * `fold-nav-layout`). Same visual as {@link FoldViewNavComponent}; the\n * difference is **semantics** — use `fold-tabs` for in-page panel switching, and\n * `fold-view-nav` when the tabs actually navigate (route) between views.\n *\n * `activeKey` is a two-way model — the single way to drive selection. Bind\n * `[(activeKey)]` and the bar writes the new key back on click / arrow keys:\n *\n * ```html\n * <fold-nav-layout>\n *   <fold-tabs tabNav #t=\"foldTabs\" [tabs]=\"tabs\" [(activeKey)]=\"tab\" />\n *   <fold-tab-panel [tabs]=\"t\" key=\"overview\">…</fold-tab-panel>\n *   <fold-tab-panel [tabs]=\"t\" key=\"settings\">…</fold-tab-panel>\n * </fold-nav-layout>\n * ```\n *\n * Same visual knobs as `fold-view-nav` (`activeStyle` · `direction` · `size` ·\n * `background`). Sizing shares the tab-bar tokens.\n *\n * @selector `fold-tabs`\n */\n@Component({\n  selector: \"fold-tabs\",\n  standalone: true,\n  exportAs: \"foldTabs\",\n  imports: [FoldIconComponent, FoldBadgeComponent, FoldTabTooltipDirective],\n  templateUrl: \"./tabs.component.html\",\n  styleUrl: \"./tabs.component.scss\",\n  host: {\n    \"[class.is-sticky]\": \"sticky()\",\n    // Orientation on the HOST, not just the bar: the SCSS needs it to stop a\n    // horizontal strip from stretching to a flex/grid parent's height.\n    \"[class.is-horizontal]\": \"resolvedDirection() === 'horizontal'\",\n  },\n})\nexport class FoldTabsComponent<\n  K extends string = string,\n> implements FoldTabsContext<K> {\n  /** The tabs to render, in order. */\n  readonly tabs = input.required<readonly FoldTabItem<K>[]>();\n  /**\n   * The `key` of the active tab (the shown panel), as a **two-way model** — the\n   * single source of selection. Bind `[(activeKey)]` and the bar writes the new\n   * key back on click / arrow keys; to *react* to a change without a writeback,\n   * listen to the model's `(activeKeyChange)`. There is no separate change\n   * output — the model is the one way.\n   */\n  readonly activeKey = model.required<K>();\n  /** How the active tab reads: accent underline, or accent fill. */\n  readonly activeStyle = input<\"underline\" | \"fill\">(\"underline\");\n  /**\n   * Bar orientation (drives `aria-orientation`). Defaults to `auto`: follows a\n   * wrapping `fold-nav-layout`, else `horizontal`.\n   */\n  readonly direction = input<\"horizontal\" | \"vertical\" | \"auto\">(\"auto\");\n  /** Density — see {@link FoldViewNavComponent} for the same scale. */\n  readonly size = input<\"compact\" | \"comfortable\">(\"compact\");\n\n  /**\n   * How items share the bar's width — a separate axis from {@link size}.\n   *\n   * - `start` (default) — each item takes the width of its own content.\n   * - `stretch` — items divide the bar's width equally (a bottom tab bar).\n   *\n   * `size` used to decide this in passing: `compact` stretched, `comfortable`\n   * hugged, while the prop documented itself as \"pure padding/typography\". One\n   * prop quietly steering two axes is the thing `button-icon`/`toggle-icon` and\n   * `view-nav`/`tabs` were each split apart to stop doing.\n   *\n   * Vertical bars ignore it — a rail stacks, it does not share a width.\n   */\n  readonly justify = input<\"start\" | \"stretch\">(\"start\");\n  /** Collapse to icons — see {@link FoldViewNavComponent.collapsed}. */\n  readonly collapsed = input(false, { transform: booleanAttribute });\n  /** `surface` (filled bar, default) or `transparent`. */\n  readonly background = input<\"transparent\" | \"surface\">(\"surface\");\n\n  /**\n   * Pin the bar to the top of its scroll container, so a long view can be\n   * navigated without scrolling back up. Pair it with the default\n   * `background=\"surface\"`: a `transparent` bar would let the content scroll\n   * through it. Bleeding the bar to the page's edges stays the page's business\n   * — the page owns the gutter.\n   */\n  readonly sticky = input(false, { transform: booleanAttribute });\n\n  /** The nearest layout, if any — lets `direction=\"auto\"` follow it. */\n  private readonly layout = inject(FOLD_NAV_LAYOUT, { optional: true });\n\n  /** `direction` with `auto` resolved against the wrapping layout. */\n\n  /** Which side a collapsed tooltip sits on: a rail pushes right, a bar down. */\n  protected readonly tooltipSide = computed<FoldPopoverSide>(() =>\n    this.resolvedDirection() === \"vertical\" ? \"right\" : \"bottom\",\n  );\n\n  /**\n   * True when this item's label is a TOOLTIP rather than inline text: every\n   * item on a collapsed rail, and every inactive one on a collapsed bar (the\n   * active one keeps its label inline).\n   *\n   * A tooltip label is `display: none` until shown — a `[popover]` is — so the\n   * item also takes an explicit `aria-label`. The old `opacity: 0` left the\n   * text in the accessibility tree; the top layer does not, and an icon with no\n   * name is worse than a clipped tooltip.\n   */\n  protected isTooltip(active: boolean): boolean {\n    return (\n      this.collapsed() && (this.resolvedDirection() === \"vertical\" || !active)\n    );\n  }\n\n  protected readonly resolvedDirection = computed<\"horizontal\" | \"vertical\">(\n    () => {\n      const d = this.direction();\n      if (d !== \"auto\") {\n        return d;\n      }\n      return this.layout?.stacked() ? \"horizontal\" : \"vertical\";\n    },\n  );\n\n  /** Per-instance id root, so ids are unique + stable across SSR. */\n  private readonly uid = inject(FoldIdService).next(\"fold-tabs\");\n  private readonly tabButtons =\n    viewChildren<ElementRef<HTMLButtonElement>>(\"tabBtn\");\n\n  tabId(key: K): string {\n    return `${this.uid}-tab-${key}`;\n  }\n  panelId(key: K): string {\n    return `${this.uid}-panel-${key}`;\n  }\n\n  protected select(key: K): void {\n    this.commit(key);\n  }\n\n  /** Records a new selection by writing the `activeKey` model — the two-way\n   *  binding (or its `activeKeyChange`) carries it to the parent. */\n  private commit(key: K): void {\n    this.activeKey.set(key);\n  }\n\n  /**\n   * Roving-tabindex keyboard model (APG Tabs, automatic activation): arrows move\n   * — and select — the adjacent tab, `Home`/`End` the ends. Both axes work, so\n   * it stays correct whether the bar is horizontal, vertical, or a\n   * mobile-collapsed vertical.\n   */\n  protected onKeydown(event: KeyboardEvent): void {\n    const keys = this.tabs().map((t) => t.key);\n    if (keys.length === 0) {\n      return;\n    }\n    const current = keys.indexOf(this.activeKey());\n    let target: number;\n    switch (event.key) {\n      case \"ArrowRight\":\n      case \"ArrowDown\":\n        target = (current + 1) % keys.length;\n        break;\n      case \"ArrowLeft\":\n      case \"ArrowUp\":\n        target = (current - 1 + keys.length) % keys.length;\n        break;\n      case \"Home\":\n        target = 0;\n        break;\n      case \"End\":\n        target = keys.length - 1;\n        break;\n      default:\n        return;\n    }\n    event.preventDefault();\n    const key = keys[target];\n    if (key === undefined) {\n      return;\n    }\n    this.commit(key);\n    this.tabButtons()[target]?.nativeElement.focus();\n  }\n}\n","<div\n  class=\"tab-bar\"\n  role=\"tablist\"\n  [attr.aria-orientation]=\"\n    resolvedDirection() === 'vertical' ? 'vertical' : 'horizontal'\n  \"\n  [class.style-underline]=\"activeStyle() === 'underline'\"\n  [class.style-fill]=\"activeStyle() === 'fill'\"\n  [class.dir-vertical]=\"resolvedDirection() === 'vertical'\"\n  [class.size-comfortable]=\"size() === 'comfortable'\"\n  [class.justify-stretch]=\"justify() === 'stretch'\"\n  [class.is-collapsed]=\"collapsed()\"\n  [class.bg-surface]=\"background() === 'surface'\"\n  (keydown)=\"onKeydown($event)\"\n>\n  @for (tab of tabs(); track tab.key) {\n    <button\n      #tabBtn\n      type=\"button\"\n      role=\"tab\"\n      class=\"tab-bar-item\"\n      [id]=\"tabId(tab.key)\"\n      [class.is-active]=\"activeKey() === tab.key\"\n      [attr.aria-selected]=\"activeKey() === tab.key\"\n      [attr.aria-controls]=\"panelId(tab.key)\"\n      [attr.aria-label]=\"isTooltip(activeKey() === tab.key) ? tab.label : null\"\n      [tabindex]=\"activeKey() === tab.key ? 0 : -1\"\n      (click)=\"select(tab.key)\"\n    >\n      @if (tab.icon; as ic) {\n        <fold-icon class=\"tab-bar-icon\" [name]=\"ic\" size=\"sm\" />\n      } @else if (collapsed()) {\n        <span class=\"tab-bar-icon tab-bar-initial\" aria-hidden=\"true\">{{\n          tab.label.charAt(0)\n        }}</span>\n      }\n      <span\n        class=\"tab-bar-label\"\n        [foldTabTooltip]=\"isTooltip(activeKey() === tab.key)\"\n        [tooltipSide]=\"tooltipSide()\"\n        >{{ tab.label }}</span\n      >\n      @if (tab.badge !== undefined && tab.badge !== null) {\n        <fold-badge\n          class=\"tab-bar-badge\"\n          [content]=\"tab.badge + ''\"\n          [variant]=\"activeKey() === tab.key ? 'accent' : 'neutral'\"\n        />\n      }\n    </button>\n  }\n</div>\n","import { Component, computed, input } from \"@angular/core\";\nimport type { FoldTabsContext } from \"./tabs.component\";\n\n/**\n * `<fold-tab-panel>` — one panel of a {@link FoldTabsComponent}. Handed the bar\n * via a template ref (`[tabs]=\"t\"`, where `#t=\"foldTabs\"`) plus its `key`, it\n * becomes a `role=\"tabpanel\"` named by its tab (`aria-labelledby`), reachable by\n * `aria-controls` from that tab, focusable while active, and `hidden` otherwise.\n *\n * The ref pairing is what lets the tabs bar and its panels sit in **different**\n * slots (e.g. the bar in a `fold-nav-layout`'s nav slot, the panels in its\n * content) and still coordinate.\n *\n * ```html\n * <fold-tabs #t=\"foldTabs\" [tabs]=\"tabs\" [(activeKey)]=\"tab\" />\n * <fold-tab-panel [tabs]=\"t\" key=\"overview\">…</fold-tab-panel>\n * ```\n *\n * @selector `fold-tab-panel`\n */\n@Component({\n  selector: \"fold-tab-panel\",\n  standalone: true,\n  host: {\n    role: \"tabpanel\",\n    \"[id]\": \"panelId()\",\n    \"[attr.aria-labelledby]\": \"labelledBy()\",\n    \"[attr.tabindex]\": \"isActive() ? 0 : null\",\n    \"[hidden]\": \"!isActive()\",\n  },\n  // A custom element is `display: inline` by default — an inline panel wrapping\n  // block content breaks height propagation inside a bounded flex column (e.g. a\n  // scrolling `fold-page-layout`), so the page stops scrolling. Make it a\n  // block-level flex column instead: same height propagation as a plain block,\n  // but it now owns the vertical rhythm between its stacked children (sections)\n  // — the panel *is* a content region, like `.page-body`. `--fold-panel-gap` sits\n  // one notch below the page gap; group two children in a wrapper to tighten them\n  // (a single child means no gap at all). Re-assert `[hidden]` since an author\n  // `display` overrides the UA hidden rule.\n  styles:\n    \":host{display:flex;flex-direction:column;gap:var(--fold-panel-gap)}\" +\n    \":host([hidden]){display:none}\",\n  template: \"<ng-content />\",\n})\nexport class FoldTabPanelComponent<K extends string = string> {\n  /** The owning `fold-tabs`, read via its template ref (`#t=\"foldTabs\"`). */\n  readonly tabs = input.required<FoldTabsContext<K>>();\n  /**\n   * This panel's tab key — must match one tab in the bar. When the bar is typed\n   * on a union of keys, a key outside it fails to compile instead of rendering a\n   * panel no tab can ever reach.\n   */\n  readonly key = input.required<K>();\n\n  protected readonly isActive = computed(\n    () => this.tabs().activeKey() === this.key(),\n  );\n  protected readonly panelId = computed(() => this.tabs().panelId(this.key()));\n  protected readonly labelledBy = computed(() => this.tabs().tabId(this.key()));\n}\n","import {\n  Component,\n  booleanAttribute,\n  computed,\n  effect,\n  input,\n  numberAttribute,\n  output,\n  signal,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport type { FoldToastVariant } from \"./toast.types\";\n\n/** Variant → leading status icon. */\nconst VARIANT_ICON: Record<FoldToastVariant, FoldIconName> = {\n  success: \"check-circle\",\n  info: \"info\",\n  warning: \"warning\",\n  error: \"x-circle\",\n};\n\n/**\n * `<fold-toast>` — a single frosted-glass snackbar: a variant status icon, the\n * message (projected), and an optional dismiss button. The stacking + queue\n * belong to `fold-toast-container` + {@link FoldToastService}; the toast itself\n * owns its **lifecycle** — it emits {@link dismiss} on its close button and, if\n * given a `duration`, auto-emits `dismiss` after it elapses (the timer is\n * cleared on destroy). `duration = 0` (the default) is sticky — it stays until\n * dismissed, so a standalone toast never vanishes unexpectedly.\n *\n * The countdown **pauses while the pointer is over the toast or the keyboard\n * focus is inside it**, and resumes with the time that was left (WCAG 2.2.1,\n * Timing Adjustable): a message must not expire while it is being read, nor\n * while the close button is being aimed at. `data-paused` exposes the state.\n *\n * The surface is the shared **glass** language; a left accent stripe + the icon\n * take the variant's `-text` tint (`info` uses the brand `primary` tint). It is\n * an `alert` (assertive) for `error`, a `status` (polite) otherwise.\n *\n * ```html\n * <fold-toast variant=\"success\" duration=\"3000\" (dismiss)=\"…\">Track uploaded</fold-toast>\n * ```\n *\n * @selector `fold-toast`\n */\n@Component({\n  selector: \"fold-toast\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  templateUrl: \"./toast.component.html\",\n  styleUrl: \"./toast.component.scss\",\n  host: {\n    \"[attr.data-variant]\": \"variant()\",\n    \"[attr.role]\": 'variant() === \"error\" ? \"alert\" : \"status\"',\n    \"[attr.aria-live]\": 'variant() === \"error\" ? \"assertive\" : \"polite\"',\n    \"[attr.data-paused]\": \"paused() ? '' : null\",\n    \"(mouseenter)\": \"hovered.set(true)\",\n    \"(mouseleave)\": \"hovered.set(false)\",\n    \"(focusin)\": \"focused.set(true)\",\n    \"(focusout)\": \"onFocusOut($event)\",\n  },\n})\nexport class FoldToastComponent {\n  /** The tone — drives the accent stripe, icon, and live-region politeness. */\n  readonly variant = input<FoldToastVariant>(\"info\");\n  /** Show the dismiss button. */\n  readonly dismissible = input(true, { transform: booleanAttribute });\n  /** Auto-dismiss after this many ms. `0` (default) is sticky — no timer. */\n  readonly duration = input(0, { transform: numberAttribute });\n  /**\n   * How many times this same message arrived. Above 1 it renders a `×N` tally\n   * and **restarts the countdown** — a message still recurring is a message\n   * still current, so it should not expire on the first occurrence's clock.\n   */\n  readonly repeat = input(1, { transform: numberAttribute });\n\n  /** Emitted on the close button, or when `duration` elapses. */\n  readonly dismiss = output();\n\n  /** The leading status icon for the current variant. */\n  readonly icon = computed<FoldIconName>(() => VARIANT_ICON[this.variant()]);\n\n  protected readonly hovered = signal(false);\n  protected readonly focused = signal(false);\n\n  /** The countdown is frozen — the toast is being read, or aimed at. */\n  protected readonly paused = computed(() => this.hovered() || this.focused());\n\n  /**\n   * How much time is left to run, and what it was granted for. Plain fields,\n   * not signals: nothing renders them, and a pause must not itself schedule a\n   * change-detection pass. The key is what distinguishes a **new** budget (a\n   * changed `duration`, or another occurrence of the message) from a mere\n   * pause — only the former refills it.\n   */\n  private budgetFor = \"\";\n  private remainingMs = 0;\n\n  constructor() {\n    // The toast owns its own expiry. The timer is (re)armed for whatever is\n    // LEFT of the budget, and every teardown — a pause, a new `duration`,\n    // destroy — spends the elapsed slice, so pausing and resuming can neither\n    // restart the countdown from scratch nor let it run on in the background.\n    effect((onCleanup) => {\n      const ms = this.duration();\n      const paused = this.paused();\n      const key = `${ms}:${this.repeat()}`;\n      if (this.budgetFor !== key) {\n        this.budgetFor = key;\n        this.remainingMs = ms;\n      }\n      if (ms <= 0 || paused) {\n        return;\n      }\n      const startedAt = Date.now();\n      const timer = setTimeout(() => this.dismiss.emit(), this.remainingMs);\n      onCleanup(() => {\n        clearTimeout(timer);\n        const elapsed = Date.now() - startedAt;\n        this.remainingMs = Math.max(0, this.remainingMs - elapsed);\n      });\n    });\n  }\n\n  /**\n   * Focus moving *within* the toast (message → close button) is not leaving it:\n   * without this check the pair of focusout/focusin events would resume the\n   * countdown for an instant on every internal hop.\n   */\n  protected onFocusOut(event: FocusEvent): void {\n    const host = event.currentTarget;\n    const next = event.relatedTarget;\n    if (host instanceof Node && next instanceof Node && host.contains(next)) {\n      return;\n    }\n    this.focused.set(false);\n  }\n}\n","<fold-icon class=\"toast-icon\" [name]=\"icon()\" [size]=\"16\" aria-hidden=\"true\" />\n\n<span class=\"toast-message\"><ng-content /></span>\n\n@if (repeat() > 1) {\n  <span class=\"toast-repeat\">×{{ repeat() }}</span>\n}\n\n@if (dismissible()) {\n  <button\n    class=\"toast-close\"\n    type=\"button\"\n    aria-label=\"Dismiss\"\n    (click)=\"dismiss.emit()\"\n  >\n    <fold-icon name=\"close\" [size]=\"14\" aria-hidden=\"true\" />\n  </button>\n}\n","import { InjectionToken, type Provider } from \"@angular/core\";\nimport type { FoldToastVariant } from \"./toast.types\";\n\n/**\n * App-level toast policy — how long a toast lives, and how many of them the\n * screen will carry. A `show()` call with no explicit duration resolves through\n * it (see {@link resolveToastDuration}).\n */\nexport type FoldToastConfig = {\n  /** Fallback for any variant without a per-variant entry. */\n  defaultDurationMs?: number;\n  /** Per-variant duration (ms) overrides. `0` = sticky (no auto-dismiss). */\n  durationByVariant?: Partial<Record<FoldToastVariant, number>>;\n  /**\n   * Hard cap on the stack. Beyond it the **oldest** toast is evicted — it has\n   * been on screen longest, so it is the one already read. Unset = no cap.\n   *\n   * Eviction rather than a waiting queue, deliberately: a queue drains only\n   * when a visible toast leaves, and a sticky one (an `error`, by default)\n   * never does — the backlog would sit behind it forever.\n   */\n  maxVisible?: number;\n  /**\n   * Collapse a message identical to one already on screen into a `×N` tally\n   * instead of stacking a copy (default `true`). A retry loop or an event storm\n   * otherwise buries the screen under the same sentence.\n   */\n  dedupe?: boolean;\n};\n\n/** DI token carrying the app's {@link FoldToastConfig}. Set via {@link provideFoldToasts}. */\nexport const FOLD_TOAST_CONFIG = new InjectionToken<FoldToastConfig>(\n  \"FOLD_TOAST_CONFIG\",\n);\n\n/**\n * Configure the toast duration policy at bootstrap (idiomatic, like\n * `provideFoldIcons` / `provideFoldPalette`):\n *\n * ```ts\n * providers: [\n *   provideFoldToasts({\n *     defaultDurationMs: 4000,\n *     durationByVariant: { success: 2000, error: 0 }, // 0 = sticky\n *   }),\n * ];\n * ```\n */\nexport function provideFoldToasts(config: FoldToastConfig): Provider {\n  return { provide: FOLD_TOAST_CONFIG, useValue: config };\n}\n\n/**\n * Package defaults when nothing is configured or passed — dwell scales with\n * severity, and an `error` is sticky (it must be dismissed, not missed). All\n * overridable via {@link provideFoldToasts} or an explicit `show()` argument.\n */\nexport const FOLD_BAKED_TOAST_DURATION_MS: Record<FoldToastVariant, number> = {\n  success: 3000,\n  info: 4000,\n  warning: 6000,\n  error: 0,\n};\n\n/**\n * Duration for a variant, most-specific first: `durationByVariant[variant]` →\n * `defaultDurationMs` → the baked default. A configured `0` stays sticky (`??`\n * only falls through on null/undefined).\n */\nexport function resolveToastDuration(\n  config: FoldToastConfig | null,\n  variant: FoldToastVariant,\n): number {\n  return (\n    config?.durationByVariant?.[variant] ??\n    config?.defaultDurationMs ??\n    FOLD_BAKED_TOAST_DURATION_MS[variant]\n  );\n}\n","import { Service, inject, signal } from \"@angular/core\";\nimport { FoldIdService } from \"../../../a11y/id.service\";\nimport { FOLD_TOAST_CONFIG, resolveToastDuration } from \"./toast.config\";\nimport type { FoldToast, FoldToastVariant } from \"./toast.types\";\n\n/**\n * Lightweight toast/snackbar service — the source of truth for the queue that\n * `fold-toast-container` renders. Fire-and-forget: `durationMs` rides on the\n * queued toast and the rendered `fold-toast` owns the auto-dismiss timer (it\n * emits back into {@link dismiss}); a click on its close button does the same.\n * `durationMs = 0` is sticky (no auto-dismiss — the user closes it).\n *\n * A `show()` with no explicit duration resolves it through the app's\n * {@link FoldToastConfig} (see {@link resolveToastDuration}); an explicit\n * argument always wins. That same config bounds the stack (`maxVisible`) and\n * collapses repeats (`dedupe`) — a screen full of one sentence tells the user\n * less than one line saying it happened twelve times.\n *\n * ```ts\n * const toast = inject(FoldToastService);\n * toast.show(\"Track uploaded\", \"success\"); // policy duration\n * toast.show(\"Analysis failed\", \"error\", 5000); // explicit override\n * const id = toast.show(\"Uploading…\", \"info\", 0); // sticky, dismissed by hand\n * toast.dismiss(id);\n * ```\n */\n@Service()\nexport class FoldToastService {\n  private readonly config = inject(FOLD_TOAST_CONFIG, { optional: true });\n  private readonly ids = inject(FoldIdService);\n  private readonly _toasts = signal<FoldToast[]>([]);\n\n  /** The active toasts, oldest first. Read by the container. */\n  readonly toasts = this._toasts.asReadonly();\n\n  /**\n   * Queue a toast and return its id, so the caller can dismiss it later (a\n   * sticky \"Uploading…\" that its own completion closes). A message collapsed\n   * into an existing toast returns **that** toast's id.\n   */\n  show(\n    message: string,\n    variant: FoldToastVariant = \"info\",\n    durationMs?: number,\n  ): string {\n    const existing = this.dedupeTarget(message, variant);\n    if (existing !== null) {\n      this.bumpRepeats(existing.id);\n      return existing.id;\n    }\n\n    const toast: FoldToast = {\n      // A counter, not `crypto.randomUUID()`: that one throws outright in a\n      // non-secure context (plain http off localhost), and the randomness buys\n      // nothing here — an id only has to be unique within this queue.\n      id: this.ids.next(\"fold-toast\"),\n      message,\n      variant,\n      durationMs: durationMs ?? resolveToastDuration(this.config, variant),\n      repeats: 1,\n    };\n\n    this._toasts.update((list) => this.capped([...list, toast]));\n    return toast.id;\n  }\n\n  dismiss(id: string): void {\n    this._toasts.update((list) => list.filter((t) => t.id !== id));\n  }\n\n  /** The live toast this message should fold into, or `null` to queue a new one. */\n  private dedupeTarget(\n    message: string,\n    variant: FoldToastVariant,\n  ): FoldToast | null {\n    if (this.config?.dedupe === false) {\n      return null;\n    }\n    const match = this._toasts().find(\n      (t) => t.message === message && t.variant === variant,\n    );\n    return match ?? null;\n  }\n\n  private bumpRepeats(id: string): void {\n    this._toasts.update((list) =>\n      list.map((t) => (t.id === id ? { ...t, repeats: t.repeats + 1 } : t)),\n    );\n  }\n\n  /** Trim the stack to `maxVisible`, dropping from the oldest end. */\n  private capped(list: FoldToast[]): FoldToast[] {\n    const max = this.config?.maxVisible;\n    if (max === undefined || max <= 0 || list.length <= max) {\n      return list;\n    }\n    return list.slice(list.length - max);\n  }\n}\n","import { Component, inject } from \"@angular/core\";\nimport { FoldToastComponent } from \"./toast.component\";\nimport { FoldToastService } from \"./toast.service\";\n\n/**\n * `<fold-toast-container>` — renders the {@link FoldToastService} queue as a stack\n * of `fold-toast` snackbars, bottom-right, above everything. Mount it **once**\n * (typically in the app shell's content region). It owns only the stacking and\n * positioning; each {@link FoldToastComponent} owns its own surface, and the\n * service handles auto-expiry. A toast's dismiss button removes it from the queue.\n *\n * @selector `fold-toast-container`\n */\n@Component({\n  selector: \"fold-toast-container\",\n  standalone: true,\n  imports: [FoldToastComponent],\n  host: { class: \"toast-host\" },\n  templateUrl: \"./toast-container.component.html\",\n  styleUrl: \"./toast-container.component.scss\",\n})\nexport class FoldToastContainerComponent {\n  readonly toastService = inject(FoldToastService);\n}\n","@for (toast of toastService.toasts(); track toast.id) {\n  <fold-toast\n    [variant]=\"toast.variant\"\n    [duration]=\"toast.durationMs\"\n    [repeat]=\"toast.repeats\"\n    animate.leave=\"toast-leaving\"\n    (dismiss)=\"toastService.dismiss(toast.id)\"\n    >{{ toast.message }}</fold-toast\n  >\n}\n","import {\n  Directive,\n  Renderer2,\n  ViewContainerRef,\n  effect,\n  inject,\n  input,\n} from \"@angular/core\";\nimport type { FoldComponentPanelDescriptor } from \"./panel.types\";\n\n/**\n * Mounts an imperatively-opened panel component inside the host: creates it with\n * the descriptor's injector (which provides its `FoldPanelRef`) and pushes the typed\n * `data` in via `setInput`. The component owns its own header/body/footer.\n *\n * ## The mounted host takes `display: contents`\n *\n * Without it the component's host element is a **single** flex child of the\n * panel column, so a projected `fold-panel-footer` is a grandchild — and its\n * `flex: none` (\"stays pinned while the body scrolls\") applied to nothing. The\n * footer scrolled away with the body and the panel's `overflow: hidden` clipped\n * it. Every consumer had to rediscover that its component must itself be a\n * full-height flex column; in one app, eleven panels out of twenty had, and the\n * nine that had not were quietly broken.\n *\n * `display: contents` removes that intermediate box, so the component's header,\n * body and footer become the panel column's **real** children and the chrome's\n * layout applies to them as documented.\n *\n * ⚠️ A box that isn't there paints nothing: a panel component that draws on its\n * own `:host` (background, border, padding) must move that onto an element\n * inside its template. Layout-only `:host` rules — the common case — simply\n * become redundant.\n */\n@Directive({ selector: \"[foldPanelComponentOutlet]\" })\nexport class FoldPanelComponentOutletDirective {\n  readonly descriptor = input.required<FoldComponentPanelDescriptor>({\n    alias: \"foldPanelComponentOutlet\",\n  });\n\n  private readonly viewContainer = inject(ViewContainerRef);\n  private readonly renderer = inject(Renderer2);\n\n  constructor() {\n    effect(() => {\n      const descriptor = this.descriptor();\n      this.viewContainer.clear();\n      const ref = this.viewContainer.createComponent(descriptor.component, {\n        injector: descriptor.injector,\n      });\n      // Via Renderer2 rather than `nativeElement.style` so this also runs where\n      // there is no DOM (SSR): the panel is rendered server-side like anything\n      // else, and a direct style write would throw there.\n      this.renderer.setStyle(ref.location.nativeElement, \"display\", \"contents\");\n      if (descriptor.data !== undefined) {\n        ref.setInput(\"data\", descriptor.data);\n      }\n    });\n  }\n}\n","/**\n * Handle to an imperatively-opened panel. The opener gets it back from\n * `FoldPanelHostService.open()`; the panel component gets the same instance via\n * `inject(FoldPanelRef)`. Either side calls `close(result)` — the panel is\n * dismissed and `closed` resolves with the (typed) result.\n */\nexport class FoldPanelRef<TResult = unknown> {\n  /** Resolves with the close result (or `undefined` if closed without one). */\n  readonly closed: Promise<TResult | undefined>;\n\n  private resolveClosed!: (result: TResult | undefined) => void;\n  private settled = false;\n\n  /**\n   * @param id     the panel's stable id — used to wire the dialog's accessible\n   *               name (`aria-labelledby` → the header's title `id`).\n   * @param dismiss removes the panel from the host.\n   */\n  constructor(\n    readonly id: number,\n    private readonly dismiss: (result: TResult | undefined) => void,\n  ) {\n    this.closed = new Promise((resolve) => {\n      this.resolveClosed = resolve;\n    });\n  }\n\n  /** Dismiss the panel, returning an optional result to the opener. */\n  close(result?: TResult): void {\n    if (this.settled) {\n      return;\n    }\n    this.settled = true;\n    this.dismiss(result);\n    this.resolveClosed(result);\n  }\n}\n","import { InjectionToken, type Provider } from \"@angular/core\";\n\n/**\n * App-wide default for a panel header's close-button label. Lets a non-English\n * app set the label **once** — every `fold-panel-header` (the host's template\n * panels and each feature's component panel) reads it, so there is no per-panel\n * wiring. A `closeLabel` input on a specific header still wins.\n */\nexport const FOLD_PANEL_CLOSE_LABEL = new InjectionToken<string>(\n  \"FOLD_PANEL_CLOSE_LABEL\",\n  { factory: () => \"Close\" },\n);\n\n/** Overridable panel labels. */\nexport interface FoldPanelLabels {\n  /** Close-button accessible label. */\n  readonly close: string;\n}\n\n/**\n * Provide app-wide panel labels once at bootstrap.\n *\n * @example\n * ```ts\n * // app.config.ts\n * providers: [provideFoldPanelLabels({ close: \"Fermer\" })];\n * ```\n */\nexport function provideFoldPanelLabels(labels: FoldPanelLabels): Provider {\n  return { provide: FOLD_PANEL_CLOSE_LABEL, useValue: labels.close };\n}\n","import type {\n  Injector,\n  Provider,\n  Signal,\n  TemplateRef,\n  Type,\n} from \"@angular/core\";\n\n/**\n * Which layout edge the panel slides in from.\n * - `right` (default) / `left` — a vertical side sheet, full height.\n * - `bottom` — a bottom sheet: full width, height driven by content up to a\n *   max-height with internal scroll; slides up. The mobile-native shape, with a\n *   top grabber that taps to dismiss.\n * - `auto` — **right on a wide container, bottom on a narrow one**. The switch is\n *   container-driven (keyed off the panel host's own width via `@container`, not\n *   the viewport), honouring fold's \"responsive on its own width\" contract.\n * - `center` — a **modal dialog**, centred in the VIEWPORT over a scrim. Not an\n *   edge at all, and deliberately so: it completes this axis instead of growing\n *   a second overlay component, because everything a dialog needs — the focus\n *   trap, the `inert` barrier, the scroll lock, the accessible name, Escape,\n *   the typed `open<TData, TResult>()` handle — already lives here. A dialog\n *   that duplicated all of it would be the same machinery audited twice.\n *\n *   🔴 The only one that leaves the content region. The other sides dock\n *   `absolute` inside it, so they sit under the app's header and rails, which\n *   is right for a sheet that works *beside* the page. A dialog interrupts the\n *   page: it is `fixed`, it covers the chrome, and it carries a scrim — the\n *   one shape here that dims what it suspends.\n */\nexport type FoldPanelSide = \"left\" | \"right\" | \"bottom\" | \"auto\" | \"center\";\n\n/**\n * Panel surface treatment.\n * - `glass` (default) — frosted, translucent; the page shows through.\n * - `solid` — opaque surface (`--fold-color-surface-card`), no `backdrop-filter`.\n *   Prefer it for content that must stay legible over any background (a cart,\n *   a long form) or when a design wants a plain white sheet.\n */\nexport type FoldPanelSurface = \"glass\" | \"solid\";\n\n/**\n * Named panel widths — a token scale instead of a magic pixel number.\n * `sm` 360 · `md` 490 (the default) · `lg` 640 · `xl` 820. `width` still accepts\n * a raw `number` for the rare bespoke case.\n */\nexport type FoldPanelSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\n/**\n * The defaultable slice of a panel's configuration — the options that describe\n * *how a panel behaves and looks* (not *what* it carries). Every field is\n * resolved through a three-layer cascade, highest priority first:\n *\n * 1. the per-call `open()` config — an explicit one-off,\n * 2. the component's own {@link FoldPanelDefaultsProvider.foldPanel} static —\n *    the panel's **intrinsic** shape (a cart *is* non-modal + solid),\n * 3. the app-wide `FOLD_PANEL_DEFAULTS` token — the product's **identity**\n *    (e.g. \"every panel here is solid\").\n *\n * `data`, `providers`, `stack` and `ariaLabel` are deliberately absent: they are\n * per-call concerns, never a default.\n */\nexport interface FoldPanelDefaults {\n  readonly side?: FoldPanelSide;\n  /** A `number` (px) or a named {@link FoldPanelSize}. */\n  readonly width?: number | FoldPanelSize;\n  readonly modal?: boolean;\n  readonly surface?: FoldPanelSurface;\n  /**\n   * Suppress the host's *implicit* dismiss gestures — `Escape` and a backdrop\n   * click. The header close button and `FoldPanelRef.close()` still work, so a\n   * panel with unsaved edits can guard the casual close yet stay closeable on\n   * purpose. Default `false`.\n   */\n  readonly disableClose?: boolean;\n}\n\n/**\n * The static-side contract a panel component may implement to declare its\n * intrinsic shape once, on the class, instead of at every call site. `open()`\n * reads it automatically.\n *\n * @example\n * ```ts\n * export class CartPanel implements FoldPanelContent<CartData> {\n *   static readonly foldPanel: FoldPanelDefaults = { modal: false, surface: \"solid\" };\n * }\n * // call site is now just the *what*:\n * host.open(CartPanel, { data });\n * ```\n */\nexport interface FoldPanelDefaultsProvider {\n  readonly foldPanel: FoldPanelDefaults;\n}\n\n/** Fields common to every panel the host renders. */\ninterface PanelBase {\n  readonly id: number;\n  readonly side: FoldPanelSide;\n  readonly width: Signal<number>;\n  /** Invoked on Escape, backdrop click, or the header close button. */\n  readonly onClose: () => void;\n  /**\n   * Modal (default `true`): the host freezes page scroll, marks the background\n   * `inert`, traps focus, and a backdrop click dismisses the panel. `false` for\n   * a **non-modal** panel — the page keeps scrolling and stays interactive\n   * behind it, focus is not trapped, and clicking outside does **not** close it\n   * (only the header/`Escape`/`close()` do). `undefined` is treated as modal.\n   */\n  readonly modal?: boolean;\n  /** Surface treatment; defaults to `glass`. See {@link FoldPanelSurface}. */\n  readonly surface?: FoldPanelSurface;\n  /** Suppress Escape + backdrop dismissal. See {@link FoldPanelDefaults.disableClose}. */\n  readonly disableClose?: boolean;\n}\n\n/**\n * Declarative panel: a projected `TemplateRef` plus reactive header metadata.\n * Title/subtitle are `Signal`s so the shared header stays in sync with the\n * caller's `title()`/`subtitle()` inputs with zero manual wiring.\n */\nexport interface FoldTemplatePanelDescriptor extends PanelBase {\n  readonly kind: \"template\";\n  readonly templateRef: TemplateRef<unknown>;\n  readonly title: Signal<string>;\n  readonly subtitle: Signal<string>;\n}\n\n/**\n * Imperative panel: a component the host mounts. The component owns its own\n * header/body/footer (so rich panels like the org-chart node settings keep\n * their exact design); the host provides only the shell + a {@link FoldPanelRef}.\n */\nexport interface FoldComponentPanelDescriptor extends PanelBase {\n  readonly kind: \"component\";\n  readonly component: Type<unknown>;\n  /** Typed at the `open()` boundary; set via `setInput` when present. */\n  readonly data?: unknown;\n  /** Injector that provides the panel's `FoldPanelRef` (+ any config providers). */\n  readonly injector: Injector;\n  /**\n   * Explicit accessible name. Optional: a panel that renders `fold-panel-header`\n   * is named automatically (the dialog's `aria-labelledby` points at the\n   * header's title). Set this only for a component panel that has no\n   * `fold-panel-header` to label it. (Carried straight from `config.ariaLabel`,\n   * hence the explicit `| undefined`.)\n   */\n  readonly ariaLabel?: string | undefined;\n}\n\nexport type FoldPanelDescriptor =\n  FoldTemplatePanelDescriptor | FoldComponentPanelDescriptor;\n\n/**\n * A component opened imperatively. Data-carrying panels declare a typed `data`\n * input; data-less panels (e.g. a help panel) simply omit it.\n *\n * `data` is typed as the **read** side (`Signal`), covariant, not the invariant\n * `InputSignal` — so a panel whose data input is *optional* (`data = input<T>()`\n * → `InputSignal<T | undefined>`) satisfies `FoldPanelContent<T>` just as a\n * required one (`input.required<T>()`) does. That's what lets `open(Cmp, { data })`\n * infer `T` from the value without the caller widening to `<T | undefined>`.\n */\nexport interface FoldPanelContent<TData> {\n  readonly data?: Signal<TData | undefined>;\n}\n\n/** Options for `FoldPanelHostService.open()`. */\nexport interface FoldPanelConfig<TData> {\n  /** Type-checked against the component's `data` input; omit for data-less panels. */\n  readonly data?: TData;\n  readonly side?: FoldPanelSide;\n  /** A `number` (px) or a named {@link FoldPanelSize}; defaults to `md` (490). */\n  readonly width?: number | FoldPanelSize;\n  /** Extra providers added to the panel's injector (panel-scoped data bus, etc.). */\n  readonly providers?: Provider[];\n  /**\n   * Keep any already-open panels instead of replacing them. Default `false`:\n   * one panel at a time — opening a new panel closes the current one.\n   */\n  readonly stack?: boolean;\n  /**\n   * Explicit accessible name for the dialog. Only needed when the panel does\n   * **not** render `fold-panel-header` (which names the dialog automatically).\n   */\n  readonly ariaLabel?: string;\n  /**\n   * Modal barrier. Default `true` (scroll-lock + `inert` background + focus-trap\n   * + backdrop-click dismiss). Set `false` for a non-modal panel: the page keeps\n   * scrolling and stays interactive, focus isn't trapped, and an outside click\n   * does not dismiss it.\n   */\n  readonly modal?: boolean;\n  /** Surface treatment ({@link FoldPanelSurface}); defaults to `glass`. */\n  readonly surface?: FoldPanelSurface;\n  /**\n   * Suppress the host's implicit dismiss gestures (`Escape` + backdrop click).\n   * The header close button and `FoldPanelRef.close()` still close the panel.\n   * Defaults to `false`. See {@link FoldPanelDefaults.disableClose}.\n   */\n  readonly disableClose?: boolean;\n}\n\n/** The DOM `id` of a panel's title, referenced by the dialog's `aria-labelledby`. */\nexport function foldPanelTitleId(panelId: number): string {\n  return `fold-panel-title-${panelId}`;\n}\n\n/** Handle returned by `present()`; the caller dismisses via `dismiss()`. */\nexport interface FoldPanelHandle {\n  readonly id: number;\n  dismiss(): void;\n}\n","import { Component, computed, inject, input, output } from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\nimport { FoldPanelRef } from \"./panel-ref\";\nimport { FOLD_PANEL_CLOSE_LABEL } from \"./panel-labels\";\nimport { foldPanelTitleId } from \"./panel.types\";\n\n/**\n * Standard header for an **imperative** panel component (`panels.open()`), which\n * owns its own header/body/footer — the chrome renders no header for it. This\n * reproduces the chrome's declarative-panel header (title + optional subtitle +\n * close) so every component panel gets the same look without hand-rolling it.\n *\n * **Two variants.**\n * - `title` (default) — a large descriptive title for *editor* panels (a form,\n *   an entity's settings): `title` + optional `subtitle` + projected description.\n * - `eyebrow` — a compact, uppercased, muted *category label* for *viewer*\n *   panels (a page-like entity with cross-navigation): `icon` + short label,\n *   with header actions sitting inline before the close.\n *\n * **Icon.** Optional leading `icon` (an {@link FoldIconComponent} name), shown in\n * both variants — muted in `eyebrow`.\n *\n * **Actions slot.** Project buttons into `[actions]` to sit left of the close\n * button (e.g. a cross-page-nav, an \"open full page\" button). The default,\n * unselected slot still feeds the description line (backwards compatible).\n *\n * **Self-closing.** The header injects its panel's {@link FoldPanelRef} (optional,\n * so it stays a pure presentational component in tests/storybook) and dismisses\n * the panel itself on close — no `(closed)=\"ref.close()\"` wiring needed. The\n * `(closed)` output still fires *before* the dismiss, for side-effects\n * (analytics, cleanup); it does **not** veto the close.\n *\n * **Layout.** Left-aligned. A title-only header (no subtitle, no projected\n * description) is *vertically* centred against the close button; add a subtitle\n * and/or project a description and the row switches to top-aligned. The\n * `eyebrow` variant is always vertically centred.\n *\n * Usage:\n * ```html\n * <!-- editor panel: title only → vertically centred, self-closes -->\n * <fold-panel-header title=\"Titre\" />\n *\n * <!-- editor panel: subtitle + a parent-filled description -->\n * <fold-panel-header title=\"Titre\" subtitle=\"Sous-titre\">\n *   <span>Texte d'aide fourni par le parent…</span>\n * </fold-panel-header>\n *\n * <!-- viewer panel: eyebrow label + icon + projected actions -->\n * <fold-panel-header variant=\"eyebrow\" icon=\"playlist-add\" title=\"Playlist\">\n *   <app-cross-page-nav actions … />\n * </fold-panel-header>\n * ```\n */\n@Component({\n  selector: \"fold-panel-header\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  // `title` is a heading input — strip the native attribute a static\n  // `title=\"…\"` leaves behind, so it never doubles as a browser tooltip.\n  host: { \"[attr.title]\": \"null\" },\n  templateUrl: \"./panel-header.component.html\",\n  styleUrl: \"./panel-header.component.scss\",\n})\nexport class FoldPanelHeaderComponent {\n  readonly title = input.required<string>();\n  readonly subtitle = input<string>(\"\");\n  /** Optional leading icon (an {@link FoldIconComponent} name). */\n  readonly icon = input<FoldIconName | undefined>(undefined);\n  /** `title` (large descriptive) or `eyebrow` (compact uppercased label). */\n  readonly variant = input<\"title\" | \"eyebrow\">(\"title\");\n  /**\n   * Accessible label for the close button. Falls back to the app-wide\n   * {@link FOLD_PANEL_CLOSE_LABEL} (default `\"Close\"`) when unset — so a\n   * non-English app sets it once via `provideFoldPanelLabels`.\n   */\n  readonly closeLabel = input<string>();\n\n  private readonly defaultCloseLabel = inject(FOLD_PANEL_CLOSE_LABEL);\n\n  /** The label actually rendered — the input if given, else the app default. */\n  protected readonly effectiveCloseLabel = computed(\n    () => this.closeLabel() ?? this.defaultCloseLabel,\n  );\n  /**\n   * Fires just before the panel is dismissed — bind it for side-effects only\n   * (the header self-closes regardless; it is not a veto hook).\n   */\n  readonly closed = output();\n\n  protected readonly iconSize = computed(() =>\n    this.variant() === \"eyebrow\" ? 14 : 18,\n  );\n\n  /**\n   * The panel this header lives in. Optional: outside a panel (tests,\n   * storybook) it resolves to `null` and the header simply emits `(closed)`.\n   */\n  private readonly panelRef = inject(FoldPanelRef, { optional: true });\n\n  /**\n   * The title's DOM `id`, so the dialog's `aria-labelledby` can point at it —\n   * this is what gives a component panel its accessible name. `null` outside a\n   * panel (no ref to key the id on).\n   */\n  protected readonly titleId = computed<string | null>(() =>\n    this.panelRef ? foldPanelTitleId(this.panelRef.id) : null,\n  );\n\n  protected onClose(): void {\n    this.closed.emit();\n    this.panelRef?.close();\n  }\n}\n","<header class=\"ph\" [class.ph--eyebrow]=\"variant() === 'eyebrow'\">\n  <div class=\"ph__titles\">\n    <div class=\"ph__titleRow\">\n      @if (icon(); as ic) {\n        <fold-icon class=\"ph__icon\" [name]=\"ic\" [size]=\"iconSize()\" />\n      }\n      <h2 class=\"ph__title\" [attr.id]=\"titleId()\">{{ title() }}</h2>\n    </div>\n    @if (subtitle()) {\n      <p class=\"ph__subtitle\">{{ subtitle() }}</p>\n    }\n    <div class=\"ph__desc\"><ng-content /></div>\n  </div>\n  <div class=\"ph__actions\">\n    <ng-content select=\"[actions]\" />\n    <button\n      type=\"button\"\n      class=\"ph__close\"\n      [attr.aria-label]=\"effectiveCloseLabel()\"\n      (click)=\"onClose()\"\n    >\n      <fold-icon name=\"close\" size=\"sm\" />\n    </button>\n  </div>\n</header>\n","import { InjectionToken, type Provider, type Type } from \"@angular/core\";\nimport type {\n  FoldPanelDefaults,\n  FoldPanelDefaultsProvider,\n  FoldPanelSize,\n} from \"./panel.types\";\n\n/** The named width scale, in pixels. `md` is the historical default (490). */\nconst PANEL_SIZE_PX: Record<FoldPanelSize, number> = {\n  sm: 360,\n  md: 490,\n  lg: 640,\n  xl: 820,\n};\n\n/** Resolve a `width` (px number or named size) to pixels; `undefined` → `md`. */\nexport function panelWidthPx(\n  width: number | FoldPanelSize | undefined,\n): number {\n  if (typeof width === \"number\") {\n    return width;\n  }\n  return PANEL_SIZE_PX[width ?? \"md\"];\n}\n\n/**\n * App-wide panel defaults — the base layer of the cascade (see\n * {@link FoldPanelDefaults}). Provide it once at bootstrap to give every panel a\n * product-level identity (e.g. \"our panels are solid, and dock left\"); a\n * component's static `foldPanel` and a per-call `open()` option both win over it.\n */\nexport const FOLD_PANEL_DEFAULTS = new InjectionToken<FoldPanelDefaults>(\n  \"FOLD_PANEL_DEFAULTS\",\n);\n\n/**\n * Provide app-wide panel defaults once at bootstrap.\n *\n * @example\n * ```ts\n * // app.config.ts\n * providers: [provideFoldPanelDefaults({ surface: \"solid\" })];\n * ```\n */\nexport function provideFoldPanelDefaults(\n  defaults: FoldPanelDefaults,\n): Provider {\n  return { provide: FOLD_PANEL_DEFAULTS, useValue: defaults };\n}\n\n/**\n * Type-guard: does this class declare a static `foldPanel` object? Uses `in`\n * narrowing (no type assertion) so the property is reachable, then checks it is\n * a non-null object before trusting it as {@link FoldPanelDefaults}.\n */\nfunction declaresPanelDefaults(\n  component: Type<unknown>,\n): component is Type<unknown> & FoldPanelDefaultsProvider {\n  return (\n    \"foldPanel\" in component &&\n    component.foldPanel !== null &&\n    typeof component.foldPanel === \"object\"\n  );\n}\n\n/** Read a component's static `foldPanel` shape, or `{}` if it declares none. */\nexport function readComponentPanelDefaults(\n  component: Type<unknown>,\n): FoldPanelDefaults {\n  return declaresPanelDefaults(component) ? component.foldPanel : {};\n}\n","import { Injector, Service, type Type, inject, signal } from \"@angular/core\";\nimport { FoldPanelRef } from \"./panel-ref\";\nimport {\n  FOLD_PANEL_DEFAULTS,\n  panelWidthPx,\n  readComponentPanelDefaults,\n} from \"./panel-defaults\";\nimport type {\n  FoldComponentPanelDescriptor,\n  FoldPanelConfig,\n  FoldPanelContent,\n  FoldPanelDescriptor,\n  FoldPanelHandle,\n  FoldPanelSide,\n  FoldPanelSize,\n  FoldPanelSurface,\n  FoldTemplatePanelDescriptor,\n} from \"./panel.types\";\n\n/**\n * The per-call config with the cascadable fields resolved. They widen to\n * `| undefined` because a layer may leave them unset — `open()` applies the\n * literal floor (`right`/`md`/modal/`glass`/closeable) when building the\n * descriptor.\n */\ntype ResolvedPanelConfig = Omit<\n  FoldPanelConfig<unknown>,\n  \"side\" | \"width\" | \"modal\" | \"surface\" | \"disableClose\"\n> & {\n  readonly side: FoldPanelSide | undefined;\n  readonly width: number | FoldPanelSize | undefined;\n  readonly modal: boolean | undefined;\n  readonly surface: FoldPanelSurface | undefined;\n  readonly disableClose: boolean | undefined;\n};\n\n/**\n * Single source of truth for the layout-owned side-panel region.\n *\n * Two ways to hand a panel to the one host, both rendered through the same\n * `FoldPanelHostComponent` (backdrop, z-index, animation, scroll-lock, focus-trap):\n *\n * - **`open()` — the canonical, imperative API.** Open a component with a typed\n *   `data` input; get a {@link FoldPanelRef} back for the result. No opaque token.\n * - **`present()` — declarative sugar** used by a `<side-panel>` wrapper to\n *   teleport a projected template. Kept for page-coupled form drawers.\n */\n@Service()\nexport class FoldPanelHostService {\n  private readonly rootInjector = inject(Injector);\n  private readonly hostDefaults = inject(FOLD_PANEL_DEFAULTS, {\n    optional: true,\n  });\n  private nextId = 1;\n  private readonly _panels = signal<readonly FoldPanelDescriptor[]>([]);\n\n  /** The active panels, oldest first. Read by the layout host. */\n  readonly panels = this._panels.asReadonly();\n\n  // Data-carrying panel: `config.data` is type-checked against the component's\n  // `data` input. `FoldPanelContent`'s `data` is the covariant read side\n  // (`Signal<TData | undefined>`), so a panel whose data input is **optional**\n  // (`data = input<T>()`) is accepted without forcing the caller to spell\n  // `open<T | undefined, R>()`; `config.data` still has to be a present `TData`.\n  open<TData, TResult = unknown>(\n    component: Type<FoldPanelContent<TData>>,\n    config: FoldPanelConfig<TData> & { data: TData },\n  ): FoldPanelRef<TResult>;\n  // Data-less panel (its data, if any, comes via `config.providers`).\n  open<TResult = unknown>(\n    component: Type<unknown>,\n    config?: Omit<FoldPanelConfig<never>, \"data\">,\n  ): FoldPanelRef<TResult>;\n  open<TResult = unknown>(\n    component: Type<unknown>,\n    config: FoldPanelConfig<unknown> = {},\n  ): FoldPanelRef<TResult> {\n    const id = this.takeId();\n    const resolved = this.resolveConfig(component, config);\n    const ref = new FoldPanelRef<TResult>(id, () => this.dismiss(id));\n    const injector = Injector.create({\n      parent: this.rootInjector,\n      providers: [\n        { provide: FoldPanelRef, useValue: ref },\n        ...(resolved.providers ?? []),\n      ],\n    });\n    const descriptor: FoldComponentPanelDescriptor = {\n      kind: \"component\",\n      id,\n      component,\n      data: resolved.data,\n      side: resolved.side ?? \"right\",\n      width: signal(panelWidthPx(resolved.width)),\n      injector,\n      ariaLabel: resolved.ariaLabel,\n      modal: resolved.modal ?? true,\n      surface: resolved.surface ?? \"glass\",\n      disableClose: resolved.disableClose ?? false,\n      onClose: () => ref.close(),\n    };\n    if (!resolved.stack) {\n      this.closeExisting();\n    }\n    this.add(descriptor);\n    return ref;\n  }\n\n  /**\n   * Merge the three default layers into the effective config, highest priority\n   * first: the per-call `config`, then the component's static `foldPanel`, then\n   * the app-wide `FOLD_PANEL_DEFAULTS`. Only the defaultable fields cascade —\n   * `data`/`providers`/`stack`/`ariaLabel` pass straight through from `config`.\n   */\n  private resolveConfig(\n    component: Type<unknown>,\n    config: FoldPanelConfig<unknown>,\n  ): ResolvedPanelConfig {\n    const fromComponent = readComponentPanelDefaults(component);\n    const fromHost = this.hostDefaults ?? {};\n    return {\n      ...config,\n      side: config.side ?? fromComponent.side ?? fromHost.side,\n      width: config.width ?? fromComponent.width ?? fromHost.width,\n      modal: config.modal ?? fromComponent.modal ?? fromHost.modal,\n      surface: config.surface ?? fromComponent.surface ?? fromHost.surface,\n      disableClose:\n        config.disableClose ??\n        fromComponent.disableClose ??\n        fromHost.disableClose,\n    };\n  }\n\n  /**\n   * Register a declarative (projected-template) panel; returns a handle. These\n   * are self-managed by their `<fold-side-panel>`'s `[open]` binding, so they are\n   * not subject to the imperative single-panel replacement.\n   */\n  present(\n    descriptor: Omit<FoldTemplatePanelDescriptor, \"id\" | \"kind\">,\n  ): FoldPanelHandle {\n    const id = this.takeId();\n    this.add({ ...descriptor, kind: \"template\", id });\n    return { id, dismiss: () => this.dismiss(id) };\n  }\n\n  /**\n   * Close every open panel through its own `onClose` — so each opener's\n   * `FoldPanelRef`/toggle settles — before a new single panel takes over. Iterates\n   * a snapshot, so the `onClose`-driven removals don't disturb the loop.\n   */\n  private closeExisting(): void {\n    for (const panel of this._panels()) {\n      panel.onClose();\n    }\n  }\n\n  /** Remove a panel by id (idempotent — dismissing twice is safe). */\n  dismiss(id: number): void {\n    this._panels.update((list) => list.filter((panel) => panel.id !== id));\n  }\n\n  /** Dismiss every open panel (e.g. on a hard navigation / logout). */\n  dismissAll(): void {\n    this._panels.set([]);\n  }\n\n  private takeId(): number {\n    const id = this.nextId;\n    this.nextId += 1;\n    return id;\n  }\n\n  private add(descriptor: FoldPanelDescriptor): void {\n    this._panels.update((list) => [...list, descriptor]);\n  }\n}\n","import { DOCUMENT, NgTemplateOutlet } from \"@angular/common\";\nimport {\n  Component,\n  DestroyRef,\n  ElementRef,\n  HostListener,\n  effect,\n  inject,\n} from \"@angular/core\";\nimport { FocusTrapDirective } from \"../../../a11y/focus-trap.directive\";\nimport { ScrollLockService } from \"../../../a11y/scroll-lock.service\";\nimport { ScrollRegionRegistry } from \"../../../a11y/scroll-region-registry.service\";\nimport { FoldPanelComponentOutletDirective } from \"./panel-component-outlet.directive\";\nimport { FoldPanelHeaderComponent } from \"./panel-header.component\";\nimport { FoldPanelHostService } from \"./panel-host.service\";\nimport { FOLD_PANEL_CLOSE_LABEL } from \"./panel-labels\";\nimport { foldPanelTitleId } from \"./panel.types\";\nimport type {\n  FoldPanelDescriptor,\n  FoldPanelSide,\n  FoldPanelSurface,\n} from \"./panel.types\";\n\n/**\n * `<fold-panel-host>` — the single, layout-owned chrome for every side panel.\n *\n * Rendered **once** in the content region (typically inside the app shell). It\n * reads the {@link FoldPanelHostService} panels and wraps each in a **glass**\n * slide-in `<aside>` (no dark scrim — the surface itself is frosted),\n * `z-index: 50` stacking, focus-trap and body scroll-lock.\n *\n * Two content shapes:\n * - **template** — a projected `<side-panel>` body; the host supplies the shared\n *   header (title/subtitle/close).\n * - **component** — an imperatively-opened component that owns its whole\n *   header/body/footer; the host supplies only the shell.\n *\n * **Modal barrier.** While any panel is open, everything outside the panel is\n * marked `inert` (a `hideOthers` walk from the host up to `<body>`), so the\n * background is unreachable by pointer, Tab **and** the screen-reader virtual\n * cursor — the completion of the `aria-modal=\"true\"` promise. Only the\n * top-most panel traps focus; the page scroll is frozen once, not per panel.\n *\n * @selector `fold-panel-host`\n */\n@Component({\n  selector: \"fold-panel-host\",\n  standalone: true,\n  imports: [\n    NgTemplateOutlet,\n    FocusTrapDirective,\n    FoldPanelComponentOutletDirective,\n    FoldPanelHeaderComponent,\n  ],\n  templateUrl: \"./panel-host.component.html\",\n  styleUrl: \"./panel-host.component.scss\",\n})\nexport class FoldPanelHostComponent {\n  private readonly host = inject(FoldPanelHostService);\n  private readonly scrollLock = inject(ScrollLockService);\n  private readonly scrollRegions = inject(ScrollRegionRegistry);\n  private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n  private readonly document = inject(DOCUMENT);\n\n  readonly panels = this.host.panels;\n\n  private locked = false;\n  /** Elements this host made `inert`, so it removes exactly those on close. */\n  private inerted: HTMLElement[] = [];\n\n  constructor() {\n    // Freeze page scroll + inert the background while a **modal** panel is open\n    // — once, driven by whether any open panel is modal. A purely non-modal\n    // panel leaves the page scrollable and interactive.\n    effect(() => {\n      const barrier = this.panels().some((p) => p.modal !== false);\n      if (barrier && !this.locked) {\n        this.scrollLock.lock();\n        // Freeze the shell's own scroll box + every foldScrollRegion too: in a\n        // shell the scroll owner is an inner box, not `body`, so the body lock\n        // alone would leave the page scrolling behind the modal.\n        this.scrollRegions.freeze();\n        this.applyBackgroundBarrier();\n        this.locked = true;\n      } else if (!barrier && this.locked) {\n        this.scrollLock.unlock();\n        this.scrollRegions.unfreeze();\n        this.removeBackgroundBarrier();\n        this.locked = false;\n      }\n    });\n\n    inject(DestroyRef).onDestroy(() => {\n      if (this.locked) {\n        this.scrollLock.unlock();\n        this.scrollRegions.unfreeze();\n        this.removeBackgroundBarrier();\n        this.locked = false;\n      }\n    });\n  }\n\n  /** Explicit `aria-label`, or null when the name comes from `aria-labelledby`. */\n  ariaLabel(panel: FoldPanelDescriptor): string | null {\n    if (panel.kind === \"template\") {\n      return panel.title();\n    }\n    return panel.ariaLabel ?? null;\n  }\n\n  /**\n   * `aria-labelledby` id for a component panel with no explicit label — points\n   * at the `fold-panel-header` title. Null for template panels (they use\n   * `aria-label`) and for component panels given an explicit `ariaLabel`.\n   */\n  ariaLabelledby(panel: FoldPanelDescriptor): string | null {\n    if (panel.kind === \"component\" && !panel.ariaLabel) {\n      return foldPanelTitleId(panel.id);\n    }\n    return null;\n  }\n\n  /** Only the last-opened panel traps focus, so stacked panels don't fight. */\n  isTopMost(panel: FoldPanelDescriptor): boolean {\n    const panels = this.panels();\n    const top = panels[panels.length - 1];\n    return top?.id === panel.id;\n  }\n\n  /** A panel is modal unless it explicitly opts out (`modal: false`). */\n  isModal(panel: FoldPanelDescriptor): boolean {\n    return panel.modal !== false;\n  }\n\n  /** Trap focus only for the top-most **modal** panel. */\n  shouldTrap(panel: FoldPanelDescriptor): boolean {\n    return this.isModal(panel) && this.isTopMost(panel);\n  }\n\n  /** Surface treatment for the panel shell; defaults to `glass`. */\n  panelSurface(panel: FoldPanelDescriptor): FoldPanelSurface {\n    return panel.surface ?? \"glass\";\n  }\n\n  /** The edge the panel docks to; defaults to `right`. `auto` is resolved to\n   *  right/bottom by the CSS `@container` on the host's own width, not here. */\n  panelSide(panel: FoldPanelDescriptor): FoldPanelSide {\n    return panel.side ?? \"right\";\n  }\n\n  /** A bottom sheet (`bottom`, or `auto` which can become one on a narrow host)\n   *  gets a top grabber. Hidden by CSS when `auto` resolves to a side sheet. */\n  hasGrabber(panel: FoldPanelDescriptor): boolean {\n    const side = this.panelSide(panel);\n    return side === \"bottom\" || side === \"auto\";\n  }\n\n  /** Accessible label for the bottom-sheet grabber — the app-wide close label. */\n  protected readonly dismissLabel = inject(FOLD_PANEL_CLOSE_LABEL);\n\n  /** Tapping the grabber dismisses the sheet, unless it guards implicit close. */\n  onGrabber(panel: FoldPanelDescriptor): void {\n    if (this.allowsImplicitClose(panel)) {\n      panel.onClose();\n    }\n  }\n\n  /**\n   * The implicit dismiss gestures (Escape, backdrop) are suppressed when a panel\n   * sets `disableClose` — the header close button and `FoldPanelRef.close()`\n   * bypass this, so the panel stays intentionally closeable.\n   */\n  private allowsImplicitClose(panel: FoldPanelDescriptor): boolean {\n    return panel.disableClose !== true;\n  }\n\n  /** Escape closes the top-most (last-opened) panel, unless it guards close. */\n  @HostListener(\"document:keydown.escape\")\n  onEscape(): void {\n    const top = this.panels().at(-1);\n    if (top && this.allowsImplicitClose(top)) {\n      top.onClose();\n    }\n  }\n\n  onBackdrop(event: MouseEvent, panel: FoldPanelDescriptor): void {\n    if (\n      event.target === event.currentTarget &&\n      this.allowsImplicitClose(panel)\n    ) {\n      panel.onClose();\n    }\n  }\n\n  /**\n   * Mark every branch of the DOM that doesn't contain this host as `inert`, from\n   * the host up to `<body>`. Skips elements already inert (so a nested overlay's\n   * barrier isn't torn down here). The panels live inside this host, so they\n   * stay interactive.\n   */\n  private applyBackgroundBarrier(): void {\n    let node: HTMLElement | null = this.element.nativeElement;\n    const body = this.document.body;\n    while (node && node !== body && node.parentElement) {\n      for (const sibling of Array.from(node.parentElement.children)) {\n        if (\n          sibling !== node &&\n          sibling instanceof HTMLElement &&\n          !sibling.hasAttribute(\"inert\")\n        ) {\n          sibling.setAttribute(\"inert\", \"\");\n          this.inerted.push(sibling);\n        }\n      }\n      node = node.parentElement;\n    }\n  }\n\n  private removeBackgroundBarrier(): void {\n    for (const el of this.inerted) {\n      el.removeAttribute(\"inert\");\n    }\n    this.inerted = [];\n  }\n}\n","@for (panel of panels(); track panel.id) {\n  <div\n    class=\"panel-dock\"\n    [attr.data-side]=\"panelSide(panel)\"\n    [class.panel-dock--passthrough]=\"!isModal(panel)\"\n    (click)=\"onBackdrop($event, panel)\"\n  >\n    <aside\n      class=\"panel\"\n      [attr.data-side]=\"panelSide(panel)\"\n      [attr.data-surface]=\"panelSurface(panel)\"\n      [style.--panel-width.px]=\"panel.width()\"\n      role=\"dialog\"\n      [attr.aria-modal]=\"isModal(panel)\"\n      [attr.aria-label]=\"ariaLabel(panel)\"\n      [attr.aria-labelledby]=\"ariaLabelledby(panel)\"\n      tabindex=\"-1\"\n      [foldFocusTrap]=\"shouldTrap(panel)\"\n      (click)=\"$event.stopPropagation()\"\n    >\n      @if (hasGrabber(panel)) {\n        <button\n          type=\"button\"\n          class=\"panel-grabber\"\n          [attr.aria-label]=\"dismissLabel\"\n          (click)=\"onGrabber(panel)\"\n        >\n          <span class=\"panel-grabber__bar\" aria-hidden=\"true\"></span>\n        </button>\n      }\n\n      @if (panel.kind === \"template\") {\n        <fold-panel-header\n          [title]=\"panel.title()\"\n          [subtitle]=\"panel.subtitle()\"\n          (closed)=\"panel.onClose()\"\n        />\n        <div class=\"panel-body\">\n          <ng-container [ngTemplateOutlet]=\"panel.templateRef\" />\n        </div>\n      } @else {\n        <ng-container [foldPanelComponentOutlet]=\"panel\" />\n      }\n    </aside>\n  </div>\n}\n","import { ChangeDetectionStrategy, Component } from \"@angular/core\";\n\n/**\n * `<fold-panel-body>` — the **scrolling middle** of an imperative panel, between\n * {@link FoldPanelHeaderComponent} and {@link FoldPanelFooterComponent}.\n *\n * ## Why this exists\n *\n * The chrome renders a `.panel-body` for a **template** panel, but a\n * **component** panel is mounted bare: its host element becomes a single flex\n * child of the panel column, and the component owns its own header/body/footer.\n * That left every consumer to rediscover the same two rules — and the footer's\n * documented `flex: none` promise (\"it stays pinned while the body scrolls\") to\n * be silently false until they did. In one consuming app, eleven panels out of\n * twenty had copied the block; the nine that had not scrolled their footer out\n * of view, where the panel's `overflow: hidden` then clipped it.\n *\n * ## What it does, and the part that is easy to get wrong\n *\n * `flex: 1 1 auto` takes the space the header and footer leave; `overflow-y:\n * auto` scrolls what does not fit. The third rule is the one hand-rolled copies\n * miss: **`min-height: 0`**. A flex item's default minimum height is\n * `min-content`, so without it a tall child *grows the box* instead of\n * scrolling, pushing the footer past the panel's bottom edge — the exact\n * failure this component prevents.\n *\n * It also lays its children out in a column with the standard gap, so a panel\n * stops setting a margin on every field. That column is a **grid**, not a flex\n * column, for a reason worth stating: in a flex column every child may shrink,\n * and a child whose `overflow` is not `visible` has an automatic minimum size\n * of **zero** — it is crushed to its borders rather than allowed to overflow.\n * A `fold-danger-zone` (rounded corners, so `overflow: hidden`) measured 2px in\n * a full panel: a destructive-action block erased, with almost no overflow left\n * to scroll to either. `grid-auto-rows: max-content` sizes each row to its\n * content and lets the box overflow, which is what a scrolling column is for.\n *\n * ```html\n * <fold-panel-header title=\"Réglage\" />\n * <fold-panel-body>\n *   <fold-input label=\"Nom\" />\n *   <fold-danger-zone title=\"Supprimer\" actionLabel=\"Supprimer\" />\n * </fold-panel-body>\n * <fold-panel-footer>\n *   <button foldButton emphasis=\"outline\" intent=\"neutral\">Annuler</button>\n *   <button foldButton>Enregistrer</button>\n * </fold-panel-footer>\n * ```\n *\n * @selector `fold-panel-body`\n */\n@Component({\n  selector: \"fold-panel-body\",\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  template: \"<ng-content />\",\n  styleUrl: \"./panel-body.component.scss\",\n})\nexport class FoldPanelBodyComponent {}\n","import { ChangeDetectionStrategy, Component, input } from \"@angular/core\";\n\n/**\n * `<fold-panel-footer>` — the action bar that pairs with {@link\n * FoldPanelHeaderComponent} at the bottom of an imperative panel (or a future\n * `fold-dialog`). It carries the tokenised top border + padding and the button\n * alignment, so a panel no longer hand-rolls a `<footer class=\"foot\">` with a\n * copied flex row. Project the buttons (and any leading content) as children.\n *\n * It sits at the panel's bottom edge with `flex: none`, so in the standard\n * flex-column panel — a scrolling body above it — it stays pinned there with no\n * `position: sticky` needed; the body scrolls, the footer doesn't.\n *\n * `align`:\n * - `end` (default) — buttons pushed to the trailing edge (the Annuler/Confirmer\n *   pair). Multiple children are separated by the token gap.\n * - `between` — space between the first and last child: a leading block (e.g. a\n *   running total) at the start, the actions at the end.\n * - `start` — everything at the leading edge.\n *\n * ```html\n * <fold-panel-footer>\n *   <button foldButton emphasis=\"outline\" intent=\"neutral\" (click)=\"cancel()\">Annuler</button>\n *   <button foldButton (click)=\"save()\">Enregistrer</button>\n * </fold-panel-footer>\n *\n * <!-- a running total on the left, actions on the right -->\n * <fold-panel-footer align=\"between\">\n *   <span class=\"total\">Total {{ total }}</span>\n *   <button foldButton (click)=\"checkout()\">Commander</button>\n * </fold-panel-footer>\n * ```\n *\n * @selector `fold-panel-footer`\n */\n@Component({\n  selector: \"fold-panel-footer\",\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  template: \"<ng-content />\",\n  styleUrl: \"./panel-footer.component.scss\",\n  host: { \"[attr.data-align]\": \"align()\" },\n})\nexport class FoldPanelFooterComponent {\n  /** Button alignment along the bar. @default 'end' */\n  readonly align = input<\"end\" | \"between\" | \"start\">(\"end\");\n}\n","import { type Type, type WritableSignal, signal } from \"@angular/core\";\nimport type { FoldPanelHostService } from \"./panel-host.service\";\nimport type { FoldPanelRef } from \"./panel-ref\";\nimport type { FoldPanelContent, FoldPanelSide } from \"./panel.types\";\n\n/**\n * A single open-or-close panel button's worth of state. Wraps\n * `FoldPanelHostService.open()` so a page can `toggle(data)` without hand-tracking\n * the `FoldPanelRef` and re-syncing when the panel closes from the inside.\n *\n * `isOpen` stays truthful whether the panel is closed by a second toggle, its\n * own close button, or Escape — it mirrors the ref's `closed` promise.\n */\nexport class FoldPanelToggle<TData> {\n  /** Reactive open-state, safe to bind in a template (e.g. an active pill). */\n  readonly isOpen: WritableSignal<boolean> = signal(false);\n\n  private ref: FoldPanelRef | null = null;\n\n  constructor(\n    private readonly host: FoldPanelHostService,\n    private readonly component: Type<FoldPanelContent<TData>>,\n    private readonly side: FoldPanelSide = \"right\",\n  ) {}\n\n  /** Open with `data`, or close if already open. */\n  toggle(data: TData): void {\n    if (this.ref) {\n      this.ref.close();\n      return;\n    }\n    const ref = this.host.open<TData>(this.component, {\n      data,\n      side: this.side,\n    });\n    this.ref = ref;\n    this.isOpen.set(true);\n    void ref.closed.then(() => {\n      this.ref = null;\n      this.isOpen.set(false);\n    });\n  }\n\n  /** Close if open (no-op otherwise). */\n  close(): void {\n    this.ref?.close();\n  }\n}\n","import {\n  booleanAttribute,\n  Component,\n  ElementRef,\n  input,\n  output,\n  viewChild,\n} from \"@angular/core\";\nimport { FoldIconComponent } from \"../../foundations/icon/icon.component\";\nimport type { FoldIconName } from \"../../foundations/icon/builtin-icons\";\n\n/**\n * `<fold-dropdown-item>` — one actionable row inside a {@link FoldDropdownComponent}.\n * Renders a `role=\"menuitem\"` button; emits `selected` on activation (click,\n * `Enter` or `Space`) and the parent closes the menu. Roving focus + arrow-key\n * navigation are owned by the dropdown.\n *\n * @selector `fold-dropdown-item`\n *\n * @example\n * ```html\n * <fold-dropdown-item icon=\"edit\" (selected)=\"rename()\">Rename</fold-dropdown-item>\n * <fold-dropdown-item tone=\"danger\" (selected)=\"remove()\">Delete</fold-dropdown-item>\n * ```\n */\n@Component({\n  selector: \"fold-dropdown-item\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  template: `\n    <button\n      #btn\n      type=\"button\"\n      role=\"menuitem\"\n      class=\"fdrop-item\"\n      [class.is-danger]=\"tone() === 'danger'\"\n      tabindex=\"-1\"\n      [disabled]=\"disabled()\"\n      (click)=\"onClick()\"\n    >\n      @if (icon(); as ic) {\n        <fold-icon [name]=\"ic\" size=\"sm\" class=\"fdrop-item-icon\" />\n      }\n      <span class=\"fdrop-item-label\"><ng-content /></span>\n    </button>\n  `,\n  styleUrl: \"./dropdown-item.component.scss\",\n})\nexport class FoldDropdownItemComponent {\n  /** Disable the row — skipped by keyboard navigation, inert to clicks. */\n  readonly disabled = input(false, { transform: booleanAttribute });\n  /** Visual tone. @default \"default\" */\n  readonly tone = input<\"default\" | \"danger\">(\"default\");\n  /** Optional leading icon. */\n  readonly icon = input<FoldIconName>();\n  /** Emitted on activation (click / Enter / Space). */\n  readonly selected = output();\n\n  private readonly btn = viewChild<ElementRef<HTMLButtonElement>>(\"btn\");\n\n  /** The native button — the dropdown reads it for roving focus + typeahead. */\n  get button(): HTMLButtonElement | undefined {\n    return this.btn()?.nativeElement;\n  }\n\n  focus(): void {\n    this.btn()?.nativeElement.focus();\n  }\n\n  protected onClick(): void {\n    if (!this.disabled()) {\n      this.selected.emit();\n    }\n  }\n}\n","import {\n  afterRenderEffect,\n  Component,\n  contentChildren,\n  inject,\n  input,\n  model,\n  Renderer2,\n  signal,\n} from \"@angular/core\";\nimport { FoldPopoverComponent } from \"./popover.component\";\nimport { FoldDropdownItemComponent } from \"./dropdown-item.component\";\nimport type { FoldPopoverPlacement } from \"./placement\";\n\n/**\n * `<fold-dropdown>` — an actions menu built on {@link FoldPopoverComponent}.\n * Project a trigger (`[foldPopoverTrigger]`) and a list of\n * `<fold-dropdown-item>`s; the menu is a `role=\"menu\"` with full keyboard\n * support (↑/↓ roving, `Home`/`End`, type-ahead), opens focused on its first\n * enabled item, and closes — returning focus to the trigger — when an item is\n * chosen or on `Escape` / outside-click. Give the trigger `foldPopoverTrigger=\"menu\"`\n * so its `aria-haspopup` reads as a menu.\n *\n * @selector `fold-dropdown`\n *\n * @example\n * ```html\n * <fold-dropdown ariaLabel=\"Row actions\">\n *   <fold-button-icon icon=\"more-vertical\" tooltip=\"Actions\" foldPopoverTrigger=\"menu\" />\n *   <fold-dropdown-item icon=\"edit\" (selected)=\"rename(row)\">Rename</fold-dropdown-item>\n *   <fold-dropdown-item tone=\"danger\" (selected)=\"remove(row)\">Delete</fold-dropdown-item>\n * </fold-dropdown>\n * ```\n */\n@Component({\n  selector: \"fold-dropdown\",\n  standalone: true,\n  imports: [FoldPopoverComponent],\n  templateUrl: \"./dropdown.component.html\",\n  styleUrl: \"./dropdown.component.scss\",\n})\nexport class FoldDropdownComponent {\n  private readonly renderer = inject(Renderer2);\n\n  /** Preferred placement. @default \"bottom-start\" */\n  readonly placement = input<FoldPopoverPlacement>(\"bottom-start\");\n  /** Gap between trigger and menu, in px. @default 8 */\n  readonly offset = input(8);\n  /** Accessible name of the menu. */\n  readonly ariaLabel = input<string>();\n  /** Two-way open state. */\n  readonly open = model(false);\n\n  private readonly items = contentChildren(FoldDropdownItemComponent);\n  /** Active row = index into {@link enabled}. Roving state lives here (not read\n   *  from `document.activeElement`), so it stays correct regardless of focus. */\n  private readonly active = signal(0);\n\n  constructor() {\n    // On open, arm + focus the first enabled item. Deferred to a microtask so it\n    // runs AFTER the popover's own render effect has `showPopover()`n the panel\n    // in the same flush — focusing a still-hidden panel would no-op and leave\n    // focus on the trigger (outside the menu, so keydowns wouldn't reach it).\n    afterRenderEffect(() => {\n      if (this.open()) {\n        queueMicrotask(() => {\n          if (this.open()) {\n            this.focusIndex(0);\n          }\n        });\n      }\n    });\n  }\n\n  /** Enabled items only — keyboard nav + focus skip disabled rows. */\n  private enabled(): FoldDropdownItemComponent[] {\n    return this.items().filter((i) => !i.disabled());\n  }\n\n  private focusIndex(index: number): void {\n    const items = this.enabled();\n    if (items.length === 0) {\n      return;\n    }\n    const idx = ((index % items.length) + items.length) % items.length;\n    this.active.set(idx);\n    for (const it of this.items()) {\n      if (it.button) {\n        this.renderer.setAttribute(it.button, \"tabindex\", \"-1\");\n      }\n    }\n    const target = items[idx];\n    if (target?.button) {\n      this.renderer.setAttribute(target.button, \"tabindex\", \"0\");\n    }\n    target?.focus();\n  }\n\n  protected onMenuKeydown(event: KeyboardEvent): void {\n    const items = this.enabled();\n    if (items.length === 0) {\n      return;\n    }\n    const current = this.active();\n    switch (event.key) {\n      case \"ArrowDown\":\n        event.preventDefault();\n        this.focusIndex(current + 1);\n        return;\n      case \"ArrowUp\":\n        event.preventDefault();\n        this.focusIndex(current - 1);\n        return;\n      case \"Home\":\n        event.preventDefault();\n        this.focusIndex(0);\n        return;\n      case \"End\":\n        event.preventDefault();\n        this.focusIndex(items.length - 1);\n        return;\n      case \"Tab\":\n        this.open.set(false);\n        return;\n      default:\n        this.typeahead(event, items, current);\n    }\n  }\n\n  /** Type-ahead buffer (multi-letter): keystrokes within 500 ms accumulate, so\n   *  \"de\" jumps to \"Delete\", not just the next \"d\". */\n  private typeBuffer = \"\";\n  private typeAt = 0;\n\n  private typeahead(\n    event: KeyboardEvent,\n    items: FoldDropdownItemComponent[],\n    current: number,\n  ): void {\n    if (\n      event.key.length !== 1 ||\n      event.key === \" \" || // Space activates the focused item, never type-ahead\n      event.ctrlKey ||\n      event.metaKey ||\n      event.altKey\n    ) {\n      return;\n    }\n    const now = Date.now();\n    this.typeBuffer =\n      now - this.typeAt > 500 ? event.key : this.typeBuffer + event.key;\n    this.typeAt = now;\n    const query = this.typeBuffer.toLowerCase();\n    // A fresh single letter advances to the NEXT match (cycles same-initial\n    // items); an extended buffer stays on the current item if it still matches.\n    const from = query.length === 1 ? 1 : 0;\n    for (let i = 0; i < items.length; i += 1) {\n      const idx = (current + from + i) % items.length;\n      const label = items[idx]?.button?.textContent?.trim().toLowerCase() ?? \"\";\n      if (label.startsWith(query)) {\n        this.focusIndex(idx);\n        return;\n      }\n    }\n  }\n\n  /** A menuitem was activated (click / Enter / Space bubbles here) → close. */\n  protected onMenuActivate(event: MouseEvent): void {\n    const target = event.target;\n    if (!(target instanceof Element)) {\n      return;\n    }\n    const btn = target.closest<HTMLButtonElement>(\"button[role='menuitem']\");\n    if (btn && !btn.disabled) {\n      this.open.set(false);\n    }\n  }\n}\n","<fold-popover\n  [placement]=\"placement()\"\n  [offset]=\"offset()\"\n  [autoFocus]=\"false\"\n  [(open)]=\"open\"\n>\n  <ng-content select=\"[foldPopoverTrigger]\" />\n  <div\n    foldPopoverPanel\n    class=\"fdrop-menu\"\n    role=\"menu\"\n    [attr.aria-label]=\"ariaLabel() ?? null\"\n    (keydown)=\"onMenuKeydown($event)\"\n    (click)=\"onMenuActivate($event)\"\n  >\n    <ng-content />\n  </div>\n</fold-popover>\n","import {\n  foldAddDays,\n  foldAddMonths,\n  foldEndOfMonth,\n  foldStartOfMonth,\n  foldStartOfWeek,\n  foldToNativeDate,\n  type FoldCalendarDate,\n  type FoldWeekday,\n} from \"./date\";\nimport { foldCalendarFormatter, foldFormatRange } from \"./format\";\n\n/**\n * What \"next\" means, and what the period on display is called — the two\n * questions a calendar toolbar asks. Both depend on the view, so they live\n * here as pure functions rather than as a switch inside a component.\n */\n\n/** The four readings the family ships. */\nexport type FoldCalendarBuiltInView = \"month\" | \"week\" | \"day\" | \"list\";\n\n/**\n * Which reading is on screen.\n *\n * The four built-ins **autocomplete**, but the type is open: an app can put its\n * own reading (a resource grid, a timeline) in the same switch without the\n * library having to know about it. Paging and titling an unknown view falls\n * back to month semantics — see {@link foldShiftDate}.\n */\nexport type FoldCalendarView =\n  FoldCalendarBuiltInView | (string & Record<never, never>);\n\n/** A view the toolbar offers, when its name is the app's own. */\nexport interface FoldCalendarViewOption {\n  /** What `view` is set to when this one is picked. */\n  readonly value: string;\n  /** What the switch shows. */\n  readonly label: string;\n}\n\n/** An inclusive span of days. */\nexport interface FoldCalendarRange {\n  readonly from: FoldCalendarDate;\n  readonly to: FoldCalendarDate;\n}\n\n/**\n * `date` moved by `delta` periods **in the units the view reads in** — a month\n * at a time in the month view, a week in the week view, a day in the day view.\n * The list view follows the month, since that is the window it lists.\n *\n * An unrecognised view pages by month, the safest of the four to be wrong\n * about: it always lands on a real date the other views can also show.\n */\nexport function foldShiftDate(\n  view: FoldCalendarView,\n  date: FoldCalendarDate,\n  delta: number,\n  weekStartsOn: FoldWeekday = \"mon\",\n): FoldCalendarDate {\n  if (view === \"day\") {\n    return foldAddDays(date, delta);\n  }\n  if (view === \"week\") {\n    return foldAddDays(foldStartOfWeek(date, weekStartsOn), delta * 7);\n  }\n  return foldAddMonths(foldStartOfMonth(date), delta);\n}\n\n/**\n * The days `view` covers around `date` — what a caller passes to its data\n * source, and what the list view scopes itself to.\n *\n * The **month** view's range is wider than its month: the grid paints the days\n * either side of it, and they carry their events too. The **list** view's is\n * not, because a list has no padding days — an April row in a May list is an\n * event the reader did not ask for.\n */\nexport function foldRangeForView(\n  view: FoldCalendarView,\n  date: FoldCalendarDate,\n  weekStartsOn: FoldWeekday = \"mon\",\n): FoldCalendarRange {\n  if (view === \"day\") {\n    return { from: date, to: date };\n  }\n  if (view === \"week\") {\n    const start = foldStartOfWeek(date, weekStartsOn);\n    return { from: start, to: foldAddDays(start, 6) };\n  }\n  if (view === \"list\") {\n    return { from: foldStartOfMonth(date), to: foldEndOfMonth(date) };\n  }\n  const first = foldStartOfWeek(foldStartOfMonth(date), weekStartsOn);\n  const last = foldAddDays(\n    foldStartOfWeek(foldEndOfMonth(date), weekStartsOn),\n    6,\n  );\n  return { from: first, to: last };\n}\n\n/**\n * The heading for the period on display, localised through `Intl` — \"May 2026\",\n * \"18–24 May 2026\", \"Monday 18 May 2026\". A week spanning two months or two\n * years names both ends, which `Intl`'s range formatter handles per locale.\n */\nexport function foldViewTitle(\n  view: FoldCalendarView,\n  date: FoldCalendarDate,\n  locale?: string,\n  weekStartsOn: FoldWeekday = \"mon\",\n): string {\n  if (view === \"day\") {\n    return foldCalendarFormatter(locale, \"dateFullWeekday\").format(\n      foldToNativeDate(date),\n    );\n  }\n  if (view === \"week\") {\n    const start = foldStartOfWeek(date, weekStartsOn);\n    return foldFormatRange(\n      start,\n      foldAddDays(start, 6),\n      locale,\n      \"dayMonthYear\",\n    );\n  }\n  return foldCalendarFormatter(locale, \"monthYear\").format(\n    foldToNativeDate(date),\n  );\n}\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport {\n  Component,\n  computed,\n  contentChild,\n  inject,\n  input,\n  model,\n} from \"@angular/core\";\n\nimport { FoldIconComponent } from \"../../../foundations/icon/icon.component\";\nimport {\n  FoldViewToggleComponent,\n  type FoldViewToggleOption,\n} from \"../../../forms/view-toggle/view-toggle.component\";\nimport { FoldCalendarChromeDirective } from \"../core/chrome.directive\";\nimport {\n  foldToday,\n  type FoldCalendarDate,\n  type FoldWeekday,\n} from \"../core/date\";\nimport {\n  foldRangeForView,\n  foldShiftDate,\n  foldViewTitle,\n  type FoldCalendarView,\n  type FoldCalendarViewOption,\n} from \"../core/navigation\";\nimport { FoldCalendarTitleDirective } from \"../core/slots.directive\";\n\n/**\n * `<fold-calendar-toolbar>` — the chrome above a calendar: jump to today, page\n * back and forward, the period's name, and the view switch.\n *\n * It owns no data. Both pieces of state it touches are two-way `model`s, so\n * the page binds the same `date` and `view` it hands to whichever view is on\n * screen, and paging keeps working without a single output handler.\n *\n * The step matches the reading: a month at a time under the month view, a week\n * under the week view, a day under the day view — see `foldShiftDate`.\n *\n * ## Inputs\n * | Input          | Type                     | Default | Meaning |\n * |----------------|--------------------------|---------|---------|\n * | `date`         | `FoldCalendarDate`       | —       | **Two-way.** The period on display. |\n * | `view`         | `FoldCalendarView`       | `'month'` | **Two-way.** Which reading is on screen. |\n * | `views`        | `(FoldCalendarView \\| FoldCalendarViewOption)[]` | all four | Which switches to offer; pass fewer to drop one, or `{ value, label }` to add your own. |\n * | `today`        | `FoldCalendarDate`       | local clock | Where the \"today\" button jumps to. |\n * | `weekStartsOn` | `FoldWeekday`            | the locale's | How the week view snaps and names itself. |\n * | `locale`       | `string`                 | runtime | Drives the title through `Intl`. |\n * | `labels`       | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |\n *\n * ## Slots & templates\n * | Selector               | Region |\n * |------------------------|--------|\n * | `[actions]`            | Trailing edge — the page's own buttons (\"New event\", filters). |\n * | `ng-template[foldCalendarTitle]` | Replaces the `<h2>` title — reword it, or give it the heading level the page's outline needs. |\n *\n * ## Theming\n * | CSS variable                       | Default | Sets |\n * |------------------------------------|---------|------|\n * | `--fold-calendar-toolbar-step-size`| `28px`  | The back/forward buttons. |\n *\n * ## Extending\n * `views` accepts an app's own reading — `[views]=\"['month', {value: 'rooms', label: 'Rooms'}]\"`.\n * Paging and titling an unrecognised view fall back to month semantics, so a\n * custom view still lands on real dates.\n *\n * ## Accessibility\n * The title is the toolbar's live heading: it carries `aria-live=\"polite\"`, so\n * paging announces the period a keyboard user just moved to instead of leaving\n * the change silent.\n *\n * @selector `fold-calendar-toolbar`\n *\n * @example\n * ```html\n * <fold-calendar-toolbar [(date)]=\"date\" [(view)]=\"view\" [today]=\"today\">\n *   <button actions foldButton (click)=\"create()\">New event</button>\n * </fold-calendar-toolbar>\n * ```\n */\n@Component({\n  selector: \"fold-calendar-toolbar\",\n  standalone: true,\n  imports: [NgTemplateOutlet, FoldIconComponent, FoldViewToggleComponent],\n  templateUrl: \"./toolbar.component.html\",\n  styleUrl: \"./toolbar.component.scss\",\n  hostDirectives: [\n    {\n      directive: FoldCalendarChromeDirective,\n      inputs: [\"locale\", \"labels\", \"formats\"],\n    },\n  ],\n})\nexport class FoldCalendarToolbarComponent {\n  /** The period on display. */\n  readonly date = model.required<FoldCalendarDate>();\n  /** Which reading is on screen. @default 'month' */\n  readonly view = model<FoldCalendarView>(\"month\");\n  /**\n   * Which switches to offer — a built-in name, or `{ value, label }` for a view\n   * the app owns. @default every built-in view\n   */\n  readonly views = input<\n    readonly (FoldCalendarView | FoldCalendarViewOption)[]\n  >([\"month\", \"week\", \"day\", \"list\"]);\n  /** The day the \"today\" button jumps to; defaults to the local clock. */\n  readonly today = input<FoldCalendarDate>();\n  /** Day the week starts on. @default the locale's own first day */\n  readonly weekStartsOn = input<FoldWeekday>();\n\n  /** Labels and locale — see the directive. */\n  protected readonly chrome = inject(FoldCalendarChromeDirective);\n\n  /** The anchor in force: the caller's, else the one the locale declares. */\n  private readonly anchor = computed(() =>\n    this.chrome.anchor(this.weekStartsOn()),\n  );\n\n  private readonly projectedTitle = contentChild(FoldCalendarTitleDirective);\n\n  /** The custom title template, when one is projected. */\n  protected readonly titleContent = computed(\n    () => this.projectedTitle()?.template ?? null,\n  );\n\n  /** The period's name — \"May 2026\", \"18–24 May 2026\", \"Wednesday 20 May 2026\". */\n  protected readonly title = computed(() =>\n    foldViewTitle(\n      this.view(),\n      this.date(),\n      this.chrome.locale(),\n      this.anchor(),\n    ),\n  );\n\n  /** The period the title stands for — handed to a projected title template. */\n  protected readonly range = computed(() =>\n    foldRangeForView(this.view(), this.date(), this.anchor()),\n  );\n\n  protected readonly options = computed<readonly FoldViewToggleOption[]>(() => {\n    const labels = this.chrome.l();\n    const named: Record<string, string> = {\n      month: labels.viewMonth,\n      week: labels.viewWeek,\n      day: labels.viewDay,\n      list: labels.viewList,\n    };\n    return this.views().map((view) =>\n      typeof view === \"string\"\n        ? { value: view, label: named[view] ?? view }\n        : { value: view.value, label: view.label },\n    );\n  });\n\n  /** Pages by one period in the units the current view reads in. */\n  protected shift(delta: number): void {\n    this.date.set(\n      foldShiftDate(this.view(), this.date(), delta, this.anchor()),\n    );\n  }\n\n  protected goToday(): void {\n    this.date.set(this.today() ?? foldToday());\n  }\n\n  /** The switch emits a bare `string`; only a view it actually offers is kept. */\n  protected onViewChange(value: string): void {\n    const offered = this.options().some((option) => option.value === value);\n    if (offered) {\n      this.view.set(value);\n    }\n  }\n}\n","<div class=\"foldcalt\">\n  <div class=\"foldcalt-lead\">\n    <button type=\"button\" class=\"foldcalt-today\" (click)=\"goToday()\">\n      {{ chrome.l().todayAction }}\n    </button>\n\n    <div class=\"foldcalt-steps\">\n      <button\n        type=\"button\"\n        class=\"foldcalt-step\"\n        [attr.aria-label]=\"chrome.l().previousPeriod\"\n        (click)=\"shift(-1)\"\n      >\n        <fold-icon name=\"chevron-left\" size=\"sm\" />\n      </button>\n      <button\n        type=\"button\"\n        class=\"foldcalt-step\"\n        [attr.aria-label]=\"chrome.l().nextPeriod\"\n        (click)=\"shift(1)\"\n      >\n        <fold-icon name=\"chevron-right\" size=\"sm\" />\n      </button>\n    </div>\n\n    @if (titleContent(); as projected) {\n      <div class=\"foldcalt-title\" aria-live=\"polite\">\n        <ng-container\n          [ngTemplateOutlet]=\"projected\"\n          [ngTemplateOutletContext]=\"{\n            $implicit: title(),\n            from: range().from,\n            to: range().to,\n            view: view(),\n          }\"\n        />\n      </div>\n    } @else {\n      <h2 class=\"foldcalt-title\" aria-live=\"polite\">{{ title() }}</h2>\n    }\n  </div>\n\n  <div class=\"foldcalt-trail\">\n    @if (options().length > 1) {\n      <fold-view-toggle\n        size=\"sm\"\n        [ariaLabel]=\"chrome.l().viewSwitch\"\n        [options]=\"options()\"\n        [value]=\"view()\"\n        (valueChange)=\"onViewChange($event)\"\n      />\n    }\n    <ng-content select=\"[actions]\" />\n  </div>\n</div>\n","import type { FoldCalendarDate } from \"./date\";\nimport type { FoldCalendarEvent } from \"./types\";\n\n/**\n * The \"what's next\" reading: everything still ahead, grouped by the day it\n * lands on. Pure, so the rule for *what counts as ahead* — and what counts as\n * needing attention — can be tested without rendering a rail.\n */\n\n/** Which slice of what is ahead the agenda shows. */\nexport type FoldCalendarAgendaMode = \"todo\" | \"all\";\n\n/** Whether an event is asking for something — the `todo` slice's test. */\nexport type FoldCalendarActionable<T = unknown> = (\n  event: FoldCalendarEvent<T>,\n) => boolean;\n\n/** One day of the agenda, with what falls on it. */\nexport interface FoldCalendarAgendaGroup<T = unknown> {\n  readonly date: FoldCalendarDate;\n  /** Events opening on {@link date}, earliest first. */\n  readonly events: readonly FoldCalendarEvent<T>[];\n}\n\n/** How to build the agenda. */\nexport interface FoldAgendaOptions<T = unknown> {\n  /** The day \"ahead\" starts from — anything ending before it is past. */\n  readonly from: FoldCalendarDate;\n  /** `todo` keeps only what asks for attention. @default 'all' */\n  readonly mode?: FoldCalendarAgendaMode;\n  /** Days to return at most, so a long horizon cannot flood a rail. @default 8 */\n  readonly limit?: number;\n  /** What counts as asking for attention. @default foldIsActionable */\n  readonly isActionable?: FoldCalendarActionable<T>;\n}\n\n/** What the agenda produced, and whether it had to stop short. */\nexport interface FoldCalendarAgenda<T = unknown> {\n  /** The days shown, earliest first. */\n  readonly groups: readonly FoldCalendarAgendaGroup<T>[];\n  /**\n   * Days that exist beyond `limit`. Non-zero means \"there is more\", which is a\n   * different thing to say than \"there is nothing\" — and the two used to render\n   * identically.\n   */\n  readonly truncated: number;\n}\n\n/** Days the agenda returns when the caller does not say. */\nconst DEFAULT_LIMIT = 8;\n\n/**\n * Whether an event is asking for something.\n *\n * `warning` and `alert` are the two tones that mean \"attention\" in this\n * system, so they are what `todo` keeps — the agenda reads the same semantic\n * scale the chips paint with, rather than inventing a second one. Pass\n * `isActionable` to define it otherwise.\n */\nexport function foldIsActionable<T>(event: FoldCalendarEvent<T>): boolean {\n  return event.tone === \"warning\" || event.tone === \"alert\";\n}\n\n/** At least one day, and never `NaN` — `slice(0, NaN)` returns nothing at all. */\nfunction clampLimit(limit: number | undefined): number {\n  if (limit === undefined || !Number.isFinite(limit)) {\n    return DEFAULT_LIMIT;\n  }\n  return Math.max(1, Math.trunc(limit));\n}\n\n/**\n * Events still ahead of `from`, grouped by day and capped to `limit` days.\n *\n * An event already running is grouped under `from` rather than its real start:\n * a three-week absence that began last Monday belongs at the top of \"what's\n * next\", not buried in a past day the rail never shows.\n */\nexport function foldBuildAgenda<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  options: FoldAgendaOptions<T>,\n): FoldCalendarAgenda<T> {\n  const { from } = options;\n  const mode = options.mode ?? \"all\";\n  const limit = clampLimit(options.limit);\n  const actionable = options.isActionable ?? foldIsActionable;\n\n  const ahead = events\n    .filter((event) => event.end >= from)\n    .filter((event) => mode !== \"todo\" || actionable(event));\n  const ordered = [...ahead].sort((a, b) =>\n    a.start < b.start ? -1 : a.start > b.start ? 1 : 0,\n  );\n\n  const byDay = new Map<FoldCalendarDate, FoldCalendarEvent<T>[]>();\n  for (const event of ordered) {\n    const key = event.start < from ? from : event.start;\n    const bucket = byDay.get(key);\n    if (bucket === undefined) {\n      byDay.set(key, [event]);\n      continue;\n    }\n    bucket.push(event);\n  }\n\n  const days = [...byDay.entries()].sort(([a], [b]) =>\n    a < b ? -1 : a > b ? 1 : 0,\n  );\n  return {\n    groups: days\n      .slice(0, limit)\n      .map(([date, group]) => ({ date, events: group })),\n    truncated: Math.max(0, days.length - limit),\n  };\n}\n\n/**\n * How many events are asking for attention from `from` on — the rail's badge.\n *\n * Takes the same `isActionable` the agenda does, so a badge can never disagree\n * with the list under it.\n */\nexport function foldCountActionable<T>(\n  events: readonly FoldCalendarEvent<T>[],\n  from: FoldCalendarDate,\n  isActionable: FoldCalendarActionable<T> = foldIsActionable,\n): number {\n  return events.filter((event) => event.end >= from && isActionable(event))\n    .length;\n}\n","import { NgTemplateOutlet } from \"@angular/common\";\nimport {\n  Component,\n  computed,\n  contentChild,\n  inject,\n  input,\n  model,\n  numberAttribute,\n  output,\n} from \"@angular/core\";\n\nimport { FoldIconComponent } from \"../../../foundations/icon/icon.component\";\nimport {\n  foldBuildAgenda,\n  foldCountActionable,\n  foldIsActionable,\n  type FoldCalendarActionable,\n  type FoldCalendarAgendaGroup,\n  type FoldCalendarAgendaMode,\n} from \"../core/agenda\";\nimport { FoldCalendarChromeDirective } from \"../core/chrome.directive\";\nimport { foldDaysBetween, type FoldCalendarDate } from \"../core/date\";\nimport { FoldCalendarHeadingDirective } from \"../core/slots.directive\";\nimport type { FoldCalendarEvent } from \"../core/types\";\n\n/** Days ahead within which a weekday name still reads faster than a date. */\nconst NEAR_HORIZON = 7;\n\n/**\n * `<fold-calendar-agenda>` — a rail of what is still ahead, grouped by day.\n *\n * The counterpart to the grids: they answer \"what does this month look like\",\n * this answers \"what do I do next\". It carries a **`todo` slice** that keeps\n * only the events asking for attention (the `warning` and `alert` tones — the\n * same scale the chips paint with), so the rail doubles as a work queue with a\n * count.\n *\n * ## Inputs\n * | Input       | Type                     | Default | Meaning |\n * |-------------|--------------------------|---------|---------|\n * | `from`      | `FoldCalendarDate`       | —       | Where \"ahead\" starts; anything ending before it is past. |\n * | `events`    | `FoldCalendarEvent<T>[]` | `[]`    | Source events. |\n * | `mode`      | `'todo' \\| 'all'`        | `'todo'` | **Two-way.** Which slice is shown. |\n * | `collapsed` | `boolean`                | `false` | **Two-way.** Collapsed to a spine — persist it if you want it to stick. |\n * | `limit`     | `number`                 | `8`     | Days to show at most; what it cuts off is announced, not swallowed. |\n * | `isActionable` | `(event) => boolean`  | tones   | What the `todo` slice and the badge both count. |\n * | `locale`    | `string`                 | runtime | Drives the day names through `Intl`. |\n * | `labels`    | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |\n *\n * ## Outputs\n * | Output       | Payload                | Fires on |\n * |--------------|------------------------|----------|\n * | `dayClick`   | `FoldCalendarDate`     | A day heading activated. |\n * | `eventClick` | `FoldCalendarEvent<T>` | A row activated. |\n *\n * ## Templates\n * | Directive             | Replaces |\n * |-----------------------|----------|\n * | `foldCalendarEvent`   | The inside of a row. |\n * | `foldCalendarHeading` | The day heading — where a per-day count or action goes. |\n *\n * ## Theming\n * | CSS variable                            | Default | Sets |\n * |-----------------------------------------|---------|------|\n * | `--fold-calendar-agenda-width`          | `320px` | Width of the expanded rail. |\n * | `--fold-calendar-agenda-height`         | `100%`  | Height — match a grid beside it, or pin it. |\n * | `--fold-calendar-agenda-spine-width`    | `44px`  | Width once collapsed. |\n * | `--fold-calendar-agenda-badge-size`     | `20px`  | The count badge. |\n * | `--fold-calendar-agenda-control-size`   | `26px`  | The collapse control. |\n *\n * A day within the next week is named relatively — \"Today\", \"Tomorrow\", then\n * its weekday — because that reads faster than a date at this distance.\n *\n * @selector `fold-calendar-agenda`\n *\n * @example\n * ```html\n * <fold-calendar-agenda\n *   [from]=\"today\"\n *   [events]=\"events()\"\n *   [(mode)]=\"agendaMode\"\n *   [(collapsed)]=\"agendaCollapsed\"\n *   (eventClick)=\"open($event)\"\n * />\n * ```\n */\n@Component({\n  selector: \"fold-calendar-agenda\",\n  standalone: true,\n  imports: [NgTemplateOutlet, FoldIconComponent],\n  templateUrl: \"./agenda.component.html\",\n  styleUrl: \"./agenda.component.scss\",\n  hostDirectives: [\n    {\n      directive: FoldCalendarChromeDirective,\n      inputs: [\"locale\", \"labels\", \"formats\"],\n    },\n  ],\n})\nexport class FoldCalendarAgendaComponent<T = unknown> {\n  /** The day \"ahead\" starts from. */\n  readonly from = input.required<FoldCalendarDate>();\n  /** Source events. */\n  readonly events = input<readonly FoldCalendarEvent<T>[]>([]);\n  /** Which slice is shown. @default 'todo' */\n  readonly mode = model<FoldCalendarAgendaMode>(\"todo\");\n  /** Collapsed to a spine. @default false */\n  readonly collapsed = model(false);\n  /** Days to show at most. @default 8 */\n  readonly limit = input(8, { transform: numberAttribute });\n  /**\n   * What counts as asking for attention — the `todo` slice **and** the badge,\n   * from one definition, so the two can never disagree.\n   * @default the `warning` and `alert` tones\n   */\n  readonly isActionable = input<FoldCalendarActionable<T>>(foldIsActionable);\n\n  /** A day heading was activated. */\n  readonly dayClick = output<FoldCalendarDate>();\n  /** A row was activated. */\n  readonly eventClick = output<FoldCalendarEvent<T>>();\n\n  /** Labels, locale and the projected chip template — see the directive. */\n  protected readonly chrome = inject(FoldCalendarChromeDirective);\n\n  private readonly projectedHeading = contentChild(\n    FoldCalendarHeadingDirective,\n  );\n\n  /** The custom day-heading template, when one is projected. */\n  protected readonly headingContent = computed(\n    () => this.projectedHeading()?.template ?? null,\n  );\n\n  private readonly agenda = computed(() =>\n    foldBuildAgenda(this.events(), {\n      from: this.from(),\n      mode: this.mode(),\n      limit: this.limit(),\n      isActionable: this.isActionable(),\n    }),\n  );\n\n  protected readonly groups = computed<readonly FoldCalendarAgendaGroup<T>[]>(\n    () => this.agenda().groups,\n  );\n\n  /** Days `limit` cut off — \"there is more\" is not the same as \"there is none\". */\n  protected readonly truncated = computed(() => this.agenda().truncated);\n\n  /** How much is asking for attention — the rail's badge, in either mode. */\n  protected readonly todoCount = computed(() =>\n    foldCountActionable(this.events(), this.from(), this.isActionable()),\n  );\n\n  /** The rail's own name, and the one the collapsed spine repeats. */\n  protected readonly title = computed(() =>\n    this.mode() === \"todo\"\n      ? this.chrome.l().agendaTodo\n      : this.chrome.l().agendaUpcoming,\n  );\n\n  protected readonly emptyMessage = computed(() =>\n    this.mode() === \"todo\"\n      ? this.chrome.l().agendaEmptyTodo\n      : this.chrome.l().agendaEmptyUpcoming,\n  );\n\n  /** Day of the month, for the rail's number. */\n  protected dayNumber(group: FoldCalendarAgendaGroup<T>): string {\n    return group.date.slice(8, 10);\n  }\n\n  /**\n   * \"Today\", \"Tomorrow\", then the weekday for the rest of the week — a name\n   * beats a date while the day is still near.\n   */\n  protected relativeName(group: FoldCalendarAgendaGroup<T>): string {\n    const offset = foldDaysBetween(this.from(), group.date);\n    if (offset === 0) {\n      return this.chrome.l().relativeToday;\n    }\n    if (offset === 1) {\n      return this.chrome.l().relativeTomorrow;\n    }\n    return this.chrome.format(group.date, \"weekdayLong\");\n  }\n\n  /** The month, shown only once the weekday alone stops being enough. */\n  protected monthName(group: FoldCalendarAgendaGroup<T>): string {\n    if (foldDaysBetween(this.from(), group.date) < NEAR_HORIZON) {\n      return \"\";\n    }\n    return this.chrome.format(group.date, \"monthShort\");\n  }\n\n  protected toggleMode(mode: FoldCalendarAgendaMode): void {\n    this.mode.set(mode);\n  }\n\n  protected toggleCollapsed(): void {\n    this.collapsed.set(!this.collapsed());\n  }\n}\n","@if (collapsed()) {\n  <aside class=\"foldcala is-collapsed\" [attr.aria-label]=\"chrome.l().agenda\">\n    <button\n      type=\"button\"\n      class=\"foldcala-spine\"\n      [attr.aria-expanded]=\"false\"\n      [attr.aria-label]=\"chrome.l().expand\"\n      (click)=\"toggleCollapsed()\"\n    >\n      <fold-icon name=\"inbox\" size=\"sm\" />\n      @if (todoCount() > 0) {\n        <span class=\"foldcala-spine-count\">{{ todoCount() }}</span>\n      }\n      <!-- The spine names what opening the rail will show, not always \"todo\". -->\n      <span class=\"foldcala-spine-label\">{{ title() }}</span>\n    </button>\n  </aside>\n} @else {\n  <aside class=\"foldcala\" [attr.aria-label]=\"chrome.l().agenda\">\n    <header class=\"foldcala-head\">\n      <span class=\"foldcala-title\">\n        {{ title() }}\n        @if (todoCount() > 0) {\n          <span class=\"foldcala-count\">{{ todoCount() }}</span>\n        }\n      </span>\n\n      <span class=\"foldcala-head-right\">\n        <!-- Its own name: reusing the rail's would nest two regions under one. -->\n        <span\n          class=\"foldcala-modes\"\n          role=\"group\"\n          [attr.aria-label]=\"chrome.l().agendaModes\"\n        >\n          <button\n            type=\"button\"\n            [class.is-on]=\"mode() === 'todo'\"\n            [attr.aria-pressed]=\"mode() === 'todo'\"\n            (click)=\"toggleMode('todo')\"\n          >\n            {{ chrome.l().agendaTodo }}\n          </button>\n          <button\n            type=\"button\"\n            [class.is-on]=\"mode() === 'all'\"\n            [attr.aria-pressed]=\"mode() === 'all'\"\n            (click)=\"toggleMode('all')\"\n          >\n            {{ chrome.l().agendaUpcoming }}\n          </button>\n        </span>\n        <button\n          type=\"button\"\n          class=\"foldcala-collapse\"\n          [attr.aria-expanded]=\"true\"\n          [attr.aria-label]=\"chrome.l().collapse\"\n          (click)=\"toggleCollapsed()\"\n        >\n          <fold-icon name=\"chevron-right\" size=\"sm\" />\n        </button>\n      </span>\n    </header>\n\n    <div class=\"foldcala-body\">\n      @if (groups().length === 0) {\n        <p class=\"foldcala-empty\">{{ emptyMessage() }}</p>\n      } @else {\n        @for (group of groups(); track group.date) {\n          <section class=\"foldcala-group\">\n            <button\n              type=\"button\"\n              class=\"foldcala-date\"\n              (click)=\"dayClick.emit(group.date)\"\n            >\n              @if (headingContent(); as projected) {\n                <ng-container\n                  [ngTemplateOutlet]=\"projected\"\n                  [ngTemplateOutletContext]=\"{\n                    $implicit: group.date,\n                    events: group.events,\n                  }\"\n                />\n              } @else {\n                <span class=\"foldcala-daynum\">{{ dayNumber(group) }}</span>\n                <span class=\"foldcala-dmeta\">\n                  <span class=\"foldcala-dname\">{{ relativeName(group) }}</span>\n                  @if (monthName(group)) {\n                    <span class=\"foldcala-dmonth\">{{ monthName(group) }}</span>\n                  }\n                </span>\n              }\n            </button>\n\n            <ul class=\"foldcala-list\">\n              @for (event of group.events; track event.id) {\n                <li>\n                  <button\n                    type=\"button\"\n                    class=\"foldcal-chip\"\n                    [attr.data-tone]=\"event.tone ?? 'neutral'\"\n                    (click)=\"eventClick.emit(event)\"\n                  >\n                    @if (chrome.eventContent(); as projected) {\n                      <ng-container\n                        [ngTemplateOutlet]=\"projected\"\n                        [ngTemplateOutletContext]=\"{\n                          $implicit: event,\n                          band: null,\n                        }\"\n                      />\n                    } @else {\n                      <span class=\"foldcal-chip-bar\"></span>\n                      @if (event.icon; as icon) {\n                        <fold-icon\n                          class=\"foldcal-chip-icon\"\n                          [name]=\"icon\"\n                          size=\"sm\"\n                        />\n                      }\n                      <span class=\"foldcal-chip-body\">\n                        <span class=\"foldcal-chip-label\">{{\n                          event.label\n                        }}</span>\n                        @if (event.subline) {\n                          <span class=\"foldcal-chip-sub\">{{\n                            event.subline\n                          }}</span>\n                        }\n                      </span>\n                    }\n                  </button>\n                </li>\n              }\n            </ul>\n          </section>\n        }\n\n        <!-- `limit` stopped short of what is ahead: say so, rather than\n             letting the rail look like the end of the story. -->\n        @if (truncated(); as more) {\n          <p class=\"foldcala-more\">{{ chrome.l().agendaMore(more) }}</p>\n        }\n      }\n    </div>\n  </aside>\n}\n","import {\n  Component,\n  computed,\n  inject,\n  input,\n  model,\n  output,\n} from \"@angular/core\";\n\nimport { FoldIconComponent } from \"../../../foundations/icon/icon.component\";\nimport { FoldCalendarChromeDirective } from \"../core/chrome.directive\";\nimport type { FoldCalendarEvent, FoldCalendarSource } from \"../core/types\";\n\n/** A source, with what it currently contributes and whether it is showing. */\ninterface SourceChip {\n  readonly source: FoldCalendarSource;\n  readonly count: number;\n  readonly shown: boolean;\n}\n\n/**\n * `<fold-calendar-source-filter>` — the chips that switch each feed of a\n * merged calendar on and off.\n *\n * A calendar usually shows several feeds at once (a programme, staff leave,\n * contracts). This owns the **selection** only: it counts what each feed\n * contributes and toggles it, and the caller runs `foldFilterBySource()` over\n * its own events. Keeping the two apart means the chips never need to know how\n * the events are fetched, and the filtering stays a pure function.\n *\n * ## Inputs\n * | Input     | Type                     | Default | Meaning |\n * |-----------|--------------------------|---------|---------|\n * | `sources` | `FoldCalendarSource[]`   | `[]`    | The feeds to offer. |\n * | `events`  | `FoldCalendarEvent[]`    | `[]`    | Counted per feed — pass the window on screen for live counts. |\n * | `active`  | `ReadonlySet<string> \\| null` | `null` | **Two-way.** The keys currently shown; `null` means \"all\". |\n * | `labels`  | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |\n *\n * ## Outputs\n * | Output            | Payload               | Fires on |\n * |-------------------|-----------------------|----------|\n * | `selectionChange` | `ReadonlySet<string>` | A chip toggled — never `null`. |\n *\n * `null` and an empty `Set` mean opposite things — \"nothing switched off yet\"\n * versus \"every feed switched off\" — which is why they are not collapsed.\n * `foldFilterBySource()` takes either.\n *\n * ## Accessibility\n * Each chip is a **toggle**, so it carries `aria-pressed` in both states, and\n * its accessible name says which feed and whether it is showing — the tick and\n * the dot are colour, which cannot be the only carrier.\n *\n * @selector `fold-calendar-source-filter`\n *\n * @example\n * ```html\n * <fold-calendar-source-filter\n *   [sources]=\"sources\"\n *   [events]=\"events()\"\n *   [(active)]=\"activeSources\"\n * />\n * <fold-calendar-month [events]=\"visibleEvents()\" [(month)]=\"month\" />\n * ```\n */\n@Component({\n  selector: \"fold-calendar-source-filter\",\n  standalone: true,\n  imports: [FoldIconComponent],\n  templateUrl: \"./source-filter.component.html\",\n  styleUrl: \"./source-filter.component.scss\",\n  hostDirectives: [\n    {\n      directive: FoldCalendarChromeDirective,\n      inputs: [\"locale\", \"labels\", \"formats\"],\n    },\n  ],\n})\nexport class FoldCalendarSourceFilterComponent {\n  /** The feeds to offer. */\n  readonly sources = input<readonly FoldCalendarSource[]>([]);\n  /** Events to count per feed; pass the window on screen for live counts. */\n  readonly events = input<readonly FoldCalendarEvent[]>([]);\n  /**\n   * The keys currently shown. Left unset every feed shows, so the filter is\n   * useful before the caller has any selection state of its own.\n   */\n  readonly active = model<ReadonlySet<string> | null>(null);\n\n  /**\n   * The selection after a chip was toggled — **never `null`**, unlike `active`,\n   * whose unset state exists only as a starting value. Handle this one and you\n   * never have to eliminate a case that cannot happen.\n   */\n  readonly selectionChange = output<ReadonlySet<string>>();\n\n  /** Labels and locale — see the directive. */\n  protected readonly chrome = inject(FoldCalendarChromeDirective);\n\n  /** The effective selection — every key while `active` is unset. */\n  private readonly shownKeys = computed<ReadonlySet<string>>(() => {\n    const selected = this.active();\n    if (selected !== null) {\n      return selected;\n    }\n    return new Set(this.sources().map((source) => source.key));\n  });\n\n  protected readonly chips = computed<readonly SourceChip[]>(() => {\n    const shown = this.shownKeys();\n    const events = this.events();\n    return this.sources().map((source) => ({\n      source,\n      count: events.filter((event) => event.sourceKey === source.key).length,\n      shown: shown.has(source.key),\n    }));\n  });\n\n  protected chipLabel(chip: SourceChip): string {\n    return this.chrome.l().sourceState(chip.source.label, chip.shown);\n  }\n\n  /** Writes the next selection rather than mutating the set in place. */\n  protected toggle(chip: SourceChip): void {\n    const next = new Set(this.shownKeys());\n    if (next.has(chip.source.key)) {\n      next.delete(chip.source.key);\n    } else {\n      next.add(chip.source.key);\n    }\n    this.active.set(next);\n    this.selectionChange.emit(next);\n  }\n}\n","<nav class=\"foldcalsf\" [attr.aria-label]=\"chrome.l().sourceFilter\">\n  @for (chip of chips(); track chip.source.key) {\n    <button\n      type=\"button\"\n      class=\"foldcalsf-chip\"\n      [class.is-on]=\"chip.shown\"\n      [attr.data-tone]=\"chip.source.tone ?? 'neutral'\"\n      [attr.aria-pressed]=\"chip.shown\"\n      [attr.aria-label]=\"chipLabel(chip)\"\n      (click)=\"toggle(chip)\"\n    >\n      @if (chip.shown) {\n        <fold-icon class=\"foldcalsf-check\" name=\"check\" size=\"sm\" />\n      }\n      <span class=\"foldcalsf-dot\" aria-hidden=\"true\"></span>\n      <span class=\"foldcalsf-label\">{{ chip.source.label }}</span>\n      <span class=\"foldcalsf-count\">{{ chip.count }}</span>\n    </button>\n  }\n</nav>\n","// Public TypeScript API for fold-ng.\n//\n// The tokens themselves ship as CSS (import 'fold-ng/tokens.css').\n// This entry point exposes the typed token catalogue + helpers so call\n// sites get autocomplete and a compile error on a misspelt token.\n\nexport { FoldAppShellComponent } from \"./components/layout/app-shell/app-shell.component\";\nexport {\n  FoldAvatarComponent,\n  type FoldAvatarVariant,\n  type FoldAvatarRing,\n  type FoldAvatarRingStyle,\n} from \"./components/content/avatar/avatar.component\";\nexport { FoldAvatarDetailComponent } from \"./components/content/avatar-detail/avatar-detail.component\";\nexport {\n  FoldAvatarListComponent,\n  type FoldAvatarListItem,\n} from \"./components/content/avatar-list/avatar-list.component\";\nexport {\n  FoldBadgeComponent,\n  type FoldBadgeVariant,\n} from \"./components/content/badge/badge.component\";\nexport { FoldButtonComponent } from \"./components/actions/button/button.component\";\nexport { FoldDangerZoneComponent } from \"./components/actions/danger-zone/danger-zone.component\";\nexport type {\n  FoldButtonEmphasis,\n  FoldButtonIntent,\n  FoldButtonSize,\n  FoldButtonShape,\n} from \"./components/actions/button/button.types\";\nexport { FoldButtonIconComponent } from \"./components/actions/button-icon/button-icon.component\";\nexport type {\n  FoldButtonIconShape,\n  FoldButtonIconSize,\n  FoldButtonIconTone,\n} from \"./components/actions/button-icon/button-icon.types\";\nexport { FoldToggleIconComponent } from \"./components/actions/toggle-icon/toggle-icon.component\";\nexport { FoldInlineConfirmComponent } from \"./components/actions/inline-confirm/inline-confirm.component\";\nexport {\n  FOLD_INLINE_CONFIRM_LABELS,\n  FOLD_INLINE_CONFIRM_DEFAULT_LABELS,\n  provideFoldInlineConfirmLabels,\n} from \"./components/actions/inline-confirm/inline-confirm-labels\";\nexport type { FoldInlineConfirmLabels } from \"./components/actions/inline-confirm/inline-confirm-labels\";\nexport {\n  FOLD_COMMON_LABELS,\n  FOLD_COMMON_DEFAULT_LABELS,\n  provideFoldCommonLabels,\n} from \"./components/forms/common-labels\";\nexport type { FoldCommonLabels } from \"./components/forms/common-labels\";\nexport {\n  FoldCardComponent,\n  foldCardBandChrome,\n} from \"./components/content/card/card.component\";\nexport type {\n  FoldCardBandChrome,\n  FoldCardBandChromeInput,\n} from \"./components/content/card/card.component\";\nexport { FoldContextCardComponent } from \"./components/content/context-card/context-card.component\";\nexport { FoldElementTitleComponent } from \"./components/content/element-title/element-title.component\";\nexport { FoldFileDropzoneComponent } from \"./components/forms/file-dropzone/file-dropzone.component\";\nexport { FoldFieldListComponent } from \"./components/content/field/field-list.component\";\nexport { FoldFieldComponent } from \"./components/content/field/field.component\";\nexport { FoldLinkComponent } from \"./components/actions/link/link.component\";\nexport { FoldMenuComponent } from \"./components/navigation/menu/menu.component\";\nexport type {\n  FoldMenuTint,\n  FoldMenuTogglePlacement,\n  FoldMenuLevel,\n} from \"./components/navigation/menu/menu.component\";\nexport {\n  FoldMenuItemComponent,\n  type FoldMenuItemBadgeTone,\n} from \"./components/navigation/menu/menu-item.component\";\nexport { FoldMenuSeparatorComponent } from \"./components/navigation/menu/menu-separator.component\";\nexport { FoldMenuSectionComponent } from \"./components/navigation/menu/menu-section.component\";\nexport { FoldNavLauncherComponent } from \"./components/navigation/nav-launcher/nav-launcher.component\";\nexport { FoldNavGroupComponent } from \"./components/navigation/nav-launcher/nav-group.component\";\nexport { FoldNavTileComponent } from \"./components/navigation/nav-launcher/nav-tile.component\";\nexport type { FoldNavTileTone } from \"./components/navigation/nav-launcher/nav-tile.component\";\nexport { FoldHeroCardComponent } from \"./components/content/hero-card/hero-card.component\";\nexport { FoldDataTableComponent } from \"./components/content/data-table/data-table.component\";\nexport { FoldDataTableCellDirective } from \"./components/content/data-table/data-table-cell.directive\";\nexport { FoldDataTableRowCardDirective } from \"./components/content/data-table/data-table-row-card.directive\";\nexport { FoldDataTableRowDetailDirective } from \"./components/content/data-table/data-table-row-detail.directive\";\nexport { FoldDataTableRowNoteDirective } from \"./components/content/data-table/data-table-row-note.directive\";\nexport {\n  provideFoldDataTableLabels,\n  FOLD_DATA_TABLE_LABELS,\n  FOLD_DATA_TABLE_DEFAULT_LABELS,\n} from \"./components/content/data-table/data-table-labels\";\nexport type { FoldDataTableLabels } from \"./components/content/data-table/data-table-labels\";\nexport {\n  FoldStickyColumnDirective,\n  type FoldStickyColumnAnchor,\n} from \"./directives/sticky-column.directive\";\nexport type {\n  FoldTableColumn,\n  FoldTableEmpty,\n  FoldTableRowNote,\n  FoldTableSort,\n  FoldTableSortDir,\n  FoldTableTone,\n} from \"./components/content/data-table/data-table.types\";\n\nexport { FoldCalendarMonthComponent } from \"./components/content/calendar/month/month.component\";\nexport { FoldCalendarWeekComponent } from \"./components/content/calendar/week/week.component\";\nexport { FoldCalendarDayComponent } from \"./components/content/calendar/day/day.component\";\nexport { FoldCalendarListComponent } from \"./components/content/calendar/list/list.component\";\nexport { FoldCalendarTimegridComponent } from \"./components/content/calendar/timegrid/timegrid.component\";\n// Applied through `hostDirectives` by every calendar view, so ng-packagr needs\n// it on the surface. It is not meant to be used by hand — `locale` and `labels`\n// are already inputs on the views themselves.\nexport { FoldCalendarChromeDirective } from \"./components/content/calendar/core/chrome.directive\";\nexport { FoldCalendarEventDirective } from \"./components/content/calendar/core/event.directive\";\nexport type { FoldCalendarEventContext } from \"./components/content/calendar/core/event.directive\";\nexport {\n  FoldCalendarDayDirective,\n  FoldCalendarHeadingDirective,\n  FoldCalendarOverflowDirective,\n  FoldCalendarTitleDirective,\n} from \"./components/content/calendar/core/slots.directive\";\nexport type {\n  FoldCalendarDayContext,\n  FoldCalendarHeadingContext,\n  FoldCalendarOverflowContext,\n  FoldCalendarTitleContext,\n} from \"./components/content/calendar/core/slots.directive\";\nexport {\n  provideFoldCalendarLabels,\n  FOLD_CALENDAR_LABELS,\n  FOLD_CALENDAR_DEFAULT_LABELS,\n} from \"./components/content/calendar/core/labels\";\nexport type { FoldCalendarLabels } from \"./components/content/calendar/core/labels\";\nexport {\n  foldAddDays,\n  foldAddMonths,\n  foldDaysBetween,\n  foldEndOfMonth,\n  foldFromNativeDate,\n  foldFromTemporal,\n  foldIsCalendarDate,\n  foldIsoWeek,\n  foldIsoWeekYear,\n  foldIsWeekend,\n  foldStartOfMonth,\n  foldStartOfWeek,\n  foldToNativeDate,\n  foldToday,\n  foldWeekdayIndex,\n  foldWeekdayOf,\n  FOLD_DEFAULT_WEEKEND_DAYS,\n} from \"./components/content/calendar/core/date\";\nexport type {\n  FoldCalendarDate,\n  FoldIsoDateLike,\n  FoldWeekday,\n} from \"./components/content/calendar/core/date\";\nexport {\n  foldLocaleWeekInfo,\n  FOLD_FALLBACK_WEEK_INFO,\n} from \"./components/content/calendar/core/locale\";\nexport type { FoldWeekInfo } from \"./components/content/calendar/core/locale\";\nexport { FOLD_CALENDAR_FORMATS } from \"./components/content/calendar/core/format\";\nexport type { FoldCalendarFormat } from \"./components/content/calendar/core/format\";\n// The geometry tier: everything a consumer needs to lay a calendar out\n// *without* rendering it with these components. Kept public deliberately — see\n// the README's \"Two tiers\" note — which is why the keyboard map ships with it:\n// a hand-rolled date grid needs the same arrow keys as the built-in one.\nexport { foldCalendarNextFocus } from \"./components/content/calendar/core/keyboard\";\nexport { foldBuildMonthGrid } from \"./components/content/calendar/core/month-grid\";\nexport type { FoldMonthGridOptions } from \"./components/content/calendar/core/month-grid\";\nexport {\n  foldBuildDay,\n  foldBuildWeek,\n} from \"./components/content/calendar/core/columns\";\nexport type { FoldDayColumnsOptions } from \"./components/content/calendar/core/columns\";\nexport {\n  foldEventsInRange,\n  foldEventsOnDay,\n  foldFilterBySource,\n} from \"./components/content/calendar/core/filters\";\nexport {\n  foldBuildTimeGrid,\n  foldIsTimed,\n} from \"./components/content/calendar/core/timegrid\";\nexport type {\n  FoldCalendarBlock,\n  FoldTimeGrid,\n  FoldTimeGridColumn,\n  FoldTimeGridOptions,\n} from \"./components/content/calendar/core/timegrid\";\nexport {\n  foldAddMinutes,\n  foldFromMinutes,\n  foldIsCalendarTime,\n  foldToMinutes,\n  FOLD_MINUTES_PER_DAY,\n} from \"./components/content/calendar/core/time\";\nexport type { FoldCalendarTime } from \"./components/content/calendar/core/time\";\nexport { foldLayOutOverlaps } from \"./components/content/calendar/core/overlap\";\nexport type {\n  FoldOverlapInput,\n  FoldOverlapSlot,\n} from \"./components/content/calendar/core/overlap\";\nexport type {\n  FoldCalendarBand,\n  FoldCalendarDay,\n  FoldCalendarDayEvents,\n  FoldCalendarDayModifiers,\n  FoldCalendarEvent,\n  FoldCalendarHalfDay,\n  FoldCalendarTone,\n  FoldCalendarWeek,\n} from \"./components/content/calendar/core/types\";\nexport { FoldChoiceRowComponent } from \"./components/content/choice-row/choice-row.component\";\nexport type { FoldChoiceOption } from \"./components/content/choice-row/choice-row.component\";\nexport { FoldIconComponent } from \"./components/foundations/icon/icon.component\";\nexport { FoldSpinnerComponent } from \"./components/foundations/spinner/spinner.component\";\nexport type { FoldSpinnerSize } from \"./components/foundations/spinner/spinner.component\";\nexport { FoldIdService } from \"./a11y/id.service\";\nexport { FoldFieldIdDirective } from \"./a11y/field-id.directive\";\nexport { FoldRepeatPressDirective } from \"./directives/repeat-press.directive\";\nexport { observeElementWidth } from \"./dom/observe-element-width\";\nexport { FoldSurfaceDirective } from \"./directives/surface.directive\";\nexport type { FoldSurfaceName } from \"./directives/surface.directive\";\nexport { FoldElevatedDirective } from \"./directives/elevated.directive\";\nexport { FoldScrollRegionDirective } from \"./directives/scroll-region.directive\";\nexport type { FoldScrollAxis } from \"./directives/scroll-region.directive\";\nexport { ScrollRegionRegistry } from \"./a11y/scroll-region-registry.service\";\nexport { FoldInputComponent } from \"./components/forms/input/input.component\";\nexport {\n  FoldNumberInputComponent,\n  type FoldNumberSpinner,\n  type FoldNumberControls,\n} from \"./components/forms/input/number-input.component\";\nexport { FoldTextareaComponent } from \"./components/forms/input/textarea.component\";\nexport {\n  FoldDateComponent,\n  type FoldDateType,\n} from \"./components/forms/input/date.component\";\nexport { FoldTimeComponent } from \"./components/forms/input/time.component\";\nexport { FoldSearchComponent } from \"./components/forms/input/search.component\";\nexport { FoldSelectComponent } from \"./components/forms/input/select.component\";\nexport { FoldListboxComponent } from \"./components/forms/listbox/listbox.component\";\nexport { FoldMultiselectComponent } from \"./components/forms/listbox/multiselect.component\";\nexport { FoldOptionComponent } from \"./components/forms/listbox/option.component\";\nexport { FoldOptgroupComponent } from \"./components/forms/listbox/optgroup.component\";\nexport { isFoldSelectOptionGroup } from \"./components/forms/listbox/select-option\";\nexport type {\n  FoldSelectItem,\n  FoldSelectOption,\n  FoldSelectOptionGroup,\n} from \"./components/forms/listbox/select-option\";\nexport { FoldPasswordFieldComponent } from \"./components/forms/password/password-field.component\";\nexport {\n  foldDefaultPasswordRules,\n  foldRegexRule,\n  type FoldPasswordRule,\n} from \"./components/forms/password/password-rules\";\nexport { FoldViewToggleComponent } from \"./components/forms/view-toggle/view-toggle.component\";\nexport type {\n  FoldViewToggleOption,\n  FoldViewToggleActiveStyle,\n  FoldViewToggleDot,\n} from \"./components/forms/view-toggle/view-toggle.component\";\nexport { FoldCheckboxComponent } from \"./components/forms/checkbox/checkbox.component\";\nexport { FoldFieldsetComponent } from \"./components/forms/fieldset/fieldset.component\";\nexport type {\n  FoldFieldsetAppearance,\n  FoldFieldsetDirection,\n  FoldFieldsetHintPosition,\n  FoldFieldsetLegendVariant,\n} from \"./components/forms/fieldset/fieldset.component\";\nexport { FoldSliderComponent } from \"./components/forms/slider/slider.component\";\nexport { FoldRangeSliderComponent } from \"./components/forms/slider/range-slider.component\";\nexport type { FoldRangeValue } from \"./components/forms/slider/range-slider.component\";\nexport { FoldChecklistComponent } from \"./components/feedback/checklist/checklist.component\";\nexport type {\n  FoldChecklistItem,\n  FoldChecklistState,\n} from \"./components/feedback/checklist/checklist.component\";\nexport { FoldMeterComponent } from \"./components/feedback/meter/meter.component\";\nexport type { FoldMeterTone } from \"./components/feedback/meter/meter.component\";\nexport { FoldCalloutComponent } from \"./components/feedback/callout/callout.component\";\nexport type {\n  FoldCalloutVariant,\n  FoldCalloutAppearance,\n} from \"./components/feedback/callout/callout.component\";\nexport { FoldDisclosureComponent } from \"./components/feedback/disclosure/disclosure.component\";\nexport { FoldStatusBadgeComponent } from \"./components/content/status-badge/status-badge.component\";\nexport { FoldTimelineComponent } from \"./components/content/timeline/timeline.component\";\nexport type {\n  FoldTimelineNode,\n  FoldTimelineDatePlacement,\n} from \"./components/content/timeline/timeline.component\";\nexport { FoldLoadingStateComponent } from \"./components/feedback/state/loading-state.component\";\nexport { FoldEmptyStateComponent } from \"./components/feedback/state/empty-state.component\";\nexport type {\n  FoldIconSize,\n  FoldIconTone,\n} from \"./components/foundations/icon/icon.component\";\nexport {\n  FoldIconRegistry,\n  provideFoldIcons,\n} from \"./components/foundations/icon/icon-registry.service\";\nexport type { FoldIconSet } from \"./components/foundations/icon/icon-registry.service\";\nexport {\n  FOLD_BUILTIN_ICONS,\n  FOLD_BUILTIN_ICON_CATEGORIES,\n} from \"./components/foundations/icon/builtin-icons\";\nexport type {\n  FoldIconName,\n  FoldBuiltinIconName,\n  FoldIconCategoryId,\n  // Exported so a CONSUMER can declaration-merge into it. Left unexported, the\n  // flattened `.d.ts` declares it module-local and `declare module \"fold-ng\"`\n  // creates a second, unrelated interface — the augmentation compiles and does\n  // nothing. Shipped that way in 0.11.0; caught by the first real consumer.\n  FoldCustomIcons,\n} from \"./components/foundations/icon/builtin-icons\";\nexport {\n  FoldAsideLayoutComponent,\n  type FoldAsideBand,\n} from \"./components/layout/aside-layout/aside-layout.component\";\nexport { FoldNavLayoutComponent } from \"./components/layout/nav-layout/nav-layout.component\";\nexport {\n  FoldPageLayoutComponent,\n  FoldPageTitleDirective,\n} from \"./components/layout/page-layout/page-layout.component\";\nexport {\n  FoldPageSectionComponent,\n  type FoldSectionTitleVariant,\n} from \"./components/layout/page-section/page-section.component\";\nexport { FoldHeroSectionComponent } from \"./components/layout/hero-section/hero-section.component\";\nexport { FoldPaginatorComponent } from \"./components/content/paginator/paginator.component\";\nexport type { FoldPageItem } from \"./components/content/paginator/paginator.component\";\nexport {\n  provideFoldPaginatorLabels,\n  FOLD_PAGINATOR_LABELS,\n  FOLD_PAGINATOR_DEFAULT_LABELS,\n} from \"./components/content/paginator/paginator-labels\";\nexport type { FoldPaginatorLabels } from \"./components/content/paginator/paginator-labels\";\nexport { FoldViewNavComponent } from \"./components/navigation/view-nav/view-nav.component\";\nexport type { FoldViewNavItem } from \"./components/navigation/view-nav/view-nav.component\";\nexport { FoldBreadcrumbComponent } from \"./components/navigation/breadcrumb/breadcrumb.component\";\nexport type { FoldBreadcrumbItem } from \"./components/navigation/breadcrumb/breadcrumb.component\";\nexport { FoldBackLinkComponent } from \"./components/navigation/back-link/back-link.component\";\nexport { FoldTabsComponent } from \"./components/navigation/tabs/tabs.component\";\nexport type {\n  FoldTabItem,\n  FoldTabsContext,\n} from \"./components/navigation/tabs/tabs.component\";\nexport { FoldTabPanelComponent } from \"./components/navigation/tabs/tab-panel.component\";\nexport { FoldToastComponent } from \"./components/feedback/toast/toast.component\";\nexport { FoldToastContainerComponent } from \"./components/feedback/toast/toast-container.component\";\nexport { FoldToastService } from \"./components/feedback/toast/toast.service\";\nexport {\n  provideFoldToasts,\n  FOLD_TOAST_CONFIG,\n} from \"./components/feedback/toast/toast.config\";\nexport type { FoldToastConfig } from \"./components/feedback/toast/toast.config\";\nexport type {\n  FoldToast,\n  FoldToastVariant,\n} from \"./components/feedback/toast/toast.types\";\n\n// ── Panels (overlay system) ──────────────────────────────────\nexport { FoldPanelHostComponent } from \"./components/overlays/panel/panel-host.component\";\nexport { FoldPanelHeaderComponent } from \"./components/overlays/panel/panel-header.component\";\nexport { FoldPanelBodyComponent } from \"./components/overlays/panel/panel-body.component\";\nexport { FoldPanelFooterComponent } from \"./components/overlays/panel/panel-footer.component\";\nexport { FoldPanelHostService } from \"./components/overlays/panel/panel-host.service\";\nexport { FoldPanelRef } from \"./components/overlays/panel/panel-ref\";\nexport { FoldPanelToggle } from \"./components/overlays/panel/panel-toggle\";\nexport { FoldPanelComponentOutletDirective } from \"./components/overlays/panel/panel-component-outlet.directive\";\nexport {\n  provideFoldPanelLabels,\n  FOLD_PANEL_CLOSE_LABEL,\n} from \"./components/overlays/panel/panel-labels\";\nexport type { FoldPanelLabels } from \"./components/overlays/panel/panel-labels\";\nexport {\n  FOLD_PANEL_DEFAULTS,\n  provideFoldPanelDefaults,\n} from \"./components/overlays/panel/panel-defaults\";\nexport { FoldPopoverComponent } from \"./components/overlays/popover/popover.component\";\nexport { FoldPopoverTriggerDirective } from \"./components/overlays/popover/popover-trigger.directive\";\nexport { FoldDropdownComponent } from \"./components/overlays/popover/dropdown.component\";\nexport { FoldDropdownItemComponent } from \"./components/overlays/popover/dropdown-item.component\";\nexport { FoldInfoComponent } from \"./components/overlays/info/info.component\";\nexport { computePlacement } from \"./components/overlays/popover/placement\";\nexport { autoUpdate } from \"./components/overlays/popover/auto-update\";\nexport type {\n  FoldPopoverPlacement,\n  FoldPopoverSide,\n  FoldPopoverAlign,\n  FoldPlacementInput,\n  FoldPlacementResult,\n  FoldRect,\n} from \"./components/overlays/popover/placement\";\nexport type {\n  FoldPanelSide,\n  FoldPanelSize,\n  FoldPanelSurface,\n  FoldPanelDefaults,\n  FoldPanelDefaultsProvider,\n  FoldPanelContent,\n  FoldPanelConfig,\n  FoldPanelHandle,\n  FoldPanelDescriptor,\n  FoldTemplatePanelDescriptor,\n  FoldComponentPanelDescriptor,\n} from \"./components/overlays/panel/panel.types\";\n\n// NB: FocusTrapDirective + ScrollLockService stay package-internal — the panel\n// host is their only consumer. Promote to the public API when one appears.\n\n// ── Auto-colour (categorical palettes + the app-wide registry) ─\nexport {\n  FoldPaletteRegistry,\n  provideFoldPalette,\n  FOLD_PALETTE_DEFAULT,\n} from \"./color/palette-registry.service\";\nexport {\n  FOLD_AUTO_PALETTES,\n  foldHashSeed,\n  foldResolvePalette,\n} from \"./color/palettes\";\nexport type { FoldAutoPaletteName, FoldPaletteInput } from \"./color/palettes\";\n\nexport {\n  FOLD_SEMANTIC_COLOR_TOKENS,\n  FOLD_RADIUS_TOKENS,\n  FOLD_FONT_TOKENS,\n  FOLD_TEXT_TOKENS,\n  FOLD_WEIGHT_TOKENS,\n  FOLD_LEADING_TOKENS,\n  FOLD_TRACKING_TOKENS,\n  FOLD_SPACE_TOKENS,\n  FOLD_MOTION_TOKENS,\n  FOLD_BLUR_TOKENS,\n  FOLD_SHADOW_TOKENS,\n  foldColorProperty,\n  foldColorVar,\n  foldRadiusVar,\n  foldFontVar,\n  foldTextVar,\n  foldWeightVar,\n  foldLeadingVar,\n  foldTrackingVar,\n  foldSpaceVar,\n  foldMotionVar,\n  foldBlurVar,\n  foldShadowVar,\n} from \"./tokens/tokens.catalog\";\nexport type {\n  FoldSemanticColorToken,\n  FoldRadiusToken,\n  FoldFontToken,\n  FoldTextToken,\n  FoldWeightToken,\n  FoldLeadingToken,\n  FoldTrackingToken,\n  FoldSpaceToken,\n  FoldMotionToken,\n  FoldBlurToken,\n  FoldShadowToken,\n} from \"./tokens/tokens.catalog\";\n\nexport { FoldCalendarToolbarComponent } from \"./components/content/calendar/toolbar/toolbar.component\";\nexport {\n  foldRangeForView,\n  foldShiftDate,\n  foldViewTitle,\n} from \"./components/content/calendar/core/navigation\";\nexport type {\n  FoldCalendarBuiltInView,\n  FoldCalendarRange,\n  FoldCalendarView,\n  FoldCalendarViewOption,\n} from \"./components/content/calendar/core/navigation\";\n\nexport { FoldCalendarAgendaComponent } from \"./components/content/calendar/agenda/agenda.component\";\nexport { FoldCalendarSourceFilterComponent } from \"./components/content/calendar/source-filter/source-filter.component\";\nexport {\n  foldBuildAgenda,\n  foldCountActionable,\n  foldIsActionable,\n} from \"./components/content/calendar/core/agenda\";\nexport type {\n  FoldAgendaOptions,\n  FoldCalendarActionable,\n  FoldCalendarAgenda,\n  FoldCalendarAgendaGroup,\n  FoldCalendarAgendaMode,\n} from \"./components/content/calendar/core/agenda\";\nexport type { FoldCalendarSource } from \"./components/content/calendar/core/types\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["clamp","CACHE","DAYS_PER_WEEK","i1.FoldCalendarChromeDirective"],"mappings":";;;;;AAGA;;;;;AAKG;AACH,SAAS,SAAS,CAAC,EAAe,EAAA;AAChC,IAAA,IAAI,EAAE,CAAC,MAAM,EAAE;AACb,QAAA,OAAO,KAAK;IACd;AACA,IAAA,MAAM,KAAK,GAAG,EAAE,CAAC,cAAc,EAAE;IACjC,OAAO,EAAE,CAAC,YAAY,KAAK,IAAI,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;AACrD;AAEA;AACA,MAAM,kBAAkB,GAAG;IACzB,SAAS;IACT,wBAAwB;IACxB,0BAA0B;IAC1B,uBAAuB;IACvB,wBAAwB;IACxB,iCAAiC;AAClC,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX;;;;;;;;;;;AAWG;MAKU,kBAAkB,CAAA;;IAEpB,OAAO,GAAG,KAAK,CAAC,IAAI,+EAAI,KAAK,EAAE,eAAe,EAAA,CAAG;AAEzC,IAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CAAC;AAClD,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACpC,iBAAiB,GAAuB,IAAI;AAEpD,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,CAAC,CAAC,SAAS,KAAI;A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