{"version":3,"file":"forty-cdk-select.mjs","sources":["../../../projects/forty-cdk/select/src/select-context.ts","../../../projects/forty-cdk/select/src/select-defaults.ts","../../../projects/forty-cdk/select/src/select-virtualized-navigator.ts","../../../projects/forty-cdk/select/src/select.ts","../../../projects/forty-cdk/select/src/select-anchor.ts","../../../projects/forty-cdk/select/src/select-trigger.ts","../../../projects/forty-cdk/select/src/select-value.ts","../../../projects/forty-cdk/select/src/select-content.ts","../../../projects/forty-cdk/select/src/select-option.ts","../../../projects/forty-cdk/select/src/select-indicator.ts","../../../projects/forty-cdk/select/src/select-group.ts","../../../projects/forty-cdk/select/src/select-group-label.ts","../../../projects/forty-cdk/select/src/select-separator.ts","../../../projects/forty-cdk/select/src/select-host-directive.ts","../../../projects/forty-cdk/select/src/forty-cdk-select.ts"],"sourcesContent":["import { computed, inject, InjectionToken, type Signal } from '@angular/core';\n\nimport {\n  assertRootContext,\n  type CollectionHandle,\n  orphanContextError,\n  unresolvedRootError,\n  type WritingDirection,\n} from 'forty-cdk/core';\nimport {\n  type FloatingAlign,\n  type FloatingSide,\n  type ListboxOverlayContext,\n} from 'forty-cdk/core-overlay';\n\n/**\n * Why a select requested close. Mirrors the menu primitive vocabulary so\n * downstream code that switches on close reasons stays consistent.\n */\nexport type ForSelectCloseReason =\n  | 'escape'\n  | 'pointerDownOutside'\n  | 'focusOutside'\n  | 'select'\n  | 'tab'\n  | 'programmatic';\n\n/**\n * Where focus lands when the listbox opens. `'selected'` snaps to the first\n * currently-selected enabled option (matches native `<select>`); falls back\n * to `'first'` if no selection is enabled.\n */\nexport type ForSelectInitialFocus = 'first' | 'last' | 'selected';\n\n/**\n * Handle every `[forSelectOption]` registers with the root. The collection\n * orders entries by DOM document order so groups, separators, and `@for`\n * loops don't perturb keyboard navigation.\n *\n * Generic over the option value type `T` (default `unknown` at the contract\n * level; `string` at the public root). The handle carries the raw value so\n * the root can match it against `value()` via `compareWith`.\n */\nexport interface ForSelectOptionHandle<T = unknown> extends CollectionHandle {\n  /**\n   * Narrowed from {@link CollectionHandle}'s `Node`: the root focuses the\n   * option and scrolls it into view.\n   */\n  readonly host: HTMLElement;\n  readonly value: Signal<T>;\n  /**\n   * The option's resolved display label as a reactive `Signal<string>` — the\n   * trimmed `textContent` of the host. The root folds it into a persisted\n   * snapshot so `selectedLabels` and closed-state typeahead resolve labels\n   * without peeking at `textContent` from inside a `computed`.\n   */\n  readonly label: Signal<string>;\n  readonly disabled: Signal<boolean>;\n  /** Stable host `id` — the activedescendant target in the virtualized path. */\n  readonly id: Signal<string>;\n  /**\n   * Zero-based absolute position in the full source data. Required in the\n   * virtualized path (drives the position snapshot + `aria-posinset`); `null`\n   * outside it.\n   */\n  readonly posInSet: Signal<number | null>;\n}\n\n/**\n * The consumer-facing slice of the select's overlay surface, reached through\n * {@link ForSelectContext.overlay}: the trigger / content ids the ARIA wiring\n * points at, the reason of the last close, and the open / close commands that\n * mutate `open()` through the root's guards.\n *\n * It is narrow. The full state machine behind it — the trigger /\n * anchor / content / option registries, the DOM-focus navigation algorithm, the\n * initial-focus state, and the dismiss / auto-focus emit forwarders — is the\n * library's own wiring and is refactored without notice, so it stays on an\n * unexported surface the pieces reach through their own token.\n */\nexport interface ForSelectOverlayFacade {\n  /** The trigger's stable id, adopted from a consumer-set static id when present. */\n  readonly triggerId: Signal<string>;\n  /** The content surface's stable id, adopted from a consumer-set static id when present. */\n  readonly contentId: Signal<string>;\n  /** Reason of the most recent close, or `null` while open (or before any close). */\n  readonly lastCloseReason: Signal<ForSelectCloseReason | null>;\n  /**\n   * Registers the element `[forSelectContent]` is positioned against, instead of\n   * the trigger. The declarative `[forSelectAnchor]` covers the common case; call\n   * this directly when the anchor element is only reachable imperatively — it\n   * lives in an ancestor component's template, so a directive placed on it would\n   * resolve DI outside this root. At most one anchor may be registered per\n   * `[forSelect]`; a second one throws.\n   */\n  registerAnchor(el: HTMLElement): void;\n  /** Unregisters the positioning anchor, falling back to the trigger. Reference-based. */\n  unregisterAnchor(el: HTMLElement): void;\n  /** Opens the listbox with the requested initial-focus target. */\n  openOverlay(initialFocus: ForSelectInitialFocus): void;\n  /** Closes the listbox, recording `reason` as the last close reason. */\n  closeOverlay(reason: ForSelectCloseReason): void;\n  /** Opens the listbox when closed (with `initialFocus`), closes it when open. */\n  toggle(initialFocus: ForSelectInitialFocus): void;\n}\n\n/**\n * The shared overlay-listbox coordination surface backing\n * {@link ForSelectOverlayFacade}: trigger / anchor / content registries + ids,\n * DOM-focus navigation, the open / close machine, the initial-focus /\n * close-reason state, and the dismiss / auto-focus emit forwarders. Backed by\n * the shared `ListboxOverlayController`, so child directives read it here\n * instead of the root re-forwarding each member.\n *\n * Internal — never re-exported from `public-api.ts`; pieces reach it through\n * {@link SelectContext}.\n */\nexport type ForSelectOverlayContext<T = unknown> = ListboxOverlayContext<\n  ForSelectOptionHandle<T>,\n  ForSelectInitialFocus,\n  ForSelectCloseReason\n>;\n\n/**\n * Coordination contract owned by `[forSelect]` — the surface a consumer reads\n * and drives. Advanced consumers inject the token to read the selection and the\n * open state and to move them through the root's guards (`activate` /\n * `selectAll`, plus the open / close commands on {@link ForSelectContext.overlay}).\n * The wiring the library's own pieces read off the root is not\n * part of it.\n *\n * Generic over the option value type `T` (default `string` at the public\n * root). When a consumer binds object items the directive infers `T` from\n * `[(value)]` and the per-piece signatures specialize accordingly. Items are\n * compared via the consumer-provided `compareWith` and serialized for\n * the form's hidden inputs via `itemToFormValue`; option text labels are\n * still read from the rendered `textContent`.\n */\nexport interface ForSelectContext<T = unknown> {\n  /**\n   * The current selection, as a read-only signal. Mutate it through the guarded\n   * methods (`activate` / `commitOnTab`) or the root's `[(value)]` binding — a\n   * direct write would bypass the root's disabled / readonly guards and\n   * `markTouched`.\n   */\n  readonly value: Signal<readonly T[]>;\n  /**\n   * Whether the listbox is open, as a read-only signal. Mutate it through\n   * `overlay.toggle` / `overlay.openOverlay` / `overlay.closeOverlay` or the root's\n   * `[(open)]` binding.\n   */\n  readonly open: Signal<boolean>;\n  readonly multiple: Signal<boolean>;\n\n  /**\n   * The select's effective disabled — its own `disabled` input OR'd with a\n   * surrounding disabled `[forFieldset]`. Trigger and options read this so a\n   * disabled select (or fieldset) is inert: the trigger reflects the native\n   * `disabled` attribute (its single channel) and the options, which\n   * must stay focusable, reflect `aria-disabled`.\n   */\n  readonly effectiveDisabled: Signal<boolean>;\n  readonly readonly: Signal<boolean>;\n  readonly required: Signal<boolean>;\n  readonly invalid: Signal<boolean>;\n  readonly pending: Signal<boolean>;\n\n  readonly dir: Signal<WritingDirection>;\n  readonly placeholder: Signal<string>;\n\n  /**\n   * The consumer-facing slice of the overlay surface: the trigger / content ids,\n   * the last close reason, and the open / close commands. The registration and\n   * navigation machinery behind it is internal — see\n   * {@link ForSelectOverlayFacade}.\n   */\n  readonly overlay: ForSelectOverlayFacade;\n\n  /** Resolved labels of the options whose value is in `value()`, in selection order. */\n  readonly selectedLabels: Signal<readonly string[]>;\n\n  isSelected(value: T): boolean;\n  /** Toggle in multi-mode, replace + close in single-mode. No-op on disabled / readonly. */\n  activate(value: T): void;\n\n  /**\n   * Multi-select only (APG range keyboard, Ctrl/Cmd+A). Select every enabled\n   * option, or clear the selection when they are all already selected (toggle).\n   * No-op in single mode, disabled, readonly, or the virtualized path.\n   */\n  selectAll(): void;\n\n  /** Flip the `touched` model. Called by trigger on blur-to-outside and on dismiss events. */\n  markTouched(): void;\n}\n\n/**\n * The select's piece-coordination surface: everything the library's own pieces\n * read off the root that a consumer has no call to touch — the positioning\n * mirrors `[forSelectContent]` feeds to floating-ui, the APG range-selection and\n * typeahead handlers `[forSelectOption]` routes its keys through, and the\n * virtualized activedescendant model.\n *\n * **Not** part of {@link ForSelectContext} and never exported from\n * `public-api.ts`: these are the members a refactor of the anatomy moves, so\n * freezing them at 1.0 would freeze the anatomy with them.\n */\nexport interface SelectPieceContext<T = unknown> {\n  /**\n   * When `true`, the listbox is a trapped / inert / scroll-locked modal\n   * surface (routed through the core modal shell) instead of the anchored\n   * popover. Read once when `[forSelectContent]` mounts; all anchored-\n   * positioning state below is a no-op while modal.\n   */\n  readonly modal: Signal<boolean>;\n  readonly dismissible: Signal<boolean>;\n  readonly returnFocus: Signal<boolean>;\n  /**\n   * Positioning algorithm. `'popper'` (default) is standard floating-ui\n   * anchored placement; `'item-aligned'` overlays the listbox so the\n   * selected option's center aligns with the trigger's center (macOS-style\n   * native `<select>`). All `side`/`align`/`*Offset`/`sticky`/\n   * `hideWhenDetached`/`clipUntilPositioned`/`avoidCollisions` inputs are no-ops in\n   * `'item-aligned'` mode (only `collisionPadding` is honored).\n   */\n  readonly position: Signal<'popper' | 'item-aligned'>;\n  readonly side: Signal<FloatingSide | undefined>;\n  readonly align: Signal<FloatingAlign | undefined>;\n  readonly sideOffset: Signal<number>;\n  readonly alignOffset: Signal<number>;\n  readonly avoidCollisions: Signal<boolean>;\n  readonly collisionPadding: Signal<number>;\n  readonly sticky: Signal<'partial' | 'always' | false>;\n  readonly hideWhenDetached: Signal<boolean>;\n  readonly clipUntilPositioned: Signal<boolean>;\n  readonly loop: Signal<boolean>;\n  readonly orientation: Signal<'horizontal' | 'vertical'>;\n  readonly selectionFollowsFocus: Signal<boolean>;\n\n  readonly ariaLabel: Signal<string | null>;\n\n  /**\n   * The `[forSelect]` root (wrapper) element. Lets the trigger tell a focus\n   * move to a sibling *inside* the wrapper (e.g. a clear button next to the\n   * trigger) apart from a genuine focus leave, so `touched` isn't flipped\n   * prematurely when focus stays within the control.\n   */\n  readonly host: HTMLElement;\n\n  /** Compare two items for equality. Defaults to `===`; overridden for object values. */\n  readonly compareWith: Signal<(a: T, b: T) => boolean>;\n  /** Serialize an item for the hidden input's `value` attribute. Defaults to `String(item)`. */\n  readonly itemToFormValue: Signal<(item: T) => string>;\n\n  /**\n   * Host element of the first enabled, currently-selected option, or `null`\n   * when no selection exists. Used by `position=\"item-aligned\"` to anchor\n   * the listbox over the trigger; falls back to the first enabled option\n   * inside the listbox when this is `null`.\n   */\n  readonly selectedOptionEl: Signal<HTMLElement | null>;\n\n  /**\n   * Multi-select only (APG range keyboard). Move focus to the next / previous\n   * enabled option and toggle it in/out of the selection, without moving the\n   * range anchor. Non-wrapping. No-op in single mode, when disabled, or in the\n   * virtualized path. Focus still moves under `readonly`; only the selection\n   * mutation is blocked.\n   */\n  extendByArrow(currentOption: HTMLElement, action: 'next' | 'prev'): void;\n  /**\n   * Multi-select only (APG range keyboard, Shift+Space). Add every enabled\n   * option between the range anchor and the focused option to the selection,\n   * preserving any selection outside the span. Falls back to selecting just the\n   * focused option when no anchor exists. No-op in single mode, disabled,\n   * readonly, or the virtualized path.\n   */\n  selectRangeToFocused(currentOption: HTMLElement): void;\n  /**\n   * Multi-select only (APG range keyboard, Ctrl+Shift+Home / End). Add every\n   * enabled option from the focused option to the first / last option to the\n   * selection and move focus to that edge, preserving any selection outside the\n   * span. No-op in single mode, disabled, or the virtualized path. Focus still\n   * moves under `readonly`; only the selection mutation is blocked.\n   */\n  selectFromCurrentToEdge(currentOption: HTMLElement, edge: 'first' | 'last'): void;\n  /** Open-state typeahead: focus the first enabled option whose text matches the buffered prefix. */\n  handleTypeahead(event: KeyboardEvent): void;\n  /**\n   * Closed-state typeahead (single mode only). Selects the first matching\n   * option directly without opening the listbox — mirrors native `<select>`\n   * behavior. Returns `true` if the key was consumed by typeahead.\n   */\n  handleClosedTypeahead(event: KeyboardEvent): boolean;\n\n  /** Focus the first enabled option whose value is currently selected. Returns `false` if none. */\n  focusSelectedOption(): boolean;\n  /**\n   * Scroll the selected option into view. Driven from `[forSelectContent]`'s\n   * positioner first-resolved-position hook (`onFirstPosition`) in `'popper'`\n   * mode — the only moment both prerequisites hold: the surface has been\n   * portaled to `document.body` (resetting its `scrollTop` to 0) and\n   * `@floating-ui/dom`'s `size` middleware has constrained it to its\n   * `max-height` (so it is actually scrollable). Focusing the selected option\n   * earlier scrolls before the surface is bounded, so the reveal is lost.\n   * No-op while virtualizing (the navigator owns the virtualized scroll) and\n   * when nothing is selected (initial focus lands on the first option, already\n   * in view at the top).\n   */\n  scrollSelectedOptionIntoView(): void;\n\n  /**\n   * Commit the focused option's value (single mode) and close the listbox\n   * with reason `'tab'`. Moves focus to the trigger synchronously so the\n   * browser's Tab default action advances focus from there to the next\n   * (or previous) focusable in tab order. Multi-mode skips the value-set\n   * — selection toggles already happened via Space / Enter / click.\n   */\n  commitOnTab(value: T): void;\n\n  /**\n   * Full source length when virtualizing, `undefined` in the default\n   * DOM-focus path. Drives each option's `aria-setsize` / `aria-posinset`\n   * and the focus-model branch.\n   */\n  readonly totalCount: Signal<number | undefined>;\n  /**\n   * The active option's `id` in the virtualized activedescendant model,\n   * `null` in the default path. The content surface reflects it as\n   * `aria-activedescendant`; options read it for `data-highlighted`.\n   */\n  readonly activeDescendantId: Signal<string | null>;\n  /**\n   * Virtualized-path open hook. Called by `[forSelectContent]` after it\n   * focuses its own surface on open: seeds `aria-activedescendant` to the\n   * committed option (scrolling it into view via `(scrollToIndex)`) when its\n   * position is known — in the rendered window, previously rendered, or\n   * supplied via the root's `[selectedIndex]`; otherwise focuses the first\n   * enabled option.\n   */\n  seedVirtualizedInitialFocus(): void;\n  /**\n   * Virtualized-path keyboard handler. Called by `[forSelectContent]`'s host\n   * keydown only when `totalCount()` is set: Arrow/Home/End navigation,\n   * Enter/Space activation of the active descendant, single-mode Tab commit,\n   * and typeahead — all in the activedescendant model.\n   */\n  handleVirtualizedKeydown(event: KeyboardEvent): void;\n  /**\n   * Called by an option on click in the virtualized path: moves\n   * `aria-activedescendant` to that option and returns DOM focus to the\n   * content surface. No-op in the default path.\n   */\n  notifyOptionClick(optionId: string): void;\n\n  /**\n   * Host element of the option the pointer is over in the default DOM-focus\n   * path, `null` when the pointer is over none. Self-heals on read: a host that\n   * has left the registered set or become disabled is discounted, so the focused\n   * option reclaims the highlight. Always `null` in the virtualized path, where\n   * hover moves {@link SelectPieceContext.activeDescendantId} itself.\n   */\n  readonly pointerHighlightedOption: Signal<HTMLElement | null>;\n  /**\n   * Reported by `[forSelectOption]` on `pointermove` so the highlight follows\n   * the pointer. Never moves DOM focus, so it never commits a selection — not\n   * even under `selectionFollowsFocus`, whose commit hangs off the navigation\n   * focus move — and never touches the range anchor. A move arriving inside the\n   * pointer-suppression window a programmatic scroll opened is ignored, or a\n   * scroll sliding a different option under a stationary cursor would hand the\n   * highlight to whatever the user merely scrolled past.\n   *\n   * @param host The hovered option's host — the DOM-focus path's highlight target.\n   * @param id The hovered option's id — the virtualized path's highlight target.\n   */\n  highlightFromPointer(host: HTMLElement, id: string): void;\n  /**\n   * Called by an option when it takes DOM focus: drops any pointer highlight, so\n   * the keyboard channel owns the highlight again from the move that focused the\n   * option.\n   */\n  notifyOptionFocus(): void;\n  /**\n   * Called by `[forSelectContent]` when the pointer leaves the listbox surface:\n   * drops any pointer highlight, so the focused option reclaims it instead of a\n   * row staying decorated with the cursor elsewhere on the page. Crossing\n   * between two adjacent options is not a leave, so the highlight never blinks\n   * off. No-op in the virtualized path, where the pointer's claim *is*\n   * {@link SelectPieceContext.activeDescendantId} and releasing it would leave\n   * the container with no active option.\n   */\n  releasePointerHighlight(): void;\n}\n\n/**\n * DI token for the select's coordination surface, provided by `[forSelect]`.\n *\n * Publicly typed as the read surface {@link ForSelectContext}, which is the whole of what\n * the token promises a consumer — `overlay` included, narrowed there to\n * {@link ForSelectOverlayFacade}. The pieces read the same token at an internal type that\n * widens it to the full overlay controller, so a wrapper re-providing it must alias it to\n * the root: `{ provide: FOR_SELECT_CONTEXT, useExisting: MySelect }`, where `MySelect`\n * extends `ForSelect`. A value that merely satisfies the declared type resolves too, and is\n * rejected in dev mode by the first piece to reach the controller.\n */\nexport const FOR_SELECT_CONTEXT = new InjectionToken<ForSelectContext>('FOR_SELECT_CONTEXT');\n\n/**\n * The select's internal coordination surface: everything {@link ForSelectContext}\n * publishes, plus the {@link SelectPieceContext} members and the full overlay\n * state machine instead of the consumer facade.\n *\n * Never exported from `public-api.ts`. It is the type the pieces read\n * {@link FOR_SELECT_CONTEXT} at, so a consumer who injects that token gets the\n * read surface while the pieces get the wiring protocol. `ForSelect` declares\n * `overlay` with the narrow public type and the piece members TS-`private`,\n * which keeps both out of the emitted `.d.ts` while `useExisting` still\n * satisfies this contract at runtime.\n */\nexport interface SelectContext<T = unknown> extends ForSelectContext<T>, SelectPieceContext<T> {\n  readonly overlay: ForSelectOverlayContext<T>;\n}\n\n/**\n * The constant half of both resolvers' {@link assertRootContext} calls, so the\n * injected and the explicit path state the same requirement. `SelectContext`\n * adds no method of its own — it widens `overlay` from the consumer facade to\n * the full controller — so the probe each call site supplies is nested.\n */\nconst ROOT_ASSERTION = {\n  entryPoint: 'select',\n  token: 'FOR_SELECT_CONTEXT',\n  root: '[forSelect]',\n};\n\nexport function injectSelectContext<T = unknown>(piece: string): SelectContext<T> {\n  const ctx = inject(FOR_SELECT_CONTEXT, { optional: true });\n  if (!ctx) {\n    throw orphanContextError({\n      code: 'FORCDK-SELECT-001',\n      piece,\n      root: '[forSelect]',\n      token: 'FOR_SELECT_CONTEXT',\n    });\n  }\n  const widened = ctx as unknown as SelectContext<T>;\n  assertRootContext({\n    ...ROOT_ASSERTION,\n    piece,\n    probe: () => widened.overlay.setInitialFocus,\n  });\n  return widened;\n}\n\n/**\n * Resolves the trigger's root context: the explicit reference when the\n * `[forSelectTrigger]` input carries one, the injected `FOR_SELECT_CONTEXT`\n * otherwise. The orphan error only fires when neither resolves, on first read\n * of the returned signal. Must be called in an injection context.\n *\n * The explicit reference is a public `ForSelectContext`, so it is widened back\n * to the internal surface: the runtime object is always the `[forSelect]` root,\n * which owns the full overlay controller — the public interface only narrows\n * `overlay` to the consumer facade. Both paths are guarded, on read rather than\n * at injection time, because the explicit one only resolves inside the\n * `computed`; the explicit widening predates the one-token collapse\n * and was never\n * checked either.\n */\nexport function injectSelectTriggerContext<T = unknown>(\n  explicitRoot: Signal<ForSelectContext<T> | ''>,\n): Signal<SelectContext<T>> {\n  const injected = inject(FOR_SELECT_CONTEXT, { optional: true });\n  return computed(() => {\n    const explicit = explicitRoot();\n    const resolved = explicit === '' ? injected : explicit;\n    if (!resolved) {\n      throw unresolvedRootError({\n        code: 'FORCDK-SELECT-002',\n        trigger: '[forSelectTrigger]',\n        root: '[forSelect]',\n        token: 'FOR_SELECT_CONTEXT',\n        exportAs: 'forSelect',\n      });\n    }\n    const widened = resolved as unknown as SelectContext<T>;\n    assertRootContext({\n      ...ROOT_ASSERTION,\n      piece: 'ForSelectTrigger',\n      probe: () => widened.overlay.setInitialFocus,\n    });\n    return widened;\n  });\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\nimport {\n  type AnchoredPositioningSeedDefaults,\n  type FloatingAlign,\n  type FloatingSide,\n} from 'forty-cdk/core-overlay';\n\n/**\n * Defaults inherited by descendant selects in the surrounding injector\n * scope. Configure with `provideForSelectDefaults` either at the\n * application root or in any component's `providers` array; partial\n * overrides merge with the parent scope.\n */\nexport interface ForSelectDefaults extends AnchoredPositioningSeedDefaults {\n  /**\n   * Side the listbox is anchored to for selects that don't override `side`\n   * locally. Ignored under `position=\"item-aligned\"`. Library fallback\n   * `'bottom'`.\n   */\n  side: FloatingSide;\n  /**\n   * Alignment along the chosen `side` for selects that don't override `align`\n   * locally. Ignored under `position=\"item-aligned\"`. Library fallback\n   * `'start'`.\n   */\n  align: FloatingAlign;\n  /**\n   * Distance (px) between the select trigger and the floating content\n   * along the resolved `side` axis.\n   */\n  sideOffset: number;\n  /**\n   * Padding (px) added to the viewport edges for collision-aware\n   * positioning. Higher values keep the floating content further from\n   * the edge when `flip` / `shift` runs.\n   */\n  collisionPadding: number;\n}\n\n/**\n * Library fallback for select defaults, read at the root injector when no\n * consumer has called `provideForSelectDefaults`. Exported for the shared defaults\n * contract spec; not re-exported from the primitive's public entry.\n */\nexport const FOR_SELECT_FALLBACK_DEFAULTS: ForSelectDefaults = {\n  side: 'bottom',\n  align: 'start',\n  sideOffset: 4,\n  collisionPadding: 8,\n};\n\nconst { token, provideDefaults } = createDefaults<ForSelectDefaults>(\n  'FOR_SELECT_DEFAULTS',\n  FOR_SELECT_FALLBACK_DEFAULTS,\n);\n\n/** Token holding the resolved select defaults for the current scope. */\nexport const FOR_SELECT_DEFAULTS = token;\n\n/**\n * Configures forty-cdk select defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForSelectDefaults(defaults: Partial<ForSelectDefaults> = {}): Provider[] {\n  return provideDefaults(defaults);\n}\n","import { isUnset, VirtualizedNavigator, type VirtualizedNavigatorDeps } from 'forty-cdk/core';\nimport type { ForSelectOptionHandle } from './select-context';\n\n/**\n * Position-snapshot entry for `ForSelect`. Carries the option's raw `value` on\n * top of the engine's `id` / `disabled`, so the root can resolve the committed\n * option's absolute index on open even while it is outside the rendered window.\n */\nexport interface SelectPositionEntry<T> {\n  /** Stable option host id — the activedescendant target. */\n  readonly id: string;\n  /** The option's raw value, matched against the selection by `compareWith`. */\n  readonly value: T;\n  /** Whether the option is disabled, so navigation skips over it. */\n  readonly disabled: boolean;\n}\n\n/** The shared navigation engine as `ForSelect` parameterises it. */\nexport type SelectVirtualizedNavigator<T> = VirtualizedNavigator<\n  ForSelectOptionHandle<T>,\n  SelectPositionEntry<T>\n>;\n\n/**\n * Wire the shared `forty-cdk/core` navigation engine to the select option\n * handle: the handle carries its absolute `posInSet` and its raw `value`, and an\n * option whose `[value]` binding is not written yet is skipped this fold and\n * folded in on the binding's re-run. Scroll-into-view is routed through\n * `scrollActiveIntoView` so the root's pointer-suppression window opens first — a\n * synthetic `pointermove` from the scroll must not hijack the highlight.\n *\n * Internal — not re-exported from `select/index.ts` or `public-api.ts`.\n */\nexport function createSelectVirtualizedNavigator<T>(\n  deps: VirtualizedNavigatorDeps<ForSelectOptionHandle<T>>,\n  scrollActiveIntoView: (host: HTMLElement) => void,\n): SelectVirtualizedNavigator<T> {\n  return new VirtualizedNavigator(deps, {\n    posOf: (o) => o.posInSet(),\n    idOf: (o) => o.id(),\n    hostOf: (o) => o.host,\n    isDisabled: (o) => o.disabled(),\n    readEntry: (o) => {\n      const id = o.id();\n      const value = o.value();\n      return isUnset(value) ? null : { id, value, disabled: o.disabled() };\n    },\n    scrollIntoView: (host) => scrollActiveIntoView(host),\n  });\n}\n","import {\n  booleanAttribute,\n  computed,\n  Directive,\n  effect,\n  ElementRef,\n  inject,\n  input,\n  model,\n  numberAttribute,\n  output,\n  signal,\n} from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport {\n  accessibleTextContent,\n  createPointerSuppression,\n  formatFortyMessage,\n  injectHiddenInput,\n  isRangeSelectShortcut,\n  LabelCache,\n  type LabelCacheEntry,\n  resolveListNavigation,\n  resolveListTypeahead,\n  runVirtualizedNavigatorBridge,\n  throwUnsupportedVirtualizedRangeSelect,\n  throwUnsupportedVirtualizedSelectionFollowsFocus,\n  type WritingDirection,\n  RangeSelectionEngine,\n  defaultItemToFormValue,\n  isInArray,\n  isUnset,\n  singleSelected,\n  toggleInArray,\n  injectTextDirection,\n  findTypeaheadMatch,\n  injectTypeahead,\n  type VetoableEvent,\n  type VetoableNativeEvent,\n} from 'forty-cdk/core';\nimport { AnchoredFormValueControlBase, ListboxOverlayController } from 'forty-cdk/core-overlay';\nimport {\n  FOR_SELECT_CONTEXT,\n  type ForSelectCloseReason,\n  type ForSelectContext,\n  type ForSelectInitialFocus,\n  type ForSelectOptionHandle,\n  type ForSelectOverlayFacade,\n} from './select-context';\nimport { FOR_SELECT_DEFAULTS } from './select-defaults';\nimport {\n  createSelectVirtualizedNavigator,\n  type SelectVirtualizedNavigator,\n} from './select-virtualized-navigator';\n\n/**\n * Headless implementation of the [WAI-ARIA select-only combobox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/).\n * Implements `FormValueControl<readonly T[]>` from\n * `@angular/forms/signals` for `[formField]` auto-wiring.\n *\n * Generic over the option value type `T` (default `string`). When the\n * consumer binds object items the directive infers `T` from `[(value)]` and\n * `[forSelectOption][value]`; object identity is resolved by the\n * consumer-supplied `[compareWith]` and the hidden inputs serialize\n * via `[itemToFormValue]`. Option display text is read from the rendered\n * `textContent`, so no separate label function is needed — supply the\n * optional `[itemToLabel]` only when a pre-set object value must render its\n * label before the listbox is ever opened (the documented `@if (open())`\n * pattern).\n *\n * Selection is always modeled as `readonly T[]`:\n * - In single mode (`multiple=false`, default), the array has 0 or 1 element\n *   and option activation closes the listbox.\n * - In multi mode, option activation toggles and the listbox stays open.\n *\n * Typeahead has two modes mirroring native `<select>`:\n * - **Closed trigger** (single mode only): printable keys select the matching\n *   option immediately without opening the listbox.\n * - **Open listbox**: printable keys move focus to the first matching option\n *   (selection still requires Enter / Space / click).\n */\n@Directive({\n  selector: '[forSelect]',\n  exportAs: 'forSelect',\n  host: {\n    '[attr.data-state]': 'open() ? \"open\" : \"closed\"',\n    '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n    '[attr.data-readonly]': 'readonly() ? \"\" : null',\n    '[attr.dir]': 'dir()',\n  },\n  providers: [{ provide: FOR_SELECT_CONTEXT, useExisting: ForSelect }],\n})\nexport class ForSelect<T = string>\n  extends AnchoredFormValueControlBase\n  implements FormValueControl<readonly T[]>, ForSelectContext<T>\n{\n  readonly #typeahead = injectTypeahead();\n  readonly #closedTypeahead = injectTypeahead();\n  protected readonly positioningDefaults = inject(FOR_SELECT_DEFAULTS);\n\n  /** The `[forSelect]` root element (see `SelectPieceContext.host`). */\n  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n  /**\n   * Two-way bindable. Selected option values. Single-mode keeps 0 or 1\n   * element. The `model()` change emitter (`(valueChange)`) fires only on\n   * internal selection changes, never on consumer writes via `[(value)]`.\n   */\n  readonly value = model<readonly T[]>([]);\n\n  /**\n   * Compare two items for equality. Defaults to `===`, which is the\n   * correct identity for primitive `T` (e.g. strings, numbers). Override\n   * when binding object items so the directive can locate selected entries\n   * by id (or any other stable key) instead of by reference:\n   * `[compareWith]=\"(a, b) => a.id === b.id\"`.\n   */\n  readonly compareWith = input<(a: T, b: T) => boolean>((a, b) => a === b);\n\n  /**\n   * Serialize an item for the hidden input that participates in native\n   * form submission. Defaults to identity for strings and to\n   * `JSON.stringify` for non-string items so the primitive works out of\n   * the box round-tripping objects. Override to emit a specific wire\n   * format — typically a per-item id — when the backend expects that:\n   * `[itemToFormValue]=\"(it) => it.id\"`.\n   */\n  readonly itemToFormValue = input<(item: T) => string>(defaultItemToFormValue);\n\n  /**\n   * Resolve the display label for an item without the listbox mounted.\n   * When set, {@link selectedLabels} (and therefore `[forSelectValue]`)\n   * renders this for any selected value, so a pre-set object value shows\n   * its label on first paint — before the listbox has ever been opened, in\n   * the documented `@if (forSelect.open())` pattern. Without it, object-value\n   * labels resolve from the rendered option `textContent`, which is only\n   * available once the content mounts; the serialized form value is shown as\n   * a last-resort fallback in the meantime: `[itemToLabel]=\"(c) => c.name\"`.\n   *\n   * Defaults to `undefined` (string mode renders the value verbatim, so no\n   * label function is needed).\n   */\n  readonly itemToLabel = input<((item: T) => string) | undefined>(undefined);\n\n  /**\n   * Read-only single-select convenience view of {@link value}. Returns the\n   * sole value when exactly one is selected (regardless of `multiple`),\n   * otherwise `null` (zero, or 2+ selected). Lets single-select consumers\n   * read `selected()` instead of unwrapping `value()[0]`. The array-backed\n   * `value` model remains the source of truth and the `FormValueControl`\n   * contract; this is a derived accessor.\n   */\n  readonly selected = singleSelected(this.value);\n\n  /**\n   * Two-way bindable. Whether the listbox is currently shown. The `model()`\n   * change emitter (`(openChange)`) fires only on internal transitions\n   * (trigger toggle, Escape, outside dismissal, single-mode option select),\n   * never on consumer writes via `[(open)]`.\n   */\n  readonly open = model<boolean>(false);\n\n  /**\n   * When true, multiple options can be selected and option activation toggles\n   * without closing the listbox. Single mode (default) keeps the value array at\n   * 0 or 1 element and closes on select.\n   *\n   * In the default (non-virtualized) path the full APG range keyboard\n   * (Shift+Arrow, Shift+Space, Ctrl/Cmd+A, Ctrl+Shift+Home/End) extends the\n   * selection, matching `ForListbox`.\n   *\n   * That range keyboard is not supported together with virtualization\n   * (`totalCount` set): range selection needs the full set of enabled options\n   * across the range, which is unavailable while the list is partially\n   * unmounted. Pressing one of those combinations on a virtualized multi-select\n   * listbox throws in dev mode. Toggle options individually with Enter, Space,\n   * or click, or drop `totalCount` to use the non-virtualized DOM-focus listbox.\n   */\n  readonly multiple = input(false, { transform: booleanAttribute });\n\n  /**\n   * Presentation mode. When `true`, `[forSelectContent]` mounts as a trapped /\n   * inert / scroll-locked modal surface (routed through `_internal/modal-shell`)\n   * instead of the default anchored popover — the batteries-included touch\n   * presentation a consumer opts into with `[modal]=\"isCoarsePointer()\"`. The\n   * form-value wiring (`[(value)]`, `name`) is unchanged.\n   *\n   * Read once when the content mounts (the two shells are structurally\n   * different; switching at runtime would need a remount, and the surface\n   * mounts lazily via `@if (open())` well after `modal` settles). Every\n   * anchored-positioning input — `position`, `side`, `align`, `sideOffset`,\n   * `alignOffset`, `sticky`, `hideWhenDetached`, `clipUntilPositioned`, `avoidCollisions`,\n   * `collisionPadding` — is a no-op in this mode. Default\n   * `false` (non-breaking). The swipe / snap-point sheet is not\n   * this mode — compose a `ForListbox` inside a `ForDrawer` for that.\n   */\n  readonly modal = input(false, { transform: booleanAttribute });\n\n  /**\n   * Positioning algorithm.\n   *\n   * - `'popper'` (default): standard floating-ui anchored placement using\n   *   `side` / `align` / `sideOffset` / `alignOffset`, with `flip` + `shift`\n   *   collision handling. Same path as Popover / DropdownMenu.\n   * - `'item-aligned'`: the listbox overlays the trigger so the selected\n   *   option's vertical center aligns with the trigger's vertical center\n   *   — visually the menu \"snaps over\" the trigger when opened, mirroring\n   *   macOS native `<select>`. Falls back to the first enabled option when\n   *   nothing is selected. `side`, `align`, `sideOffset`, `alignOffset`,\n   *   `sticky`, `hideWhenDetached`, `clipUntilPositioned`, and `avoidCollisions` are ignored in\n   *   this mode; only `collisionPadding` is honored.\n   */\n  readonly position = input<'popper' | 'item-aligned'>('popper');\n\n  /** Whether arrow navigation wraps past the first / last enabled option. */\n  readonly loop = input(true, { transform: booleanAttribute });\n\n  /** Axis the arrow keys navigate. Reflected as `data-orientation` on the content. */\n  readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n  /**\n   * Total number of items in the source data. When set, switches the listbox\n   * to the virtualized `aria-activedescendant` focus model and populates\n   * `aria-setsize` on each rendered option. Leave unset (default) for the\n   * standard DOM-focus model.\n   */\n  readonly totalCount = input(undefined, {\n    transform: (v: unknown): number | undefined => (v == null ? undefined : numberAttribute(v)),\n  });\n  /**\n   * Inclusive-exclusive `[start, end)` index range of the currently rendered options, as provided\n   * by `injectVirtualizer`. Decides whether a navigation target is inside the visible window.\n   */\n  readonly visibleRange = input<readonly [number, number] | undefined>(undefined);\n\n  /**\n   * Virtualized-only open-time reveal hint: the absolute index of the currently\n   * committed option within the full source dataset. Consulted on open by the\n   * scroll-to-selected algorithm as the authoritative index when the committed\n   * value's option lies outside the rendered window and has never been rendered\n   * (so its position is absent from the navigator snapshot). Bind it from the\n   * consumer's own value→index lookup.\n   *\n   * This is a reveal hint, **not** a selection source — `value` / `[(value)]`\n   * stay authoritative; it only decides which option is scrolled into view on\n   * open. It is singular: in multiple mode it seeds the first committed option.\n   * Leave unset (default) for a non-virtualized select, or when the committed\n   * option is always inside the initial window. An off-window committed value\n   * with no `[selectedIndex]` that was never rendered falls back to focusing the\n   * first enabled option; an out-of-range index (or an empty selection) is\n   * silently ignored.\n   */\n  readonly selectedIndex = input<number | undefined>(undefined);\n\n  /**\n   * Optional virtualized-only seam that tells the directive the source dataset\n   * changed **without** a `totalCount` transition — a same-length re-sort or\n   * refresh (e.g. sorting a 1000-row list). Bind any value that changes on such\n   * a refresh (a version counter, the array reference, a sort-key string); when\n   * it changes the position snapshot rebuilds from empty so navigation never\n   * resolves against a stale off-window entry. Leave unset (default) when the\n   * dataset only ever changes length. Equivalent to calling\n   * {@link ForSelect.invalidateSnapshot} imperatively.\n   */\n  readonly dataVersion = input<unknown>();\n  /**\n   * Emitted when navigation reaches an option outside the rendered window, or\n   * on open-time scroll-to-selected when the committed option's absolute index\n   * is resolvable — it is in the rendered window, was previously rendered (in\n   * the snapshot), or was supplied via `[selectedIndex]`. Pass to\n   * `injectVirtualizer`'s `scrollToIndex` so the correct option mounts.\n   */\n  readonly scrollToIndex = output<number>();\n\n  /**\n   * Writing direction. When unset (default `null`), the inherited ambient\n   * direction is resolved from the nearest ancestor carrying a `dir` attribute\n   * (or `<html dir>`), defaulting to `'ltr'`. An explicit `[dir]` always wins.\n   * The resolved value is reflected to the host `dir` attribute.\n   */\n  readonly _dirInput = input<WritingDirection | null>(null, { alias: 'dir' });\n  readonly dir = injectTextDirection(this._dirInput);\n\n  /**\n   * Single-mode only. When true, arrow nav also selects the focused option\n   * while the listbox is open. APG calls this optional and recommends\n   * caution — leave off unless your UX truly benefits. Default `false`.\n   *\n   * Not supported together with virtualization (`totalCount` set): the\n   * virtualized `aria-activedescendant` path resolves off-window navigation\n   * targets asynchronously, so selection cannot follow focus there without\n   * deriving the committed value from a render side effect. Keyboard-navigating\n   * a virtualized listbox with it set throws in dev mode, from the move the\n   * combination degrades.\n   */\n  readonly selectionFollowsFocus = input(false, { transform: booleanAttribute });\n\n  /** Placeholder shown by `[forSelectValue]` when no option is selected. */\n  readonly placeholder = input<string>('');\n\n  /** When true (default), Escape, pointer-down outside, and focus outside close the listbox. */\n  readonly dismissible = input(true, { transform: booleanAttribute });\n\n  /** When true (default), focus returns to the trigger on close. */\n  readonly returnFocus = input(true, { transform: booleanAttribute });\n\n  /** Manual `aria-label` on `[forSelectContent]` when the trigger isn't a meaningful name. */\n  readonly ariaLabel = input<string | null>(null);\n\n  /** Emitted before Escape closes the listbox. Call `preventDefault()` to keep it open. */\n  readonly escapeKeyDown = output<VetoableNativeEvent<KeyboardEvent>>();\n\n  /** Emitted before an outside pointer-down closes the listbox. Vetoable with `preventDefault()`. */\n  readonly pointerDownOutside = output<VetoableNativeEvent<PointerEvent>>();\n\n  /** Emitted before focus leaving the surface closes the listbox. Vetoable with `preventDefault()`. */\n  readonly focusOutside = output<VetoableNativeEvent<FocusEvent>>();\n\n  /**\n   * Emitted alongside {@link pointerDownOutside} and {@link focusOutside} for consumers that do not\n   * care which one occurred. A `preventDefault()` on either channel suppresses the close.\n   */\n  readonly interactOutside = output<VetoableNativeEvent<PointerEvent | FocusEvent>>();\n\n  /**\n   * Fires just before the listbox sends focus to the selected option\n   * (or first / last enabled) on mount. Call `preventDefault()` on the\n   * emitted veto to skip the imperative focus move.\n   */\n  readonly autoFocusOnOpen = output<VetoableEvent>();\n\n  /**\n   * Fires just before focus returns to the trigger on unmount. Call\n   * `preventDefault()` on the veto to suppress the return-focus.\n   */\n  readonly autoFocusOnClose = output<VetoableEvent>();\n\n  readonly #virtualized = computed(() => this.totalCount() !== undefined);\n  readonly #activeId = signal<string | null>(null);\n\n  /**\n   * Shared overlay-listbox state machine: option collection, trigger / anchor /\n   * content registries + ids, DOM-focus navigation, the open / close machine,\n   * the initial-focus / close-reason state, and the dismiss / auto-focus emit\n   * forwarders. The value-specific behaviour (`isSelected`, `activate`,\n   * `focusSelectedOption`, typeahead, the virtualized activedescendant path,\n   * `commitOnTab`'s value set) stays in this root; close-time virtualized\n   * cleanup and the post-navigate scroll / `selectionFollowsFocus` move are\n   * threaded through the controller's side-effect callbacks.\n   */\n  readonly #controller = new ListboxOverlayController<\n    ForSelectOptionHandle<T>,\n    ForSelectInitialFocus,\n    ForSelectCloseReason\n  >({\n    idPrefix: 'for-select',\n    multipleAnchorsError: formatFortyMessage({\n      code: 'FORCDK-SELECT-005',\n      message: 'A [forSelect] registered a second [forSelectAnchor]; only one is allowed.',\n      fix: 'Keep a single [forSelectAnchor] per [forSelect].',\n    }),\n    defaultInitialFocus: 'selected',\n    effectiveDisabled: this.effectiveDisabled,\n    setOpen: (open) => this.open.set(open),\n    isOpen: () => this.open(),\n    emit: {\n      escapeKeyDown: this.escapeKeyDown,\n      pointerDownOutside: this.pointerDownOutside,\n      focusOutside: this.focusOutside,\n      interactOutside: this.interactOutside,\n      autoFocusOnOpen: this.autoFocusOnOpen,\n      autoFocusOnClose: this.autoFocusOnClose,\n    },\n    loop: this.loop,\n    dismissible: this.dismissible,\n    escapeReason: 'escape',\n    programmaticReason: 'programmatic',\n    markTouched: () => this.markTouched(),\n    onClose: () => {\n      if (this.#virtualized()) {\n        this.#activeId.set(null);\n        this.#navigator?.resetPending();\n      }\n    },\n    onNavigateFocus: (target) => {\n      this.#scrollActiveIntoView(target.host);\n      if (!this.multiple() && this.selectionFollowsFocus() && !this.readonly()) {\n        this.#rangeEngine.selectSingle(target.value());\n      }\n    },\n    onUnregisterOption: (handle) => {\n      if (this.#virtualized() && this.#activeId() === handle.id()) {\n        this.#activeId.set(null);\n      }\n    },\n  });\n\n  /**\n   * The shared overlay-listbox coordination surface: trigger / anchor / content registration and\n   * ids, DOM-focus navigation, the open / close machine, and the dismiss and auto-focus forwarders.\n   *\n   * Positioning prefers a registered `[forSelectAnchor]`, reached via `overlay.anchor`, and falls\n   * back to the trigger.\n   */\n  readonly overlay: ForSelectOverlayFacade = this.#controller;\n\n  /**\n   * Shared APG range-selection state machine: owns the range anchor and the\n   * Shift+Arrow / Shift+Space / Ctrl+A / Ctrl+Shift+Home/End actions plus the\n   * single-mode idempotent select guard. The value-specific `activate` (which\n   * also closes the listbox in single mode) and the virtualized activedescendant\n   * path stay in this root; the range methods one-line delegate here.\n   */\n  readonly #rangeEngine = new RangeSelectionEngine<T, ForSelectOptionHandle<T>>({\n    options: this.#controller.options,\n    value: this.value,\n    setValue: (v) => this.value.set(v),\n    compareWith: this.compareWith,\n    multiple: this.multiple,\n    effectiveDisabled: this.effectiveDisabled,\n    readonly: this.readonly,\n  });\n\n  /** The active option's `id` in the virtualized path, `null` in the default path. */\n  private readonly activeDescendantId = computed<string | null>(() =>\n    this.#virtualized() ? this.#activeId() : null,\n  );\n\n  readonly #pointerSuppression = createPointerSuppression();\n\n  readonly #pointerHost = signal<HTMLElement | null>(null);\n\n  private readonly pointerHighlightedOption = computed<HTMLElement | null>(() => {\n    const host = this.#pointerHost();\n    if (host === null) {\n      return null;\n    }\n    const handle = this.#controller.options().find((option) => option.host === host);\n    return handle && !handle.disabled() ? host : null;\n  });\n\n  #navigator: SelectVirtualizedNavigator<T> | null = null;\n  #requireNavigator(): SelectVirtualizedNavigator<T> {\n    return (this.#navigator ??= createSelectVirtualizedNavigator<T>(\n      {\n        items: this.#controller.options,\n        totalCount: this.totalCount,\n        visibleRange: this.visibleRange,\n        loop: this.loop,\n        getActiveId: () => this.#activeId(),\n        setActiveId: (id) => this.#activeId.set(id),\n        emitScrollToIndex: (idx) => this.scrollToIndex.emit(idx),\n        dataVersion: this.dataVersion,\n      },\n      (host) => this.#scrollActiveIntoView(host),\n    ));\n  }\n\n  /**\n   * Force the virtualized position snapshot to rebuild from empty on the next\n   * fold, discarding stale off-window entries. Call after a same-length dataset\n   * refresh (a re-sort / reload that keeps `totalCount` unchanged) when you\n   * cannot express the change through the reactive `[dataVersion]` input. No-op\n   * when the select is not virtualized (`totalCount` unset).\n   */\n  invalidateSnapshot(): void {\n    if (!this.#virtualized()) {\n      return;\n    }\n    this.#requireNavigator().invalidateSnapshot();\n  }\n\n  /**\n   * Bounded option-label cache. The live `options` registry is empty whenever\n   * `[forSelectContent]` is unmounted, so {@link selectedLabels} reads the selection-keyed\n   * projection and {@link handleClosedTypeahead} the last-window one.\n   *\n   * Because the window store is replaced rather than merged, a removal performed while the listbox\n   * is **closed** cannot refresh it, so closed-state typeahead can still commit a value that no\n   * longer exists until the next open. When virtualizing, the window is the rendered slice, so a\n   * closed-state match is scoped to it. Selected labels are unaffected — they live in the\n   * selection-keyed projection for as long as the value stays selected.\n   */\n  readonly #labelCache = new LabelCache<T>({\n    items: this.#controller.options,\n    value: this.value,\n    itemToFormValue: this.itemToFormValue,\n  });\n\n  /**\n   * Trimmed display labels of the selected values, in selection order. Pure\n   * derivation: when `[itemToLabel]` is supplied it is authoritative; otherwise\n   * resolve from the selection-keyed label cache, then the serialized form value\n   * so non-string items still render meaningfully on a cold cache.\n   *\n   * The cache's labels come from each option's reactive `label` signal,\n   * which reads the rendered `textContent`. `textContent` is not a signal, so a\n   * label whose rendered text changes without a value change does not self-heal\n   * here — supply `[itemToLabel]` for a pure signal derivation that observes\n   * label changes directly.\n   */\n  readonly selectedLabels = computed<readonly string[]>(() => {\n    const values = this.value();\n    if (values.length === 0) {\n      return [];\n    }\n    // When `[itemToLabel]` is supplied it is authoritative: the label resolves\n    // without the listbox mounted, so a pre-set object value renders correctly\n    // on first paint in the documented `@if (open())` pattern and never flickers\n    // from a serialized id to the real label once the listbox is first opened.\n    const itemToLabel = this.itemToLabel();\n    if (itemToLabel) {\n      return values.map(itemToLabel);\n    }\n    const cached = this.#labelCache.selectedEntries();\n    const toFormValue = this.itemToFormValue();\n    const cachedByKey = new Map<string, LabelCacheEntry<T>>();\n    for (const o of cached) {\n      cachedByKey.set(toFormValue(o.value), o);\n    }\n    const labels: string[] = [];\n    for (const v of values) {\n      const key = toFormValue(v);\n      const opt = cachedByKey.get(key);\n      labels.push(opt ? opt.label : typeof v === 'string' ? (v as string) : key);\n    }\n    return labels;\n  });\n\n  private readonly selectedOptionEl = computed<HTMLElement | null>(() => {\n    const values = this.value();\n    if (values.length === 0) {\n      return null;\n    }\n    const items = this.#controller.options();\n    const toFormValue = this.itemToFormValue();\n    const byKey = new Map<string, ForSelectOptionHandle<T>>();\n    for (const o of items) {\n      byKey.set(toFormValue(o.value()), o);\n    }\n    for (const v of values) {\n      const opt = byKey.get(toFormValue(v));\n      if (opt) {\n        return opt.host;\n      }\n    }\n    return null;\n  });\n\n  protected override fieldLabelledElement(): HTMLElement | null {\n    return this.#controller.trigger();\n  }\n\n  protected override fieldLabelledElementId(): string {\n    return this.#controller.triggerId();\n  }\n\n  /**\n   * Move focus to the trigger, implementing `FormValueControl.focus` from\n   * `@angular/forms/signals`. Without this override Signal Forms would focus the\n   * host `[forSelect]` wrapper — which carries no focusable role — so\n   * focus-on-error would silently go nowhere. No-op when disabled or before the\n   * trigger has registered.\n   */\n  override focus(options?: FocusOptions): void {\n    if (this.effectiveDisabled()) {\n      return;\n    }\n    this.#controller.trigger()?.focus(options);\n  }\n\n  constructor() {\n    super();\n    injectHiddenInput<T>({\n      name: this.name,\n      values: this.value,\n      serialize: (item) => this.itemToFormValue()(item),\n      disabled: this.effectiveDisabled,\n    });\n\n    // @sanctioned-pull(label-cache-window): the option window exists only while\n    // the listbox is open, and the closed-state typeahead reading it has no\n    // reader during that cycle.\n    effect(() => {\n      if (this.open()) {\n        this.#labelCache.prime();\n      }\n    });\n\n    // @sanctioned-pull(navigator-position-map): the rendered window is transient,\n    // so a window nothing reads during is lost to the lazy fold.\n    effect(() => {\n      runVirtualizedNavigatorBridge({\n        items: this.#controller.options,\n        virtualized: this.#virtualized,\n        requireNavigator: () => this.#requireNavigator(),\n      });\n    });\n  }\n\n  isSelected(v: T): boolean {\n    return isInArray(this.value(), v, this.compareWith());\n  }\n\n  activate(v: T): void {\n    if (this.effectiveDisabled() || this.readonly() || isUnset(v)) {\n      return;\n    }\n    if (this.multiple()) {\n      this.value.set(toggleInArray(this.value(), v, this.compareWith()));\n      this.#rangeEngine.setAnchor(v);\n      return;\n    }\n    this.#rangeEngine.selectSingle(v);\n    this.#rangeEngine.setAnchor(v);\n    this.#controller.closeOverlay('select');\n  }\n\n  private extendByArrow(currentOption: HTMLElement, action: 'next' | 'prev'): void {\n    this.#rangeEngine.extendByArrow(currentOption, action);\n  }\n\n  private selectRangeToFocused(currentOption: HTMLElement): void {\n    this.#rangeEngine.selectRangeToFocused(currentOption);\n  }\n\n  selectAll(): void {\n    this.#rangeEngine.selectAll();\n  }\n\n  private selectFromCurrentToEdge(currentOption: HTMLElement, edge: 'first' | 'last'): void {\n    this.#rangeEngine.selectFromCurrentToEdge(currentOption, edge);\n  }\n\n  private handleTypeahead(event: KeyboardEvent): void {\n    const options = this.#controller.options();\n    const { match } = resolveListTypeahead(this.#typeahead, event, {\n      items: options,\n      anchorIndex: options.findIndex((o) => o.host === event.target),\n      getText: (o) => accessibleTextContent(o.host),\n      isDisabled: (o) => o.disabled(),\n    });\n    if (match) {\n      this.#pointerSuppression.suppress();\n      match.host.focus();\n    }\n  }\n\n  private handleClosedTypeahead(event: KeyboardEvent): boolean {\n    // Only single-mode replicates native <select>'s \"type-to-select\" behavior.\n    // Multi-select is ambiguous (which one wins?) — caller falls back to opening.\n    if (this.multiple() || this.effectiveDisabled() || this.readonly()) {\n      return false;\n    }\n    if (!this.#closedTypeahead.handle(event)) {\n      return false;\n    }\n    const cached = this.#labelCache.windowEntries();\n    const selected = this.selected();\n    const equals = this.compareWith();\n    const anchorIndex = selected === null ? -1 : cached.findIndex((o) => equals(o.value, selected));\n    const match = findTypeaheadMatch(\n      cached,\n      {\n        buffer: this.#closedTypeahead.buffer(),\n        repeated: this.#closedTypeahead.isRepeatedChar(),\n        anchorIndex,\n      },\n      (o) => o.label,\n      () => false,\n    );\n    if (match) {\n      this.value.set([match.value]);\n    }\n    return true;\n  }\n\n  private focusSelectedOption(): boolean {\n    const values = this.value();\n    if (values.length === 0) {\n      return false;\n    }\n    const equals = this.compareWith();\n    const items = this.#controller.options();\n    for (const v of values) {\n      const opt = items.find((o) => equals(o.value(), v) && !o.disabled());\n      if (opt) {\n        opt.host.focus();\n        return true;\n      }\n    }\n    return false;\n  }\n\n  private scrollSelectedOptionIntoView(): void {\n    if (this.totalCount() !== undefined) {\n      return;\n    }\n    const selected = this.selectedOptionEl();\n    if (selected) {\n      this.#scrollActiveIntoView(selected);\n    }\n  }\n\n  private highlightFromPointer(host: HTMLElement, id: string): void {\n    if (this.#pointerSuppression.isSuppressed()) {\n      return;\n    }\n    if (this.#virtualized()) {\n      this.#activeId.set(id);\n      return;\n    }\n    this.#pointerHost.set(host);\n  }\n\n  private notifyOptionFocus(): void {\n    this.#pointerHost.set(null);\n  }\n\n  private releasePointerHighlight(): void {\n    this.#pointerHost.set(null);\n  }\n\n  /**\n   * Scroll an option into view with the pointer-suppression window open, so the\n   * synthetic `pointermove` the scroll fires when a different option slides under\n   * a stationary cursor cannot hand the highlight to it.\n   */\n  #scrollActiveIntoView(host: HTMLElement): void {\n    this.#pointerSuppression.suppress();\n    this.#pointerHost.set(null);\n    host.scrollIntoView?.({ block: 'nearest' });\n  }\n\n  private commitOnTab(value: T): void {\n    if (this.effectiveDisabled() || isUnset(value)) {\n      return;\n    }\n    if (!this.multiple() && !this.readonly()) {\n      this.#rangeEngine.selectSingle(value);\n    }\n    // Move focus to the trigger BEFORE the unmount + close so the browser's\n    // Tab default action has a stable active element to advance from. The\n    // content's `DestroyRef` reads `lastCloseReason() === 'tab'` and skips\n    // its own re-focus — otherwise it would steal focus back from wherever\n    // the browser advanced it.\n    this.#controller.focusTrigger();\n    this.#controller.closeOverlay('tab');\n  }\n\n  override markTouched(): void {\n    super.markTouched();\n  }\n\n  private seedVirtualizedInitialFocus(): void {\n    if (!this.#virtualized()) {\n      return;\n    }\n    const navigator = this.#requireNavigator();\n    const committed = this.#committedIndex(navigator);\n    if (committed !== null) {\n      navigator.seedActive(committed);\n      return;\n    }\n    const hinted = this.#hintedSelectedIndex();\n    if (hinted !== null) {\n      navigator.seedActive(hinted);\n      return;\n    }\n    navigator.navigate('first');\n  }\n\n  private handleVirtualizedKeydown(event: KeyboardEvent): void {\n    if (!this.#virtualized() || this.effectiveDisabled()) {\n      return;\n    }\n    if (\n      this.multiple() &&\n      isRangeSelectShortcut(event, { orientation: this.orientation(), dir: this.dir() })\n    ) {\n      event.preventDefault();\n      throwUnsupportedVirtualizedRangeSelect({\n        primitive: 'select',\n        focusModel: 'DOM-focus',\n        collection: 'listbox',\n        shortcuts: 'Shift+Arrow, Shift+Space, Ctrl/Cmd+A, Ctrl+Shift+Home/End',\n        alternative: 'Toggle options individually with Enter, Space, or click',\n      });\n      return;\n    }\n    if (event.key === 'Tab') {\n      if (this.modal()) {\n        return;\n      }\n      this.#commitActiveDescendantOnTab();\n      return;\n    }\n    if (event.key === 'Enter' || event.key === ' ') {\n      event.preventDefault();\n      this.#activateActiveDescendant();\n      return;\n    }\n    const action = resolveListNavigation(event, {\n      orientation: this.orientation(),\n      dir: this.dir(),\n      pageKeys: true,\n    });\n    if (action) {\n      event.preventDefault();\n      this.#assertSelectionFollowsFocusSupported();\n      this.#requireNavigator().navigate(action);\n      return;\n    }\n    this.#typeaheadVirtualized(event);\n  }\n\n  /**\n   * Guards the `selectionFollowsFocus` + virtualization invariant at every\n   * keyboard move of the virtualized activedescendant — arrow / Home / End /\n   * Page navigation and a typeahead match alike, since both move focus without\n   * carrying selection. Seeding on open and a click are not\n   * covered: neither is a navigation the combination degrades.\n   */\n  #assertSelectionFollowsFocusSupported(): void {\n    if (this.#virtualized() && this.selectionFollowsFocus()) {\n      throwUnsupportedVirtualizedSelectionFollowsFocus({\n        primitive: 'select',\n        focusModel: 'DOM-focus',\n        collection: 'listbox',\n      });\n    }\n  }\n\n  private notifyOptionClick(optionId: string): void {\n    if (!this.#virtualized()) {\n      return;\n    }\n    this.#activeId.set(optionId);\n    this.#controller.content()?.focus();\n  }\n\n  #committedIndex(navigator: SelectVirtualizedNavigator<T>): number | null {\n    const values = this.value();\n    if (values.length === 0) {\n      return null;\n    }\n    const equals = this.compareWith();\n    const snapshot = navigator.snapshotByPos();\n    for (const v of values) {\n      for (const [pos, entry] of snapshot) {\n        if (!entry.disabled && equals(entry.value, v)) {\n          return pos;\n        }\n      }\n    }\n    return null;\n  }\n\n  #hintedSelectedIndex(): number | null {\n    if (this.value().length === 0) {\n      return null;\n    }\n    const idx = this.selectedIndex();\n    const total = this.totalCount();\n    if (idx === undefined || total === undefined || idx < 0 || idx >= total) {\n      return null;\n    }\n    return idx;\n  }\n\n  #activateActiveDescendant(): void {\n    const id = this.#activeId();\n    if (id === null) {\n      return;\n    }\n    const handle = this.#controller.options().find((o) => o.id() === id);\n    if (!handle || handle.disabled()) {\n      return;\n    }\n    this.activate(handle.value());\n  }\n\n  #commitActiveDescendantOnTab(): void {\n    const id = this.#activeId();\n    const handle = id === null ? undefined : this.#controller.options().find((o) => o.id() === id);\n    if (handle && !handle.disabled()) {\n      this.commitOnTab(handle.value());\n      return;\n    }\n    this.#controller.closeOverlay('tab');\n  }\n\n  #typeaheadVirtualized(event: KeyboardEvent): void {\n    const options = this.#controller.options();\n    const activeId = this.#activeId();\n    const { match } = resolveListTypeahead(this.#typeahead, event, {\n      items: options,\n      anchorIndex: activeId === null ? -1 : options.findIndex((o) => o.id() === activeId),\n      getText: (o) => accessibleTextContent(o.host),\n      isDisabled: (o) => o.disabled(),\n    });\n    if (match) {\n      this.#assertSelectionFollowsFocusSupported();\n      this.#activeId.set(match.id());\n      this.#scrollActiveIntoView(match.host);\n    }\n  }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\nimport { registerHandle } from 'forty-cdk/core';\nimport { injectSelectContext } from './select-context';\n\n/**\n * Optional positioning anchor. When present, `[forSelectContent]` is\n * positioned against this element instead of `[forSelectTrigger]` — useful\n * when the trigger lives inside a decorated field box (padding, prefix icon,\n * clear / chevron buttons) and the listbox should match the visible field\n * rather than the inner button.\n *\n * Only positioning changes: the trigger still owns `aria-controls`,\n * `aria-expanded`, the click toggle, focus return on close, and its exemption\n * from outside-pointer dismissal. If no anchor is registered the listbox falls\n * back to anchoring against the trigger, so existing usages are unaffected.\n *\n * At most one `[forSelectAnchor]` may be registered per `[forSelect]`; a second\n * one throws.\n *\n * ```html\n * <div forSelect [(value)]=\"v\">\n *   <div forSelectAnchor class=\"field-box\">\n *     <icon />\n *     <button forSelectTrigger>…</button>\n *     <button class=\"clear\">×</button>\n *   </div>\n *   @if (open()) {\n *     <div forSelectContent>…</div>\n *   }\n * </div>\n * ```\n */\n@Directive({\n  selector: '[forSelectAnchor]',\n  exportAs: 'forSelectAnchor',\n})\nexport class ForSelectAnchor {\n  readonly #ctx = injectSelectContext('ForSelectAnchor');\n  readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  constructor() {\n    registerHandle(\n      this.#host.nativeElement,\n      (el) => this.#ctx.overlay.registerAnchor(el),\n      (el) => this.#ctx.overlay.unregisterAnchor(el),\n    );\n  }\n}\n","import { computed, Directive, effect, ElementRef, inject, input, type Signal } from '@angular/core';\n\nimport { hostButtonType, reflectDisabled } from 'forty-cdk/core';\nimport {\n  type ForSelectContext,\n  injectSelectTriggerContext,\n  type SelectContext,\n} from './select-context';\n\n/**\n * Combobox button that opens the listbox. Apply on a `<button>` so\n * Space / Enter dispatch native click events that toggle via `(click)`.\n *\n * Wires APG select-only combobox attributes: `role=\"combobox\"`,\n * `aria-haspopup=\"listbox\"`, `aria-expanded`, and `aria-controls` pointing\n * to the listbox. The button is exempt from the listbox's dismissible\n * layer — clicks on it route through `(click)` instead of triggering an\n * outside-pointer dismissal race.\n *\n * Disabling: the native `disabled` attribute is the single reflection channel\n * — no `aria-disabled` is emitted, because on a real single-purpose `<button>`\n * trigger the native attribute already conveys the state to assistive\n * technology, and it is what suppresses activation here. The\n * `role=\"combobox\"` override does not change that: the HTML `disabled`\n * attribute maps to the unavailable state regardless of the ARIA role, and a\n * native `<select disabled>` leaves the tab order the same way. It is\n * reflected non-destructively — the directive only removes the attribute when\n * it set it itself — and `data-disabled=\"\"` stays as the styling hook. The\n * remaining form-control state (`aria-readonly` / `aria-required` /\n * `aria-invalid` / `aria-busy`) is unaffected, and the read-only state carries\n * its own `data-readonly=\"\"` styling hook — `readonly` is not a valid attribute\n * of `<button>`, so a `data-*` channel is the only one available there.\n *\n * The root is normally resolved via DI from the enclosing `[forSelect]`.\n * When the trigger is declared inside an `ng-template` stamped into the root\n * (e.g. via `ngTemplateOutlet`), DI resolves at the template's declaration\n * site and misses the root — pass it explicitly through the selector input,\n * `routerLink`-style: `[forSelectTrigger]=\"root\"` with `#root=\"forSelect\"`.\n *\n * Keyboard:\n * - **Click / Enter / Space** — toggle (open focuses the selected option, or first).\n * - **ArrowDown** — open + focus selected option (or first).\n * - **ArrowUp** — open + focus selected option (or last when none selected).\n * - **Typeahead** (single mode only) — printable keys select the matching\n *   option immediately without opening the listbox, mirroring native\n *   `<select>`. In multi mode the buffered key is ignored at the trigger;\n *   open the listbox first to typeahead-focus.\n */\n@Directive({\n  selector: '[forSelectTrigger]',\n  exportAs: 'forSelectTrigger',\n  host: {\n    '[attr.type]': 'buttonType()',\n    role: 'combobox',\n    '[id]': 'ctx().overlay.triggerId()',\n    '[attr.aria-haspopup]': '\"listbox\"',\n    '[attr.aria-expanded]': 'ctx().open() ? \"true\" : \"false\"',\n    '[attr.aria-controls]': 'ctx().open() ? ctx().overlay.contentId() : null',\n    '[attr.aria-readonly]': 'ctx().readonly() ? \"true\" : null',\n    '[attr.aria-required]': 'ctx().required() ? \"true\" : null',\n    '[attr.aria-invalid]': 'ctx().invalid() ? \"true\" : null',\n    '[attr.aria-busy]': 'ctx().pending() ? \"true\" : null',\n    '[attr.data-state]': 'ctx().open() ? \"open\" : \"closed\"',\n    '[attr.data-disabled]': 'ctx().effectiveDisabled() ? \"\" : null',\n    '[attr.data-readonly]': 'ctx().readonly() ? \"\" : null',\n    '(click)': 'onClick()',\n    '(keydown)': 'onKeyDown($event)',\n    '(focusout)': 'onFocusOut($event)',\n  },\n})\nexport class ForSelectTrigger<T = unknown> {\n  protected readonly buttonType = hostButtonType();\n\n  readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  /**\n   * Optional explicit reference to the `[forSelect]` root, named after the\n   * selector `routerLink`-style. The bare valueless attribute keeps resolving\n   * the enclosing root via DI; pass the root explicitly\n   * (`[forSelectTrigger]=\"root\"`, with `#root=\"forSelect\"`) when the trigger\n   * is declared in an `ng-template` stamped inside the root — DI resolves at\n   * the template's declaration site, so the enclosing root is invisible there.\n   * The empty string (what the valueless attribute yields) is treated as unset.\n   */\n  readonly forSelectTrigger = input<ForSelectContext<T> | ''>('');\n\n  readonly #root = injectSelectTriggerContext<T>(this.forSelectTrigger);\n  protected readonly ctx: Signal<SelectContext<T>> = this.#root;\n\n  constructor() {\n    const el = this.#host.nativeElement;\n    // Registration is an imperative call into the resolved root's registry,\n    // not state derivation — the effect only re-registers the element when the\n    // resolved root changes (explicit reference swapped at runtime).\n    effect((onCleanup) => {\n      const overlay = this.#root().overlay;\n      overlay.registerTrigger(el);\n      onCleanup(() => overlay.unregisterTrigger(el));\n    });\n    reflectDisabled(computed(() => this.ctx().effectiveDisabled()));\n  }\n\n  protected onClick(): void {\n    this.#root().overlay.toggle('selected');\n  }\n\n  protected onKeyDown(event: KeyboardEvent): void {\n    if (this.ctx().effectiveDisabled()) {\n      return;\n    }\n    if (event.key === 'ArrowDown') {\n      event.preventDefault();\n      this.#root().overlay.openOverlay('selected');\n      return;\n    }\n    if (event.key === 'ArrowUp') {\n      event.preventDefault();\n      // ArrowUp lands on the selected option if any, else the last enabled.\n      this.#root().overlay.openOverlay(this.ctx().value().length > 0 ? 'selected' : 'last');\n      return;\n    }\n    // Closed-state typeahead — single-mode shortcut to match native <select>.\n    // No-op (returns false) in multi mode or when the key isn't a printable\n    // single char, so default browser behavior (e.g. nothing) takes over.\n    this.ctx().handleClosedTypeahead(event);\n  }\n\n  protected onFocusOut(event: FocusEvent): void {\n    const next = event.relatedTarget as HTMLElement | null;\n    if (next) {\n      // Focus moving into the listbox content (we just opened it) — not a leave.\n      const content = this.#root().overlay.content();\n      if (content && content.contains(next)) {\n        return;\n      }\n      // Focus going to a sibling inside the [forSelect] wrapper — also not a leave.\n      if (this.ctx().host.contains(next)) {\n        return;\n      }\n    }\n    this.ctx().markTouched();\n  }\n}\n","import { computed, Directive, input } from '@angular/core';\n\nimport { injectSelectContext } from './select-context';\n\n/**\n * Renders the currently-selected option's text — or the configured\n * placeholder when nothing is selected — into its host element via\n * `textContent`. Apply on a `<span>` (or any inline element) inside\n * `[forSelectTrigger]`:\n *\n * ```html\n * <button forSelectTrigger>\n *   <span forSelectValue placeholder=\"Select fruit…\"></span>\n * </button>\n * ```\n *\n * In multi mode the labels are joined by `separator` (default `', '`). For\n * fully custom rendering, drop this directive and read\n * `forSelect.selectedLabels()` / `forSelect.value()` from your template.\n */\n@Directive({\n  selector: '[forSelectValue]',\n  exportAs: 'forSelectValue',\n  host: {\n    '[textContent]': 'displayText()',\n    '[attr.data-placeholder]': 'isPlaceholder() ? \"\" : null',\n  },\n})\nexport class ForSelectValue {\n  readonly #ctx = injectSelectContext('ForSelectValue');\n\n  /** Text shown when nothing is selected. Falls back to `[forSelect][placeholder]`. */\n  readonly placeholder = input<string>('');\n\n  /** Joiner for multi-mode label rendering. Default `', '`. */\n  readonly separator = input<string>(', ');\n\n  protected readonly isPlaceholder = computed(() => this.#ctx.value().length === 0);\n\n  protected readonly displayText = computed(() => {\n    const labels = this.#ctx.selectedLabels();\n    if (labels.length === 0) {\n      return this.placeholder() || this.#ctx.placeholder();\n    }\n    return labels.join(this.separator());\n  });\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\n\nimport { registerHandle, hostAriaLabel, hostLabelledBy } from 'forty-cdk/core';\nimport {\n  injectModalShell,\n  injectOverlayShell,\n  type OverlayShellPositionerConfig,\n  warnIfMountedWhileClosed,\n} from 'forty-cdk/core-overlay';\nimport { injectSelectContext, type SelectContext } from './select-context';\n\n/**\n * The listbox surface. Carries `role=\"listbox\"`, is portaled to\n * `document.body`, and is positioned by `@floating-ui/dom` against the\n * trigger.\n *\n * Mount/unmount of the visible content is the consumer's responsibility —\n * wrap with `@if (open())` so `animate.enter` / `animate.leave` fire on the\n * natural mount cycle. While mounted it dismisses on Escape, pointer-down\n * outside or focus outside; the trigger element is exempt from outside-pointer\n * checks so trigger clicks toggle without dismissal racing.\n *\n * Initial focus is sent to the selected option (`'selected'`), the first\n * enabled option (`'first'`), or the last enabled option (`'last'`)\n * according to the trigger's hint. On destroy, focus returns to the\n * trigger when `returnFocus` is true.\n *\n * The lifecycle is picked once on construction from `[forSelect].modal`:\n *\n * - **non-modal (default)** — the listbox is anchored to the trigger and\n *   branches on `[forSelect].position`:\n *   - `'popper'` (default) — full anchored placement (`side`, `align`,\n *     `sideOffset`, `alignOffset`, `flip`, `shift`, `arrow`,\n *     `hideWhenDetached`).\n *   - `'item-aligned'` — the listbox overlays the trigger so the selected\n *     option's center aligns with the trigger's center. The anchored-placement\n *     inputs are no-ops in this mode.\n * - **modal** — focus is trapped, the background is inerted and body scroll is\n *   locked; the surface is centered and positioned by the consumer's CSS rather\n *   than anchored to the trigger, so every anchored-positioning input is a\n *   no-op. Escape / outside-pointer dismiss, `dismissible` / `returnFocus` /\n *   `ariaLabel` and the `autoFocusOnOpen` / `autoFocusOnClose` vetoes are\n *   unchanged. Modality is conveyed by the `inert` siblings and reflected as\n *   `data-modal` for styling; `role=\"listbox\"` does not support `aria-modal`,\n *   so it is not emitted.\n */\n@Directive({\n  selector: '[forSelectContent]',\n  exportAs: 'forSelectContent',\n  host: {\n    role: 'listbox',\n    '[attr.tabindex]': 'ctx.totalCount() !== undefined ? \"0\" : \"-1\"',\n    '[attr.aria-activedescendant]': 'ctx.activeDescendantId()',\n    '[id]': 'ctx.overlay.contentId()',\n    '[attr.aria-labelledby]': 'labelledBy()',\n    '[attr.aria-label]': 'resolvedAriaLabel()',\n    '[attr.aria-multiselectable]': 'ctx.multiple() ? \"true\" : null',\n    '[attr.aria-orientation]': 'ctx.orientation()',\n    '[attr.data-state]': 'ctx.open() ? \"open\" : \"closed\"',\n    '[attr.data-modal]': 'ctx.modal() ? \"\" : null',\n    '[attr.data-orientation]': 'ctx.orientation()',\n    '(keydown)': 'onKeyDown($event)',\n    '(pointerleave)': 'onPointerLeave()',\n  },\n})\nexport class ForSelectContent {\n  readonly #select = injectSelectContext('ForSelectContent');\n  protected readonly ctx: SelectContext = this.#select;\n  readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  protected readonly resolvedAriaLabel = hostAriaLabel(() => this.ctx.ariaLabel());\n\n  protected readonly labelledBy = hostLabelledBy(() =>\n    this.resolvedAriaLabel() ? null : this.ctx.overlay.triggerId(),\n  );\n\n  constructor() {\n    const ctx = this.#select;\n    registerHandle(\n      this.#host.nativeElement,\n      (el) => ctx.overlay.registerContent(el),\n      (el) => ctx.overlay.unregisterContent(el),\n    );\n\n    warnIfMountedWhileClosed({\n      primitive: 'select',\n      piece: '[forSelectContent]',\n      condition: 'select.open()',\n      open: ctx.open,\n    });\n\n    // Primitive-owned initial-focus algorithm shared by both shells.\n    // `'selected'` falls back to the first enabled option when nothing is\n    // selected; returns `false` so the shell focuses the container on a miss.\n    const focusInitial = (): boolean => {\n      if (ctx.totalCount() !== undefined) {\n        this.#host.nativeElement.focus();\n        ctx.seedVirtualizedInitialFocus();\n        return true;\n      }\n      const target = ctx.overlay.initialFocus();\n      if (target === 'selected') {\n        return ctx.focusSelectedOption() || ctx.overlay.focusFirstEnabledOption();\n      }\n      if (target === 'last') {\n        return ctx.overlay.focusLastEnabledOption();\n      }\n      return ctx.overlay.focusFirstEnabledOption();\n    };\n\n    // Static branch — `modal` (and `position`) is read once on construction.\n    // Switching modes at runtime would require re-creating the directive\n    // (mount / unmount cycle), which is the expected pattern for primitives\n    // whose surface is structurally different. The surface mounts lazily via\n    // `@if (open())`, well after `modal` settles.\n    if (ctx.modal()) {\n      injectModalShell({\n        modal: ctx.modal,\n        returnFocus: ctx.returnFocus,\n        // The trap owns Tab; the shell runs `focusInitial()` (selected →\n        // first → last) instead of its own first-focusable move.\n        initialFocus: {\n          move: focusInitial,\n          veto: () => ctx.overlay.emitAutoFocusOnOpen(),\n        },\n        autoFocusOnClose: () => (event) => {\n          if (ctx.overlay.emitAutoFocusOnClose()) {\n            event.preventDefault();\n          }\n        },\n        dismiss: {\n          dismissible: ctx.dismissible,\n          // The shell builds the veto and calls this when not vetoed; mirror\n          // the anchored path's touched-on-dismiss behaviour.\n          requestClose: (reason) => {\n            ctx.markTouched();\n            ctx.overlay.closeOverlay(reason);\n          },\n          emitEscapeKeyDown: (veto) => ctx.overlay.forwardEscapeKeyDown(veto),\n          emitPointerDownOutside: (veto) => ctx.overlay.emitPointerDownOutside(veto),\n          emitFocusOutside: (veto) => ctx.overlay.emitFocusOutside(veto),\n          emitInteractOutside: (veto) => ctx.overlay.emitInteractOutside(veto),\n        },\n      });\n      return;\n    }\n\n    const positioner: OverlayShellPositionerConfig =\n      ctx.position() === 'item-aligned'\n        ? {\n            kind: 'item-aligned',\n            reference: ctx.overlay.anchor,\n            open: ctx.open,\n            selectedOption: ctx.selectedOptionEl,\n            collisionPadding: ctx.collisionPadding,\n          }\n        : {\n            kind: 'floating',\n            reference: ctx.overlay.anchor,\n            open: ctx.open,\n            side: ctx.side,\n            align: ctx.align,\n            sideOffset: ctx.sideOffset,\n            alignOffset: ctx.alignOffset,\n            avoidCollisions: ctx.avoidCollisions,\n            collisionPadding: ctx.collisionPadding,\n            sticky: ctx.sticky,\n            hideWhenDetached: ctx.hideWhenDetached,\n            clipUntilPositioned: ctx.clipUntilPositioned,\n            onFirstPosition: () => ctx.scrollSelectedOptionIntoView(),\n          };\n\n    injectOverlayShell({\n      positioner,\n      dismiss: {\n        dismissible: ctx.dismissible,\n        // Mirror the modal path's touched-on-dismiss behaviour.\n        requestClose: (reason) => {\n          ctx.markTouched();\n          ctx.overlay.closeOverlay(reason);\n        },\n        emitEscapeKeyDown: (event) => ctx.overlay.emitEscapeKeyDown(event),\n        emitPointerDownOutside: (veto) => ctx.overlay.emitPointerDownOutside(veto),\n        emitFocusOutside: (veto) => ctx.overlay.emitFocusOutside(veto),\n        emitInteractOutside: (veto) => ctx.overlay.emitInteractOutside(veto),\n        // Trigger button is exempt — its own click handler toggles open/close;\n        // without exemption pointer-down-outside would race and double-close.\n        exemptElements: () => {\n          const t = ctx.overlay.trigger();\n          return t ? [t] : [];\n        },\n      },\n      initialFocus: {\n        move: focusInitial,\n        veto: () => ctx.overlay.emitAutoFocusOnOpen(),\n      },\n      returnFocus: {\n        enabled: ctx.returnFocus,\n        target: () => ctx.overlay.trigger(),\n        // `(autoFocusOnClose)` lets the consumer veto the return-focus.\n        veto: () => ctx.overlay.emitAutoFocusOnClose(),\n        // Skip on `'tab'` and on outside dismissal (pointer-down-outside /\n        // focus-outside): focus already landed where the user tabbed or clicked,\n        // so re-focusing the trigger would steal it back (native <select>\n        // parity, mirroring popover #1310). 'select' / 'escape' / 'programmatic'\n        // still return focus to the trigger.\n        skip: () => {\n          const reason = ctx.overlay.lastCloseReason();\n          return reason === 'tab' || reason === 'pointerDownOutside' || reason === 'focusOutside';\n        },\n      },\n    });\n  }\n\n  protected onKeyDown(event: KeyboardEvent): void {\n    if (this.ctx.totalCount() !== undefined) {\n      this.ctx.handleVirtualizedKeydown(event);\n    }\n  }\n\n  protected onPointerLeave(): void {\n    this.ctx.releasePointerHighlight();\n  }\n}\n","import {\n  booleanAttribute,\n  computed,\n  Directive,\n  ElementRef,\n  inject,\n  InjectionToken,\n  input,\n  signal,\n} from '@angular/core';\n\nimport {\n  assertInputBound,\n  hostButtonType,\n  accessibleTextContent,\n  isUnset,\n  registerHandle,\n  hostId,\n  resolveListNavigation,\n  unsetInput,\n} from 'forty-cdk/core';\nimport { injectSelectContext } from './select-context';\n\n/**\n * Injection key the `[forSelectIndicator]` uses to resolve its parent option,\n * decoupled from the concrete `ForSelectOption` class. `ForSelectOption`\n * provides itself under this token, so a design system wrapping the option by\n * subclassing re-points it at the subclass with a single provider\n * (`{ provide: FOR_SELECT_OPTION, useExisting: MtxSelectOption }`) and the\n * indicator keeps resolving — see `docs/wrapping-form-primitives.md`.\n */\nexport const FOR_SELECT_OPTION = new InjectionToken<ForSelectOption>('FOR_SELECT_OPTION');\n\n/**\n * One option inside a `[forSelectContent]`. Apply on a `<button type=\"button\">`\n * so Space / Enter activation come from native button behavior — printable\n * keys fall through to the listbox for typeahead matching.\n *\n * Generic over the option value type `T` (default `string`). Inferred from\n * the `[value]` binding so consumers can pass either primitive ids or full\n * objects (`[value]=\"city\"` infers `T = City`); the parent `[forSelect]`\n * must be parameterized over the same `T`. The parent's\n * `[compareWith]` decides how options are matched against the\n * committed selection.\n *\n * Click activates: in single mode the value replaces `[(value)]` and the\n * listbox closes; in multi mode the value toggles in/out and the listbox\n * stays open.\n *\n * Hovering an enabled option hands it `data-highlighted`, so pointer and\n * keyboard feed one highlight and exactly one option is ever decorated. Hover\n * never moves DOM focus and never selects — the pointer's own click activates —\n * and moving the pointer off `[forSelectContent]` hands the highlight back to\n * the focused option.\n *\n * Keyboard while focused:\n * - **Enter / Space** — activate (via native button click).\n * - **ArrowDown / ArrowUp / Home / End** — move focus inside the listbox.\n * - **Shift+Arrow / Shift+Space / Ctrl+A / Ctrl+Shift+Home / Ctrl+Shift+End**\n *   _(multi mode, non-virtualized)_ — APG range selection, matching\n *   `ForListbox`.\n * - **Tab / Shift+Tab** — commit the focused option (single mode) and let\n *   the browser advance focus to the next / previous focusable, mirroring\n *   the WAI-ARIA select-only combobox pattern and native `<select>`.\n * - **Escape** — close the listbox.\n * - **Typeahead** — printable keys match by text content.\n */\n@Directive({\n  selector: '[forSelectOption]',\n  exportAs: 'forSelectOption',\n  providers: [{ provide: FOR_SELECT_OPTION, useExisting: ForSelectOption }],\n  host: {\n    role: 'option',\n    '[attr.type]': 'buttonType()',\n    tabindex: '-1',\n    '[id]': 'id()',\n    '[attr.aria-selected]': 'selected() ? \"true\" : \"false\"',\n    '[attr.aria-disabled]': 'effectiveDisabled() ? \"true\" : null',\n    '[attr.data-state]': 'selected() ? \"checked\" : \"unchecked\"',\n    '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n    '[attr.aria-setsize]': 'ariaSetSize()',\n    '[attr.aria-posinset]': 'ariaPosInSet()',\n    '[attr.data-highlighted]': 'highlighted() ? \"\" : null',\n    '(click)': 'onClick()',\n    '(keydown)': 'onKeyDown($event)',\n    '(focus)': 'onFocus()',\n    '(blur)': 'onBlur()',\n    '(pointerdown)': 'onPointerDown($event)',\n    '(pointermove)': 'onPointerMove()',\n  },\n})\nexport class ForSelectOption<T = string> {\n  protected readonly buttonType = hostButtonType();\n\n  readonly #ctx = injectSelectContext<T>('ForSelectOption');\n  readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  /**\n   * Stable identifier serialized into `[(value)]` and the hidden input.\n   * Defaults to `string` for back-compat; bind an object to specialize the\n   * parent `[forSelect]` over a richer `T`. The parent's\n   * `[compareWith]` decides how options are matched against the\n   * committed selection.\n   *\n   * Mandatory — an unbound option throws in dev mode.\n   */\n  readonly value = input(unsetInput<T>());\n  /**\n   * Whether the option can be activated. A disabled option stays rendered and announced, and is\n   * skipped by arrow navigation and typeahead.\n   */\n  readonly disabled = input(false, { transform: booleanAttribute });\n  /**\n   * Zero-based absolute position of this option in the full source data.\n   * Required in the virtualized path — drives `aria-posinset` and the parent's\n   * position snapshot. Leave unset (default `null`) outside it.\n   */\n  readonly posInSet = input<number | null>(null);\n\n  readonly id = hostId('for-select-option');\n\n  readonly selected = computed(() => {\n    const value = this.value();\n    return isUnset(value) ? false : this.#ctx.isSelected(value);\n  });\n  readonly effectiveDisabled = computed(() => this.disabled() || this.#ctx.effectiveDisabled());\n\n  protected readonly ariaSetSize = computed<string | null>(() => {\n    const total = this.#ctx.totalCount();\n    return total === undefined ? null : String(total);\n  });\n  protected readonly ariaPosInSet = computed<string | null>(() => {\n    if (this.#ctx.totalCount() === undefined) {\n      return null;\n    }\n    const pos = this.posInSet();\n    return pos === null ? null : String(pos + 1);\n  });\n\n  readonly #focused = signal(false);\n  /**\n   * True when this option is the active candidate — the one the pointer is over,\n   * else the keyboard's. In the default path the keyboard channel is the\n   * DOM-focused option; in the virtualized path it is `aria-activedescendant`,\n   * which hover moves too, so the highlight and the option `Enter` activates\n   * never disagree there. Reflected as `data-highlighted`.\n   */\n  readonly highlighted = computed(() => {\n    const activeId = this.#ctx.activeDescendantId();\n    if (activeId !== null) {\n      return activeId === this.id();\n    }\n    const pointed = this.#ctx.pointerHighlightedOption();\n    if (pointed !== null) {\n      return pointed === this.#host.nativeElement;\n    }\n    return this.#focused();\n  });\n\n  /**\n   * Reactive effective label exposed on the handle — the trimmed `textContent`\n   * of the host. Mirrors `ForComboboxOption`'s `#effectiveLabel` so the root\n   * can fold a per-option `Signal<string>` into its persisted snapshot instead\n   * of reading `textContent` from inside a `computed`. `textContent` is not a\n   * signal, so this still does not self-heal on a text-only change with no\n   * value change — supply `[forSelect][itemToLabel]` for a pure signal\n   * derivation when the label can change without the value.\n   */\n  readonly #effectiveLabel = computed(() => accessibleTextContent(this.#host.nativeElement).trim());\n\n  constructor() {\n    assertInputBound(this.value, 'select', '[forSelectOption]', 'value');\n    const handle = {\n      host: this.#host.nativeElement,\n      value: this.value,\n      label: this.#effectiveLabel,\n      disabled: this.effectiveDisabled,\n      id: this.id,\n      posInSet: this.posInSet,\n    };\n    registerHandle(\n      handle,\n      (h) => this.#ctx.overlay.registerOption(h),\n      (h) => this.#ctx.overlay.unregisterOption(h),\n    );\n  }\n\n  protected onClick(): void {\n    if (this.effectiveDisabled() || this.#ctx.readonly()) {\n      return;\n    }\n    this.#ctx.activate(this.value());\n    this.#ctx.notifyOptionClick(this.id());\n  }\n\n  protected onFocus(): void {\n    this.#focused.set(true);\n    this.#ctx.notifyOptionFocus();\n  }\n\n  protected onBlur(): void {\n    this.#focused.set(false);\n  }\n\n  protected onPointerMove(): void {\n    if (this.effectiveDisabled()) {\n      return;\n    }\n    this.#ctx.highlightFromPointer(this.#host.nativeElement, this.id());\n  }\n\n  protected onKeyDown(event: KeyboardEvent): void {\n    if (this.effectiveDisabled()) {\n      return;\n    }\n\n    if (event.key === 'Tab') {\n      // In modal mode the focus trap owns Tab (it cycles focus inside the\n      // surface in the capture phase); committing + closing here would defeat\n      // the trap. Bail and let the trap's `preventDefault` keep focus inside.\n      if (this.#ctx.modal()) {\n        return;\n      }\n      // APG (combobox-select-only): Tab commits the focused option and lets\n      // the browser advance focus to the next / previous focusable. Do NOT\n      // preventDefault — the browser's Tab default uses the focus we just\n      // moved to the trigger as the starting point.\n      this.#ctx.commitOnTab(this.value());\n      return;\n    }\n\n    if (this.#ctx.multiple()) {\n      if ((event.ctrlKey || event.metaKey) && !event.shiftKey && !event.altKey) {\n        if (event.key === 'a' || event.key === 'A') {\n          event.preventDefault();\n          this.#ctx.selectAll();\n          return;\n        }\n      }\n\n      if ((event.ctrlKey || event.metaKey) && event.shiftKey && !event.altKey) {\n        if (event.key === 'Home') {\n          event.preventDefault();\n          this.#ctx.selectFromCurrentToEdge(this.#host.nativeElement, 'first');\n          return;\n        }\n        if (event.key === 'End') {\n          event.preventDefault();\n          this.#ctx.selectFromCurrentToEdge(this.#host.nativeElement, 'last');\n          return;\n        }\n      }\n\n      if (event.shiftKey && event.key === ' ') {\n        event.preventDefault();\n        this.#ctx.selectRangeToFocused(this.#host.nativeElement);\n        return;\n      }\n\n      if (event.shiftKey && !event.ctrlKey && !event.metaKey && !event.altKey) {\n        const rangeAction = resolveListNavigation(event, {\n          orientation: this.#ctx.orientation(),\n          dir: this.#ctx.dir(),\n        });\n        if (rangeAction === 'next' || rangeAction === 'prev') {\n          event.preventDefault();\n          this.#ctx.extendByArrow(this.#host.nativeElement, rangeAction);\n          return;\n        }\n      }\n    }\n\n    const action = resolveListNavigation(event, {\n      orientation: this.#ctx.orientation(),\n      dir: this.#ctx.dir(),\n      pageKeys: true,\n    });\n    if (action) {\n      event.preventDefault();\n      this.#ctx.overlay.navigate(this.#host.nativeElement, action);\n      return;\n    }\n\n    this.#ctx.handleTypeahead(event);\n  }\n\n  protected onPointerDown(event: PointerEvent): void {\n    if (this.#ctx.totalCount() === undefined) {\n      return;\n    }\n    event.preventDefault();\n  }\n}\n","import { Directive, inject } from '@angular/core';\n\nimport { orphanContextError } from 'forty-cdk/core';\n\nimport { FOR_SELECT_OPTION, type ForSelectOption } from './select-option';\n\n/**\n * Visibility helper inside a `[forSelectOption]`. The directive flips a\n * `[hidden]` host binding so the consumer can keep the checkmark / icon\n * inline without extra `@if` glue:\n *\n * ```html\n * <button forSelectOption value=\"apple\">\n *   <span forSelectIndicator>✓</span>\n *   Apple\n * </button>\n * ```\n *\n * Reflects the parent option's `data-state` (`\"checked\" | \"unchecked\"`) so\n * the consumer can also style it from CSS. Visibility while unselected is\n * enforced with an inline `display: none` (which beats any author `display`\n * rule a consumer applies via a class) in addition to the `hidden` attribute\n * that removes it from the a11y tree.\n */\n@Directive({\n  selector: '[forSelectIndicator]',\n  exportAs: 'forSelectIndicator',\n  host: {\n    'aria-hidden': 'true',\n    '[attr.data-state]': 'option.selected() ? \"checked\" : \"unchecked\"',\n    '[hidden]': '!option.selected()',\n    '[style.display]': 'option.selected() ? null : \"none\"',\n  },\n})\nexport class ForSelectIndicator {\n  protected readonly option = injectParentOption();\n}\n\nfunction injectParentOption(): ForSelectOption {\n  const option = inject(FOR_SELECT_OPTION, { optional: true });\n  if (!option) {\n    throw orphanContextError({\n      code: 'FORCDK-SELECT-004',\n      piece: 'ForSelectIndicator',\n      root: '[forSelectOption]',\n      token: 'FOR_SELECT_OPTION',\n    });\n  }\n  return option;\n}\n","import { Directive, signal } from '@angular/core';\n\nimport { hostLabelledBy } from 'forty-cdk/core';\n\n/**\n * Optional grouping wrapper inside a `[forSelectContent]`. Renders\n * `role=\"group\"` and references the descendant `[forSelectGroupLabel]`\n * (if any) via `aria-labelledby`. Options inside a group still register\n * with the root listbox normally, so keyboard navigation traverses across\n * groups in DOM order without special handling.\n */\n@Directive({\n  selector: '[forSelectGroup]',\n  exportAs: 'forSelectGroup',\n  host: {\n    role: 'group',\n    '[attr.aria-labelledby]': 'labelledBy()',\n  },\n})\nexport class ForSelectGroup {\n  readonly #labelId = signal<string | null>(null);\n\n  /** The id of the registered group label (or `null` if none). */\n  readonly labelId = this.#labelId.asReadonly();\n\n  protected readonly labelledBy = hostLabelledBy(() => this.labelId());\n\n  /** Called by `ForSelectGroupLabel` on mount. */\n  registerLabel(id: string): void {\n    this.#labelId.set(id);\n  }\n\n  /** Called by `ForSelectGroupLabel` on destroy. Idempotent. */\n  unregisterLabel(id: string): void {\n    if (this.#labelId() === id) {\n      this.#labelId.set(null);\n    }\n  }\n}\n","import { Directive, inject } from '@angular/core';\n\nimport { orphanContextError, registerA11yName } from 'forty-cdk/core';\nimport { ForSelectGroup } from './select-group';\n\n/**\n * Visible label for a `[forSelectGroup]`. Generates a stable id and\n * registers with its parent group so the group's `aria-labelledby` points\n * at this element. Apply on whatever heading element fits the design\n * (often `<div>` styled as a small caption).\n */\n@Directive({\n  selector: '[forSelectGroupLabel]',\n  exportAs: 'forSelectGroupLabel',\n  host: {\n    '[id]': 'id',\n  },\n})\nexport class ForSelectGroupLabel {\n  /** Stable host id used by the parent group's `aria-labelledby`. */\n  readonly id: string;\n\n  constructor() {\n    const group = inject(ForSelectGroup, { optional: true });\n    if (!group) {\n      throw orphanContextError({\n        code: 'FORCDK-SELECT-003',\n        piece: 'ForSelectGroupLabel',\n        root: '[forSelectGroup]',\n        token: 'ForSelectGroup',\n      });\n    }\n    this.id = registerA11yName(group, 'for-select-group-label');\n  }\n}\n","import { booleanAttribute, Directive, input } from '@angular/core';\n\n/**\n * Visual + semantic separator between options or groups inside a\n * `[forSelectContent]`. Carries `role=\"separator\"` and is intentionally not\n * registered with the listbox's option collection, so keyboard navigation\n * and typeahead skip it automatically. Set `decorative` when the surrounding\n * options already convey the split and the line should be skipped by\n * assistive tech.\n */\n@Directive({\n  selector: '[forSelectSeparator]',\n  exportAs: 'forSelectSeparator',\n  host: {\n    '[attr.role]': 'roleAttr()',\n    '[attr.aria-orientation]': 'ariaOrientationAttr()',\n    '[attr.data-orientation]': 'orientation()',\n  },\n})\nexport class ForSelectSeparator {\n  /**\n   * Axis the separator divides along, always reflected to `data-orientation`\n   * and reflected to `aria-orientation` only for `vertical` (`horizontal` is\n   * the ARIA default and is omitted). `horizontal` (default) splits options\n   * stacked vertically — the common case in a listbox; `vertical` splits\n   * options laid out horizontally.\n   */\n  readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n  /**\n   * When true, the separator is purely visual: it gets `role=\"none\"` and no\n   * `aria-orientation`, so assistive tech treats the surrounding options as a\n   * single flow. `data-orientation` is still reflected for styling.\n   */\n  readonly decorative = input(false, { transform: booleanAttribute });\n\n  protected roleAttr(): 'separator' | 'none' {\n    return this.decorative() ? 'none' : 'separator';\n  }\n\n  protected ariaOrientationAttr(): 'vertical' | null {\n    if (this.decorative()) {\n      return null;\n    }\n    return this.orientation() === 'vertical' ? 'vertical' : null;\n  }\n}\n","/**\n * Exact public names of every `ForSelect` input, its models included. Spread it into the\n * `inputs` array of a `hostDirectives` entry so a wrapper component re-exposes the\n * primitive's full surface — the Signal Forms members `[formField]` binds among them —\n * without hand-maintaining the list. Always spread into an inline object literal as shown\n * below: the literal is what keeps the entry statically analyzable for consumers compiling\n * against the published package. An anti-drift spec fails when this list no longer matches\n * the directive's actual API. See `docs/wrapping-form-primitives.md` for both supported\n * wrapping patterns.\n *\n * @example\n * ```ts\n * @Component({\n *   selector: 'div[mySelect]',\n *   template: '',\n *   hostDirectives: [\n *     {\n *       directive: ForSelect,\n *       inputs: [...FOR_SELECT_HOST_DIRECTIVE_INPUTS],\n *       outputs: [...FOR_SELECT_HOST_DIRECTIVE_OUTPUTS],\n *     },\n *   ],\n * })\n * export class MySelect {}\n * ```\n */\nexport const FOR_SELECT_HOST_DIRECTIVE_INPUTS = [\n  'value',\n  'open',\n  'align',\n  'alignOffset',\n  'ariaLabel',\n  'avoidCollisions',\n  'clipUntilPositioned',\n  'collisionPadding',\n  'compareWith',\n  'dataVersion',\n  'dir',\n  'dirty',\n  'disabled',\n  'dismissible',\n  'errors',\n  'hideWhenDetached',\n  'invalid',\n  'itemToFormValue',\n  'itemToLabel',\n  'loop',\n  'modal',\n  'multiple',\n  'name',\n  'orientation',\n  'pending',\n  'placeholder',\n  'position',\n  'readonly',\n  'required',\n  'returnFocus',\n  'selectedIndex',\n  'selectionFollowsFocus',\n  'side',\n  'sideOffset',\n  'sticky',\n  'totalCount',\n  'touched',\n  'visibleRange',\n] as const;\n\n/**\n * Exact public names of every `ForSelect` output, the Signal Forms `touch` output\n * included. Spread it into the `outputs` array of the same `hostDirectives` entry as\n * {@link FOR_SELECT_HOST_DIRECTIVE_INPUTS}.\n */\nexport const FOR_SELECT_HOST_DIRECTIVE_OUTPUTS = [\n  'valueChange',\n  'openChange',\n  'escapeKeyDown',\n  'pointerDownOutside',\n  'focusOutside',\n  'interactOutside',\n  'autoFocusOnOpen',\n  'autoFocusOnClose',\n  'scrollToIndex',\n  'touchedChange',\n  'touch',\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AA0YA;;;;;;;;;;AAUG;MACU,kBAAkB,GAAG,IAAI,cAAc,CAAmB,oBAAoB;AAkB3F;;;;;AAKG;AACH,MAAM,cAAc,GAAG;AACrB,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,KAAK,EAAE,oBAAoB;AAC3B,IAAA,IAAI,EAAE,aAAa;CACpB;AAEK,SAAU,mBAAmB,CAAc,KAAa,EAAA;AAC5D,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1D,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,MAAM,kBAAkB,CAAC;AACvB,YAAA,IAAI,EAAE,mBAAmB;YACzB,KAAK;AACL,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,KAAK,EAAE,oBAAoB;AAC5B,SAAA,CAAC;IACJ;IACA,MAAM,OAAO,GAAG,GAAkC;AAClD,IAAA,iBAAiB,CAAC;AAChB,QAAA,GAAG,cAAc;QACjB,KAAK;QACL,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,eAAe;AAC7C,KAAA,CAAC;AACF,IAAA,OAAO,OAAO;AAChB;AAEA;;;;;;;;;;;;;;AAcG;AACG,SAAU,0BAA0B,CACxC,YAA8C,EAAA;AAE9C,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC/D,OAAO,QAAQ,CAAC,MAAK;AACnB,QAAA,MAAM,Q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