@smilodon/core 1.10.2 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/index.cjs +57 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +57 -36
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +57 -36
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/components/enhanced-select.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/renderers/contracts.ts","../../../src/engine/item-adapter.ts","../../../src/engine/item-registry.ts","../../../src/engine/selection-policy.ts","../../../src/engine/select-machine.ts","../../../src/engine/select-state.ts","../../../src/engine/selectors.ts","../../../src/platform/web/select-engine-bridge.ts","../../../src/platform/web/select-effect-runner.ts","../../../src/utils/fenwick-tree.ts","../../../src/utils/dom-pool.ts","../../../src/utils/virtualizer.ts","../../../src/utils/custom-option-pool.ts","../../../src/utils/option-renderer.ts","../../../src/components/native-select.ts","../../../src/config/global-config.ts","../../../src/data-loading/public-config.ts","../../../src/engine/virtualization.ts","../../../src/engine/accessibility.ts","../../../src/platform/web/accessibility-effects.ts","../../../src/components/select-option.ts","../../../src/utils/value-equality.ts","../../../src/data-loading/request-coordinator.ts","../../../src/components/enhanced-select.ts","../../../src/utils/worker-manager.ts","../../../src/utils/telemetry.ts","../../../src/utils/security.ts","../../../src/utils/csp-styles.ts"],"sourcesContent":["import type { RendererHelpers } from '../types.js';\n\nexport type OptionTemplate = (item: unknown, index: number) => string;\nexport type OptionRenderer = (item: unknown, index: number, helpers: RendererHelpers) => HTMLElement;\n\nexport const createRendererHelpers = (onSelect: (item: unknown, index: number) => void): RendererHelpers => ({\n onSelect,\n getIndex: (node: Element | null) => {\n const el = node?.closest?.('[data-selectable]') as HTMLElement | null;\n if (!el) return null;\n const idx = Number(el.dataset.index);\n return Number.isFinite(idx) ? idx : null;\n },\n keyboardFocus: (index: number) => {\n const el = document.querySelector(`[data-selectable][data-index=\"${index}\"]`) as HTMLElement | null;\n el?.focus?.();\n }\n});\n\n// Fast template render path: string -> DOM via DocumentFragment, with delegation markers\nexport function renderTemplate(container: HTMLElement, items: unknown[], optionTemplate: OptionTemplate) {\n const frag = document.createDocumentFragment();\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n const wrapper = document.createElement('div');\n wrapper.innerHTML = optionTemplate(item, i);\n let el = wrapper.firstElementChild as HTMLElement | null;\n if (!el) {\n // Edge case: template produced multiple or zero root nodes; wrap children\n const wrap = document.createElement('div');\n wrap.setAttribute('data-selectable', '');\n wrap.setAttribute('data-index', String(i));\n while (wrapper.firstChild) wrap.appendChild(wrapper.firstChild);\n frag.appendChild(wrap);\n continue;\n }\n // Allow override if developer sets data-smilodon-handled=\"true\"\n if (!el.hasAttribute('data-smilodon-handled')) {\n el.setAttribute('data-selectable', '');\n el.setAttribute('data-index', String(i));\n }\n frag.appendChild(el);\n }\n container.replaceChildren(frag);\n}\n","import type { SelectKey } from './contracts.js';\n\n/** Extract identity separately from the outward value and presentation fields. */\nexport interface ItemAdapter<TItem, TKey extends SelectKey = SelectKey, TValue = unknown> {\n getKey(item: TItem, index: number): TKey;\n getValue(item: TItem, index: number): TValue;\n getLabel(item: TItem, index: number): string;\n isDisabled?(item: TItem, index: number): boolean;\n getGroupKey?(item: TItem, index: number): string | null;\n}\n\nexport interface DefaultItemAdapterOptions<TItem = unknown, TValue = unknown> {\n getKey?: (item: TItem, index: number) => SelectKey;\n valueField?: string;\n labelField?: string;\n getValue?: (item: TItem, index: number) => TValue;\n getLabel?: (item: TItem, index: number) => string;\n isDisabled?: (item: TItem, index: number) => boolean;\n getGroupKey?: (item: TItem, index: number) => string | null;\n /** Explicit compatibility opt-in for keyless references; defaults to identity. */\n keyFallback?: 'identity' | 'index';\n onIndexFallback?: (message: string) => void;\n}\n\nconst objectKeyCache = new WeakMap<object, string>();\nlet generatedObjectKeyId = 0;\n\nfunction isObjectRecord(value: unknown): value is Record<PropertyKey, unknown> {\n return value !== null && (typeof value === 'object' || typeof value === 'function');\n}\n\nfunction readField(item: unknown, field: string | undefined): unknown {\n if (!field || !isObjectRecord(item)) return undefined;\n return item[field];\n}\n\nfunction toSelectKey(value: unknown): SelectKey | null {\n if (typeof value === 'string' || typeof value === 'number') {\n return value;\n }\n\n if (typeof value === 'boolean' || typeof value === 'bigint' || typeof value === 'symbol') {\n return String(value);\n }\n\n return null;\n}\n\nfunction objectIdentityKey(item: object): string {\n const cached = objectKeyCache.get(item);\n if (cached) return cached;\n\n generatedObjectKeyId += 1;\n const key = `__smilodon-object-${generatedObjectKeyId}`;\n objectKeyCache.set(item, key);\n return key;\n}\n\nfunction indexFallbackKey(index: number, warn?: (message: string) => void): string {\n const env = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV;\n if (env !== 'production') {\n const message = '[Smilodon Phase2] Using index as key is unstable under filtering/sorting. Provide getKey/valueField for stable selection.';\n if (warn) {\n warn(message);\n } else {\n console.warn(message);\n }\n }\n return `__smilodon-index-${index}`;\n}\n\n/** Generated reference keys survive reorder, but not replacement with new objects. */\nexport function createDefaultItemAdapter<TItem = unknown, TValue = unknown>(\n options: DefaultItemAdapterOptions<TItem, TValue> = {},\n): ItemAdapter<TItem> {\n return {\n getKey(item, index) {\n if (options.getKey) {\n return options.getKey(item, index);\n }\n\n if (isObjectRecord(item)) {\n const directKey =\n toSelectKey(item.id)\n ?? toSelectKey(item.key)\n ?? toSelectKey(item.value)\n ?? toSelectKey(readField(item, options.valueField));\n\n if (directKey !== null) {\n return directKey;\n }\n\n if (options.getValue) {\n const configuredValueKey = toSelectKey(options.getValue(item, index));\n if (configuredValueKey !== null) {\n return configuredValueKey;\n }\n }\n\n return options.keyFallback === 'index'\n ? indexFallbackKey(index, options.onIndexFallback)\n : objectIdentityKey(item);\n }\n\n return String(item);\n },\n\n getValue(item, index) {\n if (options.getValue) {\n return options.getValue(item, index);\n }\n\n const fieldValue = readField(item, options.valueField);\n if (fieldValue !== undefined) {\n return fieldValue;\n }\n\n return isObjectRecord(item) && item.value !== undefined ? item.value : item;\n },\n\n getLabel(item, index) {\n if (options.getLabel) {\n return options.getLabel(item, index);\n }\n\n const fieldLabel = readField(item, options.labelField);\n if (fieldLabel !== undefined) {\n return String(fieldLabel);\n }\n\n if (isObjectRecord(item) && item.label !== undefined) {\n return String(item.label);\n }\n\n if (isObjectRecord(item) && item.text !== undefined) {\n return String(item.text);\n }\n\n return String(item);\n },\n\n isDisabled(item, index) {\n if (options.isDisabled) {\n return options.isDisabled(item, index);\n }\n\n return Boolean(isObjectRecord(item) && item.disabled);\n },\n\n getGroupKey(item, index) {\n if (options.getGroupKey) {\n return options.getGroupKey(item, index);\n }\n\n if (!isObjectRecord(item) || item.group === undefined) {\n return null;\n }\n\n return item.group == null ? null : String(item.group);\n },\n };\n}\n","import type { SelectKey } from './contracts.js';\nimport type { ItemAdapter } from './item-adapter.js';\n\nexport type DuplicateKeyPolicy =\n | 'throw'\n | 'warn'\n | 'first-wins'\n | 'last-wins';\n\nexport interface DuplicateKeyDiagnostic<TKey extends SelectKey = SelectKey> {\n readonly key: TKey;\n readonly firstIndex: number;\n readonly duplicateIndex: number;\n}\n\nexport interface ItemRecord<TItem, TKey extends SelectKey = SelectKey> {\n readonly key: TKey;\n readonly item: TItem;\n readonly index: number;\n readonly label: string;\n readonly value: unknown;\n readonly disabled: boolean;\n readonly groupKey: string | null;\n}\n\nexport interface ItemRegistry<TItem, TKey extends SelectKey = SelectKey> {\n /** Every input position, including duplicates; key lookups resolve the winner. */\n readonly records: readonly ItemRecord<TItem, TKey>[];\n readonly keyToRecord: ReadonlyMap<TKey, ItemRecord<TItem, TKey>>;\n readonly indexToKey: ReadonlyMap<number, TKey>;\n readonly keyToIndex: ReadonlyMap<TKey, number>;\n readonly duplicateKeys: readonly DuplicateKeyDiagnostic<TKey>[];\n}\n\nexport interface ItemRegistryOptions<TKey extends SelectKey = SelectKey> {\n duplicateKeyPolicy?: DuplicateKeyPolicy;\n onDuplicateKey?: (diagnostic: DuplicateKeyDiagnostic<TKey>) => void;\n}\n\nexport function getDefaultDuplicateKeyPolicy(): DuplicateKeyPolicy {\n const env = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV;\n\n return env === 'production' ? 'warn' : 'throw';\n}\n\nexport function createItemRegistry<TItem, TKey extends SelectKey = SelectKey>(\n items: readonly TItem[],\n adapter: ItemAdapter<TItem, TKey>,\n options: ItemRegistryOptions<TKey> = {},\n): ItemRegistry<TItem, TKey> {\n const duplicateKeyPolicy = options.duplicateKeyPolicy ?? getDefaultDuplicateKeyPolicy();\n const records: ItemRecord<TItem, TKey>[] = [];\n const keyToRecord = new Map<TKey, ItemRecord<TItem, TKey>>();\n const indexToKey = new Map<number, TKey>();\n const keyToIndex = new Map<TKey, number>();\n const firstIndexByKey = new Map<TKey, number>();\n const duplicateKeys: DuplicateKeyDiagnostic<TKey>[] = [];\n\n items.forEach((item, index) => {\n const key = adapter.getKey(item, index);\n const firstIndex = firstIndexByKey.get(key);\n const record: ItemRecord<TItem, TKey> = {\n key,\n item,\n index,\n label: adapter.getLabel(item, index),\n value: adapter.getValue(item, index),\n disabled: adapter.isDisabled?.(item, index) === true,\n groupKey: adapter.getGroupKey?.(item, index) ?? null,\n };\n\n records.push(record);\n indexToKey.set(index, key);\n\n if (firstIndex !== undefined) {\n const diagnostic = {\n key,\n firstIndex,\n duplicateIndex: index,\n };\n duplicateKeys.push(diagnostic);\n\n if (duplicateKeyPolicy === 'throw') {\n throw new Error(duplicateKeyMessage(diagnostic));\n }\n\n if (duplicateKeyPolicy === 'warn') {\n if (options.onDuplicateKey) {\n options.onDuplicateKey(diagnostic);\n } else {\n console.warn(duplicateKeyMessage(diagnostic));\n }\n return;\n }\n\n if (duplicateKeyPolicy === 'first-wins') {\n return;\n }\n } else {\n firstIndexByKey.set(key, index);\n }\n\n keyToRecord.set(key, record);\n keyToIndex.set(key, index);\n });\n\n return {\n records,\n keyToRecord,\n indexToKey,\n keyToIndex,\n duplicateKeys,\n };\n}\n\nfunction duplicateKeyMessage<TKey extends SelectKey>(diagnostic: DuplicateKeyDiagnostic<TKey>): string {\n return `[Smilodon Phase2] Duplicate item key \"${String(diagnostic.key)}\" at indexes ${diagnostic.firstIndex} and ${diagnostic.duplicateIndex}. Provide stable unique keys for selection.`;\n}\n","import type { SelectKey } from './contracts.js';\n\nexport type SelectionReason =\n | 'pointer'\n | 'keyboard'\n | 'programmatic'\n | 'form-reset'\n | 'external-value-sync';\n\nexport type ActiveReason =\n | 'keyboard'\n | 'pointer'\n | 'search'\n | 'open'\n | 'programmatic';\n\nexport interface SelectionConfig<TKey extends SelectKey = SelectKey> {\n multiple: boolean;\n required: boolean;\n /** Allows toggling off a selected single item; explicit deselect/clear still respect required. */\n allowDeselect: boolean;\n disabledKeys: ReadonlySet<TKey>;\n maxSelections?: number;\n}\n\nexport type SelectionRequest<TKey extends SelectKey = SelectKey> =\n | { type: 'select'; key: TKey; reason: SelectionReason }\n | { type: 'deselect'; key: TKey; reason: SelectionReason }\n | { type: 'toggle'; key: TKey; reason: SelectionReason }\n | { type: 'clear'; reason: SelectionReason }\n | { type: 'replace'; keys: readonly TKey[]; reason: SelectionReason };\n\n/** Pure key policy. Visibility does not constrain selection; disabled keys do. */\nexport function applySelectionRequest<TKey extends SelectKey>(\n selectedKeys: ReadonlySet<TKey>,\n request: SelectionRequest<TKey>,\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n let next: ReadonlySet<TKey>;\n switch (request.type) {\n case 'select':\n next = selectKey(selectedKeys, request.key, config);\n break;\n case 'deselect':\n next = deselectKey(selectedKeys, request.key, config);\n break;\n case 'toggle':\n if (!selectedKeys.has(request.key)) {\n next = selectKey(selectedKeys, request.key, config);\n } else if (config.multiple || config.allowDeselect) {\n next = deselectKey(selectedKeys, request.key, config);\n } else {\n next = selectedKeys;\n }\n break;\n case 'clear':\n next = config.required && selectedKeys.size > 0\n ? selectedKeys\n : new Set<TKey>();\n break;\n case 'replace':\n next = replaceKeys(selectedKeys, request.keys, config);\n break;\n }\n\n // Set membership is authoritative. Reordering the same keys is not a change.\n return next.size === selectedKeys.size && [...next].every((key) => selectedKeys.has(key))\n ? selectedKeys\n : next;\n}\n\nfunction selectKey<TKey extends SelectKey>(\n selectedKeys: ReadonlySet<TKey>,\n key: TKey,\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n if (config.disabledKeys.has(key)) {\n return selectedKeys;\n }\n\n if (!config.multiple) {\n return new Set<TKey>([key]);\n }\n\n if (selectedKeys.has(key)) {\n return selectedKeys;\n }\n\n const maxSelections = config.maxSelections ?? 0;\n if (maxSelections > 0 && selectedKeys.size >= maxSelections) {\n return selectedKeys;\n }\n\n return new Set<TKey>([...selectedKeys, key]);\n}\n\nfunction deselectKey<TKey extends SelectKey>(\n selectedKeys: ReadonlySet<TKey>,\n key: TKey,\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n if (!selectedKeys.has(key) || config.disabledKeys.has(key)) {\n return selectedKeys;\n }\n\n if (config.required && selectedKeys.size <= 1) {\n return selectedKeys;\n }\n\n const next = new Set(selectedKeys);\n next.delete(key);\n return next;\n}\n\nfunction replaceKeys<TKey extends SelectKey>(\n selectedKeys: ReadonlySet<TKey>,\n keys: readonly TKey[],\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n const next = normalizeKeys(keys, config);\n\n if (config.required && next.size === 0 && selectedKeys.size > 0) {\n // Required preserves a valid selection, but cannot keep newly disabled keys.\n return normalizeKeys(selectedKeys, config);\n }\n\n return next;\n}\n\nfunction normalizeKeys<TKey extends SelectKey>(\n keys: Iterable<TKey>,\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n const seen = new Set<TKey>();\n const maxSelections = config.maxSelections ?? 0;\n\n for (const key of keys) {\n if (config.disabledKeys.has(key) || seen.has(key)) {\n continue;\n }\n\n seen.add(key);\n\n if (!config.multiple || (maxSelections > 0 && seen.size >= maxSelections)) {\n break;\n }\n }\n\n return seen;\n}\n","import type { SelectKey } from './contracts.js';\nimport type { SelectEffect } from './select-effects.js';\nimport type { SelectEvent } from './select-events.js';\nimport type { SelectState } from './select-state.js';\nimport { applySelectionRequest, type SelectionRequest } from './selection-policy.js';\n\nexport interface TransitionResult<K extends SelectKey = SelectKey> {\n state: SelectState<K>;\n effects: SelectEffect<K>[];\n}\n\nexport function transition<K extends SelectKey>(\n state: SelectState<K>,\n event: SelectEvent<K>,\n): TransitionResult<K> {\n switch (event.type) {\n case 'CONNECT':\n return { state: { ...state, lifecycle: 'connected' }, effects: [] };\n\n case 'DISCONNECT': {\n const effects: SelectEffect<K>[] = state.popup === 'open'\n ? [{ type: 'POPUP_CLOSED', reason: 'disconnect' }, { type: 'SYNC_ARIA' }]\n : [];\n return {\n state: { ...state, lifecycle: 'disconnected', popup: 'closed', focused: false },\n effects,\n };\n }\n\n case 'OPEN_REQUEST':\n if (state.lifecycle !== 'connected' || state.disabled || state.popup === 'open') {\n return { state: enforceInvariants(state), effects: [] };\n }\n return {\n state: { ...state, popup: 'open' },\n effects: [{ type: 'POPUP_OPENED' }, { type: 'FOCUS_TRIGGER' }, { type: 'SYNC_ARIA' }],\n };\n\n case 'CLOSE_REQUEST':\n if (state.popup === 'closed') {\n return { state, effects: [] };\n }\n return {\n state: { ...state, popup: 'closed' },\n effects: [{ type: 'POPUP_CLOSED', reason: event.reason }, { type: 'SYNC_ARIA' }],\n };\n\n case 'TOGGLE_REQUEST':\n return transition(state, state.popup === 'open'\n ? { type: 'CLOSE_REQUEST', reason: 'programmatic' }\n : { type: 'OPEN_REQUEST' });\n\n case 'FOCUS_GAINED':\n return state.focused\n ? { state, effects: [] }\n : { state: { ...state, focused: true }, effects: [{ type: 'SYNC_ARIA' }] };\n\n case 'FOCUS_LOST':\n return state.focused\n ? { state: { ...state, focused: false }, effects: [{ type: 'SYNC_ARIA' }] }\n : { state, effects: [] };\n\n case 'DISABLED_CHANGED': {\n if (state.disabled === event.disabled) {\n return { state: enforceInvariants(state), effects: [] };\n }\n const nextState = enforceInvariants({ ...state, disabled: event.disabled });\n const effects: SelectEffect<K>[] = [];\n if (event.disabled && state.popup === 'open') {\n effects.push({ type: 'POPUP_CLOSED', reason: 'disabled' });\n }\n effects.push({ type: 'SYNC_ARIA' });\n return {\n state: nextState,\n effects,\n };\n }\n\n case 'ITEMS_REGISTERED': {\n const registeredKeys = new Set(event.keys);\n const disabledKeys = new Set(event.disabledKeys ?? []);\n const selection = { ...state.selection, disabledKeys };\n const activeKey = resolveActiveKey(state.activeKey, registeredKeys, disabledKeys);\n const selectedKeys = applySelectionRequest<K>(\n state.selectedKeys,\n { type: 'replace', keys: Array.from(state.selectedKeys), reason: 'programmatic' },\n selection,\n );\n const nextState = {\n ...state,\n activeKey,\n selectedKeys,\n registeredKeys,\n selection,\n };\n const effects: SelectEffect<K>[] = [];\n if (!keysEqual(activeKey, state.activeKey)) {\n effects.push({ type: 'ACTIVE_KEY_CHANGED', activeKey, reason: 'programmatic' });\n }\n if (!setsEqual(selectedKeys, state.selectedKeys)) {\n effects.push({ type: 'SELECTION_CHANGED', selectedKeys: Array.from(selectedKeys), reason: 'programmatic' });\n }\n if (effects.length > 0) {\n effects.push({ type: 'SYNC_ARIA' });\n }\n return { state: nextState, effects };\n }\n\n case 'SELECTION_CONFIG_CHANGED': {\n const selection = {\n ...state.selection,\n multiple: event.multiple ?? state.selection.multiple,\n required: event.required ?? state.selection.required,\n allowDeselect: event.allowDeselect ?? state.selection.allowDeselect,\n maxSelections: event.maxSelections ?? state.selection.maxSelections,\n disabledKeys: event.disabledKeys ? new Set(event.disabledKeys) : state.selection.disabledKeys,\n };\n const selectedKeys = applySelectionRequest(\n state.selectedKeys,\n { type: 'replace', keys: Array.from(state.selectedKeys), reason: 'programmatic' },\n selection,\n );\n const activeKey = resolveActiveKey(state.activeKey, state.registeredKeys, selection.disabledKeys);\n const nextState = { ...state, selection, selectedKeys, activeKey };\n const effects: SelectEffect<K>[] = [];\n if (!keysEqual(activeKey, state.activeKey)) {\n effects.push({ type: 'ACTIVE_KEY_CHANGED', activeKey, reason: 'programmatic' });\n }\n if (!setsEqual(selectedKeys, state.selectedKeys)) {\n effects.push({ type: 'SELECTION_CHANGED', selectedKeys: Array.from(selectedKeys), reason: 'programmatic' });\n }\n if (effects.length > 0) {\n effects.push({ type: 'SYNC_ARIA' });\n }\n return { state: nextState, effects };\n }\n\n case 'ACTIVE_KEY_CHANGED': {\n if (\n event.key !== null\n && (!state.registeredKeys.has(event.key) || state.selection.disabledKeys.has(event.key))\n ) {\n return { state, effects: [] };\n }\n\n if (keysEqual(state.activeKey, event.key)) {\n return { state, effects: [] };\n }\n\n return {\n state: { ...state, activeKey: event.key },\n effects: [\n { type: 'ACTIVE_KEY_CHANGED', activeKey: event.key, reason: event.reason },\n { type: 'SYNC_ARIA' },\n ],\n };\n }\n\n case 'SELECT_KEY_REQUEST':\n case 'DESELECT_KEY_REQUEST':\n case 'TOGGLE_KEY_REQUEST':\n case 'CLEAR_SELECTION_REQUEST':\n case 'REPLACE_SELECTION_REQUEST': {\n const selectedKeys = applySelectionRequest<K>(\n state.selectedKeys,\n selectionRequestFromEvent<K>(event),\n state.selection,\n );\n\n if (setsEqual(selectedKeys, state.selectedKeys)) {\n return { state, effects: [] };\n }\n\n return {\n state: { ...state, selectedKeys },\n effects: [\n { type: 'SELECTION_CHANGED', selectedKeys: Array.from(selectedKeys), reason: event.reason },\n { type: 'SYNC_ARIA' },\n ],\n };\n }\n\n default:\n return { state, effects: [] };\n }\n}\n\nfunction selectionRequestFromEvent<K extends SelectKey>(\n event: Extract<\n SelectEvent<K>,\n | { type: 'SELECT_KEY_REQUEST' }\n | { type: 'DESELECT_KEY_REQUEST' }\n | { type: 'TOGGLE_KEY_REQUEST' }\n | { type: 'CLEAR_SELECTION_REQUEST' }\n | { type: 'REPLACE_SELECTION_REQUEST' }\n >,\n): SelectionRequest<K> {\n switch (event.type) {\n case 'SELECT_KEY_REQUEST':\n return { type: 'select' as const, key: event.key, reason: event.reason };\n case 'DESELECT_KEY_REQUEST':\n return { type: 'deselect' as const, key: event.key, reason: event.reason };\n case 'TOGGLE_KEY_REQUEST':\n return { type: 'toggle' as const, key: event.key, reason: event.reason };\n case 'CLEAR_SELECTION_REQUEST':\n return { type: 'clear' as const, reason: event.reason };\n case 'REPLACE_SELECTION_REQUEST':\n return { type: 'replace' as const, keys: event.keys, reason: event.reason };\n }\n}\n\nfunction enforceInvariants<K extends SelectKey>(state: SelectState<K>): SelectState<K> {\n if (state.lifecycle === 'disconnected' || state.disabled) {\n return state.popup === 'closed' ? state : { ...state, popup: 'closed' };\n }\n return state;\n}\n\nfunction resolveActiveKey<K extends SelectKey>(\n key: K | null,\n registeredKeys: ReadonlySet<K>,\n disabledKeys: ReadonlySet<K>,\n): K | null {\n return key !== null && registeredKeys.has(key) && !disabledKeys.has(key) ? key : null;\n}\n\nfunction setsEqual<K>(left: ReadonlySet<K>, right: ReadonlySet<K>): boolean {\n if (left.size !== right.size) return false;\n\n for (const value of left) {\n if (!right.has(value)) return false;\n }\n\n return true;\n}\n\n/** Match Map/Set identity, including NaN and signed zero. */\nfunction keysEqual(left: SelectKey | null, right: SelectKey | null): boolean {\n return left === right || Object.is(left, right);\n}\n","import type { SelectKey } from './contracts.js';\nimport type { SelectionConfig } from './selection-policy.js';\n\nexport interface SelectState<K extends SelectKey = SelectKey> {\n lifecycle: 'disconnected' | 'connected';\n popup: 'closed' | 'open';\n disabled: boolean;\n focused: boolean;\n query: string;\n /** Navigation identity; must be registered and enabled, or null. */\n activeKey: K | null;\n /** Selection identity survives absence from the current registered/visible set. */\n selectedKeys: ReadonlySet<K>;\n registeredKeys: ReadonlySet<K>;\n selection: SelectionConfig<K>;\n dataStatus: 'idle' | 'loading' | 'error';\n}\n\nexport function createInitialSelectState<K extends SelectKey = SelectKey>(): SelectState<K> {\n return {\n lifecycle: 'disconnected',\n popup: 'closed',\n disabled: false,\n focused: false,\n query: '',\n activeKey: null,\n selectedKeys: new Set<K>(),\n registeredKeys: new Set<K>(),\n selection: {\n multiple: false,\n required: false,\n allowDeselect: false,\n disabledKeys: new Set<K>(),\n maxSelections: 0,\n },\n dataStatus: 'idle',\n };\n}\n","import type { SelectKey } from './contracts.js';\nimport type { SelectState } from './select-state.js';\n\nexport function isOpen<K extends SelectKey>(state: SelectState<K>): boolean {\n return state.popup === 'open';\n}\n\nexport function isDisabled<K extends SelectKey>(state: SelectState<K>): boolean {\n return state.disabled;\n}\n\nexport function isFocused<K extends SelectKey>(state: SelectState<K>): boolean {\n return state.focused;\n}\n\nexport function hasSelection<K extends SelectKey>(state: SelectState<K>): boolean {\n return state.selectedKeys.size > 0;\n}\n\nexport function isSelected<K extends SelectKey>(state: SelectState<K>, key: K): boolean {\n return state.selectedKeys.has(key);\n}\n\nexport function getSelectedKeys<K extends SelectKey>(state: SelectState<K>): K[] {\n return Array.from(state.selectedKeys);\n}\n\nexport function getActiveKey<K extends SelectKey>(state: SelectState<K>): K | null {\n return state.activeKey;\n}\n\nexport function isRegisteredKey<K extends SelectKey>(state: SelectState<K>, key: K): boolean {\n return state.registeredKeys.has(key);\n}\n","import type { SelectKey } from '../../engine/contracts.js';\nimport type { SelectEffect } from '../../engine/select-effects.js';\nimport type { SelectEvent } from '../../engine/select-events.js';\nimport type { SelectState } from '../../engine/select-state.js';\nimport { createInitialSelectState } from '../../engine/select-state.js';\nimport { transition } from '../../engine/select-machine.js';\n\nexport class SelectEngineBridge<K extends SelectKey = SelectKey> {\n private _state: SelectState<K>;\n\n constructor(initialState: SelectState<K> = createInitialSelectState<K>()) {\n this._state = initialState;\n }\n\n get state(): SelectState<K> {\n return this._state;\n }\n\n dispatch(event: SelectEvent<K>): SelectEffect<K>[] {\n const result = transition(this._state, event);\n this._state = result.state;\n return result.effects;\n }\n}\n","import type { SelectEffect } from '../../engine/select-effects.js';\n\nexport interface WebSelectContext {\n focusTrigger?: () => void;\n syncAria?: () => void;\n onPopupOpened?: () => void;\n onPopupClosed?: (reason: Extract<SelectEffect, { type: 'POPUP_CLOSED' }>['reason']) => void;\n}\n\nexport interface SelectEffectRunner {\n run(effects: readonly SelectEffect[], context: WebSelectContext): void;\n}\n\nexport class DefaultSelectEffectRunner implements SelectEffectRunner {\n run(effects: readonly SelectEffect[], context: WebSelectContext): void {\n for (const effect of effects) {\n switch (effect.type) {\n case 'FOCUS_TRIGGER':\n context.focusTrigger?.();\n break;\n case 'SYNC_ARIA':\n context.syncAria?.();\n break;\n case 'POPUP_OPENED':\n context.onPopupOpened?.();\n break;\n case 'POPUP_CLOSED':\n context.onPopupClosed?.(effect.reason);\n break;\n case 'ACTIVE_KEY_CHANGED':\n case 'SELECTION_CHANGED':\n break;\n }\n }\n }\n}\n","/**\n * Fenwick Tree (Binary Indexed Tree) for O(log n) prefix sum queries and updates.\n * Used for cumulative height calculations in variable-height virtualization.\n * \n * Space: O(n)\n * Time: O(log n) for both query and update\n * \n * @see https://en.wikipedia.org/wiki/Fenwick_tree\n */\nexport class FenwickTree {\n private tree: Float64Array;\n private size: number;\n\n constructor(size: number) {\n this.size = size;\n // 1-indexed for cleaner bit manipulation\n this.tree = new Float64Array(size + 1);\n }\n\n /**\n * Add delta to index i (0-indexed input)\n * Complexity: O(log n)\n */\n add(index: number, delta: number): void {\n // Convert to 1-indexed\n let i = index + 1;\n while (i <= this.size) {\n this.tree[i] += delta;\n // Move to next relevant index: i + LSB(i)\n i += i & -i;\n }\n }\n\n /**\n * Get prefix sum from 0 to index (inclusive, 0-indexed input)\n * Complexity: O(log n)\n */\n sum(index: number): number {\n if (index < 0) return 0;\n // Convert to 1-indexed\n let i = index + 1;\n let result = 0;\n while (i > 0) {\n result += this.tree[i];\n // Move to parent: i - LSB(i)\n i -= i & -i;\n }\n return result;\n }\n\n /**\n * Get sum in range [left, right] (inclusive, 0-indexed)\n * Complexity: O(log n)\n */\n rangeSum(left: number, right: number): number {\n if (left > right) return 0;\n return this.sum(right) - (left > 0 ? this.sum(left - 1) : 0);\n }\n\n /**\n * Update value at index to newValue (handles delta internally)\n * Requires tracking current values externally or use add() directly\n * Complexity: O(log n)\n */\n update(index: number, oldValue: number, newValue: number): void {\n this.add(index, newValue - oldValue);\n }\n\n /**\n * Binary search to find the smallest index where sum(index) >= target\n * Useful for finding scroll position -> item index mapping\n * Complexity: O(log² n) or O(log n) with optimization\n * \n * @returns index (0-indexed) or -1 if not found\n */\n lowerBound(target: number): number {\n if (target <= 0) return 0;\n\n // Optimized binary search on Fenwick tree structure\n let pos = 0;\n let sum = 0;\n // Start from highest power of 2 <= size\n let bit = 1 << Math.floor(Math.log2(this.size));\n\n while (bit > 0) {\n if (pos + bit <= this.size) {\n const nextSum = sum + this.tree[pos + bit];\n if (nextSum < target) {\n pos += bit;\n sum = nextSum;\n }\n }\n bit >>= 1;\n }\n\n // Convert back to 0-indexed\n return pos;\n }\n\n /**\n * Reset all values to 0\n * Complexity: O(n)\n */\n reset(): void {\n this.tree.fill(0);\n }\n\n /**\n * Resize the tree (useful for dynamic item lists)\n * Complexity: O(n)\n */\n resize(newSize: number): void {\n if (newSize === this.size) return;\n \n const oldTree = this.tree;\n const oldSize = this.size;\n \n this.size = newSize;\n this.tree = new Float64Array(newSize + 1);\n \n // Copy existing values up to min(oldSize, newSize)\n const copySize = Math.min(oldSize, newSize);\n for (let i = 1; i <= copySize; i++) {\n this.tree[i] = oldTree[i];\n }\n }\n\n /**\n * Get current size\n */\n getSize(): number {\n return this.size;\n }\n\n /**\n * Export state for serialization (e.g., to SharedArrayBuffer)\n */\n exportState(): { size: number; tree: number[] } {\n return {\n size: this.size,\n tree: Array.from(this.tree),\n };\n }\n\n /**\n * Import state from serialization\n */\n static fromState(state: { size: number; tree: number[] }): FenwickTree {\n const ft = new FenwickTree(state.size);\n ft.tree = new Float64Array(state.tree);\n return ft;\n }\n}\n","/**\n * DOM Node Pool with LRU eviction and aggressive cleanup.\n * Reuses nodes to minimize GC pressure and layout thrashing.\n * \n * Features:\n * - LRU eviction when pool exceeds maxSize\n * - Style reset to avoid style pollution\n * - Event listener cleanup\n * - Performance telemetry integration\n */\n\ninterface PoolNode {\n node: HTMLElement;\n lastUsed: number; // performance.now() timestamp\n inUse: boolean;\n}\n\nexport interface DOMPoolOptions {\n /** Maximum pool size (default: renderedNodes + 32) */\n maxSize?: number;\n /** Factory function to create new nodes */\n factory: () => HTMLElement;\n /** Reset function called before reuse */\n reset?: (node: HTMLElement) => void;\n /** Enable performance telemetry */\n telemetry?: boolean;\n}\n\nexport class DOMPool {\n private pool: PoolNode[] = [];\n private factory: () => HTMLElement;\n private reset: (node: HTMLElement) => void;\n private maxSize: number;\n private telemetry: boolean;\n \n // Telemetry\n private hits = 0;\n private misses = 0;\n private evictions = 0;\n\n constructor(options: DOMPoolOptions) {\n this.factory = options.factory;\n this.reset = options.reset || this.defaultReset.bind(this);\n this.maxSize = options.maxSize || 64;\n this.telemetry = options.telemetry || false;\n }\n\n /**\n * Acquire a node from pool or create new one\n * Complexity: O(n) for LRU scan, amortized O(1) for small pools\n */\n acquire(): HTMLElement {\n const now = performance.now();\n\n // Find first available node\n for (let i = 0; i < this.pool.length; i++) {\n const poolNode = this.pool[i];\n if (!poolNode.inUse) {\n poolNode.inUse = true;\n poolNode.lastUsed = now;\n this.reset(poolNode.node);\n \n if (this.telemetry) this.hits++;\n return poolNode.node;\n }\n }\n\n // No available nodes, create new one\n const node = this.factory();\n this.pool.push({\n node,\n lastUsed: now,\n inUse: true,\n });\n\n if (this.telemetry) this.misses++;\n\n // Evict if pool too large\n if (this.pool.length > this.maxSize) {\n this.evictLRU();\n }\n\n return node;\n }\n\n /**\n * Release node back to pool\n * Complexity: O(n) to find node\n */\n release(node: HTMLElement): void {\n const poolNode = this.pool.find(p => p.node === node);\n if (poolNode) {\n poolNode.inUse = false;\n poolNode.lastUsed = performance.now();\n\n if (this.pool.length > this.maxSize) {\n this.removePoolNode(poolNode);\n return;\n }\n \n // Aggressive cleanup\n this.reset(poolNode.node);\n }\n }\n\n /**\n * Evict least recently used node\n * Complexity: O(n)\n */\n private evictLRU(): boolean {\n // Find LRU node that's not in use\n let lruIndex = -1;\n let oldestTime = Infinity;\n\n for (let i = 0; i < this.pool.length; i++) {\n const poolNode = this.pool[i];\n if (!poolNode.inUse && poolNode.lastUsed < oldestTime) {\n lruIndex = i;\n oldestTime = poolNode.lastUsed;\n }\n }\n\n if (lruIndex >= 0) {\n this.removePoolNode(this.pool[lruIndex]);\n \n if (this.telemetry) this.evictions++;\n return true;\n }\n\n return false;\n }\n\n private removePoolNode(poolNode: PoolNode): void {\n const index = this.pool.indexOf(poolNode);\n if (index < 0) return;\n\n const [removed] = this.pool.splice(index, 1);\n this.deepCleanup(removed.node);\n }\n\n /**\n * Default reset: clear content, remove inline styles, remove attributes\n */\n private defaultReset(node: HTMLElement): void {\n // Clear content\n node.textContent = '';\n \n // Remove inline styles\n node.removeAttribute('style');\n \n // Remove data attributes (preserve data-index, data-selectable for delegation)\n const attrs = Array.from(node.attributes);\n for (const attr of attrs) {\n if (attr.name.startsWith('data-') && \n attr.name !== 'data-index' && \n attr.name !== 'data-selectable') {\n node.removeAttribute(attr.name);\n }\n }\n \n // Remove ARIA attributes that might pollute reuse\n const ariaAttrs = ['aria-selected', 'aria-checked', 'aria-disabled'];\n ariaAttrs.forEach(attr => node.removeAttribute(attr));\n }\n\n /**\n * Deep cleanup before eviction/destruction\n */\n private deepCleanup(node: HTMLElement): void {\n // Remove all event listeners by cloning (nuclear option)\n const clone = node.cloneNode(true) as HTMLElement;\n node.parentNode?.replaceChild(clone, node);\n \n // Clear references\n node.textContent = '';\n }\n\n /**\n * Clear entire pool\n */\n clear(): void {\n for (const poolNode of this.pool) {\n this.deepCleanup(poolNode.node);\n }\n this.pool = [];\n this.resetTelemetry();\n }\n\n /**\n * Adjust max pool size dynamically\n */\n setMaxSize(size: number): void {\n this.maxSize = size;\n // Evict excess nodes\n while (this.pool.length > this.maxSize) {\n if (!this.evictLRU()) break;\n }\n }\n\n /**\n * Get pool statistics\n */\n getStats() {\n const available = this.pool.filter(p => !p.inUse).length;\n const hitRate = this.hits + this.misses > 0 \n ? this.hits / (this.hits + this.misses) \n : 0;\n\n return {\n total: this.pool.length,\n available,\n inUse: this.pool.length - available,\n maxSize: this.maxSize,\n hits: this.hits,\n misses: this.misses,\n evictions: this.evictions,\n hitRate,\n };\n }\n\n /**\n * Reset telemetry counters\n */\n resetTelemetry(): void {\n this.hits = 0;\n this.misses = 0;\n this.evictions = 0;\n }\n}\n","import { FenwickTree } from './fenwick-tree.js';\nimport { DOMPool } from './dom-pool.js';\n\ntype ItemGetter = (index: number) => unknown;\n\nexport interface VirtualizerOptions {\n estimatedItemHeight: number;\n buffer: number;\n maxPoolExtra?: number; // extra nodes beyond window size\n measurementThreshold?: number; // px change to consider a height update\n enableTelemetry?: boolean; // enable pool stats\n}\n\nexport interface VirtualizerScrollResult {\n /** Clamped target index in the current item set. */\n index: number;\n /** Prefix-sum offset for the target item. */\n offset: number;\n /** Intended container scrollTop; the caller owns applying it to the DOM. */\n scrollTop: number;\n}\n\nexport interface VirtualizerWindow {\n startIndex: number;\n endIndex: number;\n windowSize: number;\n}\n\nexport interface VirtualizerWindowUpdate {\n window: VirtualizerWindow;\n changed: boolean;\n scrollTop: number;\n viewportHeight: number;\n}\n\nexport class Virtualizer {\n private container: HTMLElement;\n private itemsLength: number;\n private options: VirtualizerOptions;\n private readonly estimatedItemHeight: number;\n measuredHeights = new Map<number, number>();\n private measuredHeightTotal = 0;\n averageHeight: number;\n private pool: DOMPool;\n private itemGetter: ItemGetter;\n private fenwick: FenwickTree;\n private activeNodes = new Map<number, HTMLElement>(); // index -> node mapping\n private destroyed = false;\n private recycleRafId = 0;\n private intendedScrollTop = 0;\n private currentWindow: VirtualizerWindow | null = null;\n\n constructor(container: HTMLElement, itemsLength: number, itemGetter: ItemGetter, options: VirtualizerOptions) {\n this.container = container;\n this.itemsLength = itemsLength;\n this.itemGetter = itemGetter;\n this.options = options;\n this.estimatedItemHeight = options.estimatedItemHeight;\n this.averageHeight = options.estimatedItemHeight;\n \n // Initialize DOM pool with LRU eviction\n const maxPoolSize = Math.ceil((options.buffer * 2 + 10) * 1.5) + (options.maxPoolExtra ?? 32);\n this.pool = new DOMPool({\n maxSize: maxPoolSize,\n factory: () => {\n const div = document.createElement('div');\n div.setAttribute('data-selectable', '');\n return div;\n },\n reset: (node) => {\n // Clear content but preserve data-selectable\n node.textContent = '';\n node.removeAttribute('style');\n // Remove aria attributes\n node.removeAttribute('aria-selected');\n node.removeAttribute('aria-checked');\n },\n telemetry: options.enableTelemetry || false,\n });\n\n // One prefix index keeps offset, window, and scroll calculations on the\n // same measured-height policy at every list size.\n this.fenwick = this.createFenwickTree(itemsLength);\n \n this.container.style.willChange = 'transform';\n }\n\n computeWindow(scrollTop: number, viewportHeight: number) {\n const { buffer } = this.options;\n const visibleStartIndex = this.indexAtOffset(scrollTop);\n const calculatedStartIndex = visibleStartIndex - buffer;\n const startIndex = this.itemsLength > 0\n ? Math.max(0, Math.min(this.itemsLength - 1, calculatedStartIndex))\n : 0;\n const viewportEnd = Math.max(0, scrollTop + viewportHeight);\n let visibleEndIndex = this.indexAtOffset(viewportEnd);\n // The item beginning exactly at the viewport's lower edge is not visible.\n // indexAtOffset deliberately advances across exact boundaries for the\n // viewport start, so reverse that choice here when the viewport has height.\n if (\n viewportHeight > 0\n && visibleEndIndex > visibleStartIndex\n && this.cumulativeOffset(visibleEndIndex) === viewportEnd\n ) {\n visibleEndIndex -= 1;\n }\n const calculatedEndIndex = Math.max(visibleStartIndex, visibleEndIndex) + buffer;\n const endIndex = this.itemsLength > 0\n ? Math.max(0, Math.min(this.itemsLength - 1, calculatedEndIndex))\n : -1;\n const windowSize = Math.max(0, endIndex - startIndex + 1);\n \n // Adjust pool size dynamically based on window\n const newPoolSize = windowSize + (this.options.maxPoolExtra ?? 32);\n this.pool.setMaxSize(newPoolSize);\n \n return { startIndex, endIndex, windowSize };\n }\n\n /** Computes and records a scroll-derived window without installing listeners. */\n updateWindow(scrollTop: number, viewportHeight: number): VirtualizerWindowUpdate | null {\n if (this.destroyed) return null;\n\n const safeScrollTop = Number.isFinite(scrollTop) ? Math.max(0, scrollTop) : 0;\n const safeViewportHeight = Number.isFinite(viewportHeight) && viewportHeight >= 0\n ? viewportHeight\n : 0;\n const nextWindow = this.computeWindow(safeScrollTop, safeViewportHeight);\n const changed = this.currentWindow === null\n || this.currentWindow.startIndex !== nextWindow.startIndex\n || this.currentWindow.endIndex !== nextWindow.endIndex\n || this.currentWindow.windowSize !== nextWindow.windowSize;\n\n this.currentWindow = { ...nextWindow };\n return {\n window: { ...nextWindow },\n changed,\n scrollTop: safeScrollTop,\n viewportHeight: safeViewportHeight,\n };\n }\n\n /** Returns a copy of the last recorded window, or null before the first update. */\n getCurrentWindow(): VirtualizerWindow | null {\n return this.currentWindow ? { ...this.currentWindow } : null;\n }\n\n /** Finds the item containing an offset, advancing past exact item boundaries. */\n private indexAtOffset(offset: number): number {\n if (this.itemsLength <= 0) return 0;\n\n const target = Math.max(0, offset);\n let index = Math.max(0, Math.min(this.itemsLength - 1, this.fenwick.lowerBound(target)));\n\n // FenwickTree.lowerBound returns the preceding item when the target lands\n // exactly on an item boundary. For the viewport start, select the next item.\n while (index < this.itemsLength - 1 && this.cumulativeOffset(index + 1) <= target) {\n index += 1;\n }\n\n return index;\n }\n\n cumulativeOffset(index: number): number {\n if (!Number.isFinite(index)) {\n return index === Number.POSITIVE_INFINITY && this.itemsLength > 0\n ? this.fenwick.sum(this.itemsLength - 1)\n : 0;\n }\n const boundedIndex = Math.max(0, Math.min(this.itemsLength, Math.trunc(index)));\n if (boundedIndex === 0) return 0;\n return this.fenwick.sum(boundedIndex - 1);\n }\n\n /**\n * Calculates and records the intended scroll position for an item without\n * mutating the container. The caller may apply the returned scrollTop.\n * Returns null after destruction or when there are no items to target.\n */\n scrollToIndex(index: number): VirtualizerScrollResult | null {\n if (this.destroyed || this.itemsLength <= 0) return null;\n\n const requestedIndex = Number.isFinite(index) ? Math.trunc(index) : 0;\n const targetIndex = Math.max(0, Math.min(this.itemsLength - 1, requestedIndex));\n const offset = this.cumulativeOffset(targetIndex);\n this.intendedScrollTop = offset;\n\n return { index: targetIndex, offset, scrollTop: offset };\n }\n\n /**\n * Resolves a stable key against the caller's current data identity, then\n * delegates to scrollToIndex(). Invalid or out-of-range resolutions are\n * rejected rather than clamped to a different item's position.\n */\n scrollToKey<TKey>(\n key: TKey,\n resolveIndex: (key: TKey) => number | null | undefined,\n ): VirtualizerScrollResult | null {\n if (this.destroyed || this.itemsLength <= 0) return null;\n\n const index = resolveIndex(key);\n if (\n typeof index !== 'number'\n || !Number.isInteger(index)\n || index < 0\n || index >= this.itemsLength\n ) {\n return null;\n }\n\n return this.scrollToIndex(index);\n }\n\n /** Returns the last scroll position requested through scrollToIndex(). */\n getIntendedScrollTop(): number {\n return this.intendedScrollTop;\n }\n\n acquireNode(index: number): HTMLElement {\n // Check if we already have this node active (reuse)\n const existing = this.activeNodes.get(index);\n if (existing) return existing;\n \n const node = this.pool.acquire();\n node.setAttribute('data-index', String(index));\n this.activeNodes.set(index, node);\n return node;\n }\n\n releaseNode(index: number): void {\n const node = this.activeNodes.get(index);\n if (node) {\n this.pool.release(node);\n this.activeNodes.delete(index);\n }\n }\n\n releaseExcess(activeIndices: Set<number>): void {\n // Release nodes not in active set\n for (const [index, node] of this.activeNodes) {\n if (!activeIndices.has(index)) {\n this.pool.release(node);\n this.activeNodes.delete(index);\n }\n }\n }\n\n render(startIndex: number, endIndex: number, updateNode: (node: HTMLElement, item: unknown, index: number) => void) {\n if (this.destroyed) return;\n\n const frag = document.createDocumentFragment();\n const activeIndices = new Set<number>();\n \n for (let i = startIndex; i <= endIndex; i++) {\n const node = this.acquireNode(i);\n updateNode(node, this.itemGetter(i), i);\n frag.appendChild(node);\n activeIndices.add(i);\n \n // Measure on appear (deferred)\n queueMicrotask(() => {\n if (!this.destroyed) {\n this.measureOnAppear(node, i);\n }\n });\n }\n \n // Translate container by cumulative offset of startIndex\n const topOffset = this.cumulativeOffset(startIndex);\n this.container.style.transform = `translate3d(0, ${Math.round(topOffset * 100) / 100}px, 0)`;\n this.container.replaceChildren(frag);\n \n // Recycle nodes not in use\n if (this.recycleRafId) {\n cancelAnimationFrame(this.recycleRafId);\n }\n this.recycleRafId = requestAnimationFrame(() => {\n this.recycleRafId = 0;\n if (!this.destroyed) {\n this.releaseExcess(activeIndices);\n }\n });\n }\n\n measureOnAppear(node: HTMLElement, index: number) {\n this.measureItem(index, node.offsetHeight);\n }\n\n /** Records a validated measured height and updates the virtual offset index. */\n measureItem(index: number, height: number): boolean {\n if (\n this.destroyed\n || !Number.isInteger(index)\n || index < 0\n || index >= this.itemsLength\n || !Number.isFinite(height)\n || height <= 0\n ) return false;\n\n const prev = this.measuredHeights.get(index);\n const threshold = this.options.measurementThreshold ?? 5;\n\n if (prev === undefined || Math.abs(prev - height) > threshold) {\n const oldValue = prev ?? this.estimatedItemHeight;\n this.measuredHeights.set(index, height);\n this.measuredHeightTotal += height - (prev ?? 0);\n \n // Update Fenwick tree with new measurement\n this.fenwick.update(index, oldValue, height);\n \n this.updateAverageHeight();\n return true;\n }\n\n return false;\n }\n\n /**\n * Get pool statistics (if telemetry enabled)\n */\n getPoolStats() {\n return this.pool.getStats();\n }\n\n /**\n * Update items length and resize Fenwick tree if needed\n */\n setItemsLength(newLength: number): void {\n const previousLength = this.itemsLength;\n this.itemsLength = newLength;\n if (newLength !== previousLength) this.currentWindow = null;\n\n let removedMeasurement = false;\n for (const [index, height] of this.measuredHeights) {\n if (index >= newLength) {\n this.measuredHeightTotal -= height;\n this.measuredHeights.delete(index);\n removedMeasurement = true;\n }\n }\n\n if (removedMeasurement) this.updateAverageHeight();\n\n for (const index of Array.from(this.activeNodes.keys())) {\n if (index >= newLength) {\n this.releaseNode(index);\n }\n }\n \n if (newLength !== previousLength) {\n this.fenwick = this.createFenwickTree(newLength);\n }\n }\n\n /**\n * Cleanup resources\n */\n destroy(): void {\n this.destroyed = true;\n if (this.recycleRafId) {\n cancelAnimationFrame(this.recycleRafId);\n this.recycleRafId = 0;\n }\n this.pool.clear();\n this.activeNodes.clear();\n this.measuredHeights.clear();\n this.measuredHeightTotal = 0;\n this.averageHeight = this.estimatedItemHeight;\n this.currentWindow = null;\n this.fenwick.reset();\n }\n\n private updateAverageHeight(): void {\n const count = this.measuredHeights.size;\n this.averageHeight = count > 0\n ? Math.round((this.measuredHeightTotal / count) * 100) / 100\n : this.estimatedItemHeight;\n }\n\n private createFenwickTree(size: number): FenwickTree {\n const tree = new FenwickTree(size);\n for (let index = 0; index < size; index++) {\n tree.add(index, this.estimatedItemHeight);\n }\n for (const [index, height] of this.measuredHeights) {\n if (index < size) {\n tree.update(index, this.estimatedItemHeight, height);\n }\n }\n return tree;\n }\n}\n","/**\n * Custom Option Component Pool\n * \n * Manages lifecycle and recycling of custom option components for optimal performance.\n * Uses object pooling pattern to minimize allocation/deallocation overhead.\n */\n\nimport type { CustomOptionContract, CustomOptionContext, CustomOptionFactory } from '../types/custom-option.js';\n\ninterface PooledComponent {\n instance: CustomOptionContract;\n inUse: boolean;\n lastUsedIndex: number;\n}\n\n/**\n * Manages a pool of reusable custom option component instances\n */\nexport class CustomOptionPool {\n private _pool: Map<CustomOptionFactory, PooledComponent[]> = new Map();\n private _maxPoolSize: number;\n private _activeComponents: Map<number, CustomOptionContract> = new Map();\n \n constructor(maxPoolSize = 50) {\n this._maxPoolSize = maxPoolSize;\n }\n \n /**\n * Get or create a component instance for the given index\n * \n * @param factory - Factory function to create new instances\n * @param item - The data item\n * @param index - The option index\n * @param context - Context for mounting\n * @param container - DOM container for mounting\n * @returns Component instance\n */\n acquire(\n factory: CustomOptionFactory,\n item: unknown,\n index: number,\n context: CustomOptionContext,\n container: HTMLElement\n ): CustomOptionContract {\n this.release(index);\n \n // Try to find an available component in the pool\n const pooled = this._findAvailableComponent(factory);\n \n let component: CustomOptionContract;\n \n if (pooled) {\n // Reuse pooled component\n component = pooled.instance;\n } else {\n // Create new component\n try {\n component = factory(item, index);\n } catch (error) {\n console.error(`[CustomOptionPool] Failed to create component:`, error);\n throw error;\n }\n }\n \n // Mount the component\n try {\n component.mountOption(container, context);\n if (pooled) {\n pooled.inUse = true;\n pooled.lastUsedIndex = index;\n } else {\n this._addToPool(factory, component, index);\n }\n this._activeComponents.set(index, component);\n } catch (error) {\n if (pooled) {\n pooled.inUse = false;\n }\n try {\n component.unmountOption();\n } catch {\n // ignore cleanup failures after a mount failure\n }\n console.error(`[CustomOptionPool] Failed to mount component at index ${index}:`, error);\n throw error;\n }\n \n return component;\n }\n \n /**\n * Release a component back to the pool\n * \n * @param index - The index of the component to release\n */\n release(index: number): void {\n const component = this._activeComponents.get(index);\n if (!component) return;\n \n try {\n component.unmountOption();\n } catch (error) {\n console.error(`[CustomOptionPool] Failed to unmount component at index ${index}:`, error);\n }\n \n this._activeComponents.delete(index);\n \n // Mark as available in pool\n for (const pool of this._pool.values()) {\n const pooled = pool.find(p => p.instance === component);\n if (pooled) {\n pooled.inUse = false;\n break;\n }\n }\n }\n \n /**\n * Release all active components\n */\n releaseAll(): void {\n const indices = Array.from(this._activeComponents.keys());\n indices.forEach(index => this.release(index));\n }\n \n /**\n * Update selection state for a component\n * \n * @param index - The index of the component\n * @param selected - Whether it's selected\n */\n updateSelection(index: number, selected: boolean): void {\n const component = this._activeComponents.get(index);\n if (component) {\n component.updateSelected(selected);\n }\n }\n \n /**\n * Update focused state for a component\n * \n * @param index - The index of the component\n * @param focused - Whether it has keyboard focus\n */\n updateFocused(index: number, focused: boolean): void {\n const component = this._activeComponents.get(index);\n if (component && component.updateFocused) {\n component.updateFocused(focused);\n }\n }\n \n /**\n * Get active component at index\n * \n * @param index - The option index\n * @returns The component instance or undefined\n */\n getComponent(index: number): CustomOptionContract | undefined {\n return this._activeComponents.get(index);\n }\n \n /**\n * Clear the entire pool\n */\n clear(): void {\n this.releaseAll();\n this._pool.clear();\n }\n \n /**\n * Get pool statistics for debugging\n */\n getStats(): { totalPooled: number; activeComponents: number; availableComponents: number } {\n let totalPooled = 0;\n let availableComponents = 0;\n \n for (const pool of this._pool.values()) {\n totalPooled += pool.length;\n availableComponents += pool.filter(p => !p.inUse).length;\n }\n \n return {\n totalPooled,\n activeComponents: this._activeComponents.size,\n availableComponents\n };\n }\n \n /**\n * Find an available component in the pool\n */\n private _findAvailableComponent(factory: CustomOptionFactory): PooledComponent | undefined {\n const pool = this._pool.get(factory);\n if (!pool) return undefined;\n \n return pool.find(p => !p.inUse);\n }\n\n private _addToPool(factory: CustomOptionFactory, component: CustomOptionContract, index: number): void {\n while (this._getTotalPooled() >= this._maxPoolSize) {\n if (!this._evictAvailableComponent()) return;\n }\n\n const pool = this._pool.get(factory) || [];\n pool.push({\n instance: component,\n inUse: true,\n lastUsedIndex: index\n });\n this._pool.set(factory, pool);\n }\n\n private _evictAvailableComponent(): boolean {\n for (const [factory, pool] of this._pool.entries()) {\n const index = pool.findIndex(p => !p.inUse);\n if (index < 0) continue;\n\n pool.splice(index, 1);\n\n if (pool.length === 0) {\n this._pool.delete(factory);\n }\n return true;\n }\n\n return false;\n }\n\n private _getTotalPooled(): number {\n let total = 0;\n for (const pool of this._pool.values()) {\n total += pool.length;\n }\n return total;\n }\n}\n","/**\n * Option Renderer\n * \n * Unified renderer that handles both lightweight (label/value) and \n * custom component rendering with consistent performance characteristics.\n */\n\nimport type { \n CustomOptionContract, \n CustomOptionContext, \n CustomOptionFactory, \n ExtendedSelectItem \n} from '../types/custom-option';\nimport { CustomOptionPool } from './custom-option-pool';\n\nexport interface OptionRendererConfig {\n enableRecycling: boolean;\n maxPoolSize: number;\n getValue: (item: unknown) => unknown;\n getLabel: (item: unknown) => string;\n getDisabled?: (item: unknown) => boolean;\n onSelect: (index: number) => void;\n onCustomEvent?: (index: number, eventName: string, data: unknown) => void;\n onError?: (index: number, error: Error) => void;\n}\n\n/**\n * Manages rendering of both lightweight and custom component options\n */\nexport class OptionRenderer {\n private _config: OptionRendererConfig;\n private _pool: CustomOptionPool;\n private _mountedElements: Map<number, HTMLElement> = new Map();\n \n constructor(config: OptionRendererConfig) {\n this._config = config;\n this._pool = new CustomOptionPool(config.maxPoolSize);\n }\n \n /**\n * Render an option (lightweight or custom component)\n * \n * @param item - The data item\n * @param index - The option index\n * @param isSelected - Whether the option is selected\n * @param isFocused - Whether the option has keyboard focus\n * @param uniqueId - Unique ID for the select instance\n * @returns The rendered DOM element\n */\n render(\n item: unknown,\n index: number,\n isSelected: boolean,\n isFocused: boolean,\n uniqueId: string\n ): HTMLElement {\n const extendedItem = item as ExtendedSelectItem;\n const value = this._config.getValue(item);\n const label = this._config.getLabel(item);\n const isDisabled = this._config.getDisabled ? this._config.getDisabled(item) : false;\n\n this.unmount(index);\n \n // Determine if this is a custom component or lightweight option\n const hasCustomComponent = extendedItem.optionComponent && typeof extendedItem.optionComponent === 'function';\n \n if (hasCustomComponent) {\n return this._renderCustomComponent(\n item,\n index,\n value,\n label,\n isSelected,\n isFocused,\n isDisabled,\n uniqueId,\n extendedItem.optionComponent!\n );\n } else {\n return this._renderLightweightOption(\n item,\n index,\n value,\n label,\n isSelected,\n isFocused,\n isDisabled,\n uniqueId\n );\n }\n }\n \n /**\n * Update selection state for an option\n * \n * @param index - The option index\n * @param selected - Whether it's selected\n */\n updateSelection(index: number, selected: boolean): void {\n const element = this._mountedElements.get(index);\n if (!element) return;\n \n // Check if this is a custom component\n const component = this._pool.getComponent(index);\n if (component) {\n component.updateSelected(selected);\n } else {\n // Update lightweight option\n if (selected) {\n element.classList.add('selected');\n element.setAttribute('aria-selected', 'true');\n } else {\n element.classList.remove('selected');\n element.setAttribute('aria-selected', 'false');\n }\n }\n }\n \n /**\n * Update focused state for an option\n * \n * @param index - The option index\n * @param focused - Whether it has keyboard focus\n */\n updateFocused(index: number, focused: boolean): void {\n const element = this._mountedElements.get(index);\n if (!element) return;\n \n // Check if this is a custom component\n const component = this._pool.getComponent(index);\n if (component) {\n if (component.updateFocused) {\n component.updateFocused(focused);\n }\n // Also update the element's focused class for styling\n element.classList.toggle('focused', focused);\n } else {\n // Update lightweight option\n element.classList.toggle('focused', focused);\n }\n }\n \n /**\n * Unmount and cleanup an option\n * \n * @param index - The option index\n */\n unmount(index: number): void {\n // Release custom component if exists\n this._pool.release(index);\n \n // Remove from mounted elements\n this._mountedElements.delete(index);\n }\n \n /**\n * Unmount all options\n */\n unmountAll(): void {\n this._pool.releaseAll();\n this._mountedElements.clear();\n }\n \n /**\n * Get pool statistics\n */\n getStats() {\n return this._pool.getStats();\n }\n \n /**\n * Render a lightweight option (traditional label/value)\n */\n private _renderLightweightOption(\n item: unknown,\n index: number,\n value: unknown,\n label: string,\n isSelected: boolean,\n isFocused: boolean,\n isDisabled: boolean,\n uniqueId: string\n ): HTMLElement {\n const option = document.createElement('div');\n option.className = 'option';\n if (isSelected) option.classList.add('selected');\n if (isFocused) option.classList.add('focused');\n if (isDisabled) option.classList.add('disabled');\n \n option.id = `${uniqueId}-option-${index}`;\n option.textContent = label;\n option.dataset.value = String(value);\n option.dataset.index = String(index);\n option.dataset.mode = 'lightweight';\n option.setAttribute('role', 'option');\n option.setAttribute('aria-selected', String(isSelected));\n if (isDisabled) {\n option.setAttribute('aria-disabled', 'true');\n }\n \n // Click handler\n if (!isDisabled) {\n option.addEventListener('click', () => {\n this._config.onSelect(index);\n });\n }\n \n this._mountedElements.set(index, option);\n \n \n return option;\n }\n \n /**\n * Render a custom component option\n */\n private _renderCustomComponent(\n item: unknown,\n index: number,\n value: unknown,\n label: string,\n isSelected: boolean,\n isFocused: boolean,\n isDisabled: boolean,\n uniqueId: string,\n factory: CustomOptionFactory\n ): HTMLElement {\n // Create wrapper container for the custom component\n const wrapper = document.createElement('div');\n wrapper.className = 'option option-custom';\n if (isSelected) wrapper.classList.add('selected');\n if (isFocused) wrapper.classList.add('focused');\n if (isDisabled) wrapper.classList.add('disabled');\n \n wrapper.id = `${uniqueId}-option-${index}`;\n wrapper.dataset.value = String(value);\n wrapper.dataset.index = String(index);\n wrapper.dataset.mode = 'component';\n wrapper.setAttribute('role', 'option');\n wrapper.setAttribute('aria-selected', String(isSelected));\n wrapper.setAttribute('aria-label', label); // Accessibility fallback\n if (isDisabled) {\n wrapper.setAttribute('aria-disabled', 'true');\n }\n \n // Create context for the custom component\n const context: CustomOptionContext = {\n item,\n index,\n value,\n label,\n isSelected,\n isFocused,\n isDisabled,\n onSelect: (idx: number) => {\n if (!isDisabled) {\n this._config.onSelect(idx);\n }\n },\n onCustomEvent: (eventName: string, data: unknown) => {\n if (this._config.onCustomEvent) {\n this._config.onCustomEvent(index, eventName, data);\n }\n }\n };\n \n // Acquire component from pool and mount it\n try {\n const component = this._pool.acquire(factory, item, index, context, wrapper);\n \n // Get the component's root element and attach click handler to wrapper\n const componentElement = component.getElement();\n \n if (!isDisabled) {\n // Use event delegation on the wrapper\n wrapper.addEventListener('click', (e) => {\n // Only trigger if clicking within the component\n if (wrapper.contains(e.target as Node)) {\n this._config.onSelect(index);\n }\n });\n }\n \n \n } catch (error) {\n console.error(`[OptionRenderer] Failed to render custom component at index ${index}:`, error);\n \n // Fallback to lightweight rendering on error\n wrapper.innerHTML = '';\n wrapper.textContent = label;\n wrapper.classList.add('component-error');\n \n if (this._config.onError) {\n this._config.onError(index, error as Error);\n }\n }\n \n this._mountedElements.set(index, wrapper);\n \n return wrapper;\n }\n}\n","import type {\n NativeSelectOptions,\n SelectEventName,\n SelectEventsDetailMap,\n RendererHelpers,\n} from \"../types.js\";\nimport {\n createRendererHelpers,\n OptionRenderer,\n OptionTemplate,\n renderTemplate,\n} from \"../renderers/contracts.js\";\nimport { Virtualizer } from \"../utils/virtualizer\";\nimport { OptionRenderer as UnifiedOptionRenderer } from \"../utils/option-renderer\";\nimport type { OptionRendererConfig } from \"../utils/option-renderer\";\n\nexport class NativeSelectElement extends HTMLElement {\n static get observedAttributes(): string[] {\n return [\"placement\", \"strategy\", \"portal\"];\n }\n\n private _options: NativeSelectOptions = {};\n private _shadow: ShadowRoot;\n private _listRoot: HTMLElement;\n private _items: unknown[] = [];\n private _helpers: RendererHelpers;\n private _virtualizer?: Virtualizer;\n private _unifiedRenderer?: UnifiedOptionRenderer;\n\n // Multi-select & interaction state\n private _selectedSet = new Set<number>(); // indices\n private _selectedItems = new Map<number, unknown>(); // index -> item\n private _activeIndex = -1;\n private _multi = false;\n private _typeBuffer = \"\";\n private _typeTimeout?: number;\n private _announceTimeout?: number;\n private _liveRegion?: HTMLElement;\n\n constructor() {\n super();\n this._shadow = this.attachShadow({ mode: \"open\" });\n this._listRoot = document.createElement(\"div\");\n this._listRoot.setAttribute(\"role\", \"listbox\");\n this._listRoot.setAttribute(\"tabindex\", \"0\");\n this._shadow.appendChild(this._listRoot);\n\n // Live region for screen reader announcements\n this._liveRegion = document.createElement(\"div\");\n this._liveRegion.setAttribute(\"role\", \"status\");\n this._liveRegion.setAttribute(\"aria-live\", \"polite\");\n this._liveRegion.style.cssText =\n \"position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;\";\n this._shadow.appendChild(this._liveRegion);\n\n this._helpers = createRendererHelpers((item, index) =>\n this._onSelect(item, index),\n );\n\n // Delegated click\n this._listRoot.addEventListener(\"click\", (e) => {\n const el = (e.target as HTMLElement).closest(\n \"[data-selectable]\",\n ) as HTMLElement | null;\n if (!el) return;\n const idx = Number(el.dataset.index);\n const item = this._items[idx];\n this._onSelect(item, idx);\n });\n\n // Keyboard navigation\n this._listRoot.addEventListener(\"keydown\", (e) => this._onKeydown(e));\n }\n\n connectedCallback() {\n // Initialize ARIA roles and open event\n this._listRoot.setAttribute(\"role\", \"listbox\");\n this._listRoot.setAttribute(\"aria-label\", \"Options list\");\n if (this._multi)\n this._listRoot.setAttribute(\"aria-multiselectable\", \"true\");\n this._initializeOptionRenderer();\n this._emit(\"open\", {});\n }\n\n disconnectedCallback() {\n this._emit(\"close\", {});\n // Cleanup unified renderer\n if (this._unifiedRenderer) {\n this._unifiedRenderer.unmountAll();\n }\n this._virtualizer?.destroy();\n this._virtualizer = undefined;\n // Cleanup: remove listeners if any were added outside constructor\n if (this._typeTimeout) window.clearTimeout(this._typeTimeout);\n if (this._announceTimeout) window.clearTimeout(this._announceTimeout);\n }\n\n private _initializeOptionRenderer(): void {\n this._unifiedRenderer?.unmountAll();\n\n const getValue = (item: unknown) => (item as any)?.value ?? item;\n const getLabel = (item: unknown) => (item as any)?.label ?? String(item);\n const getDisabled = (item: unknown) => (item as any)?.disabled ?? false;\n\n const rendererConfig: OptionRendererConfig = {\n enableRecycling: true,\n maxPoolSize: 100,\n getValue,\n getLabel,\n getDisabled,\n onSelect: (index: number) => {\n const item = this._items[index];\n this._onSelect(item, index);\n },\n onCustomEvent: (index: number, eventName: string, data: unknown) => {\n // Emit custom events from option components\n this.dispatchEvent(\n new CustomEvent(\"option:custom-event\", {\n detail: { index, eventName, data },\n bubbles: true,\n composed: true,\n }),\n );\n },\n onError: (index: number, error: Error) => {\n console.error(`[NativeSelect] Error in option ${index}:`, error);\n this.dispatchEvent(\n new CustomEvent(\"option:mount-error\", {\n detail: { index, error },\n bubbles: true,\n composed: true,\n }),\n );\n },\n };\n\n this._unifiedRenderer = new UnifiedOptionRenderer(rendererConfig);\n }\n\n attributeChangedCallback(\n name: string,\n _oldValue: string | null,\n newValue: string | null,\n ) {\n switch (name) {\n case \"placement\":\n this._options.placement = (newValue ??\n undefined) as NativeSelectOptions[\"placement\"];\n break;\n case \"strategy\":\n this._options.strategy = (newValue ??\n undefined) as NativeSelectOptions[\"strategy\"];\n break;\n case \"portal\":\n this._options.portal =\n newValue === \"true\" ? true : newValue === \"false\" ? false : undefined;\n break;\n }\n }\n\n set items(items: unknown[]) {\n this._items = items ?? [];\n // initialize virtualizer with estimated height (default 48) and buffer\n this._virtualizer?.destroy();\n this._virtualizer = new Virtualizer(\n this._listRoot,\n this._items.length,\n (i) => this._items[i],\n { estimatedItemHeight: 48, buffer: 5 },\n );\n this.render();\n }\n\n get items() {\n return this._items;\n }\n\n set multi(value: boolean) {\n this._multi = value;\n if (value) {\n this._listRoot.setAttribute(\"aria-multiselectable\", \"true\");\n } else {\n this._listRoot.removeAttribute(\"aria-multiselectable\");\n }\n }\n\n get multi() {\n return this._multi;\n }\n\n get selectedIndices(): number[] {\n return Array.from(this._selectedSet);\n }\n\n get selectedItems(): unknown[] {\n return Array.from(this._selectedItems.values());\n }\n\n set optionTemplate(template: OptionTemplate | undefined) {\n this._options.optionTemplate = template;\n this.render();\n }\n\n set optionRenderer(renderer: OptionRenderer | undefined) {\n this._options.optionRenderer = renderer;\n this.render();\n }\n\n /**\n * Public API: setItems() method for compatibility with EnhancedSelect\n * Accepts an array of items which can be:\n * - Simple primitives (string, number)\n * - Objects with {label, value} structure\n * - Objects with {label, value, optionComponent} for custom rendering (v1.2.0+)\n */\n setItems(items: unknown[]): void {\n this.items = items ?? [];\n }\n\n /**\n * Public API: setValue() method to programmatically select an item\n * For single select: clears selection and selects the item matching the value\n * For multi-select: adds to selection if not already selected\n */\n setValue(value: unknown): void {\n if (value === null || value === undefined || value === \"\") {\n // Clear selection\n this._selectedSet.clear();\n this._selectedItems.clear();\n this._activeIndex = -1;\n this.render();\n return;\n }\n\n // Find item by value\n const index = this._items.findIndex((item) => {\n if (typeof item === \"object\" && item !== null && \"value\" in item) {\n return (item as any).value === value;\n }\n return item === value;\n });\n\n if (index >= 0) {\n const item = this._items[index];\n if (!this._multi) {\n // Single select: clear and set\n this._selectedSet.clear();\n this._selectedItems.clear();\n }\n this._selectedSet.add(index);\n this._selectedItems.set(index, item);\n this._activeIndex = index;\n this.render();\n }\n }\n\n /**\n * Public API: getValue() method to get currently selected value(s)\n * Returns single value for single-select, array for multi-select\n */\n getValue(): unknown | unknown[] {\n // Optimized: single-pass iteration, no intermediate arrays\n const values: unknown[] = [];\n for (const item of this._selectedItems.values()) {\n if (typeof item === \"object\" && item !== null && \"value\" in item) {\n values.push((item as any).value);\n } else {\n values.push(item);\n }\n }\n\n return this._multi ? values : (values[0] ?? null);\n }\n\n render() {\n const { optionTemplate, optionRenderer } = this._options;\n const viewportHeight = this.getBoundingClientRect().height || 300;\n const scrollTop = this.scrollTop || 0;\n\n // Update aria-activedescendant\n if (this._activeIndex >= 0) {\n this._listRoot.setAttribute(\n \"aria-activedescendant\",\n `option-${this._activeIndex}`,\n );\n } else {\n this._listRoot.removeAttribute(\"aria-activedescendant\");\n }\n\n // Check if any items have custom components\n const hasCustomComponents = this._items.some(\n (item) =>\n typeof item === \"object\" &&\n item !== null &&\n Object.prototype.hasOwnProperty.call(item, \"optionComponent\") &&\n typeof (item as any).optionComponent === \"function\",\n );\n\n // Use unified renderer if we have custom components\n if (hasCustomComponents && this._unifiedRenderer) {\n this._listRoot.replaceChildren(); // Clear existing content\n const frag = document.createDocumentFragment();\n\n for (let i = 0; i < this._items.length; i++) {\n const item = this._items[i];\n const isSelected = this._selectedSet.has(i);\n const isFocused = this._activeIndex === i;\n\n const optionElement = this._unifiedRenderer.render(\n item,\n i,\n isSelected,\n isFocused,\n `native-${this.getAttribute(\"id\") || \"default\"}`,\n );\n\n frag.appendChild(optionElement);\n }\n\n this._listRoot.appendChild(frag);\n return;\n }\n\n // Fall back to original rendering logic for lightweight options\n if (this._virtualizer) {\n const { startIndex, endIndex } = this._virtualizer.computeWindow(\n scrollTop,\n viewportHeight,\n );\n this._virtualizer.render(startIndex, endIndex, (node, item, i) => {\n this._applyOptionAttrs(node, i);\n if (optionRenderer) {\n const el = optionRenderer(item, i, this._helpers);\n // replace node contents\n node.replaceChildren(el);\n } else if (optionTemplate) {\n const wrapper = document.createElement(\"div\");\n wrapper.innerHTML = optionTemplate(item, i);\n const el = wrapper.firstElementChild as HTMLElement | null;\n node.replaceChildren(el ?? document.createTextNode(String(item)));\n } else {\n // Handle {label, value} objects or primitives\n const displayText =\n typeof item === \"object\" && item !== null && \"label\" in item\n ? String((item as any).label)\n : String(item);\n node.textContent = displayText;\n }\n });\n return;\n }\n const frag = document.createDocumentFragment();\n for (let i = 0; i < this._items.length; i++) {\n const item = this._items[i];\n if (optionRenderer) {\n const el = optionRenderer(item, i, this._helpers);\n if (!el.hasAttribute(\"data-selectable\")) {\n el.setAttribute(\"data-selectable\", \"\");\n el.setAttribute(\"data-index\", String(i));\n }\n this._applyOptionAttrs(el, i);\n frag.appendChild(el);\n } else if (optionTemplate) {\n // Fast path: render all via DocumentFragment in one call\n renderTemplate(this._listRoot, this._items, optionTemplate);\n // Apply ARIA attrs after template render\n this._applyAriaToAll();\n return; // rendering complete\n } else {\n const el = document.createElement(\"div\");\n // Handle {label, value} objects or primitives\n const displayText =\n typeof item === \"object\" && item !== null && \"label\" in item\n ? String((item as any).label)\n : String(item);\n el.textContent = displayText;\n el.setAttribute(\"data-selectable\", \"\");\n el.setAttribute(\"data-index\", String(i));\n this._applyOptionAttrs(el, i);\n frag.appendChild(el);\n }\n }\n this._listRoot.replaceChildren(frag);\n }\n\n private _applyOptionAttrs(node: HTMLElement, index: number) {\n node.setAttribute(\"role\", \"option\");\n node.id = `option-${index}`;\n if (this._selectedSet.has(index)) {\n node.setAttribute(\"aria-selected\", \"true\");\n } else {\n node.setAttribute(\"aria-selected\", \"false\");\n }\n }\n\n private _applyAriaToAll() {\n const children = Array.from(this._listRoot.children) as HTMLElement[];\n for (const child of children) {\n const idx = Number(child.dataset.index);\n if (Number.isFinite(idx)) this._applyOptionAttrs(child, idx);\n }\n }\n\n private _emit<K extends SelectEventName>(\n name: K,\n detail: SelectEventsDetailMap[K],\n ) {\n this.dispatchEvent(new CustomEvent(name, { detail, bubbles: true }));\n }\n\n // Multi-select and interaction methods\n private _onSelect(item: unknown, index: number) {\n if (this._multi) {\n if (this._selectedSet.has(index)) {\n this._selectedSet.delete(index);\n this._selectedItems.delete(index);\n } else {\n this._selectedSet.add(index);\n this._selectedItems.set(index, item);\n }\n } else {\n this._selectedSet.clear();\n this._selectedItems.clear();\n this._selectedSet.add(index);\n this._selectedItems.set(index, item);\n }\n this._activeIndex = index;\n this.render();\n\n // Emit with all required fields\n const selected = this._selectedSet.has(index);\n const value = (item as any)?.value ?? item;\n const label = (item as any)?.label ?? String(item);\n\n this._emit(\"select\", {\n item,\n index,\n value,\n label,\n selected,\n multi: this._multi,\n });\n\n // Optimized: single-pass iteration for change event data\n const selectedItems: unknown[] = [];\n const selectedValues: unknown[] = [];\n for (const item of this._selectedItems.values()) {\n selectedItems.push(item);\n selectedValues.push((item as any)?.value ?? item);\n }\n\n // Emit 'change' event for better React compatibility\n this._emit(\"change\", {\n selectedItems,\n selectedValues,\n selectedIndices: Array.from(this._selectedSet),\n });\n\n this._announce(`Selected ${label}`);\n }\n\n private _onKeydown(e: KeyboardEvent) {\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault();\n this._moveActive(1);\n break;\n case \"ArrowUp\":\n e.preventDefault();\n this._moveActive(-1);\n break;\n case \"Home\":\n e.preventDefault();\n this._setActive(0);\n break;\n case \"End\":\n e.preventDefault();\n this._setActive(this._items.length - 1);\n break;\n case \"PageDown\":\n e.preventDefault();\n this._moveActive(10);\n break;\n case \"PageUp\":\n e.preventDefault();\n this._moveActive(-10);\n break;\n case \"Enter\":\n case \" \":\n e.preventDefault();\n if (this._activeIndex >= 0) {\n const item = this._items[this._activeIndex];\n this._onSelect(item, this._activeIndex);\n }\n break;\n case \"Escape\":\n e.preventDefault();\n this._emit(\"close\", {});\n break;\n default:\n // Type-ahead buffer\n if (e.key.length === 1 && !e.ctrlKey && !e.altKey && !e.metaKey) {\n this._onType(e.key);\n }\n break;\n }\n }\n\n private _moveActive(delta: number) {\n const next = Math.max(\n 0,\n Math.min(this._items.length - 1, this._activeIndex + delta),\n );\n this._setActive(next);\n }\n\n private _setActive(index: number) {\n this._activeIndex = index;\n this.render();\n this._scrollToActive();\n this._announce(`Navigated to ${String(this._items[index])}`);\n }\n\n private _scrollToActive() {\n const el = this._shadow.getElementById(`option-${this._activeIndex}`);\n el?.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n }\n\n private _onType(char: string) {\n if (this._typeTimeout) window.clearTimeout(this._typeTimeout);\n this._typeBuffer += char.toLowerCase();\n this._typeTimeout = window.setTimeout(() => {\n this._typeBuffer = \"\";\n }, 400);\n\n // Find first matching item\n const match = this._items.findIndex((item) =>\n String(item).toLowerCase().startsWith(this._typeBuffer),\n );\n if (match >= 0) {\n this._setActive(match);\n }\n }\n\n private _announce(msg: string) {\n if (this._liveRegion) {\n this._liveRegion.textContent = msg;\n if (this._announceTimeout) window.clearTimeout(this._announceTimeout);\n this._announceTimeout = window.setTimeout(() => {\n this._announceTimeout = undefined;\n if (this._liveRegion) this._liveRegion.textContent = \"\";\n }, 1000);\n }\n }\n\n // Focus management\n focus() {\n this._listRoot.focus();\n }\n}\n\nif (!customElements.get(\"smilodon-select\")) {\n customElements.define(\"smilodon-select\", NativeSelectElement);\n}\n","/**\n * Global Configuration System for Select Components\n * Allows users to define default behaviors that can be overridden at component level\n */\n\nimport type { KnownLimitationId, LimitationPolicy } from '../types/limitation.js';\n\ntype ScrollToSelectedBehavior = 'auto' | 'instant' | 'smooth';\ntype ScrollToSelectedBlock = 'start' | 'center' | 'end' | 'nearest';\n\nexport interface ScrollToSelectedConfig {\n /** Whether to scroll to selected item when dropdown opens/closes */\n enabled: boolean;\n /** Which selected item to scroll to in multi-select mode: 'first' | 'last' */\n multiSelectTarget: 'first' | 'last';\n /** Scroll behavior */\n behavior?: ScrollToSelectedBehavior;\n /** Scroll block alignment */\n block?: ScrollToSelectedBlock;\n}\n\nexport interface LoadMoreConfig {\n /** Enable load more functionality */\n enabled: boolean;\n /** Number of items to load per increment */\n itemsPerLoad: number;\n /** Threshold (in pixels from bottom) to trigger auto-load */\n threshold?: number;\n /** Show loading indicator */\n showLoader?: boolean;\n}\n\nexport interface BusyBucketConfig {\n /** Enable busy/loading state bucket */\n enabled: boolean;\n /** Show spinner in bucket */\n showSpinner?: boolean;\n /** Custom loading message */\n message?: string;\n /** Minimum display time (ms) to prevent flashing */\n minDisplayTime?: number;\n}\n\nexport interface ExpandableConfig {\n /** Enable expandable dropdown height */\n enabled: boolean;\n /** Height when collapsed (default) */\n collapsedHeight?: string;\n /** Height when expanded */\n expandedHeight?: string;\n /** Label for the expand button */\n expandLabel?: string;\n /** Label for the collapse button */\n collapseLabel?: string;\n}\n\nexport interface DropdownPlacementConfig {\n /** Preferred dropdown placement mode */\n mode: 'bottom' | 'top' | 'auto';\n}\n\nexport type SelectDirection = 'ltr' | 'rtl';\n\nexport interface ClearControlConfig {\n /** Enable clear control button inside input container */\n enabled: boolean;\n /** Clear selected values when button is clicked */\n clearSelection?: boolean;\n /** Clear search query when button is clicked */\n clearSearch?: boolean;\n /** Hide clear control when there is nothing to clear */\n hideWhenEmpty?: boolean;\n /** Accessible label for clear control */\n ariaLabel?: string;\n /** Text/icon content shown inside the clear control */\n icon?: string;\n}\n\nexport interface SelectionConfig {\n /** Single or multi-select mode */\n mode: 'single' | 'multi';\n /** Allow deselection in single-select mode */\n allowDeselect?: boolean;\n /** Control how visually disabled (dimmed) options behave */\n disabledOptionBehavior?: DisabledOptionBehaviorConfig;\n /** Maximum selections in multi-select (0 = unlimited) */\n maxSelections?: number;\n /** Show remove button on selected options in multi-select */\n showRemoveButton?: boolean;\n /** Show the selected-state side indicator on lightweight/custom-rendered options */\n showSelectedIndicator?: boolean;\n /** Custom icon/markup for multi-select remove buttons (chips and selected option remove buttons) */\n removeButtonIcon?: string;\n /** Close dropdown after selection in single-select */\n closeOnSelect?: boolean;\n /** Allow repeated trigger clicks to toggle the dropdown open/closed */\n toggleOnTriggerClick?: boolean;\n}\n\nexport interface DisabledOptionBehaviorConfig {\n /** Allow visually disabled options to be selected */\n selectable?: boolean;\n /** Allow visually disabled options to receive hover styling */\n hoverable?: boolean;\n /** Allow visually disabled options to receive keyboard active/focus styling */\n focusable?: boolean;\n}\n\nexport interface MultiSelectDisplayConfig {\n /** Layout mode for selected chips in multi-select mode */\n mode: 'wrap' | 'vertical' | 'horizontal';\n /** Maximum visible height of the selected-chip area */\n maxHeight?: string;\n /** Horizontal overflow behavior for the chip area */\n overflowX?: 'auto' | 'scroll' | 'hidden';\n /** Vertical overflow behavior for the chip area */\n overflowY?: 'auto' | 'scroll' | 'hidden';\n /** Enable drag-to-scroll interactions in horizontal mode */\n dragScroll?: boolean;\n}\n\n/**\n * Plain CSS style object for component part configuration.\n * Accepts standard CSS properties and custom properties (e.g. `--select-*`).\n */\nexport type StyleObject = Record<string, string | number | undefined>;\n\nexport interface StyleConfig {\n /** Container styles */\n container?: StyleObject;\n /** Dropdown styles */\n dropdown?: StyleObject;\n /** Option item styles */\n option?: StyleObject;\n /** Selected option styles */\n selectedOption?: StyleObject;\n /** Disabled option styles */\n disabledOption?: StyleObject;\n /** Hover option styles */\n hoverOption?: StyleObject;\n /** Active option styles */\n activeOption?: StyleObject;\n /** Selected indicator bar styles for lightweight/custom-rendered options */\n selectedIndicator?: StyleObject;\n /** Input field styles */\n input?: StyleObject;\n /** Multi-select badge styles */\n badge?: StyleObject;\n /** Multi-select badge hover styles */\n badgeHover?: StyleObject;\n /** Multi-select badge active styles */\n badgeActive?: StyleObject;\n /** Multi-select badge label styles */\n badgeLabel?: StyleObject;\n /** Multi-select badge remove button styles */\n badgeRemove?: StyleObject;\n /** Multi-select badge remove icon styles */\n badgeRemoveIcon?: StyleObject;\n /** Multi-select badge remove button hover styles */\n badgeRemoveHover?: StyleObject;\n /** Multi-select badge remove button active styles */\n badgeRemoveActive?: StyleObject;\n /** Group header styles */\n groupHeader?: StyleObject;\n /** Loading indicator styles */\n loader?: StyleObject;\n /** Custom CSS class names */\n classNames?: {\n container?: string;\n dropdown?: string;\n option?: string;\n selectedOption?: string;\n disabledOption?: string;\n activeOption?: string;\n input?: string;\n loader?: string;\n removeButton?: string;\n badge?: string;\n badgeLabel?: string;\n badgeRemove?: string;\n badgeRemoveIcon?: string;\n groupHeader?: string;\n };\n}\n\nexport interface ServerSideConfig {\n /** Enable server-side data management */\n enabled: boolean;\n /** Initial selected value(s) from server */\n initialSelectedValues?: unknown[];\n /** Initial selected indices from server */\n initialSelectedIndices?: number[];\n /** Function to fetch pre-selected items not in current page */\n fetchSelectedItems?: (values: unknown[]) => Promise<unknown[]>;\n /** Value accessor function */\n getValueFromItem?: (item: unknown) => unknown;\n /** Label accessor function */\n getLabelFromItem?: (item: unknown) => string;\n}\n\nexport interface InfiniteScrollConfig {\n /** Enable infinite scroll */\n enabled: boolean;\n /** Page size for pagination */\n pageSize: number;\n /** Initial page */\n initialPage?: number;\n /** Cache loaded pages */\n cachePages?: boolean;\n /** Maximum cached pages (LRU eviction) */\n maxCachedPages?: number;\n /** Preload adjacent pages */\n preloadAdjacent?: boolean;\n /** Scroll restoration strategy for selected items on distant pages */\n scrollRestoration?: 'auto' | 'manual' | 'disabled';\n}\n\nexport interface CallbackConfig {\n /** Called when option is selected/deselected */\n onSelect?: (data: { item: unknown; index: number; value: unknown; label: string; selected: boolean }) => void;\n /** Called when dropdown opens */\n onOpen?: () => void;\n /** Called when dropdown closes */\n onClose?: () => void;\n /** Called when search query changes */\n onSearch?: (query: string) => void;\n /** Called when more items are loaded */\n onLoadMore?: (page: number) => void;\n /** Called when selection changes */\n onChange?: (selectedItems: unknown[], selectedValues: unknown[]) => void;\n /** Called when clear control is used */\n onClear?: (detail: { clearedSelection: boolean; clearedSearch: boolean }) => void;\n /** Called on error */\n onError?: (error: Error) => void;\n}\n\nexport interface TrackingConfig {\n /** Master switch for runtime tracking */\n enabled: boolean;\n /** Track emitted events */\n events: boolean;\n /** Track styling-related changes */\n styling: boolean;\n /** Track limitations and policy changes */\n limitations: boolean;\n /** Emit `diagnostic` events for tracking entries */\n emitDiagnostics: boolean;\n /** Maximum retained entries per tracking channel */\n maxEntries: number;\n}\n\nexport interface LimitationsConfig {\n /** Policy map for known limitations */\n policies: Partial<Record<KnownLimitationId, LimitationPolicy>>;\n /** Auto-reset selection state when mode changes single <-> multi */\n autoMitigateRuntimeModeSwitch: boolean;\n}\n\nexport interface GlobalSelectConfig {\n /** Selection behavior */\n selection: SelectionConfig;\n /** Text and layout direction for the select */\n direction: SelectDirection;\n /** Dropdown placement behavior */\n dropdownPlacement: DropdownPlacementConfig;\n /** Multi-select chip display behavior */\n multiSelectDisplay: MultiSelectDisplayConfig;\n /** Scroll to selected configuration */\n scrollToSelected: ScrollToSelectedConfig;\n /** Load more configuration */\n loadMore: LoadMoreConfig;\n /** Busy bucket configuration */\n busyBucket: BusyBucketConfig;\n /** Style customization */\n styles: StyleConfig;\n /** Server-side configuration */\n serverSide: ServerSideConfig;\n /** Infinite scroll configuration */\n infiniteScroll: InfiniteScrollConfig;\n /** Expandable dropdown configuration */\n expandable: ExpandableConfig;\n /** Clear control button configuration */\n clearControl: ClearControlConfig;\n /** Callbacks */\n callbacks: CallbackConfig;\n /** Runtime tracking controls */\n tracking: TrackingConfig;\n /** Known limitations controls */\n limitations: LimitationsConfig;\n /** Enable/disable entire component */\n enabled: boolean;\n /** Enable search/filter */\n searchable?: boolean;\n /** Placeholder text */\n placeholder?: string;\n /** Legacy chunked rendering toggle for large flat EnhancedSelect lists; not viewport windowing. */\n virtualize?: boolean;\n /** Estimated row height used by the guarded EnhancedSelect viewport-windowing test path. */\n estimatedItemHeight?: number;\n}\n\n/**\n * Default global configuration\n */\nconst defaultConfig: GlobalSelectConfig = {\n selection: {\n mode: 'single',\n allowDeselect: false,\n disabledOptionBehavior: {\n selectable: false,\n hoverable: false,\n focusable: false,\n },\n maxSelections: 0,\n showRemoveButton: true,\n showSelectedIndicator: true,\n removeButtonIcon: '×',\n closeOnSelect: true,\n toggleOnTriggerClick: true,\n },\n direction: 'ltr',\n dropdownPlacement: {\n mode: 'bottom',\n },\n multiSelectDisplay: {\n mode: 'wrap',\n maxHeight: '160px',\n overflowX: 'hidden',\n overflowY: 'auto',\n dragScroll: true,\n },\n scrollToSelected: {\n enabled: true,\n multiSelectTarget: 'first',\n behavior: 'smooth',\n block: 'nearest',\n },\n loadMore: {\n enabled: false,\n itemsPerLoad: 3,\n threshold: 100,\n showLoader: true,\n },\n busyBucket: {\n enabled: true,\n showSpinner: true,\n message: 'Loading...',\n minDisplayTime: 200,\n },\n styles: {\n classNames: {},\n },\n serverSide: {\n enabled: false,\n getValueFromItem: (item: unknown) => (item as any)?.value ?? item,\n getLabelFromItem: (item: unknown) => (item as any)?.label ?? String(item),\n },\n infiniteScroll: {\n enabled: false,\n pageSize: 20,\n initialPage: 1,\n cachePages: true,\n maxCachedPages: 10,\n preloadAdjacent: true,\n scrollRestoration: 'auto',\n },\n expandable: {\n enabled: false,\n collapsedHeight: '300px',\n expandedHeight: '500px',\n expandLabel: 'Show more',\n collapseLabel: 'Show less',\n },\n clearControl: {\n enabled: false,\n clearSelection: true,\n clearSearch: true,\n hideWhenEmpty: true,\n ariaLabel: 'Clear selection and search',\n icon: '×',\n },\n callbacks: {},\n tracking: {\n enabled: false,\n events: true,\n styling: true,\n limitations: true,\n emitDiagnostics: false,\n maxEntries: 200,\n },\n limitations: {\n policies: {},\n autoMitigateRuntimeModeSwitch: true,\n },\n enabled: true,\n searchable: false,\n placeholder: 'Select an option...',\n virtualize: true,\n estimatedItemHeight: 48,\n};\n\n/**\n * Global configuration instance\n */\nclass SelectConfigManager {\n private config: GlobalSelectConfig;\n\n constructor() {\n this.config = this.deepClone(defaultConfig);\n }\n\n /**\n * Get current global configuration\n */\n getConfig(): Readonly<GlobalSelectConfig> {\n return this.config;\n }\n\n /**\n * Update global configuration (deep merge)\n */\n updateConfig(updates: Partial<GlobalSelectConfig>): void {\n this.config = this.deepMerge(this.config, updates);\n }\n\n /**\n * Reset to default configuration\n */\n resetConfig(): void {\n this.config = this.deepClone(defaultConfig);\n }\n\n /**\n * Merge component-level config with global config\n * Component-level config takes precedence\n */\n mergeWithComponentConfig(componentConfig: Partial<GlobalSelectConfig>): GlobalSelectConfig {\n return this.deepMerge(this.deepClone(this.config), componentConfig);\n }\n\n private deepClone<T>(obj: T): T {\n return JSON.parse(JSON.stringify(obj));\n }\n\n private deepMerge<T extends Record<string, any>>(target: T, source: Partial<T>): T {\n const result: any = { ...target };\n \n // PERF: Avoid for...in, use Object.keys for predictable iteration\n const keys = Object.keys(source);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n const sourceValue = (source as any)[key];\n const targetValue = result[key];\n \n if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {\n result[key] = this.deepMerge(\n targetValue && typeof targetValue === 'object' ? targetValue : {},\n sourceValue\n );\n } else {\n result[key] = sourceValue;\n }\n }\n }\n \n return result as T;\n }\n}\n\n/**\n * Singleton instance\n */\nexport const selectConfig = new SelectConfigManager();\n\n/**\n * Helper function to configure select globally\n */\nexport function configureSelect(config: Partial<GlobalSelectConfig>): void {\n selectConfig.updateConfig(config);\n}\n\n/**\n * Helper function to reset select configuration\n */\nexport function resetSelectConfig(): void {\n selectConfig.resetConfig();\n}\n","import type {\n DataLoadingConfigIssue,\n DataLoadingConfigValidationResult,\n ResolvedDataLoadingConfig,\n} from './public-types.js';\n\nconst DEFAULT_CONFIG: ResolvedDataLoadingConfig = {\n protocol: 'legacy',\n searchMode: 'local',\n paginationMode: 'page',\n firstPage: 1,\n};\n\nconst ALLOWED_FIELDS = new Set([\n 'protocol',\n 'searchMode',\n 'paginationMode',\n 'firstPage',\n 'fetchLimit',\n]);\n\nfunction issue(path: string, code: DataLoadingConfigIssue['code'], message: string): DataLoadingConfigIssue {\n return { path, code, message };\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return false;\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\nfunction validatePositiveSafeInteger(\n candidate: Record<string, unknown>,\n key: 'firstPage' | 'fetchLimit',\n issues: DataLoadingConfigIssue[],\n): void {\n const value = candidate[key];\n if (value === undefined) return;\n if (typeof value !== 'number') {\n issues.push(issue(key, 'invalid-type', `${key} must be a number.`));\n return;\n }\n if (!Number.isSafeInteger(value) || value <= 0) {\n issues.push(issue(key, 'invalid-positive-integer', `${key} must be a positive safe integer.`));\n }\n}\n\n/** Validate a complete effective per-instance data-loading configuration. */\nexport function validateDataLoadingConfig(candidate: unknown): DataLoadingConfigValidationResult {\n if (!isRecord(candidate)) {\n return {\n valid: false,\n issues: [issue('dataLoading', 'invalid-type', 'dataLoading must be a plain object.')],\n };\n }\n\n const issues: DataLoadingConfigIssue[] = [];\n for (const key of Object.keys(candidate).filter((candidateKey) => !ALLOWED_FIELDS.has(candidateKey)).sort()) {\n issues.push(issue(key, 'unknown-field', `Unknown dataLoading field: ${key}.`));\n }\n\n const protocolValue = candidate.protocol;\n const protocol = protocolValue === undefined ? DEFAULT_CONFIG.protocol : protocolValue;\n if (typeof protocol !== 'string') {\n issues.push(issue('protocol', 'invalid-type', 'protocol must be a string.'));\n } else if (protocol !== 'legacy' && protocol !== 'acknowledged') {\n issues.push(issue('protocol', 'invalid-value', 'protocol must be legacy or acknowledged.'));\n }\n\n const searchModeValue = candidate.searchMode;\n const searchMode = searchModeValue === undefined ? DEFAULT_CONFIG.searchMode : searchModeValue;\n if (typeof searchMode !== 'string') {\n issues.push(issue('searchMode', 'invalid-type', 'searchMode must be a string.'));\n } else if (searchMode !== 'local' && searchMode !== 'remote' && searchMode !== 'hybrid') {\n issues.push(issue('searchMode', 'invalid-value', 'searchMode must be local, remote, or hybrid.'));\n }\n\n const paginationModeValue = candidate.paginationMode;\n const paginationMode = paginationModeValue === undefined ? DEFAULT_CONFIG.paginationMode : paginationModeValue;\n if (typeof paginationMode !== 'string') {\n issues.push(issue('paginationMode', 'invalid-type', 'paginationMode must be a string.'));\n } else if (paginationMode !== 'page' && paginationMode !== 'cursor') {\n issues.push(issue('paginationMode', 'invalid-value', 'paginationMode must be page or cursor.'));\n }\n\n validatePositiveSafeInteger(candidate, 'firstPage', issues);\n validatePositiveSafeInteger(candidate, 'fetchLimit', issues);\n\n if (protocol === 'legacy' && (searchMode === 'remote' || searchMode === 'hybrid')) {\n issues.push(issue('searchMode', 'requires-acknowledged-protocol', 'Remote and hybrid search require the acknowledged protocol.'));\n }\n if (protocol === 'legacy' && paginationMode === 'cursor') {\n issues.push(issue('paginationMode', 'requires-acknowledged-protocol', 'Cursor pagination requires the acknowledged protocol.'));\n }\n\n if (issues.length > 0) return { valid: false, issues };\n\n const resolved: ResolvedDataLoadingConfig = {\n protocol: protocol as ResolvedDataLoadingConfig['protocol'],\n searchMode: searchMode as ResolvedDataLoadingConfig['searchMode'],\n paginationMode: paginationMode as ResolvedDataLoadingConfig['paginationMode'],\n firstPage: candidate.firstPage === undefined ? DEFAULT_CONFIG.firstPage : candidate.firstPage as number,\n ...(candidate.fetchLimit === undefined ? {} : { fetchLimit: candidate.fetchLimit as number }),\n };\n\n return { valid: true, value: resolved };\n}\n","/**\n * Pure identity and viewport helpers for virtualization. This module models\n * logical keys and caller-supplied render state; it never inspects the DOM.\n */\nexport interface VirtualizationScope<TKey> {\n dataKeys: readonly TKey[];\n filteredKeys: readonly TKey[];\n registeredKeys: readonly TKey[];\n windowKeys: readonly TKey[];\n mountedKeys: readonly TKey[];\n selectedKeys: ReadonlySet<TKey>;\n activeKey: TKey | null;\n}\n\nexport type VirtualizationScopeViolation =\n | 'filtered-key-missing-from-data'\n | 'registered-key-not-filtered'\n | 'viewport-key-not-filtered'\n | 'mounted-key-not-in-viewport';\n\nexport type AriaActiveDescendantEligibility<TKey> =\n | { available: true; key: TKey; optionId: string }\n | { available: false; key: TKey | null; optionId: null };\n\nexport interface ScrollToKeyIntent<TKey> {\n type: 'SCROLL_TO_KEY';\n key: TKey;\n}\n\nexport interface ScrollToIndexIntent<TGeneration extends string | number> {\n type: 'SCROLL_TO_INDEX';\n index: number;\n dataGeneration: TGeneration;\n}\n\n/** Returns whether a selected key remains in the filtered result set. */\nexport function isSelectedKeyVisible<TKey>(\n scope: VirtualizationScope<TKey>,\n key: TKey,\n): boolean {\n return scope.selectedKeys.has(key) && scope.filteredKeys.includes(key);\n}\n\n/** True only when the authoritative active key has a currently mounted target. */\nexport function isActiveKeyMounted<TKey>(scope: VirtualizationScope<TKey>): boolean {\n return scope.activeKey !== null && scope.mountedKeys.includes(scope.activeKey);\n}\n\n/**\n * Produces active-descendant eligibility from mounted keys and caller-provided\n * IDs. A registered or windowed key alone is not a mounted DOM target.\n */\nexport function getAriaActiveDescendantEligibility<TKey>(\n scope: VirtualizationScope<TKey>,\n optionIds: ReadonlyMap<TKey, string>,\n): AriaActiveDescendantEligibility<TKey> {\n const key = scope.activeKey;\n const optionId = key === null || !scope.mountedKeys.includes(key) ? undefined : optionIds.get(key);\n\n if (key !== null && optionId?.trim()) {\n return { available: true, key, optionId };\n }\n\n return { available: false, key, optionId: null };\n}\n\n/** Copies selected identity without pruning keys absent from the current viewport. */\nexport function preserveSelectionAcrossWindow<TKey>(\n selectedKeys: ReadonlySet<TKey>,\n _windowKeys: readonly TKey[],\n): Set<TKey> {\n return new Set(selectedKeys);\n}\n\n/** Resolves the key's current index, so reorder never reuses a stale index. */\nexport function resolveKeyIndex<TKey>(keys: readonly TKey[], key: TKey): number {\n return keys.indexOf(key);\n}\n\n/**\n * Returns keys in the half-open index range [startIndex, endIndex), clamped to\n * the source. Bounds are truncated to integers; an end before start is empty.\n */\nexport function computeWindowKeys<TKey>(\n filteredKeys: readonly TKey[],\n startIndex: number,\n endIndex: number,\n): TKey[] {\n const start = Math.max(0, Math.min(filteredKeys.length, Math.trunc(startIndex)));\n const end = Math.max(start, Math.min(filteredKeys.length, Math.trunc(endIndex)));\n return filteredKeys.slice(start, end);\n}\n\n/** Creates a DOM-free request to bring a stable key into the rendered range. */\nexport function createScrollToKeyIntent<TKey>(key: TKey): ScrollToKeyIntent<TKey> {\n return { type: 'SCROLL_TO_KEY', key };\n}\n\n/** Creates an index request tied to the data generation that defined it. */\nexport function createScrollToIndexIntent<TGeneration extends string | number>(\n index: number,\n dataGeneration: TGeneration,\n): ScrollToIndexIntent<TGeneration> {\n return { type: 'SCROLL_TO_INDEX', index, dataGeneration };\n}\n\n/** Lists violated subset relationships without changing the supplied scope. */\nexport function getVirtualizationScopeViolations<TKey>(\n scope: VirtualizationScope<TKey>,\n): VirtualizationScopeViolation[] {\n const dataKeys = new Set(scope.dataKeys);\n const filteredKeys = new Set(scope.filteredKeys);\n const windowKeys = new Set(scope.windowKeys);\n const violations: VirtualizationScopeViolation[] = [];\n\n if (scope.filteredKeys.some((key) => !dataKeys.has(key))) {\n violations.push('filtered-key-missing-from-data');\n }\n if (scope.registeredKeys.some((key) => !filteredKeys.has(key))) {\n violations.push('registered-key-not-filtered');\n }\n if (scope.windowKeys.some((key) => !filteredKeys.has(key))) {\n violations.push('viewport-key-not-filtered');\n }\n if (scope.mountedKeys.some((key) => !windowKeys.has(key))) {\n violations.push('mounted-key-not-in-viewport');\n }\n\n return violations;\n}\n","import type { SelectKey } from './contracts.js';\nimport type { SelectState } from './select-state.js';\n\nexport type AccessibilityPopupRole = 'listbox';\n\nexport interface AccessibilityLabelState {\n labelId?: string | null;\n labelledBy?: readonly string[];\n describedBy?: readonly string[];\n ariaLabel?: string | null;\n ariaDescription?: string | null;\n}\n\nexport interface AccessibilityValidationState {\n required: boolean;\n invalid: boolean;\n errorMessage?: string | null;\n errorDescriptionId?: string | null;\n}\n\nexport interface AccessibilityComboboxState<TKey extends SelectKey = SelectKey> {\n expanded: boolean;\n disabled: boolean;\n readonly: boolean;\n searchable: boolean;\n multiple: boolean;\n required: boolean;\n invalid: boolean;\n busy: boolean;\n activeKey: TKey | null;\n selectedKeys: ReadonlySet<TKey>;\n disabledKeys: ReadonlySet<TKey>;\n popupRole: AccessibilityPopupRole;\n label: AccessibilityLabelState;\n validation: AccessibilityValidationState;\n}\n\nexport interface ComboboxAccessibilityIntent<TKey extends SelectKey = SelectKey> {\n role: 'combobox';\n expanded: boolean;\n disabled: boolean;\n readonly: boolean;\n autocomplete: 'none' | 'list';\n multiple: boolean;\n required: boolean;\n invalid: boolean;\n activeKey: TKey | null;\n controlsId: string | null;\n labelledBy: readonly string[];\n describedBy: readonly string[];\n ariaLabel: string | null;\n ariaDescription: string | null;\n}\n\nexport interface ListboxAccessibilityIntent {\n role: AccessibilityPopupRole;\n multiple: boolean;\n busy: boolean;\n labelledBy: readonly string[];\n ariaLabel: string | null;\n}\n\nexport interface OptionAccessibilityIntent<TKey extends SelectKey = SelectKey> {\n key: TKey;\n selected: boolean;\n disabled: boolean;\n active: boolean;\n}\n\nexport interface AccessibilityAnnouncementIntent {\n politeness: 'polite' | 'assertive';\n message: string;\n}\n\nexport interface AccessibilityFocusIntent {\n target: 'input' | 'clear-button' | 'active-option' | 'none';\n reason: string;\n}\n\nexport type AccessibilityEffect<TKey extends SelectKey = SelectKey> =\n | (ComboboxAccessibilityIntent<TKey> & { type: 'SYNC_COMBOBOX_ARIA' })\n | (ListboxAccessibilityIntent & { type: 'SYNC_LISTBOX_ARIA' })\n | (OptionAccessibilityIntent<TKey> & { type: 'SYNC_OPTION_ARIA' })\n | ({ type: 'ANNOUNCE' } & AccessibilityAnnouncementIntent)\n | ({ type: 'FOCUS_INTENT' } & AccessibilityFocusIntent);\n\nexport interface AccessibilityEffectOptions<TKey extends SelectKey = SelectKey> {\n /** A caller-provided target ID; the engine never generates DOM IDs. */\n controlsId?: string | null;\n /** Keys of options the caller wants accessibility intent for. */\n optionKeys: readonly TKey[];\n announcements?: readonly AccessibilityAnnouncementIntent[];\n focusIntents?: readonly AccessibilityFocusIntent[];\n}\n\nexport interface AccessibilityStateContext {\n readonly?: boolean;\n searchable?: boolean;\n invalid?: boolean;\n label?: AccessibilityLabelState;\n errorMessage?: string | null;\n errorDescriptionId?: string | null;\n}\n\n/** Projects existing engine state into accessibility semantics without DOM data. */\nexport function deriveAccessibilityState<TKey extends SelectKey>(\n state: SelectState<TKey>,\n context: AccessibilityStateContext = {},\n): AccessibilityComboboxState<TKey> {\n const required = state.selection.required;\n const invalid = context.invalid ?? false;\n\n return {\n expanded: state.popup === 'open',\n disabled: state.disabled,\n readonly: context.readonly ?? false,\n searchable: context.searchable ?? false,\n multiple: state.selection.multiple,\n required,\n invalid,\n busy: state.dataStatus === 'loading',\n activeKey: state.activeKey,\n selectedKeys: state.selectedKeys,\n disabledKeys: state.selection.disabledKeys,\n popupRole: 'listbox',\n label: context.label ?? {},\n validation: {\n required,\n invalid,\n errorMessage: context.errorMessage ?? null,\n errorDescriptionId: context.errorDescriptionId ?? null,\n },\n };\n}\n\nfunction uniqueIds(ids: readonly (string | null | undefined)[]): string[] {\n return [...new Set(ids.filter((id): id is string => Boolean(id)))];\n}\n\nfunction getLabelledBy(label: AccessibilityLabelState): string[] {\n return uniqueIds([label.labelId, ...(label.labelledBy ?? [])]);\n}\n\nfunction getDescribedBy<TKey extends SelectKey>(state: AccessibilityComboboxState<TKey>): string[] {\n return uniqueIds([\n ...(state.label.describedBy ?? []),\n state.validation.errorDescriptionId,\n ]);\n}\n\n/** Computes combobox semantics without reading from or writing to the DOM. */\nexport function computeComboboxAccessibility<TKey extends SelectKey>(\n state: AccessibilityComboboxState<TKey>,\n controlsId: string | null = null,\n): ComboboxAccessibilityIntent<TKey> {\n return {\n role: 'combobox',\n expanded: state.expanded,\n disabled: state.disabled,\n readonly: state.readonly,\n autocomplete: state.searchable ? 'list' : 'none',\n multiple: state.multiple,\n required: state.required,\n invalid: state.invalid,\n activeKey: state.activeKey,\n controlsId,\n labelledBy: getLabelledBy(state.label),\n describedBy: getDescribedBy(state),\n ariaLabel: state.label.ariaLabel ?? null,\n ariaDescription: state.label.ariaDescription ?? null,\n };\n}\n\n/** Computes listbox semantics; the supplied label IDs remain caller-owned data. */\nexport function computeListboxAccessibility<TKey extends SelectKey>(\n state: AccessibilityComboboxState<TKey>,\n): ListboxAccessibilityIntent {\n return {\n role: state.popupRole,\n multiple: state.multiple,\n busy: state.busy,\n labelledBy: getLabelledBy(state.label),\n ariaLabel: state.label.ariaLabel ?? null,\n };\n}\n\n/** Computes one option's semantic state from stable identity, never its index. */\nexport function computeOptionAccessibility<TKey extends SelectKey>(\n state: AccessibilityComboboxState<TKey>,\n key: TKey,\n): OptionAccessibilityIntent<TKey> {\n const disabled = state.disabled || state.disabledKeys.has(key);\n return {\n key,\n selected: state.selectedKeys.has(key),\n disabled,\n active: !disabled && state.activeKey === key,\n };\n}\n\n/**\n * Produces semantic accessibility effects. IDs and rendered option keys are\n * caller inputs; this function does not inspect the DOM or perform side effects.\n */\nexport function computeAccessibilityEffects<TKey extends SelectKey>(\n state: AccessibilityComboboxState<TKey>,\n options: AccessibilityEffectOptions<TKey>,\n): AccessibilityEffect<TKey>[] {\n return [\n {\n type: 'SYNC_COMBOBOX_ARIA',\n ...computeComboboxAccessibility(state, options.controlsId ?? null),\n },\n {\n type: 'SYNC_LISTBOX_ARIA',\n ...computeListboxAccessibility(state),\n },\n ...options.optionKeys.map((key): AccessibilityEffect<TKey> => ({\n type: 'SYNC_OPTION_ARIA',\n ...computeOptionAccessibility(state, key),\n })),\n ...(options.announcements ?? []).map((announcement): AccessibilityEffect<TKey> => ({\n type: 'ANNOUNCE',\n ...announcement,\n })),\n ...(options.focusIntents ?? []).map((focusIntent): AccessibilityEffect<TKey> => ({\n type: 'FOCUS_INTENT',\n ...focusIntent,\n })),\n ];\n}\n","import type { SelectKey } from '../../engine/contracts.js';\nimport type { AccessibilityEffect } from '../../engine/accessibility.js';\n\nexport interface WebAccessibilityTargets<TKey extends SelectKey = SelectKey> {\n combobox?: HTMLElement | null;\n listbox?: HTMLElement | null;\n getOptionByKey?: (key: TKey) => HTMLElement | null;\n liveRegion?: HTMLElement | null;\n focusTargets?: {\n input?: HTMLElement | null;\n clearButton?: HTMLElement | null;\n getActiveOption?: () => HTMLElement | null;\n };\n}\n\nexport interface ApplyAccessibilityEffectOptions {\n /** Focus is opt-in so applying semantic state does not add focus behavior. */\n applyFocus?: boolean;\n}\n\nfunction setBooleanAttribute(element: HTMLElement, name: string, value: boolean): void {\n element.setAttribute(name, String(value));\n}\n\nfunction setOptionalAttribute(element: HTMLElement, name: string, value: string | null): void {\n if (value) {\n element.setAttribute(name, value);\n } else {\n element.removeAttribute(name);\n }\n}\n\nfunction setIdListAttribute(element: HTMLElement, name: string, ids: readonly string[]): void {\n setOptionalAttribute(element, name, ids.length > 0 ? ids.join(' ') : null);\n}\n\nfunction applyCombobox<TKey extends SelectKey>(\n effect: Extract<AccessibilityEffect<TKey>, { type: 'SYNC_COMBOBOX_ARIA' }>,\n targets: WebAccessibilityTargets<TKey>,\n): void {\n const combobox = targets.combobox;\n if (!combobox) return;\n\n combobox.setAttribute('role', effect.role);\n setBooleanAttribute(combobox, 'aria-expanded', effect.expanded);\n setBooleanAttribute(combobox, 'aria-disabled', effect.disabled);\n setBooleanAttribute(combobox, 'aria-readonly', effect.readonly);\n setBooleanAttribute(combobox, 'aria-required', effect.required);\n setBooleanAttribute(combobox, 'aria-invalid', effect.invalid);\n combobox.setAttribute('aria-autocomplete', effect.autocomplete);\n setOptionalAttribute(combobox, 'aria-controls', effect.controlsId);\n setIdListAttribute(combobox, 'aria-labelledby', effect.labelledBy);\n setIdListAttribute(combobox, 'aria-describedby', effect.describedBy);\n setOptionalAttribute(combobox, 'aria-label', effect.ariaLabel);\n setOptionalAttribute(combobox, 'aria-description', effect.ariaDescription);\n\n const activeOption = effect.activeKey == null\n ? null\n : targets.getOptionByKey?.(effect.activeKey) ?? null;\n setOptionalAttribute(combobox, 'aria-activedescendant', activeOption?.id || null);\n}\n\nfunction applyListbox<TKey extends SelectKey>(\n effect: Extract<AccessibilityEffect<TKey>, { type: 'SYNC_LISTBOX_ARIA' }>,\n targets: WebAccessibilityTargets<TKey>,\n): void {\n const listbox = targets.listbox;\n if (!listbox) return;\n\n listbox.setAttribute('role', effect.role);\n if (effect.multiple) listbox.setAttribute('aria-multiselectable', 'true');\n else listbox.removeAttribute('aria-multiselectable');\n if (effect.busy) listbox.setAttribute('aria-busy', 'true');\n else listbox.removeAttribute('aria-busy');\n setIdListAttribute(listbox, 'aria-labelledby', effect.labelledBy);\n setOptionalAttribute(listbox, 'aria-label', effect.ariaLabel);\n}\n\nfunction applyOption<TKey extends SelectKey>(\n effect: Extract<AccessibilityEffect<TKey>, { type: 'SYNC_OPTION_ARIA' }>,\n targets: WebAccessibilityTargets<TKey>,\n): void {\n const option = targets.getOptionByKey?.(effect.key);\n if (!option) return;\n\n option.setAttribute('role', 'option');\n setBooleanAttribute(option, 'aria-selected', effect.selected);\n if (effect.disabled) option.setAttribute('aria-disabled', 'true');\n else option.removeAttribute('aria-disabled');\n}\n\nfunction applyFocusIntent<TKey extends SelectKey>(\n target: 'input' | 'clear-button' | 'active-option' | 'none',\n targets: WebAccessibilityTargets<TKey>,\n options: ApplyAccessibilityEffectOptions,\n): void {\n if (!options.applyFocus || target === 'none') return;\n\n const focusTarget = target === 'input'\n ? targets.focusTargets?.input\n : target === 'clear-button'\n ? targets.focusTargets?.clearButton\n : targets.focusTargets?.getActiveOption?.();\n focusTarget?.focus();\n}\n\n/** Applies engine accessibility effects to caller-owned web DOM targets. */\nexport function applyAccessibilityEffects<TKey extends SelectKey>(\n effects: readonly AccessibilityEffect<TKey>[],\n targets: WebAccessibilityTargets<TKey>,\n options: ApplyAccessibilityEffectOptions = {},\n): void {\n for (const effect of effects) {\n switch (effect.type) {\n case 'SYNC_COMBOBOX_ARIA':\n applyCombobox(effect, targets);\n break;\n case 'SYNC_LISTBOX_ARIA':\n applyListbox(effect, targets);\n break;\n case 'SYNC_OPTION_ARIA':\n applyOption(effect, targets);\n break;\n case 'ANNOUNCE':\n if (targets.liveRegion) {\n targets.liveRegion.setAttribute('aria-live', effect.politeness);\n targets.liveRegion.setAttribute('aria-atomic', 'true');\n targets.liveRegion.textContent = effect.message;\n }\n break;\n case 'FOCUS_INTENT':\n applyFocusIntent(effect.target, targets, options);\n break;\n }\n }\n}\n","/**\n * Independent Option Component\n * High cohesion, low coupling - handles its own selection state and events\n */\n\nimport type { DisabledOptionBehaviorConfig } from '../config/global-config.js';\nimport { ClassMap } from '../types.js';\n\nexport interface OptionConfig {\n /** The data item this option represents */\n item: unknown;\n /** The index of this option */\n index: number;\n /** Optional custom id for aria-activedescendant */\n id?: string;\n /** Whether this option is selected */\n selected: boolean;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Behavior overrides for visually disabled options */\n disabledBehavior?: DisabledOptionBehaviorConfig;\n /** Whether this option is focused/active */\n active?: boolean;\n /** Custom value accessor */\n getValue?: (item: unknown) => unknown;\n /** Custom label accessor */\n getLabel?: (item: unknown) => string;\n /** Custom renderer */\n render?: (item: unknown, index: number) => HTMLElement | string;\n /** Custom style */\n style?: Record<string, string | number | undefined>;\n /** Custom class names */\n className?: string;\n /** Class map for state classes */\n classMap?: ClassMap;\n /** Show remove button (for multi-select) */\n showRemoveButton?: boolean;\n /** Custom icon/markup for the remove button */\n removeButtonIcon?: string;\n}\n\nexport interface OptionEventDetail {\n item: unknown;\n index: number;\n value: unknown;\n label: string;\n selected: boolean;\n}\n\nexport class SelectOption extends HTMLElement {\n private _config: OptionConfig;\n private _shadow: ShadowRoot;\n private _container: HTMLElement;\n private _removeButton?: HTMLButtonElement;\n private _hasRendered = false;\n\n constructor(config: OptionConfig) {\n super();\n this._config = config;\n this._shadow = this.attachShadow({ mode: 'open' });\n this._container = document.createElement('div');\n this._container.className = 'option-container';\n \n this._initializeStyles();\n // NOTE: _render() moved to connectedCallback to comply with Web Components spec\n // (cannot mutate host element attributes/classes in constructor)\n this._attachEventListeners();\n \n this._shadow.appendChild(this._container);\n }\n\n connectedCallback(): void {\n this._ensureRendered();\n }\n\n private _ensureRendered(): void {\n if (this._hasRendered) return;\n this._render();\n this._hasRendered = true;\n }\n\n /**\n * Ensure option content is rendered. Called by EnhancedSelect after append\n * when connectedCallback timing is unreliable (Vue/Nuxt, jsdom, Teleport).\n */\n ensureRendered(): void {\n this._ensureRendered();\n }\n\n private _initializeStyles(): void {\n const style = document.createElement('style');\n style.textContent = `\n :host {\n display: block;\n position: relative;\n font: inherit;\n color: var(--select-option-color, var(--select-text-color, #1f2937));\n background: var(--select-option-bg, var(--select-dropdown-bg, var(--select-bg, white)));\n border: var(--select-option-border, none);\n border-bottom: var(--select-option-border-bottom, none);\n border-radius: var(--select-option-border-radius, var(--select-radius-sm, 6px));\n box-shadow: var(--select-option-shadow, none);\n transform: var(--select-option-transform, none);\n transition: var(--select-option-transition, background-color 0.2s ease);\n }\n\n :host(:hover):not(.smilodon-option--disabled):not([aria-disabled=\"true\"]),\n :host(.smilodon-option--disabled-hoverable:hover) {\n background: var(--select-option-hover-bg, #f0f0f0);\n color: var(--select-option-hover-color, var(--select-option-color, var(--select-text-color, #1f2937)));\n border: var(--select-option-hover-border, var(--select-option-border, none));\n border-bottom: var(--select-option-hover-border-bottom, var(--select-option-border-bottom, none));\n box-shadow: var(--select-option-hover-shadow, var(--select-option-shadow, none));\n transform: var(--select-option-hover-transform, var(--select-option-transform, none));\n }\n\n /* Keep the visual surface on the host so external utility classes applied\n through classMap can override selected/active/disabled styles in both\n light and dark themes. */\n :host([aria-selected=\"true\"]),\n :host(.smilodon-option--selected) {\n background: var(--select-option-selected-bg, #e3f2fd);\n color: var(--select-option-selected-color, #1976d2);\n border: var(--select-option-selected-border, var(--select-option-border, none));\n border-bottom: var(--select-option-selected-border-bottom, var(--select-option-border-bottom, none));\n border-radius: var(--select-option-selected-border-radius, var(--select-option-border-radius, 0));\n box-shadow: var(--select-option-selected-shadow, var(--select-option-shadow, none));\n transform: var(--select-option-selected-transform, var(--select-option-transform, none));\n }\n\n :host([aria-selected=\"true\"]:hover),\n :host(.smilodon-option--selected:hover) {\n background: var(--select-option-selected-hover-bg, var(--select-option-selected-bg, #e3f2fd));\n color: var(--select-option-selected-hover-color, var(--select-option-selected-color, #1976d2));\n border: var(--select-option-selected-hover-border, var(--select-option-selected-border, var(--select-option-border, none)));\n border-bottom: var(--select-option-selected-hover-border-bottom, var(--select-option-selected-border-bottom, var(--select-option-border-bottom, none)));\n box-shadow: var(--select-option-selected-hover-shadow, var(--select-option-selected-shadow, var(--select-option-shadow, none)));\n transform: var(--select-option-selected-hover-transform, var(--select-option-selected-transform, var(--select-option-transform, none)));\n }\n\n :host(.smilodon-option--active):not(.smilodon-option--disabled):not([aria-disabled=\"true\"]),\n :host(.smilodon-option--active.smilodon-option--disabled-focusable) {\n background: var(--select-option-active-bg, var(--select-option-hover-bg, #f0f0f0));\n color: var(--select-option-active-color, var(--select-option-hover-color, var(--select-option-color, var(--select-text-color, #1f2937))));\n border: var(--select-option-active-border, var(--select-option-hover-border, var(--select-option-border, none)));\n box-shadow: var(--select-option-active-shadow, var(--select-option-shadow, none));\n transform: var(--select-option-active-transform, var(--select-option-transform, none));\n outline: var(--select-option-active-outline, none);\n outline-offset: var(--select-option-active-outline-offset, -2px);\n }\n\n :host(.smilodon-option--disabled),\n :host([aria-disabled=\"true\"]) {\n background: var(--select-option-disabled-bg, var(--select-option-bg, var(--select-dropdown-bg, var(--select-bg, white))));\n color: var(--select-option-disabled-color, var(--select-option-color, var(--select-text-color, #1f2937)));\n border: var(--select-option-disabled-border, var(--select-option-border, none));\n border-bottom: var(--select-option-disabled-border-bottom, var(--select-option-border-bottom, none));\n opacity: var(--select-option-disabled-opacity, 0.5);\n cursor: var(--select-option-disabled-cursor, not-allowed);\n pointer-events: none;\n }\n\n :host(.smilodon-option--disabled-interactive) {\n pointer-events: auto;\n }\n \n .option-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--select-option-padding, 10px 14px);\n cursor: pointer;\n user-select: none;\n color: inherit;\n background: inherit;\n transition: inherit;\n border: inherit;\n border-bottom: inherit;\n border-radius: inherit;\n box-shadow: inherit;\n transform: inherit;\n font: inherit;\n }\n \n .option-container:hover {\n background: inherit;\n color: inherit;\n border: inherit;\n border-bottom: inherit;\n box-shadow: inherit;\n transform: inherit;\n }\n \n .option-container.selected {\n background: inherit;\n color: inherit;\n border: inherit;\n border-bottom: inherit;\n border-radius: inherit;\n box-shadow: inherit;\n transform: inherit;\n }\n\n .option-container.selected:hover {\n background: inherit;\n color: inherit;\n border: inherit;\n border-bottom: inherit;\n box-shadow: inherit;\n transform: inherit;\n }\n \n .option-container.active:not(.disabled) {\n background: inherit;\n color: inherit;\n border: inherit;\n box-shadow: inherit;\n transform: inherit;\n outline: none;\n outline-offset: 0;\n }\n \n .option-container.disabled {\n background: inherit;\n color: inherit;\n border: inherit;\n border-bottom: inherit;\n opacity: inherit;\n cursor: inherit;\n pointer-events: none;\n }\n \n .option-content {\n flex: 1;\n overflow: var(--select-option-content-overflow, hidden);\n text-overflow: var(--select-option-content-text-overflow, ellipsis);\n white-space: var(--select-option-content-white-space, nowrap);\n }\n\n .checkmark-icon {\n display: none;\n margin-left: var(--select-checkmark-margin-left, 8px);\n color: var(--select-checkmark-color, currentColor);\n }\n\n :host([dir=\"rtl\"]) .checkmark-icon,\n :host-context([dir=\"rtl\"]) .checkmark-icon {\n margin-left: 0;\n margin-right: var(--select-checkmark-margin-left, 8px);\n }\n\n :host([aria-selected=\"true\"]) .checkmark-icon,\n .option-container.selected .checkmark-icon {\n display: inline-flex;\n }\n \n .remove-button {\n margin-left: 8px;\n width: var(--select-badge-remove-size, 18px);\n height: var(--select-badge-remove-size, 18px);\n min-width: var(--select-badge-remove-min-width, var(--select-badge-remove-size, 18px));\n min-height: var(--select-badge-remove-min-height, var(--select-badge-remove-size, 18px));\n padding: 0;\n border: none;\n background-color: var(--select-badge-remove-bg, rgba(255, 255, 255, 0.2));\n color: var(--select-badge-remove-color, currentColor);\n cursor: pointer;\n border-radius: var(--select-badge-remove-radius, 50%);\n font-size: var(--select-badge-remove-font-size, 0.7333em);\n font-weight: var(--select-badge-remove-font-weight, 600);\n line-height: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n }\n\n :host([dir=\"rtl\"]) .remove-button,\n :host-context([dir=\"rtl\"]) .remove-button {\n margin-left: 0;\n margin-right: 8px;\n }\n\n .remove-button-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--select-badge-remove-icon-size, 10px);\n height: var(--select-badge-remove-icon-size, 10px);\n color: var(--select-badge-remove-icon-color, currentColor);\n font-size: var(--select-badge-remove-icon-font-size, inherit);\n line-height: var(--select-badge-remove-icon-line-height, 1);\n transform: var(--select-badge-remove-icon-transform, none);\n opacity: var(--select-badge-remove-icon-opacity, 1);\n pointer-events: none;\n }\n\n .remove-button-icon svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n .remove-button:hover {\n background-color: var(--select-badge-remove-hover-bg, #ffebee);\n color: var(--select-badge-remove-hover-color, #c62828);\n }\n \n .remove-button:focus {\n outline: 2px solid var(--select-remove-btn-focus-outline, #1976d2);\n outline-offset: 2px;\n }\n `;\n this._shadow.appendChild(style);\n }\n\n private _getDisabledBehavior(): Required<DisabledOptionBehaviorConfig> {\n const behavior = this._config.disabledBehavior ?? {};\n return {\n selectable: behavior.selectable === true,\n hoverable: behavior.hoverable === true,\n focusable: behavior.focusable === true,\n };\n }\n\n private _isDisabledSelectionBlocked(): boolean {\n return Boolean(this._config.disabled) && !this._getDisabledBehavior().selectable;\n }\n\n private _render(): void {\n const { item, index, selected, disabled, active, render, showRemoveButton, classMap } = this._config;\n const disabledBehavior = this._getDisabledBehavior();\n \n // Clear container\n this._container.innerHTML = '';\n \n // Add part attribute\n this._container.setAttribute('part', 'option');\n\n // Standard styling hook\n this._container.classList.add('smilodon-option');\n\n // Apply state classes using classMap or defaults\n const selectedClasses = (classMap?.selected ?? 'selected sm-selected').split(' ').filter(Boolean);\n const activeClasses = (classMap?.active ?? 'active sm-active').split(' ').filter(Boolean);\n const disabledClasses = (classMap?.disabled ?? 'disabled sm-disabled').split(' ').filter(Boolean);\n\n // Apply classes to both the container (internal styling) and the host (external styling/::part)\n // This ensures that utility classes are visible via ::part selectors\n const toggleClasses = (element: Element, classes: string[], add: boolean) => {\n if (add) {\n element.classList.add(...classes);\n } else {\n element.classList.remove(...classes);\n }\n };\n\n if (selected) {\n toggleClasses(this._container, [...selectedClasses, 'smilodon-option--selected'], true);\n toggleClasses(this, [...selectedClasses, 'smilodon-option--selected'], true);\n } else {\n toggleClasses(this._container, [...selectedClasses, 'smilodon-option--selected'], false);\n toggleClasses(this, [...selectedClasses, 'smilodon-option--selected'], false);\n }\n\n if (active && (!disabled || disabledBehavior.focusable)) {\n toggleClasses(this._container, [...activeClasses, 'smilodon-option--active'], true);\n toggleClasses(this, [...activeClasses, 'smilodon-option--active'], true); // Make focus ring visible on host\n } else {\n toggleClasses(this._container, [...activeClasses, 'smilodon-option--active'], false);\n toggleClasses(this, [...activeClasses, 'smilodon-option--active'], false);\n }\n\n if (disabled) {\n toggleClasses(this._container, [...disabledClasses, 'smilodon-option--disabled'], true);\n toggleClasses(this, [...disabledClasses, 'smilodon-option--disabled'], true);\n } else {\n toggleClasses(this._container, [...disabledClasses, 'smilodon-option--disabled'], false);\n toggleClasses(this, [...disabledClasses, 'smilodon-option--disabled'], false);\n }\n\n const interactiveDisabled = Boolean(disabled && (disabledBehavior.hoverable || disabledBehavior.selectable));\n const toggleBehaviorClass = (className: string, add: boolean) => {\n toggleClasses(this._container, [className], add);\n toggleClasses(this, [className], add);\n };\n\n toggleBehaviorClass('smilodon-option--disabled-interactive', interactiveDisabled);\n toggleBehaviorClass('smilodon-option--disabled-hoverable', Boolean(disabled && disabledBehavior.hoverable));\n toggleBehaviorClass('smilodon-option--disabled-focusable', Boolean(disabled && disabledBehavior.focusable));\n toggleBehaviorClass('smilodon-option--disabled-selectable', Boolean(disabled && disabledBehavior.selectable));\n \n // Custom class name\n if (this._config.className) {\n\n const classes = this._config.className.split(' ').filter(Boolean);\n this._container.classList.add(...classes);\n }\n \n // Apply custom styles\n if (this._config.style) {\n Object.assign(this._container.style, this._config.style);\n }\n \n // Render content\n const contentDiv = document.createElement('div');\n contentDiv.className = 'option-content';\n // contentDiv.setAttribute('part', 'option-content'); // Optional\n \n if (render) {\n const rendered = render(item, index);\n if (typeof rendered === 'string') {\n contentDiv.innerHTML = rendered;\n } else if (rendered instanceof HTMLElement) {\n contentDiv.appendChild(rendered);\n }\n } else {\n const label = this._getLabel();\n contentDiv.textContent = label;\n }\n \n this._container.appendChild(contentDiv);\n \n // Add remove button if needed\n if (showRemoveButton && selected) {\n this._removeButton = document.createElement('button');\n this._removeButton.className = 'remove-button';\n this._removeButton.setAttribute('part', 'chip-remove');\n this._removeButton.setAttribute('aria-label', 'Remove option');\n this._removeButton.setAttribute('type', 'button');\n\n const removeIcon = document.createElement('span');\n removeIcon.className = 'remove-button-icon';\n removeIcon.setAttribute('part', 'chip-remove-icon');\n const iconMarkup = this._config.removeButtonIcon && this._config.removeButtonIcon.trim()\n ? this._config.removeButtonIcon\n : '×';\n if (iconMarkup.trim().startsWith('<')) {\n removeIcon.innerHTML = iconMarkup;\n } else {\n removeIcon.textContent = iconMarkup;\n }\n this._removeButton.appendChild(removeIcon);\n\n this._container.appendChild(this._removeButton);\n }\n \n // Set ARIA attributes and State attributes on Host\n this.setAttribute('role', 'option');\n this.setAttribute('aria-selected', String(selected));\n if (disabled && !disabledBehavior.selectable) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n this.id = this._config.id || `select-option-${index}`;\n\n // Add checkmark (part=\"checkmark\") - standard for object mode\n // Only show if NOT showing remove button (avoid clutter)\n if (!showRemoveButton) {\n const checkmark = document.createElement('div');\n checkmark.setAttribute('part', 'checkmark');\n checkmark.className = 'checkmark-icon';\n checkmark.innerHTML = `\n <svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width:1em;height:1em;\">\n <path d=\"M4 8.5L6.5 11L12 5.5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n `;\n this._container.appendChild(checkmark);\n }\n\n // Data Attributes Contract on Host\n const state = [];\n if (selected) state.push('selected');\n if (active && (!disabled || disabledBehavior.focusable)) state.push('active');\n if (state.length) {\n this.dataset.smState = state.join(' ');\n } else {\n delete this.dataset.smState;\n }\n \n this.dataset.smIndex = String(index);\n if (!this.hasAttribute('data-sm-selectable')) {\n this.toggleAttribute('data-sm-selectable', true);\n }\n }\n\n private _attachEventListeners(): void {\n // Click handler for selection\n this._container.addEventListener('click', (e) => {\n // Don't trigger selection if clicking remove button\n if (e.target === this._removeButton) {\n return;\n }\n \n if (!this._isDisabledSelectionBlocked()) {\n this._handleSelect();\n }\n });\n \n // Remove button handler\n if (this._removeButton) {\n this._removeButton.addEventListener('click', (e) => {\n e.stopPropagation();\n this._handleRemove();\n });\n }\n \n // Keyboard handler\n this.addEventListener('keydown', (e) => {\n if (this._isDisabledSelectionBlocked()) return;\n \n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this._handleSelect();\n } else if (e.key === 'Delete' || e.key === 'Backspace') {\n if (this._config.selected && this._config.showRemoveButton) {\n e.preventDefault();\n this._handleRemove();\n }\n }\n });\n }\n\n private _handleSelect(): void {\n const detail: OptionEventDetail = {\n item: this._config.item,\n index: this._config.index,\n value: this._getValue(),\n label: this._getLabel(),\n selected: !this._config.selected,\n };\n \n this.dispatchEvent(new CustomEvent('optionSelect', {\n detail,\n bubbles: true,\n composed: true,\n }));\n }\n\n private _handleRemove(): void {\n const detail: OptionEventDetail = {\n item: this._config.item,\n index: this._config.index,\n value: this._getValue(),\n label: this._getLabel(),\n selected: false,\n };\n \n this.dispatchEvent(new CustomEvent('optionRemove', {\n detail,\n bubbles: true,\n composed: true,\n }));\n }\n\n private _getValue(): unknown {\n if (this._config.getValue) {\n return this._config.getValue(this._config.item);\n }\n return (this._config.item as any)?.value ?? this._config.item;\n }\n\n private _getLabel(): string {\n if (this._config.getLabel) {\n return this._config.getLabel(this._config.item);\n }\n return (this._config.item as any)?.label ?? String(this._config.item);\n }\n\n /**\n * Update option configuration and re-render\n */\n updateConfig(updates: Partial<OptionConfig>): void {\n this._config = { ...this._config, ...updates };\n this._render();\n this._attachEventListeners();\n }\n\n /**\n * Get current configuration\n */\n getConfig(): Readonly<OptionConfig> {\n return this._config;\n }\n\n /**\n * Get option value\n */\n getValue(): unknown {\n return this._getValue();\n }\n\n /**\n * Get option label\n */\n getLabel(): string {\n return this._getLabel();\n }\n\n /**\n * Set selected state\n */\n setSelected(selected: boolean): void {\n this._config.selected = selected;\n if (this._hasRendered) {\n this._render();\n }\n }\n\n /**\n * Set active state\n */\n setActive(active: boolean): void {\n this._config.active = active && (!this._config.disabled || this._getDisabledBehavior().focusable);\n if (this._hasRendered) {\n this._render();\n }\n }\n\n /**\n * Set disabled state\n */\n setDisabled(disabled: boolean): void {\n this._config.disabled = disabled;\n if (this._hasRendered) {\n this._render();\n }\n }\n}\n\n// Register custom element\nif (!customElements.get('select-option')) {\n customElements.define('select-option', SelectOption);\n}\n","/**\n * Compare select item values with loose primitive coercion.\n * Treats string/number pairs like `\"1\"` and `1` as equal.\n */\nexport function valuesEqual(a: unknown, b: unknown): boolean {\n if (Object.is(a, b)) return true;\n if (a == null || b == null) return false;\n\n if (typeof a === 'string' && typeof b === 'number') {\n return a === String(b);\n }\n\n if (typeof a === 'number' && typeof b === 'string') {\n return String(a) === b;\n }\n\n return false;\n}\n\n/** Returns true when `values` contains a value equal to `target`. */\nexport function arrayIncludesValue(values: readonly unknown[], target: unknown): boolean {\n for (let i = 0; i < values.length; i += 1) {\n if (valuesEqual(values[i], target)) return true;\n }\n return false;\n}\n\n/** Returns true when two value arrays match positionally with loose equality. */\nexport function arraysEqualByValue(a: readonly unknown[], b: readonly unknown[]): boolean {\n if (a.length !== b.length) return false;\n\n for (let i = 0; i < a.length; i += 1) {\n if (!valuesEqual(a[i], b[i])) return false;\n }\n\n return true;\n}\n","/**\n * DOM-independent coordinator for the opt-in acknowledged data-loading\n * protocol. This module is intentionally not re-exported from the package\n * entry point; public component/adapter integration is a later increment.\n */\n\nexport type DataRequestId = string;\nexport type QueryGeneration = number;\nexport type PageCursor = string | number;\n\nexport type DataRequestProtocol = 'legacy' | 'acknowledged';\nexport type DataSearchMode = 'local' | 'remote' | 'hybrid';\nexport type DataPaginationMode = 'page' | 'cursor';\n\nconst DEFAULT_MAX_CURSOR_PAGES = 256;\nconst HARD_MAX_CURSOR_PAGES = 4_096;\nconst DEFAULT_MAX_CURSOR_TOKEN_BYTES = 1_024;\nconst HARD_MAX_CURSOR_TOKEN_BYTES = 4_096;\n\nexport interface DataLoadingConfig {\n protocol?: DataRequestProtocol;\n searchMode?: DataSearchMode;\n paginationMode?: DataPaginationMode;\n firstPage?: number;\n fetchLimit?: number;\n /** Internal acknowledged-cursor policy; not a public component option yet. */\n maxCursorPages?: number;\n /** UTF-8 bytes per opaque cursor; internal until component integration is authorized. */\n maxCursorTokenBytes?: number;\n}\n\nexport interface DataCoordinatorConfig {\n dataLoading?: DataLoadingConfig;\n infiniteScroll?: {\n pageSize?: number;\n initialPage?: number;\n };\n}\n\nexport interface DataRequestBase {\n readonly requestId: DataRequestId;\n readonly queryGeneration: QueryGeneration;\n readonly query: string;\n readonly normalizedQuery: string;\n readonly fetchLimit: number;\n readonly position: PagePosition;\n}\n\nexport interface SearchDataRequest extends DataRequestBase {\n readonly kind: 'search';\n readonly mode: 'remote' | 'hybrid';\n}\n\nexport type PagePosition =\n | Readonly<{ mode: 'page'; page: number }>\n | Readonly<{ mode: 'cursor'; cursor?: PageCursor; ordinal: number }>;\n\nexport interface LoadMoreDataRequest extends DataRequestBase {\n readonly kind: 'loadMore';\n}\n\nexport type DataRequest = SearchDataRequest | LoadMoreDataRequest;\n\nexport interface DataRequestError {\n readonly message: string;\n readonly code?: string;\n readonly retryable?: boolean;\n}\n\nexport interface DataRequestCancelNotification {\n readonly requestId: DataRequestId;\n readonly queryGeneration: QueryGeneration;\n readonly reason: 'query-changed' | 'config-changed' | 'disconnected';\n}\n\nexport type DataRequestCompletion =\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'succeeded';\n items: readonly unknown[];\n hasMore: true;\n nextCursor?: PageCursor;\n }>\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'empty';\n hasMore: true;\n advance: 'next' | 'retry';\n nextCursor?: PageCursor;\n }>\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'exhausted';\n items: readonly unknown[];\n hasMore: false;\n }>\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'failed';\n error: DataRequestError;\n }>\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'cancelled';\n reason?: 'host-cancelled';\n }>;\n\nexport type DataRequestCompletionResult = 'accepted' | 'stale' | 'unknown-request' | 'invalid' | 'resource-limit';\n\nexport type DataCoordinatorStatus =\n | 'idle'\n | 'requested'\n | 'loading'\n | 'succeeded'\n | 'empty'\n | 'exhausted'\n | 'failed'\n | 'cancelled'\n | 'resource-limited';\n\nexport type DataCoordinatorResourceLimit =\n | Readonly<{\n reason: 'cursor-depth';\n maxCursorPages: number;\n requestId?: DataRequestId;\n }>\n | Readonly<{\n reason: 'cursor-token-size';\n maxCursorTokenBytes: number;\n actualCursorTokenBytes: number;\n requestId: DataRequestId;\n }>;\n\nexport type DataCoordinatorAction =\n | Readonly<{ type: 'request'; request: DataRequest }>\n | Readonly<{ type: 'cancel'; notification: DataRequestCancelNotification }>;\n\nexport interface CoordinatorValidationIssue {\n readonly field: string;\n readonly message: string;\n}\n\nexport type ConfigurationValidation =\n | Readonly<{ valid: true; value: ResolvedDataCoordinatorConfig }>\n | Readonly<{ valid: false; errors: readonly CoordinatorValidationIssue[] }>;\n\nexport interface ResolvedDataCoordinatorConfig {\n readonly protocol: DataRequestProtocol;\n readonly searchMode: DataSearchMode;\n readonly paginationMode: DataPaginationMode;\n readonly firstPage: number;\n readonly initialPage: number;\n readonly fetchLimit?: number;\n readonly maxCursorPages: number;\n readonly maxCursorTokenBytes: number;\n}\n\nexport interface DataRequestCoordinatorOptions {\n config?: DataCoordinatorConfig;\n initialQuery?: string;\n initialItems?: readonly unknown[];\n /** Whether another page/position is available for an acknowledged local list. */\n hasMore?: boolean;\n}\n\nexport interface DataCoordinatorSnapshot {\n readonly status: DataCoordinatorStatus;\n readonly connected: boolean;\n readonly busy: boolean;\n readonly query: string;\n readonly normalizedQuery: string;\n readonly queryGeneration: QueryGeneration;\n readonly items: readonly unknown[];\n readonly hasMore: boolean;\n readonly activeRequest: DataRequest | null;\n readonly lastCommittedPage?: number;\n readonly nextEligiblePosition: PagePosition;\n readonly error: DataRequestError | null;\n /** A bounded-resource outcome; never aliases server exhaustion. */\n readonly resourceLimit: DataCoordinatorResourceLimit | null;\n readonly sentinelBlocked: boolean;\n readonly sentinelIntersecting: boolean;\n}\n\nexport type ConfigurationUpdateResult =\n | Readonly<{ status: 'accepted'; actions: readonly DataCoordinatorAction[] }>\n | Readonly<{ status: 'invalid'; errors: readonly CoordinatorValidationIssue[] }>;\n\ninterface InternalRequest {\n request: DataRequest;\n phase: 'requested' | 'loading';\n}\n\ninterface ParsedRequestId {\n readonly instanceId: number;\n readonly queryGeneration: number;\n readonly sequence: number;\n readonly check: string;\n}\n\ninterface ConfigValidationInput {\n protocol: unknown;\n searchMode: unknown;\n paginationMode: unknown;\n firstPage: unknown;\n initialPage: unknown;\n fetchLimit: unknown;\n maxCursorPages: unknown;\n maxCursorTokenBytes: unknown;\n pageSize: unknown;\n}\n\nlet coordinatorInstanceSequence = 0;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return false;\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\nfunction isPositiveSafeInteger(value: unknown): value is number {\n return Number.isSafeInteger(value) && (value as number) > 0;\n}\n\nfunction isNonNegativeSafeInteger(value: unknown): value is number {\n return Number.isSafeInteger(value) && (value as number) >= 0;\n}\n\nfunction isCursor(value: unknown): value is PageCursor {\n return typeof value === 'string' || (typeof value === 'number' && Number.isFinite(value));\n}\n\n/** Count UTF-8 bytes without depending on DOM APIs or Node Buffer. */\nfunction cursorTokenByteLength(cursor: PageCursor): number {\n const token = String(cursor);\n let bytes = 0;\n for (const character of token) {\n const codePoint = character.codePointAt(0) as number;\n if (codePoint <= 0x7f) bytes += 1;\n else if (codePoint <= 0x7ff) bytes += 2;\n else if (codePoint <= 0xffff) bytes += 3;\n else bytes += 4;\n }\n return bytes;\n}\n\nfunction parseRequestId(value: string): ParsedRequestId | null {\n const match = /^data-(\\d+)-generation-(\\d+)-request-(\\d+)-([a-z0-9]+)$/.exec(value);\n if (!match) return null;\n const [, instanceText, generationText, sequenceText, check] = match;\n const instanceId = Number(instanceText);\n const queryGeneration = Number(generationText);\n const sequence = Number(sequenceText);\n if (\n !Number.isSafeInteger(instanceId) || instanceId < 1 ||\n !Number.isSafeInteger(queryGeneration) || queryGeneration < 0 ||\n !Number.isSafeInteger(sequence) || sequence < 1\n ) return null;\n return Object.freeze({ instanceId, queryGeneration, sequence, check });\n}\n\nfunction requestIdCheck(\n secret: string,\n instanceId: number,\n queryGeneration: number,\n sequence: number,\n): string {\n // A compact keyed check distinguishes IDs actually minted by this instance\n // from arbitrary strings without retaining a registry of historical IDs.\n let hash = 14695981039346656037n;\n const mask = (1n << 64n) - 1n;\n const input = `${secret}:${instanceId}:${queryGeneration}:${sequence}`;\n for (let index = 0; index < input.length; index += 1) {\n hash ^= BigInt(input.charCodeAt(index));\n hash = (hash * 1099511628211n) & mask;\n }\n return hash.toString(36);\n}\n\nfunction isQueryMode(value: unknown): value is DataSearchMode {\n return value === 'local' || value === 'remote' || value === 'hybrid';\n}\n\nfunction isPaginationMode(value: unknown): value is DataPaginationMode {\n return value === 'page' || value === 'cursor';\n}\n\nfunction frozenPosition(position: PagePosition): PagePosition {\n return Object.freeze({ ...position }) as PagePosition;\n}\n\nfunction exactKeys(record: Record<string, unknown>, allowed: readonly string[]): boolean {\n return Object.keys(record).every((key) => allowed.includes(key));\n}\n\nfunction asFrozenItems(items: readonly unknown[]): readonly unknown[] {\n return Object.freeze(Array.from(items));\n}\n\nfunction immutableActions(actions: DataCoordinatorAction[]): readonly DataCoordinatorAction[] {\n return Object.freeze(actions.slice());\n}\n\nfunction configInput(config: DataCoordinatorConfig = {}): ConfigValidationInput {\n const root = isRecord(config) ? config : {};\n const dataLoading = isRecord(root.dataLoading) ? root.dataLoading : {};\n const infiniteScroll = isRecord(root.infiniteScroll) ? root.infiniteScroll : {};\n return {\n protocol: dataLoading.protocol === undefined ? 'legacy' : dataLoading.protocol,\n searchMode: dataLoading.searchMode === undefined ? 'local' : dataLoading.searchMode,\n paginationMode: dataLoading.paginationMode === undefined ? 'page' : dataLoading.paginationMode,\n firstPage: dataLoading.firstPage === undefined ? 1 : dataLoading.firstPage,\n initialPage: infiniteScroll.initialPage === undefined ? 1 : infiniteScroll.initialPage,\n fetchLimit: dataLoading.fetchLimit,\n maxCursorPages: dataLoading.maxCursorPages === undefined\n ? DEFAULT_MAX_CURSOR_PAGES\n : dataLoading.maxCursorPages,\n maxCursorTokenBytes: dataLoading.maxCursorTokenBytes === undefined\n ? DEFAULT_MAX_CURSOR_TOKEN_BYTES\n : dataLoading.maxCursorTokenBytes,\n pageSize: infiniteScroll.pageSize,\n };\n}\n\nexport function validateDataCoordinatorConfig(config: DataCoordinatorConfig = {}): ConfigurationValidation {\n const input = configInput(config);\n const errors: CoordinatorValidationIssue[] = [];\n const add = (field: string, message: string) => errors.push(Object.freeze({ field, message }));\n const rawConfig = config as unknown;\n if (!isRecord(rawConfig)) add('config', 'must be a plain object');\n else {\n if (rawConfig.dataLoading !== undefined && !isRecord(rawConfig.dataLoading)) {\n add('dataLoading', 'must be a plain object when supplied');\n }\n if (rawConfig.infiniteScroll !== undefined && !isRecord(rawConfig.infiniteScroll)) {\n add('infiniteScroll', 'must be a plain object when supplied');\n }\n }\n\n if (input.protocol !== 'legacy' && input.protocol !== 'acknowledged') {\n add('dataLoading.protocol', 'must be legacy or acknowledged');\n }\n if (!isQueryMode(input.searchMode)) {\n add('dataLoading.searchMode', 'must be local, remote, or hybrid');\n }\n if (!isPaginationMode(input.paginationMode)) {\n add('dataLoading.paginationMode', 'must be page or cursor');\n }\n if (!isPositiveSafeInteger(input.firstPage)) {\n add('dataLoading.firstPage', 'must be a positive safe integer');\n }\n if (!isPositiveSafeInteger(input.initialPage)) {\n add('infiniteScroll.initialPage', 'must be a positive safe integer');\n }\n if (\n input.protocol === 'acknowledged' &&\n input.searchMode === 'local' &&\n input.paginationMode === 'page' &&\n input.initialPage === Number.MAX_SAFE_INTEGER\n ) {\n add('infiniteScroll.initialPage', 'must leave room for the next acknowledged page number');\n }\n if (input.fetchLimit !== undefined && !isPositiveSafeInteger(input.fetchLimit)) {\n add('dataLoading.fetchLimit', 'must be a positive safe integer when supplied');\n }\n if (!isPositiveSafeInteger(input.maxCursorPages) || input.maxCursorPages > HARD_MAX_CURSOR_PAGES) {\n add('dataLoading.maxCursorPages', `must be a positive safe integer no greater than ${HARD_MAX_CURSOR_PAGES}`);\n }\n if (!isPositiveSafeInteger(input.maxCursorTokenBytes) || input.maxCursorTokenBytes > HARD_MAX_CURSOR_TOKEN_BYTES) {\n add(\n 'dataLoading.maxCursorTokenBytes',\n `must be a positive safe integer no greater than ${HARD_MAX_CURSOR_TOKEN_BYTES}`,\n );\n }\n if (input.pageSize !== undefined && !isPositiveSafeInteger(input.pageSize)) {\n add('infiniteScroll.pageSize', 'must be a positive safe integer when supplied');\n }\n if (\n input.protocol === 'legacy' &&\n (input.searchMode === 'remote' || input.searchMode === 'hybrid' || input.paginationMode === 'cursor')\n ) {\n add('dataLoading.protocol', 'remote/hybrid search and cursor pagination require acknowledged protocol');\n }\n\n const resolvedFetchLimit =\n typeof input.fetchLimit === 'number' ? input.fetchLimit : typeof input.pageSize === 'number' ? input.pageSize : undefined;\n if (input.protocol === 'acknowledged' && resolvedFetchLimit === undefined) {\n add('dataLoading.fetchLimit', 'acknowledged requests require fetchLimit or an effective infiniteScroll.pageSize');\n }\n\n if (errors.length > 0) {\n return Object.freeze({ valid: false, errors: Object.freeze(errors) });\n }\n\n return Object.freeze({\n valid: true,\n value: Object.freeze({\n protocol: input.protocol as DataRequestProtocol,\n searchMode: input.searchMode as DataSearchMode,\n paginationMode: input.paginationMode as DataPaginationMode,\n firstPage: input.firstPage as number,\n initialPage: input.initialPage as number,\n fetchLimit: resolvedFetchLimit,\n maxCursorPages: input.maxCursorPages as number,\n maxCursorTokenBytes: input.maxCursorTokenBytes as number,\n }),\n });\n}\n\nfunction copyCoordinatorConfig(config: DataCoordinatorConfig = {}): DataCoordinatorConfig {\n return {\n dataLoading: config.dataLoading ? { ...config.dataLoading } : {},\n infiniteScroll: config.infiniteScroll ? { ...config.infiniteScroll } : {},\n };\n}\n\nfunction mergeCoordinatorConfig(\n current: DataCoordinatorConfig,\n update: DataCoordinatorConfig,\n): DataCoordinatorConfig {\n return {\n dataLoading: { ...(current.dataLoading ?? {}), ...(update.dataLoading ?? {}) },\n infiniteScroll: { ...(current.infiniteScroll ?? {}), ...(update.infiniteScroll ?? {}) },\n };\n}\n\n/**\n * Owns request identity and pagination state only. It has no DOM, framework,\n * observer, timer, or network dependencies. Returned actions are instructions\n * for a future facade/host boundary; cancellation never performs transport.\n */\nexport class DataRequestCoordinator {\n private readonly instanceId = ++coordinatorInstanceSequence;\n private readonly requestIdSecret = Math.random().toString(36).slice(2) || '0';\n private requestSequence = 0;\n private rawConfig: DataCoordinatorConfig;\n private config: ResolvedDataCoordinatorConfig;\n private connected = false;\n private hasConnected = false;\n private query: string;\n private queryGeneration = 0;\n private items: readonly unknown[];\n private hasMore: boolean;\n private active: InternalRequest | null = null;\n private status: DataCoordinatorStatus = 'idle';\n private lastCommittedPage: number | undefined;\n private nextEligiblePosition: PagePosition;\n /**\n * Exact cycle detection for the current pagination epoch. One cursor is\n * retained per accepted advancement; there is intentionally no LRU eviction.\n */\n private committedCursors = new Set<PageCursor>();\n private generationHasAcceptedResult = false;\n private needsInitialRemoteSearch: boolean;\n private retryAvailable = false;\n private retryPosition: PagePosition | undefined;\n private retryKind: DataRequest['kind'] | undefined;\n private error: DataRequestError | null = null;\n private resourceLimit: DataCoordinatorResourceLimit | null = null;\n private sentinelBlocked = false;\n private sentinelIntersecting = false;\n\n constructor(options: DataRequestCoordinatorOptions = {}) {\n const initialConfig = options.config === undefined ? {} : options.config;\n const validation = validateDataCoordinatorConfig(initialConfig);\n if (!validation.valid) {\n throw new TypeError(validation.errors.map(({ field, message }) => `${field}: ${message}`).join('; '));\n }\n this.rawConfig = copyCoordinatorConfig(initialConfig);\n this.config = validation.value;\n this.query = options.initialQuery ?? '';\n this.items = asFrozenItems(options.initialItems ?? []);\n const remote = this.isRemoteMode();\n this.hasMore = remote ? false : options.hasMore ?? false;\n this.nextEligiblePosition = this.initialPosition();\n this.lastCommittedPage = this.config.paginationMode === 'page' && !remote\n ? this.config.initialPage\n : undefined;\n this.needsInitialRemoteSearch = remote;\n }\n\n getSnapshot(): DataCoordinatorSnapshot {\n const activeRequest = this.active?.request ?? null;\n const nextPosition = frozenPosition(this.nextEligiblePosition);\n return Object.freeze({\n status: this.status,\n connected: this.connected,\n busy: this.active !== null,\n query: this.query,\n normalizedQuery: this.query.trim(),\n queryGeneration: this.queryGeneration,\n items: asFrozenItems(this.items),\n hasMore: this.hasMore,\n activeRequest,\n lastCommittedPage: this.lastCommittedPage,\n nextEligiblePosition: nextPosition,\n error: this.error ? Object.freeze({ ...this.error }) : null,\n resourceLimit: this.resourceLimit,\n sentinelBlocked: this.sentinelBlocked,\n sentinelIntersecting: this.sentinelIntersecting,\n });\n }\n\n /** Connect once, dispatching the initial remote/hybrid query when required. */\n connect(query = this.query): readonly DataCoordinatorAction[] {\n if (this.connected) return immutableActions([]);\n\n const actions: DataCoordinatorAction[] = [];\n if (query !== this.query) actions.push(...this.setQuery(query));\n if (this.hasConnected) this.queryGeneration += 1;\n this.connected = true;\n this.hasConnected = true;\n\n if (this.isRemoteMode() && this.needsInitialRemoteSearch) {\n this.resetPaginationForRemoteQuery(true);\n const request = this.createSearchRequest();\n if (request) actions.push(Object.freeze({ type: 'request', request }));\n }\n return immutableActions(actions);\n }\n\n /**\n * Advance the request transition from synchronous `requested` to `loading`\n * immediately before a future facade dispatches event/callback notifications.\n */\n markNotificationsDispatched(requestId: DataRequestId): boolean {\n if (!this.active || this.active.request.requestId !== requestId || this.active.phase !== 'requested') {\n return false;\n }\n this.active.phase = 'loading';\n this.status = 'loading';\n return true;\n }\n\n setQuery(query: string): readonly DataCoordinatorAction[] {\n if (typeof query !== 'string' || query === this.query) return immutableActions([]);\n\n const actions: DataCoordinatorAction[] = [];\n const cancellation = this.invalidateActive('query-changed');\n if (cancellation) actions.push(cancellation);\n\n this.query = query;\n this.queryGeneration += 1;\n this.error = null;\n this.status = 'idle';\n this.generationHasAcceptedResult = false;\n this.retryAvailable = false;\n this.retryPosition = undefined;\n this.retryKind = undefined;\n this.committedCursors.clear();\n this.resourceLimit = null;\n this.sentinelBlocked = false;\n\n if (this.isRemoteMode()) {\n this.resetPaginationForRemoteQuery(true);\n this.needsInitialRemoteSearch = true;\n if (this.connected) {\n const request = this.createSearchRequest();\n if (request) actions.push(Object.freeze({ type: 'request', request }));\n }\n } else {\n this.lastCommittedPage = this.config.paginationMode === 'page' ? this.config.initialPage : undefined;\n this.nextEligiblePosition = this.initialPosition();\n this.needsInitialRemoteSearch = false;\n }\n return immutableActions(actions);\n }\n\n /** Update effective config; non-protocol changes do not rewrite active requests. */\n updateConfig(update: DataCoordinatorConfig): ConfigurationUpdateResult {\n const rawUpdate = update as unknown;\n if (\n !isRecord(rawUpdate) ||\n (rawUpdate.dataLoading !== undefined && !isRecord(rawUpdate.dataLoading)) ||\n (rawUpdate.infiniteScroll !== undefined && !isRecord(rawUpdate.infiniteScroll))\n ) {\n return Object.freeze({\n status: 'invalid',\n errors: Object.freeze([\n Object.freeze({ field: 'config', message: 'update and nested config groups must be plain objects' }),\n ]),\n });\n }\n const candidate = mergeCoordinatorConfig(this.rawConfig, update);\n const validation = validateDataCoordinatorConfig(candidate);\n if (!validation.valid) return Object.freeze({ status: 'invalid', errors: validation.errors });\n\n const previous = this.config;\n const next = validation.value;\n const protocolChanged =\n previous.protocol !== next.protocol ||\n previous.searchMode !== next.searchMode ||\n previous.paginationMode !== next.paginationMode;\n\n this.rawConfig = copyCoordinatorConfig(candidate);\n this.config = next;\n if (!protocolChanged) {\n this.refreshCursorDepthLimit();\n return Object.freeze({ status: 'accepted', actions: immutableActions([]) });\n }\n\n const actions: DataCoordinatorAction[] = [];\n const cancellation = this.invalidateActive('config-changed');\n if (cancellation) actions.push(cancellation);\n\n this.queryGeneration += 1;\n this.error = null;\n this.status = 'idle';\n this.generationHasAcceptedResult = false;\n this.retryAvailable = false;\n this.retryPosition = undefined;\n this.retryKind = undefined;\n this.committedCursors.clear();\n this.resourceLimit = null;\n this.sentinelBlocked = false;\n this.hasMore = this.isRemoteMode() ? false : this.hasMore;\n this.lastCommittedPage = this.config.paginationMode === 'page' && !this.isRemoteMode()\n ? this.config.initialPage\n : undefined;\n this.nextEligiblePosition = this.initialPosition();\n this.needsInitialRemoteSearch = this.isRemoteMode();\n\n if (this.connected && this.isRemoteMode()) {\n const request = this.createSearchRequest();\n if (request) actions.push(Object.freeze({ type: 'request', request }));\n }\n return Object.freeze({ status: 'accepted', actions: immutableActions(actions) });\n }\n\n /** Request another page or explicitly retry the still-eligible position. */\n requestLoadMore(trigger: 'manual' | 'sentinel' = 'manual'): readonly DataCoordinatorAction[] {\n if (this.config.protocol !== 'acknowledged' || !this.connected || this.active) {\n return immutableActions([]);\n }\n if (trigger === 'sentinel' && this.sentinelBlocked) return immutableActions([]);\n if (!this.hasMore && !this.retryAvailable) return immutableActions([]);\n\n const position = this.retryAvailable && this.retryPosition\n ? this.retryPosition\n : this.nextEligiblePosition;\n if (\n this.config.paginationMode === 'cursor' &&\n position.mode === 'cursor' &&\n position.ordinal > this.config.maxCursorPages\n ) {\n this.resourceLimit = Object.freeze({\n reason: 'cursor-depth',\n maxCursorPages: this.config.maxCursorPages,\n });\n this.status = 'resource-limited';\n this.sentinelBlocked = true;\n return immutableActions([]);\n }\n\n if (trigger === 'manual') this.sentinelBlocked = false;\n const retryKind = this.retryAvailable ? this.retryKind : undefined;\n this.retryAvailable = false;\n this.retryPosition = undefined;\n this.retryKind = undefined;\n\n const request = retryKind === 'search' && this.isRemoteMode()\n ? this.createSearchRequest(position)\n : this.createLoadMoreRequest(position);\n return request ? immutableActions([Object.freeze({ type: 'request', request })]) : immutableActions([]);\n }\n\n /** Feed observer state into the pure sentinel rearm state machine. */\n setSentinelIntersecting(intersecting: boolean): readonly DataCoordinatorAction[] {\n if (!intersecting) {\n this.sentinelIntersecting = false;\n this.sentinelBlocked = false;\n return immutableActions([]);\n }\n if (this.sentinelIntersecting) return immutableActions([]);\n this.sentinelIntersecting = true;\n return this.requestLoadMore('sentinel');\n }\n\n /** Invalidate pending work before returning its best-effort host cancellation action. */\n disconnect(): readonly DataCoordinatorAction[] {\n if (!this.connected) return immutableActions([]);\n const activeRequest = this.active?.request;\n const actions: DataCoordinatorAction[] = [];\n if (activeRequest) {\n if (activeRequest.kind === 'search' && !this.generationHasAcceptedResult) {\n this.needsInitialRemoteSearch = true;\n }\n const cancellation = this.invalidateActive('disconnected');\n if (cancellation) actions.push(cancellation);\n this.resourceLimit = null;\n this.status = 'cancelled';\n this.sentinelBlocked = true;\n // Encode invalidation in the generation, so late completions are stale\n // without retaining one request ID per cancellation.\n this.queryGeneration += 1;\n }\n this.sentinelIntersecting = false;\n this.connected = false;\n return immutableActions(actions);\n }\n\n completeDataRequest(completion: unknown): DataRequestCompletionResult {\n if (!isRecord(completion) || !this.hasValidCompletionEnvelope(completion)) return 'invalid';\n\n const requestId = completion.requestId as string;\n const generation = completion.queryGeneration as number;\n if (this.active?.request.requestId !== requestId) {\n return this.classifyInactiveRequest(requestId, generation);\n }\n if (generation !== this.active.request.queryGeneration || this.active.phase !== 'loading') return 'invalid';\n\n const validation = this.validateCompletionPayload(completion, this.active.request);\n if (!validation.valid) {\n if (validation.resourceLimit === 'cursor-token-size') {\n const cursor = completion.nextCursor as PageCursor;\n const actualCursorTokenBytes = cursorTokenByteLength(cursor);\n this.resourceLimit = Object.freeze({\n reason: 'cursor-token-size',\n maxCursorTokenBytes: this.config.maxCursorTokenBytes,\n actualCursorTokenBytes,\n requestId,\n });\n return 'resource-limit';\n }\n return 'invalid';\n }\n\n const request = this.active.request;\n const status = completion.status as DataRequestCompletion['status'];\n const nextData = status === 'succeeded' || status === 'exhausted'\n ? asFrozenItems(completion.items as readonly unknown[])\n : this.items;\n let nextPosition = this.nextEligiblePosition;\n let nextLastCommittedPage = this.lastCommittedPage;\n let nextHasMore = this.hasMore;\n let nextRetryAvailable = false;\n let nextRetryPosition: PagePosition | undefined;\n let nextRetryKind: DataRequest['kind'] | undefined;\n let nextError: DataRequestError | null = null;\n let nextSentinelBlocked = false;\n let cursorToCommit: PageCursor | undefined;\n let nextResourceLimit: DataCoordinatorResourceLimit | null = null;\n\n if (status === 'succeeded') {\n const advances = this.advanceFrom(request, completion as Record<string, unknown>);\n nextPosition = advances.position;\n nextLastCommittedPage = advances.lastCommittedPage;\n cursorToCommit = advances.cursorToCommit;\n nextHasMore = true;\n } else if (status === 'exhausted') {\n nextLastCommittedPage = request.position.mode === 'page'\n ? request.position.page\n : this.lastCommittedPage;\n nextHasMore = false;\n } else if (status === 'empty') {\n nextHasMore = true;\n nextSentinelBlocked = true;\n if (completion.advance === 'next') {\n const advances = this.advanceFrom(request, completion as Record<string, unknown>);\n nextPosition = advances.position;\n nextLastCommittedPage = advances.lastCommittedPage;\n cursorToCommit = advances.cursorToCommit;\n } else {\n nextRetryAvailable = true;\n nextRetryPosition = request.position;\n nextRetryKind = request.kind;\n }\n } else if (status === 'failed') {\n nextRetryAvailable = true;\n nextRetryPosition = request.position;\n nextRetryKind = request.kind;\n nextError = Object.freeze({ ...(completion.error as DataRequestError) });\n nextSentinelBlocked = true;\n } else if (status === 'cancelled') {\n nextRetryAvailable = true;\n nextRetryPosition = request.position;\n nextRetryKind = request.kind;\n nextSentinelBlocked = true;\n }\n\n if (\n this.config.paginationMode === 'cursor' &&\n nextHasMore &&\n nextPosition.mode === 'cursor' &&\n nextPosition.ordinal > this.config.maxCursorPages\n ) {\n nextResourceLimit = Object.freeze({\n reason: 'cursor-depth',\n maxCursorPages: this.config.maxCursorPages,\n requestId,\n });\n nextSentinelBlocked = true;\n }\n\n // Commit only after identity, generation, status, and every field validate.\n this.items = nextData;\n this.nextEligiblePosition = nextPosition;\n this.lastCommittedPage = nextLastCommittedPage;\n this.hasMore = nextHasMore;\n this.retryAvailable = nextRetryAvailable;\n this.retryPosition = nextRetryPosition;\n this.retryKind = nextRetryKind;\n this.error = nextError;\n this.resourceLimit = nextResourceLimit;\n this.sentinelBlocked = nextSentinelBlocked;\n if (cursorToCommit !== undefined) this.committedCursors.add(cursorToCommit);\n if (status === 'succeeded' || status === 'exhausted') this.generationHasAcceptedResult = true;\n this.active = null;\n this.status = nextResourceLimit ? 'resource-limited' : status;\n return 'accepted';\n }\n\n private isRemoteMode(): boolean {\n return this.config.searchMode === 'remote' || this.config.searchMode === 'hybrid';\n }\n\n private initialPosition(): PagePosition {\n if (this.config.paginationMode === 'cursor') {\n return Object.freeze({ mode: 'cursor' as const, ordinal: 1 });\n }\n const page = this.isRemoteMode() ? this.config.firstPage : this.config.initialPage + 1;\n return Object.freeze({ mode: 'page' as const, page });\n }\n\n private resetPaginationForRemoteQuery(clearItems: boolean): void {\n this.hasMore = false;\n this.lastCommittedPage = undefined;\n this.nextEligiblePosition = this.initialPosition();\n this.committedCursors.clear();\n this.retryAvailable = false;\n this.retryPosition = undefined;\n this.retryKind = undefined;\n this.resourceLimit = null;\n this.sentinelBlocked = false;\n this.error = null;\n if (clearItems) this.items = asFrozenItems([]);\n }\n\n /** Re-evaluate the local cursor cap without resetting accepted history. */\n private refreshCursorDepthLimit(): void {\n if (this.config.protocol !== 'acknowledged' || this.config.paginationMode !== 'cursor') return;\n const position = this.retryAvailable && this.retryPosition\n ? this.retryPosition\n : this.nextEligiblePosition;\n const overLimit = (this.hasMore || this.retryAvailable) &&\n position.mode === 'cursor' && position.ordinal > this.config.maxCursorPages;\n\n if (overLimit) {\n this.resourceLimit = Object.freeze({\n reason: 'cursor-depth',\n maxCursorPages: this.config.maxCursorPages,\n });\n if (!this.active) this.status = 'resource-limited';\n this.sentinelBlocked = true;\n return;\n }\n\n if (this.resourceLimit?.reason === 'cursor-depth') {\n this.resourceLimit = null;\n if (!this.active && this.status === 'resource-limited') this.status = 'idle';\n }\n }\n\n private createSearchRequest(position = this.nextEligiblePosition): DataRequest | null {\n if (!this.connected || !this.isRemoteMode() || this.config.protocol !== 'acknowledged') return null;\n const request = this.createRequest({ kind: 'search', mode: this.config.searchMode as 'remote' | 'hybrid' }, position);\n if (request) {\n this.needsInitialRemoteSearch = false;\n this.status = 'requested';\n }\n return request;\n }\n\n private createLoadMoreRequest(position: PagePosition): DataRequest | null {\n if (!this.connected || this.config.protocol !== 'acknowledged') return null;\n const request = this.createRequest({ kind: 'loadMore' }, position);\n if (request) this.status = 'requested';\n return request;\n }\n\n private createRequest(\n kind: { kind: 'search'; mode: 'remote' | 'hybrid' } | { kind: 'loadMore' },\n position: PagePosition,\n ): DataRequest | null {\n const fetchLimit = this.config.fetchLimit;\n if (fetchLimit === undefined || this.active) return null;\n this.requestSequence += 1;\n const check = requestIdCheck(\n this.requestIdSecret,\n this.instanceId,\n this.queryGeneration,\n this.requestSequence,\n );\n const requestId = `data-${this.instanceId}-generation-${this.queryGeneration}-request-${this.requestSequence}-${check}`;\n const base: DataRequestBase = Object.freeze({\n requestId,\n queryGeneration: this.queryGeneration,\n query: this.query,\n normalizedQuery: this.query.trim(),\n fetchLimit,\n position: frozenPosition(position),\n });\n const request: DataRequest = kind.kind === 'search'\n ? Object.freeze({ ...base, kind: 'search' as const, mode: kind.mode })\n : Object.freeze({ ...base, kind: 'loadMore' as const });\n this.active = { request, phase: 'requested' };\n this.status = 'requested';\n this.error = null;\n return request;\n }\n\n private invalidateActive(reason: DataRequestCancelNotification['reason']): DataCoordinatorAction | null {\n if (!this.active) return null;\n const { request } = this.active;\n this.active = null;\n this.status = 'cancelled';\n const notification = Object.freeze({\n requestId: request.requestId,\n queryGeneration: request.queryGeneration,\n reason,\n });\n return Object.freeze({ type: 'cancel', notification });\n }\n\n private classifyInactiveRequest(\n requestId: DataRequestId,\n completionGeneration: QueryGeneration,\n ): DataRequestCompletionResult {\n const parsed = parseRequestId(requestId);\n if (\n !parsed ||\n parsed.instanceId !== this.instanceId ||\n parsed.check !== requestIdCheck(\n this.requestIdSecret,\n parsed.instanceId,\n parsed.queryGeneration,\n parsed.sequence,\n ) ||\n parsed.sequence > this.requestSequence\n ) return 'unknown-request';\n if (parsed.queryGeneration !== completionGeneration) return 'invalid';\n return parsed.queryGeneration < this.queryGeneration ? 'stale' : 'unknown-request';\n }\n\n private hasValidCompletionEnvelope(completion: Record<string, unknown>): boolean {\n return (\n typeof completion.requestId === 'string' &&\n completion.requestId.length > 0 &&\n isNonNegativeSafeInteger(completion.queryGeneration) &&\n typeof completion.status === 'string' &&\n ['succeeded', 'empty', 'exhausted', 'failed', 'cancelled'].includes(completion.status)\n );\n }\n\n private validateCompletionPayload(\n completion: Record<string, unknown>,\n request: DataRequest,\n ): { valid: true } | { valid: false; resourceLimit?: 'cursor-token-size' } {\n const common = ['requestId', 'queryGeneration', 'status'];\n switch (completion.status) {\n case 'succeeded': {\n const allowed = [...common, 'items', 'hasMore'];\n if (request.position.mode === 'cursor') allowed.push('nextCursor');\n if (!exactKeys(completion, allowed) || !Array.isArray(completion.items) || completion.hasMore !== true) {\n return { valid: false };\n }\n if (request.position.mode === 'cursor') {\n if (request.position.ordinal >= Number.MAX_SAFE_INTEGER || !isCursor(completion.nextCursor)) {\n return { valid: false };\n }\n if (cursorTokenByteLength(completion.nextCursor) > this.config.maxCursorTokenBytes) {\n return { valid: false, resourceLimit: 'cursor-token-size' };\n }\n if (this.hasCommittedCursor(completion.nextCursor)) return { valid: false };\n } else if ('nextCursor' in completion) {\n return { valid: false };\n } else if (request.position.page >= Number.MAX_SAFE_INTEGER) {\n return { valid: false };\n }\n return { valid: true };\n }\n case 'empty': {\n const allowed = [...common, 'hasMore', 'advance'];\n if (request.position.mode === 'cursor' && completion.advance === 'next') allowed.push('nextCursor');\n if (!exactKeys(completion, allowed) || completion.hasMore !== true) return { valid: false };\n if (completion.advance !== 'next' && completion.advance !== 'retry') return { valid: false };\n if (request.position.mode === 'cursor') {\n if (completion.advance === 'next') {\n if (request.position.ordinal >= Number.MAX_SAFE_INTEGER || !isCursor(completion.nextCursor)) {\n return { valid: false };\n }\n if (cursorTokenByteLength(completion.nextCursor) > this.config.maxCursorTokenBytes) {\n return { valid: false, resourceLimit: 'cursor-token-size' };\n }\n if (this.hasCommittedCursor(completion.nextCursor)) return { valid: false };\n } else if ('nextCursor' in completion) {\n return { valid: false };\n }\n } else if ('nextCursor' in completion) {\n return { valid: false };\n } else if (completion.advance === 'next' && request.position.page >= Number.MAX_SAFE_INTEGER) {\n return { valid: false };\n }\n return { valid: true };\n }\n case 'exhausted': {\n if (\n !exactKeys(completion, [...common, 'items', 'hasMore']) ||\n !Array.isArray(completion.items) ||\n completion.hasMore !== false\n ) {\n return { valid: false };\n }\n return { valid: true };\n }\n case 'failed': {\n if (!exactKeys(completion, [...common, 'error']) || !isRecord(completion.error)) return { valid: false };\n const error = completion.error;\n if (\n !exactKeys(error, ['message', 'code', 'retryable']) ||\n typeof error.message !== 'string' ||\n error.message.trim().length === 0 ||\n (error.code !== undefined && typeof error.code !== 'string') ||\n (error.retryable !== undefined && typeof error.retryable !== 'boolean')\n ) {\n return { valid: false };\n }\n return { valid: true };\n }\n case 'cancelled': {\n const hasReason = 'reason' in completion;\n return (\n exactKeys(completion, hasReason ? [...common, 'reason'] : common) &&\n (!hasReason || completion.reason === undefined || completion.reason === 'host-cancelled')\n )\n ? { valid: true }\n : { valid: false };\n }\n default:\n return { valid: false };\n }\n }\n\n private hasCommittedCursor(cursor: PageCursor): boolean {\n return this.committedCursors.has(cursor) || (\n this.nextEligiblePosition.mode === 'cursor' && this.nextEligiblePosition.cursor === cursor\n );\n }\n\n private advanceFrom(\n request: DataRequest,\n completion: Record<string, unknown>,\n ): { position: PagePosition; lastCommittedPage: number | undefined; cursorToCommit?: PageCursor } {\n if (request.position.mode === 'page') {\n const page = request.position.page;\n return {\n position: Object.freeze({ mode: 'page' as const, page: page + 1 }),\n lastCommittedPage: page,\n };\n }\n const nextCursor = completion.nextCursor as PageCursor | undefined;\n return {\n position: Object.freeze({\n mode: 'cursor' as const,\n cursor: nextCursor,\n ordinal: request.position.ordinal + 1,\n }),\n lastCommittedPage: this.lastCommittedPage,\n cursorToCommit: nextCursor,\n };\n }\n}\n","/**\n * Enhanced Select Component\n * Implements all advanced features: infinite scroll, load more, busy state, \n * server-side selection, and full customization\n * \n * Redesigned with formal elegance, refined microinteractions, and polished UX\n */\n\nimport type { CallbackConfig, GlobalSelectConfig } from '../config/global-config.js';\nimport { selectConfig } from '../config/global-config.js';\nimport { validateDataLoadingConfig } from '../data-loading/public-config.js';\nimport type {\n DataLoadingConfigErrorDetail,\n DataLoadingStateSnapshot,\n DataProjectionEventDetail,\n DataRequestCancelNotification,\n DataRequestCompletion,\n DataRequestCompletionResult,\n EnhancedSelectAcknowledgedSurface,\n ResolvedDataLoadingConfig,\n SelectInstanceConfig,\n} from '../data-loading/public-types.js';\nimport type {\n SelectEventName,\n SelectEventsDetailMap,\n GroupedItem,\n RendererHelpers,\n ClassMap,\n SelectCapabilitiesReport,\n LimitationState,\n LimitationPolicyMap,\n KnownLimitationId,\n TrackingSnapshot,\n TrackingEntry,\n} from '../types.js';\nimport type { OptionRenderer as OptionRendererFn } from '../renderers/contracts.js';\nimport type { CloseReason, SelectKey } from '../engine/contracts.js';\nimport { createDefaultItemAdapter, type ItemAdapter } from '../engine/item-adapter.js';\nimport { createItemRegistry, type DuplicateKeyPolicy, type ItemRecord, type ItemRegistry } from '../engine/item-registry.js';\nimport type { SelectionReason, ActiveReason } from '../engine/selection-policy.js';\nimport type { SelectEvent } from '../engine/select-events.js';\nimport { computeWindowKeys, type VirtualizationScope } from '../engine/virtualization.js';\nimport { computeAccessibilityEffects, deriveAccessibilityState } from '../engine/accessibility.js';\nimport { applyAccessibilityEffects } from '../platform/web/accessibility-effects.js';\nimport { SelectEngineBridge } from '../platform/web/select-engine-bridge.js';\nimport { DefaultSelectEffectRunner } from '../platform/web/select-effect-runner.js';\nimport { SelectOption } from './select-option.js';\nimport { arrayIncludesValue } from '../utils/value-equality.js';\nimport { Virtualizer, type VirtualizerScrollResult } from '../utils/virtualizer.js';\nimport {\n DataRequestCoordinator,\n type DataCoordinatorAction,\n type DataCoordinatorConfig,\n type DataCoordinatorSnapshot,\n type DataRequest,\n type DataSearchMode,\n} from '../data-loading/request-coordinator.js';\n\ninterface PageCache {\n [page: number]: unknown[];\n}\n\ninterface SelectState {\n readonly isOpen: boolean;\n isBusy: boolean;\n isSearching: boolean;\n currentPage: number;\n totalPages: number;\n /** Compatibility projection of engine selectedKeys for rendering and legacy APIs. */\n selectedIndices: Set<number>;\n /** Registered selected records projected from engine selectedKeys. */\n selectedItems: Map<number, unknown>;\n /** Compatibility projection of engine activeKey through the current item registry. */\n activeIndex: number;\n searchQuery: string;\n loadedItems: unknown[];\n groupedItems: GroupedItem[];\n preserveScrollPosition: boolean;\n lastScrollPosition: number;\n lastNotifiedQuery: string | null;\n lastNotifiedResultCount: number;\n isExpanded: boolean;\n}\n\ninterface LegacySelectedEntry {\n key: SelectKey;\n index: number;\n item: unknown;\n}\n\ninterface EnhancedSelectRenderPlan {\n mode: 'legacy-full' | 'virtual-window';\n filteredIndices: number[];\n filteredKeys: SelectKey[];\n intendedRenderKeys: SelectKey[];\n filteredIndexByKey: ReadonlyMap<SelectKey, number>;\n}\n\ninterface AcknowledgedProjectionDiagnostic {\n requestId: string;\n queryGeneration: number;\n message: string;\n}\n\nconst LEGACY_DATA_LOADING_CONFIG: ResolvedDataLoadingConfig = {\n protocol: 'legacy',\n searchMode: 'local',\n paginationMode: 'page',\n firstPage: 1,\n};\n\nconst DATA_LOADING_CONFIG_FIELDS = ['protocol', 'searchMode', 'paginationMode', 'firstPage', 'fetchLimit'] as const;\nconst INVALID_OBJECT_VALUE = Object.freeze({ kind: 'object' });\nconst INVALID_ARRAY_VALUE = Object.freeze({ kind: 'array' });\nconst INVALID_FUNCTION_VALUE = Object.freeze({ kind: 'function' });\n\ninterface InvalidDataLoadingCandidateSignature {\n readonly rootKind: string;\n readonly rootValue: unknown;\n readonly fieldValues: readonly unknown[];\n readonly issues: readonly (readonly [string, string, string])[];\n}\n\nfunction invalidConfigValueSignature(value: unknown): unknown {\n if (value === null || (typeof value !== 'object' && typeof value !== 'function')) return value;\n if (typeof value === 'function') return INVALID_FUNCTION_VALUE;\n return Array.isArray(value) ? INVALID_ARRAY_VALUE : INVALID_OBJECT_VALUE;\n}\n\nfunction createInvalidDataLoadingCandidateSignature(\n candidate: unknown,\n issues: readonly DataLoadingConfigErrorDetail['issues'][number][],\n): InvalidDataLoadingCandidateSignature {\n const candidatePrototype = candidate !== null && typeof candidate === 'object'\n ? Object.getPrototypeOf(candidate)\n : undefined;\n const isRecord = candidate !== null\n && typeof candidate === 'object'\n && !Array.isArray(candidate)\n && (candidatePrototype === Object.prototype || candidatePrototype === null);\n const recordCandidate = isRecord ? candidate as Record<string, unknown> : undefined;\n const rootKind = isRecord\n ? 'record'\n : candidate === null\n ? 'null'\n : Array.isArray(candidate)\n ? 'array'\n : typeof candidate;\n\n return {\n rootKind,\n rootValue: candidate === null || typeof candidate !== 'object' ? candidate : undefined,\n // Compare at most five supported field values. Unknown fields are represented by their\n // validation issues below; their values are invalid regardless of shape. Signature work is\n // therefore independent of nested-value depth (and linear only in the already-built issue list).\n fieldValues: recordCandidate\n ? DATA_LOADING_CONFIG_FIELDS.map((field) => invalidConfigValueSignature(recordCandidate[field]))\n : [],\n issues: issues.map(({ path, code, message }) => [path, code, message] as const),\n };\n}\n\nfunction invalidDataLoadingSignaturesEqual(\n left: InvalidDataLoadingCandidateSignature,\n right: InvalidDataLoadingCandidateSignature,\n): boolean {\n if (left.rootKind !== right.rootKind || !Object.is(left.rootValue, right.rootValue)) return false;\n if (left.fieldValues.length !== right.fieldValues.length || left.issues.length !== right.issues.length) return false;\n for (let index = 0; index < left.fieldValues.length; index += 1) {\n if (!Object.is(left.fieldValues[index], right.fieldValues[index])) return false;\n }\n for (let index = 0; index < left.issues.length; index += 1) {\n const leftIssue = left.issues[index];\n const rightIssue = right.issues[index];\n if (leftIssue[0] !== rightIssue[0] || leftIssue[1] !== rightIssue[1] || leftIssue[2] !== rightIssue[2]) {\n return false;\n }\n }\n return true;\n}\n\nexport class EnhancedSelect extends HTMLElement implements EnhancedSelectAcknowledgedSurface {\n static get observedAttributes(): string[] {\n return ['aria-label', 'aria-description', 'aria-busy'];\n }\n\n /** live set of all connected instances; used to auto-close siblings */\n private static _instances: Set<EnhancedSelect> = new Set();\n private static readonly _MIRRORED_STYLES_SCOPE_CLASS = 'smilodon-mirrored-styles-scope';\n private static readonly _MIRRORED_STYLESHEET_CACHE_LIMIT = 32;\n private static readonly _mirroredStylesheetTextCache = new Map<string, {\n promise: Promise<string | null>;\n lastUsed: number;\n }>();\n\n private _config: GlobalSelectConfig;\n private _dataLoadingConfig: ResolvedDataLoadingConfig = { ...LEGACY_DATA_LOADING_CONFIG };\n private _dataLoadingConfigErrorCallback?: (detail: DataLoadingConfigErrorDetail) => void;\n private _dataRequestCancelCallback?: (detail: DataRequestCancelNotification) => void;\n private _dataProjectionCallback?: (detail: DataProjectionEventDetail) => void;\n private _hasLastInvalidDataLoadingCandidate = false;\n private _lastInvalidDataLoadingCandidate?: InvalidDataLoadingCandidateSignature;\n private _shadow: ShadowRoot;\n private _container: HTMLElement;\n private _inputContainer: HTMLElement;\n private _inputContent: HTMLElement;\n private _input: HTMLInputElement;\n private _dropdown: HTMLElement;\n private _optionsContainer: HTMLElement;\n private _loadMoreTrigger?: HTMLElement;\n private _acknowledgedSentinel?: HTMLDivElement;\n private _busyBucket?: HTMLElement;\n private _liveRegion?: HTMLElement;\n private _errorDescription?: HTMLElement;\n private _state: SelectState;\n private _engine: SelectEngineBridge = new SelectEngineBridge();\n private _virtualizationScope: VirtualizationScope<SelectKey> = {\n dataKeys: [],\n filteredKeys: [],\n registeredKeys: [],\n windowKeys: [],\n mountedKeys: [],\n selectedKeys: new Set(),\n activeKey: null,\n };\n private _renderPlan: EnhancedSelectRenderPlan = {\n mode: 'legacy-full',\n filteredIndices: [],\n filteredKeys: [],\n intendedRenderKeys: [],\n filteredIndexByKey: new Map(),\n };\n // Null keeps the public/default renderer on its legacy full path. This\n // private state is only used by guarded virtualization integration.\n private _guardedVirtualWindow: { startIndex: number; endIndex: number } | null = null;\n private _guardedVirtualizer: Virtualizer | null = null;\n private _guardedVirtualizationRequested = false;\n private _guardedVirtualizerKeys: SelectKey[] = [];\n private _guardedMeasurementQuery: string | null = null;\n private _guardedOptionResizeObserver: ResizeObserver | null = null;\n private _guardedObservedOptions = new Set<HTMLElement>();\n private _guardedObserverSeenOptions = new WeakSet<HTMLElement>();\n private _guardedOptionMeasurements = new WeakMap<HTMLElement, { key: SelectKey; index: number; generation: number }>();\n private _guardedMeasurementGeneration = 0;\n private _guardedVirtualScrollTop = 0;\n private _guardedVirtualViewportHeight = 0;\n private _guardedVirtualOverscan = 0;\n private _guardedVirtualWindowRafId: number | null = null;\n private _guardedScrollListenerAttached = false;\n private _onGuardedVirtualScroll = (): void => this._scheduleGuardedVirtualWindowUpdate();\n private _effectRunner = new DefaultSelectEffectRunner();\n private _itemAdapter: ItemAdapter<unknown, SelectKey> = this._createEngineItemAdapter();\n private _itemRegistry: ItemRegistry<unknown, SelectKey> = createItemRegistry([], this._itemAdapter);\n // Engine selectedKeys owns identity. The registry resolves current records;\n // this cache keeps the last known record available while a selected key is detached.\n private _selectedRecordsByKey = new Map<SelectKey, ItemRecord<unknown, SelectKey>>();\n private _registryItemsRef: unknown[] = [];\n private _pageCache: PageCache = {};\n // One coordinator owns both acknowledged and legacy-adjacent lifecycle state;\n // the public protocol remains explicitly opt-in and legacy remains default.\n private _dataRequestCoordinator: DataRequestCoordinator | null = null;\n private _acknowledgedSearchMode: DataSearchMode | null = null;\n private _acknowledgedReady = false;\n private _acknowledgedDeferredStart = false;\n private _hasEverConnected = false;\n private _acknowledgedStartTask: Promise<void> | null = null;\n private _clearAcknowledgedCoordinatorAfterProjection = false;\n private _acknowledgedConfigUpdatePending = false;\n private _acknowledgedDeferredModeChange = false;\n private _acknowledgedProjectionPending = false;\n private _acknowledgedProjectionSettling = false;\n private _acknowledgedPendingSearchQuery: string | null = null;\n private _acknowledgedProjectionFailureStageForTest: 'before-publish' | 'after-publish' | null = null;\n private _acknowledgedProjectionRunning = false;\n private _acknowledgedProjectionTask: Promise<void> | null = null;\n private _acknowledgedProjectionScrollTop = 0;\n private _acknowledgedLastRequest: DataRequest | null = null;\n private _acknowledgedProjectionCommitsPosition = false;\n private _acknowledgedProjectionRequest: DataRequest | null = null;\n private _acknowledgedProjectionAttempt = 0;\n private _acknowledgedProjectionDiagnostic: AcknowledgedProjectionDiagnostic | null = null;\n private _resizeObserver?: ResizeObserver;\n private _intersectionObserver?: IntersectionObserver;\n private _busyTimeout?: number;\n private _searchTimeout?: number;\n private _typeBuffer = '';\n private _typeTimeout?: number;\n private _uniqueId: string;\n private _hasError = false;\n private _errorMessage = '';\n private _boundArrowClick: ((e: Event) => void) | null = null;\n private _arrowContainer?: HTMLElement;\n private _clearControl?: HTMLButtonElement;\n private _clearControlIcon?: HTMLElement;\n private _pendingFirstRenderMark = false;\n private _pendingSearchRenderMark = false;\n private _rangeAnchorIndex: number | null = null;\n private _optionRenderer?: OptionRendererFn;\n private _groupHeaderRenderer?: import('../types.js').GroupHeaderRenderer;\n private _classMap?: ClassMap;\n private _rendererHelpers: RendererHelpers;\n private _customOptionBoundElements = new WeakSet<HTMLElement>();\n private _customOptionNormalizedIds = new WeakMap<HTMLElement, string>();\n private _customOptionNormalizedLabels = new WeakMap<HTMLElement, string>();\n private _mirrorGlobalStylesForCustomOptions = false;\n private _globalStylesObserver: MutationObserver | null = null;\n private _globalStylesContainer: HTMLElement | null = null;\n private _themeContextObserver: MutationObserver | null = null;\n private _globalStylesSyncToken = 0;\n private _connectionController?: AbortController;\n private _asyncGeneration = 0;\n private _lifecycleTimers = new Set<number>();\n private _lifecycleRafs = new Set<number>();\n private _keyboardActiveChangeGeneration = 0;\n private _tracking: TrackingSnapshot = { events: [], styles: [], limitations: [] };\n private _suppressBlurClose = false;\n private _renderCycleId = 0;\n private _completedRenderCycleId = 0;\n private _renderCycleWaiters = new Map<number, (completed: boolean) => void>();\n private _renderCycleWaiterTimeouts = new Map<number, number>();\n private _suppressNextOpenClick = false;\n private _resolvedDropdownPlacement: 'bottom' | 'top' = 'bottom';\n private _multiScrollDrag = {\n active: false,\n moved: false,\n pointerId: -1,\n startX: 0,\n startScrollLeft: 0,\n };\n private _liftedAncestors: Array<{\n element: HTMLElement;\n position: string;\n zIndex: string;\n hadMarker: boolean;\n }> = [];\n\n private _onDocumentPointerDown = (e: PointerEvent): void => {\n const path = (e.composedPath && e.composedPath()) || [];\n let clickedInside = false;\n\n for (const node of path as any[]) {\n if (node === this || node === this._container) {\n clickedInside = true;\n break;\n }\n\n if (node instanceof Node) {\n try {\n if (this._shadow && this._shadow.contains(node as Node)) {\n clickedInside = true;\n break;\n }\n } catch (err) {\n // ignore\n }\n }\n\n if (node instanceof Element) {\n try {\n if (node.matches('[data-sm-selectable], [data-selectable], [data-sm-state], .input-container, .select-container, .dropdown-arrow-container, .clear-control-button')) {\n clickedInside = true;\n break;\n }\n } catch (err) {\n // ignore\n }\n }\n }\n\n if (!clickedInside) {\n this._handleClose('outside-pointer');\n }\n };\n\n get classMap(): ClassMap | undefined {\n return this._classMap;\n }\n\n set classMap(map: ClassMap | undefined) {\n if (this._areClassMapsEqual(this._classMap, map)) return;\n\n this._invalidateGuardedMeasurements();\n this._classMap = map;\n this._setGlobalStylesMirroring(Boolean(this._optionRenderer || map || this._groupHeaderRenderer));\n this._track('style', 'classMapChanged', {\n hasClassMap: Boolean(map),\n keys: map ? Object.keys(map) : [],\n });\n\n if (!this.isConnected) return;\n this._renderOptions();\n }\n\n /**\n * DOM-based renderer for group headers. When provided, the component will\n * call this function for each group during rendering. The returned element\n * will receive `.group-header` and `part=\"group-header\"` automatically.\n */\n get groupHeaderRenderer(): import('../types.js').GroupHeaderRenderer | undefined {\n return this._groupHeaderRenderer;\n }\n\n set groupHeaderRenderer(renderer: import('../types.js').GroupHeaderRenderer | undefined) {\n if (this._groupHeaderRenderer === renderer) return;\n\n this._groupHeaderRenderer = renderer;\n this._setGlobalStylesMirroring(Boolean(this._optionRenderer || this._classMap || renderer));\n this._track('style', 'groupHeaderRendererChanged', { enabled: Boolean(renderer) });\n\n if (!this.isConnected) return;\n this._renderOptions();\n }\n\n constructor() {\n super();\n \n this._shadow = this.attachShadow({ mode: 'open' });\n this._uniqueId = `enhanced-select-${Math.random().toString(36).substr(2, 9)}`;\n this._rendererHelpers = this._buildRendererHelpers();\n \n // Merge global config with component-level config\n this._config = selectConfig.getConfig() as GlobalSelectConfig;\n this._engine.dispatch({ type: 'DISABLED_CHANGED', disabled: !this._config.enabled });\n this._syncEngineSelectionConfig();\n \n // Initialize state\n const host = this;\n this._state = {\n get isOpen() {\n return host._engine.state.popup === 'open';\n },\n isBusy: false,\n isSearching: false,\n currentPage: this._config.infiniteScroll.initialPage || 1,\n totalPages: 1,\n selectedIndices: new Set(),\n selectedItems: new Map(),\n activeIndex: -1,\n searchQuery: '',\n loadedItems: [],\n groupedItems: [],\n preserveScrollPosition: false,\n lastScrollPosition: 0,\n lastNotifiedQuery: null,\n lastNotifiedResultCount: 0,\n isExpanded: false,\n };\n \n // Create DOM structure\n this._container = this._createContainer();\n this._inputContainer = this._createInputContainer();\n this._inputContent = this._createInputContent();\n this._input = this._createInput();\n this._arrowContainer = this._createArrowContainer();\n this._clearControl = this._createClearControl();\n this._dropdown = this._createDropdown();\n this._optionsContainer = this._createOptionsContainer();\n this._liveRegion = this._createLiveRegion();\n this._errorDescription = this._createErrorDescription();\n \n // Initialize styles BEFORE assembling DOM (order matters in shadow DOM)\n this._initializeStyles();\n this._syncStyleConfigVariables();\n // NOTE: _syncDirectionConfig moved to connectedCallback to comply with Web Components spec\n // (cannot call setAttribute on host element in constructor)\n this._assembleDOM();\n this._attachEventListeners();\n this._initializeObservers();\n this._syncComboboxAccessibility();\n this._syncListboxAccessibility();\n }\n\n connectedCallback(): void {\n this._hasEverConnected = true;\n // register instance\n EnhancedSelect._instances.add(this);\n this._runEngineEffects(this._engine.dispatch({ type: 'CONNECT' }));\n this._runEngineEffects(this._engine.dispatch({ type: 'DISABLED_CHANGED', disabled: !this._config.enabled }));\n this._connectionController?.abort();\n this._connectionController = new AbortController();\n document.addEventListener('pointerdown', this._onDocumentPointerDown, {\n signal: this._connectionController.signal,\n });\n\n // WORKAROUND: Force display style on host element for Angular compatibility\n // Angular's rendering seems to not apply :host styles correctly in some cases\n // Must be done in connectedCallback when element is attached to DOM\n this.style.display = 'block';\n \n // Sync direction attribute (must be in connectedCallback, not constructor)\n this._syncDirectionConfig();\n this._syncComboboxAccessibility();\n\n if (this._dataRequestCoordinator || this._dataLoadingConfig.protocol === 'acknowledged') {\n // Acknowledged dispatch remains behind the explicit readiness\n // gate; reconnect only restores observer ownership here.\n this._initializeObservers();\n }\n\n if (this._optionRenderer || this._classMap || this._groupHeaderRenderer) {\n this._setGlobalStylesMirroring(true);\n }\n \n // Load initial data if server-side is enabled\n if (this._config.serverSide.enabled && this._config.serverSide.initialSelectedValues) {\n this._loadInitialSelectedItems();\n }\n\n // Re-render options after connect so SelectOption instances created while\n // disconnected (common in Vue/Nuxt client mounting) receive connectedCallback.\n if (this._state.loadedItems.length > 0 || this._state.groupedItems.length > 0) {\n this._renderOptions();\n this._updateInputDisplay();\n }\n \n // Emit open event if configured to start open\n if (this._config.callbacks.onOpen) {\n this._config.callbacks.onOpen();\n }\n\n if (this._acknowledgedDeferredStart) {\n this._acknowledgedDeferredStart = false;\n this.startDataLoading();\n }\n }\n\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void {\n if (oldValue === newValue) return;\n if (name === 'aria-busy') {\n this._syncListboxAccessibility();\n return;\n }\n if (name !== 'aria-label' && name !== 'aria-description') return;\n this._syncComboboxAccessibility();\n if (name === 'aria-label') this._syncListboxAccessibility();\n }\n\n disconnectedCallback(): void {\n if (this._dataRequestCoordinator) {\n const actions = this._dataRequestCoordinator.disconnect();\n this._acknowledgedReady = false;\n this._dispatchAcknowledgedActions(actions);\n this._state.isBusy = false;\n this._state.isSearching = false;\n this._state.preserveScrollPosition = false;\n }\n\n // unregister instance\n EnhancedSelect._instances.delete(this);\n if (this._state.isOpen) {\n this._handleClose('disconnect');\n }\n this._runEngineEffects(this._engine.dispatch({ type: 'DISCONNECT' }));\n this._connectionController?.abort();\n this._connectionController = undefined;\n this._asyncGeneration += 1;\n this._cancelGuardedVirtualWindowUpdate();\n this._clearLifecycleTasks();\n this._destroyGuardedVirtualizer(true);\n this._virtualizationScope = {\n ...this._virtualizationScope,\n mountedKeys: [],\n };\n Array.from(this._optionsContainer.children)\n .filter((element) => element.hasAttribute('data-index') || element.hasAttribute('data-virtual-spacer'))\n .forEach((element) => element.remove());\n\n // Cleanup observers\n this._resizeObserver?.disconnect();\n this._intersectionObserver?.disconnect();\n if (this._busyTimeout) clearTimeout(this._busyTimeout);\n if (this._typeTimeout) clearTimeout(this._typeTimeout);\n if (this._searchTimeout) clearTimeout(this._searchTimeout);\n this._endMultiScrollDrag();\n \n // Cleanup arrow click listener\n if (this._boundArrowClick && this._arrowContainer) {\n this._arrowContainer.removeEventListener('click', this._boundArrowClick);\n }\n\n this._renderCycleId += 1;\n this._resolvePendingRenderCycles(false);\n\n this._teardownGlobalStylesMirroring();\n }\n\n private _setGlobalStylesMirroring(enabled: boolean): void {\n if (this._mirrorGlobalStylesForCustomOptions === enabled) {\n if (enabled && this.isConnected && !this._globalStylesObserver) {\n this._setupGlobalStylesMirroring();\n }\n return;\n }\n\n this._mirrorGlobalStylesForCustomOptions = enabled;\n this._track('style', 'globalStylesMirroringChanged', { enabled });\n\n if (enabled) {\n this._setupGlobalStylesMirroring();\n } else {\n this._teardownGlobalStylesMirroring();\n }\n }\n\n private _setLifecycleTimeout(callback: () => void, delay = 0): number {\n const id = window.setTimeout(() => {\n this._lifecycleTimers.delete(id);\n if (!this.isConnected) return;\n callback();\n }, delay);\n this._lifecycleTimers.add(id);\n return id;\n }\n\n private _requestLifecycleFrame(callback: () => void): number {\n const id = requestAnimationFrame(() => {\n this._lifecycleRafs.delete(id);\n if (!this.isConnected) return;\n callback();\n });\n this._lifecycleRafs.add(id);\n return id;\n }\n\n private _clearLifecycleTasks(): void {\n for (const id of this._lifecycleTimers) {\n clearTimeout(id);\n }\n this._lifecycleTimers.clear();\n\n for (const id of this._lifecycleRafs) {\n cancelAnimationFrame(id);\n }\n this._lifecycleRafs.clear();\n }\n\n private _setupGlobalStylesMirroring(): void {\n if (typeof document === 'undefined') return;\n if (!this._mirrorGlobalStylesForCustomOptions) return;\n\n this._setupThemeContextMirroring();\n this._mirrorDocumentStylesIntoShadow();\n\n if (this._globalStylesObserver) return;\n\n this._globalStylesObserver = new MutationObserver(() => {\n this._mirrorDocumentStylesIntoShadow();\n });\n\n this._globalStylesObserver.observe(document.head, {\n childList: true,\n subtree: true,\n attributes: true,\n characterData: true,\n });\n }\n\n private _teardownGlobalStylesMirroring(): void {\n if (this._globalStylesObserver) {\n this._globalStylesObserver.disconnect();\n this._globalStylesObserver = null;\n }\n\n if (this._themeContextObserver) {\n this._themeContextObserver.disconnect();\n this._themeContextObserver = null;\n }\n\n if (this._globalStylesContainer) {\n this._globalStylesContainer.remove();\n this._globalStylesContainer = null;\n }\n }\n\n private _mirrorDocumentStylesIntoShadow(): void {\n if (typeof document === 'undefined') return;\n if (!this._mirrorGlobalStylesForCustomOptions) return;\n\n if (!this._globalStylesContainer) {\n this._globalStylesContainer = document.createElement('div');\n this._globalStylesContainer.setAttribute('data-smilodon-global-styles', '');\n this._shadow.appendChild(this._globalStylesContainer);\n }\n\n const container = this._globalStylesContainer;\n const syncToken = ++this._globalStylesSyncToken;\n const styleNodes = Array.from(document.querySelectorAll('style,link[rel=\"stylesheet\"]'));\n\n void Promise.all(styleNodes.map((node, index) => this._createScopedGlobalStyleNode(node, index))).then((mirroredNodes) => {\n if (!this._globalStylesContainer || syncToken !== this._globalStylesSyncToken) return;\n container.replaceChildren(...mirroredNodes.filter((node): node is Node => Boolean(node)));\n this._syncMirroredThemeContext();\n });\n }\n\n private _setupThemeContextMirroring(): void {\n if (typeof document === 'undefined') return;\n\n this._syncMirroredThemeContext();\n\n if (this._themeContextObserver) return;\n\n this._themeContextObserver = new MutationObserver(() => {\n this._syncMirroredThemeContext();\n });\n\n const targets = new Set<Node>([this, document.documentElement]);\n if (document.body) {\n targets.add(document.body);\n }\n\n let ancestor: HTMLElement | null = this.parentElement;\n while (ancestor) {\n targets.add(ancestor);\n ancestor = ancestor.parentElement;\n }\n\n targets.forEach((target) => {\n this._themeContextObserver?.observe(target, {\n attributes: true,\n attributeFilter: ['class', 'dark-mode', 'darkmode', 'data-theme', 'theme'],\n });\n });\n }\n\n private _syncMirroredThemeContext(): void {\n const scopeTarget = this._optionsContainer;\n if (!scopeTarget) return;\n\n const darkSelectors = [\n '.dark-mode',\n '.dark',\n '[dark-mode]',\n '[darkmode]',\n '[data-theme=\"dark\"]',\n '[theme=\"dark\"]',\n ];\n\n const isDark = darkSelectors.some((selector) => this.matches(selector) || Boolean(this.closest(selector)))\n || document.documentElement.matches('.dark-mode, .dark, [dark-mode], [darkmode], [data-theme=\"dark\"], [theme=\"dark\"]')\n || Boolean(document.body?.matches('.dark-mode, .dark, [dark-mode], [darkmode], [data-theme=\"dark\"], [theme=\"dark\"]'));\n\n scopeTarget.classList.toggle('dark', isDark);\n scopeTarget.classList.toggle('dark-mode', isDark);\n\n if (isDark) {\n scopeTarget.setAttribute('dark-mode', '');\n scopeTarget.setAttribute('data-theme', 'dark');\n scopeTarget.setAttribute('theme', 'dark');\n } else {\n scopeTarget.removeAttribute('dark-mode');\n scopeTarget.removeAttribute('data-theme');\n scopeTarget.removeAttribute('theme');\n }\n }\n\n private async _createScopedGlobalStyleNode(node: Element, index: number): Promise<Node | null> {\n if (node instanceof HTMLStyleElement) {\n return this._buildScopedStyleElement(node.textContent || '', String(index));\n }\n\n if (node instanceof HTMLLinkElement && node.href) {\n const credentials: RequestCredentials = node.crossOrigin === 'use-credentials' ? 'include' : 'same-origin';\n const cacheKey = `${node.href}|${credentials}`;\n let cacheEntry = EnhancedSelect._mirroredStylesheetTextCache.get(cacheKey);\n\n if (!cacheEntry) {\n cacheEntry = {\n promise: fetch(node.href, {\n credentials,\n mode: 'cors',\n })\n .then((response) => {\n if (!response.ok) return null;\n return response.text();\n })\n .catch(() => null),\n lastUsed: Date.now(),\n };\n\n EnhancedSelect._mirroredStylesheetTextCache.set(cacheKey, cacheEntry);\n EnhancedSelect._pruneMirroredStylesheetTextCache();\n } else {\n cacheEntry.lastUsed = Date.now();\n }\n\n const cssText = await cacheEntry.promise;\n if (cssText === null) {\n EnhancedSelect._mirroredStylesheetTextCache.delete(cacheKey);\n return null;\n }\n\n return this._buildScopedStyleElement(cssText, String(index));\n }\n\n return null;\n }\n\n private static _pruneMirroredStylesheetTextCache(): void {\n while (EnhancedSelect._mirroredStylesheetTextCache.size > EnhancedSelect._MIRRORED_STYLESHEET_CACHE_LIMIT) {\n let lruKey: string | undefined;\n let oldest = Infinity;\n\n for (const [key, entry] of EnhancedSelect._mirroredStylesheetTextCache.entries()) {\n if (entry.lastUsed < oldest) {\n oldest = entry.lastUsed;\n lruKey = key;\n }\n }\n\n if (!lruKey) return;\n EnhancedSelect._mirroredStylesheetTextCache.delete(lruKey);\n }\n }\n\n private _areClassMapsEqual(left: ClassMap | undefined, right: ClassMap | undefined): boolean {\n if (left === right) return true;\n if (!left || !right) return false;\n\n const leftKeys = Object.keys(left);\n const rightKeys = Object.keys(right);\n if (leftKeys.length !== rightKeys.length) return false;\n\n return leftKeys.every((key) => left[key] === right[key]);\n }\n\n private _buildScopedStyleElement(cssText: string, id: string): HTMLStyleElement | null {\n const scopedCss = this._scopeMirroredCssText(cssText);\n if (!scopedCss.trim()) return null;\n\n const style = document.createElement('style');\n style.setAttribute('data-smilodon-global-style', id);\n style.textContent = scopedCss;\n return style;\n }\n\n private _scopeMirroredCssText(cssText: string): string {\n if (!cssText.trim()) return '';\n\n try {\n if (typeof CSSStyleSheet !== 'undefined' && 'replaceSync' in CSSStyleSheet.prototype) {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(cssText);\n return this._serializeScopedCssRules(Array.from(sheet.cssRules));\n }\n } catch (_error) {\n // CSSStyleSheet API failed, use fallback parser for test environments (JSDOM)\n return this._scopeMirroredCssTextFallback(cssText);\n }\n\n // Fallback for environments without CSSStyleSheet.replaceSync\n return this._scopeMirroredCssTextFallback(cssText);\n }\n\n /**\n * Fallback CSS parser for environments where CSSStyleSheet API is unavailable (e.g., JSDOM).\n * Performs simple text-based CSS rule scoping.\n */\n private _scopeMirroredCssTextFallback(cssText: string): string {\n if (!cssText.trim()) return '';\n \n const result: string[] = [];\n \n // Match CSS rules with a simple regex (handles basic cases for testing)\n // This won't handle all edge cases but works for common CSS patterns\n const ruleRegex = /([^{}]+)\\{([^{}]+)\\}/g;\n let match;\n \n while ((match = ruleRegex.exec(cssText)) !== null) {\n const selectorText = match[1].trim();\n const declarations = match[2].trim();\n \n // Skip @-rules (media, keyframes, etc.) - would need more complex parsing\n if (selectorText.startsWith('@')) {\n continue;\n }\n \n // Split multiple selectors and scope each one\n const selectors = this._splitSelectorList(selectorText)\n .map((selector) => this._scopeMirroredSelector(selector))\n .filter(Boolean);\n \n if (selectors.length > 0) {\n result.push(`${selectors.join(', ')} { ${declarations} }`);\n }\n }\n \n return result.join('\\n');\n }\n\n private _serializeScopedCssRules(rules: CSSRule[]): string {\n return rules.map((rule) => this._serializeScopedCssRule(rule)).filter(Boolean).join('\\n');\n }\n\n private _serializeScopedCssRule(rule: CSSRule): string {\n if (rule instanceof CSSStyleRule) {\n const selectors = this._splitSelectorList(rule.selectorText)\n .map((selector) => this._scopeMirroredSelector(selector))\n .filter(Boolean);\n\n if (selectors.length === 0) return '';\n return `${selectors.join(', ')} { ${rule.style.cssText} }`;\n }\n\n if (rule instanceof CSSMediaRule) {\n const nested = this._serializeScopedCssRules(Array.from(rule.cssRules));\n return nested ? `@media ${rule.conditionText} { ${nested} }` : '';\n }\n\n if (typeof CSSSupportsRule !== 'undefined' && rule instanceof CSSSupportsRule) {\n const nested = this._serializeScopedCssRules(Array.from(rule.cssRules));\n return nested ? `@supports ${rule.conditionText} { ${nested} }` : '';\n }\n\n if (rule instanceof CSSFontFaceRule || rule instanceof CSSKeyframesRule) {\n return rule.cssText;\n }\n\n const nestedRule = rule as CSSRule & { cssRules?: CSSRuleList; name?: string; conditionText?: string };\n if (nestedRule.cssRules) {\n const nested = this._serializeScopedCssRules(Array.from(nestedRule.cssRules));\n if (!nested) return '';\n\n const ctorName = nestedRule.constructor?.name ?? '';\n if (ctorName.includes('Layer')) {\n return `@layer ${nestedRule.name ?? ''} { ${nested} }`;\n }\n if (ctorName.includes('Container')) {\n return `@container ${nestedRule.conditionText ?? ''} { ${nested} }`;\n }\n }\n\n return '';\n }\n\n private _splitSelectorList(selectorText: string): string[] {\n const selectors: string[] = [];\n let current = '';\n let depthRound = 0;\n let depthSquare = 0;\n\n for (const char of selectorText) {\n if (char === '(') depthRound += 1;\n if (char === ')') depthRound = Math.max(0, depthRound - 1);\n if (char === '[') depthSquare += 1;\n if (char === ']') depthSquare = Math.max(0, depthSquare - 1);\n\n if (char === ',' && depthRound === 0 && depthSquare === 0) {\n if (current.trim()) selectors.push(current.trim());\n current = '';\n continue;\n }\n\n current += char;\n }\n\n if (current.trim()) selectors.push(current.trim());\n return selectors;\n }\n\n private _scopeMirroredSelector(selector: string): string {\n const scopeClass = `.${EnhancedSelect._MIRRORED_STYLES_SCOPE_CLASS}`;\n\n let scopedSelector = selector\n .replace(/(^|\\s|>|\\+|~)(:root|html|body)(?=\\b|\\s|[.#[:>+~]|$)/g, `$1${scopeClass}`);\n\n const themePatterns = [\n /\\.dark-mode(?![\\w-]|\\\\:)/g,\n /\\.dark(?![\\w-]|\\\\:)/g,\n /\\[dark-mode\\]/g,\n /\\[darkmode\\]/g,\n /\\[data-theme=(?:\"dark\"|'dark'|dark)\\]/g,\n /\\[theme=(?:\"dark\"|'dark'|dark)\\]/g,\n ];\n\n let injectedThemeScope = false;\n themePatterns.forEach((pattern) => {\n scopedSelector = scopedSelector.replace(pattern, (match) => {\n injectedThemeScope = true;\n return `${match}${scopeClass}`;\n });\n });\n\n if (!scopedSelector.includes(EnhancedSelect._MIRRORED_STYLES_SCOPE_CLASS) && !injectedThemeScope) {\n scopedSelector = `${scopeClass} ${scopedSelector}`;\n }\n\n return scopedSelector;\n }\n\n private _normalizeCustomOptionAccessibility(optionEl: HTMLElement, meta: {\n label: string;\n disabled: boolean;\n }): void {\n const previousNormalizedLabel = this._customOptionNormalizedLabels.get(optionEl);\n const currentAriaLabel = optionEl.getAttribute('aria-label');\n const canRefreshNormalizedLabel = previousNormalizedLabel !== undefined\n && currentAriaLabel === previousNormalizedLabel;\n if (!optionEl.hasAttribute('aria-labelledby') && (!currentAriaLabel || canRefreshNormalizedLabel)) {\n optionEl.setAttribute('aria-label', meta.label);\n this._customOptionNormalizedLabels.set(optionEl, meta.label);\n } else {\n this._customOptionNormalizedLabels.delete(optionEl);\n }\n\n const nestedFocusableSelectors = [\n 'a[href]',\n 'button',\n 'input',\n 'select',\n 'textarea',\n 'summary',\n '[tabindex]',\n '[contenteditable=\"\"]',\n '[contenteditable=\"true\"]',\n '[role=\"button\"]',\n '[role=\"link\"]',\n '[role=\"checkbox\"]',\n '[role=\"switch\"]',\n '[role=\"radio\"]',\n '[role=\"textbox\"]',\n ].join(', ');\n\n optionEl.querySelectorAll<HTMLElement>(nestedFocusableSelectors).forEach((child) => {\n if (child === optionEl) return;\n\n child.tabIndex = -1;\n\n if (!child.hasAttribute('data-smilodon-keep-role')) {\n child.setAttribute('role', 'presentation');\n }\n\n if ((meta.disabled || child.matches('button, input, select, textarea, summary, a[href]')) && !child.hasAttribute('data-smilodon-keep-aria')) {\n child.setAttribute('aria-hidden', 'true');\n }\n });\n }\n\n private _createContainer(): HTMLElement {\n const container = document.createElement('div');\n container.className = 'select-container';\n \n if (this._config.styles.classNames?.container) {\n container.className += ' ' + this._config.styles.classNames.container;\n }\n \n if (this._config.styles.container) {\n Object.assign(container.style, this._config.styles.container);\n }\n \n return container;\n }\n\n private _createInputContainer(): HTMLElement {\n const container = document.createElement('div');\n container.className = 'input-container';\n container.setAttribute('part', 'button');\n\n const inputStyles = this._config.styles.input;\n if (inputStyles && !this._config.styles.container) {\n const shellStyleKeys = [\n 'background',\n 'backgroundColor',\n 'border',\n 'borderColor',\n 'borderStyle',\n 'borderWidth',\n 'borderRadius',\n 'boxShadow',\n 'padding',\n 'height',\n 'minHeight',\n 'maxHeight',\n ] as const;\n\n for (const key of shellStyleKeys) {\n const value = (inputStyles as any)[key];\n if (value != null && value !== '') {\n (container.style as any)[key] = value;\n }\n }\n }\n\n return container;\n }\n\n private _createInputContent(): HTMLElement {\n const content = document.createElement('div');\n content.className = 'input-content';\n return content;\n }\n\n private _setCssVariable(name: string, value: unknown): void {\n if (value == null || value === '') {\n this.style.removeProperty(name);\n return;\n }\n\n this.style.setProperty(name, String(value));\n }\n\n private _applyStyleVariableMap(\n styleConfig: Record<string, unknown> | undefined,\n variableMap: Record<string, string>,\n ): void {\n Object.entries(variableMap).forEach(([styleKey, variableName]) => {\n this._setCssVariable(variableName, (styleConfig as Record<string, unknown> | undefined)?.[styleKey]);\n });\n }\n\n private _getDisabledOptionBehavior() {\n const behavior = this._config.selection.disabledOptionBehavior ?? {};\n return {\n selectable: behavior.selectable === true,\n hoverable: behavior.hoverable === true,\n focusable: behavior.focusable === true,\n };\n }\n\n private _isDisabledOptionSelectable(item: unknown): boolean {\n return Boolean((item as any)?.disabled) && this._getDisabledOptionBehavior().selectable;\n }\n\n private _isOptionSelectionBlocked(item: unknown): boolean {\n return Boolean((item as any)?.disabled) && !this._isDisabledOptionSelectable(item);\n }\n\n private _isPhase2DevRuntime(): boolean {\n const env = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV;\n return env !== 'production';\n }\n\n private _getDuplicateKeyPolicy(): DuplicateKeyPolicy {\n return this._isPhase2DevRuntime() ? 'throw' : 'warn';\n }\n\n private _warnPhase2(message: string): void {\n if (this._isPhase2DevRuntime() && typeof console !== 'undefined') {\n console.warn(message);\n }\n }\n\n private _getItemValue(item: unknown): unknown {\n return this._config.serverSide.getValueFromItem?.(item) ?? (item as any)?.value ?? item;\n }\n\n private _getItemLabel(item: unknown): string {\n return this._config.serverSide.getLabelFromItem?.(item) ?? (item as any)?.label ?? String(item);\n }\n\n private _createEngineItemAdapter(): ItemAdapter<unknown, SelectKey> {\n return createDefaultItemAdapter({\n getValue: (item) => this._getItemValue(item),\n getLabel: (item) => this._getItemLabel(item),\n isDisabled: (item) => Boolean((item as any)?.disabled),\n getGroupKey: (item) => {\n const group = (item as { group?: unknown } | null)?.group;\n return group == null ? null : String(group);\n },\n onIndexFallback: (message) => this._warnPhase2(message),\n });\n }\n\n private _getBlockedDisabledKeys(): SelectKey[] {\n const keys = this._itemRegistry.records\n .filter((record) => record.disabled && this._isOptionSelectionBlocked(record.item))\n .map((record) => record.key);\n for (const entry of this._getSelectedEntries()) {\n if (this._isOptionSelectionBlocked(entry.item)) keys.push(entry.key);\n }\n return keys;\n }\n\n private _syncEngineSelectionConfig(): void {\n const required = Boolean(this._input?.hasAttribute('required'));\n const disabledKeys = this._getBlockedDisabledKeys();\n this._engine.dispatch({\n type: 'SELECTION_CONFIG_CHANGED',\n multiple: this._config.selection.mode === 'multi',\n required,\n allowDeselect: this._config.selection.allowDeselect === true,\n maxSelections: this._config.selection.maxSelections ?? 0,\n disabledKeys,\n });\n if (this._state) {\n this._syncLegacySelectionFromEngine();\n this._syncLegacyActiveFromEngine();\n this._assertSelectionProjection('selection config');\n this._assertActiveProjection('selection config');\n }\n }\n\n private _rebuildItemRegistry(\n items: unknown[] = this._state.loadedItems,\n stagedRegistry?: ItemRegistry<unknown, SelectKey>,\n ): void {\n // Build first so duplicate-key rejection leaves the previous runtime intact.\n const registry = stagedRegistry ?? createItemRegistry(items, this._itemAdapter, {\n duplicateKeyPolicy: this._getDuplicateKeyPolicy(),\n });\n const activeKey = this._engine.state.activeKey;\n const anchorKey = this._rangeAnchorIndex === null ? undefined : this._itemRegistry.indexToKey.get(this._rangeAnchorIndex);\n this._itemRegistry = registry;\n this._state.loadedItems = items;\n this._registryItemsRef = items;\n const disabledKeys = this._getBlockedDisabledKeys();\n this._rangeAnchorIndex = anchorKey === undefined ? null : registry.keyToIndex.get(anchorKey) ?? null;\n this._engine.dispatch({\n type: 'ITEMS_REGISTERED',\n keys: registry.records.map((record) => record.key),\n disabledKeys,\n });\n if (activeKey !== null && registry.keyToRecord.get(activeKey)?.disabled) {\n this._dispatchActiveKey(null, 'programmatic', 'items registered with disabled active key');\n } else {\n this._syncLegacyActiveFromEngine();\n }\n this._syncLegacySelectionFromEngine();\n this._syncEngineSelectionConfig();\n this._assertSelectionProjection('items registered');\n }\n\n private _ensureRegistryCurrent(): void {\n if (\n this._registryItemsRef !== this._state.loadedItems\n || this._itemRegistry.records.length !== this._state.loadedItems.length\n || this._itemRegistry.records.some((record, index) => record.item !== this._state.loadedItems[index])\n ) {\n this._rebuildItemRegistry();\n return;\n }\n\n this._syncLegacySelectionFromEngine();\n this._syncLegacyActiveFromEngine();\n this._assertSelectionProjection('registry read');\n this._assertActiveProjection('registry read');\n }\n\n private _getRecordByIndex(index: number): ItemRecord<unknown, SelectKey> | null {\n const key = this._itemRegistry.indexToKey.get(index);\n return key === undefined ? null : this._itemRegistry.keyToRecord.get(key) ?? null;\n }\n\n private _getSelectedEntries(): LegacySelectedEntry[] {\n const entries: LegacySelectedEntry[] = [];\n if (!this._state) return entries;\n for (const key of this._engine.state.selectedKeys) {\n const record = this._itemRegistry.keyToRecord.get(key) ?? this._selectedRecordsByKey.get(key);\n if (record) entries.push({ key, index: record.index, item: record.item });\n }\n return entries;\n }\n\n private _syncLegacySelectionFromEngine(): void {\n const selectedIndices = new Set<number>();\n const selectedItems = new Map<number, unknown>();\n const selectedKeys = this._engine.state.selectedKeys;\n\n for (const key of [...this._selectedRecordsByKey.keys()]) {\n if (!selectedKeys.has(key)) this._selectedRecordsByKey.delete(key);\n }\n\n for (const key of selectedKeys) {\n const record = this._itemRegistry.keyToRecord.get(key);\n if (record) this._selectedRecordsByKey.set(key, record);\n if (!record) continue;\n selectedIndices.add(record.index);\n selectedItems.set(record.index, record.item);\n }\n\n this._state.selectedIndices = selectedIndices;\n this._state.selectedItems = selectedItems;\n }\n\n private _projectedSelectedKeysSnapshot(): Set<SelectKey> {\n return new Set([...this._state.selectedIndices]\n .map((index) => this._itemRegistry.indexToKey.get(index))\n .filter((key): key is SelectKey => key !== undefined));\n }\n\n private _assertSelectionProjection(context: string): void {\n if (!this._isPhase2DevRuntime()) return;\n const legacyKeys = this._projectedSelectedKeysSnapshot();\n const engineKeys = this._engine.state.selectedKeys;\n if (\n this._state.selectedItems.size !== this._state.selectedIndices.size\n || [...this._state.selectedIndices].some((index) => !this._state.selectedItems.has(index))\n || [...engineKeys].some((key) => this._itemRegistry.keyToRecord.has(key) && !legacyKeys.has(key))\n || [...legacyKeys].some((key) => !engineKeys.has(key))\n ) {\n throw new Error(`[Smilodon Phase2] Selection projection failed in ${context}: compatibility=${JSON.stringify([...legacyKeys])}, engine=${JSON.stringify([...engineKeys])}`);\n }\n }\n\n private _projectedActiveKeySnapshot(): SelectKey | null {\n return this._state.activeIndex < 0\n ? null\n : this._itemRegistry.indexToKey.get(this._state.activeIndex) ?? null;\n }\n\n private _syncLegacyActiveFromEngine(): void {\n const activeKey = this._engine.state.activeKey;\n this._state.activeIndex = activeKey === null\n ? -1\n : this._itemRegistry.keyToIndex.get(activeKey) ?? -1;\n this._syncLegacyActiveAria();\n }\n\n private _assertActiveProjection(context: string): void {\n if (!this._isPhase2DevRuntime()) return;\n const legacyKey = this._projectedActiveKeySnapshot();\n const engineKey = this._engine.state.activeKey;\n if (legacyKey !== engineKey && !Object.is(legacyKey, engineKey)) {\n throw new Error(`[Smilodon Phase2] Active projection failed in ${context}: compatibility=${String(legacyKey)}, engine=${String(engineKey)}`);\n }\n }\n\n private _dispatchActiveKey(key: SelectKey | null, reason: ActiveReason, context: string): void {\n const effects = this._engine.dispatch({ type: 'ACTIVE_KEY_CHANGED', key, reason });\n this._runEngineEffects(effects);\n this._syncLegacyActiveFromEngine();\n this._assertActiveProjection(context);\n }\n\n private _clearDisabledEngineActive(context: string): void {\n const activeKey = this._engine.state.activeKey;\n if (activeKey !== null && this._itemRegistry.keyToRecord.get(activeKey)?.disabled) {\n this._dispatchActiveKey(null, 'programmatic', context);\n } else {\n this._syncLegacyActiveFromEngine();\n this._assertActiveProjection(context);\n }\n }\n\n /**\n * @deprecated Test/backward-compatibility shim. Production active-state authority is engine.activeKey.\n * Kept for existing renderer tests; component mutation paths dispatch by key.\n */\n private _mirrorLegacyActive(reason: ActiveReason, context: string): void {\n this._dispatchActiveKey(this._projectedActiveKeySnapshot(), reason, context);\n }\n\n private _dispatchSelection(event: SelectEvent, context: string): void {\n this._engine.dispatch(event);\n this._syncLegacySelectionFromEngine();\n this._assertSelectionProjection(context);\n }\n\n /**\n * @deprecated Test/backward-compatibility shim. Production selection authority is engine.selectedKeys.\n * Kept for existing styling tests; dispatches to engine authority.\n */\n private _mirrorLegacySelection(event: SelectEvent, context: string): void {\n this._dispatchSelection(event, context);\n }\n\n private _requestSelectionReplacement(entries: readonly LegacySelectedEntry[], reason: SelectionReason, context: string): void {\n for (const entry of entries) {\n const record = this._itemRegistry.keyToRecord.get(entry.key) ?? this._selectedRecordsByKey.get(entry.key);\n this._selectedRecordsByKey.set(entry.key, record ?? {\n key: entry.key,\n item: entry.item,\n index: entry.index,\n label: this._getItemLabel(entry.item),\n value: this._getItemValue(entry.item),\n disabled: Boolean((entry.item as { disabled?: boolean } | null)?.disabled),\n groupKey: (entry.item as { group?: unknown } | null)?.group == null\n ? null\n : String((entry.item as { group?: unknown }).group),\n });\n }\n this._dispatchSelection({ type: 'REPLACE_SELECTION_REQUEST', keys: entries.map(({ key }) => key), reason }, context);\n }\n\n private _registerShadowItems(indices: readonly number[]): void {\n const keys = indices.map((index) => this._itemRegistry.indexToKey.get(index)).filter((key): key is SelectKey => key !== undefined);\n this._engine.dispatch({ type: 'ITEMS_REGISTERED', keys, disabledKeys: this._getBlockedDisabledKeys() });\n this._clearDisabledEngineActive('visible items');\n this._assertSelectionProjection('visible items');\n }\n\n private _syncLegacyActiveAria(): void {\n this._syncComboboxAccessibility();\n }\n\n private _syncStyleConfigVariables(): void {\n const styles = this._config.styles;\n if (!styles) return;\n\n this._applyStyleVariableMap(styles.option, {\n background: '--select-option-bg',\n backgroundColor: '--select-option-bg',\n color: '--select-option-color',\n border: '--select-option-border',\n borderBottom: '--select-option-border-bottom',\n borderRadius: '--select-option-border-radius',\n boxShadow: '--select-option-shadow',\n transform: '--select-option-transform',\n padding: '--select-option-padding',\n margin: '--select-option-margin',\n fontSize: '--select-option-font-size',\n fontWeight: '--select-option-font-weight',\n lineHeight: '--select-option-line-height',\n textAlign: '--select-option-text-align',\n });\n\n this._applyStyleVariableMap(styles.selectedOption, {\n background: '--select-option-selected-bg',\n backgroundColor: '--select-option-selected-bg',\n color: '--select-option-selected-color',\n border: '--select-option-selected-border',\n borderBottom: '--select-option-selected-border-bottom',\n borderRadius: '--select-option-selected-border-radius',\n boxShadow: '--select-option-selected-shadow',\n transform: '--select-option-selected-transform',\n fontWeight: '--select-option-selected-weight',\n });\n\n this._applyStyleVariableMap(styles.hoverOption, {\n background: '--select-option-hover-bg',\n backgroundColor: '--select-option-hover-bg',\n color: '--select-option-hover-color',\n border: '--select-option-hover-border',\n borderBottom: '--select-option-hover-border-bottom',\n boxShadow: '--select-option-hover-shadow',\n transform: '--select-option-hover-transform',\n });\n\n this._applyStyleVariableMap(styles.activeOption, {\n background: '--select-option-active-bg',\n backgroundColor: '--select-option-active-bg',\n color: '--select-option-active-color',\n border: '--select-option-active-border',\n outline: '--select-option-active-outline',\n outlineOffset: '--select-option-active-outline-offset',\n boxShadow: '--select-option-active-shadow',\n transform: '--select-option-active-transform',\n });\n\n this._applyStyleVariableMap(styles.disabledOption, {\n background: '--select-option-disabled-bg',\n backgroundColor: '--select-option-disabled-bg',\n color: '--select-option-disabled-color',\n border: '--select-option-disabled-border',\n borderBottom: '--select-option-disabled-border-bottom',\n opacity: '--select-option-disabled-opacity',\n cursor: '--select-option-disabled-cursor',\n });\n\n this._applyStyleVariableMap(styles.selectedIndicator, {\n width: '--select-option-selected-indicator-width',\n height: '--select-option-selected-indicator-height',\n background: '--select-option-selected-indicator-bg',\n backgroundColor: '--select-option-selected-indicator-bg',\n borderRadius: '--select-option-selected-indicator-radius',\n left: '--select-option-selected-indicator-left',\n right: '--select-option-selected-indicator-right',\n top: '--select-option-selected-indicator-top',\n transform: '--select-option-selected-indicator-transform',\n animation: '--select-option-selected-indicator-animation',\n });\n\n this._setCssVariable(\n '--select-option-selected-indicator-display',\n this._config.selection.showSelectedIndicator === false\n ? 'none'\n : (styles.selectedIndicator as Record<string, unknown> | undefined)?.display\n );\n\n this._applyStyleVariableMap(styles.badge, {\n width: '--select-badge-width',\n minWidth: '--select-badge-min-width',\n maxWidth: '--select-badge-max-width',\n height: '--select-badge-height',\n minHeight: '--select-badge-min-height',\n padding: '--select-badge-padding',\n margin: '--select-badge-margin',\n gap: '--select-badge-gap',\n background: '--select-badge-bg',\n backgroundColor: '--select-badge-bg',\n color: '--select-badge-color',\n border: '--select-badge-border',\n borderRadius: '--select-badge-border-radius',\n boxShadow: '--select-badge-shadow',\n fontSize: '--select-badge-font-size',\n fontWeight: '--select-badge-font-weight',\n lineHeight: '--select-badge-line-height',\n letterSpacing: '--select-badge-letter-spacing',\n });\n\n this._applyStyleVariableMap(styles.badgeHover, {\n background: '--select-badge-hover-bg',\n backgroundColor: '--select-badge-hover-bg',\n color: '--select-badge-hover-color',\n border: '--select-badge-hover-border',\n boxShadow: '--select-badge-hover-shadow',\n transform: '--select-badge-hover-transform',\n });\n\n this._applyStyleVariableMap(styles.badgeActive, {\n background: '--select-badge-active-bg',\n backgroundColor: '--select-badge-active-bg',\n color: '--select-badge-active-color',\n border: '--select-badge-active-border',\n boxShadow: '--select-badge-active-shadow',\n transform: '--select-badge-active-transform',\n });\n\n this._applyStyleVariableMap(styles.badgeLabel, {\n color: '--select-badge-label-color',\n fontSize: '--select-badge-label-font-size',\n fontWeight: '--select-badge-label-font-weight',\n lineHeight: '--select-badge-label-line-height',\n letterSpacing: '--select-badge-label-letter-spacing',\n textAlign: '--select-badge-label-text-align',\n });\n\n this._applyStyleVariableMap(styles.badgeRemove, {\n width: '--select-badge-remove-size',\n height: '--select-badge-remove-size',\n minWidth: '--select-badge-remove-min-width',\n minHeight: '--select-badge-remove-min-height',\n marginLeft: '--select-badge-remove-margin-left',\n background: '--select-badge-remove-bg',\n backgroundColor: '--select-badge-remove-bg',\n border: '--select-badge-remove-border',\n borderRadius: '--select-badge-remove-radius',\n color: '--select-badge-remove-color',\n fontSize: '--select-badge-remove-font-size',\n fontWeight: '--select-badge-remove-font-weight',\n });\n\n this._applyStyleVariableMap(styles.badgeRemoveIcon, {\n width: '--select-badge-remove-icon-size',\n height: '--select-badge-remove-icon-size',\n color: '--select-badge-remove-icon-color',\n fontSize: '--select-badge-remove-icon-font-size',\n lineHeight: '--select-badge-remove-icon-line-height',\n transform: '--select-badge-remove-icon-transform',\n opacity: '--select-badge-remove-icon-opacity',\n });\n\n this._applyStyleVariableMap(styles.badgeRemoveHover, {\n background: '--select-badge-remove-hover-bg',\n backgroundColor: '--select-badge-remove-hover-bg',\n color: '--select-badge-remove-hover-color',\n border: '--select-badge-remove-hover-border',\n boxShadow: '--select-badge-remove-hover-shadow',\n transform: '--select-badge-remove-hover-transform',\n });\n\n this._applyStyleVariableMap(styles.badgeRemoveActive, {\n background: '--select-badge-remove-active-bg',\n backgroundColor: '--select-badge-remove-active-bg',\n color: '--select-badge-remove-active-color',\n border: '--select-badge-remove-active-border',\n boxShadow: '--select-badge-remove-active-shadow',\n transform: '--select-badge-remove-active-transform',\n });\n\n this._applyStyleVariableMap(styles.groupHeader, {\n padding: '--select-group-header-padding',\n margin: '--select-group-header-margin',\n color: '--select-group-header-color',\n background: '--select-group-header-bg',\n backgroundColor: '--select-group-header-bg',\n border: '--select-group-header-border',\n borderBottom: '--select-group-header-border-bottom',\n borderRadius: '--select-group-header-border-radius',\n boxShadow: '--select-group-header-shadow',\n textAlign: '--select-group-header-text-align',\n fontSize: '--select-group-header-font-size',\n fontWeight: '--select-group-header-weight',\n textTransform: '--select-group-header-text-transform',\n letterSpacing: '--select-group-header-letter-spacing',\n });\n }\n\n private _resolveDropdownPlacement(): 'bottom' | 'top' {\n const placementMode = this._config.dropdownPlacement?.mode ?? 'bottom';\n if (placementMode === 'bottom' || placementMode === 'top') {\n return placementMode;\n }\n\n const hostRect = this._container.getBoundingClientRect();\n const availableBelow = window.innerHeight - hostRect.bottom;\n const computedDropdown = window.getComputedStyle(this._dropdown);\n const maxHeight = Number.parseFloat(computedDropdown.maxHeight || '0');\n const desiredHeight = Number.isFinite(maxHeight) && maxHeight > 0\n ? Math.min(this._dropdown.scrollHeight, maxHeight)\n : this._dropdown.scrollHeight;\n\n return availableBelow >= desiredHeight ? 'bottom' : 'top';\n }\n\n private _syncDropdownPlacement(): void {\n if (!this._dropdown) return;\n\n this._resolvedDropdownPlacement = this._resolveDropdownPlacement();\n this._dropdown.setAttribute('data-placement', this._resolvedDropdownPlacement);\n }\n\n private _syncDirectionConfig(): void {\n if (!this.isConnected) return;\n this.setAttribute('dir', this._config.direction ?? 'ltr');\n }\n\n private _setIconContent(target: HTMLElement, markup: string | undefined, fallback: string): void {\n const content = markup && markup.trim() ? markup : fallback;\n target.innerHTML = '';\n\n if (content.trim().startsWith('<')) {\n target.innerHTML = content;\n return;\n }\n\n target.textContent = content;\n }\n\n private _syncInputContainerMode(): void {\n if (!this._inputContainer || !this._input) return;\n\n const isMulti = this._config.selection.mode === 'multi';\n this._inputContainer.classList.toggle('input-container--multi', isMulti);\n this._inputContainer.classList.toggle('input-container--single', !isMulti);\n\n if (isMulti) {\n this._input.style.flex = '1 0 var(--select-multi-input-min-width, 96px)';\n this._input.style.width = 'auto';\n this._input.style.minWidth = 'var(--select-multi-input-min-width, 96px)';\n } else {\n this._input.style.flex = '1 1 auto';\n this._input.style.width = '100%';\n this._input.style.minWidth = '0';\n }\n\n this._syncMultiSelectDisplayConfig();\n }\n\n private _syncMultiSelectDisplayConfig(): void {\n if (!this._inputContainer || !this._input) return;\n\n const isMulti = this._config.selection.mode === 'multi';\n const mode = this._config.multiSelectDisplay?.mode ?? 'wrap';\n const dragEnabled = this._config.multiSelectDisplay?.dragScroll !== false;\n\n if (!isMulti) {\n this._inputContainer.removeAttribute('data-multi-scroll-mode');\n this._inputContainer.removeAttribute('data-drag-scroll');\n this._inputContainer.classList.remove('is-dragging-scroll');\n this._inputContainer.style.removeProperty('--select-multi-input-max-height-config');\n this._inputContainer.style.removeProperty('--select-multi-input-overflow-x-config');\n this._inputContainer.style.removeProperty('--select-multi-input-overflow-y-config');\n this._inputContainer.style.removeProperty('--select-multi-input-flex-wrap-config');\n this._inputContainer.style.removeProperty('--select-multi-input-align-content-config');\n return;\n }\n\n const configuredMaxHeight = this._config.multiSelectDisplay?.maxHeight;\n const defaultMaxHeight = '160px';\n\n let maxHeight = configuredMaxHeight ?? 'none';\n let overflowX = this._config.multiSelectDisplay?.overflowX ?? 'hidden';\n let overflowY = this._config.multiSelectDisplay?.overflowY ?? 'hidden';\n let flexWrap = 'wrap';\n let alignContent = 'flex-start';\n\n if (mode === 'vertical') {\n maxHeight = configuredMaxHeight ?? defaultMaxHeight;\n overflowY = this._config.multiSelectDisplay?.overflowY ?? 'auto';\n } else if (mode === 'horizontal') {\n maxHeight = configuredMaxHeight ?? defaultMaxHeight;\n overflowX = this._config.multiSelectDisplay?.overflowX ?? 'auto';\n overflowY = this._config.multiSelectDisplay?.overflowY ?? 'hidden';\n flexWrap = 'nowrap';\n alignContent = 'center';\n }\n\n this._inputContainer.setAttribute('data-multi-scroll-mode', mode);\n this._inputContainer.setAttribute('data-drag-scroll', String(dragEnabled && mode === 'horizontal'));\n this._inputContainer.style.setProperty('--select-multi-input-max-height-config', maxHeight);\n this._inputContainer.style.setProperty('--select-multi-input-overflow-x-config', overflowX);\n this._inputContainer.style.setProperty('--select-multi-input-overflow-y-config', overflowY);\n this._inputContainer.style.setProperty('--select-multi-input-flex-wrap-config', flexWrap);\n this._inputContainer.style.setProperty('--select-multi-input-align-content-config', alignContent);\n }\n\n private _canUseHorizontalMultiScroll(target: HTMLElement | null): boolean {\n if (this._config.selection.mode !== 'multi') return false;\n if ((this._config.multiSelectDisplay?.mode ?? 'wrap') !== 'horizontal') return false;\n if (this._config.multiSelectDisplay?.dragScroll === false) return false;\n if (!target) return true;\n if (target.closest('.dropdown-arrow-container, .clear-control-button, .badge-remove')) return false;\n if (target.matches('.select-input')) return false;\n return true;\n }\n\n private _isScrollableMultiSelectMode(): boolean {\n if (this._config.selection.mode !== 'multi') return false;\n const mode = this._config.multiSelectDisplay?.mode ?? 'wrap';\n return mode === 'vertical' || mode === 'horizontal';\n }\n\n private _isPointerOnInputScrollbar(event: Pick<MouseEvent, 'clientX' | 'clientY'>): boolean {\n if (!this._isScrollableMultiSelectMode()) return false;\n\n const rect = this._inputContent.getBoundingClientRect();\n const verticalScrollbarWidth = this._inputContent.offsetWidth - this._inputContent.clientWidth;\n const horizontalScrollbarHeight = this._inputContent.offsetHeight - this._inputContent.clientHeight;\n\n if (\n verticalScrollbarWidth > 0\n && event.clientX >= rect.right - verticalScrollbarWidth\n && event.clientX <= rect.right\n && event.clientY >= rect.top\n && event.clientY <= rect.bottom\n ) {\n return true;\n }\n\n if (\n horizontalScrollbarHeight > 0\n && event.clientY >= rect.bottom - horizontalScrollbarHeight\n && event.clientY <= rect.bottom\n && event.clientX >= rect.left\n && event.clientX <= rect.right\n ) {\n return true;\n }\n\n return false;\n }\n\n private _beginMultiScrollDrag(e: PointerEvent): void {\n const scrollHost = this._inputContent;\n this._multiScrollDrag.active = true;\n this._multiScrollDrag.moved = false;\n this._multiScrollDrag.pointerId = e.pointerId;\n this._multiScrollDrag.startX = e.clientX;\n this._multiScrollDrag.startScrollLeft = scrollHost.scrollLeft;\n this._inputContainer.classList.add('is-dragging-scroll');\n\n try {\n scrollHost.setPointerCapture(e.pointerId);\n } catch (_error) {\n // ignore pointer capture issues\n }\n }\n\n private _updateMultiScrollDrag(e: PointerEvent): void {\n if (!this._multiScrollDrag.active || this._multiScrollDrag.pointerId !== e.pointerId) return;\n\n const deltaX = e.clientX - this._multiScrollDrag.startX;\n if (Math.abs(deltaX) > 3) {\n this._multiScrollDrag.moved = true;\n }\n\n this._inputContent.scrollLeft = this._multiScrollDrag.startScrollLeft - deltaX;\n }\n\n private _endMultiScrollDrag(pointerId?: number): void {\n if (!this._multiScrollDrag.active) return;\n if (pointerId != null && this._multiScrollDrag.pointerId !== pointerId) return;\n\n try {\n if (this._multiScrollDrag.pointerId >= 0) {\n this._inputContent.releasePointerCapture(this._multiScrollDrag.pointerId);\n }\n } catch (_error) {\n // ignore pointer capture issues\n }\n\n this._multiScrollDrag.active = false;\n this._multiScrollDrag.pointerId = -1;\n this._inputContainer.classList.remove('is-dragging-scroll');\n }\n\n private _createInput(): HTMLInputElement {\n const input = document.createElement('input');\n input.setAttribute('part', 'input');\n input.type = 'text';\n input.className = 'select-input';\n input.id = `${this._uniqueId}-input`;\n input.placeholder = this._config.placeholder || 'Select an option...';\n input.disabled = !this._config.enabled;\n input.readOnly = !this._config.searchable;\n\n // Apply a direct inline reset so the input is only the writable text layer,\n // while the `.input-container` remains the sole visible control shell.\n input.style.all = 'unset';\n input.style.display = 'block';\n input.style.flex = '1 1 auto';\n input.style.width = '100%';\n input.style.maxWidth = '100%';\n input.style.minWidth = '0';\n input.style.minInlineSize = '0';\n input.style.minHeight = '0';\n input.style.padding = '0';\n input.style.margin = '0';\n input.style.border = '0';\n input.style.background = 'transparent';\n input.style.boxSizing = 'border-box';\n input.style.outline = 'none';\n input.style.font = 'inherit';\n input.style.fontFamily = 'inherit';\n input.style.lineHeight = 'inherit';\n input.style.color = 'inherit';\n input.style.alignSelf = 'center';\n input.style.appearance = 'none';\n input.style.webkitAppearance = 'none';\n input.style.boxShadow = 'none';\n input.style.borderRadius = '0';\n input.style.overflow = 'hidden';\n input.style.textOverflow = 'ellipsis';\n input.style.whiteSpace = 'nowrap';\n input.style.cursor = this._config.searchable ? 'text' : 'default';\n \n // Update readonly when input is focused if searchable\n input.addEventListener('focus', () => {\n if (this._config.searchable) {\n input.readOnly = false;\n }\n });\n \n if (this._config.styles.classNames?.input) {\n input.className += ' ' + this._config.styles.classNames.input;\n }\n \n if (this._config.styles.input) {\n const inputStyles = { ...this._config.styles.input } as Partial<CSSStyleDeclaration> & Record<string, unknown>;\n\n // Route shell-like styling to .input-container so the control appears as\n // a single styled input instead of two visually separate layers.\n delete inputStyles.background;\n delete inputStyles.backgroundColor;\n delete inputStyles.border;\n delete inputStyles.borderColor;\n delete inputStyles.borderStyle;\n delete inputStyles.borderWidth;\n delete inputStyles.borderRadius;\n delete inputStyles.boxShadow;\n delete inputStyles.padding;\n delete inputStyles.height;\n delete inputStyles.minHeight;\n delete inputStyles.maxHeight;\n\n Object.assign(input.style, inputStyles);\n }\n \n input.setAttribute('aria-haspopup', 'listbox');\n \n return input;\n }\n\n private _createDropdown(): HTMLElement {\n const dropdown = document.createElement('div');\n dropdown.className = 'select-dropdown';\n dropdown.setAttribute('part', 'listbox');\n dropdown.style.display = 'none';\n \n if (this._config.styles.classNames?.dropdown) {\n dropdown.className += ' ' + this._config.styles.classNames.dropdown;\n }\n \n if (this._config.styles.dropdown) {\n Object.assign(dropdown.style, this._config.styles.dropdown);\n }\n \n return dropdown;\n }\n\n private _createOptionsContainer(): HTMLElement {\n const container = document.createElement('div');\n container.className = `options-container ${EnhancedSelect._MIRRORED_STYLES_SCOPE_CLASS}`;\n return container;\n }\n\n private _createLiveRegion(): HTMLElement {\n const liveRegion = document.createElement('div');\n liveRegion.setAttribute('role', 'status');\n liveRegion.setAttribute('aria-live', 'polite');\n liveRegion.setAttribute('aria-atomic', 'true');\n liveRegion.style.cssText = 'position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;';\n return liveRegion;\n }\n\n private _createErrorDescription(): HTMLElement {\n const description = document.createElement('div');\n description.id = `${this._uniqueId}-error`;\n description.style.cssText = 'position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;';\n return description;\n }\n\n private _createArrowContainer(): HTMLElement {\n const container = document.createElement('div');\n container.className = 'dropdown-arrow-container';\n container.innerHTML = `\n <svg class=\"dropdown-arrow\" part=\"arrow\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4 6L8 10L12 6\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n `;\n return container;\n }\n\n private _createClearControl(): HTMLButtonElement {\n const button = document.createElement('button');\n button.type = 'button';\n button.className = 'clear-control-button';\n button.setAttribute('part', 'clear-button');\n\n const icon = document.createElement('span');\n icon.className = 'clear-control-icon';\n icon.setAttribute('part', 'clear-icon');\n \n // Use config icon if provided, otherwise default SVG\n if (this._config.clearControl.icon) {\n icon.textContent = this._config.clearControl.icon;\n } else {\n icon.innerHTML = `<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 4L4 12M4 4L12 12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\n }\n\n button.setAttribute('aria-label', this._config.clearControl.ariaLabel || 'Clear selection and search');\n button.appendChild(icon);\n\n this._clearControlIcon = icon;\n return button;\n }\n\n private _assembleDOM(): void {\n this._inputContent.appendChild(this._input);\n this._inputContainer.appendChild(this._inputContent);\n\n if (this._clearControl) {\n this._inputContainer.appendChild(this._clearControl);\n }\n \n if (this._arrowContainer) {\n this._inputContainer.appendChild(this._arrowContainer);\n }\n \n this._container.appendChild(this._inputContainer);\n \n this._dropdown.appendChild(this._optionsContainer);\n \n this._container.appendChild(this._dropdown);\n \n this._shadow.appendChild(this._container);\n \n if (this._liveRegion) {\n this._shadow.appendChild(this._liveRegion);\n }\n if (this._errorDescription) {\n this._shadow.appendChild(this._errorDescription);\n }\n \n \n // Set ARIA relationships\n const listboxId = `${this._uniqueId}-listbox`;\n this._dropdown.id = listboxId;\n this._input.setAttribute('aria-owns', listboxId);\n\n this._syncInputContainerMode();\n this._syncClearControlState();\n }\n\n private _initializeStyles(): void {\n const style = document.createElement('style');\n style.textContent = `\n /* ═══════════════════════════════════════════════════════════════════════════\n ELEGANT SELECT COMPONENT — Refined Design System\n Formal aesthetics with sophisticated microinteractions\n ═══════════════════════════════════════════════════════════════════════════ */\n \n :host {\n --select-primary: #1a1a2e;\n --select-primary-light: #16213e;\n --select-accent: #0f3460;\n --select-accent-hover: #e94560;\n --select-surface: #ffffff;\n --select-surface-elevated: rgba(0, 0, 0, 0.04);\n --select-border: #e1e5eb;\n --select-border-focus: #0f3460;\n --select-text: #1a1a2e;\n --select-text-muted: #6b7280;\n --select-text-placeholder: #9ca3af;\n --select-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);\n --select-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);\n --select-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);\n --select-shadow-focus: 0 0 0 3px rgba(15, 52, 96, 0.12);\n --select-radius-sm: 6px;\n --select-radius-md: 10px;\n --select-radius-lg: 14px;\n --select-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);\n --select-transition-smooth: 250ms cubic-bezier(0.4, 0, 0.2, 1);\n --select-transition-bounce: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);\n --select-badge-animation: badgeEnter 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;\n --select-badge-enter-from-opacity: 0;\n --select-badge-enter-from-transform: scale(0.8) translateY(-4px);\n --select-badge-enter-to-opacity: 1;\n --select-badge-enter-to-transform: scale(1) translateY(0);\n --select-badge-active-transform: scale(0.98);\n --select-badge-hover-transform: scale(1.02);\n --select-badge-letter-spacing: 0.01em;\n --select-badge-hover-shadow: var(--select-shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.15);\n --select-badge-remove-icon-size: 10px;\n --select-badge-remove-icon-color: currentColor;\n --select-badge-remove-icon-font-size: inherit;\n --select-badge-remove-icon-line-height: 1;\n --select-badge-remove-icon-transform: none;\n --select-badge-remove-icon-opacity: 1;\n --select-badge-remove-focus-outline: 2px solid rgba(255, 255, 255, 0.5);\n --select-badge-remove-focus-offset: 1px;\n --select-badge-remove-hover-transform: scale(1.15) rotate(90deg);\n --select-badge-remove-active-transform: scale(0.95) rotate(90deg);\n --select-input-hover-border: var(--select-border-focus);\n --select-input-hover-shadow: var(--select-shadow-sm), 0 0 0 1px rgba(15, 52, 96, 0.05);\n --select-input-font-weight: 450;\n --select-input-letter-spacing: 0.01em;\n --select-input-disabled-opacity: 0.6;\n --select-input-overflow-x: hidden;\n --select-input-align-items: center;\n --select-input-align-content: center;\n --select-input-align-self: center;\n --select-multi-input-max-height: 160px;\n --select-multi-input-overflow-x: hidden;\n --select-multi-input-overflow-y: auto;\n --select-multi-input-flex-wrap: wrap;\n --select-multi-input-align-content: flex-start;\n --select-multi-input-horizontal-height: var(--select-input-min-height, 48px);\n --select-multi-input-horizontal-input-flex: 0 0 var(--select-multi-input-min-width, 96px);\n --select-multi-input-horizontal-cursor: grab;\n --select-multi-input-horizontal-active-cursor: grabbing;\n --select-multi-input-end-gap: 12px;\n --select-multi-separator-inset-block: 10px;\n --select-multi-separator-height: auto;\n --select-multi-action-surface-bg: var(--select-input-bg, var(--select-surface));\n --select-multi-action-divider: 1px solid var(--select-border);\n --select-separator-width: 1px;\n --select-separator-inset-block: 10px;\n --select-separator-height: auto;\n --select-separator-display: block;\n --select-separator-opacity: 0.6;\n --select-separator-active-opacity: 1;\n --select-separator-position: var(--select-arrow-width, 42px);\n --select-separator-position-with-clear: calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px));\n --select-separator-dark-bg: linear-gradient(\n to bottom,\n transparent 0%,\n var(--select-border) 20%,\n var(--select-border) 80%,\n transparent 100%\n );\n --select-arrow-open-transform: rotate(180deg);\n --select-clear-button-hover-transform: translateY(-50%) scale(1.1);\n --select-clear-button-active-transform: translateY(-50%) scale(0.95);\n --select-clear-button-focus-offset: 2px;\n --select-clear-icon-size: 14px;\n --select-dropdown-top: calc(100% + 6px);\n --select-dropdown-bottom: calc(100% + 6px);\n --select-dropdown-animation: dropdownEnter 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;\n --select-dropdown-enter-from-opacity: 0;\n --select-dropdown-enter-from-transform: translateY(-8px) scale(0.98);\n --select-dropdown-enter-to-opacity: 1;\n --select-dropdown-enter-to-transform: translateY(0) scale(1);\n --select-dropdown-top-transform-origin: bottom center;\n --select-dropdown-top-enter-from-transform: translateY(8px) scale(0.98);\n --select-dropdown-padding: 6px;\n --select-dropdown-scroll-behavior: smooth;\n --select-dropdown-transform-origin: top center;\n --select-scrollbar-width: 6px;\n --select-scrollbar-thumb-radius: 3px;\n --select-option-hover-enabled: 1;\n --select-option-hover-transform: translateX(2px);\n --select-option-font-weight: 450;\n --select-option-margin: 2px 0;\n --select-input-font-size: inherit;\n --select-input-font-weight: 400;\n --select-multi-container-padding: 6px;\n --select-input-font-size: inherit;\n --select-input-font-weight: 400;\n --select-multi-container-padding: 6px;\n --select-option-disabled-opacity: 0.5;\n --select-option-disabled-cursor: not-allowed;\n --select-option-active-outline: none;\n --select-option-active-outline-offset: -2px;\n --select-option-selected-active-bg: var(--select-option-selected-hover-bg, var(--select-option-selected-bg, linear-gradient(135deg, rgba(15, 52, 96, 0.12) 0%, rgba(15, 52, 96, 0.06) 100%)));\n --select-option-selected-active-color: var(--select-option-selected-hover-color, var(--select-option-selected-color, var(--select-accent)));\n --select-option-selected-active-border: var(--select-option-selected-hover-border, var(--select-option-selected-border, var(--select-option-border, none)));\n --select-option-selected-active-shadow: var(--select-option-active-shadow, none);\n --select-option-selected-active-transform: var(--select-option-active-transform, none);\n --select-option-selected-active-outline: none;\n --select-option-selected-active-outline-offset: -2px;\n --select-option-selected-indicator-display: block;\n --select-option-selected-indicator-width: 3px;\n --select-option-selected-indicator-height: 60%;\n --select-option-selected-indicator-bg: var(--select-accent);\n --select-option-selected-indicator-radius: 0 2px 2px 0;\n --select-option-selected-indicator-left: 0;\n --select-option-selected-indicator-top: 50%;\n --select-option-selected-indicator-transform: translateY(-50%);\n --select-option-selected-indicator-animation: selectedIndicator 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;\n --select-option-selected-indicator-from-height: 0;\n --select-option-selected-indicator-to-height: 60%;\n --select-option-selected-indicator-from-opacity: 0;\n --select-option-selected-indicator-to-opacity: 1;\n --select-option-pressed-transform: none;\n --select-option-selected-pressed-transform: none;\n --select-button-hover-transform: translateY(-1px);\n --select-button-active-transform: translateY(0) scale(0.98);\n --select-button-font-weight: 550;\n --select-button-letter-spacing: 0.02em;\n --select-spinner-animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n --select-searching-spinner-active-color: var(--select-accent);\n --select-badge-remove-margin-left: 2px;\n --select-badge-remove-radius: 50%;\n --select-badge-remove-font-weight: 600;\n --select-empty-gap: 8px;\n --select-searching-gap: 8px;\n --select-searching-spinner-size: 24px;\n --select-searching-spinner-border: 2px solid var(--select-border);\n --select-searching-spinner-animation: var(--select-spinner-animation);\n --select-group-header-separator-margin-top: 0;\n --select-group-header-separator-padding-top: 0;\n --select-group-header-separator-border-top: none;\n --select-reduced-motion-duration: 0.01ms;\n --select-reduced-motion-iteration-count: 1;\n --select-high-contrast-border-width: 2px;\n --select-high-contrast-indicator-width: 4px;\n --select-high-contrast-focus-outline-width: 3px;\n --select-high-contrast-focus-outline-color: Highlight;\n --select-touch-target-min-height: 44px;\n --select-badge-dark-bg: linear-gradient(135deg, var(--select-accent) 0%, #4f46e5 100%);\n --select-host-z-index: auto;\n --select-host-open-z-index: var(--select-dropdown-z-index, 1000);\n --select-ancestor-open-z-index: var(--select-host-open-z-index, var(--select-dropdown-z-index, 1000));\n \n display: block;\n position: relative;\n z-index: var(--select-host-z-index, auto);\n width: var(--select-width, 100%);\n height: var(--select-height, auto);\n font-family: var(--select-font-family, inherit);\n font-size: var(--select-font-size, inherit);\n line-height: var(--select-line-height, inherit);\n color: var(--select-color, inherit);\n }\n\n :host([data-open=\"true\"]) {\n z-index: var(--select-host-open-z-index, var(--select-dropdown-z-index, 1000));\n }\n\n :host([dir=\"ltr\"]) {\n direction: ltr;\n }\n\n :host([dir=\"rtl\"]) {\n direction: rtl;\n }\n\n /* ─────────────────────────────────────────────────────────────────────────\n Selection Badges — Refined pill design with elegant interactions\n ───────────────────────────────────────────────────────────────────────── */\n \n .selection-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--select-badge-gap, 6px);\n flex: 0 1 auto;\n width: var(--select-badge-width, auto);\n min-width: var(--select-badge-min-width, 0);\n height: var(--select-badge-height, auto);\n min-height: var(--select-badge-min-height, 26px);\n padding: var(--select-badge-padding, 4px 10px 4px 12px);\n margin: var(--select-badge-margin, 3px);\n background: var(--select-badge-bg, linear-gradient(135deg, var(--select-accent) 0%, var(--select-primary-light) 100%));\n color: var(--select-badge-color, #ffffff);\n border: var(--select-badge-border, none);\n border-radius: var(--select-badge-border-radius, 999px);\n box-shadow: var(--select-badge-shadow, var(--select-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.1));\n box-sizing: border-box;\n font-size: var(--select-badge-font-size, 0.8667em);\n font-weight: var(--select-badge-font-weight, 500);\n line-height: var(--select-badge-line-height, 1.2);\n letter-spacing: var(--select-badge-letter-spacing);\n max-width: var(--select-badge-max-width, 100%);\n overflow: hidden;\n transform: scale(1);\n transition: \n transform var(--select-transition-bounce),\n box-shadow var(--select-transition-fast),\n background var(--select-transition-fast);\n animation: var(--select-badge-animation);\n }\n \n @keyframes badgeEnter {\n 0% {\n opacity: var(--select-badge-enter-from-opacity);\n transform: var(--select-badge-enter-from-transform);\n }\n 100% {\n opacity: var(--select-badge-enter-to-opacity);\n transform: var(--select-badge-enter-to-transform);\n }\n }\n \n .selection-badge:hover {\n background: var(--select-badge-hover-bg, var(--select-badge-bg, linear-gradient(135deg, var(--select-accent) 0%, var(--select-primary-light) 100%)));\n color: var(--select-badge-hover-color, var(--select-badge-color, #ffffff));\n border: var(--select-badge-hover-border, var(--select-badge-border, none));\n box-shadow: var(--select-badge-hover-shadow);\n transform: var(--select-badge-hover-transform);\n }\n\n .selection-badge:active {\n background: var(--select-badge-active-bg, var(--select-badge-hover-bg, var(--select-badge-bg, linear-gradient(135deg, var(--select-accent) 0%, var(--select-primary-light) 100%))));\n color: var(--select-badge-active-color, var(--select-badge-hover-color, var(--select-badge-color, #ffffff)));\n border: var(--select-badge-active-border, var(--select-badge-hover-border, var(--select-badge-border, none)));\n box-shadow: var(--select-badge-active-shadow, var(--select-badge-hover-shadow));\n transform: var(--select-badge-active-transform);\n }\n\n .selection-badge-label {\n display: block;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--select-badge-label-color, inherit);\n font-size: var(--select-badge-label-font-size, inherit);\n font-weight: var(--select-badge-label-font-weight, inherit);\n line-height: var(--select-badge-label-line-height, var(--select-badge-line-height, 1.2));\n letter-spacing: var(--select-badge-label-letter-spacing, inherit);\n text-align: var(--select-badge-label-text-align, start);\n }\n\n .badge-remove {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--select-badge-remove-size, 18px);\n height: var(--select-badge-remove-size, 18px);\n min-width: var(--select-badge-remove-min-width, var(--select-badge-remove-size, 18px));\n min-height: var(--select-badge-remove-min-height, var(--select-badge-remove-size, 18px));\n padding: 0;\n margin-left: var(--select-badge-remove-margin-left);\n background: var(--select-badge-remove-bg, rgba(255, 255, 255, 0.2));\n border: var(--select-badge-remove-border, none);\n border-radius: var(--select-badge-remove-radius);\n color: var(--select-badge-remove-color, #ffffff);\n font-size: var(--select-badge-remove-font-size, 0.7333em);\n font-weight: var(--select-badge-remove-font-weight);\n line-height: 1;\n cursor: pointer;\n flex: 0 0 auto;\n transition: \n background var(--select-transition-fast),\n color var(--select-transition-fast),\n border-color var(--select-transition-fast),\n box-shadow var(--select-transition-fast),\n transform var(--select-transition-bounce);\n }\n\n .badge-remove-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--select-badge-remove-icon-size, 10px);\n height: var(--select-badge-remove-icon-size, 10px);\n color: var(--select-badge-remove-icon-color, currentColor);\n font-size: var(--select-badge-remove-icon-font-size, inherit);\n line-height: var(--select-badge-remove-icon-line-height, 1);\n transform: var(--select-badge-remove-icon-transform, none);\n opacity: var(--select-badge-remove-icon-opacity, 1);\n pointer-events: none;\n }\n\n .badge-remove-icon svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n .badge-remove:hover {\n background: var(--select-badge-remove-hover-bg, rgba(233, 69, 96, 0.9));\n color: var(--select-badge-remove-hover-color, var(--select-badge-remove-color, #ffffff));\n border: var(--select-badge-remove-hover-border, var(--select-badge-remove-border, none));\n box-shadow: var(--select-badge-remove-hover-shadow, none);\n transform: var(--select-badge-remove-hover-transform);\n }\n\n .badge-remove:focus-visible {\n outline: var(--select-badge-remove-focus-outline);\n outline-offset: var(--select-badge-remove-focus-offset);\n }\n \n .badge-remove:active {\n background: var(--select-badge-remove-active-bg, var(--select-badge-remove-hover-bg, rgba(233, 69, 96, 0.9)));\n color: var(--select-badge-remove-active-color, var(--select-badge-remove-hover-color, var(--select-badge-remove-color, #ffffff)));\n border: var(--select-badge-remove-active-border, var(--select-badge-remove-hover-border, var(--select-badge-remove-border, none)));\n box-shadow: var(--select-badge-remove-active-shadow, var(--select-badge-remove-hover-shadow, none));\n transform: var(--select-badge-remove-active-transform);\n }\n\n :host([dir=\"rtl\"]) .badge-remove {\n margin-left: 0;\n margin-right: var(--select-badge-remove-margin-left);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Input Container — Sophisticated control shell\n ───────────��───────────────────────────────────────────────────────────── */\n \n .select-container {\n position: relative;\n width: 100%;\n }\n \n .input-container {\n position: relative;\n width: 100%;\n display: flex;\n align-items: var(--select-input-align-items, center);\n flex-wrap: nowrap;\n justify-content: var(--select-input-justify-content, flex-start);\n gap: var(--select-input-gap, 6px);\n padding: var(--select-input-padding, 10px 52px 10px 14px);\n height: var(--select-input-height, auto);\n min-height: var(--select-input-min-height, 48px);\n max-height: var(--select-input-max-height, 160px);\n overflow: hidden;\n padding: var(--select-multi-container-padding, 6px);\n align-content: var(--select-input-align-content, center);\n text-align: var(--select-input-text-align, start);\n background: var(--select-input-bg, var(--select-surface));\n font-size: var(--select-input-font-size, inherit);\n font-weight: var(--select-input-font-weight, 400);\n font-weight: var(--select-input-font-weight, 400);\n border: var(--select-input-border, 1.5px solid var(--select-border));\n border-radius: var(--select-input-border-radius, var(--select-radius-md));\n box-shadow: var(--select-shadow-sm);\n box-sizing: border-box;\n transition: \n border-color var(--select-transition-fast),\n box-shadow var(--select-transition-smooth),\n transform var(--select-transition-fast);\n }\n\n .input-content {\n position: relative;\n display: flex;\n flex: 1 1 auto;\n width: 100%;\n min-width: 0;\n min-height: 0;\n align-self: stretch;\n align-items: var(--select-input-align-items, center);\n align-content: var(--select-input-align-content, center);\n justify-content: var(--select-input-justify-content, flex-start);\n flex-wrap: nowrap;\n gap: var(--select-input-gap, 6px);\n overflow-x: var(--select-input-overflow-x, hidden);\n overflow-y: var(--select-input-overflow-y, hidden);\n scrollbar-width: thin;\n box-sizing: border-box;\n }\n \n .input-container:hover {\n border-color: var(--select-input-hover-border);\n box-shadow: var(--select-input-hover-shadow);\n }\n\n .input-container.input-container--single {\n flex-wrap: nowrap;\n align-content: center;\n }\n\n .input-container.input-container--multi {\n max-height: var(--select-multi-input-max-height, var(--select-multi-input-max-height-config, var(--select-input-max-height, 160px)));\n --select-multi-action-area-width: var(--select-arrow-width, 42px);\n }\n\n .input-container.input-container--multi .input-content {\n flex: 1 1 calc(100% - var(--select-multi-action-area-width, var(--select-arrow-width, 42px)));\n width: calc(100% - var(--select-multi-action-area-width, var(--select-arrow-width, 42px)));\n max-width: calc(100% - var(--select-multi-action-area-width, var(--select-arrow-width, 42px)));\n flex-wrap: var(--select-multi-input-flex-wrap, var(--select-multi-input-flex-wrap-config, wrap));\n align-content: var(--select-multi-input-align-content, var(--select-multi-input-align-content-config, flex-start));\n overflow-x: var(--select-multi-input-overflow-x, var(--select-multi-input-overflow-x-config, hidden));\n overflow-y: var(--select-multi-input-overflow-y, var(--select-multi-input-overflow-y-config, auto));\n padding-inline-end: var(--select-multi-input-end-gap, 12px);\n }\n\n .input-container.input-container--multi .input-content .selection-badge {\n flex: 0 0 auto;\n }\n\n .input-container.input-container--multi.has-clear-control .input-content {\n --select-multi-action-area-width: calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px));\n }\n\n .input-container.input-container--multi::after {\n top: var(--select-multi-separator-inset-block, var(--select-separator-inset-block, 10px));\n bottom: var(--select-multi-separator-inset-block, var(--select-separator-inset-block, 10px));\n height: var(--select-multi-separator-height, auto);\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] {\n align-items: stretch;\n height: var(--select-multi-input-horizontal-height, var(--select-input-min-height, 48px));\n min-height: var(--select-multi-input-horizontal-height, var(--select-input-min-height, 48px));\n max-height: var(--select-multi-input-horizontal-height, var(--select-input-min-height, 48px));\n overflow: hidden;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .input-content {\n flex: 1 1 100%;\n width: 100%;\n max-width: 100%;\n min-height: 0;\n height: 100%;\n cursor: var(--select-multi-input-horizontal-cursor, grab);\n align-items: center;\n align-content: center;\n flex-wrap: nowrap;\n overflow-y: hidden;\n overscroll-behavior-x: contain;\n overscroll-behavior-y: none;\n padding-inline-end: 0;\n scroll-padding-inline-end: var(--select-multi-action-area-width, var(--select-arrow-width, 42px));\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"].has-clear-control .input-content {\n --select-multi-action-area-width: calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px));\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"]::after {\n display: none;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"].is-dragging-scroll .input-content {\n cursor: var(--select-multi-input-horizontal-active-cursor, grabbing);\n user-select: none;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .selection-badge {\n flex: 0 0 auto;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .input-content > .select-input,\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .input-content > input.select-input,\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .input-content > .select-input[type=\"text\"] {\n flex: var(--select-multi-input-horizontal-input-flex, 0 0 var(--select-multi-input-min-width, 96px));\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .dropdown-arrow-container {\n background: var(--select-multi-action-surface-bg, var(--select-input-bg, var(--select-surface)));\n border-left: var(--select-multi-action-divider, 1px solid var(--select-border));\n z-index: 4;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .dropdown-arrow-container.with-clear-control {\n right: var(--select-arrow-right-with-clear, 34px);\n }\n\n :host([dir=\"rtl\"]) .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .dropdown-arrow-container {\n border-left: none;\n border-right: var(--select-multi-action-divider, 1px solid var(--select-border));\n }\n\n :host([dir=\"rtl\"]) .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .dropdown-arrow-container.with-clear-control {\n right: auto;\n left: var(--select-arrow-right-with-clear, 34px);\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .clear-control-button {\n background: var(--select-multi-action-surface-bg, var(--select-input-bg, var(--select-surface)));\n z-index: 4;\n }\n \n .input-container:focus-within {\n border-color: var(--select-input-focus-border, var(--select-border-focus));\n box-shadow: var(--select-shadow-focus), var(--select-shadow-sm);\n }\n \n /* Elegant separator line before arrow */\n .input-container::after {\n content: '';\n display: var(--select-separator-display, block);\n position: absolute;\n top: var(--select-separator-inset-block, 10px);\n bottom: var(--select-separator-inset-block, 10px);\n right: var(--select-separator-position, var(--select-arrow-width, 42px));\n width: var(--select-separator-width, 1px);\n height: var(--select-separator-height, auto);\n background: var(--select-separator-bg, linear-gradient(\n to bottom,\n transparent 0%,\n var(--select-border) 20%,\n var(--select-border) 80%,\n transparent 100%\n ));\n pointer-events: none;\n z-index: 1;\n opacity: var(--select-separator-opacity);\n transition: opacity var(--select-transition-fast);\n }\n \n .input-container:hover::after,\n .input-container:focus-within::after {\n opacity: var(--select-separator-active-opacity);\n }\n\n :host([dir=\"rtl\"]) .input-container::after {\n right: auto;\n left: var(--select-separator-position, var(--select-arrow-width, 42px));\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Dropdown Arrow — Smooth rotation with refined styling\n ───────────────────────────────────────────────────────────────────────── */\n \n .dropdown-arrow-container {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: var(--select-arrow-width, var(--select-arrow-size, 42px));\n height: var(--select-arrow-height, var(--select-arrow-size, auto));\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: var(--select-arrow-border-radius, 0 var(--select-radius-md) var(--select-radius-md) 0);\n z-index: 2;\n transition: background-color var(--select-transition-fast);\n }\n\n .input-container.has-clear-control {\n padding: var(--select-input-padding-with-clear, 10px 84px 10px 14px);\n }\n\n .input-container.has-clear-control::after {\n right: var(--select-separator-position-with-clear, calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px)));\n }\n\n .dropdown-arrow-container.with-clear-control {\n right: var(--select-arrow-right-with-clear, 34px);\n }\n\n :host([dir=\"rtl\"]) .dropdown-arrow-container {\n right: auto;\n left: 0;\n border-radius: var(--select-arrow-border-radius-rtl, var(--select-radius-md) 0 0 var(--select-radius-md));\n }\n\n :host([dir=\"rtl\"]) .input-container.has-clear-control::after {\n right: auto;\n left: var(--select-separator-position-with-clear, calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px)));\n }\n\n :host([dir=\"rtl\"]) .dropdown-arrow-container.with-clear-control {\n right: auto;\n left: var(--select-arrow-right-with-clear, 34px);\n }\n\n /* ─────────────────────────────────────────────────────────────────────────\n Clear Control — Minimal and elegant dismiss button\n ───────────────────────────────────────────────────────────────────────── */\n\n .clear-control-button {\n position: absolute;\n top: 50%;\n right: var(--select-clear-button-right, 8px);\n transform: translateY(-50%);\n width: var(--select-clear-button-size, 26px);\n height: var(--select-clear-button-size, 26px);\n border: var(--select-clear-button-border, none);\n border-radius: var(--select-clear-button-radius, 50%);\n background: var(--select-clear-button-bg, transparent);\n color: var(--select-clear-button-color, var(--select-text-muted));\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 3;\n transition: \n background var(--select-transition-fast),\n color var(--select-transition-fast),\n transform var(--select-transition-bounce);\n }\n\n .clear-control-button:hover {\n background: var(--select-clear-button-hover-bg, rgba(233, 69, 96, 0.1));\n color: var(--select-clear-button-hover-color, var(--select-accent-hover));\n transform: var(--select-clear-button-hover-transform);\n }\n \n .clear-control-button:active {\n transform: var(--select-clear-button-active-transform);\n }\n\n .clear-control-button:focus-visible {\n outline: var(--select-clear-button-focus-outline, 2px solid var(--select-border-focus));\n outline-offset: var(--select-clear-button-focus-offset);\n }\n\n .clear-control-button[hidden] {\n display: none;\n }\n\n :host([dir=\"rtl\"]) .clear-control-button {\n right: auto;\n left: var(--select-clear-button-right, 8px);\n }\n\n .clear-control-icon {\n width: var(--select-clear-icon-size);\n height: var(--select-clear-icon-size);\n pointer-events: none;\n }\n \n .clear-control-icon svg {\n width: 100%;\n height: 100%;\n }\n \n .dropdown-arrow-container:hover {\n background-color: var(--select-arrow-hover-bg, rgba(15, 52, 96, 0.05));\n }\n \n .dropdown-arrow {\n width: var(--select-arrow-width, var(--select-arrow-size, 16px));\n height: var(--select-arrow-height, var(--select-arrow-size, 16px));\n color: var(--select-arrow-color, var(--select-text-muted));\n transition: \n transform var(--select-transition-smooth),\n color var(--select-transition-fast);\n transform-origin: center;\n }\n \n .dropdown-arrow path {\n stroke-width: var(--select-arrow-stroke-width, 1.5);\n }\n \n .dropdown-arrow-container:hover .dropdown-arrow {\n color: var(--select-arrow-hover, var(--select-arrow-hover-color, #667eea));\n }\n \n .dropdown-arrow.open {\n transform: var(--select-arrow-open-transform);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Input Field — Clean text entry\n ───────────────────────────────────────────────────────────────────────── */\n \n .input-container > .select-input,\n input.select-input,\n .select-input[type=\"text\"] {\n display: block;\n flex: 1 1 auto;\n width: var(--select-input-width, 100%);\n max-width: 100%;\n min-width: var(--select-input-min-width, 0);\n min-inline-size: 0;\n min-height: 0;\n padding: var(--select-input-field-padding, 0) !important;\n margin: 0 !important;\n border: 0 !important;\n font-size: var(--select-input-font-size, inherit);\n line-height: var(--select-input-line-height, 1.5);\n color: var(--select-input-color, var(--select-text));\n background: transparent !important;\n box-sizing: border-box;\n outline: none !important;\n font-weight: var(--select-input-font-weight);\n letter-spacing: var(--select-input-letter-spacing);\n font-family: var(--select-input-font-family, inherit);\n font-style: var(--select-input-font-style, normal);\n align-self: var(--select-input-align-self, center);\n appearance: none !important;\n -webkit-appearance: none !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: var(--select-input-text-align, inherit);\n white-space: nowrap;\n }\n \n .select-input::placeholder {\n color: var(--select-input-placeholder-color, var(--select-text-placeholder));\n font-weight: 400;\n }\n\n :host([dir=\"rtl\"]) .input-container {\n padding: var(--select-input-padding-rtl, 10px 14px 10px 52px);\n }\n\n :host([dir=\"rtl\"]) .input-container.has-clear-control {\n padding: var(--select-input-padding-with-clear-rtl, 10px 14px 10px 84px);\n }\n\n .input-container.input-container--multi > .select-input,\n .input-container.input-container--multi > input.select-input,\n .input-container.input-container--multi > .select-input[type=\"text\"] {\n width: auto;\n min-width: var(--select-multi-input-min-width, 96px);\n flex: 1 0 var(--select-multi-input-min-width, 96px);\n }\n\n .input-container.input-container--single > .select-input,\n .input-container.input-container--single > input.select-input,\n .input-container.input-container--single > .select-input[type=\"text\"] {\n width: var(--select-input-width, 100%);\n min-width: 0;\n flex: 1 1 auto;\n }\n \n .select-input:disabled {\n background-color: var(--select-disabled-bg, #f5f5f5);\n cursor: not-allowed;\n opacity: var(--select-input-disabled-opacity);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Dropdown Panel — Elegant floating container\n ───────────────────────────────────────────────────────────────────────── */\n \n .select-dropdown {\n position: absolute;\n scroll-behavior: var(--select-dropdown-scroll-behavior);\n top: var(--select-dropdown-top);\n bottom: auto;\n left: 0;\n right: 0;\n max-height: var(--select-dropdown-max-height, 320px);\n overflow: hidden;\n box-sizing: border-box;\n background: var(--select-dropdown-bg, var(--select-surface));\n border: 1px solid var(--select-dropdown-border, var(--select-border));\n border-radius: var(--select-dropdown-border-radius, var(--select-radius-lg));\n box-shadow: var(--select-dropdown-shadow, var(--select-shadow-lg));\n z-index: var(--select-dropdown-z-index, 1000);\n transform-origin: var(--select-dropdown-transform-origin);\n animation: var(--select-dropdown-animation);\n }\n\n .select-dropdown[data-placement=\"top\"] {\n top: auto;\n bottom: var(--select-dropdown-bottom, calc(100% + 6px));\n transform-origin: var(--select-dropdown-top-transform-origin, bottom center);\n }\n\n .select-dropdown[data-placement=\"top\"] {\n --select-dropdown-enter-from-transform: var(--select-dropdown-top-enter-from-transform, translateY(8px) scale(0.98));\n }\n \n @keyframes dropdownEnter {\n 0% {\n opacity: var(--select-dropdown-enter-from-opacity);\n transform: var(--select-dropdown-enter-from-transform);\n }\n 100% {\n opacity: var(--select-dropdown-enter-to-opacity);\n transform: var(--select-dropdown-enter-to-transform);\n }\n }\n \n .options-container {\n position: relative;\n max-height: var(--select-options-max-height, 320px);\n overflow: auto;\n box-sizing: border-box;\n padding: var(--select-options-padding, var(--select-dropdown-padding, 6px));\n background: var(--select-options-bg, var(--select-dropdown-bg, var(--select-surface)));\n \n /* Custom scrollbar styling */\n scrollbar-width: thin;\n scrollbar-color: var(--select-border) transparent;\n }\n \n .options-container::-webkit-scrollbar {\n width: var(--select-scrollbar-width);\n }\n \n .options-container::-webkit-scrollbar-track {\n background: transparent;\n }\n \n .options-container::-webkit-scrollbar-thumb {\n background: var(--select-border);\n border-radius: var(--select-scrollbar-thumb-radius);\n }\n \n .options-container::-webkit-scrollbar-thumb:hover {\n background: var(--select-text-muted);\n }\n\n /* ─────────────────────────────────────────────────────────────────────────\n Group Headers — Refined section dividers\n ───────────────────────────────────────────────────────────────────────── */\n\n .group-header {\n padding: var(--select-group-header-padding, 10px 12px 8px 12px);\n margin: var(--select-group-header-margin, 0 calc(var(--select-options-padding, 6px) * -1));\n font-weight: var(--select-group-header-weight, 600);\n color: var(--select-group-header-color, var(--select-text-muted));\n background: var(--select-group-header-bg, #f3f4f6);\n text-align: var(--select-group-header-text-align, left);\n font-size: var(--select-group-header-font-size, 0.7333em);\n text-transform: var(--select-group-header-text-transform, uppercase);\n letter-spacing: var(--select-group-header-letter-spacing, 0.08em);\n position: sticky;\n top: calc(var(--select-options-padding, 6px) * -1);\n left: 0;\n right: 0;\n z-index: 100;\n border: var(--select-group-header-border, none);\n border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(0, 0, 0, 0.08));\n border-radius: var(--select-group-header-border-radius, 0);\n box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.04));\n /* Force solid background to prevent option bleed-through */\n isolation: isolate;\n }\n \n .group-header:not(:first-child) {\n margin-top: calc(\n var(--select-group-header-separator-margin-top, 0px) +\n var(--select-group-header-separator-padding-top, 0px)\n );\n border-top: var(--select-group-header-separator-border-top);\n }\n\n /* ─────────────────────────────────────────────────────────────────────────\n Options — Elegant hover and selection states\n ───────────────────────────────────────────────────────────────────────── */\n\n .option {\n position: relative;\n padding: var(--select-option-padding, 10px 14px);\n cursor: pointer;\n color: var(--select-option-color, var(--select-text));\n background: var(--select-option-bg, transparent);\n border: var(--select-option-border, none);\n box-sizing: border-box;\n text-align: var(--select-option-text-align, start);\n transition: var(--select-option-transition, \n background var(--select-transition-fast),\n color var(--select-transition-fast),\n border var(--select-transition-fast),\n transform var(--select-transition-fast),\n box-shadow var(--select-transition-fast)\n );\n user-select: none;\n font-size: var(--select-option-font-size, inherit);\n font-weight: var(--select-option-font-weight);\n line-height: var(--select-option-line-height, 1.5);\n border-radius: var(--select-option-border-radius, var(--select-radius-sm));\n margin: var(--select-option-margin);\n }\n\n .option:hover:not(.disabled):not(.smilodon-option--disabled),\n .option.smilodon-option--disabled-hoverable:hover {\n background: var(--select-option-hover-bg, var(--select-surface-elevated));\n border: var(--select-option-hover-border, var(--select-option-border, none));\n color: var(--select-option-hover-color, var(--select-text));\n transform: var(--select-option-hover-transform, none);\n }\n\n .option.selected {\n background: var(--select-option-selected-bg, linear-gradient(135deg, rgba(15, 52, 96, 0.08) 0%, rgba(15, 52, 96, 0.04) 100%));\n border: var(--select-option-selected-border, var(--select-option-border, none));\n color: var(--select-option-selected-color, var(--select-accent));\n font-weight: var(--select-option-selected-weight, 550);\n }\n \n .option.selected::before {\n content: var(--select-option-selected-indicator-content, '');\n display: var(--select-option-selected-indicator-display, block);\n position: absolute;\n left: var(--select-option-selected-indicator-left);\n top: var(--select-option-selected-indicator-top);\n transform: var(--select-option-selected-indicator-transform);\n width: var(--select-option-selected-indicator-width);\n height: var(--select-option-selected-indicator-height);\n background: var(--select-option-selected-indicator-bg);\n border-radius: var(--select-option-selected-indicator-radius);\n animation: var(--select-option-selected-indicator-animation);\n }\n\n :host([dir=\"rtl\"]) .option.selected::before {\n left: auto;\n right: var(--select-option-selected-indicator-right, var(--select-option-selected-indicator-left));\n border-radius: var(--select-option-selected-indicator-radius-rtl, 2px 0 0 2px);\n }\n \n @keyframes selectedIndicator {\n 0% {\n height: var(--select-option-selected-indicator-from-height);\n opacity: var(--select-option-selected-indicator-from-opacity);\n }\n 100% {\n height: var(--select-option-selected-indicator-to-height);\n opacity: var(--select-option-selected-indicator-to-opacity);\n }\n }\n\n .option.selected:hover {\n background: var(--select-option-selected-hover-bg, var(--select-option-selected-bg, linear-gradient(135deg, rgba(15, 52, 96, 0.12) 0%, rgba(15, 52, 96, 0.06) 100%)));\n border: var(--select-option-selected-hover-border, var(--select-option-selected-border, var(--select-option-hover-border, var(--select-option-border, none))));\n color: var(--select-option-selected-hover-color, var(--select-option-selected-color, var(--select-accent)));\n }\n\n .option.active:not(.selected):not(.disabled):not(.smilodon-option--disabled),\n .option.active.smilodon-option--disabled-focusable:not(.selected) {\n background: var(--select-option-active-bg, var(--select-surface-elevated));\n color: var(--select-option-active-color, var(--select-option-hover-color, var(--select-option-color, var(--select-text))));\n border: var(--select-option-active-border, var(--select-option-hover-border, var(--select-option-border, none)));\n outline: var(--select-option-active-outline, none);\n outline-offset: var(--select-option-active-outline-offset);\n box-shadow: var(--select-option-active-shadow, none);\n transform: var(--select-option-active-transform, none);\n }\n\n .option.selected.active:not(.disabled):not(.smilodon-option--disabled),\n .option.selected.active.smilodon-option--disabled-focusable {\n background: var(--select-option-selected-active-bg, var(--select-option-selected-hover-bg, var(--select-option-selected-bg, linear-gradient(135deg, rgba(15, 52, 96, 0.12) 0%, rgba(15, 52, 96, 0.06) 100%))));\n color: var(--select-option-selected-active-color, var(--select-option-selected-hover-color, var(--select-option-selected-color, var(--select-accent))));\n border: var(--select-option-selected-active-border, var(--select-option-selected-hover-border, var(--select-option-selected-border, var(--select-option-border, none))));\n outline: var(--select-option-selected-active-outline, var(--select-option-active-outline, none));\n outline-offset: var(--select-option-selected-active-outline-offset);\n box-shadow: var(--select-option-selected-active-shadow, var(--select-option-active-shadow, none));\n transform: var(--select-option-selected-active-transform, var(--select-option-active-transform, none));\n }\n\n .option.disabled,\n .option.smilodon-option--disabled {\n background: var(--select-option-disabled-bg, var(--select-option-bg, transparent));\n color: var(--select-option-disabled-color, var(--select-text-muted));\n border: var(--select-option-disabled-border, var(--select-option-border, none));\n opacity: var(--select-option-disabled-opacity, 0.5);\n cursor: var(--select-option-disabled-cursor, not-allowed);\n pointer-events: var(--select-option-disabled-pointer-events, none);\n }\n\n .option.smilodon-option--disabled-interactive {\n pointer-events: auto;\n }\n\n .option:active:not(.selected):not(.disabled):not(.smilodon-option--disabled),\n .option.smilodon-option--disabled-selectable:active:not(.selected) {\n background: var(--select-option-pressed-bg, rgba(15, 52, 96, 0.08));\n transform: var(--select-option-pressed-transform);\n }\n\n .option.selected:active:not(.disabled):not(.smilodon-option--disabled),\n .option.selected.smilodon-option--disabled-selectable:active {\n transform: var(--select-option-selected-pressed-transform);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Load More & Busy States — Refined feedback indicators\n ───────────────────────────────────────────────────────────────────────── */\n \n .load-more-container {\n padding: var(--select-load-more-padding, 12px);\n text-align: center;\n }\n \n .load-more-button {\n padding: var(--select-button-padding, 10px 20px);\n border: var(--select-button-border, 1.5px solid var(--select-border));\n background: var(--select-button-bg, transparent);\n color: var(--select-button-color, var(--select-accent));\n border-radius: var(--select-button-border-radius, var(--select-radius-md));\n cursor: pointer;\n font-size: var(--select-button-font-size, 0.8667em);\n font-weight: var(--select-button-font-weight);\n letter-spacing: var(--select-button-letter-spacing);\n transition: \n background var(--select-transition-fast),\n border-color var(--select-transition-fast),\n color var(--select-transition-fast),\n transform var(--select-transition-bounce);\n }\n \n .load-more-button:hover {\n background: var(--select-button-hover-bg, var(--select-accent));\n border-color: var(--select-accent);\n color: var(--select-button-hover-color, white);\n transform: var(--select-button-hover-transform);\n }\n \n .load-more-button:active {\n transform: var(--select-button-active-transform);\n }\n \n .load-more-button:disabled {\n opacity: var(--select-button-disabled-opacity, 0.5);\n cursor: not-allowed;\n transform: none;\n }\n \n .busy-bucket {\n padding: var(--select-busy-padding, 20px);\n text-align: center;\n color: var(--select-busy-color, var(--select-text-muted));\n background: var(--select-busy-bg, transparent);\n font-size: var(--select-busy-font-size, 0.8667em);\n }\n \n .spinner {\n display: inline-block;\n width: var(--select-spinner-size, 22px);\n height: var(--select-spinner-size, 22px);\n border: var(--select-spinner-border, 2px solid var(--select-border));\n border-top-color: var(--select-spinner-active-color, var(--select-accent));\n border-radius: 50%;\n animation: var(--select-spinner-animation);\n }\n \n @keyframes spin {\n to { transform: rotate(360deg); }\n }\n \n .empty-state {\n padding: var(--select-empty-padding, 32px 24px);\n text-align: center;\n color: var(--select-empty-color, var(--select-text-muted));\n font-size: var(--select-empty-font-size, 0.9333em);\n background: var(--select-empty-bg, transparent);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--select-empty-gap);\n }\n \n .searching-state {\n padding: var(--select-searching-padding, 32px 24px);\n text-align: center;\n color: var(--select-searching-color, var(--select-accent));\n font-size: var(--select-searching-font-size, 0.9333em);\n background: var(--select-searching-bg, transparent);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--select-searching-gap);\n }\n \n .searching-state::before {\n content: '';\n width: var(--select-searching-spinner-size);\n height: var(--select-searching-spinner-size);\n border: var(--select-searching-spinner-border);\n border-top-color: var(--select-searching-spinner-active-color);\n border-radius: 50%;\n animation: var(--select-searching-spinner-animation);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Error States — Clear visual feedback\n ───────────────────────────────────────────────────────────────────────── */\n \n .select-input[aria-invalid=\"true\"] {\n border-color: var(--select-error-border, #e94560);\n }\n \n .select-input[aria-invalid=\"true\"]:focus {\n border-color: var(--select-error-border, #e94560);\n box-shadow: 0 0 0 3px var(--select-error-shadow, rgba(233, 69, 96, 0.15));\n }\n \n /* ──────────────────────────────────────────────────��──────────────────────\n Accessibility — Reduced motion & High contrast\n ───────────────────────────────────────────────────────────────────────── */\n \n @media (prefers-reduced-motion: reduce) {\n *,\n *::before,\n *::after {\n animation-duration: var(--select-reduced-motion-duration) !important;\n animation-iteration-count: var(--select-reduced-motion-iteration-count) !important;\n transition-duration: var(--select-reduced-motion-duration) !important;\n }\n \n .dropdown-arrow.open {\n transform: var(--select-arrow-open-transform);\n }\n }\n \n @media (prefers-contrast: high) {\n .select-input:focus {\n outline-width: var(--select-high-contrast-focus-outline-width);\n outline-color: var(--select-high-contrast-focus-outline-color);\n }\n \n .input-container {\n border-width: var(--select-high-contrast-border-width);\n }\n \n .option.selected::before {\n width: var(--select-high-contrast-indicator-width);\n }\n }\n \n /* Touch targets (WCAG 2.5.5) */\n .load-more-button,\n select-option {\n min-height: var(--select-touch-target-min-height);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Dark Mode — Elegant dark theme\n ───────────────────────────────────────────────────────────────────────── */\n \n :host(.dark-mode),\n :host([dark-mode]),\n :host([darkmode]),\n :host([data-theme=\"dark\"]),\n :host([theme=\"dark\"]),\n :host-context(.dark-mode),\n :host-context(.dark),\n :host-context([dark-mode]),\n :host-context([darkmode]),\n :host-context([data-theme=\"dark\"]),\n :host-context([theme=\"dark\"]) {\n --select-primary: #e5e5e5;\n --select-primary-light: #2a2a3e;\n --select-accent: #6366f1;\n --select-accent-hover: #f43f5e;\n --select-surface: var(--select-dark-bg, #1a1a2e);\n --select-surface-elevated: #252540;\n --select-border: var(--select-dark-border, #3f3f5a);\n --select-border-focus: #6366f1;\n --select-text: var(--select-dark-text, #f5f5f5);\n --select-text-muted: #9ca3af;\n --select-text-placeholder: #6b7280;\n --select-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);\n --select-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);\n --select-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);\n --select-shadow-focus: 0 0 0 3px rgba(99, 102, 241, 0.25);\n\n --select-dropdown-bg: var(--select-dark-dropdown-bg, var(--select-surface));\n \n --select-arrow-color: var(--select-dark-arrow-color, #9ca3af);\n --select-arrow-hover-color: var(--select-dark-arrow-hover-color, #f5f5f5);\n --select-arrow-bg: var(--select-dark-arrow-bg, transparent);\n --select-arrow-hover-bg: var(--select-dark-arrow-hover-bg, rgba(156, 163, 175, 0.15));\n \n --select-separator-bg: var(--select-dark-separator-bg, var(--select-separator-dark-bg));\n --select-separator-width: var(--select-dark-separator-width, 1px);\n \n --select-badge-bg: var(--select-dark-badge-bg, rgba(99, 102, 241, 0.2));\n --select-badge-color: var(--select-dark-badge-color, #e0e7ff);\n --select-badge-border: var(--select-dark-badge-border, var(--select-badge-border, none));\n --select-badge-hover-border: var(--select-dark-badge-hover-border, var(--select-badge-hover-border, var(--select-badge-border, none)));\n --select-badge-active-border: var(--select-dark-badge-active-border, var(--select-badge-active-border, var(--select-badge-hover-border, var(--select-badge-border, none))));\n \n --select-group-header-bg: var(--select-group-header-dark-bg, #1a1a2e);\n --select-group-header-color: var(--select-group-header-dark-color, #9ca3af);\n \n --select-empty-color: var(--select-dark-empty-color, #9ca3af);\n \n --select-option-bg: var(--select-dark-option-bg, transparent);\n --select-option-color: var(--select-dark-option-color, var(--select-text));\n --select-option-border: var(--select-dark-option-border, none);\n --select-option-hover-bg: var(--select-dark-option-hover-bg, var(--select-surface-elevated));\n --select-option-hover-color: var(--select-dark-option-hover-color, var(--select-text));\n --select-option-hover-border: var(--select-dark-option-hover-border, var(--select-option-border, none));\n --select-option-selected-bg: var(--select-dark-option-selected-bg, linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%));\n --select-option-selected-color: var(--select-dark-option-selected-color, #a5b4fc);\n --select-option-selected-border: var(--select-dark-option-selected-border, var(--select-option-border, none));\n --select-option-selected-hover-bg: var(--select-dark-option-selected-hover-bg, var(--select-option-selected-bg));\n --select-option-selected-hover-color: var(--select-dark-option-selected-hover-color, var(--select-option-selected-color));\n --select-option-selected-hover-border: var(--select-dark-option-selected-hover-border, var(--select-option-selected-border, var(--select-option-hover-border, var(--select-option-border, none))));\n }\n\n :host(.dark-mode) .input-container,\n :host([dark-mode]) .input-container,\n :host([darkmode]) .input-container,\n :host([data-theme=\"dark\"]) .input-container,\n :host([theme=\"dark\"]) .input-container,\n :host-context(.dark-mode) .input-container,\n :host-context(.dark) .input-container,\n :host-context([dark-mode]) .input-container,\n :host-context([darkmode]) .input-container,\n :host-context([data-theme=\"dark\"]) .input-container,\n :host-context([theme=\"dark\"]) .input-container {\n background: var(--select-surface);\n border-color: var(--select-border);\n }\n\n :host(.dark-mode) .input-container:hover,\n :host([dark-mode]) .input-container:hover,\n :host([darkmode]) .input-container:hover,\n :host([data-theme=\"dark\"]) .input-container:hover,\n :host([theme=\"dark\"]) .input-container:hover,\n :host-context(.dark-mode) .input-container:hover,\n :host-context(.dark) .input-container:hover,\n :host-context([dark-mode]) .input-container:hover,\n :host-context([darkmode]) .input-container:hover,\n :host-context([data-theme=\"dark\"]) .input-container:hover,\n :host-context([theme=\"dark\"]) .input-container:hover {\n border-color: var(--select-dark-input-hover-border, var(--select-input-hover-border, var(--select-dark-border-focus, var(--select-border-focus, #6366f1))));\n box-shadow: var(--select-dark-input-hover-shadow, var(--select-input-hover-shadow, var(--select-shadow-sm), 0 0 0 1px rgba(99, 102, 241, 0.12)));\n }\n\n :host(.dark-mode) .input-container:focus-within,\n :host([dark-mode]) .input-container:focus-within,\n :host([darkmode]) .input-container:focus-within,\n :host([data-theme=\"dark\"]) .input-container:focus-within,\n :host([theme=\"dark\"]) .input-container:focus-within,\n :host-context(.dark-mode) .input-container:focus-within,\n :host-context(.dark) .input-container:focus-within,\n :host-context([dark-mode]) .input-container:focus-within,\n :host-context([darkmode]) .input-container:focus-within,\n :host-context([data-theme=\"dark\"]) .input-container:focus-within,\n :host-context([theme=\"dark\"]) .input-container:focus-within {\n border-color: var(--select-dark-border-focus, var(--select-border-focus, #6366f1));\n box-shadow: var(--select-dark-shadow-focus, var(--select-shadow-focus, 0 0 0 3px rgba(99, 102, 241, 0.25))), var(--select-shadow-sm);\n }\n\n :host(.dark-mode) .input-container::after,\n :host([dark-mode]) .input-container::after,\n :host([darkmode]) .input-container::after,\n :host([data-theme=\"dark\"]) .input-container::after,\n :host([theme=\"dark\"]) .input-container::after,\n :host-context(.dark-mode) .input-container::after,\n :host-context(.dark) .input-container::after,\n :host-context([dark-mode]) .input-container::after,\n :host-context([darkmode]) .input-container::after,\n :host-context([data-theme=\"dark\"]) .input-container::after,\n :host-context([theme=\"dark\"]) .input-container::after {\n background: var(--select-separator-dark-bg);\n }\n\n :host(.dark-mode) .select-dropdown,\n :host([dark-mode]) .select-dropdown,\n :host([darkmode]) .select-dropdown,\n :host([data-theme=\"dark\"]) .select-dropdown,\n :host([theme=\"dark\"]) .select-dropdown,\n :host-context(.dark-mode) .select-dropdown,\n :host-context(.dark) .select-dropdown,\n :host-context([dark-mode]) .select-dropdown,\n :host-context([darkmode]) .select-dropdown,\n :host-context([data-theme=\"dark\"]) .select-dropdown,\n :host-context([theme=\"dark\"]) .select-dropdown {\n background: var(--select-dropdown-bg, var(--select-surface));\n border-color: var(--select-border);\n }\n\n :host(.dark-mode) .options-container,\n :host([dark-mode]) .options-container,\n :host([darkmode]) .options-container,\n :host([data-theme=\"dark\"]) .options-container,\n :host([theme=\"dark\"]) .options-container,\n :host-context(.dark-mode) .options-container,\n :host-context(.dark) .options-container,\n :host-context([dark-mode]) .options-container,\n :host-context([darkmode]) .options-container,\n :host-context([data-theme=\"dark\"]) .options-container,\n :host-context([theme=\"dark\"]) .options-container {\n background: var(--select-dropdown-bg, var(--select-surface));\n scrollbar-color: var(--select-border) transparent;\n }\n\n :host(.dark-mode) .selection-badge,\n :host([dark-mode]) .selection-badge,\n :host([darkmode]) .selection-badge,\n :host([data-theme=\"dark\"]) .selection-badge,\n :host([theme=\"dark\"]) .selection-badge,\n :host-context(.dark-mode) .selection-badge,\n :host-context(.dark) .selection-badge,\n :host-context([dark-mode]) .selection-badge,\n :host-context([darkmode]) .selection-badge,\n :host-context([data-theme=\"dark\"]) .selection-badge,\n :host-context([theme=\"dark\"]) .selection-badge {\n background: var(--select-dark-badge-bg, var(--select-badge-bg, var(--select-badge-dark-bg)));\n color: var(--select-dark-badge-color, var(--select-badge-color, #e0e7ff));\n }\n\n :host(.dark-mode) .group-header:not(:first-child),\n :host([dark-mode]) .group-header:not(:first-child),\n :host([darkmode]) .group-header:not(:first-child),\n :host([data-theme=\"dark\"]) .group-header:not(:first-child),\n :host([theme=\"dark\"]) .group-header:not(:first-child),\n :host-context(.dark-mode) .group-header:not(:first-child),\n :host-context(.dark) .group-header:not(:first-child),\n :host-context([dark-mode]) .group-header:not(:first-child),\n :host-context([darkmode]) .group-header:not(:first-child),\n :host-context([data-theme=\"dark\"]) .group-header:not(:first-child),\n :host-context([theme=\"dark\"]) .group-header:not(:first-child) {\n border-top-color: var(--select-border);\n }\n\n :host(.dark-mode) .group-header,\n :host([dark-mode]) .group-header,\n :host([darkmode]) .group-header,\n :host([data-theme=\"dark\"]) .group-header,\n :host([theme=\"dark\"]) .group-header,\n :host-context(.dark-mode) .group-header,\n :host-context(.dark) .group-header,\n :host-context([dark-mode]) .group-header,\n :host-context([darkmode]) .group-header,\n :host-context([data-theme=\"dark\"]) .group-header,\n :host-context([theme=\"dark\"]) .group-header {\n color: var(--select-dark-group-header-color, var(--select-group-header-color, inherit));\n background: var(--select-dark-group-header-bg, var(--select-group-header-bg, #1a1a2e));\n border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(255, 255, 255, 0.08));\n box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.3));\n }\n\n :host(.dark-mode) .group-header,\n :host([dark-mode]) .group-header,\n :host([darkmode]) .group-header,\n :host([data-theme=\"dark\"]) .group-header,\n :host([theme=\"dark\"]) .group-header {\n color: var(--select-dark-group-header-color, var(--select-group-header-dark-color, #9ca3af));\n background: var(--select-dark-group-header-bg, var(--select-group-header-dark-bg, #1a1a2e));\n border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(255, 255, 255, 0.08));\n box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.3));\n }\n\n :host(.dark-mode) .group-header:not(:first-child),\n :host([dark-mode]) .group-header:not(:first-child),\n :host([darkmode]) .group-header:not(:first-child),\n :host([data-theme=\"dark\"]) .group-header:not(:first-child),\n :host([theme=\"dark\"]) .group-header:not(:first-child) {\n border-top-color: var(--select-border);\n }\n\n :host(.dark-mode) .option.selected::before,\n :host([dark-mode]) .option.selected::before,\n :host([darkmode]) .option.selected::before,\n :host([data-theme=\"dark\"]) .option.selected::before,\n :host([theme=\"dark\"]) .option.selected::before,\n :host-context(.dark-mode) .option.selected::before,\n :host-context(.dark) .option.selected::before,\n :host-context([dark-mode]) .option.selected::before,\n :host-context([darkmode]) .option.selected::before,\n :host-context([data-theme=\"dark\"]) .option.selected::before,\n :host-context([theme=\"dark\"]) .option.selected::before {\n background: var(--select-accent);\n }\n `;\n \n // Insert as first child to ensure styles are processed first\n if (this._shadow.firstChild) {\n this._shadow.insertBefore(style, this._shadow.firstChild);\n } else {\n this._shadow.appendChild(style);\n }\n \n }\n\n private _attachEventListeners(): void {\n // Arrow click handler\n if (this._arrowContainer) {\n this._boundArrowClick = (e: Event) => {\n e.stopPropagation();\n e.preventDefault();\n\n // delegate to the existing open/close helpers so we don't accidentally\n // drift out of sync with the logic in those methods (focus, events,\n // scroll-to-selected, etc.)\n if (this._state.isOpen && this._config.selection.toggleOnTriggerClick !== false) {\n this._handleClose();\n } else if (!this._state.isOpen) {\n this._handleOpen();\n }\n };\n this._arrowContainer.addEventListener('click', this._boundArrowClick);\n }\n\n if (this._clearControl) {\n this._clearControl.addEventListener('pointerdown', (e) => {\n e.stopPropagation();\n e.preventDefault();\n });\n\n this._clearControl.addEventListener('click', (e) => {\n e.stopPropagation();\n e.preventDefault();\n this._handleClearControlClick();\n });\n }\n\n // Input container click - focus input and open dropdown\n // Prevent the original pointer event from bubbling/causing default focus behavior\n // which can interfere with option click handling when opening the dropdown\n this._inputContainer.addEventListener('pointerdown', (e) => {\n // Prevent propagation to document click listener but do NOT preventDefault.\n // Allow default so browser events (click) on newly opened options still fire.\n // e.stopPropagation(); // BUG: By stopping propagation here, the document click listener doesn't see it, which is fine for not closing it. But be very careful.\n\n const target = e.target as HTMLElement | null;\n if (!this._config.enabled) return;\n if (target && target.closest('.dropdown-arrow-container')) return;\n if (target && target.closest('.clear-control-button')) return;\n if (this._isPointerOnInputScrollbar(e)) {\n this._suppressNextOpenClick = true;\n return;\n }\n\n const isHorizontalMultiMode = this._config.selection.mode === 'multi'\n && (this._config.multiSelectDisplay?.mode ?? 'wrap') === 'horizontal';\n const enableHorizontalDrag = this._canUseHorizontalMultiScroll(target);\n\n if (enableHorizontalDrag && e.button === 0) {\n this._beginMultiScrollDrag(e);\n this._suppressNextOpenClick = false;\n e.preventDefault();\n return;\n }\n \n // If we clicked the container, but not the input itself, we must prevent default\n // otherwise the browser moves focus from our input to the body, immediately triggering blur.\n if (target && !target.matches('.select-input')) {\n e.preventDefault();\n }\n\n const clickedInput = Boolean(target && target.matches('.select-input'));\n\n if (\n this._state.isOpen &&\n this._config.selection.toggleOnTriggerClick !== false &&\n !isHorizontalMultiMode &&\n !enableHorizontalDrag &&\n !(clickedInput && this._config.searchable)\n ) {\n this._handleClose();\n return;\n }\n\n const wasClosed = !this._state.isOpen;\n if (wasClosed) {\n this._handleOpen();\n }\n\n // Focus the input (do not prevent default behavior for input itself)\n this._applyFocusIntent('input', 'input-container-trigger');\n\n // If we just opened the dropdown, transfer pointer capture to the\n // options container so the subsequent pointerup lands there instead of\n // staying with the input container (which would swallow the event).\n if (wasClosed && this._optionsContainer && typeof e.pointerId === 'number') {\n try {\n this._optionsContainer.setPointerCapture(e.pointerId);\n } catch (_err) {\n // Some browsers may throw if element is not yet \"connected\"; ignore\n }\n }\n });\n\n this._inputContainer.addEventListener('click', (e) => {\n const target = e.target as HTMLElement | null;\n const isHorizontalMultiMode = this._config.selection.mode === 'multi'\n && (this._config.multiSelectDisplay?.mode ?? 'wrap') === 'horizontal';\n\n if (!this._config.enabled || !isHorizontalMultiMode) {\n this._suppressNextOpenClick = false;\n this._multiScrollDrag.moved = false;\n return;\n }\n\n if (target && target.closest('.dropdown-arrow-container, .clear-control-button')) {\n this._suppressNextOpenClick = false;\n this._multiScrollDrag.moved = false;\n return;\n }\n\n if (this._suppressNextOpenClick || this._multiScrollDrag.moved || this._isPointerOnInputScrollbar(e)) {\n this._suppressNextOpenClick = false;\n this._multiScrollDrag.moved = false;\n return;\n }\n\n this._suppressNextOpenClick = false;\n this._multiScrollDrag.moved = false;\n\n if (!this._state.isOpen) {\n this._handleOpen();\n }\n\n this._applyFocusIntent('input', 'input-container-activation');\n });\n\n this._inputContent.addEventListener('pointermove', (e) => {\n this._updateMultiScrollDrag(e);\n });\n\n this._inputContent.addEventListener('pointerup', (e) => {\n this._endMultiScrollDrag(e.pointerId);\n });\n\n this._inputContent.addEventListener('pointercancel', (e) => {\n this._endMultiScrollDrag(e.pointerId);\n });\n\n this._inputContent.addEventListener('wheel', (e) => {\n if (\n this._config.selection.mode === 'multi'\n && (this._config.multiSelectDisplay?.mode ?? 'wrap') === 'horizontal'\n ) {\n const primaryDelta = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY;\n if (primaryDelta !== 0) {\n this._inputContent.scrollLeft += primaryDelta;\n }\n e.preventDefault();\n }\n }, { passive: false });\n \n // Input container click - prevent event from reaching document listener\n this._container.addEventListener('click', (e) => {\n e.stopPropagation();\n });\n \n // Input focus/blur\n this._input.addEventListener('focus', () => {\n this._runEngineEffects(this._engine.dispatch({ type: 'FOCUS_GAINED' }));\n this._handleOpen();\n });\n // When the input loses focus we normally close the dropdown, but\n // clicking an option will blur the input before the option's click\n // handler executes. To avoid the blur timer closing the dropdown\n // prematurely we use a short-lived flag that is set whenever we start\n // interacting with the options container. The close callback checks this\n // flag and skips closing if the user is about to click an option.\n this._input.addEventListener('blur', (e) => {\n this._runEngineEffects(this._engine.dispatch({ type: 'FOCUS_LOST' }));\n const related = (e as FocusEvent).relatedTarget as Node | null;\n if (related && (this._shadow.contains(related) || this._container.contains(related))) {\n return;\n }\n\n // Delay to allow option click/focus transitions\n this._setLifecycleTimeout(() => {\n if (this._suppressBlurClose) {\n // another pointerdown inside options is in progress; keep open\n return;\n }\n\n const active = document.activeElement as Node | null;\n if (active && (this._shadow.contains(active) || this._container.contains(active))) {\n return;\n }\n\n this._handleClose('blur');\n }, 150);\n });\n \n // Input search\n this._input.addEventListener('input', (e) => {\n if (!this._config.searchable) return;\n const query = (e.target as HTMLInputElement).value;\n this._handleSearch(query);\n });\n\n // If the user presses down inside the options container we should\n // temporarily suppress blur-based closing until after the click has\n // been handled. Setting a flag that gets cleared in the next tick is\n // sufficient.\n this._optionsContainer.addEventListener('pointerdown', () => {\n this._suppressBlurClose = true;\n this._setLifecycleTimeout(() => {\n this._suppressBlurClose = false;\n }, 150); // Increased timeout to ensure click finishes before blur checks\n });\n\n // Delegated click listener for improved event handling (robust across shadow DOM)\n const handleOptionEvent = (e: MouseEvent | PointerEvent) => {\n\n const path = (e.composedPath && e.composedPath()) || [e.target];\n let option: Element | null = null;\n\n for (const node of path as any[]) {\n if (!(node instanceof Element)) continue;\n try {\n if (node.matches('[data-sm-selectable], [data-selectable], [data-sm-state]')) {\n option = node;\n break;\n }\n } catch (err) {\n continue;\n }\n }\n\n if (option && (!option.hasAttribute('aria-disabled') || option.classList.contains('smilodon-option--disabled-selectable'))) {\n const indexStr = option.getAttribute('data-sm-index') ?? option.getAttribute('data-index');\n const index = Number(indexStr);\n if (!Number.isNaN(index)) {\n this._selectOption(index, {\n shiftKey: (e as MouseEvent).shiftKey,\n toggleKey: (e as MouseEvent).ctrlKey || (e as MouseEvent).metaKey,\n });\n }\n }\n };\n\n this._optionsContainer.addEventListener('click', handleOptionEvent);\n \n // Keyboard navigation\n this._input.addEventListener('keydown', (e) => this._handleKeydown(e));\n \n }\n\n private _initializeObservers(): void {\n // Disconnect existing observer if any\n if (this._intersectionObserver) {\n this._intersectionObserver.disconnect();\n this._intersectionObserver = undefined;\n }\n\n if (this._dataLoadingConfig.protocol === 'acknowledged'\n && (!this._dataRequestCoordinator || !this._acknowledgedReady)) return;\n\n // Intersection observer for infinite scroll\n if (this._config.infiniteScroll.enabled) {\n const acknowledged = Boolean(\n this._dataRequestCoordinator && this._dataLoadingConfig.protocol === 'acknowledged',\n );\n if (acknowledged && typeof IntersectionObserver === 'undefined') return;\n\n let observer: IntersectionObserver;\n try {\n observer = new IntersectionObserver(\n (entries) => {\n if (this._intersectionObserver !== observer) return;\n entries.forEach((entry) => {\n if (acknowledged) {\n if (!this._acknowledgedReady || !this.isConnected || entry.target !== this._loadMoreTrigger) return;\n if (!entry.isIntersecting) {\n this._dataRequestCoordinator?.setSentinelIntersecting(false);\n return;\n }\n if (this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling) return;\n const actions = this._dataRequestCoordinator?.setSentinelIntersecting(true) ?? [];\n this._dispatchAcknowledgedActions(actions);\n return;\n }\n\n if (entry.isIntersecting && !this._state.isBusy) {\n this._loadMoreItems();\n }\n });\n },\n acknowledged\n ? { root: this._optionsContainer, threshold: 0.1 }\n : { threshold: 0.1 },\n );\n this._intersectionObserver = observer;\n } catch (error) {\n this._intersectionObserver = undefined;\n if (!acknowledged) throw error;\n }\n }\n }\n\n private async _loadInitialSelectedItems(): Promise<void> {\n if (!this._config.serverSide.fetchSelectedItems || !this._config.serverSide.initialSelectedValues) {\n return;\n }\n \n this._setBusy(true);\n const generation = ++this._asyncGeneration;\n \n try {\n const items = await this._config.serverSide.fetchSelectedItems(\n this._config.serverSide.initialSelectedValues\n );\n if (generation !== this._asyncGeneration || !this.isConnected) return;\n\n const fetchedRegistry = createItemRegistry(items, this._itemAdapter, {\n duplicateKeyPolicy: this._getDuplicateKeyPolicy(),\n });\n this._requestSelectionReplacement(fetchedRegistry.records, 'external-value-sync', 'initial selected items');\n \n this._updateInputDisplay();\n } catch (error) {\n if (generation !== this._asyncGeneration || !this.isConnected) return;\n this._handleError(error as Error);\n } finally {\n if (generation === this._asyncGeneration && this.isConnected) {\n this._setBusy(false);\n }\n }\n }\n\n private _runEngineEffects(effects: ReturnType<SelectEngineBridge['dispatch']>): void {\n this._effectRunner.run(effects, {\n focusTrigger: () => {\n this._applyFocusIntent('input', 'engine-focus-trigger');\n },\n syncAria: () => {\n this._syncPopupAria();\n },\n });\n }\n\n private _syncPopupAria(): void {\n if (!this._input) return;\n this._syncComboboxAccessibility();\n }\n\n private _syncComboboxAccessibility(): void {\n if (!this._input || !this._engine || !this._state) return;\n\n const accessibilityState = deriveAccessibilityState(this._engine.state, {\n searchable: this._config.searchable,\n readonly: !this._config.searchable,\n invalid: this._hasError,\n label: {\n ariaLabel: this.getAttribute('aria-label')?.trim() || null,\n ariaDescription: this.getAttribute('aria-description')?.trim() || null,\n },\n errorMessage: this._errorMessage,\n errorDescriptionId: this._hasError && this._errorMessage ? this._errorDescription?.id ?? null : null,\n });\n const effects = computeAccessibilityEffects(accessibilityState, {\n controlsId: this._dropdown?.id || null,\n optionKeys: [],\n }).filter((effect) => effect.type === 'SYNC_COMBOBOX_ARIA');\n\n applyAccessibilityEffects(effects, {\n combobox: this._input,\n getOptionByKey: (key) => {\n if (!this._state.isOpen) return null;\n const index = this._itemRegistry.keyToIndex.get(key);\n return index === undefined ? null : this._getOptionElementByIndex(index);\n },\n });\n }\n\n private _syncListboxAccessibility(): void {\n if (!this._dropdown || !this._engine || !this._state) return;\n\n const derivedState = deriveAccessibilityState(this._engine.state, {\n label: { ariaLabel: this.getAttribute('aria-label')?.trim() || null },\n });\n const accessibilityState = {\n ...derivedState,\n // The component's existing busy lifecycle is not yet mirrored to engine dataStatus.\n // Host presentation busy is additive only for the accepted acknowledged\n // protocol; legacy host attributes remain inert for listbox semantics.\n busy: this._state.isBusy || (\n this._dataLoadingConfig.protocol === 'acknowledged'\n && this.getAttribute('aria-busy') === 'true'\n ),\n };\n const effects = computeAccessibilityEffects(accessibilityState, {\n controlsId: this._dropdown.id || null,\n optionKeys: [],\n }).filter((effect) => effect.type === 'SYNC_LISTBOX_ARIA');\n\n applyAccessibilityEffects(effects, { listbox: this._dropdown });\n }\n\n private _syncRenderedOptionAccessibility(): void {\n if (!this._optionsContainer || !this._engine || !this._state) return;\n\n const optionTargets = new Map<SelectKey, HTMLElement>();\n this._optionsContainer.querySelectorAll<HTMLElement>('[data-index]').forEach((option) => {\n const index = Number(option.getAttribute('data-index'));\n if (!Number.isFinite(index)) return;\n const key = this._itemRegistry.indexToKey.get(index);\n if (key !== undefined) optionTargets.set(key, option);\n });\n if (optionTargets.size === 0) return;\n\n const effects = computeAccessibilityEffects(deriveAccessibilityState(this._engine.state), {\n controlsId: this._dropdown?.id || null,\n optionKeys: [...optionTargets.keys()],\n }).filter((effect) => effect.type === 'SYNC_OPTION_ARIA');\n\n applyAccessibilityEffects(effects, {\n getOptionByKey: (key) => optionTargets.get(key) ?? null,\n });\n }\n\n private _applyFocusIntent(\n target: 'input' | 'clear-button' | 'active-option' | 'none',\n reason: string,\n focusTarget?: HTMLElement | null,\n ): void {\n const effects = computeAccessibilityEffects(deriveAccessibilityState(this._engine.state), {\n optionKeys: [],\n focusIntents: [{ target, reason }],\n }).filter((effect) => effect.type === 'FOCUS_INTENT');\n\n applyAccessibilityEffects(effects, {\n focusTargets: {\n input: target === 'input' ? this._input : null,\n clearButton: target === 'clear-button' ? this._clearControl : null,\n getActiveOption: () => target === 'active-option' ? focusTarget ?? null : null,\n },\n }, { applyFocus: true });\n }\n\n private _handleOpen(): void {\n if (!this._config.enabled) {\n this._runEngineEffects(this._engine.dispatch({ type: 'DISABLED_CHANGED', disabled: true }));\n return;\n }\n if (this._state.isOpen) return;\n\n // close any other open selects before proceeding\n EnhancedSelect._instances.forEach(inst => {\n if (inst !== this) inst._handleClose();\n });\n\n const effects = this._engine.dispatch({ type: 'OPEN_REQUEST' });\n if (!effects.some((effect) => effect.type === 'POPUP_OPENED')) return;\n this._runEngineEffects(effects);\n\n this._markOpenStart();\n this.setAttribute('data-open', 'true');\n this._liftStackingAncestors();\n this._dropdown.style.display = 'block';\n this._updateArrowRotation();\n\n // Render options when opening\n this._renderOptions();\n this._syncDropdownPlacement();\n this._setInitialActiveOption();\n\n this._emit('open', {});\n this._config.callbacks.onOpen?.();\n this._announce('Options expanded');\n\n // Scroll to selected if configured\n if (this._config.scrollToSelected.enabled) {\n const keyboardActiveChangeGeneration = this._keyboardActiveChangeGeneration;\n const canRestoreOpenSelection = () => this._state.isOpen\n && this._keyboardActiveChangeGeneration === keyboardActiveChangeGeneration;\n\n // Use requestAnimationFrame for better timing after render\n this._requestLifecycleFrame(() => {\n if (!canRestoreOpenSelection()) return;\n // Double RAF to ensure layout is complete\n this._requestLifecycleFrame(() => {\n if (!canRestoreOpenSelection()) return;\n this._scrollToSelected();\n });\n });\n }\n }\n\n private _handleClose(reason: CloseReason = 'programmatic'): void {\n const effects = this._engine.dispatch({ type: 'CLOSE_REQUEST', reason });\n if (!effects.some((effect) => effect.type === 'POPUP_CLOSED')) return;\n\n this.removeAttribute('data-open');\n this._restoreLiftedAncestors();\n this._dropdown.style.display = 'none';\n this._dropdown.setAttribute('data-placement', this._resolvedDropdownPlacement);\n this._updateArrowRotation();\n this._runEngineEffects(effects);\n \n this._emit('close', {});\n this._config.callbacks.onClose?.();\n this._announce('Options collapsed');\n }\n\n private _updateDropdownVisibility(): void {\n if (this._state.isOpen) {\n this.setAttribute('data-open', 'true');\n this._liftStackingAncestors();\n this._dropdown.style.display = 'block';\n this._syncDropdownPlacement();\n } else {\n this.removeAttribute('data-open');\n this._restoreLiftedAncestors();\n this._dropdown.style.display = 'none';\n }\n this._syncComboboxAccessibility();\n }\n\n private _liftStackingAncestors(): void {\n this._restoreLiftedAncestors();\n\n let ancestor = this.parentElement;\n while (ancestor && ancestor !== document.body) {\n if (this._createsStackingContext(ancestor)) {\n const hadMarker = ancestor.hasAttribute('data-smilodon-open-ancestor');\n this._liftedAncestors.push({\n element: ancestor,\n position: ancestor.style.position,\n zIndex: ancestor.style.zIndex,\n hadMarker,\n });\n\n if (getComputedStyle(ancestor).position === 'static') {\n ancestor.style.position = 'relative';\n }\n\n ancestor.style.zIndex = 'var(--select-ancestor-open-z-index, var(--select-host-open-z-index, var(--select-dropdown-z-index, 1000)))';\n ancestor.setAttribute('data-smilodon-open-ancestor', 'true');\n }\n\n ancestor = ancestor.parentElement;\n }\n }\n\n private _restoreLiftedAncestors(): void {\n for (const lifted of this._liftedAncestors) {\n lifted.element.style.position = lifted.position;\n lifted.element.style.zIndex = lifted.zIndex;\n\n if (!lifted.hadMarker) {\n lifted.element.removeAttribute('data-smilodon-open-ancestor');\n }\n }\n\n this._liftedAncestors = [];\n }\n\n private _createsStackingContext(element: HTMLElement): boolean {\n const style = getComputedStyle(element);\n\n if (style.position === 'fixed' || style.position === 'sticky') return true;\n if (style.zIndex !== 'auto' && style.position !== 'static') return true;\n if (style.opacity !== '1') return true;\n if (style.transform !== 'none') return true;\n if (style.filter !== 'none') return true;\n if ((style as CSSStyleDeclaration & { backdropFilter?: string }).backdropFilter && (style as CSSStyleDeclaration & { backdropFilter?: string }).backdropFilter !== 'none') return true;\n if (style.perspective !== 'none') return true;\n if (style.mixBlendMode !== 'normal') return true;\n if (style.isolation === 'isolate') return true;\n if (style.contain.includes('paint') || style.contain.includes('layout')) return true;\n if (style.willChange.includes('transform') || style.willChange.includes('opacity') || style.willChange.includes('filter')) return true;\n\n return false;\n }\n\n private _updateArrowRotation(): void {\n if (this._arrowContainer) {\n const arrow = this._arrowContainer.querySelector('.dropdown-arrow');\n if (arrow) {\n if (this._state.isOpen) {\n arrow.classList.add('open');\n } else {\n arrow.classList.remove('open');\n }\n }\n }\n }\n\n private _isPerfEnabled(): boolean {\n return typeof globalThis !== 'undefined'\n && (globalThis as any).__SMILODON_DEV__ === true\n && typeof performance !== 'undefined'\n && typeof performance.mark === 'function'\n && typeof performance.measure === 'function';\n }\n\n private _perfMark(name: string): void {\n if (!this._isPerfEnabled()) return;\n performance.mark(name);\n }\n\n private _perfMeasure(name: string, start: string, end: string): void {\n if (!this._isPerfEnabled()) return;\n performance.measure(name, start, end);\n performance.clearMarks(start);\n performance.clearMarks(end);\n performance.clearMeasures(name);\n }\n\n private _markOpenStart(): void {\n if (!this._isPerfEnabled()) return;\n this._pendingFirstRenderMark = true;\n this._perfMark('smilodon-dropdown-open-start');\n }\n\n private _finalizePerfMarks(): void {\n if (!this._isPerfEnabled()) {\n this._pendingFirstRenderMark = false;\n this._pendingSearchRenderMark = false;\n return;\n }\n\n if (this._pendingFirstRenderMark) {\n this._pendingFirstRenderMark = false;\n this._perfMark('smilodon-first-render-complete');\n this._perfMeasure(\n 'smilodon-dropdown-to-first-render',\n 'smilodon-dropdown-open-start',\n 'smilodon-first-render-complete'\n );\n }\n\n if (this._pendingSearchRenderMark) {\n this._pendingSearchRenderMark = false;\n this._perfMark('smilodon-search-render-complete');\n this._perfMeasure(\n 'smilodon-search-to-render',\n 'smilodon-search-input-last',\n 'smilodon-search-render-complete'\n );\n }\n }\n\n /**\n * Filter items by search query (optimized hot path)\n * Uses for-loop with hoisted invariants for better performance\n */\n private _filterItemsByQuery(items: any[], query: string): any[] {\n // Early return for empty query\n if (!query?.trim()) return items;\n \n // PERF: Hoist invariants outside loop\n const lowerQuery = query.toLowerCase().trim();\n const getLabelFn = this._config.serverSide.getLabelFromItem \n ?? ((item: any) => item?.label ?? item?.text ?? String(item));\n \n const results: any[] = [];\n const len = items.length;\n \n // PERF: for-loop instead of filter (no closure allocation)\n for (let i = 0; i < len; i++) {\n const item = items[i];\n if (item == null) continue;\n \n try {\n const label = getLabelFn(item);\n if (label == null) continue;\n \n const labelStr = String(label).toLowerCase();\n if (labelStr.includes(lowerQuery)) {\n results.push(item);\n }\n } catch (e) {\n // Silent fail for robustness with external data\n continue;\n }\n }\n \n return results;\n }\n\n private _handleSearch(query: string): void {\n if (\n this._dataRequestCoordinator\n && (this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling)\n ) {\n // Keep the committed query/generation stable until the accepted snapshot\n // has been projected. Coalesce input as a latest-wins intent and dispatch\n // exactly one new generation after recovery/projection succeeds.\n this._acknowledgedPendingSearchQuery = query;\n this._input.value = query;\n this._syncClearControlState();\n return;\n }\n\n if (\n this._dataLoadingConfig.protocol === 'acknowledged'\n && (this._dataLoadingConfig.searchMode === 'remote' || this._dataLoadingConfig.searchMode === 'hybrid')\n ) {\n this._state.searchQuery = query;\n this._syncClearControlState();\n this._state.lastNotifiedQuery = query;\n this._state.lastNotifiedResultCount = 0;\n if (this._dataRequestCoordinator) {\n const actions = this._dataRequestCoordinator.setQuery(query);\n if (this._acknowledgedReady) this._dispatchAcknowledgedActions(actions);\n else this._renderOptions();\n } else if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n this._renderOptions();\n }\n return;\n }\n\n this._state.searchQuery = query;\n this._syncClearControlState();\n\n if (this._dataLoadingConfig.protocol === 'acknowledged' && this._dataRequestCoordinator) {\n // Local acknowledged search has no remote request, but pagination still\n // belongs to the coordinator's current query generation.\n this._dispatchAcknowledgedActions(this._dataRequestCoordinator.setQuery(query));\n }\n\n if (query.length > 0) {\n this._perfMark('smilodon-search-input-last');\n this._pendingSearchRenderMark = true;\n } else {\n this._pendingSearchRenderMark = false;\n }\n \n // Clear previous search timeout\n if (this._searchTimeout) {\n clearTimeout(this._searchTimeout);\n }\n\n // Search immediately - no debouncing for better responsiveness\n // Users expect instant feedback as they type\n this._state.isSearching = false;\n \n // Ensure dropdown is open when searching\n if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n // Filter and render options immediately\n this._renderOptions();\n }\n \n // PERF: Use optimized filter function\n const filteredItems = this._filterItemsByQuery(this._state.loadedItems, query);\n const count = filteredItems.length;\n \n // Announce search results for accessibility\n const trimmedQuery = query.trim();\n if (trimmedQuery) {\n this._announce(`${count} result${count !== 1 ? 's' : ''} found for \"${query}\"`);\n }\n \n // Only notify if query or result count changed to prevent infinite loops\n if (query !== this._state.lastNotifiedQuery || count !== this._state.lastNotifiedResultCount) {\n this._state.lastNotifiedQuery = query;\n this._state.lastNotifiedResultCount = count;\n \n // Use setTimeout to avoid synchronous state updates during render\n this._setLifecycleTimeout(() => {\n this._emit('search', { query, results: filteredItems, count });\n this._config.callbacks.onSearch?.(query);\n }, 0);\n }\n }\n\n private _handleKeydown(e: KeyboardEvent): void {\n if (!this._config.enabled) return;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n this._moveActive(1, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });\n }\n break;\n case 'ArrowUp':\n e.preventDefault();\n if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n this._moveActive(-1, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });\n }\n break;\n case 'Home':\n e.preventDefault();\n if (this._state.isOpen) {\n const selectableIndices = this._getSelectableOptionIndices();\n const firstIndex = selectableIndices[0];\n if (firstIndex === undefined) break;\n this._setActive(firstIndex);\n if (this._config.selection.mode === 'multi' && e.shiftKey) {\n this._selectRange(this._rangeAnchorIndex ?? firstIndex, firstIndex, { clear: !(e.ctrlKey || e.metaKey) });\n }\n }\n break;\n case 'End':\n e.preventDefault();\n if (this._state.isOpen) {\n const selectableIndices = this._getSelectableOptionIndices();\n const lastIndex = selectableIndices[selectableIndices.length - 1];\n if (lastIndex === undefined) break;\n this._setActive(lastIndex);\n if (this._config.selection.mode === 'multi' && e.shiftKey) {\n this._selectRange(this._rangeAnchorIndex ?? lastIndex, lastIndex, { clear: !(e.ctrlKey || e.metaKey) });\n }\n }\n break;\n case 'PageDown':\n e.preventDefault();\n if (this._state.isOpen) {\n this._moveActive(10, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });\n }\n break;\n case 'PageUp':\n e.preventDefault();\n if (this._state.isOpen) {\n this._moveActive(-10, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });\n }\n break;\n case 'Enter':\n case ' ':\n e.preventDefault();\n if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n const activeKey = this._engine.state.activeKey;\n const currentIndex = activeKey === null ? -1 : this._itemRegistry.keyToIndex.get(activeKey) ?? -1;\n if (currentIndex >= 0) {\n this._selectOption(currentIndex, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey, reason: 'keyboard' });\n }\n }\n break;\n case 'Escape':\n e.preventDefault();\n this._handleClose('escape');\n break;\n case 'Tab':\n if (this._state.isOpen) {\n this._handleClose();\n }\n break;\n case 'a':\n case 'A':\n if ((e.ctrlKey || e.metaKey) && this._config.selection.mode === 'multi') {\n e.preventDefault();\n this._selectAll();\n }\n break;\n default:\n // Type-ahead search\n if (e.key.length === 1 && !e.ctrlKey && !e.altKey && !e.metaKey) {\n this._handleTypeAhead(e.key);\n }\n break;\n }\n }\n\n private _moveActive(delta: number, opts?: { shiftKey?: boolean; toggleKey?: boolean }): void {\n const selectableIndices = this._getSelectableOptionIndices();\n if (selectableIndices.length === 0) return;\n\n const activeKey = this._engine.state.activeKey;\n const currentIndex = activeKey === null ? -1 : this._itemRegistry.keyToIndex.get(activeKey) ?? -1;\n const currentPosition = selectableIndices.indexOf(currentIndex);\n const basePosition = currentPosition >= 0\n ? currentPosition\n : delta >= 0\n ? -1\n : selectableIndices.length;\n const nextPosition = Math.max(0, Math.min(selectableIndices.length - 1, basePosition + delta));\n const next = selectableIndices[nextPosition];\n this._setActive(next);\n\n if (this._config.selection.mode === 'multi' && opts?.shiftKey) {\n const anchor = this._rangeAnchorIndex ?? currentIndex;\n const anchorIndex = anchor >= 0 ? anchor : next;\n if (this._rangeAnchorIndex === null) {\n this._rangeAnchorIndex = anchorIndex;\n }\n this._selectRange(anchorIndex, next, { clear: !opts?.toggleKey });\n }\n }\n\n private _setActive(index: number, reason: ActiveReason = 'keyboard'): void {\n this._ensureRegistryCurrent();\n const record = this._getRecordByIndex(index);\n let option = this._getOptionElementByIndex(index);\n if (!option && record && this._guardedVirtualizer) {\n this._materializeGuardedVirtualKey(record.key);\n option = this._getOptionElementByIndex(index);\n }\n if (!record || record.disabled || !option || option.getAttribute('aria-disabled') === 'true') {\n return;\n }\n\n if (reason === 'keyboard') this._keyboardActiveChangeGeneration += 1;\n\n const previousIndex = this._state.activeIndex;\n this._dispatchActiveKey(record.key, reason, 'set active');\n if (this._state.activeIndex !== index) return;\n\n // Clear previous active state\n if (previousIndex >= 0 && previousIndex !== index) {\n const prevOption = this._getOptionElementByIndex(previousIndex);\n if (prevOption) {\n // Check if it's a custom SelectOption or a lightweight DOM element\n if ('setActive' in prevOption && typeof (prevOption as any).setActive === 'function') {\n (prevOption as SelectOption).setActive(false);\n } else {\n // Lightweight option - remove active class\n prevOption.classList.remove('active', 'smilodon-option--active');\n }\n }\n }\n \n // Set new active state\n if (option) {\n // Check if it's a custom SelectOption or a lightweight DOM element\n if ('setActive' in option && typeof (option as any).setActive === 'function') {\n (option as SelectOption).setActive(true);\n } else {\n // Lightweight option - add active class\n option.classList.add('active', 'smilodon-option--active');\n }\n \n if (typeof option.scrollIntoView === 'function') {\n // Don't scroll wildly when just opening with pre-selections\n option.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n }\n \n // Announce position for screen readers\n const total = this._state.loadedItems.length;\n this._announce(`Item ${index + 1} of ${total}`);\n \n // Update aria-activedescendant using the actual option id when available\n this._syncLegacyActiveAria();\n }\n }\n\n private _getOptionElementByIndex(index: number): HTMLElement | null {\n return this._optionsContainer.querySelector(`[data-index=\"${index}\"]`) as HTMLElement | null;\n }\n\n private _getSelectableOptions(): HTMLElement[] {\n // Filter out group headers and other non-selectable elements\n // Only return elements with data-index or data-sm-selectable attributes\n return Array.from(this._optionsContainer.children).filter((child) => {\n return (child.hasAttribute('data-index') || child.hasAttribute('data-sm-selectable'))\n && child.getAttribute('aria-disabled') !== 'true';\n }) as HTMLElement[];\n }\n\n private _getSelectableOptionIndices(): number[] {\n if (this._guardedVirtualizer) {\n return this._renderPlan.filteredKeys.flatMap((key) => {\n const record = this._itemRegistry.keyToRecord.get(key);\n return record && !record.disabled ? [record.index] : [];\n });\n }\n\n return this._getSelectableOptions()\n .map((option) => Number(option.getAttribute('data-sm-index') ?? option.getAttribute('data-index')))\n .filter((index) => Number.isFinite(index));\n }\n\n private _buildRendererHelpers(): RendererHelpers {\n return {\n onSelect: (_item: unknown, index: number) => this._selectOption(index),\n getIndex: (node: Element | null) => {\n const el = node?.closest?.('[data-selectable]') as HTMLElement | null;\n if (!el) return null;\n const idx = Number(el.dataset.index);\n return Number.isFinite(idx) ? idx : null;\n },\n keyboardFocus: (index: number) => {\n this._setActive(index);\n const el = this._getOptionElementByIndex(index);\n this._applyFocusIntent('active-option', 'renderer-keyboard-focus', el);\n },\n };\n }\n\n private _handleTypeAhead(char: string): void {\n if (this._typeTimeout) clearTimeout(this._typeTimeout);\n \n this._typeBuffer += char.toLowerCase();\n this._typeTimeout = window.setTimeout(() => {\n this._typeBuffer = '';\n }, 500);\n \n // Find first matching option\n const getValue = this._config.serverSide.getLabelFromItem || ((item) => (item as any)?.label ?? String(item));\n const matchIndex = this._state.loadedItems.findIndex((item) =>\n getValue(item).toLowerCase().startsWith(this._typeBuffer)\n );\n \n if (matchIndex >= 0) {\n this._setActive(matchIndex, 'search');\n }\n }\n\n private _selectAll(): void {\n if (this._config.selection.mode !== 'multi') return;\n this._ensureRegistryCurrent();\n const options = this._getSelectableOptions();\n const entries = this._getSelectedEntries();\n options.forEach((option) => {\n const optionIndex = Number(option.getAttribute('data-sm-index') ?? option.getAttribute('data-index'));\n if (!Number.isFinite(optionIndex)) return;\n const record = this._getRecordByIndex(optionIndex);\n if (record && !this._isOptionSelectionBlocked(record.item)) entries.push(record);\n });\n this._requestSelectionReplacement(entries, 'keyboard', 'select all');\n this._renderOptions();\n this._updateInputDisplay();\n this._emitChange();\n this._announce(`Selected all ${options.length} items`);\n }\n\n private _selectRange(start: number, end: number, opts?: { clear?: boolean; reason?: SelectionReason }): void {\n if (this._config.selection.mode !== 'multi') return;\n this._ensureRegistryCurrent();\n const [min, max] = start < end ? [start, end] : [end, start];\n const selectedEntries = this._getSelectedEntries();\n const entries = opts?.clear\n ? selectedEntries.filter((entry) => !this._itemRegistry.keyToRecord.has(entry.key))\n : selectedEntries;\n for (let i = min; i <= max; i += 1) {\n const record = this._getRecordByIndex(i);\n const optionEl = this._getOptionElementByIndex(i);\n if (optionEl?.getAttribute('aria-disabled') === 'true' && !optionEl.classList.contains('smilodon-option--disabled-selectable')) continue;\n if (!record || this._isOptionSelectionBlocked(record.item)) continue;\n entries.push(record);\n }\n this._requestSelectionReplacement(entries, opts?.reason ?? 'keyboard', 'select range');\n this._renderOptions();\n this._updateInputDisplay();\n const target = this._getRecordByIndex(end);\n const selectDetail = target ? this._getSelectEventDetail(target) : null;\n if (selectDetail) this._emit('select', selectDetail);\n this._emitChange();\n this._announce(`${this._state.selectedIndices.size} items selected`);\n if (selectDetail) this._config.callbacks.onSelect?.(selectDetail);\n }\n\n private _getSelectEventDetail(record: ItemRecord<unknown, SelectKey>): SelectEventsDetailMap['select'] {\n const getValue = this._config.serverSide.getValueFromItem || ((item) => (item as any)?.value ?? item);\n const getLabel = this._config.serverSide.getLabelFromItem || ((item) => (item as any)?.label ?? String(item));\n\n return {\n item: record.item,\n index: record.index,\n value: getValue(record.item),\n label: getLabel(record.item),\n selected: this._engine.state.selectedKeys.has(record.key),\n multi: this._config.selection.mode === 'multi',\n };\n }\n\n private _setInitialActiveOption(): void {\n const selectableIndices = this._getSelectableOptionIndices();\n const selected = Array.from(this._state.selectedIndices).sort((a, b) => a - b);\n if (selectableIndices.length === 0 || (this._config.selection.mode === 'multi' && selected.length === 0)) {\n this._dispatchActiveKey(null, 'open', 'initial active option');\n return;\n }\n const target = selected.find((index) => selectableIndices.includes(index)) ?? selectableIndices[0];\n this._setActive(target, 'open');\n }\n\n private _announce(message: string): void {\n const effects = computeAccessibilityEffects(deriveAccessibilityState(this._engine.state), {\n optionKeys: [],\n announcements: [{ politeness: 'polite', message }],\n }).filter((effect) => effect.type === 'ANNOUNCE');\n\n applyAccessibilityEffects(effects, { liveRegion: this._liveRegion });\n if (!this._liveRegion) return;\n\n this._setLifecycleTimeout(() => {\n const clearEffects = computeAccessibilityEffects(deriveAccessibilityState(this._engine.state), {\n optionKeys: [],\n announcements: [{ politeness: 'polite', message: '' }],\n }).filter((effect) => effect.type === 'ANNOUNCE');\n applyAccessibilityEffects(clearEffects, { liveRegion: this._liveRegion });\n }, 1000);\n }\n\n private _selectOption(index: number, opts?: { shiftKey?: boolean; toggleKey?: boolean; reason?: SelectionReason }): void {\n // FIX: Do not rely on this._optionsContainer.children[index] because filtering changes the children\n // Instead, use the index to update state directly\n\n this._ensureRegistryCurrent();\n const record = this._getRecordByIndex(index);\n if (!record) return;\n index = record.index;\n const item = record.item;\n if (this._isOptionSelectionBlocked(item)) {\n return;\n }\n const isCurrentlySelected = this._engine.state.selectedKeys.has(record.key);\n const reason = opts?.reason ?? 'pointer';\n\n // Keep active/focus styling aligned with the most recently interacted option.\n // Without this, a previously selected item may retain active classes/styles\n // after selecting a different option.\n if (!record.disabled) {\n this._dispatchActiveKey(record.key, reason === 'keyboard' ? 'keyboard' : 'pointer', 'option selection');\n }\n if (this._config.selection.mode === 'single') {\n this._dispatchSelection({\n type: isCurrentlySelected && this._config.selection.allowDeselect ? 'TOGGLE_KEY_REQUEST' : 'SELECT_KEY_REQUEST',\n key: record.key,\n reason,\n }, 'single option selection');\n \n // Re-render to update all option styles\n this._renderOptions();\n \n if (this._config.selection.closeOnSelect) {\n this._handleClose('selection');\n }\n } else {\n const toggleKey = Boolean(opts?.toggleKey);\n const shiftKey = Boolean(opts?.shiftKey);\n\n if (shiftKey) {\n const anchor = this._rangeAnchorIndex ?? index;\n this._selectRange(anchor, index, { clear: !toggleKey, reason });\n this._rangeAnchorIndex = anchor;\n return;\n }\n\n // Multi select with toggle\n const maxSelections = this._config.selection.maxSelections || 0;\n\n if (!isCurrentlySelected && maxSelections > 0 && this._engine.state.selectedKeys.size >= maxSelections) {\n this._announce(`Maximum ${maxSelections} selections allowed`);\n this._renderOptions();\n return;\n }\n this._dispatchSelection({ type: 'TOGGLE_KEY_REQUEST', key: record.key, reason }, 'multi option selection');\n \n // Re-render to update styles (safer than trying to find the element in filtered list)\n this._renderOptions();\n }\n\n this._rangeAnchorIndex = index;\n \n this._updateInputDisplay();\n const selectDetail = this._getSelectEventDetail(record);\n this._emit('select', selectDetail);\n this._emitChange();\n\n const label = selectDetail.label;\n if (this._config.selection.mode === 'single') {\n this._announce(`Selected ${label}`);\n } else {\n const selectedCount = this._state.selectedIndices.size;\n const action = isCurrentlySelected ? 'Deselected' : 'Selected';\n this._announce(`${action} ${label}. ${selectedCount} selected`);\n }\n \n this._config.callbacks.onSelect?.(selectDetail);\n }\n\n private _handleOptionRemove(index: number, key?: SelectKey): void {\n this._ensureRegistryCurrent();\n const entry = this._getSelectedEntries().find((selected) => key === undefined\n ? selected.index === index\n : selected.key === key);\n if (!entry) return;\n const item = entry.item;\n const activeElement = this._shadow.activeElement;\n const focusedBadge = activeElement instanceof HTMLButtonElement\n && activeElement.getAttribute('part') === 'chip-remove'\n ? activeElement.closest('.selection-badge')\n : null;\n const hadFocusedChipRemove = focusedBadge !== null;\n const focusedBadgeIndex = focusedBadge\n ? Array.from(this._inputContent.querySelectorAll('.selection-badge')).indexOf(focusedBadge)\n : -1;\n const option = this._itemRegistry.keyToRecord.has(entry.key)\n ? this._getOptionElementByIndex(entry.index)\n : null;\n\n this._dispatchSelection({ type: 'DESELECT_KEY_REQUEST', key: entry.key, reason: 'pointer' }, 'remove selected item');\n\n if (option && 'setSelected' in option && typeof (option as SelectOption).setSelected === 'function') {\n (option as SelectOption).setSelected(false);\n } else if (option) {\n option.classList.remove('selected', 'sm-selected', 'smilodon-option--selected');\n\n const stateTokens = (option.dataset.smState || '')\n .split(' ')\n .map(token => token.trim())\n .filter(token => token && token !== 'selected');\n\n if (stateTokens.length > 0) {\n option.dataset.smState = stateTokens.join(' ');\n } else {\n delete option.dataset.smState;\n }\n }\n \n this._updateInputDisplay();\n this._renderOptions();\n this._emitChange();\n\n if (hadFocusedChipRemove && this.isConnected) {\n const removeButtons = this._inputContent.querySelectorAll<HTMLButtonElement>('[part=\"chip-remove\"]');\n if (removeButtons.length > 0) {\n const nextFocusIndex = Math.min(Math.max(focusedBadgeIndex, 0), removeButtons.length - 1);\n removeButtons[nextFocusIndex].focus();\n } else {\n this._applyFocusIntent('input', 'selected-chip-removed');\n }\n }\n \n const config = option && 'getConfig' in option && typeof (option as SelectOption).getConfig === 'function'\n ? (option as SelectOption).getConfig()\n : undefined;\n this._emit('remove', { item: config?.item ?? item, index: entry.index });\n }\n\n private _updateInputDisplay(): void {\n const selectedEntries = this._getSelectedEntries();\n const selectedItems = selectedEntries.map(({ item }) => item);\n const getLabel = this._config.serverSide.getLabelFromItem || ((item) => (item as any)?.label ?? String(item));\n \n if (selectedItems.length === 0) {\n this._input.value = '';\n this._input.placeholder = this._config.placeholder || 'Select an option...';\n // Clear any badges\n const existingBadges = this._inputContent.querySelectorAll('.selection-badge');\n existingBadges.forEach(badge => badge.remove());\n } else if (this._config.selection.mode === 'single') {\n this._input.value = getLabel(selectedItems[0]);\n } else {\n // Multi-select: show badges instead of text in input\n this._input.value = '';\n this._input.placeholder = '';\n \n // Clear existing badges\n const existingBadges = this._inputContent.querySelectorAll('.selection-badge');\n existingBadges.forEach(badge => badge.remove());\n \n // Create badges for each selected item\n selectedEntries.forEach(({ key, index, item }) => {\n const badge = document.createElement('span');\n badge.className = 'selection-badge';\n if (this._config.styles.classNames?.badge) {\n badge.classList.add(...this._config.styles.classNames.badge.split(' ').filter(Boolean));\n }\n badge.setAttribute('part', 'chip');\n\n const badgeLabel = document.createElement('span');\n badgeLabel.className = 'selection-badge-label';\n if (this._config.styles.classNames?.badgeLabel) {\n badgeLabel.classList.add(...this._config.styles.classNames.badgeLabel.split(' ').filter(Boolean));\n }\n badgeLabel.setAttribute('part', 'chip-label');\n badgeLabel.textContent = getLabel(item);\n badge.appendChild(badgeLabel);\n \n // Add remove button to badge\n if (this._config.selection.showRemoveButton !== false) {\n const removeBtn = document.createElement('button');\n removeBtn.type = 'button';\n removeBtn.className = 'badge-remove';\n if (this._config.styles.classNames?.removeButton) {\n removeBtn.classList.add(...this._config.styles.classNames.removeButton.split(' ').filter(Boolean));\n }\n if (this._config.styles.classNames?.badgeRemove) {\n removeBtn.classList.add(...this._config.styles.classNames.badgeRemove.split(' ').filter(Boolean));\n }\n removeBtn.setAttribute('part', 'chip-remove');\n removeBtn.setAttribute('aria-label', `Remove ${getLabel(item)}`);\n\n const removeIcon = document.createElement('span');\n removeIcon.className = 'badge-remove-icon';\n if (this._config.styles.classNames?.badgeRemoveIcon) {\n removeIcon.classList.add(...this._config.styles.classNames.badgeRemoveIcon.split(' ').filter(Boolean));\n }\n removeIcon.setAttribute('part', 'chip-remove-icon');\n this._setIconContent(removeIcon, this._config.selection.removeButtonIcon, '×');\n removeBtn.appendChild(removeIcon);\n\n removeBtn.addEventListener('pointerdown', (e) => {\n e.stopPropagation();\n e.preventDefault();\n });\n removeBtn.addEventListener('click', (e) => {\n e.stopPropagation();\n e.preventDefault();\n this._handleOptionRemove(index, key);\n });\n\n badge.appendChild(removeBtn);\n }\n this._inputContent.insertBefore(badge, this._input);\n });\n }\n\n // A query typed during an accepted-snapshot projection is a pending user\n // intent, not part of the committed projection state. Keep it visible even\n // when selection/display synchronization runs during that transaction.\n if (this._acknowledgedPendingSearchQuery !== null) {\n this._input.value = this._acknowledgedPendingSearchQuery;\n }\n this._syncClearControlState();\n }\n\n private _isActivelyEditingSearchInput(): boolean {\n return this._config.searchable === true\n && this._state.isOpen\n && this._shadow.activeElement === this._input;\n }\n\n private _renderOptionsWithAnimation(): void {\n // Add fade-out animation\n this._optionsContainer.style.opacity = '0';\n this._optionsContainer.style.transition = 'opacity 0.15s ease-out';\n \n this._setLifecycleTimeout(() => {\n this._renderOptions();\n // Fade back in\n this._optionsContainer.style.opacity = '1';\n this._optionsContainer.style.transition = 'opacity 0.2s ease-in';\n }, 150);\n }\n\n private _scrollToSelected(): void {\n if (this._state.selectedIndices.size === 0) return;\n \n const target = this._config.scrollToSelected.multiSelectTarget;\n const indices = Array.from(this._state.selectedIndices).filter((index) => index >= 0).sort((a, b) => a - b);\n if (indices.length === 0) return;\n \n // For multi-select, find the closest selected item to the current scroll position\n let targetIndex: number;\n \n if (this._config.selection.mode === 'multi' && indices.length > 1) {\n // Calculate which selected item is closest to the center of the viewport\n const dropdownRect = this._dropdown.getBoundingClientRect();\n const viewportCenter = this._dropdown.scrollTop + (dropdownRect.height / 2);\n \n // Find the selected item closest to viewport center\n let closestIndex = indices[0];\n let closestDistance = Infinity;\n \n for (const index of indices) {\n const option = this._getOptionElementByIndex(index);\n \n if (option) {\n const optionTop = option.offsetTop;\n const distance = Math.abs(optionTop - viewportCenter);\n \n if (distance < closestDistance) {\n closestDistance = distance;\n closestIndex = index;\n }\n }\n }\n \n targetIndex = closestIndex;\n } else {\n // For single select or only one selected item, use the configured target\n targetIndex = target === 'first' ? indices[0] : indices[indices.length - 1];\n }\n \n // Find and scroll to the target option\n let option = this._getOptionElementByIndex(targetIndex);\n if (!option && this._guardedVirtualizer) {\n const targetKey = this._itemRegistry.indexToKey.get(targetIndex);\n if (targetKey !== undefined) {\n this._materializeGuardedVirtualKey(targetKey);\n option = this._getOptionElementByIndex(targetIndex);\n }\n }\n \n if (option) {\n // Use smooth scrolling with center alignment for better UX\n if (typeof option.scrollIntoView === 'function') {\n option.scrollIntoView({\n block: this._config.scrollToSelected.block || 'center',\n behavior: 'smooth',\n });\n }\n \n // Also set it as active for keyboard navigation\n this._setActive(targetIndex, 'programmatic');\n }\n }\n\n private async _loadMoreItems(trigger: 'manual' | 'sentinel' = 'manual'): Promise<void> {\n if (this._dataLoadingConfig.protocol === 'acknowledged') {\n if (\n !this._dataRequestCoordinator\n || !this._acknowledgedReady\n || this._acknowledgedProjectionPending\n || this._acknowledgedProjectionSettling\n ) return;\n const actions = this._dataRequestCoordinator.requestLoadMore(trigger);\n this._dispatchAcknowledgedActions(actions);\n return;\n }\n\n if (this._dataRequestCoordinator) {\n if (!this._acknowledgedReady || this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling) return;\n const actions = this._dataRequestCoordinator.requestLoadMore(trigger);\n this._dispatchAcknowledgedActions(actions);\n return;\n }\n\n if (this._state.isBusy) return;\n \n this._setBusy(true);\n \n // Save scroll position before loading\n if (this._dropdown) {\n this._state.lastScrollPosition = this._dropdown.scrollTop;\n this._state.preserveScrollPosition = true;\n \n // Update dropdown to show loading indicator but keep the\n // same scrollTop so the visible items don't move.\n this._renderOptions();\n this._dropdown.scrollTop = this._state.lastScrollPosition;\n }\n \n try {\n // Emit event for parent to handle\n this._state.currentPage++;\n \n this._emit('loadMore', { page: this._state.currentPage, items: [] });\n this._config.callbacks.onLoadMore?.(this._state.currentPage);\n \n // NOTE: We do NOT set isBusy = false here.\n // The parent component MUST call setItems() or similar to clear the busy state.\n // This prevents the sentinel from reappearing before new items are loaded.\n } catch (error) {\n this._handleError(error as Error);\n this._setBusy(false); // Only clear on error\n }\n }\n\n private _setBusy(busy: boolean): void {\n this._state.isBusy = busy;\n this._syncListboxAccessibility();\n \n // Trigger re-render to show/hide busy indicator\n // We use _renderOptions to handle the UI update\n this._renderOptions();\n }\n\n private _handleError(error: Error): void {\n this._emit('error', { message: error.message, cause: error });\n this._config.callbacks.onError?.(error);\n }\n\n private _emit<K extends SelectEventName>(name: K, detail: SelectEventsDetailMap[K]): void {\n this.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));\n if (name !== 'diagnostic') {\n this._track('event', String(name), detail);\n }\n }\n\n private _track(source: 'event' | 'style' | 'limitation', name: string, detail?: unknown): void {\n const cfg = this._config.tracking;\n if (!cfg?.enabled) return;\n\n if (source === 'event' && !cfg.events) return;\n if (source === 'style' && !cfg.styling) return;\n if (source === 'limitation' && !cfg.limitations) return;\n\n const entry: TrackingEntry = {\n timestamp: Date.now(),\n source,\n name,\n detail,\n };\n\n const bucket = source === 'event'\n ? this._tracking.events\n : source === 'style'\n ? this._tracking.styles\n : this._tracking.limitations;\n\n bucket.push(entry);\n\n const maxEntries = Math.max(10, cfg.maxEntries || 200);\n if (bucket.length > maxEntries) {\n bucket.splice(0, bucket.length - maxEntries);\n }\n\n if (cfg.emitDiagnostics) {\n this.dispatchEvent(new CustomEvent('diagnostic', {\n detail: entry,\n bubbles: true,\n composed: true,\n }));\n }\n }\n\n private _getKnownLimitationDefinitions(): Omit<LimitationState, 'mode' | 'status'>[] {\n return [\n {\n id: 'variableItemHeight',\n title: 'Variable item height',\n description: 'Virtualization assumes fixed or estimated item heights; fully dynamic heights are not yet supported.',\n workaround: 'Use consistent item heights or set estimatedItemHeight to your dominant row size.',\n },\n {\n id: 'builtInFetchPaginationApi',\n title: 'Built-in fetch/pagination API',\n description: 'Core does not include a built-in fetchUrl/searchUrl pagination transport.',\n workaround: 'Use onSearch/onLoadMore callbacks and update data via setItems().',\n },\n {\n id: 'virtualizationOverheadSmallLists',\n title: 'Virtualization overhead for small lists',\n description: 'Virtualization can add slight overhead on very small lists.',\n workaround: 'Disable virtualization for tiny datasets when micro-latency is critical.',\n },\n {\n id: 'runtimeModeSwitching',\n title: 'Runtime single/multi mode switching',\n description: 'Switching between single and multi mode can require state reset for consistency.',\n workaround: 'Enable autoMitigateRuntimeModeSwitch or recreate/reset component state when toggling modes.',\n },\n {\n id: 'legacyBrowserSupport',\n title: 'Legacy browser support',\n description: 'Official support targets modern evergreen browsers.',\n },\n {\n id: 'webkitArchLinux',\n title: 'Playwright WebKit on Arch-based Linux',\n description: 'Native WebKit Playwright bundle depends on unavailable legacy system libraries on Arch-based distros.',\n workaround: 'Run WebKit E2E tests via Playwright Docker image.',\n },\n ];\n }\n\n private _evaluateLimitationStatus(id: KnownLimitationId): 'active' | 'mitigated' | 'suppressed' {\n const policyMode = this._config.limitations?.policies?.[id]?.mode ?? 'default';\n if (policyMode === 'suppress') return 'suppressed';\n\n if (id === 'runtimeModeSwitching' && this._config.limitations?.autoMitigateRuntimeModeSwitch) {\n return 'mitigated';\n }\n\n return 'active';\n }\n\n getKnownLimitations(): LimitationState[] {\n return this._getKnownLimitationDefinitions().map((limitation) => {\n const mode = this._config.limitations?.policies?.[limitation.id]?.mode ?? 'default';\n return {\n ...limitation,\n mode,\n status: this._evaluateLimitationStatus(limitation.id),\n };\n });\n }\n\n setLimitationPolicies(policies: LimitationPolicyMap): void {\n const next = {\n ...(this._config.limitations?.policies || {}),\n ...policies,\n };\n\n this.updateConfig({\n limitations: {\n ...(this._config.limitations || { autoMitigateRuntimeModeSwitch: true, policies: {} }),\n policies: next,\n },\n });\n\n this._track('limitation', 'policiesUpdated', { policies: next });\n }\n\n getTrackingSnapshot(): TrackingSnapshot {\n return {\n events: [...this._tracking.events],\n styles: [...this._tracking.styles],\n limitations: [...this._tracking.limitations],\n };\n }\n\n clearTracking(source?: 'event' | 'style' | 'limitation' | 'all'): void {\n if (!source || source === 'all') {\n this._tracking.events = [];\n this._tracking.styles = [];\n this._tracking.limitations = [];\n return;\n }\n\n if (source === 'event') this._tracking.events = [];\n if (source === 'style') this._tracking.styles = [];\n if (source === 'limitation') this._tracking.limitations = [];\n }\n\n getCapabilities(): SelectCapabilitiesReport {\n return {\n styling: {\n classMap: true,\n optionRenderer: true,\n groupHeaderRenderer: true,\n cssCustomProperties: true,\n shadowParts: true,\n globalStyleMirroring: true,\n },\n events: {\n emitted: ['select', 'open', 'close', 'search', 'change', 'loadMore', 'remove', 'clear', 'error', 'diagnostic'],\n diagnosticEvent: true,\n },\n functionality: {\n multiSelect: true,\n searchable: true,\n infiniteScroll: true,\n loadMore: true,\n clearControl: true,\n groupedItems: true,\n serverSideSelection: true,\n runtimeModeSwitchMitigation: Boolean(this._config.limitations?.autoMitigateRuntimeModeSwitch),\n },\n limitations: this.getKnownLimitations(),\n };\n }\n\n private _emitChange(): void {\n const selectedEntries = this._getSelectedEntries();\n const selectedItems = selectedEntries.map(({ item }) => item);\n const getValue = this._config.serverSide.getValueFromItem || ((item) => (item as any)?.value ?? item);\n const selectedValues = selectedItems.map(getValue);\n const selectedIndices = selectedEntries.map(({ index }) => index).filter((index) => index >= 0);\n\n this._emit('change', { selectedItems, selectedValues, selectedIndices });\n this._config.callbacks.onChange?.(selectedItems, selectedValues);\n }\n\n // Public API\n\n get optionRenderer(): OptionRendererFn | undefined {\n return this._optionRenderer;\n }\n\n set optionRenderer(renderer: OptionRendererFn | undefined) {\n if (this._optionRenderer === renderer) return;\n\n this._invalidateGuardedMeasurements();\n this._optionRenderer = renderer;\n this._setGlobalStylesMirroring(Boolean(renderer || this._classMap || this._groupHeaderRenderer));\n this._track('style', 'optionRendererChanged', { enabled: Boolean(renderer) });\n this._renderOptions();\n }\n \n /**\n * Set items to display in the select\n */\n setItems(items: unknown[]): void {\n this._invalidateGuardedMeasurements();\n const previousLength = this._state.loadedItems.length;\n this._rebuildItemRegistry(items);\n this._state.groupedItems = this._groupItemsByProperty(items);\n if (!this._state.searchQuery && !this._isActivelyEditingSearchInput()) this._updateInputDisplay();\n \n const newLength = this._state.loadedItems.length;\n\n if (this._dataRequestCoordinator) {\n const acknowledgedBusy = this._dataRequestCoordinator.getSnapshot().busy\n || this._acknowledgedProjectionPending;\n this._state.isSearching = false;\n this._state.isBusy = acknowledgedBusy;\n\n if (this._state.preserveScrollPosition && this._dropdown) {\n const targetScrollTop = this._state.lastScrollPosition;\n this._renderOptions();\n this._optionsContainer.scrollTop = targetScrollTop;\n this._requestLifecycleFrame(() => {\n if (this._optionsContainer) this._optionsContainer.scrollTop = targetScrollTop;\n });\n if (!acknowledgedBusy) this._state.preserveScrollPosition = false;\n } else {\n this._renderOptions();\n }\n return;\n }\n \n // When infinite scroll is active (preserveScrollPosition = true),\n // we need to maintain scroll position during the update\n if (this._state.preserveScrollPosition && this._dropdown) {\n const targetScrollTop = this._state.lastScrollPosition;\n \n // Only clear loading if we actually got more items\n if (newLength > previousLength) {\n this._state.isBusy = false;\n }\n \n this._renderOptions();\n \n // Restore the exact scrollTop we had before loading\n // so the previously visible items stay in place and\n // new ones simply appear below.\n this._dropdown.scrollTop = targetScrollTop;\n \n // Ensure it sticks after layout\n this._requestLifecycleFrame(() => {\n if (this._dropdown) {\n this._dropdown.scrollTop = targetScrollTop;\n }\n });\n \n // Only clear preserveScrollPosition if we got new items\n if (newLength > previousLength) {\n this._state.preserveScrollPosition = false;\n }\n } else {\n // Normal update - just render normally\n this._state.isBusy = false;\n this._renderOptions();\n }\n \n }\n\n private _groupItemsByProperty(items: unknown[]): GroupedItem[] {\n const hasGroupData = items.some((item, index) =>\n this._itemAdapter.getGroupKey?.(item, index) !== null\n );\n\n if (!hasGroupData) {\n return [];\n }\n\n const groups = new Map<string, unknown[]>();\n items.forEach((item, index) => {\n const rawGroup = this._itemAdapter.getGroupKey?.(item, index);\n const label = rawGroup == null ? 'Ungrouped' : String(rawGroup);\n const options = groups.get(label);\n if (options) {\n options.push(item);\n } else {\n groups.set(label, [item]);\n }\n });\n\n return Array.from(groups.entries()).map(([label, options]) => ({ label, options }));\n }\n\n /**\n * Set grouped items\n */\n setGroupedItems(groupedItems: GroupedItem[]): void {\n this._destroyGuardedVirtualizer();\n this._rebuildItemRegistry(groupedItems.flatMap(group => group.options));\n this._state.groupedItems = groupedItems;\n this._renderOptions();\n if (!this._state.searchQuery && !this._isActivelyEditingSearchInput()) this._updateInputDisplay();\n }\n\n /**\n * Get currently selected items\n */\n getSelectedItems(): unknown[] {\n this._ensureRegistryCurrent();\n return this._getSelectedEntries().map((entry) => entry.item);\n }\n\n /**\n * Get all loaded items\n */\n get loadedItems(): unknown[] {\n return this._state.loadedItems;\n }\n\n /**\n * Get currently selected values\n */\n getSelectedValues(): unknown[] {\n return this.getSelectedItems().map((item) => this._getItemValue(item));\n }\n\n /**\n * Set selected items by value\n */\n async setSelectedValues(values: unknown[]): Promise<void> {\n if (this._config.serverSide.enabled && this._config.serverSide.fetchSelectedItems) {\n await this._loadSelectedItemsByValues(values);\n } else {\n this._ensureRegistryCurrent();\n\n const selected = this._itemRegistry.records\n .filter((record) => arrayIncludesValue(values, record.value) && !this._isOptionSelectionBlocked(record.item));\n this._requestSelectionReplacement(selected, 'external-value-sync', 'setSelectedValues');\n \n this._renderOptions();\n this._updateInputDisplay();\n this._emitChange();\n }\n }\n\n /**\n * Load and select items by their values (for infinite scroll scenario)\n */\n private async _loadSelectedItemsByValues(values: unknown[]): Promise<void> {\n if (!this._config.serverSide.fetchSelectedItems) return;\n \n this._setBusy(true);\n const generation = ++this._asyncGeneration;\n \n try {\n const items = await this._config.serverSide.fetchSelectedItems(values);\n if (generation !== this._asyncGeneration || !this.isConnected) return;\n\n const fetchedRegistry = createItemRegistry(items, this._itemAdapter, {\n duplicateKeyPolicy: this._getDuplicateKeyPolicy(),\n });\n this._requestSelectionReplacement(fetchedRegistry.records, 'external-value-sync', 'fetched selected items');\n \n this._renderOptions();\n this._updateInputDisplay();\n this._emitChange();\n \n // Scroll to selected if configured\n if (this._config.scrollToSelected.enabled) {\n this._scrollToSelected();\n }\n } catch (error) {\n if (generation !== this._asyncGeneration || !this.isConnected) return;\n this._handleError(error as Error);\n } finally {\n if (generation === this._asyncGeneration && this.isConnected) {\n this._setBusy(false);\n }\n }\n }\n\n /**\n * Clear all selections\n */\n clear(): void {\n this._ensureRegistryCurrent();\n this._dispatchSelection({ type: 'CLEAR_SELECTION_REQUEST', reason: 'programmatic' }, 'clear');\n this._renderOptions();\n this._updateInputDisplay();\n this._emitChange();\n this._syncClearControlState();\n }\n\n /**\n * Clear search query and restore full option list\n */\n clearSearch(): void {\n this._state.searchQuery = '';\n if (this._config.searchable) {\n this._input.value = '';\n if (this._state.selectedIndices.size > 0) {\n this._updateInputDisplay();\n }\n }\n this._renderOptions();\n this._syncClearControlState();\n }\n\n /**\n * Open dropdown\n */\n open(): void {\n this._handleOpen();\n }\n\n /**\n * Close dropdown\n */\n close(): void {\n this._handleClose();\n }\n\n /**\n * Update component configuration\n */\n updateConfig(config: SelectInstanceConfig): void {\n this._invalidateGuardedMeasurements();\n const previousMode = this._config.selection.mode;\n const previousEnabled = this._config.enabled;\n const previousDataLoadingConfig = this._dataLoadingConfig;\n\n const { dataLoading, callbacks, ...legacyConfig } = config;\n const legacyUpdate = { ...legacyConfig } as Partial<GlobalSelectConfig>;\n let configErrorDetail: DataLoadingConfigErrorDetail | undefined;\n\n if (callbacks !== undefined && callbacks !== null) {\n const callbackInput = callbacks as typeof callbacks & {\n onDataLoadingConfigError?: ((detail: DataLoadingConfigErrorDetail) => void) | undefined;\n };\n if (Object.prototype.hasOwnProperty.call(callbackInput, 'onDataLoadingConfigError')) {\n this._dataLoadingConfigErrorCallback = callbackInput.onDataLoadingConfigError;\n }\n if (Object.prototype.hasOwnProperty.call(callbackInput, 'onDataRequestCancel')) {\n this._dataRequestCancelCallback = callbackInput.onDataRequestCancel;\n }\n if (Object.prototype.hasOwnProperty.call(callbackInput, 'onDataProjection')) {\n this._dataProjectionCallback = callbackInput.onDataProjection;\n }\n const legacyCallbacks = { ...callbackInput };\n delete legacyCallbacks.onDataLoadingConfigError;\n delete legacyCallbacks.onDataRequestCancel;\n delete legacyCallbacks.onDataProjection;\n legacyUpdate.callbacks = legacyCallbacks as Partial<CallbackConfig>;\n }\n\n this._config = this._mergeConfig(this._config, legacyUpdate);\n\n if (dataLoading !== undefined) {\n const dataLoadingPrototype = dataLoading !== null && typeof dataLoading === 'object'\n ? Object.getPrototypeOf(dataLoading)\n : undefined;\n const candidate = dataLoadingPrototype === Object.prototype || dataLoadingPrototype === null\n ? { ...this._dataLoadingConfig, ...dataLoading }\n : dataLoading;\n const validation = validateDataLoadingConfig(candidate);\n\n if (validation.valid) {\n this._dataLoadingConfig = validation.value;\n this._hasLastInvalidDataLoadingCandidate = false;\n this._lastInvalidDataLoadingCandidate = undefined;\n } else {\n const candidateSignature = createInvalidDataLoadingCandidateSignature(candidate, validation.issues);\n if (\n !this._hasLastInvalidDataLoadingCandidate ||\n !this._lastInvalidDataLoadingCandidate ||\n !invalidDataLoadingSignaturesEqual(this._lastInvalidDataLoadingCandidate, candidateSignature)\n ) {\n this._hasLastInvalidDataLoadingCandidate = true;\n this._lastInvalidDataLoadingCandidate = candidateSignature;\n configErrorDetail = { issues: validation.issues };\n }\n }\n }\n\n this._rebuildItemRegistry();\n if (previousEnabled !== this._config.enabled) {\n this._input.disabled = !this._config.enabled;\n if (!this._config.enabled && this._state.isOpen) {\n this._handleClose('disabled');\n }\n this._runEngineEffects(this._engine.dispatch({ type: 'DISABLED_CHANGED', disabled: !this._config.enabled }));\n }\n\n if (\n previousMode !== this._config.selection.mode &&\n this._config.limitations?.autoMitigateRuntimeModeSwitch\n ) {\n this.clear();\n this._track('limitation', 'runtimeModeSwitchMitigated', {\n from: previousMode,\n to: this._config.selection.mode,\n });\n } else if (previousMode !== this._config.selection.mode) {\n this._track('limitation', 'runtimeModeSwitchDetected', {\n from: previousMode,\n to: this._config.selection.mode,\n });\n }\n \n // Update input state based on new config\n if (this._input) {\n this._input.readOnly = !this._config.searchable;\n this._syncComboboxAccessibility();\n if (this._state.selectedIndices.size === 0) {\n this._input.placeholder = this._config.placeholder || 'Select an option...';\n }\n }\n\n if (this._clearControl) {\n this._clearControl.setAttribute('aria-label', this._config.clearControl.ariaLabel || 'Clear selection and search');\n }\n\n if (this._clearControlIcon) {\n // Use config icon if provided, otherwise default SVG\n if (this._config.clearControl.icon) {\n this._clearControlIcon.textContent = this._config.clearControl.icon;\n } else {\n this._clearControlIcon.innerHTML = `<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 4L4 12M4 4L12 12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\n }\n }\n\n this._syncStyleConfigVariables();\n\n this._syncListboxAccessibility();\n\n if (this.isConnected) {\n this._syncDirectionConfig();\n this._syncInputContainerMode();\n this._syncMultiSelectDisplayConfig();\n this._syncDropdownPlacement();\n \n // Re-initialize observers in case infinite scroll was enabled/disabled\n this._initializeObservers();\n\n this._syncClearControlState();\n if (!this._isActivelyEditingSearchInput()) this._updateInputDisplay();\n \n this._renderOptions();\n } else {\n this._syncInputContainerMode();\n this._syncMultiSelectDisplayConfig();\n this._syncClearControlState();\n if (!this._isActivelyEditingSearchInput()) this._updateInputDisplay();\n }\n\n this._acknowledgedSearchMode = this._dataLoadingConfig.searchMode;\n if (this._dataLoadingConfig.protocol === 'legacy') this._acknowledgedDeferredStart = false;\n const coordinator = this._dataRequestCoordinator;\n const switchesToLegacy = previousDataLoadingConfig.protocol === 'acknowledged'\n && this._dataLoadingConfig.protocol === 'legacy';\n const acknowledgedModeChanged = previousDataLoadingConfig.protocol !== this._dataLoadingConfig.protocol\n || previousDataLoadingConfig.searchMode !== this._dataLoadingConfig.searchMode\n || previousDataLoadingConfig.paginationMode !== this._dataLoadingConfig.paginationMode;\n\n if (coordinator && switchesToLegacy) {\n if (this._acknowledgedReady && !this._acknowledgedProjectionPending && !this._acknowledgedProjectionSettling) {\n const update = coordinator.updateConfig(this._createCoordinatorConfig());\n if (update.status === 'accepted') this._dispatchAcknowledgedActions(update.actions);\n }\n this._acknowledgedReady = false;\n this._dispatchAcknowledgedActions(coordinator.disconnect());\n if (this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling) {\n this._clearAcknowledgedCoordinatorAfterProjection = true;\n } else {\n this._dataRequestCoordinator = null;\n this._acknowledgedSearchMode = null;\n this._state.isBusy = false;\n this._state.isSearching = false;\n this._syncListboxAccessibility();\n this._renderOptions();\n }\n } else if (coordinator && this._dataLoadingConfig.protocol === 'acknowledged') {\n this._clearAcknowledgedCoordinatorAfterProjection = false;\n if (this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling) {\n this._acknowledgedConfigUpdatePending = true;\n this._acknowledgedDeferredModeChange ||= acknowledgedModeChanged;\n } else if (this._acknowledgedReady) {\n const update = coordinator.updateConfig(this._createCoordinatorConfig());\n if (update.status === 'accepted') {\n this._dispatchAcknowledgedActions(update.actions);\n const snapshot = coordinator.getSnapshot();\n this._state.isBusy = snapshot.busy;\n this._state.isSearching = snapshot.activeRequest?.kind === 'search';\n this._syncListboxAccessibility();\n if (update.actions.every((action) => action.type !== 'request')) this._renderOptions();\n }\n }\n }\n\n if (configErrorDetail) {\n this._emit('dataLoadingConfigError', configErrorDetail);\n try {\n this._dataLoadingConfigErrorCallback?.(configErrorDetail);\n } catch (error) {\n this._handleError(error as Error);\n }\n }\n }\n\n /** Open the acknowledged request lifecycle after the host has installed listeners. */\n startDataLoading(): void {\n const projectionRecoveryOnly = Boolean(\n this._dataRequestCoordinator && this._acknowledgedProjectionPending,\n );\n if (this._dataLoadingConfig.protocol !== 'acknowledged' && !projectionRecoveryOnly) return;\n\n if (this._dataLoadingConfig.protocol === 'acknowledged' && !this._ensureDataRequestCoordinator()) return;\n if (!this.isConnected) {\n if (!this._hasEverConnected) this._acknowledgedDeferredStart = true;\n return;\n }\n if (this._acknowledgedReady) return;\n if (this._acknowledgedStartTask) {\n // A reconnect can arrive while the previous readiness task is still\n // unwinding an interrupted render. Preserve the restart request so the\n // accepted projection is recovered as soon as that task settles.\n this._acknowledgedDeferredStart = true;\n return;\n }\n\n const task = this._startAcknowledgedDataLoading();\n this._acknowledgedStartTask = task;\n void task.finally(() => {\n if (this._acknowledgedStartTask !== task) return;\n this._acknowledgedStartTask = null;\n if (this._acknowledgedDeferredStart && this.isConnected) {\n this._acknowledgedDeferredStart = false;\n this.startDataLoading();\n }\n }).catch((error) => this._handleError(error as Error));\n }\n\n /** Return detached coordinator state without exposing its canonical item storage. */\n getDataLoadingState(): DataLoadingStateSnapshot {\n const coordinator = this._dataRequestCoordinator;\n if (!coordinator) {\n const isRemote = this._dataLoadingConfig.searchMode === 'remote'\n || this._dataLoadingConfig.searchMode === 'hybrid';\n const nextEligiblePosition = this._dataLoadingConfig.paginationMode === 'cursor'\n ? { mode: 'cursor' as const, ordinal: 1 }\n : {\n mode: 'page' as const,\n page: isRemote\n ? this._dataLoadingConfig.firstPage\n : (this._config.infiniteScroll.initialPage ?? 1) + 1,\n };\n return {\n status: 'idle',\n connected: this.isConnected,\n busy: false,\n projectionPending: false,\n queryGeneration: 0,\n activeRequest: null,\n hasMore: this._dataLoadingConfig.protocol === 'acknowledged'\n && !isRemote\n && (this._config.infiniteScroll.enabled || this._config.loadMore.enabled),\n nextEligiblePosition,\n error: null,\n resourceLimit: null,\n };\n }\n\n const snapshot = coordinator.getSnapshot();\n const activeRequest = snapshot.activeRequest\n ? {\n ...snapshot.activeRequest,\n position: { ...snapshot.activeRequest.position },\n } as DataRequest\n : null;\n return {\n status: snapshot.status,\n connected: snapshot.connected,\n busy: snapshot.busy || this._acknowledgedProjectionPending,\n projectionPending: this._acknowledgedProjectionPending,\n queryGeneration: snapshot.queryGeneration,\n activeRequest,\n hasMore: snapshot.hasMore,\n nextEligiblePosition: { ...snapshot.nextEligiblePosition },\n error: snapshot.error ? { ...snapshot.error } : null,\n resourceLimit: snapshot.resourceLimit ? { ...snapshot.resourceLimit } : null,\n };\n }\n\n /** Synchronously accept/classify a host completion; DOM projection proceeds asynchronously. */\n completeDataRequest(completion: DataRequestCompletion): DataRequestCompletionResult {\n const coordinator = this._dataRequestCoordinator;\n if (!coordinator) {\n const candidate = completion as unknown;\n if (\n candidate === null\n || typeof candidate !== 'object'\n || !('requestId' in candidate)\n || typeof candidate.requestId !== 'string'\n || candidate.requestId.length === 0\n || !('queryGeneration' in candidate)\n || !Number.isSafeInteger(candidate.queryGeneration)\n || (candidate.queryGeneration as number) < 0\n || !('status' in candidate)\n || typeof candidate.status !== 'string'\n || !['succeeded', 'empty', 'exhausted', 'failed', 'cancelled'].includes(candidate.status)\n ) return 'invalid';\n return 'unknown-request';\n }\n\n const snapshotBefore = coordinator.getSnapshot();\n const completionRecord = completion && typeof completion === 'object'\n ? completion as unknown as Record<string, unknown>\n : null;\n const activeRequest = snapshotBefore.activeRequest;\n const request = activeRequest\n && completionRecord?.requestId === activeRequest.requestId\n && completionRecord?.queryGeneration === activeRequest.queryGeneration\n ? activeRequest\n : null;\n const status = completionRecord?.status;\n const advancesPosition = status === 'succeeded'\n || status === 'exhausted'\n || (status === 'empty' && completionRecord?.advance === 'next');\n const result = coordinator.completeDataRequest(completion);\n\n if (result === 'accepted' && request) {\n this._acknowledgedLastRequest = request;\n this._acknowledgedProjectionRequest = request;\n this._acknowledgedProjectionAttempt = 0;\n this._acknowledgedProjectionCommitsPosition = advancesPosition;\n void this._projectAcknowledgedSnapshot(\n coordinator.getSnapshot(),\n request,\n advancesPosition,\n );\n } else if (result === 'resource-limit') {\n const resourceLimit = coordinator.getSnapshot().resourceLimit;\n this._emit('diagnostic', {\n timestamp: Date.now(),\n source: 'event',\n name: 'acknowledgedDataLoadingResourceLimit',\n detail: resourceLimit,\n });\n }\n\n return result;\n }\n\n private _createCoordinatorConfig(): DataCoordinatorConfig {\n return {\n dataLoading: { ...this._dataLoadingConfig },\n infiniteScroll: {\n pageSize: this._config.infiniteScroll.pageSize,\n initialPage: this._config.infiniteScroll.initialPage,\n },\n };\n }\n\n private _ensureDataRequestCoordinator(): DataRequestCoordinator | null {\n if (!this._dataRequestCoordinator) {\n const isRemote = this._dataLoadingConfig.searchMode === 'remote'\n || this._dataLoadingConfig.searchMode === 'hybrid';\n try {\n this._dataRequestCoordinator = new DataRequestCoordinator({\n config: this._createCoordinatorConfig(),\n initialQuery: this._state.searchQuery,\n initialItems: this._state.loadedItems,\n hasMore: !isRemote && (this._config.infiniteScroll.enabled || this._config.loadMore.enabled),\n });\n } catch (error) {\n const detail: DataLoadingConfigErrorDetail = {\n issues: [{\n path: 'dataLoading',\n code: 'invalid-value',\n message: `Acknowledged data loading could not start: ${error instanceof Error ? error.message : String(error)}`,\n }],\n };\n this._emit('dataLoadingConfigError', detail);\n try {\n this._dataLoadingConfigErrorCallback?.(detail);\n } catch (callbackError) {\n this._handleError(callbackError as Error);\n }\n return null;\n }\n }\n this._acknowledgedSearchMode = this._dataLoadingConfig.searchMode;\n return this._dataRequestCoordinator;\n }\n\n private async _startAcknowledgedDataLoading(): Promise<void> {\n const coordinator = this._dataRequestCoordinator;\n const projectionRecoveryOnly = Boolean(coordinator && this._acknowledgedProjectionPending);\n if (\n !coordinator\n || (this._dataLoadingConfig.protocol !== 'acknowledged' && !projectionRecoveryOnly)\n || !this.isConnected\n ) return;\n if (this._acknowledgedReady) return;\n\n if (this._acknowledgedProjectionPending) {\n const interruptedProjection = this._acknowledgedProjectionTask;\n if (interruptedProjection) await interruptedProjection;\n if (!this.isConnected) return;\n if (this._acknowledgedProjectionPending) {\n await this._retryAcknowledgedProjection();\n }\n if (!this.isConnected || this._acknowledgedProjectionPending) return;\n }\n\n if (\n this._dataLoadingConfig.protocol !== 'acknowledged'\n || !this._dataRequestCoordinator\n ) return;\n\n if (this._acknowledgedPendingSearchQuery !== null) {\n this._state.searchQuery = this._acknowledgedPendingSearchQuery;\n this._input.value = this._acknowledgedPendingSearchQuery;\n this._acknowledgedPendingSearchQuery = null;\n }\n\n const configUpdate = coordinator.updateConfig(this._createCoordinatorConfig());\n if (configUpdate.status !== 'accepted') {\n this._acknowledgedReady = false;\n return;\n }\n this._acknowledgedConfigUpdatePending = false;\n this._acknowledgedDeferredModeChange = false;\n this._clearAcknowledgedCoordinatorAfterProjection = false;\n\n this._acknowledgedReady = true;\n this._initializeObservers();\n const configActions = configUpdate.actions;\n this._dispatchAcknowledgedActions(configActions);\n const connectionActions = coordinator.connect(this._state.searchQuery);\n this._dispatchAcknowledgedActions(connectionActions);\n if (configActions.length === 0 && connectionActions.length === 0) this._renderOptions();\n const readyRenderCycleId = this._renderCycleId;\n const readyRenderCompleted = await this._waitForRenderCycle(readyRenderCycleId);\n if (!readyRenderCompleted) {\n this._acknowledgedReady = false;\n throw new Error('Acknowledged readiness render was superseded before completion');\n }\n }\n\n private _mergeConfig<T extends Record<string, any>>(target: T, source: Partial<T>): T {\n const result: any = { ...target };\n\n // PERF: Avoid for...in, use Object.keys for predictable iteration\n const keys = Object.keys(source);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!Object.prototype.hasOwnProperty.call(source, key)) continue;\n\n const sourceValue = (source as any)[key];\n if (sourceValue === undefined) continue;\n\n const targetValue = result[key];\n\n // Optional adapter props are commonly forwarded as undefined. Preserve\n // the existing/default config in that case instead of erasing a section.\n if (sourceValue === undefined) continue;\n\n if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {\n result[key] = this._mergeConfig(\n targetValue && typeof targetValue === 'object' ? targetValue : {},\n sourceValue\n );\n } else {\n result[key] = sourceValue;\n }\n }\n\n return result as T;\n }\n\n private _handleClearControlClick(): void {\n const shouldClearSelection = this._config.clearControl.clearSelection !== false;\n const shouldClearSearch = this._config.clearControl.clearSearch !== false;\n\n const hadSelection = this._state.selectedIndices.size > 0;\n const hadSearch = this._state.searchQuery.length > 0;\n\n if (shouldClearSelection && hadSelection) {\n this.clear();\n }\n\n if (shouldClearSearch && hadSearch) {\n this.clearSearch();\n }\n\n this._emit('clear', {\n clearedSelection: shouldClearSelection && hadSelection,\n clearedSearch: shouldClearSearch && hadSearch,\n });\n\n this._config.callbacks.onClear?.({\n clearedSelection: shouldClearSelection && hadSelection,\n clearedSearch: shouldClearSearch && hadSearch,\n });\n\n this._applyFocusIntent('input', 'clear-control-complete');\n }\n\n private _syncClearControlState(): void {\n if (!this._clearControl || !this._inputContainer || !this._arrowContainer) return;\n\n const enabled = this._config.clearControl.enabled === true;\n const hasSelection = this._state.selectedIndices.size > 0;\n const visibleSearchQuery = this._acknowledgedPendingSearchQuery ?? this._state.searchQuery;\n const hasSearch = visibleSearchQuery.length > 0;\n const clearSelection = this._config.clearControl.clearSelection !== false;\n const clearSearch = this._config.clearControl.clearSearch !== false;\n const hasSomethingToClear = (clearSelection && hasSelection) || (clearSearch && hasSearch);\n const hideWhenEmpty = this._config.clearControl.hideWhenEmpty !== false;\n const visible = enabled && (!hideWhenEmpty || hasSomethingToClear);\n\n // Reserve the action area only while the clear control is actually visible.\n this._inputContainer.classList.toggle('has-clear-control', visible);\n this._arrowContainer.classList.toggle('with-clear-control', visible);\n this._clearControl.hidden = !visible;\n this._clearControl.disabled = !hasSomethingToClear;\n this._clearControl.setAttribute('aria-hidden', String(!visible));\n }\n\n /**\n * Set error state\n */\n setError(message: string): void {\n this._hasError = true;\n this._errorMessage = message;\n if (this._errorDescription) this._errorDescription.textContent = message;\n this._syncComboboxAccessibility();\n this._announce(`Error: ${message}`);\n }\n\n /**\n * Clear error state\n */\n clearError(): void {\n this._hasError = false;\n this._errorMessage = '';\n if (this._errorDescription) this._errorDescription.textContent = '';\n this._syncComboboxAccessibility();\n }\n\n /**\n * Set required state\n */\n setRequired(required: boolean): void {\n if (required) {\n this._input.setAttribute('required', '');\n } else {\n this._input.removeAttribute('required');\n }\n this._syncEngineSelectionConfig();\n this._syncComboboxAccessibility();\n }\n\n /**\n * Validate selection (for required fields)\n */\n validate(): boolean {\n const isRequired = this._input.hasAttribute('required');\n if (isRequired && this._state.selectedIndices.size === 0) {\n this.setError('Selection is required');\n return false;\n }\n this.clearError();\n return true;\n }\n\n /**\n * Render options based on current state\n */\n private _deriveVirtualizationScope(filteredIndices: readonly number[]): VirtualizationScope<SelectKey> {\n const keyForIndex = (index: number): SelectKey | undefined => this._itemRegistry.indexToKey.get(index);\n const filteredKeys = filteredIndices\n .map(keyForIndex)\n .filter((key): key is SelectKey => key !== undefined);\n return {\n dataKeys: this._itemRegistry.records.map((record) => record.key),\n filteredKeys,\n registeredKeys: Array.from(this._engine.state.registeredKeys),\n // The current chunked path schedules all filtered items for rendering;\n // this scaffold records that target set until bounded windows are wired.\n windowKeys: this._renderPlan.intendedRenderKeys.slice(),\n mountedKeys: this._getMountedVirtualizationKeys(this._optionsContainer.children),\n selectedKeys: new Set(this._engine.state.selectedKeys),\n activeKey: this._engine.state.activeKey,\n };\n }\n\n private _getMountedVirtualizationKeys(targets: ArrayLike<Element>): SelectKey[] {\n const keyForIndex = (index: number): SelectKey | undefined => this._itemRegistry.indexToKey.get(index);\n return Array.from(targets)\n .filter((target): target is HTMLElement => target instanceof HTMLElement\n && (target.hasAttribute('data-sm-selectable') || target.hasAttribute('data-selectable')))\n .map((target) => Number(target.getAttribute('data-sm-index') ?? target.getAttribute('data-index')))\n .filter(Number.isInteger)\n .map(keyForIndex)\n .filter((key): key is SelectKey => key !== undefined);\n }\n\n private _refreshMountedVirtualizationScope(): void {\n this._virtualizationScope = {\n ...this._virtualizationScope,\n mountedKeys: this._getMountedVirtualizationKeys(this._optionsContainer.children),\n registeredKeys: Array.from(this._engine.state.registeredKeys),\n selectedKeys: new Set(this._engine.state.selectedKeys),\n activeKey: this._engine.state.activeKey,\n };\n }\n\n private _appendMountedVirtualizationTargets(targets: ArrayLike<Element>): void {\n const mountedKeys = this._getMountedVirtualizationKeys(targets);\n this._virtualizationScope = {\n ...this._virtualizationScope,\n mountedKeys: [...new Set([...this._virtualizationScope.mountedKeys, ...mountedKeys])],\n registeredKeys: Array.from(this._engine.state.registeredKeys),\n selectedKeys: new Set(this._engine.state.selectedKeys),\n activeKey: this._engine.state.activeKey,\n };\n }\n\n private _createLegacyRenderPlan(filteredIndices: readonly number[]): EnhancedSelectRenderPlan {\n const indices = [...filteredIndices];\n const filteredKeys = indices\n .map((index) => this._itemRegistry.indexToKey.get(index))\n .filter((key): key is SelectKey => key !== undefined);\n const filteredIndexByKey = new Map<SelectKey, number>();\n filteredKeys.forEach((key, filteredIndex) => filteredIndexByKey.set(key, filteredIndex));\n\n return {\n mode: 'legacy-full',\n filteredIndices: indices,\n filteredKeys,\n intendedRenderKeys: filteredKeys.slice(),\n filteredIndexByKey,\n };\n }\n\n private _createVirtualRenderPlan(startIndex: number, endIndex: number): EnhancedSelectRenderPlan {\n const filteredKeys = this._renderPlan.filteredKeys.slice();\n const intendedRenderKeys = computeWindowKeys(filteredKeys, startIndex, endIndex);\n const filteredIndices = intendedRenderKeys\n .map((key) => this._itemRegistry.keyToIndex.get(key))\n .filter((index): index is number => index !== undefined);\n\n return {\n mode: 'virtual-window',\n filteredIndices,\n filteredKeys,\n intendedRenderKeys,\n filteredIndexByKey: new Map(this._renderPlan.filteredIndexByKey),\n };\n }\n\n private _ensureGuardedVirtualizer(filteredKeys: readonly SelectKey[]): Virtualizer {\n const keysChanged = this._guardedVirtualizer !== null && (\n filteredKeys.length !== this._guardedVirtualizerKeys.length\n || filteredKeys.some((key, index) => !Object.is(key, this._guardedVirtualizerKeys[index]))\n );\n if (keysChanged) this._destroyGuardedVirtualizer(true);\n\n if (!this._guardedVirtualizer) {\n // The controller only calculates ranges and scroll intents. Give it a\n // detached container so its internal styling never touches rendered UI.\n this._guardedVirtualizer = new Virtualizer(\n document.createElement('div'),\n filteredKeys.length,\n (index) => this._renderPlan.filteredKeys[index],\n {\n estimatedItemHeight: this._resolveGuardedEstimatedItemHeight(),\n buffer: 0,\n measurementThreshold: 0,\n },\n );\n this._guardedVirtualScrollTop = this._optionsContainer.scrollTop;\n this._guardedVirtualViewportHeight = this._resolveGuardedViewportHeight();\n this._optionsContainer.addEventListener('scroll', this._onGuardedVirtualScroll, { passive: true });\n this._guardedScrollListenerAttached = true;\n }\n\n this._guardedVirtualizerKeys = [...filteredKeys];\n return this._guardedVirtualizer;\n }\n\n private _resolveGuardedEstimatedItemHeight(): number {\n const configuredHeight = this._config.estimatedItemHeight;\n if (typeof configuredHeight === 'number' && Number.isFinite(configuredHeight) && configuredHeight > 0) {\n return configuredHeight;\n }\n\n const renderedOption = this._optionsContainer.querySelector<HTMLElement>('[part=\"option\"]');\n const measuredHeight = renderedOption?.getBoundingClientRect().height || renderedOption?.offsetHeight;\n if (typeof measuredHeight === 'number' && Number.isFinite(measuredHeight) && measuredHeight > 0) {\n return measuredHeight;\n }\n\n return 48;\n }\n\n private _resolveGuardedViewportHeight(): number {\n const candidates = [\n this._optionsContainer.clientHeight,\n this._optionsContainer.getBoundingClientRect().height,\n ];\n return candidates.find((height) => Number.isFinite(height) && height > 0) ?? 0;\n }\n\n private _clampGuardedScrollPosition(itemCount: number, viewportHeight: number): number {\n if (!this._guardedVirtualizer) return 0;\n\n const totalHeight = this._guardedVirtualizer.cumulativeOffset(itemCount);\n const maxScrollTop = Math.max(0, totalHeight - viewportHeight);\n const scrollTop = Math.min(Math.max(0, this._guardedVirtualScrollTop), maxScrollTop);\n this._guardedVirtualScrollTop = scrollTop;\n if (this._optionsContainer.scrollTop !== scrollTop) {\n this._optionsContainer.scrollTop = scrollTop;\n }\n return scrollTop;\n }\n\n private _createGuardedSpacer(position: 'top' | 'bottom', height: number): HTMLElement {\n const spacer = document.createElement('div');\n spacer.setAttribute('data-virtual-spacer', position);\n spacer.setAttribute('aria-hidden', 'true');\n spacer.setAttribute('role', 'presentation');\n spacer.style.height = `${Number.isFinite(height) ? Math.max(0, height) : 0}px`;\n spacer.style.minHeight = '0';\n spacer.style.flex = '0 0 auto';\n spacer.style.pointerEvents = 'none';\n return spacer;\n }\n\n private _appendGuardedTopSpacer(): void {\n const virtualizer = this._guardedVirtualizer;\n const window = this._guardedVirtualWindow;\n if (!virtualizer || !window) return;\n\n this._optionsContainer.appendChild(\n this._createGuardedSpacer('top', virtualizer.cumulativeOffset(window.startIndex)),\n );\n }\n\n private _appendGuardedBottomSpacer(): void {\n const virtualizer = this._guardedVirtualizer;\n const window = this._guardedVirtualWindow;\n if (!virtualizer || !window) return;\n\n const totalHeight = virtualizer.cumulativeOffset(this._renderPlan.filteredKeys.length);\n const endOffset = virtualizer.cumulativeOffset(window.endIndex);\n this._optionsContainer.appendChild(\n this._createGuardedSpacer('bottom', Math.max(0, totalHeight - endOffset)),\n );\n }\n\n private _resolveGuardedOverscan(): number {\n return 2;\n }\n\n private _applyGuardedWindowUpdate(\n update: { window: { startIndex: number; endIndex: number; windowSize: number }; scrollTop: number; viewportHeight: number },\n overscan = 0,\n ): boolean {\n if (!this._guardedVirtualizer) return false;\n\n this._guardedVirtualScrollTop = update.scrollTop;\n this._guardedVirtualViewportHeight = update.viewportHeight;\n const itemCount = this._renderPlan.filteredKeys.length;\n const nextWindow = {\n startIndex: Math.max(0, update.window.startIndex - overscan),\n endIndex: Math.min(itemCount, update.window.endIndex + 1 + overscan),\n };\n const changed = this._guardedVirtualWindow?.startIndex !== nextWindow.startIndex\n || this._guardedVirtualWindow?.endIndex !== nextWindow.endIndex;\n this._guardedVirtualWindow = nextWindow;\n return changed;\n }\n\n private _scheduleGuardedVirtualWindowUpdate(): void {\n if (!this._guardedVirtualizer || this._guardedVirtualWindowRafId !== null) return;\n\n this._guardedVirtualWindowRafId = this._requestLifecycleFrame(() => {\n this._guardedVirtualWindowRafId = null;\n const virtualizer = this._guardedVirtualizer;\n if (!virtualizer) return;\n\n const update = virtualizer.updateWindow(\n this._optionsContainer.scrollTop,\n this._resolveGuardedViewportHeight(),\n );\n this._guardedVirtualOverscan = this._resolveGuardedOverscan();\n if (update && this._applyGuardedWindowUpdate(update, this._guardedVirtualOverscan)) {\n this._renderOptions();\n }\n });\n }\n\n private _cancelGuardedVirtualWindowUpdate(): void {\n if (this._guardedVirtualWindowRafId === null) return;\n cancelAnimationFrame(this._guardedVirtualWindowRafId);\n this._lifecycleRafs.delete(this._guardedVirtualWindowRafId);\n this._guardedVirtualWindowRafId = null;\n }\n\n private _applyGuardedScrollResult(result: VirtualizerScrollResult | null): boolean {\n if (!result || !this._guardedVirtualizer) return false;\n\n this._guardedVirtualScrollTop = result.scrollTop;\n this._optionsContainer.scrollTop = result.scrollTop;\n const update = this._guardedVirtualizer.updateWindow(\n this._guardedVirtualScrollTop,\n this._guardedVirtualViewportHeight,\n );\n if (!update) return false;\n\n this._guardedVirtualWindow = {\n startIndex: update.window.startIndex,\n endIndex: update.window.endIndex + 1,\n };\n this._guardedVirtualOverscan = 0;\n return true;\n }\n\n /** Test-only activation seam; deliberately absent from public config/types. */\n private _enableAcknowledgedDataLoadingForTest(\n config: DataCoordinatorConfig,\n options: { hasMore?: boolean } = {},\n ): void {\n if (this._dataRequestCoordinator) {\n throw new Error('Acknowledged data loading is already enabled for this test instance');\n }\n const dataLoading = config.dataLoading;\n this._dataLoadingConfig = {\n protocol: dataLoading?.protocol ?? 'acknowledged',\n searchMode: dataLoading?.searchMode ?? 'local',\n paginationMode: dataLoading?.paginationMode ?? 'page',\n firstPage: dataLoading?.firstPage ?? 1,\n ...(dataLoading?.fetchLimit === undefined ? {} : { fetchLimit: dataLoading.fetchLimit }),\n };\n this._acknowledgedSearchMode = config.dataLoading?.searchMode ?? 'local';\n this._dataRequestCoordinator = new DataRequestCoordinator({\n config,\n initialQuery: this._state.searchQuery,\n initialItems: this._state.loadedItems,\n hasMore: options.hasMore,\n });\n this._acknowledgedReady = false;\n if (this.isConnected) this._initializeObservers();\n }\n\n /** Listener installation must precede this private test-only readiness gate. */\n private async _setAcknowledgedDataLoadingReadyForTest(): Promise<void> {\n if (!this._dataRequestCoordinator) throw new Error('Enable acknowledged data loading before readiness');\n if (!this.isConnected) throw new Error('Acknowledged readiness requires a connected test element');\n if (this._acknowledgedReady) return;\n\n if (this._acknowledgedProjectionPending) {\n const interruptedProjection = this._acknowledgedProjectionTask;\n if (interruptedProjection) await interruptedProjection;\n if (this._acknowledgedProjectionPending) {\n await this._retryAcknowledgedProjectionForTest();\n }\n if (this._acknowledgedProjectionPending) {\n throw new Error('Acknowledged readiness cannot open while snapshot projection is pending');\n }\n }\n\n if (this._acknowledgedPendingSearchQuery !== null) {\n this._state.searchQuery = this._acknowledgedPendingSearchQuery;\n this._input.value = this._acknowledgedPendingSearchQuery;\n this._acknowledgedPendingSearchQuery = null;\n }\n\n this._acknowledgedReady = true;\n this._initializeObservers();\n const actions = this._dataRequestCoordinator.connect(this._state.searchQuery);\n this._dispatchAcknowledgedActions(actions);\n if (actions.length === 0) this._renderOptions();\n const readyRenderCycleId = this._renderCycleId;\n const readyRenderCompleted = await this._waitForRenderCycle(readyRenderCycleId);\n if (!readyRenderCompleted) {\n this._acknowledgedReady = false;\n throw new Error('Acknowledged readiness render was superseded before completion');\n }\n }\n\n private _dispatchAcknowledgedActions(actions: readonly DataCoordinatorAction[]): void {\n for (const action of actions) {\n if (action.type === 'cancel') {\n this._dispatchAcknowledgedEvent('dataRequestCancel', action.notification);\n try {\n this._dataRequestCancelCallback?.(action.notification);\n } catch (error) {\n this._handleError(error as Error);\n }\n continue;\n }\n\n const request = action.request;\n const coordinator = this._dataRequestCoordinator;\n if (!coordinator || !this._acknowledgedReady) continue;\n\n if (request.kind === 'loadMore') {\n this._state.lastScrollPosition = this._optionsContainer.scrollTop;\n this._acknowledgedProjectionScrollTop = this._state.lastScrollPosition;\n this._state.preserveScrollPosition = true;\n this._state.isSearching = false;\n } else {\n this._acknowledgedProjectionScrollTop = 0;\n this._state.preserveScrollPosition = false;\n this._state.isSearching = true;\n }\n this._state.isBusy = true;\n this._acknowledgedLastRequest = request;\n this._syncListboxAccessibility();\n this._renderOptions();\n if (request.kind === 'loadMore') {\n this._optionsContainer.scrollTop = this._state.lastScrollPosition;\n }\n\n if (!coordinator.markNotificationsDispatched(request.requestId)) continue;\n\n if (request.kind === 'search') {\n const detail = { query: request.query, results: [], count: 0, request };\n this._dispatchAcknowledgedEvent('search', detail);\n try {\n const callback = this._config.callbacks.onSearch as unknown as\n ((query: string, context: DataRequest) => void) | undefined;\n callback?.(request.query, request);\n } catch (error) {\n this._handleError(error as Error);\n }\n } else {\n const page = request.position.mode === 'page'\n ? request.position.page\n : request.position.ordinal;\n const detail = { page, items: [], request };\n this._dispatchAcknowledgedEvent('loadMore', detail);\n try {\n const callback = this._config.callbacks.onLoadMore as unknown as\n ((page: number, context: DataRequest) => void) | undefined;\n callback?.(page, request);\n } catch (error) {\n this._handleError(error as Error);\n }\n }\n }\n }\n\n private _dispatchAcknowledgedEvent(name: string, detail: unknown): void {\n this.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));\n this._track('event', name, detail);\n }\n\n /** Test-only completion seam; accepted snapshots are projected from coordinator state. */\n private async _completeDataRequestForTest(completion: unknown): Promise<string> {\n const result = this.completeDataRequest(completion as DataRequestCompletion);\n if (result !== 'accepted') return result;\n await this._acknowledgedProjectionTask;\n return result;\n }\n\n private _failNextAcknowledgedProjectionForTest(stage: 'before-publish' | 'after-publish' = 'before-publish'): void {\n this._acknowledgedProjectionFailureStageForTest = stage;\n }\n\n /** Retries only from the canonical accepted coordinator snapshot, never a host payload. */\n private _retryAcknowledgedProjectionForTest(): Promise<void> {\n return this._retryAcknowledgedProjection();\n }\n\n private _retryAcknowledgedProjection(): Promise<void> {\n if (!this._dataRequestCoordinator || !this._acknowledgedProjectionPending) return Promise.resolve();\n return this._projectAcknowledgedSnapshot(\n this._dataRequestCoordinator.getSnapshot(),\n this._acknowledgedProjectionRequest ?? this._acknowledgedLastRequest,\n this._acknowledgedProjectionCommitsPosition,\n );\n }\n\n private _projectAcknowledgedSnapshot(\n snapshot: DataCoordinatorSnapshot,\n request: DataRequest | null,\n commitPosition: boolean,\n ): Promise<void> {\n if (this._acknowledgedProjectionRunning) {\n return this._acknowledgedProjectionTask ?? Promise.resolve();\n }\n\n this._acknowledgedProjectionRequest = request ?? this._acknowledgedProjectionRequest;\n this._acknowledgedProjectionAttempt += 1;\n this._acknowledgedProjectionPending = true;\n const items = Array.from(snapshot.items);\n let stagedRegistry: ItemRegistry<unknown, SelectKey>;\n let groupedItems: GroupedItem[];\n try {\n stagedRegistry = createItemRegistry(items, this._itemAdapter, {\n duplicateKeyPolicy: this._getDuplicateKeyPolicy(),\n });\n groupedItems = this._groupItemsByProperty(items);\n if (this._acknowledgedProjectionFailureStageForTest === 'before-publish') {\n this._acknowledgedProjectionFailureStageForTest = null;\n throw new Error('Injected acknowledged projection failure before publication');\n }\n } catch (error) {\n this._syncListboxAccessibility();\n this._recordAcknowledgedProjectionFailure(snapshot, request, error);\n return Promise.resolve();\n }\n\n this._acknowledgedProjectionRunning = true;\n const task = this._applyAcknowledgedSnapshot(snapshot, request, commitPosition, items, stagedRegistry, groupedItems);\n const trackedTask = task.finally(() => {\n if (this._acknowledgedProjectionTask === trackedTask) {\n this._acknowledgedProjectionRunning = false;\n this._acknowledgedProjectionTask = null;\n }\n });\n this._acknowledgedProjectionTask = trackedTask;\n return trackedTask;\n }\n\n private async _applyAcknowledgedSnapshot(\n snapshot: DataCoordinatorSnapshot,\n request: DataRequest | null,\n commitPosition: boolean,\n items: unknown[],\n stagedRegistry: ItemRegistry<unknown, SelectKey>,\n groupedItems: GroupedItem[],\n ): Promise<void> {\n let published = false;\n try {\n this._rebuildItemRegistry(items, stagedRegistry);\n this._state.groupedItems = groupedItems;\n if (commitPosition && request) {\n this._state.currentPage = snapshot.lastCommittedPage\n ?? (request.position.mode === 'page' ? request.position.page : request.position.ordinal);\n }\n this._state.isSearching = false;\n this._state.isBusy = true;\n this._state.lastScrollPosition = this._acknowledgedProjectionScrollTop;\n this._state.preserveScrollPosition = request?.kind === 'loadMore';\n published = true;\n\n if (this._acknowledgedProjectionFailureStageForTest === 'after-publish') {\n this._acknowledgedProjectionFailureStageForTest = null;\n throw new Error('Injected acknowledged projection failure after publication');\n }\n\n if (\n !this._state.searchQuery\n && this._acknowledgedPendingSearchQuery === null\n && !this._isActivelyEditingSearchInput()\n ) {\n this._updateInputDisplay();\n }\n this._syncListboxAccessibility();\n this._renderOptions();\n const renderCycleId = this._renderCycleId;\n const completed = await this._waitForRenderCycle(renderCycleId);\n if (!completed) throw new Error('Acknowledged snapshot render was superseded before completion');\n\n this._state.isBusy = snapshot.busy;\n if (!snapshot.busy) {\n this._optionsContainer.querySelector('.busy-bucket')?.remove();\n if (this._shouldRenderLoadMoreTrigger()) this._addLoadMoreTrigger();\n }\n this._optionsContainer.scrollTop = this._acknowledgedProjectionScrollTop;\n this._syncListboxAccessibility();\n this._syncRenderedOptionAccessibility();\n this._syncLegacyActiveAria();\n this._state.preserveScrollPosition = false;\n this._acknowledgedProjectionPending = false;\n this._acknowledgedProjectionDiagnostic = null;\n this._acknowledgedProjectionSettling = true;\n try {\n this._dispatchDataProjectionNotification({\n requestId: this._acknowledgedProjectionRequest?.requestId ?? request?.requestId ?? 'unknown',\n queryGeneration: this._acknowledgedProjectionRequest?.queryGeneration ?? snapshot.queryGeneration,\n attempt: this._acknowledgedProjectionAttempt,\n status: 'complete',\n });\n } finally {\n this._acknowledgedProjectionSettling = false;\n }\n if (this._clearAcknowledgedCoordinatorAfterProjection) {\n this._dataRequestCoordinator = null;\n this._acknowledgedSearchMode = null;\n this._clearAcknowledgedCoordinatorAfterProjection = false;\n this._acknowledgedProjectionRequest = null;\n } else {\n this._acknowledgedProjectionRequest = null;\n }\n this._finishAcknowledgedProjectionSettlement();\n } catch (error) {\n if (published) {\n if (this.isConnected) this._state.isBusy = true;\n this._state.isSearching = false;\n this._syncListboxAccessibility();\n }\n this._acknowledgedProjectionPending = true;\n this._recordAcknowledgedProjectionFailure(snapshot, request, error);\n }\n }\n\n private _recordAcknowledgedProjectionFailure(\n snapshot: DataCoordinatorSnapshot,\n request: DataRequest | null,\n error: unknown,\n ): void {\n const message = error instanceof Error ? error.message : String(error);\n const diagnostic = {\n requestId: this._acknowledgedProjectionRequest?.requestId ?? request?.requestId ?? 'unknown',\n queryGeneration: this._acknowledgedProjectionRequest?.queryGeneration ?? snapshot.queryGeneration,\n message,\n };\n this._acknowledgedProjectionDiagnostic = diagnostic;\n this._emit('diagnostic', {\n timestamp: Date.now(),\n source: 'event',\n name: 'acknowledgedProjectionFailed',\n detail: diagnostic,\n });\n if (diagnostic.requestId !== 'unknown') {\n this._dispatchDataProjectionNotification({\n requestId: diagnostic.requestId,\n queryGeneration: diagnostic.queryGeneration,\n attempt: this._acknowledgedProjectionAttempt,\n status: 'failed',\n error: { message },\n });\n }\n }\n\n private _dispatchDataProjectionNotification(detail: DataProjectionEventDetail): void {\n this._dispatchAcknowledgedEvent('dataProjection', detail);\n try {\n this._dataProjectionCallback?.(detail);\n } catch (error) {\n this._handleError(error as Error);\n }\n }\n\n private _dispatchPendingAcknowledgedSearchIntent(): void {\n const query = this._acknowledgedPendingSearchQuery;\n if (query === null || !this._acknowledgedReady || !this.isConnected) return;\n\n this._acknowledgedPendingSearchQuery = null;\n this._handleSearch(query);\n }\n\n /** Apply config/query changes coalesced while an accepted snapshot projected. */\n private _finishAcknowledgedProjectionSettlement(): void {\n const coordinator = this._dataRequestCoordinator;\n const query = this._acknowledgedPendingSearchQuery;\n\n if (this._dataLoadingConfig.protocol !== 'acknowledged' || !coordinator) {\n this._acknowledgedConfigUpdatePending = false;\n this._acknowledgedDeferredModeChange = false;\n if (this._dataLoadingConfig.protocol === 'legacy' && query !== null && this.isConnected) {\n this._acknowledgedPendingSearchQuery = null;\n this._handleSearch(query);\n } else {\n this._dispatchPendingAcknowledgedSearchIntent();\n }\n return;\n }\n\n if (!this.isConnected || !this._acknowledgedReady) return;\n\n if (this._acknowledgedConfigUpdatePending) {\n const requiresSingleLatestQueryRequest = this._acknowledgedDeferredModeChange && query !== null;\n if (requiresSingleLatestQueryRequest) {\n // Apply the mode transition while disconnected, set the latest query,\n // then reconnect once. This prevents an intermediate request for the\n // pre-projection query from escaping before the coalesced latest one.\n this._dispatchAcknowledgedActions(coordinator.disconnect());\n }\n\n const update = coordinator.updateConfig(this._createCoordinatorConfig());\n if (update.status !== 'accepted') {\n this._acknowledgedReady = false;\n return;\n }\n this._acknowledgedConfigUpdatePending = false;\n this._acknowledgedDeferredModeChange = false;\n\n if (requiresSingleLatestQueryRequest && query !== null) {\n this._acknowledgedPendingSearchQuery = null;\n this._state.searchQuery = query;\n this._input.value = query;\n this._dispatchAcknowledgedActions(coordinator.setQuery(query));\n this._dispatchAcknowledgedActions(coordinator.connect(query));\n this._syncListboxAccessibility();\n this._handleSearch(query);\n return;\n }\n\n this._dispatchAcknowledgedActions(update.actions);\n const state = coordinator.getSnapshot();\n this._state.isBusy = state.busy;\n this._state.isSearching = state.activeRequest?.kind === 'search';\n this._syncListboxAccessibility();\n }\n\n this._dispatchPendingAcknowledgedSearchIntent();\n }\n\n private _updateGuardedVirtualWindow(scrollTop: number, viewportHeight: number): boolean {\n this._guardedVirtualizationRequested = true;\n const virtualizer = this._ensureGuardedVirtualizer(this._renderPlan.filteredKeys);\n this._guardedVirtualScrollTop = scrollTop;\n this._guardedVirtualViewportHeight = viewportHeight;\n const update = virtualizer.updateWindow(scrollTop, viewportHeight);\n if (!update) return false;\n\n this._guardedVirtualOverscan = 0;\n this._applyGuardedWindowUpdate(update, this._guardedVirtualOverscan);\n this._optionsContainer.scrollTop = update.scrollTop;\n return true;\n }\n\n private _destroyGuardedVirtualizer(preserveRequestedMode = false): void {\n this._cancelGuardedVirtualWindowUpdate();\n this._guardedMeasurementGeneration += 1;\n if (this._guardedScrollListenerAttached) {\n this._optionsContainer.removeEventListener('scroll', this._onGuardedVirtualScroll);\n this._guardedScrollListenerAttached = false;\n }\n this._guardedVirtualizer?.destroy();\n this._guardedVirtualizer = null;\n this._teardownGuardedOptionResizeObserver();\n if (!preserveRequestedMode) this._guardedVirtualizationRequested = false;\n this._guardedVirtualizerKeys = [];\n this._guardedVirtualWindow = null;\n this._guardedVirtualScrollTop = 0;\n this._guardedVirtualViewportHeight = 0;\n this._guardedVirtualOverscan = 0;\n }\n\n private _invalidateGuardedMeasurements(): void {\n if (this._guardedVirtualizer) this._destroyGuardedVirtualizer(true);\n }\n\n private _createGuardedOptionResizeObserver(generation: number): void {\n if (typeof ResizeObserver === 'undefined') return;\n this._guardedOptionResizeObserver = new ResizeObserver((entries) => {\n if (\n generation !== this._guardedMeasurementGeneration\n || !this._guardedVirtualizer\n || !this._guardedVirtualizationRequested\n || !this.isConnected\n ) return;\n\n const virtualizer = this._guardedVirtualizer;\n const scrollTop = this._optionsContainer.scrollTop;\n const viewportHeight = this._resolveGuardedViewportHeight();\n const anchor = this._captureGuardedScrollAnchor(virtualizer, scrollTop, viewportHeight);\n let changed = false;\n\n for (const entry of entries) {\n const option = entry.target;\n if (!(option instanceof HTMLElement) || !this._guardedObservedOptions.has(option)) continue;\n if (!option.isConnected || !this._optionsContainer.contains(option)) continue;\n const meta = this._guardedOptionMeasurements.get(option);\n if (!meta || meta.generation !== generation) continue;\n const dataIndex = Number(option.getAttribute('data-index'));\n if (!Number.isInteger(dataIndex) || !Object.is(this._itemRegistry.indexToKey.get(dataIndex), meta.key)) continue;\n const currentIndex = this._renderPlan.filteredIndexByKey.get(meta.key);\n if (currentIndex === undefined || currentIndex !== meta.index) continue;\n\n const reportedHeight = entry.borderBoxSize?.[0]?.blockSize;\n const height = typeof reportedHeight === 'number' ? reportedHeight : entry.contentRect.height;\n if (!Number.isFinite(height) || height <= 0) continue;\n changed = virtualizer.measureItem(meta.index, height) || changed;\n }\n\n if (!changed) return;\n if (anchor) {\n const currentAnchorIndex = this._renderPlan.filteredIndexByKey.get(anchor.key);\n if (currentAnchorIndex !== undefined) {\n const anchoredScrollTop = Math.max(0, virtualizer.cumulativeOffset(currentAnchorIndex) + anchor.offset);\n this._guardedVirtualScrollTop = anchoredScrollTop;\n this._optionsContainer.scrollTop = anchoredScrollTop;\n }\n }\n const update = virtualizer.updateWindow(this._optionsContainer.scrollTop, viewportHeight);\n if (update) this._applyGuardedWindowUpdate(update, this._guardedVirtualOverscan);\n this._renderOptions();\n });\n }\n\n private _captureGuardedScrollAnchor(\n virtualizer: Virtualizer,\n scrollTop: number,\n viewportHeight: number,\n ): { key: SelectKey; offset: number } | null {\n const viewportTop = this._optionsContainer.getBoundingClientRect().top + this._optionsContainer.clientTop;\n const viewportBottom = viewportTop + viewportHeight;\n const visible = Array.from(this._guardedObservedOptions)\n .map((option) => ({ option, rect: option.getBoundingClientRect() }))\n .filter(({ rect }) => rect.height > 0 && rect.bottom > viewportTop && rect.top < viewportBottom)\n .sort((left, right) => left.rect.top - right.rect.top)[0];\n const visibleMeta = visible ? this._guardedOptionMeasurements.get(visible.option) : undefined;\n if (visibleMeta && visibleMeta.generation === this._guardedMeasurementGeneration) {\n return {\n key: visibleMeta.key,\n offset: scrollTop - virtualizer.cumulativeOffset(visibleMeta.index),\n };\n }\n\n if (this._renderPlan.filteredKeys.length === 0) return null;\n const index = virtualizer.computeWindow(scrollTop, 0).startIndex;\n const key = this._renderPlan.filteredKeys[index];\n return key === undefined ? null : {\n key,\n offset: scrollTop - virtualizer.cumulativeOffset(index),\n };\n }\n\n private _syncGuardedOptionResizeTargets(): void {\n const virtualizer = this._guardedVirtualizer;\n if (!virtualizer || !this._guardedVirtualizationRequested || !this.isConnected) return;\n\n const candidates: Array<{ option: HTMLElement; key: SelectKey; index: number }> = [];\n for (const child of Array.from(this._optionsContainer.children)) {\n if (!(child instanceof HTMLElement) || !child.hasAttribute('data-index')) continue;\n const dataIndex = Number(child.getAttribute('data-index'));\n if (!Number.isInteger(dataIndex)) continue;\n const key = this._itemRegistry.indexToKey.get(dataIndex);\n const index = key === undefined ? undefined : this._renderPlan.filteredIndexByKey.get(key);\n if (key === undefined || index === undefined) continue;\n candidates.push({ option: child, key, index });\n }\n\n const reusedTarget = candidates.some(({ option }) => this._guardedObserverSeenOptions.has(option));\n if (reusedTarget && this._guardedOptionResizeObserver) {\n this._guardedMeasurementGeneration += 1;\n this._teardownGuardedOptionResizeObserver();\n }\n if (!this._guardedOptionResizeObserver) {\n this._createGuardedOptionResizeObserver(this._guardedMeasurementGeneration);\n }\n const observer = this._guardedOptionResizeObserver;\n if (!observer) return;\n\n const current = new Set<HTMLElement>();\n for (const { option, key, index } of candidates) {\n current.add(option);\n this._guardedOptionMeasurements.set(option, {\n key,\n index,\n generation: this._guardedMeasurementGeneration,\n });\n if (!this._guardedObservedOptions.has(option)) {\n observer.observe(option);\n this._guardedObserverSeenOptions.add(option);\n }\n }\n\n for (const previous of this._guardedObservedOptions) {\n if (!current.has(previous)) observer.unobserve(previous);\n }\n this._guardedObservedOptions = current;\n }\n\n private _teardownGuardedOptionResizeObserver(): void {\n for (const option of this._guardedObservedOptions) {\n this._guardedOptionResizeObserver?.unobserve(option);\n }\n this._guardedObservedOptions.clear();\n this._guardedObserverSeenOptions = new WeakSet();\n this._guardedOptionResizeObserver?.disconnect();\n this._guardedOptionResizeObserver = null;\n this._guardedOptionMeasurements = new WeakMap();\n }\n\n private _materializeGuardedVirtualKey(key: SelectKey): boolean {\n if (!this._guardedVirtualizer) return false;\n\n const targetIndex = this._renderPlan.filteredIndexByKey.get(key);\n if (targetIndex === undefined) return false;\n\n this._ensureGuardedVirtualizer(this._renderPlan.filteredKeys);\n const result = this._guardedVirtualizer.scrollToKey(\n key,\n (candidate) => this._renderPlan.filteredIndexByKey.get(candidate),\n );\n if (!this._applyGuardedScrollResult(result)) return false;\n this._renderOptions();\n return true;\n }\n\n private _refreshVirtualizationScope(filteredIndices: readonly number[]): void {\n this._virtualizationScope = this._deriveVirtualizationScope(filteredIndices);\n }\n\n private _renderOptions(): void {\n this._ensureRegistryCurrent();\n const scrollTopBeforeRender = this._optionsContainer.scrollTop;\n this._renderCycleId += 1;\n const renderCycleId = this._renderCycleId;\n this._resolvePendingRenderCycles(false, renderCycleId);\n if (this._guardedVirtualizer) {\n this._guardedVirtualScrollTop = this._optionsContainer.scrollTop;\n }\n \n // Cleanup observer\n if (this._loadMoreTrigger && this._intersectionObserver) {\n this._intersectionObserver.unobserve(this._loadMoreTrigger);\n }\n if (this._dataRequestCoordinator) this._loadMoreTrigger = undefined;\n \n this._unobserveGuardedOptionResizeTargets();\n // Clear options container\n this._optionsContainer.innerHTML = '';\n let filteredIndicesForScope: number[] = [];\n let guardedScrollTopToRestore: number | null = null;\n \n // Ensure dropdown only contains options container (cleanup legacy direct children)\n // We need to preserve optionsContainer, so we can't just clear dropdown.innerHTML\n // But we can check if there are other children and remove them\n Array.from(this._dropdown.children).forEach(child => {\n if (child !== this._optionsContainer) {\n this._dropdown.removeChild(child);\n }\n });\n \n // Ensure dropdown is visible if we are rendering options\n if (this._state.isOpen && this._dropdown.style.display === 'none') {\n this._dropdown.style.display = 'block';\n }\n \n // Show searching state (exclusive state)\n if (this._state.isSearching) {\n this._registerShadowItems([]);\n this._renderPlan = this._createLegacyRenderPlan([]);\n this._refreshVirtualizationScope(filteredIndicesForScope);\n this._syncLegacyActiveAria();\n const searching = document.createElement('div');\n searching.className = 'searching-state';\n searching.setAttribute('part', 'loading');\n searching.textContent = 'Searching...';\n this._optionsContainer.appendChild(searching);\n this._resolveRenderCycle(renderCycleId, true);\n return;\n }\n \n const getValue = this._config.serverSide.getValueFromItem || ((item) => (item as any)?.value ?? item);\n const getLabel = this._config.serverSide.getLabelFromItem || ((item) => (item as any)?.label ?? String(item));\n \n // Filter items by search query\n const query = this._acknowledgedSearchMode === 'remote'\n ? ''\n : this._state.searchQuery.toLowerCase();\n if (this._guardedMeasurementQuery !== null && this._guardedMeasurementQuery !== query) {\n this._invalidateGuardedMeasurements();\n }\n this._guardedMeasurementQuery = query;\n \n // Handle Grouped Items Rendering (when no search query)\n if (this._state.groupedItems.length > 0 && !query) {\n this._destroyGuardedVirtualizer();\n this._renderPlan = this._createLegacyRenderPlan(this._itemRegistry.records.map((record) => record.index));\n filteredIndicesForScope = this._renderPlan.filteredIndices;\n this._registerShadowItems(filteredIndicesForScope);\n this._refreshVirtualizationScope(filteredIndicesForScope);\n this._state.groupedItems.forEach((group, groupIndex) => {\n let header: HTMLElement;\n if (this.groupHeaderRenderer) {\n header = this.groupHeaderRenderer(group, groupIndex);\n // make sure the returned element has the correct semantics so\n // people can style it. we add the class/part even if the renderer\n // returned something else to ensure backward compatibility.\n if (!(header instanceof HTMLElement)) {\n // fall back to default if API is misused\n header = document.createElement('div');\n header.textContent = String(group.label);\n }\n } else {\n header = document.createElement('div');\n header.textContent = group.label;\n }\n\n header.classList.add('group-header');\n if (this._config.styles.classNames?.groupHeader) {\n header.classList.add(...this._config.styles.classNames.groupHeader.split(' ').filter(Boolean));\n }\n if (!header.hasAttribute('role')) {\n header.setAttribute('role', 'presentation');\n }\n header.setAttribute('part', 'group-header');\n this._optionsContainer.appendChild(header);\n\n group.options.forEach(item => {\n // Find original index for correct ID generation and selection\n const index = this._state.loadedItems.indexOf(item);\n if (index !== -1) {\n this._renderSingleOption(item, index, getValue, getLabel);\n }\n });\n });\n } else {\n // Normal rendering (flat list or filtered)\n const computedFilteredIndices: number[] = [];\n this._state.loadedItems.forEach((item, index) => {\n if (query) {\n try {\n const label = String(getLabel(item)).toLowerCase();\n if (!label.includes(query)) return;\n } catch (_e) {\n return;\n }\n }\n\n computedFilteredIndices.push(index);\n });\n this._renderPlan = this._createLegacyRenderPlan(computedFilteredIndices);\n filteredIndicesForScope = this._renderPlan.filteredIndices;\n this._registerShadowItems(filteredIndicesForScope);\n if (this._guardedVirtualizationRequested && !this._guardedVirtualizer) {\n this._ensureGuardedVirtualizer(this._renderPlan.filteredKeys);\n this._guardedVirtualViewportHeight = this._resolveGuardedViewportHeight();\n // A data reorder/filter may have invalidated the old virtualizer, but\n // the physical position is still available before the DOM is cleared.\n this._guardedVirtualScrollTop = scrollTopBeforeRender;\n }\n if (this._guardedVirtualizer) {\n const virtualizer = this._ensureGuardedVirtualizer(this._renderPlan.filteredKeys);\n const measuredViewportHeight = this._resolveGuardedViewportHeight();\n if (measuredViewportHeight > 0) {\n this._guardedVirtualViewportHeight = measuredViewportHeight;\n }\n const scrollTop = this._clampGuardedScrollPosition(\n this._renderPlan.filteredKeys.length,\n this._guardedVirtualViewportHeight,\n );\n guardedScrollTopToRestore = scrollTop;\n const update = virtualizer.updateWindow(\n scrollTop,\n this._guardedVirtualViewportHeight,\n );\n if (update) {\n this._applyGuardedWindowUpdate(update, this._guardedVirtualOverscan);\n } else {\n this._guardedVirtualWindow = null;\n }\n }\n if (this._guardedVirtualWindow) {\n this._renderPlan = this._createVirtualRenderPlan(\n this._guardedVirtualWindow.startIndex,\n this._guardedVirtualWindow.endIndex,\n );\n }\n const filteredIndices = this._renderPlan.filteredIndices;\n this._refreshVirtualizationScope(filteredIndicesForScope);\n this._appendGuardedTopSpacer();\n\n if (filteredIndices.length === 0 && !this._state.isBusy) {\n const empty = document.createElement('div');\n empty.setAttribute('part', 'no-results');\n empty.className = 'empty-state';\n if (query) {\n empty.textContent = `No results found for \"${this._state.searchQuery}\"`;\n } else {\n empty.textContent = 'No options available';\n }\n this._optionsContainer.appendChild(empty);\n } else {\n const shouldIncrementalRender =\n !this._guardedVirtualizer\n && this._config.virtualize !== false\n && this._state.groupedItems.length === 0\n && filteredIndices.length > 300;\n\n if (shouldIncrementalRender) {\n const chunkSize = 80;\n let cursor = 0;\n let maxRenderTarget = 0;\n\n if (this._state.selectedIndices.size > 0 && this._config.scrollToSelected.enabled) {\n const indices = Array.from(this._state.selectedIndices).filter((index) => index >= 0).sort((a, b) => a - b);\n const targetIndex = this._config.scrollToSelected.multiSelectTarget === 'first' ? indices[0] : indices[indices.length - 1];\n const filteredPos = filteredIndices.indexOf(targetIndex);\n if (filteredPos !== -1) {\n maxRenderTarget = filteredPos + 20; // Ensure we render up to the selection\n }\n }\n\n const renderChunk = () => {\n if (renderCycleId !== this._renderCycleId) {\n this._resolveRenderCycle(renderCycleId, false);\n return;\n }\n\n const fragment = document.createDocumentFragment();\n const chunkEnd = Math.min(Math.max(cursor + chunkSize, maxRenderTarget), filteredIndices.length);\n maxRenderTarget = 0; // Reset after fast-forwarding\n\n for (; cursor < chunkEnd; cursor += 1) {\n const itemIndex = filteredIndices[cursor];\n const item = this._state.loadedItems[itemIndex];\n this._renderSingleOption(item, itemIndex, getValue, getLabel, fragment);\n }\n\n const renderedTargets = Array.from(fragment.children);\n this._optionsContainer.appendChild(fragment);\n this._appendMountedVirtualizationTargets(renderedTargets);\n this._syncRenderedOptionAccessibility();\n this._syncLegacyActiveAria();\n\n if (cursor < filteredIndices.length) {\n this._requestLifecycleFrame(renderChunk);\n } else {\n if (renderCycleId !== this._renderCycleId) {\n this._resolveRenderCycle(renderCycleId, false);\n return;\n }\n\n if (!this._state.isBusy && this._shouldRenderLoadMoreTrigger()) {\n this._addLoadMoreTrigger();\n }\n\n this._finalizePerfMarks();\n this._resolveRenderCycle(renderCycleId, true);\n }\n };\n\n renderChunk();\n return;\n }\n\n filteredIndices.forEach((itemIndex) => {\n const item = this._state.loadedItems[itemIndex];\n this._renderSingleOption(item, itemIndex, getValue, getLabel);\n });\n }\n this._appendGuardedBottomSpacer();\n }\n \n this._refreshMountedVirtualizationScope();\n // Append Busy Indicator if busy\n if (this._state.isBusy && this._config.busyBucket.enabled) {\n const busyBucket = document.createElement('div');\n busyBucket.setAttribute('part', 'loading');\n busyBucket.className = 'busy-bucket';\n \n if (this._config.busyBucket.showSpinner) {\n const spinner = document.createElement('div');\n spinner.className = 'spinner';\n busyBucket.appendChild(spinner);\n }\n \n if (this._config.busyBucket.message) {\n const message = document.createElement('div');\n message.textContent = this._config.busyBucket.message;\n busyBucket.appendChild(message);\n }\n \n this._optionsContainer.appendChild(busyBucket);\n }\n // Append Load More Trigger (Button or Sentinel) if enabled and not busy\n else if ((!this._dataRequestCoordinator || !this._state.isBusy) && this._shouldRenderLoadMoreTrigger()) {\n this._addLoadMoreTrigger();\n }\n\n // Rebuilding the list temporarily removes its spacer geometry. Browsers\n // clamp scrollTop during that interval, so restore the logical position\n // only after the new top/bottom spacers and mounted rows are present.\n if (guardedScrollTopToRestore !== null) {\n this._optionsContainer.scrollTop = guardedScrollTopToRestore;\n }\n\n this._syncRenderedOptionAccessibility();\n this._syncLegacyActiveAria();\n this._syncGuardedOptionResizeTargets();\n this._finalizePerfMarks();\n this._resolveRenderCycle(renderCycleId, true);\n \n }\n\n private _waitForRenderCycle(renderCycleId: number): Promise<boolean> {\n if (renderCycleId < this._renderCycleId) return Promise.resolve(false);\n if (renderCycleId <= this._completedRenderCycleId) return Promise.resolve(true);\n return new Promise((resolve) => {\n this._renderCycleWaiters.set(renderCycleId, resolve);\n const timeout = window.setTimeout(() => this._resolveRenderCycle(renderCycleId, false), 120_000);\n this._renderCycleWaiterTimeouts.set(renderCycleId, timeout);\n });\n }\n\n private _resolveRenderCycle(renderCycleId: number, completed: boolean): void {\n if (completed) this._completedRenderCycleId = Math.max(this._completedRenderCycleId, renderCycleId);\n const resolve = this._renderCycleWaiters.get(renderCycleId);\n const timeout = this._renderCycleWaiterTimeouts.get(renderCycleId);\n if (timeout !== undefined) window.clearTimeout(timeout);\n this._renderCycleWaiterTimeouts.delete(renderCycleId);\n if (!resolve) return;\n this._renderCycleWaiters.delete(renderCycleId);\n resolve(completed);\n }\n\n private _resolvePendingRenderCycles(completed: boolean, beforeCycleId = Number.POSITIVE_INFINITY): void {\n for (const [renderCycleId, resolve] of this._renderCycleWaiters) {\n if (renderCycleId >= beforeCycleId) continue;\n const timeout = this._renderCycleWaiterTimeouts.get(renderCycleId);\n if (timeout !== undefined) window.clearTimeout(timeout);\n this._renderCycleWaiterTimeouts.delete(renderCycleId);\n this._renderCycleWaiters.delete(renderCycleId);\n resolve(completed);\n }\n }\n\n private _unobserveGuardedOptionResizeTargets(): void {\n for (const option of this._guardedObservedOptions) {\n this._guardedOptionResizeObserver?.unobserve(option);\n }\n this._guardedObservedOptions.clear();\n }\n\n private _renderSingleOption(\n item: any,\n index: number,\n getValue: (item: any) => any,\n getLabel: (item: any) => string,\n targetContainer: Node = this._optionsContainer,\n ) {\n const isSelected = this._state.selectedIndices.has(index);\n const isDisabled = Boolean((item as any)?.disabled);\n const disabledBehavior = this._getDisabledOptionBehavior();\n const optionId = `${this._uniqueId}-option-${index}`;\n\n if (this._optionRenderer) {\n const rendered = this._optionRenderer(item, index, this._rendererHelpers);\n // Ensure the returned element has the correct classes and listeners\n const optionElement = this._normalizeCustomOptionElement(rendered, {\n index,\n value: getValue(item),\n label: getLabel(item),\n selected: isSelected,\n active: this._state.activeIndex === index,\n disabled: isDisabled,\n disabledBehavior,\n id: optionId,\n });\n optionElement.setAttribute('dir', this._config.direction ?? 'ltr');\n targetContainer.appendChild(optionElement);\n return;\n }\n\n const option = new SelectOption({\n item,\n index,\n id: optionId,\n selected: isSelected,\n disabled: isDisabled,\n disabledBehavior,\n active: this._state.activeIndex === index,\n getValue,\n getLabel,\n showRemoveButton: this._config.selection.mode === 'multi' && this._config.selection.showRemoveButton,\n removeButtonIcon: this._config.selection.removeButtonIcon,\n classMap: this.classMap,\n className: this._config.styles?.classNames?.option,\n });\n\n if (this._config.styles?.classNames?.option) {\n option.classList.add(...this._config.styles.classNames.option.split(' ').filter(Boolean));\n }\n option.setAttribute('dir', this._config.direction ?? 'ltr');\n if (isSelected && this._config.styles?.classNames?.selectedOption) {\n option.classList.add(...this._config.styles.classNames.selectedOption.split(' ').filter(Boolean));\n }\n if (this._state.activeIndex === index && this._config.styles?.classNames?.activeOption) {\n option.classList.add(...this._config.styles.classNames.activeOption.split(' ').filter(Boolean));\n }\n if (isDisabled && this._config.styles.classNames?.disabledOption) {\n option.classList.add(...this._config.styles.classNames.disabledOption.split(' ').filter(Boolean));\n }\n\n // Valid part attribute on the web component host itself\n option.setAttribute('part', 'option');\n\n option.dataset.index = String(index);\n option.dataset.value = String(getValue(item));\n // New standard attributes on Host\n option.dataset.smIndex = String(index);\n if (!option.hasAttribute('data-sm-selectable')) {\n option.toggleAttribute('data-sm-selectable', true);\n }\n const val = getValue(item);\n if (val != null) {\n option.dataset.smValue = String(val);\n }\n\n option.id = option.id || optionId;\n\n // Do NOT bind a native click listener here for SelectOption elements.\n // Like custom rendered options, they are fully handled by the `handleOptionEvent` delegator \n // on `this._optionsContainer` (line 1221).\n // Adding this listener causes the double-click toggle bug since both fire on selection!\n \n option.addEventListener('optionRemove', (event: Event) => {\n const detail = (event as CustomEvent).detail as { index?: number } | undefined;\n const targetIndex = detail?.index ?? index;\n this._handleOptionRemove(targetIndex);\n });\n\n targetContainer.appendChild(option);\n\n if (option instanceof SelectOption) {\n option.ensureRendered();\n }\n }\n\n private _normalizeCustomOptionElement(element: HTMLElement | null | undefined, meta: {\n index: number;\n value: unknown;\n label: string;\n selected: boolean;\n active: boolean;\n disabled: boolean;\n disabledBehavior: {\n selectable: boolean;\n hoverable: boolean;\n focusable: boolean;\n };\n id: string;\n }): HTMLElement {\n const optionEl = element instanceof HTMLElement ? element : document.createElement('div');\n\n // Add part attribute for styling\n if (!optionEl.hasAttribute('part')) {\n optionEl.setAttribute('part', 'option');\n }\n\n // Add both semantic namespaced classes and the legacy internal classes that CSS uses\n optionEl.classList.add('smilodon-option', 'option');\n if (this._config.styles.classNames?.option) {\n optionEl.classList.add(...this._config.styles.classNames.option.split(' ').filter(Boolean));\n }\n \n // Toggle state classes using classMap if available\n const isSelected = meta.selected;\n const isActive = meta.active;\n const isDisabled = meta.disabled;\n const isDisabledSelectable = isDisabled && meta.disabledBehavior.selectable;\n const isDisabledHoverable = isDisabled && meta.disabledBehavior.hoverable;\n const isDisabledFocusable = isDisabled && meta.disabledBehavior.focusable;\n const isDisabledInteractive = isDisabled && (isDisabledSelectable || isDisabledHoverable);\n\n // Resolve classes from classMap or defaults\n const selectedClasses = (this.classMap?.selected ?? 'selected sm-selected').split(' ').filter(Boolean);\n const activeClasses = (this.classMap?.active ?? 'active sm-active').split(' ').filter(Boolean);\n const disabledClasses = (this.classMap?.disabled ?? 'disabled sm-disabled').split(' ').filter(Boolean);\n\n if (isSelected) {\n optionEl.classList.add(...selectedClasses);\n optionEl.classList.add('smilodon-option--selected');\n if (this._config.styles.classNames?.selectedOption) {\n optionEl.classList.add(...this._config.styles.classNames.selectedOption.split(' ').filter(Boolean));\n }\n } else {\n optionEl.classList.remove(...selectedClasses);\n optionEl.classList.remove('smilodon-option--selected');\n if (this._config.styles.classNames?.selectedOption) {\n optionEl.classList.remove(...this._config.styles.classNames.selectedOption.split(' ').filter(Boolean));\n }\n }\n\n if (isActive) {\n optionEl.classList.add(...activeClasses);\n optionEl.classList.add('smilodon-option--active');\n if (this._config.styles.classNames?.activeOption) {\n optionEl.classList.add(...this._config.styles.classNames.activeOption.split(' ').filter(Boolean));\n }\n } else {\n optionEl.classList.remove(...activeClasses);\n optionEl.classList.remove('smilodon-option--active');\n if (this._config.styles.classNames?.activeOption) {\n optionEl.classList.remove(...this._config.styles.classNames.activeOption.split(' ').filter(Boolean));\n }\n }\n\n if (isDisabled) {\n optionEl.classList.add(...disabledClasses);\n optionEl.classList.add('smilodon-option--disabled');\n if (this._config.styles.classNames?.disabledOption) {\n optionEl.classList.add(...this._config.styles.classNames.disabledOption.split(' ').filter(Boolean));\n }\n } else {\n optionEl.classList.remove(...disabledClasses);\n optionEl.classList.remove('smilodon-option--disabled');\n if (this._config.styles.classNames?.disabledOption) {\n optionEl.classList.remove(...this._config.styles.classNames.disabledOption.split(' ').filter(Boolean));\n }\n }\n\n optionEl.classList.toggle('smilodon-option--disabled-interactive', isDisabledInteractive);\n optionEl.classList.toggle('smilodon-option--disabled-hoverable', isDisabledHoverable);\n optionEl.classList.toggle('smilodon-option--disabled-focusable', isDisabledFocusable);\n optionEl.classList.toggle('smilodon-option--disabled-selectable', isDisabledSelectable);\n\n // Data Attributes Contract\n const state = [];\n if (isSelected) state.push('selected');\n if (isActive) state.push('active');\n if (state.length) {\n optionEl.dataset.smState = state.join(' ');\n } else {\n delete optionEl.dataset.smState;\n }\n\n // Legacy data attribute support\n if (!optionEl.hasAttribute('data-selectable')) {\n optionEl.setAttribute('data-selectable', '');\n }\n // New delegation attribute\n if (!optionEl.hasAttribute('data-sm-selectable')) {\n optionEl.setAttribute('data-sm-selectable', '');\n }\n\n optionEl.dataset.index = String(meta.index);\n optionEl.dataset.value = String(meta.value);\n // New standard attributes\n optionEl.dataset.smIndex = String(meta.index);\n if (meta.value != null) {\n optionEl.dataset.smValue = String(meta.value);\n } else {\n delete optionEl.dataset.smValue;\n }\n \n // Refresh component-generated IDs when a renderer reuses an option node,\n // while preserving an ID that the renderer supplied itself.\n const previousNormalizedId = this._customOptionNormalizedIds.get(optionEl);\n if (!optionEl.id || (previousNormalizedId !== undefined && optionEl.id === previousNormalizedId)) {\n optionEl.id = meta.id;\n this._customOptionNormalizedIds.set(optionEl, meta.id);\n } else {\n this._customOptionNormalizedIds.delete(optionEl);\n }\n\n if (!optionEl.hasAttribute('tabindex')) {\n optionEl.tabIndex = -1;\n }\n\n if (!this._customOptionBoundElements.has(optionEl)) {\n // Intentionally NOT binding native option click listeners for custom options! \n // All option interactions are globally handled by _optionsContainer.addEventListener('click', handleOptionEvent);\n // Re-attaching here causes the double-click toggle bug if a child component fails to stopPropagation.\n \n this._customOptionBoundElements.add(optionEl);\n }\n\n this._normalizeCustomOptionAccessibility(optionEl, {\n label: meta.label,\n disabled: meta.disabled,\n });\n\n return optionEl;\n }\n\n private _addLoadMoreTrigger(): void {\n const container = document.createElement('div');\n container.className = 'load-more-container';\n\n if (this._dataRequestCoordinator) {\n const shouldObserve = this._config.infiniteScroll.enabled\n && Boolean(this._intersectionObserver)\n && this._acknowledgedReady;\n let sentinel: HTMLElement | undefined;\n\n if (shouldObserve) {\n sentinel = this._acknowledgedSentinel ?? document.createElement('div');\n sentinel.className = 'infinite-scroll-sentinel';\n sentinel.style.height = '10px';\n sentinel.style.width = '100%';\n sentinel.style.opacity = '0';\n this._acknowledgedSentinel = sentinel as HTMLDivElement;\n this._loadMoreTrigger = sentinel;\n container.appendChild(sentinel);\n }\n\n // Keep an explicit keyboard-accessible path even when automatic\n // observation is enabled, and use it as the fallback if IO is absent.\n if (this._config.loadMore.enabled || this._config.infiniteScroll.enabled) {\n const button = document.createElement('button');\n button.className = 'load-more-button';\n button.textContent = `Load ${this._config.loadMore.itemsPerLoad} more`;\n button.addEventListener('click', () => this._loadMoreItems('manual'));\n container.appendChild(button);\n if (!sentinel) this._loadMoreTrigger = button;\n }\n\n this._optionsContainer.appendChild(container);\n\n if (sentinel && this._intersectionObserver) {\n try {\n this._intersectionObserver.observe(sentinel);\n } catch (_error) {\n this._intersectionObserver.disconnect();\n this._intersectionObserver = undefined;\n sentinel.remove();\n this._loadMoreTrigger = container.querySelector<HTMLElement>('.load-more-button') ?? undefined;\n }\n }\n return;\n }\n \n if (this._config.infiniteScroll.enabled) {\n // Infinite Scroll: Render an invisible sentinel\n // It must have some height to be intersected\n const sentinel = document.createElement('div');\n sentinel.className = 'infinite-scroll-sentinel';\n sentinel.style.height = '10px';\n sentinel.style.width = '100%';\n sentinel.style.opacity = '0'; // Invisible\n \n this._loadMoreTrigger = sentinel;\n container.appendChild(sentinel);\n } else {\n // Manual Load More: Render a button\n const button = document.createElement('button');\n button.className = 'load-more-button';\n button.textContent = `Load ${this._config.loadMore.itemsPerLoad} more`;\n button.addEventListener('click', () => this._loadMoreItems());\n \n this._loadMoreTrigger = button;\n container.appendChild(button);\n }\n \n this._optionsContainer.appendChild(container);\n \n // Setup intersection observer for auto-load\n if (this._intersectionObserver && this._loadMoreTrigger) {\n this._intersectionObserver.observe(this._loadMoreTrigger);\n }\n }\n\n private _shouldRenderLoadMoreTrigger(): boolean {\n if (!this._config.loadMore.enabled && !this._config.infiniteScroll.enabled) return false;\n if (this._dataLoadingConfig.protocol === 'acknowledged'\n && (!this._dataRequestCoordinator || !this._acknowledgedReady)) return false;\n if (!this._dataRequestCoordinator) return this._state.loadedItems.length > 0;\n const snapshot = this._dataRequestCoordinator.getSnapshot();\n if (snapshot.status === 'resource-limited') return false;\n return snapshot.hasMore\n || snapshot.error !== null\n || snapshot.status === 'empty'\n || snapshot.status === 'failed'\n || snapshot.status === 'cancelled';\n }\n}\n\n// Register custom element\nif (!customElements.get('enhanced-select')) {\n customElements.define('enhanced-select', EnhancedSelect);\n}\n","/**\n * Web Worker protocol types for off-main-thread processing.\n * Supports heavy transforms, fuzzy search, and data processing.\n */\n\nexport interface WorkerRequest {\n id: string;\n type: 'transform' | 'search' | 'filter' | 'sort';\n payload: unknown;\n}\n\nexport interface WorkerResponse<T = unknown> {\n id: string;\n success: boolean;\n data?: T;\n error?: string;\n duration?: number; // milliseconds\n}\n\nexport interface TransformRequest {\n items: unknown[];\n transformer: string; // serialized function\n}\n\nexport interface SearchRequest {\n items: unknown[];\n query: string;\n fuzzy?: boolean;\n maxResults?: number;\n}\n\nexport interface FilterRequest {\n items: unknown[];\n predicate: string; // serialized function\n}\n\nexport interface SortRequest {\n items: unknown[];\n comparator: string; // serialized function\n}\n\n/**\n * Worker manager for handling off-main-thread processing.\n * Automatically falls back if workers not available or blocked by COOP/COEP.\n */\nexport class WorkerManager {\n private worker: Worker | null = null;\n private pending = new Map<string, {\n resolve: (data: any) => void;\n reject: (error: Error) => void;\n timeout: number;\n }>();\n private supportsWorkers = false;\n private supportsSharedArrayBuffer = false;\n private nextId = 0;\n\n constructor() {\n this.detectFeatures();\n this.initWorker();\n }\n\n /**\n * Detect browser capabilities\n */\n private detectFeatures(): void {\n this.supportsWorkers = typeof Worker !== 'undefined';\n this.supportsSharedArrayBuffer = typeof SharedArrayBuffer !== 'undefined';\n }\n\n /**\n * Initialize worker (inline blob URL for simplicity)\n */\n private initWorker(): void {\n if (!this.supportsWorkers) return;\n\n try {\n const workerCode = this.generateWorkerCode();\n const blob = new Blob([workerCode], { type: 'application/javascript' });\n const url = URL.createObjectURL(blob);\n \n this.worker = new Worker(url);\n this.worker.onmessage = this.handleMessage.bind(this);\n this.worker.onerror = this.handleError.bind(this);\n \n // Cleanup blob URL after worker loads\n URL.revokeObjectURL(url);\n } catch (err) {\n console.warn('Worker initialization failed, falling back to main thread', err);\n this.worker = null;\n }\n }\n\n /**\n * Generate worker code as string\n */\n private generateWorkerCode(): string {\n return `\n // Worker code\n self.onmessage = function(e) {\n const start = performance.now();\n const { id, type, payload } = e.data;\n \n // Lookup object for O(1) operation dispatch\n const operations = {\n 'transform': handleTransform,\n 'search': handleSearch,\n 'filter': handleFilter,\n 'sort': handleSort,\n };\n \n try {\n const handler = operations[type];\n if (!handler) {\n throw new Error('Unknown operation: ' + type);\n }\n \n const result = handler(payload);\n const duration = performance.now() - start;\n \n self.postMessage({\n id,\n success: true,\n data: result,\n duration,\n });\n } catch (error) {\n self.postMessage({\n id,\n success: false,\n error: error.message,\n });\n }\n };\n \n function handleTransform({ items, transformer }) {\n const fn = new Function('item', 'index', 'return (' + transformer + ')(item, index)');\n return items.map((item, i) => fn(item, i));\n }\n \n function handleSearch({ items, query, fuzzy, maxResults }) {\n const lowerQuery = query.toLowerCase();\n const results = [];\n \n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n const text = String(item).toLowerCase();\n \n if (fuzzy) {\n if (fuzzyMatch(text, lowerQuery)) {\n results.push({ item, index: i, score: fuzzyScore(text, lowerQuery) });\n }\n } else {\n if (text.includes(lowerQuery)) {\n results.push({ item, index: i });\n }\n }\n \n if (maxResults && results.length >= maxResults) break;\n }\n \n if (fuzzy) {\n results.sort((a, b) => b.score - a.score);\n }\n \n return results;\n }\n \n function handleFilter({ items, predicate }) {\n const fn = new Function('item', 'index', 'return (' + predicate + ')(item, index)');\n return items.filter((item, i) => fn(item, i));\n }\n \n function handleSort({ items, comparator }) {\n const fn = new Function('a', 'b', 'return (' + comparator + ')(a, b)');\n return [...items].sort(fn);\n }\n \n // Simple fuzzy matching (Levenshtein-inspired)\n function fuzzyMatch(text, query) {\n let qi = 0;\n for (let ti = 0; ti < text.length && qi < query.length; ti++) {\n if (text[ti] === query[qi]) qi++;\n }\n return qi === query.length;\n }\n \n function fuzzyScore(text, query) {\n let score = 0;\n let qi = 0;\n for (let ti = 0; ti < text.length && qi < query.length; ti++) {\n if (text[ti] === query[qi]) {\n score += 100 - ti; // Earlier matches score higher\n qi++;\n }\n }\n return score;\n }\n `;\n }\n\n /**\n * Handle worker message\n */\n private handleMessage(e: MessageEvent<WorkerResponse>): void {\n const { id, success, data, error } = e.data;\n const pending = this.pending.get(id);\n \n if (!pending) return;\n \n clearTimeout(pending.timeout);\n this.pending.delete(id);\n \n if (success) {\n pending.resolve(data);\n } else {\n pending.reject(new Error(error || 'Worker error'));\n }\n }\n\n /**\n * Handle worker error\n */\n private handleError(err: ErrorEvent): void {\n console.error('Worker error:', err);\n // Reject all pending requests\n for (const [id, pending] of this.pending) {\n clearTimeout(pending.timeout);\n pending.reject(new Error('Worker crashed'));\n }\n this.pending.clear();\n }\n\n /**\n * Execute operation (worker or fallback)\n */\n async execute<T = unknown>(\n type: WorkerRequest['type'],\n payload: unknown,\n timeout = 5000\n ): Promise<T> {\n // Fallback to main thread if no worker\n if (!this.worker) {\n return this.executeFallback<T>(type, payload);\n }\n\n const id = `req_${this.nextId++}`;\n \n return new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n this.pending.delete(id);\n reject(new Error('Worker timeout'));\n }, timeout) as unknown as number;\n\n this.pending.set(id, { resolve, reject, timeout: timeoutId });\n\n this.worker!.postMessage({ id, type, payload });\n });\n }\n\n /**\n * Operation handlers for fallback execution\n */\n private readonly _fallbackOperations: Record<string, <T>(payload: any) => T> = {\n 'transform': <T>(payload: any): T => {\n const { items, transformer } = payload as TransformRequest;\n const fn = new Function('item', 'index', `return (${transformer})(item, index)`);\n return items.map((item, i) => fn(item, i)) as T;\n },\n 'search': <T>(payload: any): T => {\n const { items, query, fuzzy } = payload as SearchRequest;\n const lowerQuery = query.toLowerCase();\n const results: { item: any; index: number }[] = [];\n \n // Use for-loop instead of forEach for better performance (no closure allocation)\n for (let index = 0; index < items.length; index++) {\n const item = items[index];\n \n // PERF: Check for label/value properties first before converting entire object\n const itemAny = item as any;\n const itemText = itemAny?.label ?? itemAny?.value ?? item;\n const itemStr = String(itemText).toLowerCase();\n \n if (fuzzy) {\n // Simple fuzzy match - check if all query chars appear in order\n let queryIndex = 0;\n for (let i = 0; i < itemStr.length && queryIndex < lowerQuery.length; i++) {\n if (itemStr[i] === lowerQuery[queryIndex]) {\n queryIndex++;\n }\n }\n if (queryIndex === lowerQuery.length) {\n results.push({ item, index });\n }\n } else {\n // Exact substring match\n if (itemStr.includes(lowerQuery)) {\n results.push({ item, index });\n }\n }\n }\n \n return results as T;\n },\n 'filter': <T>(payload: any): T => {\n const { items, predicate } = payload as FilterRequest;\n const fn = new Function('item', 'index', `return (${predicate})(item, index)`);\n return items.filter((item, i) => fn(item, i)) as T;\n },\n 'sort': <T>(payload: any): T => {\n const { items, comparator } = payload as SortRequest;\n const fn = new Function('a', 'b', `return (${comparator})(a, b)`) as (a: any, b: any) => number;\n return [...items].sort(fn) as T;\n },\n };\n\n /**\n * Fallback to main thread execution\n */\n private async executeFallback<T>(type: string, payload: any): Promise<T> {\n const handler = this._fallbackOperations[type];\n if (!handler) {\n throw new Error(`Unknown operation: ${type}`);\n }\n return handler<T>(payload);\n }\n\n /**\n * Transform items with custom function\n */\n async transform<T, R>(items: T[], transformer: (item: T, index: number) => R): Promise<R[]> {\n return this.execute<R[]>('transform', {\n items,\n transformer: transformer.toString(),\n });\n }\n\n /**\n * Search items with optional fuzzy matching\n */\n async search<T>(items: T[], query: string, fuzzy = false): Promise<{ item: T; index: number }[]> {\n return this.execute('search', { items, query, fuzzy });\n }\n\n /**\n * Filter items with predicate\n */\n async filter<T>(items: T[], predicate: (item: T, index: number) => boolean): Promise<T[]> {\n return this.execute<T[]>('filter', {\n items,\n predicate: predicate.toString(),\n });\n }\n\n /**\n * Sort items with comparator\n */\n async sort<T>(items: T[], comparator: (a: T, b: T) => number): Promise<T[]> {\n return this.execute<T[]>('sort', {\n items,\n comparator: comparator.toString(),\n });\n }\n\n /**\n * Check if workers are supported\n */\n get hasWorkerSupport(): boolean {\n return this.supportsWorkers && this.worker !== null;\n }\n\n /**\n * Check if SharedArrayBuffer is supported\n */\n get hasSharedArrayBuffer(): boolean {\n return this.supportsSharedArrayBuffer;\n }\n\n /**\n * Terminate worker\n */\n destroy(): void {\n if (this.worker) {\n // Reject all pending\n for (const [id, pending] of this.pending) {\n clearTimeout(pending.timeout);\n pending.reject(new Error('Worker terminated'));\n }\n this.pending.clear();\n \n this.worker.terminate();\n this.worker = null;\n }\n }\n}\n\n/**\n * Singleton instance\n */\nlet workerManager: WorkerManager | null = null;\n\nexport function getWorkerManager(): WorkerManager {\n if (!workerManager) {\n workerManager = new WorkerManager();\n }\n return workerManager;\n}\n","/**\n * Performance telemetry module for tracking frame timing and performance metrics.\n * Uses PerformanceObserver for precise measurements.\n * \n * Tracks:\n * - Frame time (should be < 16.67ms for 60fps)\n * - Main thread work per frame (target < 8ms, ideal 4-6ms)\n * - Long tasks (> 50ms blocks)\n * - Memory usage (if available)\n */\n\nexport interface FrameMetrics {\n frameTime: number; // milliseconds\n fps: number;\n longTasks: number; // count of frames > 16.67ms\n droppedFrames: number;\n}\n\nexport interface PerformanceMetrics {\n frames: FrameMetrics;\n mainThreadWork: number; // average ms per frame\n longTaskCount: number;\n memory?: {\n usedJSHeapSize: number;\n totalJSHeapSize: number;\n jsHeapSizeLimit: number;\n };\n}\n\nexport class PerformanceTelemetry {\n private frameTimes: number[] = [];\n private longTasks: number = 0;\n private lastFrameTime: number = 0;\n private rafId: number = 0;\n private measuring = false;\n private observer: PerformanceObserver | null = null;\n private workTotal = 0;\n private workCount = 0;\n\n /**\n * Setup PerformanceObserver for long tasks\n */\n private setupObserver(): void {\n if (typeof PerformanceObserver === 'undefined') return;\n\n try {\n this.observer = new PerformanceObserver((list) => {\n if (!this.measuring) return;\n\n for (const entry of list.getEntries()) {\n if (entry.entryType === 'longtask' && entry.duration > 50) {\n this.longTasks++;\n }\n if (entry.entryType === 'measure') {\n this.workTotal += entry.duration;\n this.workCount += 1;\n }\n }\n });\n\n // Observe long tasks if supported\n try {\n this.observer.observe({ entryTypes: ['longtask', 'measure'] });\n } catch {\n // Fallback to just measure if longtask not supported\n this.observer.observe({ entryTypes: ['measure'] });\n }\n } catch (err) {\n console.warn('PerformanceObserver not available', err);\n }\n }\n\n /**\n * Start measuring frame performance\n */\n start(): void {\n if (this.measuring) return;\n \n this.measuring = true;\n this.frameTimes = [];\n this.workTotal = 0;\n this.workCount = 0;\n this.longTasks = 0;\n this.lastFrameTime = performance.now();\n this.setupObserver();\n \n this.measureFrame();\n }\n\n /**\n * Stop measuring\n */\n stop(): void {\n this.measuring = false;\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n this.rafId = 0;\n }\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n }\n\n /**\n * Measure frame timing via requestAnimationFrame\n */\n private measureFrame = (): void => {\n if (!this.measuring) return;\n\n const now = performance.now();\n const frameTime = now - this.lastFrameTime;\n \n this.frameTimes.push(frameTime);\n \n // Keep last 60 frames (1 second at 60fps)\n if (this.frameTimes.length > 60) {\n this.frameTimes.shift();\n }\n \n this.lastFrameTime = now;\n this.rafId = requestAnimationFrame(this.measureFrame);\n };\n\n /**\n * Mark start of work for custom measurement\n */\n markStart(label: string): void {\n performance.mark(`${label}-start`);\n }\n\n /**\n * Mark end of work and measure duration\n */\n markEnd(label: string): number {\n const startMark = `${label}-start`;\n const endMark = `${label}-end`;\n\n performance.mark(endMark);\n const measure = performance.measure(label, startMark, endMark);\n const duration = measure ? measure.duration : 0;\n\n performance.clearMarks(startMark);\n performance.clearMarks(endMark);\n performance.clearMeasures(label);\n\n return duration;\n }\n\n /**\n * Get current metrics snapshot\n */\n getMetrics(): PerformanceMetrics {\n const avgFrameTime = this.frameTimes.length > 0\n ? this.frameTimes.reduce((a, b) => a + b, 0) / this.frameTimes.length\n : 0;\n \n const fps = avgFrameTime > 0 ? 1000 / avgFrameTime : 0;\n \n const longFrames = this.frameTimes.filter(t => t > 16.67).length;\n const droppedFrames = this.frameTimes.filter(t => t > 33.33).length; // > 2 frames\n \n const avgMainThreadWork = this.workCount > 0\n ? this.workTotal / this.workCount\n : 0;\n\n const metrics: PerformanceMetrics = {\n frames: {\n frameTime: avgFrameTime,\n fps,\n longTasks: longFrames,\n droppedFrames,\n },\n mainThreadWork: avgMainThreadWork,\n longTaskCount: this.longTasks,\n };\n\n // Add memory info if available\n if ('memory' in performance && (performance as any).memory) {\n const mem = (performance as any).memory;\n metrics.memory = {\n usedJSHeapSize: mem.usedJSHeapSize,\n totalJSHeapSize: mem.totalJSHeapSize,\n jsHeapSizeLimit: mem.jsHeapSizeLimit,\n };\n }\n\n return metrics;\n }\n\n /**\n * Check if performance is acceptable\n */\n isPerformanceGood(): boolean {\n const metrics = this.getMetrics();\n \n // Target: 60fps (16.67ms), < 8ms main thread work, minimal long tasks\n return (\n metrics.frames.fps >= 55 && // Allow some variance\n metrics.mainThreadWork < 8 &&\n metrics.frames.longTasks < 3 // Max 5% long frames\n );\n }\n\n /**\n * Get detailed report as string\n */\n getReport(): string {\n const metrics = this.getMetrics();\n \n let report = '=== Performance Report ===\\n';\n report += `FPS: ${metrics.frames.fps.toFixed(2)}\\n`;\n report += `Avg Frame Time: ${metrics.frames.frameTime.toFixed(2)}ms\\n`;\n report += `Long Frames (>16.67ms): ${metrics.frames.longTasks}\\n`;\n report += `Dropped Frames (>33ms): ${metrics.frames.droppedFrames}\\n`;\n report += `Avg Main Thread Work: ${metrics.mainThreadWork.toFixed(2)}ms\\n`;\n report += `Long Tasks (>50ms): ${metrics.longTaskCount}\\n`;\n \n if (metrics.memory) {\n const usedMB = (metrics.memory.usedJSHeapSize / 1024 / 1024).toFixed(2);\n const limitMB = (metrics.memory.jsHeapSizeLimit / 1024 / 1024).toFixed(2);\n report += `Memory: ${usedMB}MB / ${limitMB}MB\\n`;\n }\n \n report += `Status: ${this.isPerformanceGood() ? '✓ GOOD' : '✗ POOR'}\\n`;\n \n return report;\n }\n\n /**\n * Reset all metrics\n */\n reset(): void {\n this.frameTimes = [];\n this.workTotal = 0;\n this.workCount = 0;\n this.longTasks = 0;\n }\n\n /**\n * Cleanup\n */\n destroy(): void {\n this.stop();\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n }\n}\n\n/**\n * Singleton instance\n */\nlet telemetry: PerformanceTelemetry | null = null;\n\nexport function getTelemetry(): PerformanceTelemetry {\n if (!telemetry) {\n telemetry = new PerformanceTelemetry();\n }\n return telemetry;\n}\n\n/**\n * Helper to measure async function execution\n */\nexport async function measureAsync<T>(\n label: string,\n fn: () => Promise<T>\n): Promise<{ result: T; duration: number }> {\n const start = performance.now();\n const result = await fn();\n const duration = performance.now() - start;\n \n \n return { result, duration };\n}\n\n/**\n * Helper to measure sync function execution\n */\nexport function measureSync<T>(\n label: string,\n fn: () => T\n): { result: T; duration: number } {\n const start = performance.now();\n const result = fn();\n const duration = performance.now() - start;\n \n \n return { result, duration };\n}\n","/**\n * Security utilities for CSP-compliant environments.\n * All utilities are opt-in and do not run by default.\n */\n\n/**\n * HTML Sanitizer interface - developers must provide their own implementation\n * (e.g., DOMPurify) or use the no-op default.\n */\nexport interface HTMLSanitizer {\n sanitize(html: string): string;\n}\n\n/**\n * No-op sanitizer - DOES NOT sanitize HTML.\n * Used by default to avoid forcing a dependency on sanitizer libraries.\n * Developers using untrusted data MUST provide a real sanitizer.\n */\nclass NoOpSanitizer implements HTMLSanitizer {\n sanitize(html: string): string {\n return html;\n }\n}\n\n/**\n * Registry for custom sanitizer implementation.\n * Defaults to no-op - developers must explicitly set a sanitizer.\n */\nlet globalSanitizer: HTMLSanitizer = new NoOpSanitizer();\n\n/**\n * Set a custom HTML sanitizer (e.g., DOMPurify).\n * \n * @example\n * import DOMPurify from 'dompurify';\n * setHTMLSanitizer({\n * sanitize: (html) => DOMPurify.sanitize(html)\n * });\n */\nexport function setHTMLSanitizer(sanitizer: HTMLSanitizer): void {\n globalSanitizer = sanitizer;\n}\n\n/**\n * Reset to the default no-op sanitizer.\n * Mainly for testing purposes.\n */\nexport function resetHTMLSanitizer(): void {\n globalSanitizer = new NoOpSanitizer();\n}\n\n/**\n * Get the current HTML sanitizer.\n */\nexport function getHTMLSanitizer(): HTMLSanitizer {\n return globalSanitizer;\n}\n\n/**\n * Sanitize HTML using the registered sanitizer.\n * WARNING: Default is no-op! Set a real sanitizer for untrusted content.\n * \n * @param html - HTML string to sanitize\n * @returns Sanitized HTML string\n */\nexport function sanitizeHTML(html: string): string {\n return globalSanitizer.sanitize(html);\n}\n\n/**\n * Create a text node (CSP-safe alternative to innerHTML for text content).\n * \n * @param text - Text content\n * @returns Text node\n */\nexport function createTextNode(text: string): Text {\n return document.createTextNode(text);\n}\n\n/**\n * Set text content safely (CSP-compliant).\n * \n * @param element - Target element\n * @param text - Text content\n */\nexport function setTextContent(element: Element, text: string): void {\n element.textContent = text;\n}\n\n/**\n * Create an element with attributes (CSP-safe).\n * No inline styles or event handlers.\n * \n * @param tagName - HTML tag name\n * @param attributes - Element attributes (excluding style and on* handlers)\n * @param textContent - Optional text content\n * @returns Created element\n */\nexport function createElement(\n tagName: string,\n attributes?: Record<string, string>,\n textContent?: string\n): HTMLElement {\n const el = document.createElement(tagName);\n \n if (attributes) {\n for (const [key, value] of Object.entries(attributes)) {\n // Block dangerous attributes\n if (key.startsWith('on') || key === 'style') {\n console.warn(`[NativeSelect Security] Blocked attribute: ${key}`);\n continue;\n }\n el.setAttribute(key, value);\n }\n }\n \n if (textContent !== undefined) {\n el.textContent = textContent;\n }\n \n return el;\n}\n\n/**\n * Set CSS custom properties (CSP-safe way to style elements).\n * \n * @param element - Target element\n * @param properties - CSS custom properties (e.g., { '--color': 'red' })\n */\nexport function setCSSProperties(element: HTMLElement, properties: Record<string, string>): void {\n for (const [key, value] of Object.entries(properties)) {\n if (!key.startsWith('--')) {\n console.warn(`[NativeSelect Security] CSS property must start with --: ${key}`);\n continue;\n }\n element.style.setProperty(key, value);\n }\n}\n\n/**\n * Feature detection utilities for CSP-restricted environments.\n */\nexport const CSPFeatures = {\n /**\n * Check if inline scripts are allowed (CSP: script-src 'unsafe-inline').\n */\n hasInlineScripts(): boolean {\n try {\n // Try to create a function (blocked by CSP: script-src without 'unsafe-eval')\n new Function('return true');\n return true;\n } catch {\n return false;\n }\n },\n\n /**\n * Check if eval is allowed (CSP: script-src 'unsafe-eval').\n */\n hasEval(): boolean {\n try {\n eval('true');\n return true;\n } catch {\n return false;\n }\n },\n\n /**\n * Check if SharedArrayBuffer is available.\n * Required for some Worker features, blocked without COOP/COEP headers.\n */\n hasSharedArrayBuffer(): boolean {\n return typeof SharedArrayBuffer !== 'undefined';\n },\n\n /**\n * Check if Web Workers are available and functional.\n */\n hasWorkers(): boolean {\n try {\n return typeof Worker !== 'undefined';\n } catch {\n return false;\n }\n },\n\n /**\n * Check if we're in a sandboxed iframe.\n */\n isSandboxed(): boolean {\n try {\n // Sandboxed iframes may not have access to parent\n return window !== window.parent && !window.parent;\n } catch {\n return true;\n }\n },\n\n /**\n * Check CSP policy via meta tag or SecurityPolicyViolationEvent.\n */\n getCSPDirectives(): string[] {\n const metaTags = document.querySelectorAll('meta[http-equiv=\"Content-Security-Policy\"]');\n const directives: string[] = [];\n \n metaTags.forEach((meta) => {\n const content = meta.getAttribute('content');\n if (content) {\n directives.push(content);\n }\n });\n \n return directives;\n }\n};\n\n/**\n * Runtime environment checks for degraded features.\n */\nexport interface EnvironmentCapabilities {\n canUseWorkers: boolean;\n canUseSharedArrayBuffer: boolean;\n canUseInlineScripts: boolean;\n canUseEval: boolean;\n isSandboxed: boolean;\n cspDirectives: string[];\n}\n\n/**\n * Detect environment capabilities once at initialization.\n */\nexport function detectEnvironment(): EnvironmentCapabilities {\n return {\n canUseWorkers: CSPFeatures.hasWorkers(),\n canUseSharedArrayBuffer: CSPFeatures.hasSharedArrayBuffer(),\n canUseInlineScripts: CSPFeatures.hasInlineScripts(),\n canUseEval: CSPFeatures.hasEval(),\n isSandboxed: CSPFeatures.isSandboxed(),\n cspDirectives: CSPFeatures.getCSPDirectives()\n };\n}\n\n/**\n * Validation for untrusted HTML in templates.\n * Logs warning if no sanitizer is configured.\n */\nexport function validateTemplate(html: string, source: string): string {\n if (globalSanitizer instanceof NoOpSanitizer) {\n console.warn(\n `[NativeSelect Security] Template from \"${source}\" contains HTML but no sanitizer is configured. ` +\n `This may be unsafe if the content is untrusted. ` +\n `Call setHTMLSanitizer() with a sanitizer like DOMPurify.`\n );\n }\n return sanitizeHTML(html);\n}\n\n/**\n * Check if a string looks like it might contain executable code.\n */\nexport function containsSuspiciousPatterns(str: string): boolean {\n const patterns = [\n /<script/i,\n /javascript:/i,\n /on\\w+\\s*=/i, // event handlers like onclick=\n /eval\\s*\\(/i,\n /Function\\s*\\(/i,\n /setTimeout\\s*\\(/i,\n /setInterval\\s*\\(/i\n ];\n \n return patterns.some(pattern => pattern.test(str));\n}\n\n/**\n * Escape HTML entities for text content.\n */\nexport function escapeHTML(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n}\n\n/**\n * Escape attribute values.\n */\nexport function escapeAttribute(attr: string): string {\n return attr\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n","/**\n * CSP-compliant styling utilities.\n * No inline styles or runtime style tag injection.\n * Uses CSS custom properties and class names only.\n */\n\n/**\n * Apply CSS classes to an element (CSP-safe).\n */\nexport function applyClasses(element: HTMLElement, classes: string[]): void {\n element.className = classes.filter(Boolean).join(' ');\n}\n\n/**\n * Toggle a CSS class (CSP-safe).\n */\nexport function toggleClass(element: HTMLElement, className: string, force?: boolean): void {\n element.classList.toggle(className, force);\n}\n\n/**\n * Set CSS custom properties (CSP-safe dynamic styling).\n * All properties must start with -- (CSS variables).\n * \n * @example\n * setCustomProperties(element, {\n * '--item-height': '48px',\n * '--selected-bg': '#0066cc'\n * });\n */\nexport function setCustomProperties(\n element: HTMLElement,\n properties: Record<string, string>\n): void {\n for (const [key, value] of Object.entries(properties)) {\n if (!key.startsWith('--')) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[NativeSelect CSP] Custom property must start with --: \"${key}\". Skipping.`\n );\n }\n continue;\n }\n element.style.setProperty(key, value);\n }\n}\n\n/**\n * Get a CSS custom property value.\n */\nexport function getCustomProperty(element: HTMLElement, propertyName: string): string {\n return getComputedStyle(element).getPropertyValue(propertyName).trim();\n}\n\n/**\n * Remove a CSS custom property.\n */\nexport function removeCustomProperty(element: HTMLElement, propertyName: string): void {\n element.style.removeProperty(propertyName);\n}\n\n/**\n * Predefined theme as CSS custom properties.\n * Can be overridden by consumers via CSS.\n */\nexport const defaultTheme = {\n '--ns-item-height': '40px',\n '--ns-item-padding': '8px 12px',\n '--ns-item-bg': 'transparent',\n '--ns-item-hover-bg': 'rgba(0, 0, 0, 0.05)',\n '--ns-item-selected-bg': 'rgba(0, 102, 204, 0.1)',\n '--ns-item-active-bg': 'rgba(0, 102, 204, 0.2)',\n '--ns-item-color': 'inherit',\n '--ns-item-selected-color': '#0066cc',\n '--ns-border-color': '#ccc',\n '--ns-border-radius': '4px',\n '--ns-focus-outline': '2px solid #0066cc',\n '--ns-font-size': '14px',\n '--ns-font-family': 'system-ui, -apple-system, sans-serif'\n};\n\n/**\n * Apply the default theme to an element.\n */\nexport function applyDefaultTheme(element: HTMLElement): void {\n setCustomProperties(element, defaultTheme);\n}\n\n/**\n * Static CSS for shadow DOM (no runtime injection).\n * This CSS is CSP-safe because it's defined at build time as a string constant,\n * not generated at runtime.\n */\nexport const shadowDOMStyles = `\n:host {\n display: block;\n box-sizing: border-box;\n font-family: var(--ns-font-family, system-ui, -apple-system, sans-serif);\n font-size: var(--ns-font-size, 14px);\n}\n\n* {\n box-sizing: border-box;\n}\n\n.ns-list {\n position: relative;\n overflow: auto;\n max-height: var(--ns-max-height, 300px);\n border: 1px solid var(--ns-border-color, #ccc);\n border-radius: var(--ns-border-radius, 4px);\n background: var(--ns-bg, white);\n outline: none;\n}\n\n.ns-list:focus {\n outline: var(--ns-focus-outline, 2px solid #0066cc);\n outline-offset: -2px;\n}\n\n.ns-item {\n padding: var(--ns-item-padding, 8px 12px);\n min-height: var(--ns-item-height, 40px);\n color: var(--ns-item-color, inherit);\n background: var(--ns-item-bg, transparent);\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n transition: background-color 0.15s ease;\n}\n\n.ns-item:hover {\n background: var(--ns-item-hover-bg, rgba(0, 0, 0, 0.05));\n}\n\n.ns-item[aria-selected=\"true\"] {\n background: var(--ns-item-selected-bg, rgba(0, 102, 204, 0.1));\n color: var(--ns-item-selected-color, #0066cc);\n}\n\n.ns-item[data-active=\"true\"]:not([aria-selected=\"true\"]) {\n background: var(--ns-item-active-bg, rgba(0, 102, 204, 0.2));\n}\n\n.ns-item[aria-selected=\"true\"][data-active=\"true\"] {\n background: var(--ns-item-selected-active-bg, var(--ns-item-selected-bg, rgba(0, 102, 204, 0.1)));\n color: var(--ns-item-selected-active-color, var(--ns-item-selected-color, #0066cc));\n outline: var(--ns-item-selected-active-outline, 2px solid #0066cc);\n outline-offset: -2px;\n}\n\n.ns-item[aria-disabled=\"true\"] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.ns-viewport {\n position: relative;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.ns-spacer {\n position: absolute;\n top: 0;\n left: 0;\n width: 1px;\n pointer-events: none;\n}\n\n/* Screen reader only */\n.ns-sr-only {\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n}\n\n/* Portal mode (teleported outside shadow DOM) */\n.ns-portal {\n position: fixed;\n z-index: var(--ns-portal-z-index, 9999);\n}\n\n/* CSP warning banner (only shown in development) */\n.ns-csp-warning {\n padding: 8px;\n background: #fff3cd;\n border: 1px solid #ffc107;\n border-radius: 4px;\n color: #856404;\n font-size: 12px;\n margin-bottom: 8px;\n}\n`;\n\n/**\n * Inject static styles into shadow root (CSP-safe).\n * Only called once during component initialization.\n */\nexport function injectShadowStyles(shadowRoot: ShadowRoot): void {\n const style = document.createElement('style');\n style.textContent = shadowDOMStyles;\n shadowRoot.appendChild(style);\n}\n\n/**\n * Check if element has overflow:hidden ancestors (portal fallback detection).\n */\nexport function hasOverflowHiddenAncestor(element: HTMLElement): boolean {\n let current: HTMLElement | null = element.parentElement;\n \n while (current && current !== document.body) {\n const overflow = getComputedStyle(current).overflow;\n if (overflow === 'hidden' || overflow === 'clip') {\n return true;\n }\n current = current.parentElement;\n }\n \n return false;\n}\n\n/**\n * Runtime warning for CSP violations (development only).\n */\nexport function warnCSPViolation(feature: string, fallback: string): void {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[NativeSelect CSP] Feature \"${feature}\" blocked by Content Security Policy. ` +\n `Falling back to \"${fallback}\".`\n );\n }\n}\n"],"names":["UnifiedOptionRenderer","isRecord"],"mappings":"MAKa,qBAAqB,GAAG,CAAC,QAAgD,MAAuB;IAC3G,QAAQ;AACR,IAAA,QAAQ,EAAE,CAAC,IAAoB,KAAI;QACjC,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,GAAG,mBAAmB,CAAuB;AACrE,QAAA,IAAI,CAAC,EAAE;AAAE,YAAA,OAAO,IAAI;QACpB,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;AACpC,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI;IAC1C,CAAC;AACD,IAAA,aAAa,EAAE,CAAC,KAAa,KAAI;QAC/B,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA,8BAAA,EAAiC,KAAK,CAAA,EAAA,CAAI,CAAuB;AACnG,QAAA,EAAE,EAAE,KAAK,IAAI;IACf;AACD,CAAA;AAED;SACgB,cAAc,CAAC,SAAsB,EAAE,KAAgB,EAAE,cAA8B,EAAA;AACrG,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,sBAAsB,EAAE;AAC9C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE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AACG,SAAU,gBAAgB,CAAC,OAAe,EAAE,QAAgB,EAAA;IAChE,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;AACzC,QAAA,OAAO,CAAC,IAAI,CACV,CAAA,4BAAA,EAA+B,OAAO,CAAA,sCAAA,CAAwC;YAC9E,CAAA,iBAAA,EAAoB,QAAQ,CAAA,EAAA,CAAI,CACjC;IACH;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/renderers/contracts.ts","../../../src/engine/item-adapter.ts","../../../src/engine/item-registry.ts","../../../src/engine/selection-policy.ts","../../../src/engine/select-machine.ts","../../../src/engine/select-state.ts","../../../src/engine/selectors.ts","../../../src/platform/web/select-engine-bridge.ts","../../../src/platform/web/select-effect-runner.ts","../../../src/utils/fenwick-tree.ts","../../../src/utils/dom-pool.ts","../../../src/utils/virtualizer.ts","../../../src/utils/custom-option-pool.ts","../../../src/utils/option-renderer.ts","../../../src/components/native-select.ts","../../../src/config/global-config.ts","../../../src/data-loading/public-config.ts","../../../src/engine/virtualization.ts","../../../src/engine/accessibility.ts","../../../src/platform/web/accessibility-effects.ts","../../../src/components/select-option.ts","../../../src/utils/value-equality.ts","../../../src/data-loading/request-coordinator.ts","../../../src/components/enhanced-select.ts","../../../src/utils/worker-manager.ts","../../../src/utils/telemetry.ts","../../../src/utils/security.ts","../../../src/utils/csp-styles.ts"],"sourcesContent":["import type { RendererHelpers } from '../types.js';\n\nexport type OptionTemplate = (item: unknown, index: number) => string;\nexport type OptionRenderer = (item: unknown, index: number, helpers: RendererHelpers) => HTMLElement;\n\nexport const createRendererHelpers = (onSelect: (item: unknown, index: number) => void): RendererHelpers => ({\n onSelect,\n getIndex: (node: Element | null) => {\n const el = node?.closest?.('[data-selectable]') as HTMLElement | null;\n if (!el) return null;\n const idx = Number(el.dataset.index);\n return Number.isFinite(idx) ? idx : null;\n },\n keyboardFocus: (index: number) => {\n const el = document.querySelector(`[data-selectable][data-index=\"${index}\"]`) as HTMLElement | null;\n el?.focus?.();\n }\n});\n\n// Fast template render path: string -> DOM via DocumentFragment, with delegation markers\nexport function renderTemplate(container: HTMLElement, items: unknown[], optionTemplate: OptionTemplate) {\n const frag = document.createDocumentFragment();\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n const wrapper = document.createElement('div');\n wrapper.innerHTML = optionTemplate(item, i);\n let el = wrapper.firstElementChild as HTMLElement | null;\n if (!el) {\n // Edge case: template produced multiple or zero root nodes; wrap children\n const wrap = document.createElement('div');\n wrap.setAttribute('data-selectable', '');\n wrap.setAttribute('data-index', String(i));\n while (wrapper.firstChild) wrap.appendChild(wrapper.firstChild);\n frag.appendChild(wrap);\n continue;\n }\n // Allow override if developer sets data-smilodon-handled=\"true\"\n if (!el.hasAttribute('data-smilodon-handled')) {\n el.setAttribute('data-selectable', '');\n el.setAttribute('data-index', String(i));\n }\n frag.appendChild(el);\n }\n container.replaceChildren(frag);\n}\n","import type { SelectKey } from './contracts.js';\n\n/** Extract identity separately from the outward value and presentation fields. */\nexport interface ItemAdapter<TItem, TKey extends SelectKey = SelectKey, TValue = unknown> {\n getKey(item: TItem, index: number): TKey;\n getValue(item: TItem, index: number): TValue;\n getLabel(item: TItem, index: number): string;\n isDisabled?(item: TItem, index: number): boolean;\n getGroupKey?(item: TItem, index: number): string | null;\n}\n\nexport interface DefaultItemAdapterOptions<TItem = unknown, TValue = unknown> {\n getKey?: (item: TItem, index: number) => SelectKey;\n valueField?: string;\n labelField?: string;\n getValue?: (item: TItem, index: number) => TValue;\n getLabel?: (item: TItem, index: number) => string;\n isDisabled?: (item: TItem, index: number) => boolean;\n getGroupKey?: (item: TItem, index: number) => string | null;\n /** Explicit compatibility opt-in for keyless references; defaults to identity. */\n keyFallback?: 'identity' | 'index';\n onIndexFallback?: (message: string) => void;\n}\n\nconst objectKeyCache = new WeakMap<object, string>();\nlet generatedObjectKeyId = 0;\n\nfunction isObjectRecord(value: unknown): value is Record<PropertyKey, unknown> {\n return value !== null && (typeof value === 'object' || typeof value === 'function');\n}\n\nfunction readField(item: unknown, field: string | undefined): unknown {\n if (!field || !isObjectRecord(item)) return undefined;\n return item[field];\n}\n\nfunction toSelectKey(value: unknown): SelectKey | null {\n if (typeof value === 'string' || typeof value === 'number') {\n return value;\n }\n\n if (typeof value === 'boolean' || typeof value === 'bigint' || typeof value === 'symbol') {\n return String(value);\n }\n\n return null;\n}\n\nfunction objectIdentityKey(item: object): string {\n const cached = objectKeyCache.get(item);\n if (cached) return cached;\n\n generatedObjectKeyId += 1;\n const key = `__smilodon-object-${generatedObjectKeyId}`;\n objectKeyCache.set(item, key);\n return key;\n}\n\nfunction indexFallbackKey(index: number, warn?: (message: string) => void): string {\n const env = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV;\n if (env !== 'production') {\n const message = '[Smilodon Phase2] Using index as key is unstable under filtering/sorting. Provide getKey/valueField for stable selection.';\n if (warn) {\n warn(message);\n } else {\n console.warn(message);\n }\n }\n return `__smilodon-index-${index}`;\n}\n\n/** Generated reference keys survive reorder, but not replacement with new objects. */\nexport function createDefaultItemAdapter<TItem = unknown, TValue = unknown>(\n options: DefaultItemAdapterOptions<TItem, TValue> = {},\n): ItemAdapter<TItem> {\n return {\n getKey(item, index) {\n if (options.getKey) {\n return options.getKey(item, index);\n }\n\n if (isObjectRecord(item)) {\n const directKey =\n toSelectKey(item.id)\n ?? toSelectKey(item.key)\n ?? toSelectKey(item.value)\n ?? toSelectKey(readField(item, options.valueField));\n\n if (directKey !== null) {\n return directKey;\n }\n\n if (options.getValue) {\n const configuredValueKey = toSelectKey(options.getValue(item, index));\n if (configuredValueKey !== null) {\n return configuredValueKey;\n }\n }\n\n return options.keyFallback === 'index'\n ? indexFallbackKey(index, options.onIndexFallback)\n : objectIdentityKey(item);\n }\n\n return String(item);\n },\n\n getValue(item, index) {\n if (options.getValue) {\n return options.getValue(item, index);\n }\n\n const fieldValue = readField(item, options.valueField);\n if (fieldValue !== undefined) {\n return fieldValue;\n }\n\n return isObjectRecord(item) && item.value !== undefined ? item.value : item;\n },\n\n getLabel(item, index) {\n if (options.getLabel) {\n return options.getLabel(item, index);\n }\n\n const fieldLabel = readField(item, options.labelField);\n if (fieldLabel !== undefined) {\n return String(fieldLabel);\n }\n\n if (isObjectRecord(item) && item.label !== undefined) {\n return String(item.label);\n }\n\n if (isObjectRecord(item) && item.text !== undefined) {\n return String(item.text);\n }\n\n return String(item);\n },\n\n isDisabled(item, index) {\n if (options.isDisabled) {\n return options.isDisabled(item, index);\n }\n\n return Boolean(isObjectRecord(item) && item.disabled);\n },\n\n getGroupKey(item, index) {\n if (options.getGroupKey) {\n return options.getGroupKey(item, index);\n }\n\n if (!isObjectRecord(item) || item.group === undefined) {\n return null;\n }\n\n return item.group == null ? null : String(item.group);\n },\n };\n}\n","import type { SelectKey } from './contracts.js';\nimport type { ItemAdapter } from './item-adapter.js';\n\nexport type DuplicateKeyPolicy =\n | 'throw'\n | 'warn'\n | 'first-wins'\n | 'last-wins';\n\nexport interface DuplicateKeyDiagnostic<TKey extends SelectKey = SelectKey> {\n readonly key: TKey;\n readonly firstIndex: number;\n readonly duplicateIndex: number;\n}\n\nexport interface ItemRecord<TItem, TKey extends SelectKey = SelectKey> {\n readonly key: TKey;\n readonly item: TItem;\n readonly index: number;\n readonly label: string;\n readonly value: unknown;\n readonly disabled: boolean;\n readonly groupKey: string | null;\n}\n\nexport interface ItemRegistry<TItem, TKey extends SelectKey = SelectKey> {\n /** Every input position, including duplicates; key lookups resolve the winner. */\n readonly records: readonly ItemRecord<TItem, TKey>[];\n readonly keyToRecord: ReadonlyMap<TKey, ItemRecord<TItem, TKey>>;\n readonly indexToKey: ReadonlyMap<number, TKey>;\n readonly keyToIndex: ReadonlyMap<TKey, number>;\n readonly duplicateKeys: readonly DuplicateKeyDiagnostic<TKey>[];\n}\n\nexport interface ItemRegistryOptions<TKey extends SelectKey = SelectKey> {\n duplicateKeyPolicy?: DuplicateKeyPolicy;\n onDuplicateKey?: (diagnostic: DuplicateKeyDiagnostic<TKey>) => void;\n}\n\nexport function getDefaultDuplicateKeyPolicy(): DuplicateKeyPolicy {\n const env = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV;\n\n return env === 'production' ? 'warn' : 'throw';\n}\n\nexport function createItemRegistry<TItem, TKey extends SelectKey = SelectKey>(\n items: readonly TItem[],\n adapter: ItemAdapter<TItem, TKey>,\n options: ItemRegistryOptions<TKey> = {},\n): ItemRegistry<TItem, TKey> {\n const duplicateKeyPolicy = options.duplicateKeyPolicy ?? getDefaultDuplicateKeyPolicy();\n const records: ItemRecord<TItem, TKey>[] = [];\n const keyToRecord = new Map<TKey, ItemRecord<TItem, TKey>>();\n const indexToKey = new Map<number, TKey>();\n const keyToIndex = new Map<TKey, number>();\n const firstIndexByKey = new Map<TKey, number>();\n const duplicateKeys: DuplicateKeyDiagnostic<TKey>[] = [];\n\n items.forEach((item, index) => {\n const key = adapter.getKey(item, index);\n const firstIndex = firstIndexByKey.get(key);\n const record: ItemRecord<TItem, TKey> = {\n key,\n item,\n index,\n label: adapter.getLabel(item, index),\n value: adapter.getValue(item, index),\n disabled: adapter.isDisabled?.(item, index) === true,\n groupKey: adapter.getGroupKey?.(item, index) ?? null,\n };\n\n records.push(record);\n indexToKey.set(index, key);\n\n if (firstIndex !== undefined) {\n const diagnostic = {\n key,\n firstIndex,\n duplicateIndex: index,\n };\n duplicateKeys.push(diagnostic);\n\n if (duplicateKeyPolicy === 'throw') {\n throw new Error(duplicateKeyMessage(diagnostic));\n }\n\n if (duplicateKeyPolicy === 'warn') {\n if (options.onDuplicateKey) {\n options.onDuplicateKey(diagnostic);\n } else {\n console.warn(duplicateKeyMessage(diagnostic));\n }\n return;\n }\n\n if (duplicateKeyPolicy === 'first-wins') {\n return;\n }\n } else {\n firstIndexByKey.set(key, index);\n }\n\n keyToRecord.set(key, record);\n keyToIndex.set(key, index);\n });\n\n return {\n records,\n keyToRecord,\n indexToKey,\n keyToIndex,\n duplicateKeys,\n };\n}\n\nfunction duplicateKeyMessage<TKey extends SelectKey>(diagnostic: DuplicateKeyDiagnostic<TKey>): string {\n return `[Smilodon Phase2] Duplicate item key \"${String(diagnostic.key)}\" at indexes ${diagnostic.firstIndex} and ${diagnostic.duplicateIndex}. Provide stable unique keys for selection.`;\n}\n","import type { SelectKey } from './contracts.js';\n\nexport type SelectionReason =\n | 'pointer'\n | 'keyboard'\n | 'programmatic'\n | 'form-reset'\n | 'external-value-sync';\n\nexport type ActiveReason =\n | 'keyboard'\n | 'pointer'\n | 'search'\n | 'open'\n | 'programmatic';\n\nexport interface SelectionConfig<TKey extends SelectKey = SelectKey> {\n multiple: boolean;\n required: boolean;\n /** Allows toggling off a selected single item; explicit deselect/clear still respect required. */\n allowDeselect: boolean;\n disabledKeys: ReadonlySet<TKey>;\n maxSelections?: number;\n}\n\nexport type SelectionRequest<TKey extends SelectKey = SelectKey> =\n | { type: 'select'; key: TKey; reason: SelectionReason }\n | { type: 'deselect'; key: TKey; reason: SelectionReason }\n | { type: 'toggle'; key: TKey; reason: SelectionReason }\n | { type: 'clear'; reason: SelectionReason }\n | { type: 'replace'; keys: readonly TKey[]; reason: SelectionReason };\n\n/** Pure key policy. Visibility does not constrain selection; disabled keys do. */\nexport function applySelectionRequest<TKey extends SelectKey>(\n selectedKeys: ReadonlySet<TKey>,\n request: SelectionRequest<TKey>,\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n let next: ReadonlySet<TKey>;\n switch (request.type) {\n case 'select':\n next = selectKey(selectedKeys, request.key, config);\n break;\n case 'deselect':\n next = deselectKey(selectedKeys, request.key, config);\n break;\n case 'toggle':\n if (!selectedKeys.has(request.key)) {\n next = selectKey(selectedKeys, request.key, config);\n } else if (config.multiple || config.allowDeselect) {\n next = deselectKey(selectedKeys, request.key, config);\n } else {\n next = selectedKeys;\n }\n break;\n case 'clear':\n next = config.required && selectedKeys.size > 0\n ? selectedKeys\n : new Set<TKey>();\n break;\n case 'replace':\n next = replaceKeys(selectedKeys, request.keys, config);\n break;\n }\n\n // Set membership is authoritative. Reordering the same keys is not a change.\n return next.size === selectedKeys.size && [...next].every((key) => selectedKeys.has(key))\n ? selectedKeys\n : next;\n}\n\nfunction selectKey<TKey extends SelectKey>(\n selectedKeys: ReadonlySet<TKey>,\n key: TKey,\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n if (config.disabledKeys.has(key)) {\n return selectedKeys;\n }\n\n if (!config.multiple) {\n return new Set<TKey>([key]);\n }\n\n if (selectedKeys.has(key)) {\n return selectedKeys;\n }\n\n const maxSelections = config.maxSelections ?? 0;\n if (maxSelections > 0 && selectedKeys.size >= maxSelections) {\n return selectedKeys;\n }\n\n return new Set<TKey>([...selectedKeys, key]);\n}\n\nfunction deselectKey<TKey extends SelectKey>(\n selectedKeys: ReadonlySet<TKey>,\n key: TKey,\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n if (!selectedKeys.has(key) || config.disabledKeys.has(key)) {\n return selectedKeys;\n }\n\n if (config.required && selectedKeys.size <= 1) {\n return selectedKeys;\n }\n\n const next = new Set(selectedKeys);\n next.delete(key);\n return next;\n}\n\nfunction replaceKeys<TKey extends SelectKey>(\n selectedKeys: ReadonlySet<TKey>,\n keys: readonly TKey[],\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n const next = normalizeKeys(keys, config);\n\n if (config.required && next.size === 0 && selectedKeys.size > 0) {\n // Required preserves a valid selection, but cannot keep newly disabled keys.\n return normalizeKeys(selectedKeys, config);\n }\n\n return next;\n}\n\nfunction normalizeKeys<TKey extends SelectKey>(\n keys: Iterable<TKey>,\n config: SelectionConfig<TKey>,\n): ReadonlySet<TKey> {\n const seen = new Set<TKey>();\n const maxSelections = config.maxSelections ?? 0;\n\n for (const key of keys) {\n if (config.disabledKeys.has(key) || seen.has(key)) {\n continue;\n }\n\n seen.add(key);\n\n if (!config.multiple || (maxSelections > 0 && seen.size >= maxSelections)) {\n break;\n }\n }\n\n return seen;\n}\n","import type { SelectKey } from './contracts.js';\nimport type { SelectEffect } from './select-effects.js';\nimport type { SelectEvent } from './select-events.js';\nimport type { SelectState } from './select-state.js';\nimport { applySelectionRequest, type SelectionRequest } from './selection-policy.js';\n\nexport interface TransitionResult<K extends SelectKey = SelectKey> {\n state: SelectState<K>;\n effects: SelectEffect<K>[];\n}\n\nexport function transition<K extends SelectKey>(\n state: SelectState<K>,\n event: SelectEvent<K>,\n): TransitionResult<K> {\n switch (event.type) {\n case 'CONNECT':\n return { state: { ...state, lifecycle: 'connected' }, effects: [] };\n\n case 'DISCONNECT': {\n const effects: SelectEffect<K>[] = state.popup === 'open'\n ? [{ type: 'POPUP_CLOSED', reason: 'disconnect' }, { type: 'SYNC_ARIA' }]\n : [];\n return {\n state: { ...state, lifecycle: 'disconnected', popup: 'closed', focused: false },\n effects,\n };\n }\n\n case 'OPEN_REQUEST':\n if (state.lifecycle !== 'connected' || state.disabled || state.popup === 'open') {\n return { state: enforceInvariants(state), effects: [] };\n }\n return {\n state: { ...state, popup: 'open' },\n effects: [{ type: 'POPUP_OPENED' }, { type: 'FOCUS_TRIGGER' }, { type: 'SYNC_ARIA' }],\n };\n\n case 'CLOSE_REQUEST':\n if (state.popup === 'closed') {\n return { state, effects: [] };\n }\n return {\n state: { ...state, popup: 'closed' },\n effects: [{ type: 'POPUP_CLOSED', reason: event.reason }, { type: 'SYNC_ARIA' }],\n };\n\n case 'TOGGLE_REQUEST':\n return transition(state, state.popup === 'open'\n ? { type: 'CLOSE_REQUEST', reason: 'programmatic' }\n : { type: 'OPEN_REQUEST' });\n\n case 'FOCUS_GAINED':\n return state.focused\n ? { state, effects: [] }\n : { state: { ...state, focused: true }, effects: [{ type: 'SYNC_ARIA' }] };\n\n case 'FOCUS_LOST':\n return state.focused\n ? { state: { ...state, focused: false }, effects: [{ type: 'SYNC_ARIA' }] }\n : { state, effects: [] };\n\n case 'DISABLED_CHANGED': {\n if (state.disabled === event.disabled) {\n return { state: enforceInvariants(state), effects: [] };\n }\n const nextState = enforceInvariants({ ...state, disabled: event.disabled });\n const effects: SelectEffect<K>[] = [];\n if (event.disabled && state.popup === 'open') {\n effects.push({ type: 'POPUP_CLOSED', reason: 'disabled' });\n }\n effects.push({ type: 'SYNC_ARIA' });\n return {\n state: nextState,\n effects,\n };\n }\n\n case 'ITEMS_REGISTERED': {\n const registeredKeys = new Set(event.keys);\n const disabledKeys = new Set(event.disabledKeys ?? []);\n const selection = { ...state.selection, disabledKeys };\n const activeKey = resolveActiveKey(state.activeKey, registeredKeys, disabledKeys);\n const selectedKeys = applySelectionRequest<K>(\n state.selectedKeys,\n { type: 'replace', keys: Array.from(state.selectedKeys), reason: 'programmatic' },\n selection,\n );\n const nextState = {\n ...state,\n activeKey,\n selectedKeys,\n registeredKeys,\n selection,\n };\n const effects: SelectEffect<K>[] = [];\n if (!keysEqual(activeKey, state.activeKey)) {\n effects.push({ type: 'ACTIVE_KEY_CHANGED', activeKey, reason: 'programmatic' });\n }\n if (!setsEqual(selectedKeys, state.selectedKeys)) {\n effects.push({ type: 'SELECTION_CHANGED', selectedKeys: Array.from(selectedKeys), reason: 'programmatic' });\n }\n if (effects.length > 0) {\n effects.push({ type: 'SYNC_ARIA' });\n }\n return { state: nextState, effects };\n }\n\n case 'SELECTION_CONFIG_CHANGED': {\n const selection = {\n ...state.selection,\n multiple: event.multiple ?? state.selection.multiple,\n required: event.required ?? state.selection.required,\n allowDeselect: event.allowDeselect ?? state.selection.allowDeselect,\n maxSelections: event.maxSelections ?? state.selection.maxSelections,\n disabledKeys: event.disabledKeys ? new Set(event.disabledKeys) : state.selection.disabledKeys,\n };\n const selectedKeys = applySelectionRequest(\n state.selectedKeys,\n { type: 'replace', keys: Array.from(state.selectedKeys), reason: 'programmatic' },\n selection,\n );\n const activeKey = resolveActiveKey(state.activeKey, state.registeredKeys, selection.disabledKeys);\n const nextState = { ...state, selection, selectedKeys, activeKey };\n const effects: SelectEffect<K>[] = [];\n if (!keysEqual(activeKey, state.activeKey)) {\n effects.push({ type: 'ACTIVE_KEY_CHANGED', activeKey, reason: 'programmatic' });\n }\n if (!setsEqual(selectedKeys, state.selectedKeys)) {\n effects.push({ type: 'SELECTION_CHANGED', selectedKeys: Array.from(selectedKeys), reason: 'programmatic' });\n }\n if (effects.length > 0) {\n effects.push({ type: 'SYNC_ARIA' });\n }\n return { state: nextState, effects };\n }\n\n case 'ACTIVE_KEY_CHANGED': {\n if (\n event.key !== null\n && (!state.registeredKeys.has(event.key) || state.selection.disabledKeys.has(event.key))\n ) {\n return { state, effects: [] };\n }\n\n if (keysEqual(state.activeKey, event.key)) {\n return { state, effects: [] };\n }\n\n return {\n state: { ...state, activeKey: event.key },\n effects: [\n { type: 'ACTIVE_KEY_CHANGED', activeKey: event.key, reason: event.reason },\n { type: 'SYNC_ARIA' },\n ],\n };\n }\n\n case 'SELECT_KEY_REQUEST':\n case 'DESELECT_KEY_REQUEST':\n case 'TOGGLE_KEY_REQUEST':\n case 'CLEAR_SELECTION_REQUEST':\n case 'REPLACE_SELECTION_REQUEST': {\n const selectedKeys = applySelectionRequest<K>(\n state.selectedKeys,\n selectionRequestFromEvent<K>(event),\n state.selection,\n );\n\n if (setsEqual(selectedKeys, state.selectedKeys)) {\n return { state, effects: [] };\n }\n\n return {\n state: { ...state, selectedKeys },\n effects: [\n { type: 'SELECTION_CHANGED', selectedKeys: Array.from(selectedKeys), reason: event.reason },\n { type: 'SYNC_ARIA' },\n ],\n };\n }\n\n default:\n return { state, effects: [] };\n }\n}\n\nfunction selectionRequestFromEvent<K extends SelectKey>(\n event: Extract<\n SelectEvent<K>,\n | { type: 'SELECT_KEY_REQUEST' }\n | { type: 'DESELECT_KEY_REQUEST' }\n | { type: 'TOGGLE_KEY_REQUEST' }\n | { type: 'CLEAR_SELECTION_REQUEST' }\n | { type: 'REPLACE_SELECTION_REQUEST' }\n >,\n): SelectionRequest<K> {\n switch (event.type) {\n case 'SELECT_KEY_REQUEST':\n return { type: 'select' as const, key: event.key, reason: event.reason };\n case 'DESELECT_KEY_REQUEST':\n return { type: 'deselect' as const, key: event.key, reason: event.reason };\n case 'TOGGLE_KEY_REQUEST':\n return { type: 'toggle' as const, key: event.key, reason: event.reason };\n case 'CLEAR_SELECTION_REQUEST':\n return { type: 'clear' as const, reason: event.reason };\n case 'REPLACE_SELECTION_REQUEST':\n return { type: 'replace' as const, keys: event.keys, reason: event.reason };\n }\n}\n\nfunction enforceInvariants<K extends SelectKey>(state: SelectState<K>): SelectState<K> {\n if (state.lifecycle === 'disconnected' || state.disabled) {\n return state.popup === 'closed' ? state : { ...state, popup: 'closed' };\n }\n return state;\n}\n\nfunction resolveActiveKey<K extends SelectKey>(\n key: K | null,\n registeredKeys: ReadonlySet<K>,\n disabledKeys: ReadonlySet<K>,\n): K | null {\n return key !== null && registeredKeys.has(key) && !disabledKeys.has(key) ? key : null;\n}\n\nfunction setsEqual<K>(left: ReadonlySet<K>, right: ReadonlySet<K>): boolean {\n if (left.size !== right.size) return false;\n\n for (const value of left) {\n if (!right.has(value)) return false;\n }\n\n return true;\n}\n\n/** Match Map/Set identity, including NaN and signed zero. */\nfunction keysEqual(left: SelectKey | null, right: SelectKey | null): boolean {\n return left === right || Object.is(left, right);\n}\n","import type { SelectKey } from './contracts.js';\nimport type { SelectionConfig } from './selection-policy.js';\n\nexport interface SelectState<K extends SelectKey = SelectKey> {\n lifecycle: 'disconnected' | 'connected';\n popup: 'closed' | 'open';\n disabled: boolean;\n focused: boolean;\n query: string;\n /** Navigation identity; must be registered and enabled, or null. */\n activeKey: K | null;\n /** Selection identity survives absence from the current registered/visible set. */\n selectedKeys: ReadonlySet<K>;\n registeredKeys: ReadonlySet<K>;\n selection: SelectionConfig<K>;\n dataStatus: 'idle' | 'loading' | 'error';\n}\n\nexport function createInitialSelectState<K extends SelectKey = SelectKey>(): SelectState<K> {\n return {\n lifecycle: 'disconnected',\n popup: 'closed',\n disabled: false,\n focused: false,\n query: '',\n activeKey: null,\n selectedKeys: new Set<K>(),\n registeredKeys: new Set<K>(),\n selection: {\n multiple: false,\n required: false,\n allowDeselect: false,\n disabledKeys: new Set<K>(),\n maxSelections: 0,\n },\n dataStatus: 'idle',\n };\n}\n","import type { SelectKey } from './contracts.js';\nimport type { SelectState } from './select-state.js';\n\nexport function isOpen<K extends SelectKey>(state: SelectState<K>): boolean {\n return state.popup === 'open';\n}\n\nexport function isDisabled<K extends SelectKey>(state: SelectState<K>): boolean {\n return state.disabled;\n}\n\nexport function isFocused<K extends SelectKey>(state: SelectState<K>): boolean {\n return state.focused;\n}\n\nexport function hasSelection<K extends SelectKey>(state: SelectState<K>): boolean {\n return state.selectedKeys.size > 0;\n}\n\nexport function isSelected<K extends SelectKey>(state: SelectState<K>, key: K): boolean {\n return state.selectedKeys.has(key);\n}\n\nexport function getSelectedKeys<K extends SelectKey>(state: SelectState<K>): K[] {\n return Array.from(state.selectedKeys);\n}\n\nexport function getActiveKey<K extends SelectKey>(state: SelectState<K>): K | null {\n return state.activeKey;\n}\n\nexport function isRegisteredKey<K extends SelectKey>(state: SelectState<K>, key: K): boolean {\n return state.registeredKeys.has(key);\n}\n","import type { SelectKey } from '../../engine/contracts.js';\nimport type { SelectEffect } from '../../engine/select-effects.js';\nimport type { SelectEvent } from '../../engine/select-events.js';\nimport type { SelectState } from '../../engine/select-state.js';\nimport { createInitialSelectState } from '../../engine/select-state.js';\nimport { transition } from '../../engine/select-machine.js';\n\nexport class SelectEngineBridge<K extends SelectKey = SelectKey> {\n private _state: SelectState<K>;\n\n constructor(initialState: SelectState<K> = createInitialSelectState<K>()) {\n this._state = initialState;\n }\n\n get state(): SelectState<K> {\n return this._state;\n }\n\n dispatch(event: SelectEvent<K>): SelectEffect<K>[] {\n const result = transition(this._state, event);\n this._state = result.state;\n return result.effects;\n }\n}\n","import type { SelectEffect } from '../../engine/select-effects.js';\n\nexport interface WebSelectContext {\n focusTrigger?: () => void;\n syncAria?: () => void;\n onPopupOpened?: () => void;\n onPopupClosed?: (reason: Extract<SelectEffect, { type: 'POPUP_CLOSED' }>['reason']) => void;\n}\n\nexport interface SelectEffectRunner {\n run(effects: readonly SelectEffect[], context: WebSelectContext): void;\n}\n\nexport class DefaultSelectEffectRunner implements SelectEffectRunner {\n run(effects: readonly SelectEffect[], context: WebSelectContext): void {\n for (const effect of effects) {\n switch (effect.type) {\n case 'FOCUS_TRIGGER':\n context.focusTrigger?.();\n break;\n case 'SYNC_ARIA':\n context.syncAria?.();\n break;\n case 'POPUP_OPENED':\n context.onPopupOpened?.();\n break;\n case 'POPUP_CLOSED':\n context.onPopupClosed?.(effect.reason);\n break;\n case 'ACTIVE_KEY_CHANGED':\n case 'SELECTION_CHANGED':\n break;\n }\n }\n }\n}\n","/**\n * Fenwick Tree (Binary Indexed Tree) for O(log n) prefix sum queries and updates.\n * Used for cumulative height calculations in variable-height virtualization.\n * \n * Space: O(n)\n * Time: O(log n) for both query and update\n * \n * @see https://en.wikipedia.org/wiki/Fenwick_tree\n */\nexport class FenwickTree {\n private tree: Float64Array;\n private size: number;\n\n constructor(size: number) {\n this.size = size;\n // 1-indexed for cleaner bit manipulation\n this.tree = new Float64Array(size + 1);\n }\n\n /**\n * Add delta to index i (0-indexed input)\n * Complexity: O(log n)\n */\n add(index: number, delta: number): void {\n // Convert to 1-indexed\n let i = index + 1;\n while (i <= this.size) {\n this.tree[i] += delta;\n // Move to next relevant index: i + LSB(i)\n i += i & -i;\n }\n }\n\n /**\n * Get prefix sum from 0 to index (inclusive, 0-indexed input)\n * Complexity: O(log n)\n */\n sum(index: number): number {\n if (index < 0) return 0;\n // Convert to 1-indexed\n let i = index + 1;\n let result = 0;\n while (i > 0) {\n result += this.tree[i];\n // Move to parent: i - LSB(i)\n i -= i & -i;\n }\n return result;\n }\n\n /**\n * Get sum in range [left, right] (inclusive, 0-indexed)\n * Complexity: O(log n)\n */\n rangeSum(left: number, right: number): number {\n if (left > right) return 0;\n return this.sum(right) - (left > 0 ? this.sum(left - 1) : 0);\n }\n\n /**\n * Update value at index to newValue (handles delta internally)\n * Requires tracking current values externally or use add() directly\n * Complexity: O(log n)\n */\n update(index: number, oldValue: number, newValue: number): void {\n this.add(index, newValue - oldValue);\n }\n\n /**\n * Binary search to find the smallest index where sum(index) >= target\n * Useful for finding scroll position -> item index mapping\n * Complexity: O(log² n) or O(log n) with optimization\n * \n * @returns index (0-indexed) or -1 if not found\n */\n lowerBound(target: number): number {\n if (target <= 0) return 0;\n\n // Optimized binary search on Fenwick tree structure\n let pos = 0;\n let sum = 0;\n // Start from highest power of 2 <= size\n let bit = 1 << Math.floor(Math.log2(this.size));\n\n while (bit > 0) {\n if (pos + bit <= this.size) {\n const nextSum = sum + this.tree[pos + bit];\n if (nextSum < target) {\n pos += bit;\n sum = nextSum;\n }\n }\n bit >>= 1;\n }\n\n // Convert back to 0-indexed\n return pos;\n }\n\n /**\n * Reset all values to 0\n * Complexity: O(n)\n */\n reset(): void {\n this.tree.fill(0);\n }\n\n /**\n * Resize the tree (useful for dynamic item lists)\n * Complexity: O(n)\n */\n resize(newSize: number): void {\n if (newSize === this.size) return;\n \n const oldTree = this.tree;\n const oldSize = this.size;\n \n this.size = newSize;\n this.tree = new Float64Array(newSize + 1);\n \n // Copy existing values up to min(oldSize, newSize)\n const copySize = Math.min(oldSize, newSize);\n for (let i = 1; i <= copySize; i++) {\n this.tree[i] = oldTree[i];\n }\n }\n\n /**\n * Get current size\n */\n getSize(): number {\n return this.size;\n }\n\n /**\n * Export state for serialization (e.g., to SharedArrayBuffer)\n */\n exportState(): { size: number; tree: number[] } {\n return {\n size: this.size,\n tree: Array.from(this.tree),\n };\n }\n\n /**\n * Import state from serialization\n */\n static fromState(state: { size: number; tree: number[] }): FenwickTree {\n const ft = new FenwickTree(state.size);\n ft.tree = new Float64Array(state.tree);\n return ft;\n }\n}\n","/**\n * DOM Node Pool with LRU eviction and aggressive cleanup.\n * Reuses nodes to minimize GC pressure and layout thrashing.\n * \n * Features:\n * - LRU eviction when pool exceeds maxSize\n * - Style reset to avoid style pollution\n * - Event listener cleanup\n * - Performance telemetry integration\n */\n\ninterface PoolNode {\n node: HTMLElement;\n lastUsed: number; // performance.now() timestamp\n inUse: boolean;\n}\n\nexport interface DOMPoolOptions {\n /** Maximum pool size (default: renderedNodes + 32) */\n maxSize?: number;\n /** Factory function to create new nodes */\n factory: () => HTMLElement;\n /** Reset function called before reuse */\n reset?: (node: HTMLElement) => void;\n /** Enable performance telemetry */\n telemetry?: boolean;\n}\n\nexport class DOMPool {\n private pool: PoolNode[] = [];\n private factory: () => HTMLElement;\n private reset: (node: HTMLElement) => void;\n private maxSize: number;\n private telemetry: boolean;\n \n // Telemetry\n private hits = 0;\n private misses = 0;\n private evictions = 0;\n\n constructor(options: DOMPoolOptions) {\n this.factory = options.factory;\n this.reset = options.reset || this.defaultReset.bind(this);\n this.maxSize = options.maxSize || 64;\n this.telemetry = options.telemetry || false;\n }\n\n /**\n * Acquire a node from pool or create new one\n * Complexity: O(n) for LRU scan, amortized O(1) for small pools\n */\n acquire(): HTMLElement {\n const now = performance.now();\n\n // Find first available node\n for (let i = 0; i < this.pool.length; i++) {\n const poolNode = this.pool[i];\n if (!poolNode.inUse) {\n poolNode.inUse = true;\n poolNode.lastUsed = now;\n this.reset(poolNode.node);\n \n if (this.telemetry) this.hits++;\n return poolNode.node;\n }\n }\n\n // No available nodes, create new one\n const node = this.factory();\n this.pool.push({\n node,\n lastUsed: now,\n inUse: true,\n });\n\n if (this.telemetry) this.misses++;\n\n // Evict if pool too large\n if (this.pool.length > this.maxSize) {\n this.evictLRU();\n }\n\n return node;\n }\n\n /**\n * Release node back to pool\n * Complexity: O(n) to find node\n */\n release(node: HTMLElement): void {\n const poolNode = this.pool.find(p => p.node === node);\n if (poolNode) {\n poolNode.inUse = false;\n poolNode.lastUsed = performance.now();\n\n if (this.pool.length > this.maxSize) {\n this.removePoolNode(poolNode);\n return;\n }\n \n // Aggressive cleanup\n this.reset(poolNode.node);\n }\n }\n\n /**\n * Evict least recently used node\n * Complexity: O(n)\n */\n private evictLRU(): boolean {\n // Find LRU node that's not in use\n let lruIndex = -1;\n let oldestTime = Infinity;\n\n for (let i = 0; i < this.pool.length; i++) {\n const poolNode = this.pool[i];\n if (!poolNode.inUse && poolNode.lastUsed < oldestTime) {\n lruIndex = i;\n oldestTime = poolNode.lastUsed;\n }\n }\n\n if (lruIndex >= 0) {\n this.removePoolNode(this.pool[lruIndex]);\n \n if (this.telemetry) this.evictions++;\n return true;\n }\n\n return false;\n }\n\n private removePoolNode(poolNode: PoolNode): void {\n const index = this.pool.indexOf(poolNode);\n if (index < 0) return;\n\n const [removed] = this.pool.splice(index, 1);\n this.deepCleanup(removed.node);\n }\n\n /**\n * Default reset: clear content, remove inline styles, remove attributes\n */\n private defaultReset(node: HTMLElement): void {\n // Clear content\n node.textContent = '';\n \n // Remove inline styles\n node.removeAttribute('style');\n \n // Remove data attributes (preserve data-index, data-selectable for delegation)\n const attrs = Array.from(node.attributes);\n for (const attr of attrs) {\n if (attr.name.startsWith('data-') && \n attr.name !== 'data-index' && \n attr.name !== 'data-selectable') {\n node.removeAttribute(attr.name);\n }\n }\n \n // Remove ARIA attributes that might pollute reuse\n const ariaAttrs = ['aria-selected', 'aria-checked', 'aria-disabled'];\n ariaAttrs.forEach(attr => node.removeAttribute(attr));\n }\n\n /**\n * Deep cleanup before eviction/destruction\n */\n private deepCleanup(node: HTMLElement): void {\n // Remove all event listeners by cloning (nuclear option)\n const clone = node.cloneNode(true) as HTMLElement;\n node.parentNode?.replaceChild(clone, node);\n \n // Clear references\n node.textContent = '';\n }\n\n /**\n * Clear entire pool\n */\n clear(): void {\n for (const poolNode of this.pool) {\n this.deepCleanup(poolNode.node);\n }\n this.pool = [];\n this.resetTelemetry();\n }\n\n /**\n * Adjust max pool size dynamically\n */\n setMaxSize(size: number): void {\n this.maxSize = size;\n // Evict excess nodes\n while (this.pool.length > this.maxSize) {\n if (!this.evictLRU()) break;\n }\n }\n\n /**\n * Get pool statistics\n */\n getStats() {\n const available = this.pool.filter(p => !p.inUse).length;\n const hitRate = this.hits + this.misses > 0 \n ? this.hits / (this.hits + this.misses) \n : 0;\n\n return {\n total: this.pool.length,\n available,\n inUse: this.pool.length - available,\n maxSize: this.maxSize,\n hits: this.hits,\n misses: this.misses,\n evictions: this.evictions,\n hitRate,\n };\n }\n\n /**\n * Reset telemetry counters\n */\n resetTelemetry(): void {\n this.hits = 0;\n this.misses = 0;\n this.evictions = 0;\n }\n}\n","import { FenwickTree } from './fenwick-tree.js';\nimport { DOMPool } from './dom-pool.js';\n\ntype ItemGetter = (index: number) => unknown;\n\nexport interface VirtualizerOptions {\n estimatedItemHeight: number;\n buffer: number;\n maxPoolExtra?: number; // extra nodes beyond window size\n measurementThreshold?: number; // px change to consider a height update\n enableTelemetry?: boolean; // enable pool stats\n}\n\nexport interface VirtualizerScrollResult {\n /** Clamped target index in the current item set. */\n index: number;\n /** Prefix-sum offset for the target item. */\n offset: number;\n /** Intended container scrollTop; the caller owns applying it to the DOM. */\n scrollTop: number;\n}\n\nexport interface VirtualizerWindow {\n startIndex: number;\n endIndex: number;\n windowSize: number;\n}\n\nexport interface VirtualizerWindowUpdate {\n window: VirtualizerWindow;\n changed: boolean;\n scrollTop: number;\n viewportHeight: number;\n}\n\nexport class Virtualizer {\n private container: HTMLElement;\n private itemsLength: number;\n private options: VirtualizerOptions;\n private readonly estimatedItemHeight: number;\n measuredHeights = new Map<number, number>();\n private measuredHeightTotal = 0;\n averageHeight: number;\n private pool: DOMPool;\n private itemGetter: ItemGetter;\n private fenwick: FenwickTree;\n private activeNodes = new Map<number, HTMLElement>(); // index -> node mapping\n private destroyed = false;\n private recycleRafId = 0;\n private intendedScrollTop = 0;\n private currentWindow: VirtualizerWindow | null = null;\n\n constructor(container: HTMLElement, itemsLength: number, itemGetter: ItemGetter, options: VirtualizerOptions) {\n this.container = container;\n this.itemsLength = itemsLength;\n this.itemGetter = itemGetter;\n this.options = options;\n this.estimatedItemHeight = options.estimatedItemHeight;\n this.averageHeight = options.estimatedItemHeight;\n \n // Initialize DOM pool with LRU eviction\n const maxPoolSize = Math.ceil((options.buffer * 2 + 10) * 1.5) + (options.maxPoolExtra ?? 32);\n this.pool = new DOMPool({\n maxSize: maxPoolSize,\n factory: () => {\n const div = document.createElement('div');\n div.setAttribute('data-selectable', '');\n return div;\n },\n reset: (node) => {\n // Clear content but preserve data-selectable\n node.textContent = '';\n node.removeAttribute('style');\n // Remove aria attributes\n node.removeAttribute('aria-selected');\n node.removeAttribute('aria-checked');\n },\n telemetry: options.enableTelemetry || false,\n });\n\n // One prefix index keeps offset, window, and scroll calculations on the\n // same measured-height policy at every list size.\n this.fenwick = this.createFenwickTree(itemsLength);\n \n this.container.style.willChange = 'transform';\n }\n\n computeWindow(scrollTop: number, viewportHeight: number) {\n const { buffer } = this.options;\n const visibleStartIndex = this.indexAtOffset(scrollTop);\n const calculatedStartIndex = visibleStartIndex - buffer;\n const startIndex = this.itemsLength > 0\n ? Math.max(0, Math.min(this.itemsLength - 1, calculatedStartIndex))\n : 0;\n const viewportEnd = Math.max(0, scrollTop + viewportHeight);\n let visibleEndIndex = this.indexAtOffset(viewportEnd);\n // The item beginning exactly at the viewport's lower edge is not visible.\n // indexAtOffset deliberately advances across exact boundaries for the\n // viewport start, so reverse that choice here when the viewport has height.\n if (\n viewportHeight > 0\n && visibleEndIndex > visibleStartIndex\n && this.cumulativeOffset(visibleEndIndex) === viewportEnd\n ) {\n visibleEndIndex -= 1;\n }\n const calculatedEndIndex = Math.max(visibleStartIndex, visibleEndIndex) + buffer;\n const endIndex = this.itemsLength > 0\n ? Math.max(0, Math.min(this.itemsLength - 1, calculatedEndIndex))\n : -1;\n const windowSize = Math.max(0, endIndex - startIndex + 1);\n \n // Adjust pool size dynamically based on window\n const newPoolSize = windowSize + (this.options.maxPoolExtra ?? 32);\n this.pool.setMaxSize(newPoolSize);\n \n return { startIndex, endIndex, windowSize };\n }\n\n /** Computes and records a scroll-derived window without installing listeners. */\n updateWindow(scrollTop: number, viewportHeight: number): VirtualizerWindowUpdate | null {\n if (this.destroyed) return null;\n\n const safeScrollTop = Number.isFinite(scrollTop) ? Math.max(0, scrollTop) : 0;\n const safeViewportHeight = Number.isFinite(viewportHeight) && viewportHeight >= 0\n ? viewportHeight\n : 0;\n const nextWindow = this.computeWindow(safeScrollTop, safeViewportHeight);\n const changed = this.currentWindow === null\n || this.currentWindow.startIndex !== nextWindow.startIndex\n || this.currentWindow.endIndex !== nextWindow.endIndex\n || this.currentWindow.windowSize !== nextWindow.windowSize;\n\n this.currentWindow = { ...nextWindow };\n return {\n window: { ...nextWindow },\n changed,\n scrollTop: safeScrollTop,\n viewportHeight: safeViewportHeight,\n };\n }\n\n /** Returns a copy of the last recorded window, or null before the first update. */\n getCurrentWindow(): VirtualizerWindow | null {\n return this.currentWindow ? { ...this.currentWindow } : null;\n }\n\n /** Finds the item containing an offset, advancing past exact item boundaries. */\n private indexAtOffset(offset: number): number {\n if (this.itemsLength <= 0) return 0;\n\n const target = Math.max(0, offset);\n let index = Math.max(0, Math.min(this.itemsLength - 1, this.fenwick.lowerBound(target)));\n\n // FenwickTree.lowerBound returns the preceding item when the target lands\n // exactly on an item boundary. For the viewport start, select the next item.\n while (index < this.itemsLength - 1 && this.cumulativeOffset(index + 1) <= target) {\n index += 1;\n }\n\n return index;\n }\n\n cumulativeOffset(index: number): number {\n if (!Number.isFinite(index)) {\n return index === Number.POSITIVE_INFINITY && this.itemsLength > 0\n ? this.fenwick.sum(this.itemsLength - 1)\n : 0;\n }\n const boundedIndex = Math.max(0, Math.min(this.itemsLength, Math.trunc(index)));\n if (boundedIndex === 0) return 0;\n return this.fenwick.sum(boundedIndex - 1);\n }\n\n /**\n * Calculates and records the intended scroll position for an item without\n * mutating the container. The caller may apply the returned scrollTop.\n * Returns null after destruction or when there are no items to target.\n */\n scrollToIndex(index: number): VirtualizerScrollResult | null {\n if (this.destroyed || this.itemsLength <= 0) return null;\n\n const requestedIndex = Number.isFinite(index) ? Math.trunc(index) : 0;\n const targetIndex = Math.max(0, Math.min(this.itemsLength - 1, requestedIndex));\n const offset = this.cumulativeOffset(targetIndex);\n this.intendedScrollTop = offset;\n\n return { index: targetIndex, offset, scrollTop: offset };\n }\n\n /**\n * Resolves a stable key against the caller's current data identity, then\n * delegates to scrollToIndex(). Invalid or out-of-range resolutions are\n * rejected rather than clamped to a different item's position.\n */\n scrollToKey<TKey>(\n key: TKey,\n resolveIndex: (key: TKey) => number | null | undefined,\n ): VirtualizerScrollResult | null {\n if (this.destroyed || this.itemsLength <= 0) return null;\n\n const index = resolveIndex(key);\n if (\n typeof index !== 'number'\n || !Number.isInteger(index)\n || index < 0\n || index >= this.itemsLength\n ) {\n return null;\n }\n\n return this.scrollToIndex(index);\n }\n\n /** Returns the last scroll position requested through scrollToIndex(). */\n getIntendedScrollTop(): number {\n return this.intendedScrollTop;\n }\n\n acquireNode(index: number): HTMLElement {\n // Check if we already have this node active (reuse)\n const existing = this.activeNodes.get(index);\n if (existing) return existing;\n \n const node = this.pool.acquire();\n node.setAttribute('data-index', String(index));\n this.activeNodes.set(index, node);\n return node;\n }\n\n releaseNode(index: number): void {\n const node = this.activeNodes.get(index);\n if (node) {\n this.pool.release(node);\n this.activeNodes.delete(index);\n }\n }\n\n releaseExcess(activeIndices: Set<number>): void {\n // Release nodes not in active set\n for (const [index, node] of this.activeNodes) {\n if (!activeIndices.has(index)) {\n this.pool.release(node);\n this.activeNodes.delete(index);\n }\n }\n }\n\n render(startIndex: number, endIndex: number, updateNode: (node: HTMLElement, item: unknown, index: number) => void) {\n if (this.destroyed) return;\n\n const frag = document.createDocumentFragment();\n const activeIndices = new Set<number>();\n \n for (let i = startIndex; i <= endIndex; i++) {\n const node = this.acquireNode(i);\n updateNode(node, this.itemGetter(i), i);\n frag.appendChild(node);\n activeIndices.add(i);\n \n // Measure on appear (deferred)\n queueMicrotask(() => {\n if (!this.destroyed) {\n this.measureOnAppear(node, i);\n }\n });\n }\n \n // Translate container by cumulative offset of startIndex\n const topOffset = this.cumulativeOffset(startIndex);\n this.container.style.transform = `translate3d(0, ${Math.round(topOffset * 100) / 100}px, 0)`;\n this.container.replaceChildren(frag);\n \n // Recycle nodes not in use\n if (this.recycleRafId) {\n cancelAnimationFrame(this.recycleRafId);\n }\n this.recycleRafId = requestAnimationFrame(() => {\n this.recycleRafId = 0;\n if (!this.destroyed) {\n this.releaseExcess(activeIndices);\n }\n });\n }\n\n measureOnAppear(node: HTMLElement, index: number) {\n this.measureItem(index, node.offsetHeight);\n }\n\n /** Records a validated measured height and updates the virtual offset index. */\n measureItem(index: number, height: number): boolean {\n if (\n this.destroyed\n || !Number.isInteger(index)\n || index < 0\n || index >= this.itemsLength\n || !Number.isFinite(height)\n || height <= 0\n ) return false;\n\n const prev = this.measuredHeights.get(index);\n const threshold = this.options.measurementThreshold ?? 5;\n\n if (prev === undefined || Math.abs(prev - height) > threshold) {\n const oldValue = prev ?? this.estimatedItemHeight;\n this.measuredHeights.set(index, height);\n this.measuredHeightTotal += height - (prev ?? 0);\n \n // Update Fenwick tree with new measurement\n this.fenwick.update(index, oldValue, height);\n \n this.updateAverageHeight();\n return true;\n }\n\n return false;\n }\n\n /**\n * Get pool statistics (if telemetry enabled)\n */\n getPoolStats() {\n return this.pool.getStats();\n }\n\n /**\n * Update items length and resize Fenwick tree if needed\n */\n setItemsLength(newLength: number): void {\n const previousLength = this.itemsLength;\n this.itemsLength = newLength;\n if (newLength !== previousLength) this.currentWindow = null;\n\n let removedMeasurement = false;\n for (const [index, height] of this.measuredHeights) {\n if (index >= newLength) {\n this.measuredHeightTotal -= height;\n this.measuredHeights.delete(index);\n removedMeasurement = true;\n }\n }\n\n if (removedMeasurement) this.updateAverageHeight();\n\n for (const index of Array.from(this.activeNodes.keys())) {\n if (index >= newLength) {\n this.releaseNode(index);\n }\n }\n \n if (newLength !== previousLength) {\n this.fenwick = this.createFenwickTree(newLength);\n }\n }\n\n /**\n * Cleanup resources\n */\n destroy(): void {\n this.destroyed = true;\n if (this.recycleRafId) {\n cancelAnimationFrame(this.recycleRafId);\n this.recycleRafId = 0;\n }\n this.pool.clear();\n this.activeNodes.clear();\n this.measuredHeights.clear();\n this.measuredHeightTotal = 0;\n this.averageHeight = this.estimatedItemHeight;\n this.currentWindow = null;\n this.fenwick.reset();\n }\n\n private updateAverageHeight(): void {\n const count = this.measuredHeights.size;\n this.averageHeight = count > 0\n ? Math.round((this.measuredHeightTotal / count) * 100) / 100\n : this.estimatedItemHeight;\n }\n\n private createFenwickTree(size: number): FenwickTree {\n const tree = new FenwickTree(size);\n for (let index = 0; index < size; index++) {\n tree.add(index, this.estimatedItemHeight);\n }\n for (const [index, height] of this.measuredHeights) {\n if (index < size) {\n tree.update(index, this.estimatedItemHeight, height);\n }\n }\n return tree;\n }\n}\n","/**\n * Custom Option Component Pool\n * \n * Manages lifecycle and recycling of custom option components for optimal performance.\n * Uses object pooling pattern to minimize allocation/deallocation overhead.\n */\n\nimport type { CustomOptionContract, CustomOptionContext, CustomOptionFactory } from '../types/custom-option.js';\n\ninterface PooledComponent {\n instance: CustomOptionContract;\n inUse: boolean;\n lastUsedIndex: number;\n}\n\n/**\n * Manages a pool of reusable custom option component instances\n */\nexport class CustomOptionPool {\n private _pool: Map<CustomOptionFactory, PooledComponent[]> = new Map();\n private _maxPoolSize: number;\n private _activeComponents: Map<number, CustomOptionContract> = new Map();\n \n constructor(maxPoolSize = 50) {\n this._maxPoolSize = maxPoolSize;\n }\n \n /**\n * Get or create a component instance for the given index\n * \n * @param factory - Factory function to create new instances\n * @param item - The data item\n * @param index - The option index\n * @param context - Context for mounting\n * @param container - DOM container for mounting\n * @returns Component instance\n */\n acquire(\n factory: CustomOptionFactory,\n item: unknown,\n index: number,\n context: CustomOptionContext,\n container: HTMLElement\n ): CustomOptionContract {\n this.release(index);\n \n // Try to find an available component in the pool\n const pooled = this._findAvailableComponent(factory);\n \n let component: CustomOptionContract;\n \n if (pooled) {\n // Reuse pooled component\n component = pooled.instance;\n } else {\n // Create new component\n try {\n component = factory(item, index);\n } catch (error) {\n console.error(`[CustomOptionPool] Failed to create component:`, error);\n throw error;\n }\n }\n \n // Mount the component\n try {\n component.mountOption(container, context);\n if (pooled) {\n pooled.inUse = true;\n pooled.lastUsedIndex = index;\n } else {\n this._addToPool(factory, component, index);\n }\n this._activeComponents.set(index, component);\n } catch (error) {\n if (pooled) {\n pooled.inUse = false;\n }\n try {\n component.unmountOption();\n } catch {\n // ignore cleanup failures after a mount failure\n }\n console.error(`[CustomOptionPool] Failed to mount component at index ${index}:`, error);\n throw error;\n }\n \n return component;\n }\n \n /**\n * Release a component back to the pool\n * \n * @param index - The index of the component to release\n */\n release(index: number): void {\n const component = this._activeComponents.get(index);\n if (!component) return;\n \n try {\n component.unmountOption();\n } catch (error) {\n console.error(`[CustomOptionPool] Failed to unmount component at index ${index}:`, error);\n }\n \n this._activeComponents.delete(index);\n \n // Mark as available in pool\n for (const pool of this._pool.values()) {\n const pooled = pool.find(p => p.instance === component);\n if (pooled) {\n pooled.inUse = false;\n break;\n }\n }\n }\n \n /**\n * Release all active components\n */\n releaseAll(): void {\n const indices = Array.from(this._activeComponents.keys());\n indices.forEach(index => this.release(index));\n }\n \n /**\n * Update selection state for a component\n * \n * @param index - The index of the component\n * @param selected - Whether it's selected\n */\n updateSelection(index: number, selected: boolean): void {\n const component = this._activeComponents.get(index);\n if (component) {\n component.updateSelected(selected);\n }\n }\n \n /**\n * Update focused state for a component\n * \n * @param index - The index of the component\n * @param focused - Whether it has keyboard focus\n */\n updateFocused(index: number, focused: boolean): void {\n const component = this._activeComponents.get(index);\n if (component && component.updateFocused) {\n component.updateFocused(focused);\n }\n }\n \n /**\n * Get active component at index\n * \n * @param index - The option index\n * @returns The component instance or undefined\n */\n getComponent(index: number): CustomOptionContract | undefined {\n return this._activeComponents.get(index);\n }\n \n /**\n * Clear the entire pool\n */\n clear(): void {\n this.releaseAll();\n this._pool.clear();\n }\n \n /**\n * Get pool statistics for debugging\n */\n getStats(): { totalPooled: number; activeComponents: number; availableComponents: number } {\n let totalPooled = 0;\n let availableComponents = 0;\n \n for (const pool of this._pool.values()) {\n totalPooled += pool.length;\n availableComponents += pool.filter(p => !p.inUse).length;\n }\n \n return {\n totalPooled,\n activeComponents: this._activeComponents.size,\n availableComponents\n };\n }\n \n /**\n * Find an available component in the pool\n */\n private _findAvailableComponent(factory: CustomOptionFactory): PooledComponent | undefined {\n const pool = this._pool.get(factory);\n if (!pool) return undefined;\n \n return pool.find(p => !p.inUse);\n }\n\n private _addToPool(factory: CustomOptionFactory, component: CustomOptionContract, index: number): void {\n while (this._getTotalPooled() >= this._maxPoolSize) {\n if (!this._evictAvailableComponent()) return;\n }\n\n const pool = this._pool.get(factory) || [];\n pool.push({\n instance: component,\n inUse: true,\n lastUsedIndex: index\n });\n this._pool.set(factory, pool);\n }\n\n private _evictAvailableComponent(): boolean {\n for (const [factory, pool] of this._pool.entries()) {\n const index = pool.findIndex(p => !p.inUse);\n if (index < 0) continue;\n\n pool.splice(index, 1);\n\n if (pool.length === 0) {\n this._pool.delete(factory);\n }\n return true;\n }\n\n return false;\n }\n\n private _getTotalPooled(): number {\n let total = 0;\n for (const pool of this._pool.values()) {\n total += pool.length;\n }\n return total;\n }\n}\n","/**\n * Option Renderer\n * \n * Unified renderer that handles both lightweight (label/value) and \n * custom component rendering with consistent performance characteristics.\n */\n\nimport type { \n CustomOptionContract, \n CustomOptionContext, \n CustomOptionFactory, \n ExtendedSelectItem \n} from '../types/custom-option';\nimport { CustomOptionPool } from './custom-option-pool';\n\nexport interface OptionRendererConfig {\n enableRecycling: boolean;\n maxPoolSize: number;\n getValue: (item: unknown) => unknown;\n getLabel: (item: unknown) => string;\n getDisabled?: (item: unknown) => boolean;\n onSelect: (index: number) => void;\n onCustomEvent?: (index: number, eventName: string, data: unknown) => void;\n onError?: (index: number, error: Error) => void;\n}\n\n/**\n * Manages rendering of both lightweight and custom component options\n */\nexport class OptionRenderer {\n private _config: OptionRendererConfig;\n private _pool: CustomOptionPool;\n private _mountedElements: Map<number, HTMLElement> = new Map();\n \n constructor(config: OptionRendererConfig) {\n this._config = config;\n this._pool = new CustomOptionPool(config.maxPoolSize);\n }\n \n /**\n * Render an option (lightweight or custom component)\n * \n * @param item - The data item\n * @param index - The option index\n * @param isSelected - Whether the option is selected\n * @param isFocused - Whether the option has keyboard focus\n * @param uniqueId - Unique ID for the select instance\n * @returns The rendered DOM element\n */\n render(\n item: unknown,\n index: number,\n isSelected: boolean,\n isFocused: boolean,\n uniqueId: string\n ): HTMLElement {\n const extendedItem = item as ExtendedSelectItem;\n const value = this._config.getValue(item);\n const label = this._config.getLabel(item);\n const isDisabled = this._config.getDisabled ? this._config.getDisabled(item) : false;\n\n this.unmount(index);\n \n // Determine if this is a custom component or lightweight option\n const hasCustomComponent = extendedItem.optionComponent && typeof extendedItem.optionComponent === 'function';\n \n if (hasCustomComponent) {\n return this._renderCustomComponent(\n item,\n index,\n value,\n label,\n isSelected,\n isFocused,\n isDisabled,\n uniqueId,\n extendedItem.optionComponent!\n );\n } else {\n return this._renderLightweightOption(\n item,\n index,\n value,\n label,\n isSelected,\n isFocused,\n isDisabled,\n uniqueId\n );\n }\n }\n \n /**\n * Update selection state for an option\n * \n * @param index - The option index\n * @param selected - Whether it's selected\n */\n updateSelection(index: number, selected: boolean): void {\n const element = this._mountedElements.get(index);\n if (!element) return;\n \n // Check if this is a custom component\n const component = this._pool.getComponent(index);\n if (component) {\n component.updateSelected(selected);\n } else {\n // Update lightweight option\n if (selected) {\n element.classList.add('selected');\n element.setAttribute('aria-selected', 'true');\n } else {\n element.classList.remove('selected');\n element.setAttribute('aria-selected', 'false');\n }\n }\n }\n \n /**\n * Update focused state for an option\n * \n * @param index - The option index\n * @param focused - Whether it has keyboard focus\n */\n updateFocused(index: number, focused: boolean): void {\n const element = this._mountedElements.get(index);\n if (!element) return;\n \n // Check if this is a custom component\n const component = this._pool.getComponent(index);\n if (component) {\n if (component.updateFocused) {\n component.updateFocused(focused);\n }\n // Also update the element's focused class for styling\n element.classList.toggle('focused', focused);\n } else {\n // Update lightweight option\n element.classList.toggle('focused', focused);\n }\n }\n \n /**\n * Unmount and cleanup an option\n * \n * @param index - The option index\n */\n unmount(index: number): void {\n // Release custom component if exists\n this._pool.release(index);\n \n // Remove from mounted elements\n this._mountedElements.delete(index);\n }\n \n /**\n * Unmount all options\n */\n unmountAll(): void {\n this._pool.releaseAll();\n this._mountedElements.clear();\n }\n \n /**\n * Get pool statistics\n */\n getStats() {\n return this._pool.getStats();\n }\n \n /**\n * Render a lightweight option (traditional label/value)\n */\n private _renderLightweightOption(\n item: unknown,\n index: number,\n value: unknown,\n label: string,\n isSelected: boolean,\n isFocused: boolean,\n isDisabled: boolean,\n uniqueId: string\n ): HTMLElement {\n const option = document.createElement('div');\n option.className = 'option';\n if (isSelected) option.classList.add('selected');\n if (isFocused) option.classList.add('focused');\n if (isDisabled) option.classList.add('disabled');\n \n option.id = `${uniqueId}-option-${index}`;\n option.textContent = label;\n option.dataset.value = String(value);\n option.dataset.index = String(index);\n option.dataset.mode = 'lightweight';\n option.setAttribute('role', 'option');\n option.setAttribute('aria-selected', String(isSelected));\n if (isDisabled) {\n option.setAttribute('aria-disabled', 'true');\n }\n \n // Click handler\n if (!isDisabled) {\n option.addEventListener('click', () => {\n this._config.onSelect(index);\n });\n }\n \n this._mountedElements.set(index, option);\n \n \n return option;\n }\n \n /**\n * Render a custom component option\n */\n private _renderCustomComponent(\n item: unknown,\n index: number,\n value: unknown,\n label: string,\n isSelected: boolean,\n isFocused: boolean,\n isDisabled: boolean,\n uniqueId: string,\n factory: CustomOptionFactory\n ): HTMLElement {\n // Create wrapper container for the custom component\n const wrapper = document.createElement('div');\n wrapper.className = 'option option-custom';\n if (isSelected) wrapper.classList.add('selected');\n if (isFocused) wrapper.classList.add('focused');\n if (isDisabled) wrapper.classList.add('disabled');\n \n wrapper.id = `${uniqueId}-option-${index}`;\n wrapper.dataset.value = String(value);\n wrapper.dataset.index = String(index);\n wrapper.dataset.mode = 'component';\n wrapper.setAttribute('role', 'option');\n wrapper.setAttribute('aria-selected', String(isSelected));\n wrapper.setAttribute('aria-label', label); // Accessibility fallback\n if (isDisabled) {\n wrapper.setAttribute('aria-disabled', 'true');\n }\n \n // Create context for the custom component\n const context: CustomOptionContext = {\n item,\n index,\n value,\n label,\n isSelected,\n isFocused,\n isDisabled,\n onSelect: (idx: number) => {\n if (!isDisabled) {\n this._config.onSelect(idx);\n }\n },\n onCustomEvent: (eventName: string, data: unknown) => {\n if (this._config.onCustomEvent) {\n this._config.onCustomEvent(index, eventName, data);\n }\n }\n };\n \n // Acquire component from pool and mount it\n try {\n const component = this._pool.acquire(factory, item, index, context, wrapper);\n \n // Get the component's root element and attach click handler to wrapper\n const componentElement = component.getElement();\n \n if (!isDisabled) {\n // Use event delegation on the wrapper\n wrapper.addEventListener('click', (e) => {\n // Only trigger if clicking within the component\n if (wrapper.contains(e.target as Node)) {\n this._config.onSelect(index);\n }\n });\n }\n \n \n } catch (error) {\n console.error(`[OptionRenderer] Failed to render custom component at index ${index}:`, error);\n \n // Fallback to lightweight rendering on error\n wrapper.innerHTML = '';\n wrapper.textContent = label;\n wrapper.classList.add('component-error');\n \n if (this._config.onError) {\n this._config.onError(index, error as Error);\n }\n }\n \n this._mountedElements.set(index, wrapper);\n \n return wrapper;\n }\n}\n","import type {\n NativeSelectOptions,\n SelectEventName,\n SelectEventsDetailMap,\n RendererHelpers,\n} from \"../types.js\";\nimport {\n createRendererHelpers,\n OptionRenderer,\n OptionTemplate,\n renderTemplate,\n} from \"../renderers/contracts.js\";\nimport { Virtualizer } from \"../utils/virtualizer\";\nimport { OptionRenderer as UnifiedOptionRenderer } from \"../utils/option-renderer\";\nimport type { OptionRendererConfig } from \"../utils/option-renderer\";\n\nexport class NativeSelectElement extends HTMLElement {\n static get observedAttributes(): string[] {\n return [\"placement\", \"strategy\", \"portal\"];\n }\n\n private _options: NativeSelectOptions = {};\n private _shadow: ShadowRoot;\n private _listRoot: HTMLElement;\n private _items: unknown[] = [];\n private _helpers: RendererHelpers;\n private _virtualizer?: Virtualizer;\n private _unifiedRenderer?: UnifiedOptionRenderer;\n\n // Multi-select & interaction state\n private _selectedSet = new Set<number>(); // indices\n private _selectedItems = new Map<number, unknown>(); // index -> item\n private _activeIndex = -1;\n private _multi = false;\n private _typeBuffer = \"\";\n private _typeTimeout?: number;\n private _announceTimeout?: number;\n private _liveRegion?: HTMLElement;\n\n constructor() {\n super();\n this._shadow = this.attachShadow({ mode: \"open\" });\n this._listRoot = document.createElement(\"div\");\n this._listRoot.setAttribute(\"role\", \"listbox\");\n this._listRoot.setAttribute(\"tabindex\", \"0\");\n this._shadow.appendChild(this._listRoot);\n\n // Live region for screen reader announcements\n this._liveRegion = document.createElement(\"div\");\n this._liveRegion.setAttribute(\"role\", \"status\");\n this._liveRegion.setAttribute(\"aria-live\", \"polite\");\n this._liveRegion.style.cssText =\n \"position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;\";\n this._shadow.appendChild(this._liveRegion);\n\n this._helpers = createRendererHelpers((item, index) =>\n this._onSelect(item, index),\n );\n\n // Delegated click\n this._listRoot.addEventListener(\"click\", (e) => {\n const el = (e.target as HTMLElement).closest(\n \"[data-selectable]\",\n ) as HTMLElement | null;\n if (!el) return;\n const idx = Number(el.dataset.index);\n const item = this._items[idx];\n this._onSelect(item, idx);\n });\n\n // Keyboard navigation\n this._listRoot.addEventListener(\"keydown\", (e) => this._onKeydown(e));\n }\n\n connectedCallback() {\n // Initialize ARIA roles and open event\n this._listRoot.setAttribute(\"role\", \"listbox\");\n this._listRoot.setAttribute(\"aria-label\", \"Options list\");\n if (this._multi)\n this._listRoot.setAttribute(\"aria-multiselectable\", \"true\");\n this._initializeOptionRenderer();\n this._emit(\"open\", {});\n }\n\n disconnectedCallback() {\n this._emit(\"close\", {});\n // Cleanup unified renderer\n if (this._unifiedRenderer) {\n this._unifiedRenderer.unmountAll();\n }\n this._virtualizer?.destroy();\n this._virtualizer = undefined;\n // Cleanup: remove listeners if any were added outside constructor\n if (this._typeTimeout) window.clearTimeout(this._typeTimeout);\n if (this._announceTimeout) window.clearTimeout(this._announceTimeout);\n }\n\n private _initializeOptionRenderer(): void {\n this._unifiedRenderer?.unmountAll();\n\n const getValue = (item: unknown) => (item as any)?.value ?? item;\n const getLabel = (item: unknown) => (item as any)?.label ?? String(item);\n const getDisabled = (item: unknown) => (item as any)?.disabled ?? false;\n\n const rendererConfig: OptionRendererConfig = {\n enableRecycling: true,\n maxPoolSize: 100,\n getValue,\n getLabel,\n getDisabled,\n onSelect: (index: number) => {\n const item = this._items[index];\n this._onSelect(item, index);\n },\n onCustomEvent: (index: number, eventName: string, data: unknown) => {\n // Emit custom events from option components\n this.dispatchEvent(\n new CustomEvent(\"option:custom-event\", {\n detail: { index, eventName, data },\n bubbles: true,\n composed: true,\n }),\n );\n },\n onError: (index: number, error: Error) => {\n console.error(`[NativeSelect] Error in option ${index}:`, error);\n this.dispatchEvent(\n new CustomEvent(\"option:mount-error\", {\n detail: { index, error },\n bubbles: true,\n composed: true,\n }),\n );\n },\n };\n\n this._unifiedRenderer = new UnifiedOptionRenderer(rendererConfig);\n }\n\n attributeChangedCallback(\n name: string,\n _oldValue: string | null,\n newValue: string | null,\n ) {\n switch (name) {\n case \"placement\":\n this._options.placement = (newValue ??\n undefined) as NativeSelectOptions[\"placement\"];\n break;\n case \"strategy\":\n this._options.strategy = (newValue ??\n undefined) as NativeSelectOptions[\"strategy\"];\n break;\n case \"portal\":\n this._options.portal =\n newValue === \"true\" ? true : newValue === \"false\" ? false : undefined;\n break;\n }\n }\n\n set items(items: unknown[]) {\n this._items = items ?? [];\n // initialize virtualizer with estimated height (default 48) and buffer\n this._virtualizer?.destroy();\n this._virtualizer = new Virtualizer(\n this._listRoot,\n this._items.length,\n (i) => this._items[i],\n { estimatedItemHeight: 48, buffer: 5 },\n );\n this.render();\n }\n\n get items() {\n return this._items;\n }\n\n set multi(value: boolean) {\n this._multi = value;\n if (value) {\n this._listRoot.setAttribute(\"aria-multiselectable\", \"true\");\n } else {\n this._listRoot.removeAttribute(\"aria-multiselectable\");\n }\n }\n\n get multi() {\n return this._multi;\n }\n\n get selectedIndices(): number[] {\n return Array.from(this._selectedSet);\n }\n\n get selectedItems(): unknown[] {\n return Array.from(this._selectedItems.values());\n }\n\n set optionTemplate(template: OptionTemplate | undefined) {\n this._options.optionTemplate = template;\n this.render();\n }\n\n set optionRenderer(renderer: OptionRenderer | undefined) {\n this._options.optionRenderer = renderer;\n this.render();\n }\n\n /**\n * Public API: setItems() method for compatibility with EnhancedSelect\n * Accepts an array of items which can be:\n * - Simple primitives (string, number)\n * - Objects with {label, value} structure\n * - Objects with {label, value, optionComponent} for custom rendering (v1.2.0+)\n */\n setItems(items: unknown[]): void {\n this.items = items ?? [];\n }\n\n /**\n * Public API: setValue() method to programmatically select an item\n * For single select: clears selection and selects the item matching the value\n * For multi-select: adds to selection if not already selected\n */\n setValue(value: unknown): void {\n if (value === null || value === undefined || value === \"\") {\n // Clear selection\n this._selectedSet.clear();\n this._selectedItems.clear();\n this._activeIndex = -1;\n this.render();\n return;\n }\n\n // Find item by value\n const index = this._items.findIndex((item) => {\n if (typeof item === \"object\" && item !== null && \"value\" in item) {\n return (item as any).value === value;\n }\n return item === value;\n });\n\n if (index >= 0) {\n const item = this._items[index];\n if (!this._multi) {\n // Single select: clear and set\n this._selectedSet.clear();\n this._selectedItems.clear();\n }\n this._selectedSet.add(index);\n this._selectedItems.set(index, item);\n this._activeIndex = index;\n this.render();\n }\n }\n\n /**\n * Public API: getValue() method to get currently selected value(s)\n * Returns single value for single-select, array for multi-select\n */\n getValue(): unknown | unknown[] {\n // Optimized: single-pass iteration, no intermediate arrays\n const values: unknown[] = [];\n for (const item of this._selectedItems.values()) {\n if (typeof item === \"object\" && item !== null && \"value\" in item) {\n values.push((item as any).value);\n } else {\n values.push(item);\n }\n }\n\n return this._multi ? values : (values[0] ?? null);\n }\n\n render() {\n const { optionTemplate, optionRenderer } = this._options;\n const viewportHeight = this.getBoundingClientRect().height || 300;\n const scrollTop = this.scrollTop || 0;\n\n // Update aria-activedescendant\n if (this._activeIndex >= 0) {\n this._listRoot.setAttribute(\n \"aria-activedescendant\",\n `option-${this._activeIndex}`,\n );\n } else {\n this._listRoot.removeAttribute(\"aria-activedescendant\");\n }\n\n // Check if any items have custom components\n const hasCustomComponents = this._items.some(\n (item) =>\n typeof item === \"object\" &&\n item !== null &&\n Object.prototype.hasOwnProperty.call(item, \"optionComponent\") &&\n typeof (item as any).optionComponent === \"function\",\n );\n\n // Use unified renderer if we have custom components\n if (hasCustomComponents && this._unifiedRenderer) {\n this._listRoot.replaceChildren(); // Clear existing content\n const frag = document.createDocumentFragment();\n\n for (let i = 0; i < this._items.length; i++) {\n const item = this._items[i];\n const isSelected = this._selectedSet.has(i);\n const isFocused = this._activeIndex === i;\n\n const optionElement = this._unifiedRenderer.render(\n item,\n i,\n isSelected,\n isFocused,\n `native-${this.getAttribute(\"id\") || \"default\"}`,\n );\n\n frag.appendChild(optionElement);\n }\n\n this._listRoot.appendChild(frag);\n return;\n }\n\n // Fall back to original rendering logic for lightweight options\n if (this._virtualizer) {\n const { startIndex, endIndex } = this._virtualizer.computeWindow(\n scrollTop,\n viewportHeight,\n );\n this._virtualizer.render(startIndex, endIndex, (node, item, i) => {\n this._applyOptionAttrs(node, i);\n if (optionRenderer) {\n const el = optionRenderer(item, i, this._helpers);\n // replace node contents\n node.replaceChildren(el);\n } else if (optionTemplate) {\n const wrapper = document.createElement(\"div\");\n wrapper.innerHTML = optionTemplate(item, i);\n const el = wrapper.firstElementChild as HTMLElement | null;\n node.replaceChildren(el ?? document.createTextNode(String(item)));\n } else {\n // Handle {label, value} objects or primitives\n const displayText =\n typeof item === \"object\" && item !== null && \"label\" in item\n ? String((item as any).label)\n : String(item);\n node.textContent = displayText;\n }\n });\n return;\n }\n const frag = document.createDocumentFragment();\n for (let i = 0; i < this._items.length; i++) {\n const item = this._items[i];\n if (optionRenderer) {\n const el = optionRenderer(item, i, this._helpers);\n if (!el.hasAttribute(\"data-selectable\")) {\n el.setAttribute(\"data-selectable\", \"\");\n el.setAttribute(\"data-index\", String(i));\n }\n this._applyOptionAttrs(el, i);\n frag.appendChild(el);\n } else if (optionTemplate) {\n // Fast path: render all via DocumentFragment in one call\n renderTemplate(this._listRoot, this._items, optionTemplate);\n // Apply ARIA attrs after template render\n this._applyAriaToAll();\n return; // rendering complete\n } else {\n const el = document.createElement(\"div\");\n // Handle {label, value} objects or primitives\n const displayText =\n typeof item === \"object\" && item !== null && \"label\" in item\n ? String((item as any).label)\n : String(item);\n el.textContent = displayText;\n el.setAttribute(\"data-selectable\", \"\");\n el.setAttribute(\"data-index\", String(i));\n this._applyOptionAttrs(el, i);\n frag.appendChild(el);\n }\n }\n this._listRoot.replaceChildren(frag);\n }\n\n private _applyOptionAttrs(node: HTMLElement, index: number) {\n node.setAttribute(\"role\", \"option\");\n node.id = `option-${index}`;\n if (this._selectedSet.has(index)) {\n node.setAttribute(\"aria-selected\", \"true\");\n } else {\n node.setAttribute(\"aria-selected\", \"false\");\n }\n }\n\n private _applyAriaToAll() {\n const children = Array.from(this._listRoot.children) as HTMLElement[];\n for (const child of children) {\n const idx = Number(child.dataset.index);\n if (Number.isFinite(idx)) this._applyOptionAttrs(child, idx);\n }\n }\n\n private _emit<K extends SelectEventName>(\n name: K,\n detail: SelectEventsDetailMap[K],\n ) {\n this.dispatchEvent(new CustomEvent(name, { detail, bubbles: true }));\n }\n\n // Multi-select and interaction methods\n private _onSelect(item: unknown, index: number) {\n if (this._multi) {\n if (this._selectedSet.has(index)) {\n this._selectedSet.delete(index);\n this._selectedItems.delete(index);\n } else {\n this._selectedSet.add(index);\n this._selectedItems.set(index, item);\n }\n } else {\n this._selectedSet.clear();\n this._selectedItems.clear();\n this._selectedSet.add(index);\n this._selectedItems.set(index, item);\n }\n this._activeIndex = index;\n this.render();\n\n // Emit with all required fields\n const selected = this._selectedSet.has(index);\n const value = (item as any)?.value ?? item;\n const label = (item as any)?.label ?? String(item);\n\n this._emit(\"select\", {\n item,\n index,\n value,\n label,\n selected,\n multi: this._multi,\n });\n\n // Optimized: single-pass iteration for change event data\n const selectedItems: unknown[] = [];\n const selectedValues: unknown[] = [];\n for (const item of this._selectedItems.values()) {\n selectedItems.push(item);\n selectedValues.push((item as any)?.value ?? item);\n }\n\n // Emit 'change' event for better React compatibility\n this._emit(\"change\", {\n selectedItems,\n selectedValues,\n selectedIndices: Array.from(this._selectedSet),\n });\n\n this._announce(`Selected ${label}`);\n }\n\n private _onKeydown(e: KeyboardEvent) {\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault();\n this._moveActive(1);\n break;\n case \"ArrowUp\":\n e.preventDefault();\n this._moveActive(-1);\n break;\n case \"Home\":\n e.preventDefault();\n this._setActive(0);\n break;\n case \"End\":\n e.preventDefault();\n this._setActive(this._items.length - 1);\n break;\n case \"PageDown\":\n e.preventDefault();\n this._moveActive(10);\n break;\n case \"PageUp\":\n e.preventDefault();\n this._moveActive(-10);\n break;\n case \"Enter\":\n case \" \":\n e.preventDefault();\n if (this._activeIndex >= 0) {\n const item = this._items[this._activeIndex];\n this._onSelect(item, this._activeIndex);\n }\n break;\n case \"Escape\":\n e.preventDefault();\n this._emit(\"close\", {});\n break;\n default:\n // Type-ahead buffer\n if (e.key.length === 1 && !e.ctrlKey && !e.altKey && !e.metaKey) {\n this._onType(e.key);\n }\n break;\n }\n }\n\n private _moveActive(delta: number) {\n const next = Math.max(\n 0,\n Math.min(this._items.length - 1, this._activeIndex + delta),\n );\n this._setActive(next);\n }\n\n private _setActive(index: number) {\n this._activeIndex = index;\n this.render();\n this._scrollToActive();\n this._announce(`Navigated to ${String(this._items[index])}`);\n }\n\n private _scrollToActive() {\n const el = this._shadow.getElementById(`option-${this._activeIndex}`);\n el?.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n }\n\n private _onType(char: string) {\n if (this._typeTimeout) window.clearTimeout(this._typeTimeout);\n this._typeBuffer += char.toLowerCase();\n this._typeTimeout = window.setTimeout(() => {\n this._typeBuffer = \"\";\n }, 400);\n\n // Find first matching item\n const match = this._items.findIndex((item) =>\n String(item).toLowerCase().startsWith(this._typeBuffer),\n );\n if (match >= 0) {\n this._setActive(match);\n }\n }\n\n private _announce(msg: string) {\n if (this._liveRegion) {\n this._liveRegion.textContent = msg;\n if (this._announceTimeout) window.clearTimeout(this._announceTimeout);\n this._announceTimeout = window.setTimeout(() => {\n this._announceTimeout = undefined;\n if (this._liveRegion) this._liveRegion.textContent = \"\";\n }, 1000);\n }\n }\n\n // Focus management\n focus() {\n this._listRoot.focus();\n }\n}\n\nif (!customElements.get(\"smilodon-select\")) {\n customElements.define(\"smilodon-select\", NativeSelectElement);\n}\n","/**\n * Global Configuration System for Select Components\n * Allows users to define default behaviors that can be overridden at component level\n */\n\nimport type { KnownLimitationId, LimitationPolicy } from '../types/limitation.js';\n\ntype ScrollToSelectedBehavior = 'auto' | 'instant' | 'smooth';\ntype ScrollToSelectedBlock = 'start' | 'center' | 'end' | 'nearest';\n\nexport interface ScrollToSelectedConfig {\n /** Whether to scroll to selected item when dropdown opens/closes */\n enabled: boolean;\n /** Which selected item to scroll to in multi-select mode: 'first' | 'last' */\n multiSelectTarget: 'first' | 'last';\n /** Scroll behavior */\n behavior?: ScrollToSelectedBehavior;\n /** Scroll block alignment */\n block?: ScrollToSelectedBlock;\n}\n\nexport interface LoadMoreConfig {\n /** Enable load more functionality */\n enabled: boolean;\n /** Number of items to load per increment */\n itemsPerLoad: number;\n /** Threshold (in pixels from bottom) to trigger auto-load */\n threshold?: number;\n /** Show loading indicator */\n showLoader?: boolean;\n}\n\nexport interface BusyBucketConfig {\n /** Enable busy/loading state bucket */\n enabled: boolean;\n /** Show spinner in bucket */\n showSpinner?: boolean;\n /** Custom loading message */\n message?: string;\n /** Minimum display time (ms) to prevent flashing */\n minDisplayTime?: number;\n}\n\nexport interface ExpandableConfig {\n /** Enable expandable dropdown height */\n enabled: boolean;\n /** Height when collapsed (default) */\n collapsedHeight?: string;\n /** Height when expanded */\n expandedHeight?: string;\n /** Label for the expand button */\n expandLabel?: string;\n /** Label for the collapse button */\n collapseLabel?: string;\n}\n\nexport interface DropdownPlacementConfig {\n /** Preferred dropdown placement mode */\n mode: 'bottom' | 'top' | 'auto';\n}\n\nexport type SelectDirection = 'ltr' | 'rtl';\n\nexport interface ClearControlConfig {\n /** Enable clear control button inside input container */\n enabled: boolean;\n /** Clear selected values when button is clicked */\n clearSelection?: boolean;\n /** Clear search query when button is clicked */\n clearSearch?: boolean;\n /** Hide clear control when there is nothing to clear */\n hideWhenEmpty?: boolean;\n /** Accessible label for clear control */\n ariaLabel?: string;\n /** Text/icon content shown inside the clear control */\n icon?: string;\n}\n\nexport interface SelectionConfig {\n /** Single or multi-select mode */\n mode: 'single' | 'multi';\n /** Allow deselection in single-select mode */\n allowDeselect?: boolean;\n /** Control how visually disabled (dimmed) options behave */\n disabledOptionBehavior?: DisabledOptionBehaviorConfig;\n /** Maximum selections in multi-select (0 = unlimited) */\n maxSelections?: number;\n /** Show remove button on selected options in multi-select */\n showRemoveButton?: boolean;\n /** Show the selected-state side indicator on lightweight/custom-rendered options */\n showSelectedIndicator?: boolean;\n /** Custom icon/markup for multi-select remove buttons (chips and selected option remove buttons) */\n removeButtonIcon?: string;\n /** Close dropdown after selection in single-select */\n closeOnSelect?: boolean;\n /** Allow repeated trigger clicks to toggle the dropdown open/closed */\n toggleOnTriggerClick?: boolean;\n}\n\nexport interface DisabledOptionBehaviorConfig {\n /** Allow visually disabled options to be selected */\n selectable?: boolean;\n /** Allow visually disabled options to receive hover styling */\n hoverable?: boolean;\n /** Allow visually disabled options to receive keyboard active/focus styling */\n focusable?: boolean;\n}\n\nexport interface MultiSelectDisplayConfig {\n /** Layout mode for selected chips in multi-select mode */\n mode: 'wrap' | 'vertical' | 'horizontal';\n /** Maximum visible height of the selected-chip area */\n maxHeight?: string;\n /** Horizontal overflow behavior for the chip area */\n overflowX?: 'auto' | 'scroll' | 'hidden';\n /** Vertical overflow behavior for the chip area */\n overflowY?: 'auto' | 'scroll' | 'hidden';\n /** Enable drag-to-scroll interactions in horizontal mode */\n dragScroll?: boolean;\n}\n\n/**\n * Plain CSS style object for component part configuration.\n * Accepts standard CSS properties and custom properties (e.g. `--select-*`).\n */\nexport type StyleObject = Record<string, string | number | undefined>;\n\nexport interface StyleConfig {\n /** Container styles */\n container?: StyleObject;\n /** Dropdown styles */\n dropdown?: StyleObject;\n /** Option item styles */\n option?: StyleObject;\n /** Selected option styles */\n selectedOption?: StyleObject;\n /** Disabled option styles */\n disabledOption?: StyleObject;\n /** Hover option styles */\n hoverOption?: StyleObject;\n /** Active option styles */\n activeOption?: StyleObject;\n /** Selected indicator bar styles for lightweight/custom-rendered options */\n selectedIndicator?: StyleObject;\n /** Input field styles */\n input?: StyleObject;\n /** Multi-select badge styles */\n badge?: StyleObject;\n /** Multi-select badge hover styles */\n badgeHover?: StyleObject;\n /** Multi-select badge active styles */\n badgeActive?: StyleObject;\n /** Multi-select badge label styles */\n badgeLabel?: StyleObject;\n /** Multi-select badge remove button styles */\n badgeRemove?: StyleObject;\n /** Multi-select badge remove icon styles */\n badgeRemoveIcon?: StyleObject;\n /** Multi-select badge remove button hover styles */\n badgeRemoveHover?: StyleObject;\n /** Multi-select badge remove button active styles */\n badgeRemoveActive?: StyleObject;\n /** Group header styles */\n groupHeader?: StyleObject;\n /** Loading indicator styles */\n loader?: StyleObject;\n /** Custom CSS class names */\n classNames?: {\n container?: string;\n dropdown?: string;\n option?: string;\n selectedOption?: string;\n disabledOption?: string;\n activeOption?: string;\n input?: string;\n loader?: string;\n removeButton?: string;\n badge?: string;\n badgeLabel?: string;\n badgeRemove?: string;\n badgeRemoveIcon?: string;\n groupHeader?: string;\n };\n}\n\nexport interface ServerSideConfig {\n /** Enable server-side data management */\n enabled: boolean;\n /** Initial selected value(s) from server */\n initialSelectedValues?: unknown[];\n /** Initial selected indices from server */\n initialSelectedIndices?: number[];\n /** Function to fetch pre-selected items not in current page */\n fetchSelectedItems?: (values: unknown[]) => Promise<unknown[]>;\n /** Value accessor function */\n getValueFromItem?: (item: unknown) => unknown;\n /** Label accessor function */\n getLabelFromItem?: (item: unknown) => string;\n}\n\nexport interface InfiniteScrollConfig {\n /** Enable infinite scroll */\n enabled: boolean;\n /** Page size for pagination */\n pageSize: number;\n /** Initial page */\n initialPage?: number;\n /** Cache loaded pages */\n cachePages?: boolean;\n /** Maximum cached pages (LRU eviction) */\n maxCachedPages?: number;\n /** Preload adjacent pages */\n preloadAdjacent?: boolean;\n /** Scroll restoration strategy for selected items on distant pages */\n scrollRestoration?: 'auto' | 'manual' | 'disabled';\n}\n\nexport interface CallbackConfig {\n /** Called when option is selected/deselected */\n onSelect?: (data: { item: unknown; index: number; value: unknown; label: string; selected: boolean }) => void;\n /** Called when dropdown opens */\n onOpen?: () => void;\n /** Called when dropdown closes */\n onClose?: () => void;\n /** Called when search query changes */\n onSearch?: (query: string) => void;\n /** Called when more items are loaded */\n onLoadMore?: (page: number) => void;\n /** Called when selection changes */\n onChange?: (selectedItems: unknown[], selectedValues: unknown[]) => void;\n /** Called when clear control is used */\n onClear?: (detail: { clearedSelection: boolean; clearedSearch: boolean }) => void;\n /** Called on error */\n onError?: (error: Error) => void;\n}\n\nexport interface TrackingConfig {\n /** Master switch for runtime tracking */\n enabled: boolean;\n /** Track emitted events */\n events: boolean;\n /** Track styling-related changes */\n styling: boolean;\n /** Track limitations and policy changes */\n limitations: boolean;\n /** Emit `diagnostic` events for tracking entries */\n emitDiagnostics: boolean;\n /** Maximum retained entries per tracking channel */\n maxEntries: number;\n}\n\nexport interface LimitationsConfig {\n /** Policy map for known limitations */\n policies: Partial<Record<KnownLimitationId, LimitationPolicy>>;\n /** Auto-reset selection state when mode changes single <-> multi */\n autoMitigateRuntimeModeSwitch: boolean;\n}\n\nexport interface GlobalSelectConfig {\n /** Selection behavior */\n selection: SelectionConfig;\n /** Text and layout direction for the select */\n direction: SelectDirection;\n /** Dropdown placement behavior */\n dropdownPlacement: DropdownPlacementConfig;\n /** Multi-select chip display behavior */\n multiSelectDisplay: MultiSelectDisplayConfig;\n /** Scroll to selected configuration */\n scrollToSelected: ScrollToSelectedConfig;\n /** Load more configuration */\n loadMore: LoadMoreConfig;\n /** Busy bucket configuration */\n busyBucket: BusyBucketConfig;\n /** Style customization */\n styles: StyleConfig;\n /** Server-side configuration */\n serverSide: ServerSideConfig;\n /** Infinite scroll configuration */\n infiniteScroll: InfiniteScrollConfig;\n /** Expandable dropdown configuration */\n expandable: ExpandableConfig;\n /** Clear control button configuration */\n clearControl: ClearControlConfig;\n /** Callbacks */\n callbacks: CallbackConfig;\n /** Runtime tracking controls */\n tracking: TrackingConfig;\n /** Known limitations controls */\n limitations: LimitationsConfig;\n /** Enable/disable entire component */\n enabled: boolean;\n /** Enable search/filter */\n searchable?: boolean;\n /** Placeholder text */\n placeholder?: string;\n /** Legacy chunked rendering toggle for large flat EnhancedSelect lists; not viewport windowing. */\n virtualize?: boolean;\n /** Estimated row height used by the guarded EnhancedSelect viewport-windowing test path. */\n estimatedItemHeight?: number;\n}\n\n/**\n * Default global configuration\n */\nconst defaultConfig: GlobalSelectConfig = {\n selection: {\n mode: 'single',\n allowDeselect: false,\n disabledOptionBehavior: {\n selectable: false,\n hoverable: false,\n focusable: false,\n },\n maxSelections: 0,\n showRemoveButton: true,\n showSelectedIndicator: true,\n removeButtonIcon: '×',\n closeOnSelect: true,\n toggleOnTriggerClick: true,\n },\n direction: 'ltr',\n dropdownPlacement: {\n mode: 'bottom',\n },\n multiSelectDisplay: {\n mode: 'wrap',\n maxHeight: '160px',\n overflowX: 'hidden',\n overflowY: 'auto',\n dragScroll: true,\n },\n scrollToSelected: {\n enabled: true,\n multiSelectTarget: 'first',\n behavior: 'smooth',\n block: 'nearest',\n },\n loadMore: {\n enabled: false,\n itemsPerLoad: 3,\n threshold: 100,\n showLoader: true,\n },\n busyBucket: {\n enabled: true,\n showSpinner: true,\n message: 'Loading...',\n minDisplayTime: 200,\n },\n styles: {\n classNames: {},\n },\n serverSide: {\n enabled: false,\n getValueFromItem: (item: unknown) => (item as any)?.value ?? item,\n getLabelFromItem: (item: unknown) => (item as any)?.label ?? String(item),\n },\n infiniteScroll: {\n enabled: false,\n pageSize: 20,\n initialPage: 1,\n cachePages: true,\n maxCachedPages: 10,\n preloadAdjacent: true,\n scrollRestoration: 'auto',\n },\n expandable: {\n enabled: false,\n collapsedHeight: '300px',\n expandedHeight: '500px',\n expandLabel: 'Show more',\n collapseLabel: 'Show less',\n },\n clearControl: {\n enabled: false,\n clearSelection: true,\n clearSearch: true,\n hideWhenEmpty: true,\n ariaLabel: 'Clear selection and search',\n icon: '×',\n },\n callbacks: {},\n tracking: {\n enabled: false,\n events: true,\n styling: true,\n limitations: true,\n emitDiagnostics: false,\n maxEntries: 200,\n },\n limitations: {\n policies: {},\n autoMitigateRuntimeModeSwitch: true,\n },\n enabled: true,\n searchable: false,\n placeholder: 'Select an option...',\n virtualize: true,\n estimatedItemHeight: 48,\n};\n\n/**\n * Global configuration instance\n */\nclass SelectConfigManager {\n private config: GlobalSelectConfig;\n\n constructor() {\n this.config = this.deepClone(defaultConfig);\n }\n\n /**\n * Get current global configuration\n */\n getConfig(): Readonly<GlobalSelectConfig> {\n return this.config;\n }\n\n /**\n * Update global configuration (deep merge)\n */\n updateConfig(updates: Partial<GlobalSelectConfig>): void {\n this.config = this.deepMerge(this.config, updates);\n }\n\n /**\n * Reset to default configuration\n */\n resetConfig(): void {\n this.config = this.deepClone(defaultConfig);\n }\n\n /**\n * Merge component-level config with global config\n * Component-level config takes precedence\n */\n mergeWithComponentConfig(componentConfig: Partial<GlobalSelectConfig>): GlobalSelectConfig {\n return this.deepMerge(this.deepClone(this.config), componentConfig);\n }\n\n private deepClone<T>(obj: T): T {\n return JSON.parse(JSON.stringify(obj));\n }\n\n private deepMerge<T extends Record<string, any>>(target: T, source: Partial<T>): T {\n const result: any = { ...target };\n \n // PERF: Avoid for...in, use Object.keys for predictable iteration\n const keys = Object.keys(source);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n const sourceValue = (source as any)[key];\n const targetValue = result[key];\n \n if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {\n result[key] = this.deepMerge(\n targetValue && typeof targetValue === 'object' ? targetValue : {},\n sourceValue\n );\n } else {\n result[key] = sourceValue;\n }\n }\n }\n \n return result as T;\n }\n}\n\n/**\n * Singleton instance\n */\nexport const selectConfig = new SelectConfigManager();\n\n/**\n * Helper function to configure select globally\n */\nexport function configureSelect(config: Partial<GlobalSelectConfig>): void {\n selectConfig.updateConfig(config);\n}\n\n/**\n * Helper function to reset select configuration\n */\nexport function resetSelectConfig(): void {\n selectConfig.resetConfig();\n}\n","import type {\n DataLoadingConfigIssue,\n DataLoadingConfigValidationResult,\n ResolvedDataLoadingConfig,\n} from './public-types.js';\n\nconst DEFAULT_CONFIG: ResolvedDataLoadingConfig = {\n protocol: 'legacy',\n searchMode: 'local',\n paginationMode: 'page',\n firstPage: 1,\n};\n\nconst ALLOWED_FIELDS = new Set([\n 'protocol',\n 'searchMode',\n 'paginationMode',\n 'firstPage',\n 'fetchLimit',\n]);\n\nfunction issue(path: string, code: DataLoadingConfigIssue['code'], message: string): DataLoadingConfigIssue {\n return { path, code, message };\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return false;\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\nfunction validatePositiveSafeInteger(\n candidate: Record<string, unknown>,\n key: 'firstPage' | 'fetchLimit',\n issues: DataLoadingConfigIssue[],\n): void {\n const value = candidate[key];\n if (value === undefined) return;\n if (typeof value !== 'number') {\n issues.push(issue(key, 'invalid-type', `${key} must be a number.`));\n return;\n }\n if (!Number.isSafeInteger(value) || value <= 0) {\n issues.push(issue(key, 'invalid-positive-integer', `${key} must be a positive safe integer.`));\n }\n}\n\n/** Validate a complete effective per-instance data-loading configuration. */\nexport function validateDataLoadingConfig(candidate: unknown): DataLoadingConfigValidationResult {\n if (!isRecord(candidate)) {\n return {\n valid: false,\n issues: [issue('dataLoading', 'invalid-type', 'dataLoading must be a plain object.')],\n };\n }\n\n const issues: DataLoadingConfigIssue[] = [];\n for (const key of Object.keys(candidate).filter((candidateKey) => !ALLOWED_FIELDS.has(candidateKey)).sort()) {\n issues.push(issue(key, 'unknown-field', `Unknown dataLoading field: ${key}.`));\n }\n\n const protocolValue = candidate.protocol;\n const protocol = protocolValue === undefined ? DEFAULT_CONFIG.protocol : protocolValue;\n if (typeof protocol !== 'string') {\n issues.push(issue('protocol', 'invalid-type', 'protocol must be a string.'));\n } else if (protocol !== 'legacy' && protocol !== 'acknowledged') {\n issues.push(issue('protocol', 'invalid-value', 'protocol must be legacy or acknowledged.'));\n }\n\n const searchModeValue = candidate.searchMode;\n const searchMode = searchModeValue === undefined ? DEFAULT_CONFIG.searchMode : searchModeValue;\n if (typeof searchMode !== 'string') {\n issues.push(issue('searchMode', 'invalid-type', 'searchMode must be a string.'));\n } else if (searchMode !== 'local' && searchMode !== 'remote' && searchMode !== 'hybrid') {\n issues.push(issue('searchMode', 'invalid-value', 'searchMode must be local, remote, or hybrid.'));\n }\n\n const paginationModeValue = candidate.paginationMode;\n const paginationMode = paginationModeValue === undefined ? DEFAULT_CONFIG.paginationMode : paginationModeValue;\n if (typeof paginationMode !== 'string') {\n issues.push(issue('paginationMode', 'invalid-type', 'paginationMode must be a string.'));\n } else if (paginationMode !== 'page' && paginationMode !== 'cursor') {\n issues.push(issue('paginationMode', 'invalid-value', 'paginationMode must be page or cursor.'));\n }\n\n validatePositiveSafeInteger(candidate, 'firstPage', issues);\n validatePositiveSafeInteger(candidate, 'fetchLimit', issues);\n\n if (protocol === 'legacy' && (searchMode === 'remote' || searchMode === 'hybrid')) {\n issues.push(issue('searchMode', 'requires-acknowledged-protocol', 'Remote and hybrid search require the acknowledged protocol.'));\n }\n if (protocol === 'legacy' && paginationMode === 'cursor') {\n issues.push(issue('paginationMode', 'requires-acknowledged-protocol', 'Cursor pagination requires the acknowledged protocol.'));\n }\n\n if (issues.length > 0) return { valid: false, issues };\n\n const resolved: ResolvedDataLoadingConfig = {\n protocol: protocol as ResolvedDataLoadingConfig['protocol'],\n searchMode: searchMode as ResolvedDataLoadingConfig['searchMode'],\n paginationMode: paginationMode as ResolvedDataLoadingConfig['paginationMode'],\n firstPage: candidate.firstPage === undefined ? DEFAULT_CONFIG.firstPage : candidate.firstPage as number,\n ...(candidate.fetchLimit === undefined ? {} : { fetchLimit: candidate.fetchLimit as number }),\n };\n\n return { valid: true, value: resolved };\n}\n","/**\n * Pure identity and viewport helpers for virtualization. This module models\n * logical keys and caller-supplied render state; it never inspects the DOM.\n */\nexport interface VirtualizationScope<TKey> {\n dataKeys: readonly TKey[];\n filteredKeys: readonly TKey[];\n registeredKeys: readonly TKey[];\n windowKeys: readonly TKey[];\n mountedKeys: readonly TKey[];\n selectedKeys: ReadonlySet<TKey>;\n activeKey: TKey | null;\n}\n\nexport type VirtualizationScopeViolation =\n | 'filtered-key-missing-from-data'\n | 'registered-key-not-filtered'\n | 'viewport-key-not-filtered'\n | 'mounted-key-not-in-viewport';\n\nexport type AriaActiveDescendantEligibility<TKey> =\n | { available: true; key: TKey; optionId: string }\n | { available: false; key: TKey | null; optionId: null };\n\nexport interface ScrollToKeyIntent<TKey> {\n type: 'SCROLL_TO_KEY';\n key: TKey;\n}\n\nexport interface ScrollToIndexIntent<TGeneration extends string | number> {\n type: 'SCROLL_TO_INDEX';\n index: number;\n dataGeneration: TGeneration;\n}\n\n/** Returns whether a selected key remains in the filtered result set. */\nexport function isSelectedKeyVisible<TKey>(\n scope: VirtualizationScope<TKey>,\n key: TKey,\n): boolean {\n return scope.selectedKeys.has(key) && scope.filteredKeys.includes(key);\n}\n\n/** True only when the authoritative active key has a currently mounted target. */\nexport function isActiveKeyMounted<TKey>(scope: VirtualizationScope<TKey>): boolean {\n return scope.activeKey !== null && scope.mountedKeys.includes(scope.activeKey);\n}\n\n/**\n * Produces active-descendant eligibility from mounted keys and caller-provided\n * IDs. A registered or windowed key alone is not a mounted DOM target.\n */\nexport function getAriaActiveDescendantEligibility<TKey>(\n scope: VirtualizationScope<TKey>,\n optionIds: ReadonlyMap<TKey, string>,\n): AriaActiveDescendantEligibility<TKey> {\n const key = scope.activeKey;\n const optionId = key === null || !scope.mountedKeys.includes(key) ? undefined : optionIds.get(key);\n\n if (key !== null && optionId?.trim()) {\n return { available: true, key, optionId };\n }\n\n return { available: false, key, optionId: null };\n}\n\n/** Copies selected identity without pruning keys absent from the current viewport. */\nexport function preserveSelectionAcrossWindow<TKey>(\n selectedKeys: ReadonlySet<TKey>,\n _windowKeys: readonly TKey[],\n): Set<TKey> {\n return new Set(selectedKeys);\n}\n\n/** Resolves the key's current index, so reorder never reuses a stale index. */\nexport function resolveKeyIndex<TKey>(keys: readonly TKey[], key: TKey): number {\n return keys.indexOf(key);\n}\n\n/**\n * Returns keys in the half-open index range [startIndex, endIndex), clamped to\n * the source. Bounds are truncated to integers; an end before start is empty.\n */\nexport function computeWindowKeys<TKey>(\n filteredKeys: readonly TKey[],\n startIndex: number,\n endIndex: number,\n): TKey[] {\n const start = Math.max(0, Math.min(filteredKeys.length, Math.trunc(startIndex)));\n const end = Math.max(start, Math.min(filteredKeys.length, Math.trunc(endIndex)));\n return filteredKeys.slice(start, end);\n}\n\n/** Creates a DOM-free request to bring a stable key into the rendered range. */\nexport function createScrollToKeyIntent<TKey>(key: TKey): ScrollToKeyIntent<TKey> {\n return { type: 'SCROLL_TO_KEY', key };\n}\n\n/** Creates an index request tied to the data generation that defined it. */\nexport function createScrollToIndexIntent<TGeneration extends string | number>(\n index: number,\n dataGeneration: TGeneration,\n): ScrollToIndexIntent<TGeneration> {\n return { type: 'SCROLL_TO_INDEX', index, dataGeneration };\n}\n\n/** Lists violated subset relationships without changing the supplied scope. */\nexport function getVirtualizationScopeViolations<TKey>(\n scope: VirtualizationScope<TKey>,\n): VirtualizationScopeViolation[] {\n const dataKeys = new Set(scope.dataKeys);\n const filteredKeys = new Set(scope.filteredKeys);\n const windowKeys = new Set(scope.windowKeys);\n const violations: VirtualizationScopeViolation[] = [];\n\n if (scope.filteredKeys.some((key) => !dataKeys.has(key))) {\n violations.push('filtered-key-missing-from-data');\n }\n if (scope.registeredKeys.some((key) => !filteredKeys.has(key))) {\n violations.push('registered-key-not-filtered');\n }\n if (scope.windowKeys.some((key) => !filteredKeys.has(key))) {\n violations.push('viewport-key-not-filtered');\n }\n if (scope.mountedKeys.some((key) => !windowKeys.has(key))) {\n violations.push('mounted-key-not-in-viewport');\n }\n\n return violations;\n}\n","import type { SelectKey } from './contracts.js';\nimport type { SelectState } from './select-state.js';\n\nexport type AccessibilityPopupRole = 'listbox';\n\nexport interface AccessibilityLabelState {\n labelId?: string | null;\n labelledBy?: readonly string[];\n describedBy?: readonly string[];\n ariaLabel?: string | null;\n ariaDescription?: string | null;\n}\n\nexport interface AccessibilityValidationState {\n required: boolean;\n invalid: boolean;\n errorMessage?: string | null;\n errorDescriptionId?: string | null;\n}\n\nexport interface AccessibilityComboboxState<TKey extends SelectKey = SelectKey> {\n expanded: boolean;\n disabled: boolean;\n readonly: boolean;\n searchable: boolean;\n multiple: boolean;\n required: boolean;\n invalid: boolean;\n busy: boolean;\n activeKey: TKey | null;\n selectedKeys: ReadonlySet<TKey>;\n disabledKeys: ReadonlySet<TKey>;\n popupRole: AccessibilityPopupRole;\n label: AccessibilityLabelState;\n validation: AccessibilityValidationState;\n}\n\nexport interface ComboboxAccessibilityIntent<TKey extends SelectKey = SelectKey> {\n role: 'combobox';\n expanded: boolean;\n disabled: boolean;\n readonly: boolean;\n autocomplete: 'none' | 'list';\n multiple: boolean;\n required: boolean;\n invalid: boolean;\n activeKey: TKey | null;\n controlsId: string | null;\n labelledBy: readonly string[];\n describedBy: readonly string[];\n ariaLabel: string | null;\n ariaDescription: string | null;\n}\n\nexport interface ListboxAccessibilityIntent {\n role: AccessibilityPopupRole;\n multiple: boolean;\n busy: boolean;\n labelledBy: readonly string[];\n ariaLabel: string | null;\n}\n\nexport interface OptionAccessibilityIntent<TKey extends SelectKey = SelectKey> {\n key: TKey;\n selected: boolean;\n disabled: boolean;\n active: boolean;\n}\n\nexport interface AccessibilityAnnouncementIntent {\n politeness: 'polite' | 'assertive';\n message: string;\n}\n\nexport interface AccessibilityFocusIntent {\n target: 'input' | 'clear-button' | 'active-option' | 'none';\n reason: string;\n}\n\nexport type AccessibilityEffect<TKey extends SelectKey = SelectKey> =\n | (ComboboxAccessibilityIntent<TKey> & { type: 'SYNC_COMBOBOX_ARIA' })\n | (ListboxAccessibilityIntent & { type: 'SYNC_LISTBOX_ARIA' })\n | (OptionAccessibilityIntent<TKey> & { type: 'SYNC_OPTION_ARIA' })\n | ({ type: 'ANNOUNCE' } & AccessibilityAnnouncementIntent)\n | ({ type: 'FOCUS_INTENT' } & AccessibilityFocusIntent);\n\nexport interface AccessibilityEffectOptions<TKey extends SelectKey = SelectKey> {\n /** A caller-provided target ID; the engine never generates DOM IDs. */\n controlsId?: string | null;\n /** Keys of options the caller wants accessibility intent for. */\n optionKeys: readonly TKey[];\n announcements?: readonly AccessibilityAnnouncementIntent[];\n focusIntents?: readonly AccessibilityFocusIntent[];\n}\n\nexport interface AccessibilityStateContext {\n readonly?: boolean;\n searchable?: boolean;\n invalid?: boolean;\n label?: AccessibilityLabelState;\n errorMessage?: string | null;\n errorDescriptionId?: string | null;\n}\n\n/** Projects existing engine state into accessibility semantics without DOM data. */\nexport function deriveAccessibilityState<TKey extends SelectKey>(\n state: SelectState<TKey>,\n context: AccessibilityStateContext = {},\n): AccessibilityComboboxState<TKey> {\n const required = state.selection.required;\n const invalid = context.invalid ?? false;\n\n return {\n expanded: state.popup === 'open',\n disabled: state.disabled,\n readonly: context.readonly ?? false,\n searchable: context.searchable ?? false,\n multiple: state.selection.multiple,\n required,\n invalid,\n busy: state.dataStatus === 'loading',\n activeKey: state.activeKey,\n selectedKeys: state.selectedKeys,\n disabledKeys: state.selection.disabledKeys,\n popupRole: 'listbox',\n label: context.label ?? {},\n validation: {\n required,\n invalid,\n errorMessage: context.errorMessage ?? null,\n errorDescriptionId: context.errorDescriptionId ?? null,\n },\n };\n}\n\nfunction uniqueIds(ids: readonly (string | null | undefined)[]): string[] {\n return [...new Set(ids.filter((id): id is string => Boolean(id)))];\n}\n\nfunction getLabelledBy(label: AccessibilityLabelState): string[] {\n return uniqueIds([label.labelId, ...(label.labelledBy ?? [])]);\n}\n\nfunction getDescribedBy<TKey extends SelectKey>(state: AccessibilityComboboxState<TKey>): string[] {\n return uniqueIds([\n ...(state.label.describedBy ?? []),\n state.validation.errorDescriptionId,\n ]);\n}\n\n/** Computes combobox semantics without reading from or writing to the DOM. */\nexport function computeComboboxAccessibility<TKey extends SelectKey>(\n state: AccessibilityComboboxState<TKey>,\n controlsId: string | null = null,\n): ComboboxAccessibilityIntent<TKey> {\n return {\n role: 'combobox',\n expanded: state.expanded,\n disabled: state.disabled,\n readonly: state.readonly,\n autocomplete: state.searchable ? 'list' : 'none',\n multiple: state.multiple,\n required: state.required,\n invalid: state.invalid,\n activeKey: state.activeKey,\n controlsId,\n labelledBy: getLabelledBy(state.label),\n describedBy: getDescribedBy(state),\n ariaLabel: state.label.ariaLabel ?? null,\n ariaDescription: state.label.ariaDescription ?? null,\n };\n}\n\n/** Computes listbox semantics; the supplied label IDs remain caller-owned data. */\nexport function computeListboxAccessibility<TKey extends SelectKey>(\n state: AccessibilityComboboxState<TKey>,\n): ListboxAccessibilityIntent {\n return {\n role: state.popupRole,\n multiple: state.multiple,\n busy: state.busy,\n labelledBy: getLabelledBy(state.label),\n ariaLabel: state.label.ariaLabel ?? null,\n };\n}\n\n/** Computes one option's semantic state from stable identity, never its index. */\nexport function computeOptionAccessibility<TKey extends SelectKey>(\n state: AccessibilityComboboxState<TKey>,\n key: TKey,\n): OptionAccessibilityIntent<TKey> {\n const disabled = state.disabled || state.disabledKeys.has(key);\n return {\n key,\n selected: state.selectedKeys.has(key),\n disabled,\n active: !disabled && state.activeKey === key,\n };\n}\n\n/**\n * Produces semantic accessibility effects. IDs and rendered option keys are\n * caller inputs; this function does not inspect the DOM or perform side effects.\n */\nexport function computeAccessibilityEffects<TKey extends SelectKey>(\n state: AccessibilityComboboxState<TKey>,\n options: AccessibilityEffectOptions<TKey>,\n): AccessibilityEffect<TKey>[] {\n return [\n {\n type: 'SYNC_COMBOBOX_ARIA',\n ...computeComboboxAccessibility(state, options.controlsId ?? null),\n },\n {\n type: 'SYNC_LISTBOX_ARIA',\n ...computeListboxAccessibility(state),\n },\n ...options.optionKeys.map((key): AccessibilityEffect<TKey> => ({\n type: 'SYNC_OPTION_ARIA',\n ...computeOptionAccessibility(state, key),\n })),\n ...(options.announcements ?? []).map((announcement): AccessibilityEffect<TKey> => ({\n type: 'ANNOUNCE',\n ...announcement,\n })),\n ...(options.focusIntents ?? []).map((focusIntent): AccessibilityEffect<TKey> => ({\n type: 'FOCUS_INTENT',\n ...focusIntent,\n })),\n ];\n}\n","import type { SelectKey } from '../../engine/contracts.js';\nimport type { AccessibilityEffect } from '../../engine/accessibility.js';\n\nexport interface WebAccessibilityTargets<TKey extends SelectKey = SelectKey> {\n combobox?: HTMLElement | null;\n listbox?: HTMLElement | null;\n getOptionByKey?: (key: TKey) => HTMLElement | null;\n liveRegion?: HTMLElement | null;\n focusTargets?: {\n input?: HTMLElement | null;\n clearButton?: HTMLElement | null;\n getActiveOption?: () => HTMLElement | null;\n };\n}\n\nexport interface ApplyAccessibilityEffectOptions {\n /** Focus is opt-in so applying semantic state does not add focus behavior. */\n applyFocus?: boolean;\n}\n\nfunction setBooleanAttribute(element: HTMLElement, name: string, value: boolean): void {\n element.setAttribute(name, String(value));\n}\n\nfunction setOptionalAttribute(element: HTMLElement, name: string, value: string | null): void {\n if (value) {\n element.setAttribute(name, value);\n } else {\n element.removeAttribute(name);\n }\n}\n\nfunction setIdListAttribute(element: HTMLElement, name: string, ids: readonly string[]): void {\n setOptionalAttribute(element, name, ids.length > 0 ? ids.join(' ') : null);\n}\n\nfunction applyCombobox<TKey extends SelectKey>(\n effect: Extract<AccessibilityEffect<TKey>, { type: 'SYNC_COMBOBOX_ARIA' }>,\n targets: WebAccessibilityTargets<TKey>,\n): void {\n const combobox = targets.combobox;\n if (!combobox) return;\n\n combobox.setAttribute('role', effect.role);\n setBooleanAttribute(combobox, 'aria-expanded', effect.expanded);\n setBooleanAttribute(combobox, 'aria-disabled', effect.disabled);\n setBooleanAttribute(combobox, 'aria-readonly', effect.readonly);\n setBooleanAttribute(combobox, 'aria-required', effect.required);\n setBooleanAttribute(combobox, 'aria-invalid', effect.invalid);\n combobox.setAttribute('aria-autocomplete', effect.autocomplete);\n setOptionalAttribute(combobox, 'aria-controls', effect.controlsId);\n setIdListAttribute(combobox, 'aria-labelledby', effect.labelledBy);\n setIdListAttribute(combobox, 'aria-describedby', effect.describedBy);\n setOptionalAttribute(combobox, 'aria-label', effect.ariaLabel);\n setOptionalAttribute(combobox, 'aria-description', effect.ariaDescription);\n\n const activeOption = effect.activeKey == null\n ? null\n : targets.getOptionByKey?.(effect.activeKey) ?? null;\n setOptionalAttribute(combobox, 'aria-activedescendant', activeOption?.id || null);\n}\n\nfunction applyListbox<TKey extends SelectKey>(\n effect: Extract<AccessibilityEffect<TKey>, { type: 'SYNC_LISTBOX_ARIA' }>,\n targets: WebAccessibilityTargets<TKey>,\n): void {\n const listbox = targets.listbox;\n if (!listbox) return;\n\n listbox.setAttribute('role', effect.role);\n if (effect.multiple) listbox.setAttribute('aria-multiselectable', 'true');\n else listbox.removeAttribute('aria-multiselectable');\n if (effect.busy) listbox.setAttribute('aria-busy', 'true');\n else listbox.removeAttribute('aria-busy');\n setIdListAttribute(listbox, 'aria-labelledby', effect.labelledBy);\n setOptionalAttribute(listbox, 'aria-label', effect.ariaLabel);\n}\n\nfunction applyOption<TKey extends SelectKey>(\n effect: Extract<AccessibilityEffect<TKey>, { type: 'SYNC_OPTION_ARIA' }>,\n targets: WebAccessibilityTargets<TKey>,\n): void {\n const option = targets.getOptionByKey?.(effect.key);\n if (!option) return;\n\n option.setAttribute('role', 'option');\n setBooleanAttribute(option, 'aria-selected', effect.selected);\n if (effect.disabled) option.setAttribute('aria-disabled', 'true');\n else option.removeAttribute('aria-disabled');\n}\n\nfunction applyFocusIntent<TKey extends SelectKey>(\n target: 'input' | 'clear-button' | 'active-option' | 'none',\n targets: WebAccessibilityTargets<TKey>,\n options: ApplyAccessibilityEffectOptions,\n): void {\n if (!options.applyFocus || target === 'none') return;\n\n const focusTarget = target === 'input'\n ? targets.focusTargets?.input\n : target === 'clear-button'\n ? targets.focusTargets?.clearButton\n : targets.focusTargets?.getActiveOption?.();\n focusTarget?.focus();\n}\n\n/** Applies engine accessibility effects to caller-owned web DOM targets. */\nexport function applyAccessibilityEffects<TKey extends SelectKey>(\n effects: readonly AccessibilityEffect<TKey>[],\n targets: WebAccessibilityTargets<TKey>,\n options: ApplyAccessibilityEffectOptions = {},\n): void {\n for (const effect of effects) {\n switch (effect.type) {\n case 'SYNC_COMBOBOX_ARIA':\n applyCombobox(effect, targets);\n break;\n case 'SYNC_LISTBOX_ARIA':\n applyListbox(effect, targets);\n break;\n case 'SYNC_OPTION_ARIA':\n applyOption(effect, targets);\n break;\n case 'ANNOUNCE':\n if (targets.liveRegion) {\n targets.liveRegion.setAttribute('aria-live', effect.politeness);\n targets.liveRegion.setAttribute('aria-atomic', 'true');\n targets.liveRegion.textContent = effect.message;\n }\n break;\n case 'FOCUS_INTENT':\n applyFocusIntent(effect.target, targets, options);\n break;\n }\n }\n}\n","/**\n * Independent Option Component\n * High cohesion, low coupling - handles its own selection state and events\n */\n\nimport type { DisabledOptionBehaviorConfig } from '../config/global-config.js';\nimport { ClassMap } from '../types.js';\n\nexport interface OptionConfig {\n /** The data item this option represents */\n item: unknown;\n /** The index of this option */\n index: number;\n /** Optional custom id for aria-activedescendant */\n id?: string;\n /** Whether this option is selected */\n selected: boolean;\n /** Whether this option is disabled */\n disabled?: boolean;\n /** Behavior overrides for visually disabled options */\n disabledBehavior?: DisabledOptionBehaviorConfig;\n /** Whether this option is focused/active */\n active?: boolean;\n /** Custom value accessor */\n getValue?: (item: unknown) => unknown;\n /** Custom label accessor */\n getLabel?: (item: unknown) => string;\n /** Custom renderer */\n render?: (item: unknown, index: number) => HTMLElement | string;\n /** Custom style */\n style?: Record<string, string | number | undefined>;\n /** Custom class names */\n className?: string;\n /** Class map for state classes */\n classMap?: ClassMap;\n /** Show remove button (for multi-select) */\n showRemoveButton?: boolean;\n /** Custom icon/markup for the remove button */\n removeButtonIcon?: string;\n}\n\nexport interface OptionEventDetail {\n item: unknown;\n index: number;\n value: unknown;\n label: string;\n selected: boolean;\n}\n\nexport class SelectOption extends HTMLElement {\n private _config: OptionConfig;\n private _shadow: ShadowRoot;\n private _container: HTMLElement;\n private _removeButton?: HTMLButtonElement;\n private _hasRendered = false;\n\n constructor(config: OptionConfig) {\n super();\n this._config = config;\n this._shadow = this.attachShadow({ mode: 'open' });\n this._container = document.createElement('div');\n this._container.className = 'option-container';\n \n this._initializeStyles();\n // NOTE: _render() moved to connectedCallback to comply with Web Components spec\n // (cannot mutate host element attributes/classes in constructor)\n this._attachEventListeners();\n \n this._shadow.appendChild(this._container);\n }\n\n connectedCallback(): void {\n this._ensureRendered();\n }\n\n private _ensureRendered(): void {\n if (this._hasRendered) return;\n this._render();\n this._hasRendered = true;\n }\n\n /**\n * Ensure option content is rendered. Called by EnhancedSelect after append\n * when connectedCallback timing is unreliable (Vue/Nuxt, jsdom, Teleport).\n */\n ensureRendered(): void {\n this._ensureRendered();\n }\n\n private _initializeStyles(): void {\n const style = document.createElement('style');\n style.textContent = `\n :host {\n display: block;\n position: relative;\n font: inherit;\n color: var(--select-option-color, var(--select-text-color, #1f2937));\n background: var(--select-option-bg, var(--select-dropdown-bg, var(--select-bg, white)));\n border: var(--select-option-border, none);\n border-bottom: var(--select-option-border-bottom, none);\n border-radius: var(--select-option-border-radius, var(--select-radius-sm, 6px));\n box-shadow: var(--select-option-shadow, none);\n transform: var(--select-option-transform, none);\n transition: var(--select-option-transition, background-color 0.2s ease);\n }\n\n :host(:hover:not(.smilodon-option--disabled):not([aria-disabled=\"true\"])),\n :host(.smilodon-option--disabled-hoverable:hover) {\n background: var(--select-option-hover-bg, #f0f0f0);\n color: var(--select-option-hover-color, var(--select-option-color, var(--select-text-color, #1f2937)));\n outline: var(--select-option-hover-border, none);\n outline-offset: -1px;\n box-shadow: var(--select-option-hover-shadow, var(--select-option-shadow, none));\n }\n\n /* Keep the visual surface on the host so external utility classes applied\n through classMap can override selected/active/disabled styles in both\n light and dark themes. */\n :host([aria-selected=\"true\"]),\n :host(.smilodon-option--selected) {\n background: var(--select-option-selected-bg, #e3f2fd);\n color: var(--select-option-selected-color, #1976d2);\n border: var(--select-option-selected-border, var(--select-option-border, none));\n border-bottom: var(--select-option-selected-border-bottom, var(--select-option-border-bottom, none));\n border-radius: var(--select-option-selected-border-radius, var(--select-option-border-radius, 0));\n box-shadow: var(--select-option-selected-shadow, var(--select-option-shadow, none));\n transform: var(--select-option-selected-transform, var(--select-option-transform, none));\n }\n\n :host([aria-selected=\"true\"]:hover),\n :host(.smilodon-option--selected:hover) {\n background: var(--select-option-selected-hover-bg, var(--select-option-selected-bg, #e3f2fd));\n color: var(--select-option-selected-hover-color, var(--select-option-selected-color, #1976d2));\n outline: var(--select-option-selected-hover-border, var(--select-option-hover-border, none));\n outline-offset: -1px;\n box-shadow: var(--select-option-selected-hover-shadow, var(--select-option-selected-shadow, var(--select-option-shadow, none)));\n }\n\n :host(.smilodon-option--active):not(.smilodon-option--disabled):not([aria-disabled=\"true\"]),\n :host(.smilodon-option--active.smilodon-option--disabled-focusable) {\n background: var(--select-option-active-bg, var(--select-option-hover-bg, #f0f0f0));\n color: var(--select-option-active-color, var(--select-option-hover-color, var(--select-option-color, var(--select-text-color, #1f2937))));\n border: var(--select-option-active-border, var(--select-option-hover-border, var(--select-option-border, none)));\n box-shadow: var(--select-option-active-shadow, var(--select-option-shadow, none));\n transform: var(--select-option-active-transform, var(--select-option-transform, none));\n outline: var(--select-option-active-outline, none);\n outline-offset: var(--select-option-active-outline-offset, -2px);\n }\n\n :host(.smilodon-option--disabled),\n :host([aria-disabled=\"true\"]) {\n background: var(--select-option-disabled-bg, var(--select-option-bg, var(--select-dropdown-bg, var(--select-bg, white))));\n color: var(--select-option-disabled-color, var(--select-option-color, var(--select-text-color, #1f2937)));\n border: var(--select-option-disabled-border, var(--select-option-border, none));\n border-bottom: var(--select-option-disabled-border-bottom, var(--select-option-border-bottom, none));\n opacity: var(--select-option-disabled-opacity, 0.5);\n cursor: var(--select-option-disabled-cursor, not-allowed);\n pointer-events: none;\n }\n\n :host(.smilodon-option--disabled-interactive) {\n pointer-events: auto;\n }\n \n .option-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--select-option-padding, 10px 14px);\n cursor: pointer;\n user-select: none;\n color: inherit;\n background: inherit;\n transition: inherit;\n border: inherit;\n border-bottom: inherit;\n border-radius: inherit;\n box-shadow: inherit;\n transform: inherit;\n font: inherit;\n }\n \n .option-container:hover {\n background: inherit;\n color: inherit;\n border: inherit;\n border-bottom: inherit;\n box-shadow: inherit;\n transform: inherit;\n }\n \n .option-container.selected {\n background: inherit;\n color: inherit;\n border: inherit;\n border-bottom: inherit;\n border-radius: inherit;\n box-shadow: inherit;\n transform: inherit;\n }\n\n .option-container.selected:hover {\n background: inherit;\n color: inherit;\n border: inherit;\n border-bottom: inherit;\n box-shadow: inherit;\n transform: inherit;\n }\n \n .option-container.active:not(.disabled) {\n background: inherit;\n color: inherit;\n border: inherit;\n box-shadow: inherit;\n transform: inherit;\n outline: none;\n outline-offset: 0;\n }\n \n .option-container.disabled {\n background: inherit;\n color: inherit;\n border: inherit;\n border-bottom: inherit;\n opacity: inherit;\n cursor: inherit;\n pointer-events: none;\n }\n \n .option-content {\n flex: 1;\n overflow: var(--select-option-content-overflow, hidden);\n text-overflow: var(--select-option-content-text-overflow, ellipsis);\n white-space: var(--select-option-content-white-space, nowrap);\n }\n\n .checkmark-icon {\n display: none;\n margin-left: var(--select-checkmark-margin-left, 8px);\n color: var(--select-checkmark-color, currentColor);\n }\n\n :host([dir=\"rtl\"]) .checkmark-icon,\n :host-context([dir=\"rtl\"]) .checkmark-icon {\n margin-left: 0;\n margin-right: var(--select-checkmark-margin-left, 8px);\n }\n\n :host([aria-selected=\"true\"]) .checkmark-icon,\n .option-container.selected .checkmark-icon {\n display: inline-flex;\n }\n \n .remove-button {\n margin-left: 8px;\n width: var(--select-badge-remove-size, 18px);\n height: var(--select-badge-remove-size, 18px);\n min-width: var(--select-badge-remove-min-width, var(--select-badge-remove-size, 18px));\n min-height: var(--select-badge-remove-min-height, var(--select-badge-remove-size, 18px));\n padding: 0;\n border: none;\n background-color: var(--select-badge-remove-bg, rgba(255, 255, 255, 0.2));\n color: var(--select-badge-remove-color, currentColor);\n cursor: pointer;\n border-radius: var(--select-badge-remove-radius, 50%);\n font-size: var(--select-badge-remove-font-size, 0.7333em);\n font-weight: var(--select-badge-remove-font-weight, 600);\n line-height: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n }\n\n :host([dir=\"rtl\"]) .remove-button,\n :host-context([dir=\"rtl\"]) .remove-button {\n margin-left: 0;\n margin-right: 8px;\n }\n\n .remove-button-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--select-badge-remove-icon-size, 10px);\n height: var(--select-badge-remove-icon-size, 10px);\n color: var(--select-badge-remove-icon-color, currentColor);\n font-size: var(--select-badge-remove-icon-font-size, inherit);\n line-height: var(--select-badge-remove-icon-line-height, 1);\n transform: var(--select-badge-remove-icon-transform, none);\n opacity: var(--select-badge-remove-icon-opacity, 1);\n pointer-events: none;\n }\n\n .remove-button-icon svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n .remove-button:hover {\n background-color: var(--select-badge-remove-hover-bg, #ffebee);\n color: var(--select-badge-remove-hover-color, #c62828);\n }\n \n .remove-button:focus {\n outline: 2px solid var(--select-remove-btn-focus-outline, #1976d2);\n outline-offset: 2px;\n }\n `;\n this._shadow.appendChild(style);\n }\n\n private _getDisabledBehavior(): Required<DisabledOptionBehaviorConfig> {\n const behavior = this._config.disabledBehavior ?? {};\n return {\n selectable: behavior.selectable === true,\n hoverable: behavior.hoverable === true,\n focusable: behavior.focusable === true,\n };\n }\n\n private _isDisabledSelectionBlocked(): boolean {\n return Boolean(this._config.disabled) && !this._getDisabledBehavior().selectable;\n }\n\n private _render(): void {\n const { item, index, selected, disabled, active, render, showRemoveButton, classMap } = this._config;\n const disabledBehavior = this._getDisabledBehavior();\n \n // Clear container\n this._container.innerHTML = '';\n \n // Add part attribute\n this._container.setAttribute('part', 'option');\n\n // Standard styling hook\n this._container.classList.add('smilodon-option');\n\n // Apply state classes using classMap or defaults\n const selectedClasses = (classMap?.selected ?? 'selected sm-selected').split(' ').filter(Boolean);\n const activeClasses = (classMap?.active ?? 'active sm-active').split(' ').filter(Boolean);\n const disabledClasses = (classMap?.disabled ?? 'disabled sm-disabled').split(' ').filter(Boolean);\n\n // Apply classes to both the container (internal styling) and the host (external styling/::part)\n // This ensures that utility classes are visible via ::part selectors\n const toggleClasses = (element: Element, classes: string[], add: boolean) => {\n if (add) {\n element.classList.add(...classes);\n } else {\n element.classList.remove(...classes);\n }\n };\n\n if (selected) {\n toggleClasses(this._container, [...selectedClasses, 'smilodon-option--selected'], true);\n toggleClasses(this, [...selectedClasses, 'smilodon-option--selected'], true);\n } else {\n toggleClasses(this._container, [...selectedClasses, 'smilodon-option--selected'], false);\n toggleClasses(this, [...selectedClasses, 'smilodon-option--selected'], false);\n }\n\n if (active && (!disabled || disabledBehavior.focusable)) {\n toggleClasses(this._container, [...activeClasses, 'smilodon-option--active'], true);\n toggleClasses(this, [...activeClasses, 'smilodon-option--active'], true); // Make focus ring visible on host\n } else {\n toggleClasses(this._container, [...activeClasses, 'smilodon-option--active'], false);\n toggleClasses(this, [...activeClasses, 'smilodon-option--active'], false);\n }\n\n if (disabled) {\n toggleClasses(this._container, [...disabledClasses, 'smilodon-option--disabled'], true);\n toggleClasses(this, [...disabledClasses, 'smilodon-option--disabled'], true);\n } else {\n toggleClasses(this._container, [...disabledClasses, 'smilodon-option--disabled'], false);\n toggleClasses(this, [...disabledClasses, 'smilodon-option--disabled'], false);\n }\n\n const interactiveDisabled = Boolean(disabled && (disabledBehavior.hoverable || disabledBehavior.selectable));\n const toggleBehaviorClass = (className: string, add: boolean) => {\n toggleClasses(this._container, [className], add);\n toggleClasses(this, [className], add);\n };\n\n toggleBehaviorClass('smilodon-option--disabled-interactive', interactiveDisabled);\n toggleBehaviorClass('smilodon-option--disabled-hoverable', Boolean(disabled && disabledBehavior.hoverable));\n toggleBehaviorClass('smilodon-option--disabled-focusable', Boolean(disabled && disabledBehavior.focusable));\n toggleBehaviorClass('smilodon-option--disabled-selectable', Boolean(disabled && disabledBehavior.selectable));\n \n // Custom class name\n if (this._config.className) {\n\n const classes = this._config.className.split(' ').filter(Boolean);\n this._container.classList.add(...classes);\n }\n \n // Apply custom styles\n if (this._config.style) {\n Object.assign(this._container.style, this._config.style);\n }\n \n // Render content\n const contentDiv = document.createElement('div');\n contentDiv.className = 'option-content';\n // contentDiv.setAttribute('part', 'option-content'); // Optional\n \n if (render) {\n const rendered = render(item, index);\n if (typeof rendered === 'string') {\n contentDiv.innerHTML = rendered;\n } else if (rendered instanceof HTMLElement) {\n contentDiv.appendChild(rendered);\n }\n } else {\n const label = this._getLabel();\n contentDiv.textContent = label;\n }\n \n this._container.appendChild(contentDiv);\n \n // Add remove button if needed\n if (showRemoveButton && selected) {\n this._removeButton = document.createElement('button');\n this._removeButton.className = 'remove-button';\n this._removeButton.setAttribute('part', 'chip-remove');\n this._removeButton.setAttribute('aria-label', 'Remove option');\n this._removeButton.setAttribute('type', 'button');\n\n const removeIcon = document.createElement('span');\n removeIcon.className = 'remove-button-icon';\n removeIcon.setAttribute('part', 'chip-remove-icon');\n const iconMarkup = this._config.removeButtonIcon && this._config.removeButtonIcon.trim()\n ? this._config.removeButtonIcon\n : '×';\n if (iconMarkup.trim().startsWith('<')) {\n removeIcon.innerHTML = iconMarkup;\n } else {\n removeIcon.textContent = iconMarkup;\n }\n this._removeButton.appendChild(removeIcon);\n\n this._container.appendChild(this._removeButton);\n }\n \n // Set ARIA attributes and State attributes on Host\n this.setAttribute('role', 'option');\n this.setAttribute('aria-selected', String(selected));\n if (disabled && !disabledBehavior.selectable) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n this.id = this._config.id || `select-option-${index}`;\n\n // Add checkmark (part=\"checkmark\") - standard for object mode\n // Only show if NOT showing remove button (avoid clutter)\n if (!showRemoveButton) {\n const checkmark = document.createElement('div');\n checkmark.setAttribute('part', 'checkmark');\n checkmark.className = 'checkmark-icon';\n checkmark.innerHTML = `\n <svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width:1em;height:1em;\">\n <path d=\"M4 8.5L6.5 11L12 5.5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n `;\n this._container.appendChild(checkmark);\n }\n\n // Data Attributes Contract on Host\n const state = [];\n if (selected) state.push('selected');\n if (active && (!disabled || disabledBehavior.focusable)) state.push('active');\n if (state.length) {\n this.dataset.smState = state.join(' ');\n } else {\n delete this.dataset.smState;\n }\n \n this.dataset.smIndex = String(index);\n if (!this.hasAttribute('data-sm-selectable')) {\n this.toggleAttribute('data-sm-selectable', true);\n }\n }\n\n private _attachEventListeners(): void {\n // Click handler for selection\n this._container.addEventListener('click', (e) => {\n // Don't trigger selection if clicking remove button\n if (e.target === this._removeButton) {\n return;\n }\n \n if (!this._isDisabledSelectionBlocked()) {\n this._handleSelect();\n }\n });\n \n // Remove button handler\n if (this._removeButton) {\n this._removeButton.addEventListener('click', (e) => {\n e.stopPropagation();\n this._handleRemove();\n });\n }\n \n // Keyboard handler\n this.addEventListener('keydown', (e) => {\n if (this._isDisabledSelectionBlocked()) return;\n \n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this._handleSelect();\n } else if (e.key === 'Delete' || e.key === 'Backspace') {\n if (this._config.selected && this._config.showRemoveButton) {\n e.preventDefault();\n this._handleRemove();\n }\n }\n });\n }\n\n private _handleSelect(): void {\n const detail: OptionEventDetail = {\n item: this._config.item,\n index: this._config.index,\n value: this._getValue(),\n label: this._getLabel(),\n selected: !this._config.selected,\n };\n \n this.dispatchEvent(new CustomEvent('optionSelect', {\n detail,\n bubbles: true,\n composed: true,\n }));\n }\n\n private _handleRemove(): void {\n const detail: OptionEventDetail = {\n item: this._config.item,\n index: this._config.index,\n value: this._getValue(),\n label: this._getLabel(),\n selected: false,\n };\n \n this.dispatchEvent(new CustomEvent('optionRemove', {\n detail,\n bubbles: true,\n composed: true,\n }));\n }\n\n private _getValue(): unknown {\n if (this._config.getValue) {\n return this._config.getValue(this._config.item);\n }\n return (this._config.item as any)?.value ?? this._config.item;\n }\n\n private _getLabel(): string {\n if (this._config.getLabel) {\n return this._config.getLabel(this._config.item);\n }\n return (this._config.item as any)?.label ?? String(this._config.item);\n }\n\n /**\n * Update option configuration and re-render\n */\n updateConfig(updates: Partial<OptionConfig>): void {\n this._config = { ...this._config, ...updates };\n this._render();\n this._attachEventListeners();\n }\n\n /**\n * Get current configuration\n */\n getConfig(): Readonly<OptionConfig> {\n return this._config;\n }\n\n /**\n * Get option value\n */\n getValue(): unknown {\n return this._getValue();\n }\n\n /**\n * Get option label\n */\n getLabel(): string {\n return this._getLabel();\n }\n\n /**\n * Set selected state\n */\n setSelected(selected: boolean): void {\n this._config.selected = selected;\n if (this._hasRendered) {\n this._render();\n }\n }\n\n /**\n * Set active state\n */\n setActive(active: boolean): void {\n this._config.active = active && (!this._config.disabled || this._getDisabledBehavior().focusable);\n if (this._hasRendered) {\n this._render();\n }\n }\n\n /**\n * Set disabled state\n */\n setDisabled(disabled: boolean): void {\n this._config.disabled = disabled;\n if (this._hasRendered) {\n this._render();\n }\n }\n}\n\n// Register custom element\nif (!customElements.get('select-option')) {\n customElements.define('select-option', SelectOption);\n}\n","/**\n * Compare select item values with loose primitive coercion.\n * Treats string/number pairs like `\"1\"` and `1` as equal.\n */\nexport function valuesEqual(a: unknown, b: unknown): boolean {\n if (Object.is(a, b)) return true;\n if (a == null || b == null) return false;\n\n if (typeof a === 'string' && typeof b === 'number') {\n return a === String(b);\n }\n\n if (typeof a === 'number' && typeof b === 'string') {\n return String(a) === b;\n }\n\n return false;\n}\n\n/** Returns true when `values` contains a value equal to `target`. */\nexport function arrayIncludesValue(values: readonly unknown[], target: unknown): boolean {\n for (let i = 0; i < values.length; i += 1) {\n if (valuesEqual(values[i], target)) return true;\n }\n return false;\n}\n\n/** Returns true when two value arrays match positionally with loose equality. */\nexport function arraysEqualByValue(a: readonly unknown[], b: readonly unknown[]): boolean {\n if (a.length !== b.length) return false;\n\n for (let i = 0; i < a.length; i += 1) {\n if (!valuesEqual(a[i], b[i])) return false;\n }\n\n return true;\n}\n","/**\n * DOM-independent coordinator for the opt-in acknowledged data-loading\n * protocol. This module is intentionally not re-exported from the package\n * entry point; public component/adapter integration is a later increment.\n */\n\nexport type DataRequestId = string;\nexport type QueryGeneration = number;\nexport type PageCursor = string | number;\n\nexport type DataRequestProtocol = 'legacy' | 'acknowledged';\nexport type DataSearchMode = 'local' | 'remote' | 'hybrid';\nexport type DataPaginationMode = 'page' | 'cursor';\n\nconst DEFAULT_MAX_CURSOR_PAGES = 256;\nconst HARD_MAX_CURSOR_PAGES = 4_096;\nconst DEFAULT_MAX_CURSOR_TOKEN_BYTES = 1_024;\nconst HARD_MAX_CURSOR_TOKEN_BYTES = 4_096;\n\nexport interface DataLoadingConfig {\n protocol?: DataRequestProtocol;\n searchMode?: DataSearchMode;\n paginationMode?: DataPaginationMode;\n firstPage?: number;\n fetchLimit?: number;\n /** Internal acknowledged-cursor policy; not a public component option yet. */\n maxCursorPages?: number;\n /** UTF-8 bytes per opaque cursor; internal until component integration is authorized. */\n maxCursorTokenBytes?: number;\n}\n\nexport interface DataCoordinatorConfig {\n dataLoading?: DataLoadingConfig;\n infiniteScroll?: {\n pageSize?: number;\n initialPage?: number;\n };\n}\n\nexport interface DataRequestBase {\n readonly requestId: DataRequestId;\n readonly queryGeneration: QueryGeneration;\n readonly query: string;\n readonly normalizedQuery: string;\n readonly fetchLimit: number;\n readonly position: PagePosition;\n}\n\nexport interface SearchDataRequest extends DataRequestBase {\n readonly kind: 'search';\n readonly mode: 'remote' | 'hybrid';\n}\n\nexport type PagePosition =\n | Readonly<{ mode: 'page'; page: number }>\n | Readonly<{ mode: 'cursor'; cursor?: PageCursor; ordinal: number }>;\n\nexport interface LoadMoreDataRequest extends DataRequestBase {\n readonly kind: 'loadMore';\n}\n\nexport type DataRequest = SearchDataRequest | LoadMoreDataRequest;\n\nexport interface DataRequestError {\n readonly message: string;\n readonly code?: string;\n readonly retryable?: boolean;\n}\n\nexport interface DataRequestCancelNotification {\n readonly requestId: DataRequestId;\n readonly queryGeneration: QueryGeneration;\n readonly reason: 'query-changed' | 'config-changed' | 'disconnected';\n}\n\nexport type DataRequestCompletion =\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'succeeded';\n items: readonly unknown[];\n hasMore: true;\n nextCursor?: PageCursor;\n }>\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'empty';\n hasMore: true;\n advance: 'next' | 'retry';\n nextCursor?: PageCursor;\n }>\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'exhausted';\n items: readonly unknown[];\n hasMore: false;\n }>\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'failed';\n error: DataRequestError;\n }>\n | Readonly<{\n requestId: DataRequestId;\n queryGeneration: QueryGeneration;\n status: 'cancelled';\n reason?: 'host-cancelled';\n }>;\n\nexport type DataRequestCompletionResult = 'accepted' | 'stale' | 'unknown-request' | 'invalid' | 'resource-limit';\n\nexport type DataCoordinatorStatus =\n | 'idle'\n | 'requested'\n | 'loading'\n | 'succeeded'\n | 'empty'\n | 'exhausted'\n | 'failed'\n | 'cancelled'\n | 'resource-limited';\n\nexport type DataCoordinatorResourceLimit =\n | Readonly<{\n reason: 'cursor-depth';\n maxCursorPages: number;\n requestId?: DataRequestId;\n }>\n | Readonly<{\n reason: 'cursor-token-size';\n maxCursorTokenBytes: number;\n actualCursorTokenBytes: number;\n requestId: DataRequestId;\n }>;\n\nexport type DataCoordinatorAction =\n | Readonly<{ type: 'request'; request: DataRequest }>\n | Readonly<{ type: 'cancel'; notification: DataRequestCancelNotification }>;\n\nexport interface CoordinatorValidationIssue {\n readonly field: string;\n readonly message: string;\n}\n\nexport type ConfigurationValidation =\n | Readonly<{ valid: true; value: ResolvedDataCoordinatorConfig }>\n | Readonly<{ valid: false; errors: readonly CoordinatorValidationIssue[] }>;\n\nexport interface ResolvedDataCoordinatorConfig {\n readonly protocol: DataRequestProtocol;\n readonly searchMode: DataSearchMode;\n readonly paginationMode: DataPaginationMode;\n readonly firstPage: number;\n readonly initialPage: number;\n readonly fetchLimit?: number;\n readonly maxCursorPages: number;\n readonly maxCursorTokenBytes: number;\n}\n\nexport interface DataRequestCoordinatorOptions {\n config?: DataCoordinatorConfig;\n initialQuery?: string;\n initialItems?: readonly unknown[];\n /** Whether another page/position is available for an acknowledged local list. */\n hasMore?: boolean;\n}\n\nexport interface DataCoordinatorSnapshot {\n readonly status: DataCoordinatorStatus;\n readonly connected: boolean;\n readonly busy: boolean;\n readonly query: string;\n readonly normalizedQuery: string;\n readonly queryGeneration: QueryGeneration;\n readonly items: readonly unknown[];\n readonly hasMore: boolean;\n readonly activeRequest: DataRequest | null;\n readonly lastCommittedPage?: number;\n readonly nextEligiblePosition: PagePosition;\n readonly error: DataRequestError | null;\n /** A bounded-resource outcome; never aliases server exhaustion. */\n readonly resourceLimit: DataCoordinatorResourceLimit | null;\n readonly sentinelBlocked: boolean;\n readonly sentinelIntersecting: boolean;\n}\n\nexport type ConfigurationUpdateResult =\n | Readonly<{ status: 'accepted'; actions: readonly DataCoordinatorAction[] }>\n | Readonly<{ status: 'invalid'; errors: readonly CoordinatorValidationIssue[] }>;\n\ninterface InternalRequest {\n request: DataRequest;\n phase: 'requested' | 'loading';\n}\n\ninterface ParsedRequestId {\n readonly instanceId: number;\n readonly queryGeneration: number;\n readonly sequence: number;\n readonly check: string;\n}\n\ninterface ConfigValidationInput {\n protocol: unknown;\n searchMode: unknown;\n paginationMode: unknown;\n firstPage: unknown;\n initialPage: unknown;\n fetchLimit: unknown;\n maxCursorPages: unknown;\n maxCursorTokenBytes: unknown;\n pageSize: unknown;\n}\n\nlet coordinatorInstanceSequence = 0;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return false;\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\nfunction isPositiveSafeInteger(value: unknown): value is number {\n return Number.isSafeInteger(value) && (value as number) > 0;\n}\n\nfunction isNonNegativeSafeInteger(value: unknown): value is number {\n return Number.isSafeInteger(value) && (value as number) >= 0;\n}\n\nfunction isCursor(value: unknown): value is PageCursor {\n return typeof value === 'string' || (typeof value === 'number' && Number.isFinite(value));\n}\n\n/** Count UTF-8 bytes without depending on DOM APIs or Node Buffer. */\nfunction cursorTokenByteLength(cursor: PageCursor): number {\n const token = String(cursor);\n let bytes = 0;\n for (const character of token) {\n const codePoint = character.codePointAt(0) as number;\n if (codePoint <= 0x7f) bytes += 1;\n else if (codePoint <= 0x7ff) bytes += 2;\n else if (codePoint <= 0xffff) bytes += 3;\n else bytes += 4;\n }\n return bytes;\n}\n\nfunction parseRequestId(value: string): ParsedRequestId | null {\n const match = /^data-(\\d+)-generation-(\\d+)-request-(\\d+)-([a-z0-9]+)$/.exec(value);\n if (!match) return null;\n const [, instanceText, generationText, sequenceText, check] = match;\n const instanceId = Number(instanceText);\n const queryGeneration = Number(generationText);\n const sequence = Number(sequenceText);\n if (\n !Number.isSafeInteger(instanceId) || instanceId < 1 ||\n !Number.isSafeInteger(queryGeneration) || queryGeneration < 0 ||\n !Number.isSafeInteger(sequence) || sequence < 1\n ) return null;\n return Object.freeze({ instanceId, queryGeneration, sequence, check });\n}\n\nfunction requestIdCheck(\n secret: string,\n instanceId: number,\n queryGeneration: number,\n sequence: number,\n): string {\n // A compact keyed check distinguishes IDs actually minted by this instance\n // from arbitrary strings without retaining a registry of historical IDs.\n let hash = 14695981039346656037n;\n const mask = (1n << 64n) - 1n;\n const input = `${secret}:${instanceId}:${queryGeneration}:${sequence}`;\n for (let index = 0; index < input.length; index += 1) {\n hash ^= BigInt(input.charCodeAt(index));\n hash = (hash * 1099511628211n) & mask;\n }\n return hash.toString(36);\n}\n\nfunction isQueryMode(value: unknown): value is DataSearchMode {\n return value === 'local' || value === 'remote' || value === 'hybrid';\n}\n\nfunction isPaginationMode(value: unknown): value is DataPaginationMode {\n return value === 'page' || value === 'cursor';\n}\n\nfunction frozenPosition(position: PagePosition): PagePosition {\n return Object.freeze({ ...position }) as PagePosition;\n}\n\nfunction exactKeys(record: Record<string, unknown>, allowed: readonly string[]): boolean {\n return Object.keys(record).every((key) => allowed.includes(key));\n}\n\nfunction asFrozenItems(items: readonly unknown[]): readonly unknown[] {\n return Object.freeze(Array.from(items));\n}\n\nfunction immutableActions(actions: DataCoordinatorAction[]): readonly DataCoordinatorAction[] {\n return Object.freeze(actions.slice());\n}\n\nfunction configInput(config: DataCoordinatorConfig = {}): ConfigValidationInput {\n const root = isRecord(config) ? config : {};\n const dataLoading = isRecord(root.dataLoading) ? root.dataLoading : {};\n const infiniteScroll = isRecord(root.infiniteScroll) ? root.infiniteScroll : {};\n return {\n protocol: dataLoading.protocol === undefined ? 'legacy' : dataLoading.protocol,\n searchMode: dataLoading.searchMode === undefined ? 'local' : dataLoading.searchMode,\n paginationMode: dataLoading.paginationMode === undefined ? 'page' : dataLoading.paginationMode,\n firstPage: dataLoading.firstPage === undefined ? 1 : dataLoading.firstPage,\n initialPage: infiniteScroll.initialPage === undefined ? 1 : infiniteScroll.initialPage,\n fetchLimit: dataLoading.fetchLimit,\n maxCursorPages: dataLoading.maxCursorPages === undefined\n ? DEFAULT_MAX_CURSOR_PAGES\n : dataLoading.maxCursorPages,\n maxCursorTokenBytes: dataLoading.maxCursorTokenBytes === undefined\n ? DEFAULT_MAX_CURSOR_TOKEN_BYTES\n : dataLoading.maxCursorTokenBytes,\n pageSize: infiniteScroll.pageSize,\n };\n}\n\nexport function validateDataCoordinatorConfig(config: DataCoordinatorConfig = {}): ConfigurationValidation {\n const input = configInput(config);\n const errors: CoordinatorValidationIssue[] = [];\n const add = (field: string, message: string) => errors.push(Object.freeze({ field, message }));\n const rawConfig = config as unknown;\n if (!isRecord(rawConfig)) add('config', 'must be a plain object');\n else {\n if (rawConfig.dataLoading !== undefined && !isRecord(rawConfig.dataLoading)) {\n add('dataLoading', 'must be a plain object when supplied');\n }\n if (rawConfig.infiniteScroll !== undefined && !isRecord(rawConfig.infiniteScroll)) {\n add('infiniteScroll', 'must be a plain object when supplied');\n }\n }\n\n if (input.protocol !== 'legacy' && input.protocol !== 'acknowledged') {\n add('dataLoading.protocol', 'must be legacy or acknowledged');\n }\n if (!isQueryMode(input.searchMode)) {\n add('dataLoading.searchMode', 'must be local, remote, or hybrid');\n }\n if (!isPaginationMode(input.paginationMode)) {\n add('dataLoading.paginationMode', 'must be page or cursor');\n }\n if (!isPositiveSafeInteger(input.firstPage)) {\n add('dataLoading.firstPage', 'must be a positive safe integer');\n }\n if (!isPositiveSafeInteger(input.initialPage)) {\n add('infiniteScroll.initialPage', 'must be a positive safe integer');\n }\n if (\n input.protocol === 'acknowledged' &&\n input.searchMode === 'local' &&\n input.paginationMode === 'page' &&\n input.initialPage === Number.MAX_SAFE_INTEGER\n ) {\n add('infiniteScroll.initialPage', 'must leave room for the next acknowledged page number');\n }\n if (input.fetchLimit !== undefined && !isPositiveSafeInteger(input.fetchLimit)) {\n add('dataLoading.fetchLimit', 'must be a positive safe integer when supplied');\n }\n if (!isPositiveSafeInteger(input.maxCursorPages) || input.maxCursorPages > HARD_MAX_CURSOR_PAGES) {\n add('dataLoading.maxCursorPages', `must be a positive safe integer no greater than ${HARD_MAX_CURSOR_PAGES}`);\n }\n if (!isPositiveSafeInteger(input.maxCursorTokenBytes) || input.maxCursorTokenBytes > HARD_MAX_CURSOR_TOKEN_BYTES) {\n add(\n 'dataLoading.maxCursorTokenBytes',\n `must be a positive safe integer no greater than ${HARD_MAX_CURSOR_TOKEN_BYTES}`,\n );\n }\n if (input.pageSize !== undefined && !isPositiveSafeInteger(input.pageSize)) {\n add('infiniteScroll.pageSize', 'must be a positive safe integer when supplied');\n }\n if (\n input.protocol === 'legacy' &&\n (input.searchMode === 'remote' || input.searchMode === 'hybrid' || input.paginationMode === 'cursor')\n ) {\n add('dataLoading.protocol', 'remote/hybrid search and cursor pagination require acknowledged protocol');\n }\n\n const resolvedFetchLimit =\n typeof input.fetchLimit === 'number' ? input.fetchLimit : typeof input.pageSize === 'number' ? input.pageSize : undefined;\n if (input.protocol === 'acknowledged' && resolvedFetchLimit === undefined) {\n add('dataLoading.fetchLimit', 'acknowledged requests require fetchLimit or an effective infiniteScroll.pageSize');\n }\n\n if (errors.length > 0) {\n return Object.freeze({ valid: false, errors: Object.freeze(errors) });\n }\n\n return Object.freeze({\n valid: true,\n value: Object.freeze({\n protocol: input.protocol as DataRequestProtocol,\n searchMode: input.searchMode as DataSearchMode,\n paginationMode: input.paginationMode as DataPaginationMode,\n firstPage: input.firstPage as number,\n initialPage: input.initialPage as number,\n fetchLimit: resolvedFetchLimit,\n maxCursorPages: input.maxCursorPages as number,\n maxCursorTokenBytes: input.maxCursorTokenBytes as number,\n }),\n });\n}\n\nfunction copyCoordinatorConfig(config: DataCoordinatorConfig = {}): DataCoordinatorConfig {\n return {\n dataLoading: config.dataLoading ? { ...config.dataLoading } : {},\n infiniteScroll: config.infiniteScroll ? { ...config.infiniteScroll } : {},\n };\n}\n\nfunction mergeCoordinatorConfig(\n current: DataCoordinatorConfig,\n update: DataCoordinatorConfig,\n): DataCoordinatorConfig {\n return {\n dataLoading: { ...(current.dataLoading ?? {}), ...(update.dataLoading ?? {}) },\n infiniteScroll: { ...(current.infiniteScroll ?? {}), ...(update.infiniteScroll ?? {}) },\n };\n}\n\n/**\n * Owns request identity and pagination state only. It has no DOM, framework,\n * observer, timer, or network dependencies. Returned actions are instructions\n * for a future facade/host boundary; cancellation never performs transport.\n */\nexport class DataRequestCoordinator {\n private readonly instanceId = ++coordinatorInstanceSequence;\n private readonly requestIdSecret = Math.random().toString(36).slice(2) || '0';\n private requestSequence = 0;\n private rawConfig: DataCoordinatorConfig;\n private config: ResolvedDataCoordinatorConfig;\n private connected = false;\n private hasConnected = false;\n private query: string;\n private queryGeneration = 0;\n private items: readonly unknown[];\n private hasMore: boolean;\n private active: InternalRequest | null = null;\n private status: DataCoordinatorStatus = 'idle';\n private lastCommittedPage: number | undefined;\n private nextEligiblePosition: PagePosition;\n /**\n * Exact cycle detection for the current pagination epoch. One cursor is\n * retained per accepted advancement; there is intentionally no LRU eviction.\n */\n private committedCursors = new Set<PageCursor>();\n private generationHasAcceptedResult = false;\n private needsInitialRemoteSearch: boolean;\n private retryAvailable = false;\n private retryPosition: PagePosition | undefined;\n private retryKind: DataRequest['kind'] | undefined;\n private error: DataRequestError | null = null;\n private resourceLimit: DataCoordinatorResourceLimit | null = null;\n private sentinelBlocked = false;\n private sentinelIntersecting = false;\n\n constructor(options: DataRequestCoordinatorOptions = {}) {\n const initialConfig = options.config === undefined ? {} : options.config;\n const validation = validateDataCoordinatorConfig(initialConfig);\n if (!validation.valid) {\n throw new TypeError(validation.errors.map(({ field, message }) => `${field}: ${message}`).join('; '));\n }\n this.rawConfig = copyCoordinatorConfig(initialConfig);\n this.config = validation.value;\n this.query = options.initialQuery ?? '';\n this.items = asFrozenItems(options.initialItems ?? []);\n const remote = this.isRemoteMode();\n this.hasMore = remote ? false : options.hasMore ?? false;\n this.nextEligiblePosition = this.initialPosition();\n this.lastCommittedPage = this.config.paginationMode === 'page' && !remote\n ? this.config.initialPage\n : undefined;\n this.needsInitialRemoteSearch = remote;\n }\n\n getSnapshot(): DataCoordinatorSnapshot {\n const activeRequest = this.active?.request ?? null;\n const nextPosition = frozenPosition(this.nextEligiblePosition);\n return Object.freeze({\n status: this.status,\n connected: this.connected,\n busy: this.active !== null,\n query: this.query,\n normalizedQuery: this.query.trim(),\n queryGeneration: this.queryGeneration,\n items: asFrozenItems(this.items),\n hasMore: this.hasMore,\n activeRequest,\n lastCommittedPage: this.lastCommittedPage,\n nextEligiblePosition: nextPosition,\n error: this.error ? Object.freeze({ ...this.error }) : null,\n resourceLimit: this.resourceLimit,\n sentinelBlocked: this.sentinelBlocked,\n sentinelIntersecting: this.sentinelIntersecting,\n });\n }\n\n /** Connect once, dispatching the initial remote/hybrid query when required. */\n connect(query = this.query): readonly DataCoordinatorAction[] {\n if (this.connected) return immutableActions([]);\n\n const actions: DataCoordinatorAction[] = [];\n if (query !== this.query) actions.push(...this.setQuery(query));\n if (this.hasConnected) this.queryGeneration += 1;\n this.connected = true;\n this.hasConnected = true;\n\n if (this.isRemoteMode() && this.needsInitialRemoteSearch) {\n this.resetPaginationForRemoteQuery(true);\n const request = this.createSearchRequest();\n if (request) actions.push(Object.freeze({ type: 'request', request }));\n }\n return immutableActions(actions);\n }\n\n /**\n * Advance the request transition from synchronous `requested` to `loading`\n * immediately before a future facade dispatches event/callback notifications.\n */\n markNotificationsDispatched(requestId: DataRequestId): boolean {\n if (!this.active || this.active.request.requestId !== requestId || this.active.phase !== 'requested') {\n return false;\n }\n this.active.phase = 'loading';\n this.status = 'loading';\n return true;\n }\n\n setQuery(query: string): readonly DataCoordinatorAction[] {\n if (typeof query !== 'string' || query === this.query) return immutableActions([]);\n\n const actions: DataCoordinatorAction[] = [];\n const cancellation = this.invalidateActive('query-changed');\n if (cancellation) actions.push(cancellation);\n\n this.query = query;\n this.queryGeneration += 1;\n this.error = null;\n this.status = 'idle';\n this.generationHasAcceptedResult = false;\n this.retryAvailable = false;\n this.retryPosition = undefined;\n this.retryKind = undefined;\n this.committedCursors.clear();\n this.resourceLimit = null;\n this.sentinelBlocked = false;\n\n if (this.isRemoteMode()) {\n this.resetPaginationForRemoteQuery(true);\n this.needsInitialRemoteSearch = true;\n if (this.connected) {\n const request = this.createSearchRequest();\n if (request) actions.push(Object.freeze({ type: 'request', request }));\n }\n } else {\n this.lastCommittedPage = this.config.paginationMode === 'page' ? this.config.initialPage : undefined;\n this.nextEligiblePosition = this.initialPosition();\n this.needsInitialRemoteSearch = false;\n }\n return immutableActions(actions);\n }\n\n /** Update effective config; non-protocol changes do not rewrite active requests. */\n updateConfig(update: DataCoordinatorConfig): ConfigurationUpdateResult {\n const rawUpdate = update as unknown;\n if (\n !isRecord(rawUpdate) ||\n (rawUpdate.dataLoading !== undefined && !isRecord(rawUpdate.dataLoading)) ||\n (rawUpdate.infiniteScroll !== undefined && !isRecord(rawUpdate.infiniteScroll))\n ) {\n return Object.freeze({\n status: 'invalid',\n errors: Object.freeze([\n Object.freeze({ field: 'config', message: 'update and nested config groups must be plain objects' }),\n ]),\n });\n }\n const candidate = mergeCoordinatorConfig(this.rawConfig, update);\n const validation = validateDataCoordinatorConfig(candidate);\n if (!validation.valid) return Object.freeze({ status: 'invalid', errors: validation.errors });\n\n const previous = this.config;\n const next = validation.value;\n const protocolChanged =\n previous.protocol !== next.protocol ||\n previous.searchMode !== next.searchMode ||\n previous.paginationMode !== next.paginationMode;\n\n this.rawConfig = copyCoordinatorConfig(candidate);\n this.config = next;\n if (!protocolChanged) {\n this.refreshCursorDepthLimit();\n return Object.freeze({ status: 'accepted', actions: immutableActions([]) });\n }\n\n const actions: DataCoordinatorAction[] = [];\n const cancellation = this.invalidateActive('config-changed');\n if (cancellation) actions.push(cancellation);\n\n this.queryGeneration += 1;\n this.error = null;\n this.status = 'idle';\n this.generationHasAcceptedResult = false;\n this.retryAvailable = false;\n this.retryPosition = undefined;\n this.retryKind = undefined;\n this.committedCursors.clear();\n this.resourceLimit = null;\n this.sentinelBlocked = false;\n this.hasMore = this.isRemoteMode() ? false : this.hasMore;\n this.lastCommittedPage = this.config.paginationMode === 'page' && !this.isRemoteMode()\n ? this.config.initialPage\n : undefined;\n this.nextEligiblePosition = this.initialPosition();\n this.needsInitialRemoteSearch = this.isRemoteMode();\n\n if (this.connected && this.isRemoteMode()) {\n const request = this.createSearchRequest();\n if (request) actions.push(Object.freeze({ type: 'request', request }));\n }\n return Object.freeze({ status: 'accepted', actions: immutableActions(actions) });\n }\n\n /** Request another page or explicitly retry the still-eligible position. */\n requestLoadMore(trigger: 'manual' | 'sentinel' = 'manual'): readonly DataCoordinatorAction[] {\n if (this.config.protocol !== 'acknowledged' || !this.connected || this.active) {\n return immutableActions([]);\n }\n if (trigger === 'sentinel' && this.sentinelBlocked) return immutableActions([]);\n if (!this.hasMore && !this.retryAvailable) return immutableActions([]);\n\n const position = this.retryAvailable && this.retryPosition\n ? this.retryPosition\n : this.nextEligiblePosition;\n if (\n this.config.paginationMode === 'cursor' &&\n position.mode === 'cursor' &&\n position.ordinal > this.config.maxCursorPages\n ) {\n this.resourceLimit = Object.freeze({\n reason: 'cursor-depth',\n maxCursorPages: this.config.maxCursorPages,\n });\n this.status = 'resource-limited';\n this.sentinelBlocked = true;\n return immutableActions([]);\n }\n\n if (trigger === 'manual') this.sentinelBlocked = false;\n const retryKind = this.retryAvailable ? this.retryKind : undefined;\n this.retryAvailable = false;\n this.retryPosition = undefined;\n this.retryKind = undefined;\n\n const request = retryKind === 'search' && this.isRemoteMode()\n ? this.createSearchRequest(position)\n : this.createLoadMoreRequest(position);\n return request ? immutableActions([Object.freeze({ type: 'request', request })]) : immutableActions([]);\n }\n\n /** Feed observer state into the pure sentinel rearm state machine. */\n setSentinelIntersecting(intersecting: boolean): readonly DataCoordinatorAction[] {\n if (!intersecting) {\n this.sentinelIntersecting = false;\n this.sentinelBlocked = false;\n return immutableActions([]);\n }\n if (this.sentinelIntersecting) return immutableActions([]);\n this.sentinelIntersecting = true;\n return this.requestLoadMore('sentinel');\n }\n\n /** Invalidate pending work before returning its best-effort host cancellation action. */\n disconnect(): readonly DataCoordinatorAction[] {\n if (!this.connected) return immutableActions([]);\n const activeRequest = this.active?.request;\n const actions: DataCoordinatorAction[] = [];\n if (activeRequest) {\n if (activeRequest.kind === 'search' && !this.generationHasAcceptedResult) {\n this.needsInitialRemoteSearch = true;\n }\n const cancellation = this.invalidateActive('disconnected');\n if (cancellation) actions.push(cancellation);\n this.resourceLimit = null;\n this.status = 'cancelled';\n this.sentinelBlocked = true;\n // Encode invalidation in the generation, so late completions are stale\n // without retaining one request ID per cancellation.\n this.queryGeneration += 1;\n }\n this.sentinelIntersecting = false;\n this.connected = false;\n return immutableActions(actions);\n }\n\n completeDataRequest(completion: unknown): DataRequestCompletionResult {\n if (!isRecord(completion) || !this.hasValidCompletionEnvelope(completion)) return 'invalid';\n\n const requestId = completion.requestId as string;\n const generation = completion.queryGeneration as number;\n if (this.active?.request.requestId !== requestId) {\n return this.classifyInactiveRequest(requestId, generation);\n }\n if (generation !== this.active.request.queryGeneration || this.active.phase !== 'loading') return 'invalid';\n\n const validation = this.validateCompletionPayload(completion, this.active.request);\n if (!validation.valid) {\n if (validation.resourceLimit === 'cursor-token-size') {\n const cursor = completion.nextCursor as PageCursor;\n const actualCursorTokenBytes = cursorTokenByteLength(cursor);\n this.resourceLimit = Object.freeze({\n reason: 'cursor-token-size',\n maxCursorTokenBytes: this.config.maxCursorTokenBytes,\n actualCursorTokenBytes,\n requestId,\n });\n return 'resource-limit';\n }\n return 'invalid';\n }\n\n const request = this.active.request;\n const status = completion.status as DataRequestCompletion['status'];\n const nextData = status === 'succeeded' || status === 'exhausted'\n ? asFrozenItems(completion.items as readonly unknown[])\n : this.items;\n let nextPosition = this.nextEligiblePosition;\n let nextLastCommittedPage = this.lastCommittedPage;\n let nextHasMore = this.hasMore;\n let nextRetryAvailable = false;\n let nextRetryPosition: PagePosition | undefined;\n let nextRetryKind: DataRequest['kind'] | undefined;\n let nextError: DataRequestError | null = null;\n let nextSentinelBlocked = false;\n let cursorToCommit: PageCursor | undefined;\n let nextResourceLimit: DataCoordinatorResourceLimit | null = null;\n\n if (status === 'succeeded') {\n const advances = this.advanceFrom(request, completion as Record<string, unknown>);\n nextPosition = advances.position;\n nextLastCommittedPage = advances.lastCommittedPage;\n cursorToCommit = advances.cursorToCommit;\n nextHasMore = true;\n } else if (status === 'exhausted') {\n nextLastCommittedPage = request.position.mode === 'page'\n ? request.position.page\n : this.lastCommittedPage;\n nextHasMore = false;\n } else if (status === 'empty') {\n nextHasMore = true;\n nextSentinelBlocked = true;\n if (completion.advance === 'next') {\n const advances = this.advanceFrom(request, completion as Record<string, unknown>);\n nextPosition = advances.position;\n nextLastCommittedPage = advances.lastCommittedPage;\n cursorToCommit = advances.cursorToCommit;\n } else {\n nextRetryAvailable = true;\n nextRetryPosition = request.position;\n nextRetryKind = request.kind;\n }\n } else if (status === 'failed') {\n nextRetryAvailable = true;\n nextRetryPosition = request.position;\n nextRetryKind = request.kind;\n nextError = Object.freeze({ ...(completion.error as DataRequestError) });\n nextSentinelBlocked = true;\n } else if (status === 'cancelled') {\n nextRetryAvailable = true;\n nextRetryPosition = request.position;\n nextRetryKind = request.kind;\n nextSentinelBlocked = true;\n }\n\n if (\n this.config.paginationMode === 'cursor' &&\n nextHasMore &&\n nextPosition.mode === 'cursor' &&\n nextPosition.ordinal > this.config.maxCursorPages\n ) {\n nextResourceLimit = Object.freeze({\n reason: 'cursor-depth',\n maxCursorPages: this.config.maxCursorPages,\n requestId,\n });\n nextSentinelBlocked = true;\n }\n\n // Commit only after identity, generation, status, and every field validate.\n this.items = nextData;\n this.nextEligiblePosition = nextPosition;\n this.lastCommittedPage = nextLastCommittedPage;\n this.hasMore = nextHasMore;\n this.retryAvailable = nextRetryAvailable;\n this.retryPosition = nextRetryPosition;\n this.retryKind = nextRetryKind;\n this.error = nextError;\n this.resourceLimit = nextResourceLimit;\n this.sentinelBlocked = nextSentinelBlocked;\n if (cursorToCommit !== undefined) this.committedCursors.add(cursorToCommit);\n if (status === 'succeeded' || status === 'exhausted') this.generationHasAcceptedResult = true;\n this.active = null;\n this.status = nextResourceLimit ? 'resource-limited' : status;\n return 'accepted';\n }\n\n private isRemoteMode(): boolean {\n return this.config.searchMode === 'remote' || this.config.searchMode === 'hybrid';\n }\n\n private initialPosition(): PagePosition {\n if (this.config.paginationMode === 'cursor') {\n return Object.freeze({ mode: 'cursor' as const, ordinal: 1 });\n }\n const page = this.isRemoteMode() ? this.config.firstPage : this.config.initialPage + 1;\n return Object.freeze({ mode: 'page' as const, page });\n }\n\n private resetPaginationForRemoteQuery(clearItems: boolean): void {\n this.hasMore = false;\n this.lastCommittedPage = undefined;\n this.nextEligiblePosition = this.initialPosition();\n this.committedCursors.clear();\n this.retryAvailable = false;\n this.retryPosition = undefined;\n this.retryKind = undefined;\n this.resourceLimit = null;\n this.sentinelBlocked = false;\n this.error = null;\n if (clearItems) this.items = asFrozenItems([]);\n }\n\n /** Re-evaluate the local cursor cap without resetting accepted history. */\n private refreshCursorDepthLimit(): void {\n if (this.config.protocol !== 'acknowledged' || this.config.paginationMode !== 'cursor') return;\n const position = this.retryAvailable && this.retryPosition\n ? this.retryPosition\n : this.nextEligiblePosition;\n const overLimit = (this.hasMore || this.retryAvailable) &&\n position.mode === 'cursor' && position.ordinal > this.config.maxCursorPages;\n\n if (overLimit) {\n this.resourceLimit = Object.freeze({\n reason: 'cursor-depth',\n maxCursorPages: this.config.maxCursorPages,\n });\n if (!this.active) this.status = 'resource-limited';\n this.sentinelBlocked = true;\n return;\n }\n\n if (this.resourceLimit?.reason === 'cursor-depth') {\n this.resourceLimit = null;\n if (!this.active && this.status === 'resource-limited') this.status = 'idle';\n }\n }\n\n private createSearchRequest(position = this.nextEligiblePosition): DataRequest | null {\n if (!this.connected || !this.isRemoteMode() || this.config.protocol !== 'acknowledged') return null;\n const request = this.createRequest({ kind: 'search', mode: this.config.searchMode as 'remote' | 'hybrid' }, position);\n if (request) {\n this.needsInitialRemoteSearch = false;\n this.status = 'requested';\n }\n return request;\n }\n\n private createLoadMoreRequest(position: PagePosition): DataRequest | null {\n if (!this.connected || this.config.protocol !== 'acknowledged') return null;\n const request = this.createRequest({ kind: 'loadMore' }, position);\n if (request) this.status = 'requested';\n return request;\n }\n\n private createRequest(\n kind: { kind: 'search'; mode: 'remote' | 'hybrid' } | { kind: 'loadMore' },\n position: PagePosition,\n ): DataRequest | null {\n const fetchLimit = this.config.fetchLimit;\n if (fetchLimit === undefined || this.active) return null;\n this.requestSequence += 1;\n const check = requestIdCheck(\n this.requestIdSecret,\n this.instanceId,\n this.queryGeneration,\n this.requestSequence,\n );\n const requestId = `data-${this.instanceId}-generation-${this.queryGeneration}-request-${this.requestSequence}-${check}`;\n const base: DataRequestBase = Object.freeze({\n requestId,\n queryGeneration: this.queryGeneration,\n query: this.query,\n normalizedQuery: this.query.trim(),\n fetchLimit,\n position: frozenPosition(position),\n });\n const request: DataRequest = kind.kind === 'search'\n ? Object.freeze({ ...base, kind: 'search' as const, mode: kind.mode })\n : Object.freeze({ ...base, kind: 'loadMore' as const });\n this.active = { request, phase: 'requested' };\n this.status = 'requested';\n this.error = null;\n return request;\n }\n\n private invalidateActive(reason: DataRequestCancelNotification['reason']): DataCoordinatorAction | null {\n if (!this.active) return null;\n const { request } = this.active;\n this.active = null;\n this.status = 'cancelled';\n const notification = Object.freeze({\n requestId: request.requestId,\n queryGeneration: request.queryGeneration,\n reason,\n });\n return Object.freeze({ type: 'cancel', notification });\n }\n\n private classifyInactiveRequest(\n requestId: DataRequestId,\n completionGeneration: QueryGeneration,\n ): DataRequestCompletionResult {\n const parsed = parseRequestId(requestId);\n if (\n !parsed ||\n parsed.instanceId !== this.instanceId ||\n parsed.check !== requestIdCheck(\n this.requestIdSecret,\n parsed.instanceId,\n parsed.queryGeneration,\n parsed.sequence,\n ) ||\n parsed.sequence > this.requestSequence\n ) return 'unknown-request';\n if (parsed.queryGeneration !== completionGeneration) return 'invalid';\n return parsed.queryGeneration < this.queryGeneration ? 'stale' : 'unknown-request';\n }\n\n private hasValidCompletionEnvelope(completion: Record<string, unknown>): boolean {\n return (\n typeof completion.requestId === 'string' &&\n completion.requestId.length > 0 &&\n isNonNegativeSafeInteger(completion.queryGeneration) &&\n typeof completion.status === 'string' &&\n ['succeeded', 'empty', 'exhausted', 'failed', 'cancelled'].includes(completion.status)\n );\n }\n\n private validateCompletionPayload(\n completion: Record<string, unknown>,\n request: DataRequest,\n ): { valid: true } | { valid: false; resourceLimit?: 'cursor-token-size' } {\n const common = ['requestId', 'queryGeneration', 'status'];\n switch (completion.status) {\n case 'succeeded': {\n const allowed = [...common, 'items', 'hasMore'];\n if (request.position.mode === 'cursor') allowed.push('nextCursor');\n if (!exactKeys(completion, allowed) || !Array.isArray(completion.items) || completion.hasMore !== true) {\n return { valid: false };\n }\n if (request.position.mode === 'cursor') {\n if (request.position.ordinal >= Number.MAX_SAFE_INTEGER || !isCursor(completion.nextCursor)) {\n return { valid: false };\n }\n if (cursorTokenByteLength(completion.nextCursor) > this.config.maxCursorTokenBytes) {\n return { valid: false, resourceLimit: 'cursor-token-size' };\n }\n if (this.hasCommittedCursor(completion.nextCursor)) return { valid: false };\n } else if ('nextCursor' in completion) {\n return { valid: false };\n } else if (request.position.page >= Number.MAX_SAFE_INTEGER) {\n return { valid: false };\n }\n return { valid: true };\n }\n case 'empty': {\n const allowed = [...common, 'hasMore', 'advance'];\n if (request.position.mode === 'cursor' && completion.advance === 'next') allowed.push('nextCursor');\n if (!exactKeys(completion, allowed) || completion.hasMore !== true) return { valid: false };\n if (completion.advance !== 'next' && completion.advance !== 'retry') return { valid: false };\n if (request.position.mode === 'cursor') {\n if (completion.advance === 'next') {\n if (request.position.ordinal >= Number.MAX_SAFE_INTEGER || !isCursor(completion.nextCursor)) {\n return { valid: false };\n }\n if (cursorTokenByteLength(completion.nextCursor) > this.config.maxCursorTokenBytes) {\n return { valid: false, resourceLimit: 'cursor-token-size' };\n }\n if (this.hasCommittedCursor(completion.nextCursor)) return { valid: false };\n } else if ('nextCursor' in completion) {\n return { valid: false };\n }\n } else if ('nextCursor' in completion) {\n return { valid: false };\n } else if (completion.advance === 'next' && request.position.page >= Number.MAX_SAFE_INTEGER) {\n return { valid: false };\n }\n return { valid: true };\n }\n case 'exhausted': {\n if (\n !exactKeys(completion, [...common, 'items', 'hasMore']) ||\n !Array.isArray(completion.items) ||\n completion.hasMore !== false\n ) {\n return { valid: false };\n }\n return { valid: true };\n }\n case 'failed': {\n if (!exactKeys(completion, [...common, 'error']) || !isRecord(completion.error)) return { valid: false };\n const error = completion.error;\n if (\n !exactKeys(error, ['message', 'code', 'retryable']) ||\n typeof error.message !== 'string' ||\n error.message.trim().length === 0 ||\n (error.code !== undefined && typeof error.code !== 'string') ||\n (error.retryable !== undefined && typeof error.retryable !== 'boolean')\n ) {\n return { valid: false };\n }\n return { valid: true };\n }\n case 'cancelled': {\n const hasReason = 'reason' in completion;\n return (\n exactKeys(completion, hasReason ? [...common, 'reason'] : common) &&\n (!hasReason || completion.reason === undefined || completion.reason === 'host-cancelled')\n )\n ? { valid: true }\n : { valid: false };\n }\n default:\n return { valid: false };\n }\n }\n\n private hasCommittedCursor(cursor: PageCursor): boolean {\n return this.committedCursors.has(cursor) || (\n this.nextEligiblePosition.mode === 'cursor' && this.nextEligiblePosition.cursor === cursor\n );\n }\n\n private advanceFrom(\n request: DataRequest,\n completion: Record<string, unknown>,\n ): { position: PagePosition; lastCommittedPage: number | undefined; cursorToCommit?: PageCursor } {\n if (request.position.mode === 'page') {\n const page = request.position.page;\n return {\n position: Object.freeze({ mode: 'page' as const, page: page + 1 }),\n lastCommittedPage: page,\n };\n }\n const nextCursor = completion.nextCursor as PageCursor | undefined;\n return {\n position: Object.freeze({\n mode: 'cursor' as const,\n cursor: nextCursor,\n ordinal: request.position.ordinal + 1,\n }),\n lastCommittedPage: this.lastCommittedPage,\n cursorToCommit: nextCursor,\n };\n }\n}\n","/**\n * Enhanced Select Component\n * Implements all advanced features: infinite scroll, load more, busy state, \n * server-side selection, and full customization\n * \n * Redesigned with formal elegance, refined microinteractions, and polished UX\n */\n\nimport type { CallbackConfig, GlobalSelectConfig } from '../config/global-config.js';\nimport { selectConfig } from '../config/global-config.js';\nimport { validateDataLoadingConfig } from '../data-loading/public-config.js';\nimport type {\n DataLoadingConfigErrorDetail,\n DataLoadingStateSnapshot,\n DataProjectionEventDetail,\n DataRequestCancelNotification,\n DataRequestCompletion,\n DataRequestCompletionResult,\n EnhancedSelectAcknowledgedSurface,\n ResolvedDataLoadingConfig,\n SelectInstanceConfig,\n} from '../data-loading/public-types.js';\nimport type {\n SelectEventName,\n SelectEventsDetailMap,\n GroupedItem,\n RendererHelpers,\n ClassMap,\n SelectCapabilitiesReport,\n LimitationState,\n LimitationPolicyMap,\n KnownLimitationId,\n TrackingSnapshot,\n TrackingEntry,\n} from '../types.js';\nimport type { OptionRenderer as OptionRendererFn } from '../renderers/contracts.js';\nimport type { CloseReason, SelectKey } from '../engine/contracts.js';\nimport { createDefaultItemAdapter, type ItemAdapter } from '../engine/item-adapter.js';\nimport { createItemRegistry, type DuplicateKeyPolicy, type ItemRecord, type ItemRegistry } from '../engine/item-registry.js';\nimport type { SelectionReason, ActiveReason } from '../engine/selection-policy.js';\nimport type { SelectEvent } from '../engine/select-events.js';\nimport { computeWindowKeys, type VirtualizationScope } from '../engine/virtualization.js';\nimport { computeAccessibilityEffects, deriveAccessibilityState } from '../engine/accessibility.js';\nimport { applyAccessibilityEffects } from '../platform/web/accessibility-effects.js';\nimport { SelectEngineBridge } from '../platform/web/select-engine-bridge.js';\nimport { DefaultSelectEffectRunner } from '../platform/web/select-effect-runner.js';\nimport { SelectOption } from './select-option.js';\nimport { arrayIncludesValue } from '../utils/value-equality.js';\nimport { Virtualizer, type VirtualizerScrollResult } from '../utils/virtualizer.js';\nimport {\n DataRequestCoordinator,\n type DataCoordinatorAction,\n type DataCoordinatorConfig,\n type DataCoordinatorSnapshot,\n type DataRequest,\n type DataSearchMode,\n} from '../data-loading/request-coordinator.js';\n\ninterface PageCache {\n [page: number]: unknown[];\n}\n\ninterface SelectState {\n readonly isOpen: boolean;\n isBusy: boolean;\n isSearching: boolean;\n currentPage: number;\n totalPages: number;\n /** Compatibility projection of engine selectedKeys for rendering and legacy APIs. */\n selectedIndices: Set<number>;\n /** Registered selected records projected from engine selectedKeys. */\n selectedItems: Map<number, unknown>;\n /** Compatibility projection of engine activeKey through the current item registry. */\n activeIndex: number;\n searchQuery: string;\n loadedItems: unknown[];\n groupedItems: GroupedItem[];\n preserveScrollPosition: boolean;\n lastScrollPosition: number;\n lastNotifiedQuery: string | null;\n lastNotifiedResultCount: number;\n isExpanded: boolean;\n}\n\ninterface LegacySelectedEntry {\n key: SelectKey;\n index: number;\n item: unknown;\n}\n\ninterface EnhancedSelectRenderPlan {\n mode: 'legacy-full' | 'virtual-window';\n filteredIndices: number[];\n filteredKeys: SelectKey[];\n intendedRenderKeys: SelectKey[];\n filteredIndexByKey: ReadonlyMap<SelectKey, number>;\n}\n\ninterface AcknowledgedProjectionDiagnostic {\n requestId: string;\n queryGeneration: number;\n message: string;\n}\n\nconst LEGACY_DATA_LOADING_CONFIG: ResolvedDataLoadingConfig = {\n protocol: 'legacy',\n searchMode: 'local',\n paginationMode: 'page',\n firstPage: 1,\n};\n\nconst DATA_LOADING_CONFIG_FIELDS = ['protocol', 'searchMode', 'paginationMode', 'firstPage', 'fetchLimit'] as const;\nconst INVALID_OBJECT_VALUE = Object.freeze({ kind: 'object' });\nconst INVALID_ARRAY_VALUE = Object.freeze({ kind: 'array' });\nconst INVALID_FUNCTION_VALUE = Object.freeze({ kind: 'function' });\n\ninterface InvalidDataLoadingCandidateSignature {\n readonly rootKind: string;\n readonly rootValue: unknown;\n readonly fieldValues: readonly unknown[];\n readonly issues: readonly (readonly [string, string, string])[];\n}\n\nfunction invalidConfigValueSignature(value: unknown): unknown {\n if (value === null || (typeof value !== 'object' && typeof value !== 'function')) return value;\n if (typeof value === 'function') return INVALID_FUNCTION_VALUE;\n return Array.isArray(value) ? INVALID_ARRAY_VALUE : INVALID_OBJECT_VALUE;\n}\n\nfunction createInvalidDataLoadingCandidateSignature(\n candidate: unknown,\n issues: readonly DataLoadingConfigErrorDetail['issues'][number][],\n): InvalidDataLoadingCandidateSignature {\n const candidatePrototype = candidate !== null && typeof candidate === 'object'\n ? Object.getPrototypeOf(candidate)\n : undefined;\n const isRecord = candidate !== null\n && typeof candidate === 'object'\n && !Array.isArray(candidate)\n && (candidatePrototype === Object.prototype || candidatePrototype === null);\n const recordCandidate = isRecord ? candidate as Record<string, unknown> : undefined;\n const rootKind = isRecord\n ? 'record'\n : candidate === null\n ? 'null'\n : Array.isArray(candidate)\n ? 'array'\n : typeof candidate;\n\n return {\n rootKind,\n rootValue: candidate === null || typeof candidate !== 'object' ? candidate : undefined,\n // Compare at most five supported field values. Unknown fields are represented by their\n // validation issues below; their values are invalid regardless of shape. Signature work is\n // therefore independent of nested-value depth (and linear only in the already-built issue list).\n fieldValues: recordCandidate\n ? DATA_LOADING_CONFIG_FIELDS.map((field) => invalidConfigValueSignature(recordCandidate[field]))\n : [],\n issues: issues.map(({ path, code, message }) => [path, code, message] as const),\n };\n}\n\nfunction invalidDataLoadingSignaturesEqual(\n left: InvalidDataLoadingCandidateSignature,\n right: InvalidDataLoadingCandidateSignature,\n): boolean {\n if (left.rootKind !== right.rootKind || !Object.is(left.rootValue, right.rootValue)) return false;\n if (left.fieldValues.length !== right.fieldValues.length || left.issues.length !== right.issues.length) return false;\n for (let index = 0; index < left.fieldValues.length; index += 1) {\n if (!Object.is(left.fieldValues[index], right.fieldValues[index])) return false;\n }\n for (let index = 0; index < left.issues.length; index += 1) {\n const leftIssue = left.issues[index];\n const rightIssue = right.issues[index];\n if (leftIssue[0] !== rightIssue[0] || leftIssue[1] !== rightIssue[1] || leftIssue[2] !== rightIssue[2]) {\n return false;\n }\n }\n return true;\n}\n\nexport class EnhancedSelect extends HTMLElement implements EnhancedSelectAcknowledgedSurface {\n static get observedAttributes(): string[] {\n return ['aria-label', 'aria-description', 'aria-busy'];\n }\n\n /** live set of all connected instances; used to auto-close siblings */\n private static _instances: Set<EnhancedSelect> = new Set();\n private static readonly _MIRRORED_STYLES_SCOPE_CLASS = 'smilodon-mirrored-styles-scope';\n private static readonly _MIRRORED_STYLESHEET_CACHE_LIMIT = 32;\n private static readonly _mirroredStylesheetTextCache = new Map<string, {\n promise: Promise<string | null>;\n lastUsed: number;\n }>();\n\n private _config: GlobalSelectConfig;\n private _dataLoadingConfig: ResolvedDataLoadingConfig = { ...LEGACY_DATA_LOADING_CONFIG };\n private _dataLoadingConfigErrorCallback?: (detail: DataLoadingConfigErrorDetail) => void;\n private _dataRequestCancelCallback?: (detail: DataRequestCancelNotification) => void;\n private _dataProjectionCallback?: (detail: DataProjectionEventDetail) => void;\n private _hasLastInvalidDataLoadingCandidate = false;\n private _lastInvalidDataLoadingCandidate?: InvalidDataLoadingCandidateSignature;\n private _shadow: ShadowRoot;\n private _container: HTMLElement;\n private _inputContainer: HTMLElement;\n private _inputContent: HTMLElement;\n private _input: HTMLInputElement;\n private _dropdown: HTMLElement;\n private _optionsContainer: HTMLElement;\n private _loadMoreTrigger?: HTMLElement;\n private _acknowledgedSentinel?: HTMLDivElement;\n private _busyBucket?: HTMLElement;\n private _liveRegion?: HTMLElement;\n private _errorDescription?: HTMLElement;\n private _state: SelectState;\n private _engine: SelectEngineBridge = new SelectEngineBridge();\n private _virtualizationScope: VirtualizationScope<SelectKey> = {\n dataKeys: [],\n filteredKeys: [],\n registeredKeys: [],\n windowKeys: [],\n mountedKeys: [],\n selectedKeys: new Set(),\n activeKey: null,\n };\n private _renderPlan: EnhancedSelectRenderPlan = {\n mode: 'legacy-full',\n filteredIndices: [],\n filteredKeys: [],\n intendedRenderKeys: [],\n filteredIndexByKey: new Map(),\n };\n // Null keeps the public/default renderer on its legacy full path. This\n // private state is only used by guarded virtualization integration.\n private _guardedVirtualWindow: { startIndex: number; endIndex: number } | null = null;\n private _guardedVirtualizer: Virtualizer | null = null;\n private _guardedVirtualizationRequested = false;\n private _guardedVirtualizerKeys: SelectKey[] = [];\n private _guardedMeasurementQuery: string | null = null;\n private _guardedOptionResizeObserver: ResizeObserver | null = null;\n private _guardedObservedOptions = new Set<HTMLElement>();\n private _guardedObserverSeenOptions = new WeakSet<HTMLElement>();\n private _guardedOptionMeasurements = new WeakMap<HTMLElement, { key: SelectKey; index: number; generation: number }>();\n private _guardedMeasurementGeneration = 0;\n private _guardedVirtualScrollTop = 0;\n private _guardedVirtualViewportHeight = 0;\n private _guardedVirtualOverscan = 0;\n private _guardedVirtualWindowRafId: number | null = null;\n private _guardedScrollListenerAttached = false;\n private _onGuardedVirtualScroll = (): void => this._scheduleGuardedVirtualWindowUpdate();\n private _effectRunner = new DefaultSelectEffectRunner();\n private _itemAdapter: ItemAdapter<unknown, SelectKey> = this._createEngineItemAdapter();\n private _itemRegistry: ItemRegistry<unknown, SelectKey> = createItemRegistry([], this._itemAdapter);\n // Engine selectedKeys owns identity. The registry resolves current records;\n // this cache keeps the last known record available while a selected key is detached.\n private _selectedRecordsByKey = new Map<SelectKey, ItemRecord<unknown, SelectKey>>();\n private _registryItemsRef: unknown[] = [];\n private _pageCache: PageCache = {};\n // One coordinator owns both acknowledged and legacy-adjacent lifecycle state;\n // the public protocol remains explicitly opt-in and legacy remains default.\n private _dataRequestCoordinator: DataRequestCoordinator | null = null;\n private _acknowledgedSearchMode: DataSearchMode | null = null;\n private _acknowledgedReady = false;\n private _acknowledgedDeferredStart = false;\n private _hasEverConnected = false;\n private _acknowledgedStartTask: Promise<void> | null = null;\n private _clearAcknowledgedCoordinatorAfterProjection = false;\n private _acknowledgedConfigUpdatePending = false;\n private _acknowledgedDeferredModeChange = false;\n private _acknowledgedProjectionPending = false;\n private _acknowledgedProjectionSettling = false;\n private _acknowledgedPendingSearchQuery: string | null = null;\n private _acknowledgedProjectionFailureStageForTest: 'before-publish' | 'after-publish' | null = null;\n private _acknowledgedProjectionRunning = false;\n private _acknowledgedProjectionTask: Promise<void> | null = null;\n private _acknowledgedProjectionScrollTop = 0;\n private _acknowledgedLastRequest: DataRequest | null = null;\n private _acknowledgedProjectionCommitsPosition = false;\n private _acknowledgedProjectionRequest: DataRequest | null = null;\n private _acknowledgedProjectionAttempt = 0;\n private _acknowledgedProjectionDiagnostic: AcknowledgedProjectionDiagnostic | null = null;\n private _resizeObserver?: ResizeObserver;\n private _intersectionObserver?: IntersectionObserver;\n private _busyTimeout?: number;\n private _searchTimeout?: number;\n private _typeBuffer = '';\n private _typeTimeout?: number;\n private _uniqueId: string;\n private _hasError = false;\n private _errorMessage = '';\n private _boundArrowClick: ((e: Event) => void) | null = null;\n private _arrowContainer?: HTMLElement;\n private _clearControl?: HTMLButtonElement;\n private _clearControlIcon?: HTMLElement;\n private _pendingFirstRenderMark = false;\n private _pendingSearchRenderMark = false;\n private _rangeAnchorIndex: number | null = null;\n private _optionRenderer?: OptionRendererFn;\n private _groupHeaderRenderer?: import('../types.js').GroupHeaderRenderer;\n private _classMap?: ClassMap;\n private _rendererHelpers: RendererHelpers;\n private _customOptionBoundElements = new WeakSet<HTMLElement>();\n private _customOptionManagedActiveClasses = new WeakMap<HTMLElement, string[]>();\n private _customOptionNormalizedIds = new WeakMap<HTMLElement, string>();\n private _customOptionNormalizedLabels = new WeakMap<HTMLElement, string>();\n private _mirrorGlobalStylesForCustomOptions = false;\n private _globalStylesObserver: MutationObserver | null = null;\n private _globalStylesContainer: HTMLElement | null = null;\n private _themeContextObserver: MutationObserver | null = null;\n private _globalStylesSyncToken = 0;\n private _connectionController?: AbortController;\n private _asyncGeneration = 0;\n private _lifecycleTimers = new Set<number>();\n private _lifecycleRafs = new Set<number>();\n private _keyboardActiveChangeGeneration = 0;\n private _tracking: TrackingSnapshot = { events: [], styles: [], limitations: [] };\n private _suppressBlurClose = false;\n private _renderCycleId = 0;\n private _completedRenderCycleId = 0;\n private _renderCycleWaiters = new Map<number, (completed: boolean) => void>();\n private _renderCycleWaiterTimeouts = new Map<number, number>();\n private _suppressNextOpenClick = false;\n private _resolvedDropdownPlacement: 'bottom' | 'top' = 'bottom';\n private _multiScrollDrag = {\n active: false,\n moved: false,\n pointerId: -1,\n startX: 0,\n startScrollLeft: 0,\n };\n private _liftedAncestors: Array<{\n element: HTMLElement;\n position: string;\n zIndex: string;\n hadMarker: boolean;\n }> = [];\n\n private _onDocumentPointerDown = (e: PointerEvent): void => {\n const path = (e.composedPath && e.composedPath()) || [];\n let clickedInside = false;\n\n for (const node of path as any[]) {\n if (node === this || node === this._container) {\n clickedInside = true;\n break;\n }\n\n if (node instanceof Node) {\n try {\n if (this._shadow && this._shadow.contains(node as Node)) {\n clickedInside = true;\n break;\n }\n } catch (err) {\n // ignore\n }\n }\n\n if (node instanceof Element) {\n try {\n if (node.matches('[data-sm-selectable], [data-selectable], [data-sm-state], .input-container, .select-container, .dropdown-arrow-container, .clear-control-button')) {\n clickedInside = true;\n break;\n }\n } catch (err) {\n // ignore\n }\n }\n }\n\n if (!clickedInside) {\n this._handleClose('outside-pointer');\n }\n };\n\n get classMap(): ClassMap | undefined {\n return this._classMap;\n }\n\n set classMap(map: ClassMap | undefined) {\n if (this._areClassMapsEqual(this._classMap, map)) return;\n\n this._invalidateGuardedMeasurements();\n this._classMap = map;\n this._setGlobalStylesMirroring(Boolean(this._optionRenderer || map || this._groupHeaderRenderer));\n this._track('style', 'classMapChanged', {\n hasClassMap: Boolean(map),\n keys: map ? Object.keys(map) : [],\n });\n\n if (!this.isConnected) return;\n this._renderOptions();\n }\n\n /**\n * DOM-based renderer for group headers. When provided, the component will\n * call this function for each group during rendering. The returned element\n * will receive `.group-header` and `part=\"group-header\"` automatically.\n */\n get groupHeaderRenderer(): import('../types.js').GroupHeaderRenderer | undefined {\n return this._groupHeaderRenderer;\n }\n\n set groupHeaderRenderer(renderer: import('../types.js').GroupHeaderRenderer | undefined) {\n if (this._groupHeaderRenderer === renderer) return;\n\n this._groupHeaderRenderer = renderer;\n this._setGlobalStylesMirroring(Boolean(this._optionRenderer || this._classMap || renderer));\n this._track('style', 'groupHeaderRendererChanged', { enabled: Boolean(renderer) });\n\n if (!this.isConnected) return;\n this._renderOptions();\n }\n\n constructor() {\n super();\n \n this._shadow = this.attachShadow({ mode: 'open' });\n this._uniqueId = `enhanced-select-${Math.random().toString(36).substr(2, 9)}`;\n this._rendererHelpers = this._buildRendererHelpers();\n \n // Merge global config with component-level config\n this._config = selectConfig.getConfig() as GlobalSelectConfig;\n this._engine.dispatch({ type: 'DISABLED_CHANGED', disabled: !this._config.enabled });\n this._syncEngineSelectionConfig();\n \n // Initialize state\n const host = this;\n this._state = {\n get isOpen() {\n return host._engine.state.popup === 'open';\n },\n isBusy: false,\n isSearching: false,\n currentPage: this._config.infiniteScroll.initialPage || 1,\n totalPages: 1,\n selectedIndices: new Set(),\n selectedItems: new Map(),\n activeIndex: -1,\n searchQuery: '',\n loadedItems: [],\n groupedItems: [],\n preserveScrollPosition: false,\n lastScrollPosition: 0,\n lastNotifiedQuery: null,\n lastNotifiedResultCount: 0,\n isExpanded: false,\n };\n \n // Create DOM structure\n this._container = this._createContainer();\n this._inputContainer = this._createInputContainer();\n this._inputContent = this._createInputContent();\n this._input = this._createInput();\n this._arrowContainer = this._createArrowContainer();\n this._clearControl = this._createClearControl();\n this._dropdown = this._createDropdown();\n this._optionsContainer = this._createOptionsContainer();\n this._liveRegion = this._createLiveRegion();\n this._errorDescription = this._createErrorDescription();\n \n // Initialize styles BEFORE assembling DOM (order matters in shadow DOM)\n this._initializeStyles();\n this._syncStyleConfigVariables();\n // NOTE: _syncDirectionConfig moved to connectedCallback to comply with Web Components spec\n // (cannot call setAttribute on host element in constructor)\n this._assembleDOM();\n this._attachEventListeners();\n this._initializeObservers();\n this._syncComboboxAccessibility();\n this._syncListboxAccessibility();\n }\n\n connectedCallback(): void {\n this._hasEverConnected = true;\n // register instance\n EnhancedSelect._instances.add(this);\n this._runEngineEffects(this._engine.dispatch({ type: 'CONNECT' }));\n this._runEngineEffects(this._engine.dispatch({ type: 'DISABLED_CHANGED', disabled: !this._config.enabled }));\n this._connectionController?.abort();\n this._connectionController = new AbortController();\n document.addEventListener('pointerdown', this._onDocumentPointerDown, {\n signal: this._connectionController.signal,\n });\n\n // WORKAROUND: Force display style on host element for Angular compatibility\n // Angular's rendering seems to not apply :host styles correctly in some cases\n // Must be done in connectedCallback when element is attached to DOM\n this.style.display = 'block';\n \n // Sync direction attribute (must be in connectedCallback, not constructor)\n this._syncDirectionConfig();\n this._syncComboboxAccessibility();\n\n if (this._dataRequestCoordinator || this._dataLoadingConfig.protocol === 'acknowledged') {\n // Acknowledged dispatch remains behind the explicit readiness\n // gate; reconnect only restores observer ownership here.\n this._initializeObservers();\n }\n\n if (this._optionRenderer || this._classMap || this._groupHeaderRenderer) {\n this._setGlobalStylesMirroring(true);\n }\n \n // Load initial data if server-side is enabled\n if (this._config.serverSide.enabled && this._config.serverSide.initialSelectedValues) {\n this._loadInitialSelectedItems();\n }\n\n // Re-render options after connect so SelectOption instances created while\n // disconnected (common in Vue/Nuxt client mounting) receive connectedCallback.\n if (this._state.loadedItems.length > 0 || this._state.groupedItems.length > 0) {\n this._renderOptions();\n this._updateInputDisplay();\n }\n \n // Emit open event if configured to start open\n if (this._config.callbacks.onOpen) {\n this._config.callbacks.onOpen();\n }\n\n if (this._acknowledgedDeferredStart) {\n this._acknowledgedDeferredStart = false;\n this.startDataLoading();\n }\n }\n\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void {\n if (oldValue === newValue) return;\n if (name === 'aria-busy') {\n this._syncListboxAccessibility();\n return;\n }\n if (name !== 'aria-label' && name !== 'aria-description') return;\n this._syncComboboxAccessibility();\n if (name === 'aria-label') this._syncListboxAccessibility();\n }\n\n disconnectedCallback(): void {\n if (this._dataRequestCoordinator) {\n const actions = this._dataRequestCoordinator.disconnect();\n this._acknowledgedReady = false;\n this._dispatchAcknowledgedActions(actions);\n this._state.isBusy = false;\n this._state.isSearching = false;\n this._state.preserveScrollPosition = false;\n }\n\n // unregister instance\n EnhancedSelect._instances.delete(this);\n if (this._state.isOpen) {\n this._handleClose('disconnect');\n }\n this._runEngineEffects(this._engine.dispatch({ type: 'DISCONNECT' }));\n this._connectionController?.abort();\n this._connectionController = undefined;\n this._asyncGeneration += 1;\n this._cancelGuardedVirtualWindowUpdate();\n this._clearLifecycleTasks();\n this._destroyGuardedVirtualizer(true);\n this._virtualizationScope = {\n ...this._virtualizationScope,\n mountedKeys: [],\n };\n Array.from(this._optionsContainer.children)\n .filter((element) => element.hasAttribute('data-index') || element.hasAttribute('data-virtual-spacer'))\n .forEach((element) => element.remove());\n\n // Cleanup observers\n this._resizeObserver?.disconnect();\n this._intersectionObserver?.disconnect();\n if (this._busyTimeout) clearTimeout(this._busyTimeout);\n if (this._typeTimeout) clearTimeout(this._typeTimeout);\n if (this._searchTimeout) clearTimeout(this._searchTimeout);\n this._endMultiScrollDrag();\n \n // Cleanup arrow click listener\n if (this._boundArrowClick && this._arrowContainer) {\n this._arrowContainer.removeEventListener('click', this._boundArrowClick);\n }\n\n this._renderCycleId += 1;\n this._resolvePendingRenderCycles(false);\n\n this._teardownGlobalStylesMirroring();\n }\n\n private _setGlobalStylesMirroring(enabled: boolean): void {\n if (this._mirrorGlobalStylesForCustomOptions === enabled) {\n if (enabled && this.isConnected && !this._globalStylesObserver) {\n this._setupGlobalStylesMirroring();\n }\n return;\n }\n\n this._mirrorGlobalStylesForCustomOptions = enabled;\n this._track('style', 'globalStylesMirroringChanged', { enabled });\n\n if (enabled) {\n this._setupGlobalStylesMirroring();\n } else {\n this._teardownGlobalStylesMirroring();\n }\n }\n\n private _setLifecycleTimeout(callback: () => void, delay = 0): number {\n const id = window.setTimeout(() => {\n this._lifecycleTimers.delete(id);\n if (!this.isConnected) return;\n callback();\n }, delay);\n this._lifecycleTimers.add(id);\n return id;\n }\n\n private _requestLifecycleFrame(callback: () => void): number {\n const id = requestAnimationFrame(() => {\n this._lifecycleRafs.delete(id);\n if (!this.isConnected) return;\n callback();\n });\n this._lifecycleRafs.add(id);\n return id;\n }\n\n private _clearLifecycleTasks(): void {\n for (const id of this._lifecycleTimers) {\n clearTimeout(id);\n }\n this._lifecycleTimers.clear();\n\n for (const id of this._lifecycleRafs) {\n cancelAnimationFrame(id);\n }\n this._lifecycleRafs.clear();\n }\n\n private _setupGlobalStylesMirroring(): void {\n if (typeof document === 'undefined') return;\n if (!this._mirrorGlobalStylesForCustomOptions) return;\n\n this._setupThemeContextMirroring();\n this._mirrorDocumentStylesIntoShadow();\n\n if (this._globalStylesObserver) return;\n\n this._globalStylesObserver = new MutationObserver(() => {\n this._mirrorDocumentStylesIntoShadow();\n });\n\n this._globalStylesObserver.observe(document.head, {\n childList: true,\n subtree: true,\n attributes: true,\n characterData: true,\n });\n }\n\n private _teardownGlobalStylesMirroring(): void {\n if (this._globalStylesObserver) {\n this._globalStylesObserver.disconnect();\n this._globalStylesObserver = null;\n }\n\n if (this._themeContextObserver) {\n this._themeContextObserver.disconnect();\n this._themeContextObserver = null;\n }\n\n if (this._globalStylesContainer) {\n this._globalStylesContainer.remove();\n this._globalStylesContainer = null;\n }\n }\n\n private _mirrorDocumentStylesIntoShadow(): void {\n if (typeof document === 'undefined') return;\n if (!this._mirrorGlobalStylesForCustomOptions) return;\n\n if (!this._globalStylesContainer) {\n this._globalStylesContainer = document.createElement('div');\n this._globalStylesContainer.setAttribute('data-smilodon-global-styles', '');\n this._shadow.appendChild(this._globalStylesContainer);\n }\n\n const container = this._globalStylesContainer;\n const syncToken = ++this._globalStylesSyncToken;\n const styleNodes = Array.from(document.querySelectorAll('style,link[rel=\"stylesheet\"]'));\n\n void Promise.all(styleNodes.map((node, index) => this._createScopedGlobalStyleNode(node, index))).then((mirroredNodes) => {\n if (!this._globalStylesContainer || syncToken !== this._globalStylesSyncToken) return;\n container.replaceChildren(...mirroredNodes.filter((node): node is Node => Boolean(node)));\n this._syncMirroredThemeContext();\n });\n }\n\n private _setupThemeContextMirroring(): void {\n if (typeof document === 'undefined') return;\n\n this._syncMirroredThemeContext();\n\n if (this._themeContextObserver) return;\n\n this._themeContextObserver = new MutationObserver(() => {\n this._syncMirroredThemeContext();\n });\n\n const targets = new Set<Node>([this, document.documentElement]);\n if (document.body) {\n targets.add(document.body);\n }\n\n let ancestor: HTMLElement | null = this.parentElement;\n while (ancestor) {\n targets.add(ancestor);\n ancestor = ancestor.parentElement;\n }\n\n targets.forEach((target) => {\n this._themeContextObserver?.observe(target, {\n attributes: true,\n attributeFilter: ['class', 'dark-mode', 'darkmode', 'data-theme', 'theme'],\n });\n });\n }\n\n private _syncMirroredThemeContext(): void {\n const scopeTarget = this._optionsContainer;\n if (!scopeTarget) return;\n\n const darkSelectors = [\n '.dark-mode',\n '.dark',\n '[dark-mode]',\n '[darkmode]',\n '[data-theme=\"dark\"]',\n '[theme=\"dark\"]',\n ];\n\n const isDark = darkSelectors.some((selector) => this.matches(selector) || Boolean(this.closest(selector)))\n || document.documentElement.matches('.dark-mode, .dark, [dark-mode], [darkmode], [data-theme=\"dark\"], [theme=\"dark\"]')\n || Boolean(document.body?.matches('.dark-mode, .dark, [dark-mode], [darkmode], [data-theme=\"dark\"], [theme=\"dark\"]'));\n\n scopeTarget.classList.toggle('dark', isDark);\n scopeTarget.classList.toggle('dark-mode', isDark);\n\n if (isDark) {\n scopeTarget.setAttribute('dark-mode', '');\n scopeTarget.setAttribute('data-theme', 'dark');\n scopeTarget.setAttribute('theme', 'dark');\n } else {\n scopeTarget.removeAttribute('dark-mode');\n scopeTarget.removeAttribute('data-theme');\n scopeTarget.removeAttribute('theme');\n }\n }\n\n private async _createScopedGlobalStyleNode(node: Element, index: number): Promise<Node | null> {\n if (node instanceof HTMLStyleElement) {\n return this._buildScopedStyleElement(node.textContent || '', String(index));\n }\n\n if (node instanceof HTMLLinkElement && node.href) {\n const credentials: RequestCredentials = node.crossOrigin === 'use-credentials' ? 'include' : 'same-origin';\n const cacheKey = `${node.href}|${credentials}`;\n let cacheEntry = EnhancedSelect._mirroredStylesheetTextCache.get(cacheKey);\n\n if (!cacheEntry) {\n cacheEntry = {\n promise: fetch(node.href, {\n credentials,\n mode: 'cors',\n })\n .then((response) => {\n if (!response.ok) return null;\n return response.text();\n })\n .catch(() => null),\n lastUsed: Date.now(),\n };\n\n EnhancedSelect._mirroredStylesheetTextCache.set(cacheKey, cacheEntry);\n EnhancedSelect._pruneMirroredStylesheetTextCache();\n } else {\n cacheEntry.lastUsed = Date.now();\n }\n\n const cssText = await cacheEntry.promise;\n if (cssText === null) {\n EnhancedSelect._mirroredStylesheetTextCache.delete(cacheKey);\n return null;\n }\n\n return this._buildScopedStyleElement(cssText, String(index));\n }\n\n return null;\n }\n\n private static _pruneMirroredStylesheetTextCache(): void {\n while (EnhancedSelect._mirroredStylesheetTextCache.size > EnhancedSelect._MIRRORED_STYLESHEET_CACHE_LIMIT) {\n let lruKey: string | undefined;\n let oldest = Infinity;\n\n for (const [key, entry] of EnhancedSelect._mirroredStylesheetTextCache.entries()) {\n if (entry.lastUsed < oldest) {\n oldest = entry.lastUsed;\n lruKey = key;\n }\n }\n\n if (!lruKey) return;\n EnhancedSelect._mirroredStylesheetTextCache.delete(lruKey);\n }\n }\n\n private _areClassMapsEqual(left: ClassMap | undefined, right: ClassMap | undefined): boolean {\n if (left === right) return true;\n if (!left || !right) return false;\n\n const leftKeys = Object.keys(left);\n const rightKeys = Object.keys(right);\n if (leftKeys.length !== rightKeys.length) return false;\n\n return leftKeys.every((key) => left[key] === right[key]);\n }\n\n private _buildScopedStyleElement(cssText: string, id: string): HTMLStyleElement | null {\n const scopedCss = this._scopeMirroredCssText(cssText);\n if (!scopedCss.trim()) return null;\n\n const style = document.createElement('style');\n style.setAttribute('data-smilodon-global-style', id);\n style.textContent = scopedCss;\n return style;\n }\n\n private _scopeMirroredCssText(cssText: string): string {\n if (!cssText.trim()) return '';\n\n try {\n if (typeof CSSStyleSheet !== 'undefined' && 'replaceSync' in CSSStyleSheet.prototype) {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(cssText);\n return this._serializeScopedCssRules(Array.from(sheet.cssRules));\n }\n } catch (_error) {\n // CSSStyleSheet API failed, use fallback parser for test environments (JSDOM)\n return this._scopeMirroredCssTextFallback(cssText);\n }\n\n // Fallback for environments without CSSStyleSheet.replaceSync\n return this._scopeMirroredCssTextFallback(cssText);\n }\n\n /**\n * Fallback CSS parser for environments where CSSStyleSheet API is unavailable (e.g., JSDOM).\n * Performs simple text-based CSS rule scoping.\n */\n private _scopeMirroredCssTextFallback(cssText: string): string {\n if (!cssText.trim()) return '';\n \n const result: string[] = [];\n \n // Match CSS rules with a simple regex (handles basic cases for testing)\n // This won't handle all edge cases but works for common CSS patterns\n const ruleRegex = /([^{}]+)\\{([^{}]+)\\}/g;\n let match;\n \n while ((match = ruleRegex.exec(cssText)) !== null) {\n const selectorText = match[1].trim();\n const declarations = match[2].trim();\n \n // Skip @-rules (media, keyframes, etc.) - would need more complex parsing\n if (selectorText.startsWith('@')) {\n continue;\n }\n \n // Split multiple selectors and scope each one\n const selectors = this._splitSelectorList(selectorText)\n .map((selector) => this._scopeMirroredSelector(selector))\n .filter(Boolean);\n \n if (selectors.length > 0) {\n result.push(`${selectors.join(', ')} { ${declarations} }`);\n }\n }\n \n return result.join('\\n');\n }\n\n private _serializeScopedCssRules(rules: CSSRule[]): string {\n return rules.map((rule) => this._serializeScopedCssRule(rule)).filter(Boolean).join('\\n');\n }\n\n private _serializeScopedCssRule(rule: CSSRule): string {\n if (rule instanceof CSSStyleRule) {\n const selectors = this._splitSelectorList(rule.selectorText)\n .map((selector) => this._scopeMirroredSelector(selector))\n .filter(Boolean);\n\n if (selectors.length === 0) return '';\n return `${selectors.join(', ')} { ${rule.style.cssText} }`;\n }\n\n if (rule instanceof CSSMediaRule) {\n const nested = this._serializeScopedCssRules(Array.from(rule.cssRules));\n return nested ? `@media ${rule.conditionText} { ${nested} }` : '';\n }\n\n if (typeof CSSSupportsRule !== 'undefined' && rule instanceof CSSSupportsRule) {\n const nested = this._serializeScopedCssRules(Array.from(rule.cssRules));\n return nested ? `@supports ${rule.conditionText} { ${nested} }` : '';\n }\n\n if (rule instanceof CSSFontFaceRule || rule instanceof CSSKeyframesRule) {\n return rule.cssText;\n }\n\n const nestedRule = rule as CSSRule & { cssRules?: CSSRuleList; name?: string; conditionText?: string };\n if (nestedRule.cssRules) {\n const nested = this._serializeScopedCssRules(Array.from(nestedRule.cssRules));\n if (!nested) return '';\n\n const ctorName = nestedRule.constructor?.name ?? '';\n if (ctorName.includes('Layer')) {\n return `@layer ${nestedRule.name ?? ''} { ${nested} }`;\n }\n if (ctorName.includes('Container')) {\n return `@container ${nestedRule.conditionText ?? ''} { ${nested} }`;\n }\n }\n\n return '';\n }\n\n private _splitSelectorList(selectorText: string): string[] {\n const selectors: string[] = [];\n let current = '';\n let depthRound = 0;\n let depthSquare = 0;\n\n for (const char of selectorText) {\n if (char === '(') depthRound += 1;\n if (char === ')') depthRound = Math.max(0, depthRound - 1);\n if (char === '[') depthSquare += 1;\n if (char === ']') depthSquare = Math.max(0, depthSquare - 1);\n\n if (char === ',' && depthRound === 0 && depthSquare === 0) {\n if (current.trim()) selectors.push(current.trim());\n current = '';\n continue;\n }\n\n current += char;\n }\n\n if (current.trim()) selectors.push(current.trim());\n return selectors;\n }\n\n private _scopeMirroredSelector(selector: string): string {\n const scopeClass = `.${EnhancedSelect._MIRRORED_STYLES_SCOPE_CLASS}`;\n\n let scopedSelector = selector\n .replace(/(^|\\s|>|\\+|~)(:root|html|body)(?=\\b|\\s|[.#[:>+~]|$)/g, `$1${scopeClass}`);\n\n const themePatterns = [\n /\\.dark-mode(?![\\w-]|\\\\:)/g,\n /\\.dark(?![\\w-]|\\\\:)/g,\n /\\[dark-mode\\]/g,\n /\\[darkmode\\]/g,\n /\\[data-theme=(?:\"dark\"|'dark'|dark)\\]/g,\n /\\[theme=(?:\"dark\"|'dark'|dark)\\]/g,\n ];\n\n let injectedThemeScope = false;\n themePatterns.forEach((pattern) => {\n scopedSelector = scopedSelector.replace(pattern, (match) => {\n injectedThemeScope = true;\n return `${match}${scopeClass}`;\n });\n });\n\n if (!scopedSelector.includes(EnhancedSelect._MIRRORED_STYLES_SCOPE_CLASS) && !injectedThemeScope) {\n scopedSelector = `${scopeClass} ${scopedSelector}`;\n }\n\n return scopedSelector;\n }\n\n private _normalizeCustomOptionAccessibility(optionEl: HTMLElement, meta: {\n label: string;\n disabled: boolean;\n }): void {\n const previousNormalizedLabel = this._customOptionNormalizedLabels.get(optionEl);\n const currentAriaLabel = optionEl.getAttribute('aria-label');\n const canRefreshNormalizedLabel = previousNormalizedLabel !== undefined\n && currentAriaLabel === previousNormalizedLabel;\n if (!optionEl.hasAttribute('aria-labelledby') && (!currentAriaLabel || canRefreshNormalizedLabel)) {\n optionEl.setAttribute('aria-label', meta.label);\n this._customOptionNormalizedLabels.set(optionEl, meta.label);\n } else {\n this._customOptionNormalizedLabels.delete(optionEl);\n }\n\n const nestedFocusableSelectors = [\n 'a[href]',\n 'button',\n 'input',\n 'select',\n 'textarea',\n 'summary',\n '[tabindex]',\n '[contenteditable=\"\"]',\n '[contenteditable=\"true\"]',\n '[role=\"button\"]',\n '[role=\"link\"]',\n '[role=\"checkbox\"]',\n '[role=\"switch\"]',\n '[role=\"radio\"]',\n '[role=\"textbox\"]',\n ].join(', ');\n\n optionEl.querySelectorAll<HTMLElement>(nestedFocusableSelectors).forEach((child) => {\n if (child === optionEl) return;\n\n child.tabIndex = -1;\n\n if (!child.hasAttribute('data-smilodon-keep-role')) {\n child.setAttribute('role', 'presentation');\n }\n\n if ((meta.disabled || child.matches('button, input, select, textarea, summary, a[href]')) && !child.hasAttribute('data-smilodon-keep-aria')) {\n child.setAttribute('aria-hidden', 'true');\n }\n });\n }\n\n private _createContainer(): HTMLElement {\n const container = document.createElement('div');\n container.className = 'select-container';\n \n if (this._config.styles.classNames?.container) {\n container.className += ' ' + this._config.styles.classNames.container;\n }\n \n if (this._config.styles.container) {\n Object.assign(container.style, this._config.styles.container);\n }\n \n return container;\n }\n\n private _createInputContainer(): HTMLElement {\n const container = document.createElement('div');\n container.className = 'input-container';\n container.setAttribute('part', 'button');\n\n const inputStyles = this._config.styles.input;\n if (inputStyles && !this._config.styles.container) {\n const shellStyleKeys = [\n 'background',\n 'backgroundColor',\n 'border',\n 'borderColor',\n 'borderStyle',\n 'borderWidth',\n 'borderRadius',\n 'boxShadow',\n 'padding',\n 'height',\n 'minHeight',\n 'maxHeight',\n ] as const;\n\n for (const key of shellStyleKeys) {\n const value = (inputStyles as any)[key];\n if (value != null && value !== '') {\n (container.style as any)[key] = value;\n }\n }\n }\n\n return container;\n }\n\n private _createInputContent(): HTMLElement {\n const content = document.createElement('div');\n content.className = 'input-content';\n return content;\n }\n\n private _setCssVariable(name: string, value: unknown): void {\n if (value == null || value === '') {\n this.style.removeProperty(name);\n return;\n }\n\n this.style.setProperty(name, String(value));\n }\n\n private _applyStyleVariableMap(\n styleConfig: Record<string, unknown> | undefined,\n variableMap: Record<string, string>,\n ): void {\n Object.entries(variableMap).forEach(([styleKey, variableName]) => {\n this._setCssVariable(variableName, (styleConfig as Record<string, unknown> | undefined)?.[styleKey]);\n });\n }\n\n private _getDisabledOptionBehavior() {\n const behavior = this._config.selection.disabledOptionBehavior ?? {};\n return {\n selectable: behavior.selectable === true,\n hoverable: behavior.hoverable === true,\n focusable: behavior.focusable === true,\n };\n }\n\n private _isDisabledOptionSelectable(item: unknown): boolean {\n return Boolean((item as any)?.disabled) && this._getDisabledOptionBehavior().selectable;\n }\n\n private _isOptionSelectionBlocked(item: unknown): boolean {\n return Boolean((item as any)?.disabled) && !this._isDisabledOptionSelectable(item);\n }\n\n private _isPhase2DevRuntime(): boolean {\n const env = (globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV;\n return env !== 'production';\n }\n\n private _getDuplicateKeyPolicy(): DuplicateKeyPolicy {\n return this._isPhase2DevRuntime() ? 'throw' : 'warn';\n }\n\n private _warnPhase2(message: string): void {\n if (this._isPhase2DevRuntime() && typeof console !== 'undefined') {\n console.warn(message);\n }\n }\n\n private _getItemValue(item: unknown): unknown {\n return this._config.serverSide.getValueFromItem?.(item) ?? (item as any)?.value ?? item;\n }\n\n private _getItemLabel(item: unknown): string {\n return this._config.serverSide.getLabelFromItem?.(item) ?? (item as any)?.label ?? String(item);\n }\n\n private _createEngineItemAdapter(): ItemAdapter<unknown, SelectKey> {\n return createDefaultItemAdapter({\n getValue: (item) => this._getItemValue(item),\n getLabel: (item) => this._getItemLabel(item),\n isDisabled: (item) => Boolean((item as any)?.disabled),\n getGroupKey: (item) => {\n const group = (item as { group?: unknown } | null)?.group;\n return group == null ? null : String(group);\n },\n onIndexFallback: (message) => this._warnPhase2(message),\n });\n }\n\n private _getBlockedDisabledKeys(): SelectKey[] {\n const keys = this._itemRegistry.records\n .filter((record) => record.disabled && this._isOptionSelectionBlocked(record.item))\n .map((record) => record.key);\n for (const entry of this._getSelectedEntries()) {\n if (this._isOptionSelectionBlocked(entry.item)) keys.push(entry.key);\n }\n return keys;\n }\n\n private _syncEngineSelectionConfig(): void {\n const required = Boolean(this._input?.hasAttribute('required'));\n const disabledKeys = this._getBlockedDisabledKeys();\n this._engine.dispatch({\n type: 'SELECTION_CONFIG_CHANGED',\n multiple: this._config.selection.mode === 'multi',\n required,\n allowDeselect: this._config.selection.allowDeselect === true,\n maxSelections: this._config.selection.maxSelections ?? 0,\n disabledKeys,\n });\n if (this._state) {\n this._syncLegacySelectionFromEngine();\n this._syncLegacyActiveFromEngine();\n this._assertSelectionProjection('selection config');\n this._assertActiveProjection('selection config');\n }\n }\n\n private _rebuildItemRegistry(\n items: unknown[] = this._state.loadedItems,\n stagedRegistry?: ItemRegistry<unknown, SelectKey>,\n ): void {\n // Build first so duplicate-key rejection leaves the previous runtime intact.\n const registry = stagedRegistry ?? createItemRegistry(items, this._itemAdapter, {\n duplicateKeyPolicy: this._getDuplicateKeyPolicy(),\n });\n const activeKey = this._engine.state.activeKey;\n const anchorKey = this._rangeAnchorIndex === null ? undefined : this._itemRegistry.indexToKey.get(this._rangeAnchorIndex);\n this._itemRegistry = registry;\n this._state.loadedItems = items;\n this._registryItemsRef = items;\n const disabledKeys = this._getBlockedDisabledKeys();\n this._rangeAnchorIndex = anchorKey === undefined ? null : registry.keyToIndex.get(anchorKey) ?? null;\n this._engine.dispatch({\n type: 'ITEMS_REGISTERED',\n keys: registry.records.map((record) => record.key),\n disabledKeys,\n });\n if (activeKey !== null && registry.keyToRecord.get(activeKey)?.disabled) {\n this._dispatchActiveKey(null, 'programmatic', 'items registered with disabled active key');\n } else {\n this._syncLegacyActiveFromEngine();\n }\n this._syncLegacySelectionFromEngine();\n this._syncEngineSelectionConfig();\n this._assertSelectionProjection('items registered');\n }\n\n private _ensureRegistryCurrent(): void {\n if (\n this._registryItemsRef !== this._state.loadedItems\n || this._itemRegistry.records.length !== this._state.loadedItems.length\n || this._itemRegistry.records.some((record, index) => record.item !== this._state.loadedItems[index])\n ) {\n this._rebuildItemRegistry();\n return;\n }\n\n this._syncLegacySelectionFromEngine();\n this._syncLegacyActiveFromEngine();\n this._assertSelectionProjection('registry read');\n this._assertActiveProjection('registry read');\n }\n\n private _getRecordByIndex(index: number): ItemRecord<unknown, SelectKey> | null {\n const key = this._itemRegistry.indexToKey.get(index);\n return key === undefined ? null : this._itemRegistry.keyToRecord.get(key) ?? null;\n }\n\n private _getSelectedEntries(): LegacySelectedEntry[] {\n const entries: LegacySelectedEntry[] = [];\n if (!this._state) return entries;\n for (const key of this._engine.state.selectedKeys) {\n const record = this._itemRegistry.keyToRecord.get(key) ?? this._selectedRecordsByKey.get(key);\n if (record) entries.push({ key, index: record.index, item: record.item });\n }\n return entries;\n }\n\n private _syncLegacySelectionFromEngine(): void {\n const selectedIndices = new Set<number>();\n const selectedItems = new Map<number, unknown>();\n const selectedKeys = this._engine.state.selectedKeys;\n\n for (const key of [...this._selectedRecordsByKey.keys()]) {\n if (!selectedKeys.has(key)) this._selectedRecordsByKey.delete(key);\n }\n\n for (const key of selectedKeys) {\n const record = this._itemRegistry.keyToRecord.get(key);\n if (record) this._selectedRecordsByKey.set(key, record);\n if (!record) continue;\n selectedIndices.add(record.index);\n selectedItems.set(record.index, record.item);\n }\n\n this._state.selectedIndices = selectedIndices;\n this._state.selectedItems = selectedItems;\n }\n\n private _projectedSelectedKeysSnapshot(): Set<SelectKey> {\n return new Set([...this._state.selectedIndices]\n .map((index) => this._itemRegistry.indexToKey.get(index))\n .filter((key): key is SelectKey => key !== undefined));\n }\n\n private _assertSelectionProjection(context: string): void {\n if (!this._isPhase2DevRuntime()) return;\n const legacyKeys = this._projectedSelectedKeysSnapshot();\n const engineKeys = this._engine.state.selectedKeys;\n if (\n this._state.selectedItems.size !== this._state.selectedIndices.size\n || [...this._state.selectedIndices].some((index) => !this._state.selectedItems.has(index))\n || [...engineKeys].some((key) => this._itemRegistry.keyToRecord.has(key) && !legacyKeys.has(key))\n || [...legacyKeys].some((key) => !engineKeys.has(key))\n ) {\n throw new Error(`[Smilodon Phase2] Selection projection failed in ${context}: compatibility=${JSON.stringify([...legacyKeys])}, engine=${JSON.stringify([...engineKeys])}`);\n }\n }\n\n private _projectedActiveKeySnapshot(): SelectKey | null {\n return this._state.activeIndex < 0\n ? null\n : this._itemRegistry.indexToKey.get(this._state.activeIndex) ?? null;\n }\n\n private _syncLegacyActiveFromEngine(): void {\n const activeKey = this._engine.state.activeKey;\n this._state.activeIndex = activeKey === null\n ? -1\n : this._itemRegistry.keyToIndex.get(activeKey) ?? -1;\n this._syncLegacyActiveAria();\n }\n\n private _assertActiveProjection(context: string): void {\n if (!this._isPhase2DevRuntime()) return;\n const legacyKey = this._projectedActiveKeySnapshot();\n const engineKey = this._engine.state.activeKey;\n if (legacyKey !== engineKey && !Object.is(legacyKey, engineKey)) {\n throw new Error(`[Smilodon Phase2] Active projection failed in ${context}: compatibility=${String(legacyKey)}, engine=${String(engineKey)}`);\n }\n }\n\n private _dispatchActiveKey(key: SelectKey | null, reason: ActiveReason, context: string): void {\n const effects = this._engine.dispatch({ type: 'ACTIVE_KEY_CHANGED', key, reason });\n this._runEngineEffects(effects);\n this._syncLegacyActiveFromEngine();\n this._assertActiveProjection(context);\n }\n\n private _clearDisabledEngineActive(context: string): void {\n const activeKey = this._engine.state.activeKey;\n if (activeKey !== null && this._itemRegistry.keyToRecord.get(activeKey)?.disabled) {\n this._dispatchActiveKey(null, 'programmatic', context);\n } else {\n this._syncLegacyActiveFromEngine();\n this._assertActiveProjection(context);\n }\n }\n\n /**\n * @deprecated Test/backward-compatibility shim. Production active-state authority is engine.activeKey.\n * Kept for existing renderer tests; component mutation paths dispatch by key.\n */\n private _mirrorLegacyActive(reason: ActiveReason, context: string): void {\n this._dispatchActiveKey(this._projectedActiveKeySnapshot(), reason, context);\n }\n\n private _dispatchSelection(event: SelectEvent, context: string): void {\n this._engine.dispatch(event);\n this._syncLegacySelectionFromEngine();\n this._assertSelectionProjection(context);\n }\n\n /**\n * @deprecated Test/backward-compatibility shim. Production selection authority is engine.selectedKeys.\n * Kept for existing styling tests; dispatches to engine authority.\n */\n private _mirrorLegacySelection(event: SelectEvent, context: string): void {\n this._dispatchSelection(event, context);\n }\n\n private _requestSelectionReplacement(entries: readonly LegacySelectedEntry[], reason: SelectionReason, context: string): void {\n for (const entry of entries) {\n const record = this._itemRegistry.keyToRecord.get(entry.key) ?? this._selectedRecordsByKey.get(entry.key);\n this._selectedRecordsByKey.set(entry.key, record ?? {\n key: entry.key,\n item: entry.item,\n index: entry.index,\n label: this._getItemLabel(entry.item),\n value: this._getItemValue(entry.item),\n disabled: Boolean((entry.item as { disabled?: boolean } | null)?.disabled),\n groupKey: (entry.item as { group?: unknown } | null)?.group == null\n ? null\n : String((entry.item as { group?: unknown }).group),\n });\n }\n this._dispatchSelection({ type: 'REPLACE_SELECTION_REQUEST', keys: entries.map(({ key }) => key), reason }, context);\n }\n\n private _registerShadowItems(indices: readonly number[]): void {\n const keys = indices.map((index) => this._itemRegistry.indexToKey.get(index)).filter((key): key is SelectKey => key !== undefined);\n this._engine.dispatch({ type: 'ITEMS_REGISTERED', keys, disabledKeys: this._getBlockedDisabledKeys() });\n this._clearDisabledEngineActive('visible items');\n this._assertSelectionProjection('visible items');\n }\n\n private _syncLegacyActiveAria(): void {\n this._syncComboboxAccessibility();\n }\n\n private _syncStyleConfigVariables(): void {\n const styles = this._config.styles;\n if (!styles) return;\n\n this._applyStyleVariableMap(styles.option, {\n background: '--select-option-bg',\n backgroundColor: '--select-option-bg',\n color: '--select-option-color',\n border: '--select-option-border',\n borderBottom: '--select-option-border-bottom',\n borderRadius: '--select-option-border-radius',\n boxShadow: '--select-option-shadow',\n transform: '--select-option-transform',\n padding: '--select-option-padding',\n margin: '--select-option-margin',\n fontSize: '--select-option-font-size',\n fontWeight: '--select-option-font-weight',\n lineHeight: '--select-option-line-height',\n textAlign: '--select-option-text-align',\n });\n\n this._applyStyleVariableMap(styles.selectedOption, {\n background: '--select-option-selected-bg',\n backgroundColor: '--select-option-selected-bg',\n color: '--select-option-selected-color',\n border: '--select-option-selected-border',\n borderBottom: '--select-option-selected-border-bottom',\n borderRadius: '--select-option-selected-border-radius',\n boxShadow: '--select-option-selected-shadow',\n transform: '--select-option-selected-transform',\n fontWeight: '--select-option-selected-weight',\n });\n\n this._applyStyleVariableMap(styles.hoverOption, {\n background: '--select-option-hover-bg',\n backgroundColor: '--select-option-hover-bg',\n color: '--select-option-hover-color',\n border: '--select-option-hover-border',\n borderBottom: '--select-option-hover-border-bottom',\n boxShadow: '--select-option-hover-shadow',\n transform: '--select-option-hover-transform',\n });\n\n this._applyStyleVariableMap(styles.activeOption, {\n background: '--select-option-active-bg',\n backgroundColor: '--select-option-active-bg',\n color: '--select-option-active-color',\n border: '--select-option-active-border',\n outline: '--select-option-active-outline',\n outlineOffset: '--select-option-active-outline-offset',\n boxShadow: '--select-option-active-shadow',\n transform: '--select-option-active-transform',\n });\n\n this._applyStyleVariableMap(styles.disabledOption, {\n background: '--select-option-disabled-bg',\n backgroundColor: '--select-option-disabled-bg',\n color: '--select-option-disabled-color',\n border: '--select-option-disabled-border',\n borderBottom: '--select-option-disabled-border-bottom',\n opacity: '--select-option-disabled-opacity',\n cursor: '--select-option-disabled-cursor',\n });\n\n this._applyStyleVariableMap(styles.selectedIndicator, {\n width: '--select-option-selected-indicator-width',\n height: '--select-option-selected-indicator-height',\n background: '--select-option-selected-indicator-bg',\n backgroundColor: '--select-option-selected-indicator-bg',\n borderRadius: '--select-option-selected-indicator-radius',\n left: '--select-option-selected-indicator-left',\n right: '--select-option-selected-indicator-right',\n top: '--select-option-selected-indicator-top',\n transform: '--select-option-selected-indicator-transform',\n animation: '--select-option-selected-indicator-animation',\n });\n\n this._setCssVariable(\n '--select-option-selected-indicator-display',\n this._config.selection.showSelectedIndicator === false\n ? 'none'\n : (styles.selectedIndicator as Record<string, unknown> | undefined)?.display\n );\n\n this._applyStyleVariableMap(styles.badge, {\n width: '--select-badge-width',\n minWidth: '--select-badge-min-width',\n maxWidth: '--select-badge-max-width',\n height: '--select-badge-height',\n minHeight: '--select-badge-min-height',\n padding: '--select-badge-padding',\n margin: '--select-badge-margin',\n gap: '--select-badge-gap',\n background: '--select-badge-bg',\n backgroundColor: '--select-badge-bg',\n color: '--select-badge-color',\n border: '--select-badge-border',\n borderRadius: '--select-badge-border-radius',\n boxShadow: '--select-badge-shadow',\n fontSize: '--select-badge-font-size',\n fontWeight: '--select-badge-font-weight',\n lineHeight: '--select-badge-line-height',\n letterSpacing: '--select-badge-letter-spacing',\n });\n\n this._applyStyleVariableMap(styles.badgeHover, {\n background: '--select-badge-hover-bg',\n backgroundColor: '--select-badge-hover-bg',\n color: '--select-badge-hover-color',\n border: '--select-badge-hover-border',\n boxShadow: '--select-badge-hover-shadow',\n transform: '--select-badge-hover-transform',\n });\n\n this._applyStyleVariableMap(styles.badgeActive, {\n background: '--select-badge-active-bg',\n backgroundColor: '--select-badge-active-bg',\n color: '--select-badge-active-color',\n border: '--select-badge-active-border',\n boxShadow: '--select-badge-active-shadow',\n transform: '--select-badge-active-transform',\n });\n\n this._applyStyleVariableMap(styles.badgeLabel, {\n color: '--select-badge-label-color',\n fontSize: '--select-badge-label-font-size',\n fontWeight: '--select-badge-label-font-weight',\n lineHeight: '--select-badge-label-line-height',\n letterSpacing: '--select-badge-label-letter-spacing',\n textAlign: '--select-badge-label-text-align',\n });\n\n this._applyStyleVariableMap(styles.badgeRemove, {\n width: '--select-badge-remove-size',\n height: '--select-badge-remove-size',\n minWidth: '--select-badge-remove-min-width',\n minHeight: '--select-badge-remove-min-height',\n marginLeft: '--select-badge-remove-margin-left',\n background: '--select-badge-remove-bg',\n backgroundColor: '--select-badge-remove-bg',\n border: '--select-badge-remove-border',\n borderRadius: '--select-badge-remove-radius',\n color: '--select-badge-remove-color',\n fontSize: '--select-badge-remove-font-size',\n fontWeight: '--select-badge-remove-font-weight',\n });\n\n this._applyStyleVariableMap(styles.badgeRemoveIcon, {\n width: '--select-badge-remove-icon-size',\n height: '--select-badge-remove-icon-size',\n color: '--select-badge-remove-icon-color',\n fontSize: '--select-badge-remove-icon-font-size',\n lineHeight: '--select-badge-remove-icon-line-height',\n transform: '--select-badge-remove-icon-transform',\n opacity: '--select-badge-remove-icon-opacity',\n });\n\n this._applyStyleVariableMap(styles.badgeRemoveHover, {\n background: '--select-badge-remove-hover-bg',\n backgroundColor: '--select-badge-remove-hover-bg',\n color: '--select-badge-remove-hover-color',\n border: '--select-badge-remove-hover-border',\n boxShadow: '--select-badge-remove-hover-shadow',\n transform: '--select-badge-remove-hover-transform',\n });\n\n this._applyStyleVariableMap(styles.badgeRemoveActive, {\n background: '--select-badge-remove-active-bg',\n backgroundColor: '--select-badge-remove-active-bg',\n color: '--select-badge-remove-active-color',\n border: '--select-badge-remove-active-border',\n boxShadow: '--select-badge-remove-active-shadow',\n transform: '--select-badge-remove-active-transform',\n });\n\n this._applyStyleVariableMap(styles.groupHeader, {\n padding: '--select-group-header-padding',\n margin: '--select-group-header-margin',\n color: '--select-group-header-color',\n background: '--select-group-header-bg',\n backgroundColor: '--select-group-header-bg',\n border: '--select-group-header-border',\n borderBottom: '--select-group-header-border-bottom',\n borderRadius: '--select-group-header-border-radius',\n boxShadow: '--select-group-header-shadow',\n textAlign: '--select-group-header-text-align',\n fontSize: '--select-group-header-font-size',\n fontWeight: '--select-group-header-weight',\n textTransform: '--select-group-header-text-transform',\n letterSpacing: '--select-group-header-letter-spacing',\n });\n }\n\n private _resolveDropdownPlacement(): 'bottom' | 'top' {\n const placementMode = this._config.dropdownPlacement?.mode ?? 'bottom';\n if (placementMode === 'bottom' || placementMode === 'top') {\n return placementMode;\n }\n\n const hostRect = this._container.getBoundingClientRect();\n const availableBelow = window.innerHeight - hostRect.bottom;\n const computedDropdown = window.getComputedStyle(this._dropdown);\n const maxHeight = Number.parseFloat(computedDropdown.maxHeight || '0');\n const desiredHeight = Number.isFinite(maxHeight) && maxHeight > 0\n ? Math.min(this._dropdown.scrollHeight, maxHeight)\n : this._dropdown.scrollHeight;\n\n return availableBelow >= desiredHeight ? 'bottom' : 'top';\n }\n\n private _syncDropdownPlacement(): void {\n if (!this._dropdown) return;\n\n this._resolvedDropdownPlacement = this._resolveDropdownPlacement();\n this._dropdown.setAttribute('data-placement', this._resolvedDropdownPlacement);\n }\n\n private _syncDirectionConfig(): void {\n if (!this.isConnected) return;\n this.setAttribute('dir', this._config.direction ?? 'ltr');\n }\n\n private _setIconContent(target: HTMLElement, markup: string | undefined, fallback: string): void {\n const content = markup && markup.trim() ? markup : fallback;\n target.innerHTML = '';\n\n if (content.trim().startsWith('<')) {\n target.innerHTML = content;\n return;\n }\n\n target.textContent = content;\n }\n\n private _syncInputContainerMode(): void {\n if (!this._inputContainer || !this._input) return;\n\n const isMulti = this._config.selection.mode === 'multi';\n this._inputContainer.classList.toggle('input-container--multi', isMulti);\n this._inputContainer.classList.toggle('input-container--single', !isMulti);\n\n if (isMulti) {\n this._input.style.flex = '1 0 var(--select-multi-input-min-width, 96px)';\n this._input.style.width = 'auto';\n this._input.style.minWidth = 'var(--select-multi-input-min-width, 96px)';\n } else {\n this._input.style.flex = '1 1 auto';\n this._input.style.width = '100%';\n this._input.style.minWidth = '0';\n }\n\n this._syncMultiSelectDisplayConfig();\n }\n\n private _syncMultiSelectDisplayConfig(): void {\n if (!this._inputContainer || !this._input) return;\n\n const isMulti = this._config.selection.mode === 'multi';\n const mode = this._config.multiSelectDisplay?.mode ?? 'wrap';\n const dragEnabled = this._config.multiSelectDisplay?.dragScroll !== false;\n\n if (!isMulti) {\n this._inputContainer.removeAttribute('data-multi-scroll-mode');\n this._inputContainer.removeAttribute('data-drag-scroll');\n this._inputContainer.classList.remove('is-dragging-scroll');\n this._inputContainer.style.removeProperty('--select-multi-input-max-height-config');\n this._inputContainer.style.removeProperty('--select-multi-input-overflow-x-config');\n this._inputContainer.style.removeProperty('--select-multi-input-overflow-y-config');\n this._inputContainer.style.removeProperty('--select-multi-input-flex-wrap-config');\n this._inputContainer.style.removeProperty('--select-multi-input-align-content-config');\n return;\n }\n\n const configuredMaxHeight = this._config.multiSelectDisplay?.maxHeight;\n const defaultMaxHeight = '160px';\n\n let maxHeight = configuredMaxHeight ?? 'none';\n let overflowX = this._config.multiSelectDisplay?.overflowX ?? 'hidden';\n let overflowY = this._config.multiSelectDisplay?.overflowY ?? 'hidden';\n let flexWrap = 'wrap';\n let alignContent = 'flex-start';\n\n if (mode === 'vertical') {\n maxHeight = configuredMaxHeight ?? defaultMaxHeight;\n overflowY = this._config.multiSelectDisplay?.overflowY ?? 'auto';\n } else if (mode === 'horizontal') {\n maxHeight = configuredMaxHeight ?? defaultMaxHeight;\n overflowX = this._config.multiSelectDisplay?.overflowX ?? 'auto';\n overflowY = this._config.multiSelectDisplay?.overflowY ?? 'hidden';\n flexWrap = 'nowrap';\n alignContent = 'center';\n }\n\n this._inputContainer.setAttribute('data-multi-scroll-mode', mode);\n this._inputContainer.setAttribute('data-drag-scroll', String(dragEnabled && mode === 'horizontal'));\n this._inputContainer.style.setProperty('--select-multi-input-max-height-config', maxHeight);\n this._inputContainer.style.setProperty('--select-multi-input-overflow-x-config', overflowX);\n this._inputContainer.style.setProperty('--select-multi-input-overflow-y-config', overflowY);\n this._inputContainer.style.setProperty('--select-multi-input-flex-wrap-config', flexWrap);\n this._inputContainer.style.setProperty('--select-multi-input-align-content-config', alignContent);\n }\n\n private _canUseHorizontalMultiScroll(target: HTMLElement | null): boolean {\n if (this._config.selection.mode !== 'multi') return false;\n if ((this._config.multiSelectDisplay?.mode ?? 'wrap') !== 'horizontal') return false;\n if (this._config.multiSelectDisplay?.dragScroll === false) return false;\n if (!target) return true;\n if (target.closest('.dropdown-arrow-container, .clear-control-button, .badge-remove')) return false;\n if (target.matches('.select-input')) return false;\n return true;\n }\n\n private _isScrollableMultiSelectMode(): boolean {\n if (this._config.selection.mode !== 'multi') return false;\n const mode = this._config.multiSelectDisplay?.mode ?? 'wrap';\n return mode === 'vertical' || mode === 'horizontal';\n }\n\n private _isPointerOnInputScrollbar(event: Pick<MouseEvent, 'clientX' | 'clientY'>): boolean {\n if (!this._isScrollableMultiSelectMode()) return false;\n\n const rect = this._inputContent.getBoundingClientRect();\n const verticalScrollbarWidth = this._inputContent.offsetWidth - this._inputContent.clientWidth;\n const horizontalScrollbarHeight = this._inputContent.offsetHeight - this._inputContent.clientHeight;\n\n if (\n verticalScrollbarWidth > 0\n && event.clientX >= rect.right - verticalScrollbarWidth\n && event.clientX <= rect.right\n && event.clientY >= rect.top\n && event.clientY <= rect.bottom\n ) {\n return true;\n }\n\n if (\n horizontalScrollbarHeight > 0\n && event.clientY >= rect.bottom - horizontalScrollbarHeight\n && event.clientY <= rect.bottom\n && event.clientX >= rect.left\n && event.clientX <= rect.right\n ) {\n return true;\n }\n\n return false;\n }\n\n private _beginMultiScrollDrag(e: PointerEvent): void {\n const scrollHost = this._inputContent;\n this._multiScrollDrag.active = true;\n this._multiScrollDrag.moved = false;\n this._multiScrollDrag.pointerId = e.pointerId;\n this._multiScrollDrag.startX = e.clientX;\n this._multiScrollDrag.startScrollLeft = scrollHost.scrollLeft;\n this._inputContainer.classList.add('is-dragging-scroll');\n\n try {\n scrollHost.setPointerCapture(e.pointerId);\n } catch (_error) {\n // ignore pointer capture issues\n }\n }\n\n private _updateMultiScrollDrag(e: PointerEvent): void {\n if (!this._multiScrollDrag.active || this._multiScrollDrag.pointerId !== e.pointerId) return;\n\n const deltaX = e.clientX - this._multiScrollDrag.startX;\n if (Math.abs(deltaX) > 3) {\n this._multiScrollDrag.moved = true;\n }\n\n this._inputContent.scrollLeft = this._multiScrollDrag.startScrollLeft - deltaX;\n }\n\n private _endMultiScrollDrag(pointerId?: number): void {\n if (!this._multiScrollDrag.active) return;\n if (pointerId != null && this._multiScrollDrag.pointerId !== pointerId) return;\n\n try {\n if (this._multiScrollDrag.pointerId >= 0) {\n this._inputContent.releasePointerCapture(this._multiScrollDrag.pointerId);\n }\n } catch (_error) {\n // ignore pointer capture issues\n }\n\n this._multiScrollDrag.active = false;\n this._multiScrollDrag.pointerId = -1;\n this._inputContainer.classList.remove('is-dragging-scroll');\n }\n\n private _createInput(): HTMLInputElement {\n const input = document.createElement('input');\n input.setAttribute('part', 'input');\n input.type = 'text';\n input.className = 'select-input';\n input.id = `${this._uniqueId}-input`;\n input.placeholder = this._config.placeholder || 'Select an option...';\n input.disabled = !this._config.enabled;\n input.readOnly = !this._config.searchable;\n\n // Apply a direct inline reset so the input is only the writable text layer,\n // while the `.input-container` remains the sole visible control shell.\n input.style.all = 'unset';\n input.style.display = 'block';\n input.style.flex = '1 1 auto';\n input.style.width = '100%';\n input.style.maxWidth = '100%';\n input.style.minWidth = '0';\n input.style.minInlineSize = '0';\n input.style.minHeight = '0';\n input.style.padding = '0';\n input.style.margin = '0';\n input.style.border = '0';\n input.style.background = 'transparent';\n input.style.boxSizing = 'border-box';\n input.style.outline = 'none';\n input.style.font = 'inherit';\n input.style.fontFamily = 'inherit';\n input.style.lineHeight = 'inherit';\n input.style.color = 'inherit';\n input.style.alignSelf = 'center';\n input.style.appearance = 'none';\n input.style.webkitAppearance = 'none';\n input.style.boxShadow = 'none';\n input.style.borderRadius = '0';\n input.style.overflow = 'hidden';\n input.style.textOverflow = 'ellipsis';\n input.style.whiteSpace = 'nowrap';\n input.style.cursor = this._config.searchable ? 'text' : 'default';\n \n // Update readonly when input is focused if searchable\n input.addEventListener('focus', () => {\n if (this._config.searchable) {\n input.readOnly = false;\n }\n });\n \n if (this._config.styles.classNames?.input) {\n input.className += ' ' + this._config.styles.classNames.input;\n }\n \n if (this._config.styles.input) {\n const inputStyles = { ...this._config.styles.input } as Partial<CSSStyleDeclaration> & Record<string, unknown>;\n\n // Route shell-like styling to .input-container so the control appears as\n // a single styled input instead of two visually separate layers.\n delete inputStyles.background;\n delete inputStyles.backgroundColor;\n delete inputStyles.border;\n delete inputStyles.borderColor;\n delete inputStyles.borderStyle;\n delete inputStyles.borderWidth;\n delete inputStyles.borderRadius;\n delete inputStyles.boxShadow;\n delete inputStyles.padding;\n delete inputStyles.height;\n delete inputStyles.minHeight;\n delete inputStyles.maxHeight;\n\n Object.assign(input.style, inputStyles);\n }\n \n input.setAttribute('aria-haspopup', 'listbox');\n \n return input;\n }\n\n private _createDropdown(): HTMLElement {\n const dropdown = document.createElement('div');\n dropdown.className = 'select-dropdown';\n dropdown.setAttribute('part', 'listbox');\n dropdown.style.display = 'none';\n \n if (this._config.styles.classNames?.dropdown) {\n dropdown.className += ' ' + this._config.styles.classNames.dropdown;\n }\n \n if (this._config.styles.dropdown) {\n Object.assign(dropdown.style, this._config.styles.dropdown);\n }\n \n return dropdown;\n }\n\n private _createOptionsContainer(): HTMLElement {\n const container = document.createElement('div');\n container.className = `options-container ${EnhancedSelect._MIRRORED_STYLES_SCOPE_CLASS}`;\n return container;\n }\n\n private _createLiveRegion(): HTMLElement {\n const liveRegion = document.createElement('div');\n liveRegion.setAttribute('role', 'status');\n liveRegion.setAttribute('aria-live', 'polite');\n liveRegion.setAttribute('aria-atomic', 'true');\n liveRegion.style.cssText = 'position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;';\n return liveRegion;\n }\n\n private _createErrorDescription(): HTMLElement {\n const description = document.createElement('div');\n description.id = `${this._uniqueId}-error`;\n description.style.cssText = 'position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;';\n return description;\n }\n\n private _createArrowContainer(): HTMLElement {\n const container = document.createElement('div');\n container.className = 'dropdown-arrow-container';\n container.innerHTML = `\n <slot name=\"arrow\">\n <svg class=\"dropdown-arrow\" part=\"arrow\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path d=\"M4 6L8 10L12 6\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </slot>\n `;\n const slot = container.querySelector<HTMLSlotElement>('slot[name=\"arrow\"]');\n slot?.addEventListener('slotchange', () => {\n if (slot.assignedElements({ flatten: true }).length > 0) {\n this.setAttribute('data-custom-arrow', 'true');\n } else {\n this.removeAttribute('data-custom-arrow');\n }\n });\n return container;\n }\n\n private _createClearControl(): HTMLButtonElement {\n const button = document.createElement('button');\n button.type = 'button';\n button.className = 'clear-control-button';\n button.setAttribute('part', 'clear-button');\n\n const icon = document.createElement('span');\n icon.className = 'clear-control-icon';\n icon.setAttribute('part', 'clear-icon');\n \n // Use config icon if provided, otherwise default SVG\n if (this._config.clearControl.icon) {\n icon.textContent = this._config.clearControl.icon;\n } else {\n icon.innerHTML = `<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 4L4 12M4 4L12 12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\n }\n\n button.setAttribute('aria-label', this._config.clearControl.ariaLabel || 'Clear selection and search');\n button.appendChild(icon);\n\n this._clearControlIcon = icon;\n return button;\n }\n\n private _assembleDOM(): void {\n this._inputContent.appendChild(this._input);\n this._inputContainer.appendChild(this._inputContent);\n\n if (this._clearControl) {\n this._inputContainer.appendChild(this._clearControl);\n }\n \n if (this._arrowContainer) {\n this._inputContainer.appendChild(this._arrowContainer);\n }\n \n this._container.appendChild(this._inputContainer);\n \n this._dropdown.appendChild(this._optionsContainer);\n \n this._container.appendChild(this._dropdown);\n \n this._shadow.appendChild(this._container);\n \n if (this._liveRegion) {\n this._shadow.appendChild(this._liveRegion);\n }\n if (this._errorDescription) {\n this._shadow.appendChild(this._errorDescription);\n }\n \n \n // Set ARIA relationships\n const listboxId = `${this._uniqueId}-listbox`;\n this._dropdown.id = listboxId;\n this._input.setAttribute('aria-owns', listboxId);\n\n this._syncInputContainerMode();\n this._syncClearControlState();\n }\n\n private _initializeStyles(): void {\n const style = document.createElement('style');\n style.textContent = `\n /* ═══════════════════════════════════════════════════════════════════════════\n ELEGANT SELECT COMPONENT — Refined Design System\n Formal aesthetics with sophisticated microinteractions\n ═══════════════════════════════════════════════════════════════════════════ */\n \n :host {\n --select-primary: #1a1a2e;\n --select-primary-light: #16213e;\n --select-accent: #0f3460;\n --select-accent-hover: #e94560;\n --select-surface: #ffffff;\n --select-surface-elevated: rgba(0, 0, 0, 0.04);\n --select-border: #e1e5eb;\n --select-border-focus: #0f3460;\n --select-text: #1a1a2e;\n --select-text-muted: #6b7280;\n --select-text-placeholder: #9ca3af;\n --select-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);\n --select-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);\n --select-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);\n --select-shadow-focus: 0 0 0 3px rgba(15, 52, 96, 0.12);\n --select-radius-sm: 6px;\n --select-radius-md: 10px;\n --select-radius-lg: 14px;\n --select-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);\n --select-transition-smooth: 250ms cubic-bezier(0.4, 0, 0.2, 1);\n --select-transition-bounce: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);\n --select-badge-animation: badgeEnter 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;\n --select-badge-enter-from-opacity: 0;\n --select-badge-enter-from-transform: scale(0.8) translateY(-4px);\n --select-badge-enter-to-opacity: 1;\n --select-badge-enter-to-transform: scale(1) translateY(0);\n --select-badge-active-transform: scale(0.98);\n --select-badge-hover-transform: scale(1.02);\n --select-badge-letter-spacing: 0.01em;\n --select-badge-hover-shadow: var(--select-shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.15);\n --select-badge-remove-icon-size: 10px;\n --select-badge-remove-icon-color: currentColor;\n --select-badge-remove-icon-font-size: inherit;\n --select-badge-remove-icon-line-height: 1;\n --select-badge-remove-icon-transform: none;\n --select-badge-remove-icon-opacity: 1;\n --select-badge-remove-focus-outline: 2px solid rgba(255, 255, 255, 0.5);\n --select-badge-remove-focus-offset: 1px;\n --select-badge-remove-hover-transform: scale(1.15) rotate(90deg);\n --select-badge-remove-active-transform: scale(0.95) rotate(90deg);\n --select-input-hover-border: var(--select-border-focus);\n --select-input-hover-shadow: var(--select-shadow-sm), 0 0 0 1px rgba(15, 52, 96, 0.05);\n --select-input-font-weight: 450;\n --select-input-letter-spacing: 0.01em;\n --select-input-disabled-opacity: 0.6;\n --select-input-overflow-x: hidden;\n --select-input-align-items: center;\n --select-input-align-content: center;\n --select-input-align-self: center;\n --select-multi-input-max-height: 160px;\n --select-multi-input-overflow-x: hidden;\n --select-multi-input-overflow-y: auto;\n --select-multi-input-flex-wrap: wrap;\n --select-multi-input-align-content: flex-start;\n --select-multi-input-horizontal-height: var(--select-input-min-height, 48px);\n --select-multi-input-horizontal-input-flex: 0 0 var(--select-multi-input-min-width, 96px);\n --select-multi-input-horizontal-cursor: grab;\n --select-multi-input-horizontal-active-cursor: grabbing;\n --select-multi-input-end-gap: 12px;\n --select-multi-separator-inset-block: 10px;\n --select-multi-separator-height: auto;\n --select-multi-action-surface-bg: var(--select-input-bg, var(--select-surface));\n --select-multi-action-divider: 1px solid var(--select-border);\n --select-separator-width: 1px;\n --select-separator-inset-block: 10px;\n --select-separator-height: auto;\n --select-separator-display: block;\n --select-separator-opacity: 0.6;\n --select-separator-active-opacity: 1;\n --select-separator-position: var(--select-arrow-width, 42px);\n --select-separator-position-with-clear: calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px));\n --select-separator-dark-bg: linear-gradient(\n to bottom,\n transparent 0%,\n var(--select-border) 20%,\n var(--select-border) 80%,\n transparent 100%\n );\n --select-arrow-open-transform: rotate(180deg);\n --select-clear-button-hover-transform: translateY(-50%) scale(1.1);\n --select-clear-button-active-transform: translateY(-50%) scale(0.95);\n --select-clear-button-focus-offset: 2px;\n --select-clear-icon-size: 14px;\n --select-dropdown-top: calc(100% + 6px);\n --select-dropdown-bottom: calc(100% + 6px);\n --select-dropdown-animation: dropdownEnter 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;\n --select-dropdown-enter-from-opacity: 0;\n --select-dropdown-enter-from-transform: translateY(-8px) scale(0.98);\n --select-dropdown-enter-to-opacity: 1;\n --select-dropdown-enter-to-transform: translateY(0) scale(1);\n --select-dropdown-top-transform-origin: bottom center;\n --select-dropdown-top-enter-from-transform: translateY(8px) scale(0.98);\n --select-dropdown-padding: 6px;\n --select-dropdown-scroll-behavior: smooth;\n --select-dropdown-transform-origin: top center;\n --select-scrollbar-width: 6px;\n --select-scrollbar-thumb-radius: 3px;\n --select-option-hover-enabled: 1;\n --select-option-hover-transform: none;\n --select-option-font-weight: 450;\n --select-option-margin: 2px 0;\n --select-input-font-size: inherit;\n --select-input-font-weight: 400;\n --select-multi-container-padding: 6px;\n --select-input-font-size: inherit;\n --select-input-font-weight: 400;\n --select-multi-container-padding: 6px;\n --select-option-disabled-opacity: 0.5;\n --select-option-disabled-cursor: not-allowed;\n --select-option-active-outline: none;\n --select-option-active-outline-offset: -2px;\n --select-option-selected-active-bg: var(--select-option-selected-hover-bg, var(--select-option-selected-bg, linear-gradient(135deg, rgba(15, 52, 96, 0.12) 0%, rgba(15, 52, 96, 0.06) 100%)));\n --select-option-selected-active-color: var(--select-option-selected-hover-color, var(--select-option-selected-color, var(--select-accent)));\n --select-option-selected-active-border: var(--select-option-selected-hover-border, var(--select-option-selected-border, var(--select-option-border, none)));\n --select-option-selected-active-shadow: var(--select-option-active-shadow, none);\n --select-option-selected-active-transform: var(--select-option-active-transform, none);\n --select-option-selected-active-outline: none;\n --select-option-selected-active-outline-offset: -2px;\n --select-option-selected-indicator-display: block;\n --select-option-selected-indicator-width: 3px;\n --select-option-selected-indicator-height: 60%;\n --select-option-selected-indicator-bg: var(--select-accent);\n --select-option-selected-indicator-radius: 0 2px 2px 0;\n --select-option-selected-indicator-left: 0;\n --select-option-selected-indicator-top: 50%;\n --select-option-selected-indicator-transform: translateY(-50%);\n --select-option-selected-indicator-animation: selectedIndicator 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;\n --select-option-selected-indicator-from-height: 0;\n --select-option-selected-indicator-to-height: 60%;\n --select-option-selected-indicator-from-opacity: 0;\n --select-option-selected-indicator-to-opacity: 1;\n --select-option-pressed-transform: none;\n --select-option-selected-pressed-transform: none;\n --select-button-hover-transform: translateY(-1px);\n --select-button-active-transform: translateY(0) scale(0.98);\n --select-button-font-weight: 550;\n --select-button-letter-spacing: 0.02em;\n --select-spinner-animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n --select-searching-spinner-active-color: var(--select-accent);\n --select-badge-remove-margin-left: 2px;\n --select-badge-remove-radius: 50%;\n --select-badge-remove-font-weight: 600;\n --select-empty-gap: 8px;\n --select-searching-gap: 8px;\n --select-searching-spinner-size: 24px;\n --select-searching-spinner-border: 2px solid var(--select-border);\n --select-searching-spinner-animation: var(--select-spinner-animation);\n --select-group-header-separator-margin-top: 0;\n --select-group-header-separator-padding-top: 0;\n --select-group-header-separator-border-top: none;\n --select-reduced-motion-duration: 0.01ms;\n --select-reduced-motion-iteration-count: 1;\n --select-high-contrast-border-width: 2px;\n --select-high-contrast-indicator-width: 4px;\n --select-high-contrast-focus-outline-width: 3px;\n --select-high-contrast-focus-outline-color: Highlight;\n --select-touch-target-min-height: 44px;\n --select-badge-dark-bg: linear-gradient(135deg, var(--select-accent) 0%, #4f46e5 100%);\n --select-host-z-index: auto;\n --select-host-open-z-index: var(--select-dropdown-z-index, 1000);\n --select-ancestor-open-z-index: var(--select-host-open-z-index, var(--select-dropdown-z-index, 1000));\n \n display: block;\n position: relative;\n z-index: var(--select-host-z-index, auto);\n width: var(--select-width, 100%);\n height: var(--select-height, auto);\n font-family: var(--select-font-family, inherit);\n font-size: var(--select-font-size, inherit);\n line-height: var(--select-line-height, inherit);\n color: var(--select-color, inherit);\n }\n\n :host([data-open=\"true\"]) {\n z-index: var(--select-host-open-z-index, var(--select-dropdown-z-index, 1000));\n }\n\n :host([dir=\"ltr\"]) {\n direction: ltr;\n }\n\n :host([dir=\"rtl\"]) {\n direction: rtl;\n }\n\n /* ─────────────────────────────────────────────────────────────────────────\n Selection Badges — Refined pill design with elegant interactions\n ───────────────────────────────────────────────────────────────────────── */\n \n .selection-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--select-badge-gap, 6px);\n flex: 0 1 auto;\n width: var(--select-badge-width, auto);\n min-width: var(--select-badge-min-width, 0);\n height: var(--select-badge-height, auto);\n min-height: var(--select-badge-min-height, 26px);\n padding: var(--select-badge-padding, 4px 10px 4px 12px);\n margin: var(--select-badge-margin, 3px);\n background: var(--select-badge-bg, linear-gradient(135deg, var(--select-accent) 0%, var(--select-primary-light) 100%));\n color: var(--select-badge-color, #ffffff);\n border: var(--select-badge-border, none);\n border-radius: var(--select-badge-border-radius, 999px);\n box-shadow: var(--select-badge-shadow, var(--select-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.1));\n box-sizing: border-box;\n font-size: var(--select-badge-font-size, 0.8667em);\n font-weight: var(--select-badge-font-weight, 500);\n line-height: var(--select-badge-line-height, 1.2);\n letter-spacing: var(--select-badge-letter-spacing);\n max-width: var(--select-badge-max-width, 100%);\n overflow: hidden;\n transform: scale(1);\n transition: \n transform var(--select-transition-bounce),\n box-shadow var(--select-transition-fast),\n background var(--select-transition-fast);\n animation: var(--select-badge-animation);\n }\n \n @keyframes badgeEnter {\n 0% {\n opacity: var(--select-badge-enter-from-opacity);\n transform: var(--select-badge-enter-from-transform);\n }\n 100% {\n opacity: var(--select-badge-enter-to-opacity);\n transform: var(--select-badge-enter-to-transform);\n }\n }\n \n .selection-badge:hover {\n background: var(--select-badge-hover-bg, var(--select-badge-bg, linear-gradient(135deg, var(--select-accent) 0%, var(--select-primary-light) 100%)));\n color: var(--select-badge-hover-color, var(--select-badge-color, #ffffff));\n border: var(--select-badge-hover-border, var(--select-badge-border, none));\n box-shadow: var(--select-badge-hover-shadow);\n transform: var(--select-badge-hover-transform);\n }\n\n .selection-badge:active {\n background: var(--select-badge-active-bg, var(--select-badge-hover-bg, var(--select-badge-bg, linear-gradient(135deg, var(--select-accent) 0%, var(--select-primary-light) 100%))));\n color: var(--select-badge-active-color, var(--select-badge-hover-color, var(--select-badge-color, #ffffff)));\n border: var(--select-badge-active-border, var(--select-badge-hover-border, var(--select-badge-border, none)));\n box-shadow: var(--select-badge-active-shadow, var(--select-badge-hover-shadow));\n transform: var(--select-badge-active-transform);\n }\n\n .selection-badge-label {\n display: block;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--select-badge-label-color, inherit);\n font-size: var(--select-badge-label-font-size, inherit);\n font-weight: var(--select-badge-label-font-weight, inherit);\n line-height: var(--select-badge-label-line-height, var(--select-badge-line-height, 1.2));\n letter-spacing: var(--select-badge-label-letter-spacing, inherit);\n text-align: var(--select-badge-label-text-align, start);\n }\n\n .badge-remove {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--select-badge-remove-size, 18px);\n height: var(--select-badge-remove-size, 18px);\n min-width: var(--select-badge-remove-min-width, var(--select-badge-remove-size, 18px));\n min-height: var(--select-badge-remove-min-height, var(--select-badge-remove-size, 18px));\n padding: 0;\n margin-left: var(--select-badge-remove-margin-left);\n background: var(--select-badge-remove-bg, rgba(255, 255, 255, 0.2));\n border: var(--select-badge-remove-border, none);\n border-radius: var(--select-badge-remove-radius);\n color: var(--select-badge-remove-color, #ffffff);\n font-size: var(--select-badge-remove-font-size, 0.7333em);\n font-weight: var(--select-badge-remove-font-weight);\n line-height: 1;\n cursor: pointer;\n flex: 0 0 auto;\n transition: \n background var(--select-transition-fast),\n color var(--select-transition-fast),\n border-color var(--select-transition-fast),\n box-shadow var(--select-transition-fast),\n transform var(--select-transition-bounce);\n }\n\n .badge-remove-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--select-badge-remove-icon-size, 10px);\n height: var(--select-badge-remove-icon-size, 10px);\n color: var(--select-badge-remove-icon-color, currentColor);\n font-size: var(--select-badge-remove-icon-font-size, inherit);\n line-height: var(--select-badge-remove-icon-line-height, 1);\n transform: var(--select-badge-remove-icon-transform, none);\n opacity: var(--select-badge-remove-icon-opacity, 1);\n pointer-events: none;\n }\n\n .badge-remove-icon svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n .badge-remove:hover {\n background: var(--select-badge-remove-hover-bg, rgba(233, 69, 96, 0.9));\n color: var(--select-badge-remove-hover-color, var(--select-badge-remove-color, #ffffff));\n border: var(--select-badge-remove-hover-border, var(--select-badge-remove-border, none));\n box-shadow: var(--select-badge-remove-hover-shadow, none);\n transform: var(--select-badge-remove-hover-transform);\n }\n\n .badge-remove:focus-visible {\n outline: var(--select-badge-remove-focus-outline);\n outline-offset: var(--select-badge-remove-focus-offset);\n }\n \n .badge-remove:active {\n background: var(--select-badge-remove-active-bg, var(--select-badge-remove-hover-bg, rgba(233, 69, 96, 0.9)));\n color: var(--select-badge-remove-active-color, var(--select-badge-remove-hover-color, var(--select-badge-remove-color, #ffffff)));\n border: var(--select-badge-remove-active-border, var(--select-badge-remove-hover-border, var(--select-badge-remove-border, none)));\n box-shadow: var(--select-badge-remove-active-shadow, var(--select-badge-remove-hover-shadow, none));\n transform: var(--select-badge-remove-active-transform);\n }\n\n :host([dir=\"rtl\"]) .badge-remove {\n margin-left: 0;\n margin-right: var(--select-badge-remove-margin-left);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Input Container — Sophisticated control shell\n ───────────��───────────────────────────────────────────────────────────── */\n \n .select-container {\n position: relative;\n width: 100%;\n }\n \n .input-container {\n position: relative;\n width: 100%;\n display: flex;\n align-items: var(--select-input-align-items, center);\n flex-wrap: nowrap;\n justify-content: var(--select-input-justify-content, flex-start);\n gap: var(--select-input-gap, 6px);\n padding: var(--select-input-padding, 10px 52px 10px 14px);\n height: var(--select-input-height, auto);\n min-height: var(--select-input-min-height, 48px);\n max-height: var(--select-input-max-height, 160px);\n overflow: hidden;\n padding: var(--select-multi-container-padding, 6px);\n align-content: var(--select-input-align-content, center);\n text-align: var(--select-input-text-align, start);\n background: var(--select-input-bg, var(--select-surface));\n font-size: var(--select-input-font-size, inherit);\n font-weight: var(--select-input-font-weight, 400);\n font-weight: var(--select-input-font-weight, 400);\n border: var(--select-input-border, 1.5px solid var(--select-border));\n border-radius: var(--select-input-border-radius, var(--select-radius-md));\n box-shadow: var(--select-shadow-sm);\n box-sizing: border-box;\n transition: \n border-color var(--select-transition-fast),\n box-shadow var(--select-transition-smooth),\n transform var(--select-transition-fast);\n }\n\n .input-content {\n position: relative;\n display: flex;\n flex: 1 1 auto;\n width: 100%;\n min-width: 0;\n min-height: 0;\n align-self: stretch;\n align-items: var(--select-input-align-items, center);\n align-content: var(--select-input-align-content, center);\n justify-content: var(--select-input-justify-content, flex-start);\n flex-wrap: nowrap;\n gap: var(--select-input-gap, 6px);\n overflow-x: var(--select-input-overflow-x, hidden);\n overflow-y: var(--select-input-overflow-y, hidden);\n scrollbar-width: thin;\n box-sizing: border-box;\n }\n \n .input-container:hover {\n border-color: var(--select-input-hover-border);\n box-shadow: var(--select-input-hover-shadow);\n }\n\n .input-container.input-container--single {\n flex-wrap: nowrap;\n align-content: center;\n }\n\n .input-container.input-container--multi {\n max-height: var(--select-multi-input-max-height, var(--select-multi-input-max-height-config, var(--select-input-max-height, 160px)));\n --select-multi-action-area-width: var(--select-arrow-width, 42px);\n }\n\n .input-container.input-container--multi .input-content {\n flex: 1 1 calc(100% - var(--select-multi-action-area-width, var(--select-arrow-width, 42px)));\n width: calc(100% - var(--select-multi-action-area-width, var(--select-arrow-width, 42px)));\n max-width: calc(100% - var(--select-multi-action-area-width, var(--select-arrow-width, 42px)));\n flex-wrap: var(--select-multi-input-flex-wrap, var(--select-multi-input-flex-wrap-config, wrap));\n align-content: var(--select-multi-input-align-content, var(--select-multi-input-align-content-config, flex-start));\n overflow-x: var(--select-multi-input-overflow-x, var(--select-multi-input-overflow-x-config, hidden));\n overflow-y: var(--select-multi-input-overflow-y, var(--select-multi-input-overflow-y-config, auto));\n padding-inline-end: var(--select-multi-input-end-gap, 12px);\n }\n\n .input-container.input-container--multi .input-content .selection-badge {\n flex: 0 0 auto;\n }\n\n .input-container.input-container--multi.has-clear-control .input-content {\n --select-multi-action-area-width: calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px));\n }\n\n .input-container.input-container--multi::after {\n top: var(--select-multi-separator-inset-block, var(--select-separator-inset-block, 10px));\n bottom: var(--select-multi-separator-inset-block, var(--select-separator-inset-block, 10px));\n height: var(--select-multi-separator-height, auto);\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] {\n align-items: stretch;\n height: var(--select-multi-input-horizontal-height, var(--select-input-min-height, 48px));\n min-height: var(--select-multi-input-horizontal-height, var(--select-input-min-height, 48px));\n max-height: var(--select-multi-input-horizontal-height, var(--select-input-min-height, 48px));\n overflow: hidden;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .input-content {\n flex: 1 1 100%;\n width: 100%;\n max-width: 100%;\n min-height: 0;\n height: 100%;\n cursor: var(--select-multi-input-horizontal-cursor, grab);\n align-items: center;\n align-content: center;\n flex-wrap: nowrap;\n overflow-y: hidden;\n overscroll-behavior-x: contain;\n overscroll-behavior-y: none;\n padding-inline-end: 0;\n scroll-padding-inline-end: var(--select-multi-action-area-width, var(--select-arrow-width, 42px));\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"].has-clear-control .input-content {\n --select-multi-action-area-width: calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px));\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"]::after {\n display: none;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"].is-dragging-scroll .input-content {\n cursor: var(--select-multi-input-horizontal-active-cursor, grabbing);\n user-select: none;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .selection-badge {\n flex: 0 0 auto;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .input-content > .select-input,\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .input-content > input.select-input,\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .input-content > .select-input[type=\"text\"] {\n flex: var(--select-multi-input-horizontal-input-flex, 0 0 var(--select-multi-input-min-width, 96px));\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .dropdown-arrow-container {\n background: var(--select-multi-action-surface-bg, var(--select-input-bg, var(--select-surface)));\n border-left: var(--select-multi-action-divider, 1px solid var(--select-border));\n z-index: 4;\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .dropdown-arrow-container.with-clear-control {\n right: var(--select-arrow-right-with-clear, 34px);\n }\n\n :host([dir=\"rtl\"]) .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .dropdown-arrow-container {\n border-left: none;\n border-right: var(--select-multi-action-divider, 1px solid var(--select-border));\n }\n\n :host([dir=\"rtl\"]) .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .dropdown-arrow-container.with-clear-control {\n right: auto;\n left: var(--select-arrow-right-with-clear, 34px);\n }\n\n .input-container.input-container--multi[data-multi-scroll-mode=\"horizontal\"] .clear-control-button {\n background: var(--select-multi-action-surface-bg, var(--select-input-bg, var(--select-surface)));\n z-index: 4;\n }\n \n .input-container:focus-within {\n border-color: var(--select-input-focus-border, var(--select-border-focus));\n box-shadow: var(--select-shadow-focus), var(--select-shadow-sm);\n }\n \n /* Elegant separator line before arrow */\n .input-container::after {\n content: '';\n display: var(--select-separator-display, block);\n position: absolute;\n top: var(--select-separator-inset-block, 10px);\n bottom: var(--select-separator-inset-block, 10px);\n right: var(--select-separator-position, var(--select-arrow-width, 42px));\n width: var(--select-separator-width, 1px);\n height: var(--select-separator-height, auto);\n background: var(--select-separator-bg, linear-gradient(\n to bottom,\n transparent 0%,\n var(--select-border) 20%,\n var(--select-border) 80%,\n transparent 100%\n ));\n pointer-events: none;\n z-index: 1;\n opacity: var(--select-separator-opacity);\n transition: opacity var(--select-transition-fast);\n }\n \n .input-container:hover::after,\n .input-container:focus-within::after {\n opacity: var(--select-separator-active-opacity);\n }\n\n :host([dir=\"rtl\"]) .input-container::after {\n right: auto;\n left: var(--select-separator-position, var(--select-arrow-width, 42px));\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Dropdown Arrow — Smooth rotation with refined styling\n ───────────────────────────────────────────────────────────────────────── */\n \n .dropdown-arrow-container {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: var(--select-arrow-width, var(--select-arrow-size, 42px));\n height: var(--select-arrow-height, var(--select-arrow-size, auto));\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: var(--select-arrow-border-radius, 0 var(--select-radius-md) var(--select-radius-md) 0);\n z-index: 2;\n transition: background-color var(--select-transition-fast);\n }\n\n .input-container.has-clear-control {\n padding: var(--select-input-padding-with-clear, 10px 84px 10px 14px);\n }\n\n .input-container.has-clear-control::after {\n right: var(--select-separator-position-with-clear, calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px)));\n }\n\n .dropdown-arrow-container.with-clear-control {\n right: var(--select-arrow-right-with-clear, 34px);\n }\n\n :host([dir=\"rtl\"]) .dropdown-arrow-container {\n right: auto;\n left: 0;\n border-radius: var(--select-arrow-border-radius-rtl, var(--select-radius-md) 0 0 var(--select-radius-md));\n }\n\n :host([dir=\"rtl\"]) .input-container.has-clear-control::after {\n right: auto;\n left: var(--select-separator-position-with-clear, calc(var(--select-arrow-right-with-clear, 34px) + var(--select-arrow-width, 42px)));\n }\n\n :host([dir=\"rtl\"]) .dropdown-arrow-container.with-clear-control {\n right: auto;\n left: var(--select-arrow-right-with-clear, 34px);\n }\n\n /* ─────────────────────────────────────────────────────────────────────────\n Clear Control — Minimal and elegant dismiss button\n ───────────────────────────────────────────────────────────────────────── */\n\n .clear-control-button {\n position: absolute;\n top: 50%;\n right: var(--select-clear-button-right, 8px);\n transform: translateY(-50%);\n width: var(--select-clear-button-size, 26px);\n height: var(--select-clear-button-size, 26px);\n border: var(--select-clear-button-border, none);\n border-radius: var(--select-clear-button-radius, 50%);\n background: var(--select-clear-button-bg, transparent);\n color: var(--select-clear-button-color, var(--select-text-muted));\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 3;\n transition: \n background var(--select-transition-fast),\n color var(--select-transition-fast),\n transform var(--select-transition-bounce);\n }\n\n .clear-control-button:hover {\n background: var(--select-clear-button-hover-bg, rgba(233, 69, 96, 0.1));\n color: var(--select-clear-button-hover-color, var(--select-accent-hover));\n transform: var(--select-clear-button-hover-transform);\n }\n \n .clear-control-button:active {\n transform: var(--select-clear-button-active-transform);\n }\n\n .clear-control-button:focus-visible {\n outline: var(--select-clear-button-focus-outline, 2px solid var(--select-border-focus));\n outline-offset: var(--select-clear-button-focus-offset);\n }\n\n .clear-control-button[hidden] {\n display: none;\n }\n\n :host([dir=\"rtl\"]) .clear-control-button {\n right: auto;\n left: var(--select-clear-button-right, 8px);\n }\n\n .clear-control-icon {\n width: var(--select-clear-icon-size);\n height: var(--select-clear-icon-size);\n pointer-events: none;\n }\n \n .clear-control-icon svg {\n width: 100%;\n height: 100%;\n }\n \n .dropdown-arrow-container:hover {\n background-color: var(--select-arrow-hover-bg, rgba(15, 52, 96, 0.05));\n }\n\n :host([data-custom-arrow=\"true\"]) .dropdown-arrow-container:hover {\n background-color: transparent;\n }\n \n .dropdown-arrow {\n width: var(--select-arrow-width, var(--select-arrow-size, 16px));\n height: var(--select-arrow-height, var(--select-arrow-size, 16px));\n color: var(--select-arrow-color, var(--select-text-muted));\n transition: \n transform var(--select-transition-smooth),\n color var(--select-transition-fast);\n transform-origin: center;\n }\n \n .dropdown-arrow path {\n stroke-width: var(--select-arrow-stroke-width, 1.5);\n }\n \n .dropdown-arrow-container:hover .dropdown-arrow {\n color: var(--select-arrow-hover, var(--select-arrow-hover-color, #667eea));\n }\n \n .dropdown-arrow.open {\n transform: var(--select-arrow-open-transform);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Input Field — Clean text entry\n ───────────────────────────────────────────────────────────────────────── */\n \n .input-container > .select-input,\n input.select-input,\n .select-input[type=\"text\"] {\n display: block;\n flex: 1 1 auto;\n width: var(--select-input-width, 100%);\n max-width: 100%;\n min-width: var(--select-input-min-width, 0);\n min-inline-size: 0;\n min-height: 0;\n padding: var(--select-input-field-padding, 0) !important;\n margin: 0 !important;\n border: 0 !important;\n font-size: var(--select-input-font-size, inherit);\n line-height: var(--select-input-line-height, 1.5);\n color: var(--select-input-color, var(--select-text));\n background: transparent !important;\n box-sizing: border-box;\n outline: none !important;\n font-weight: var(--select-input-font-weight);\n letter-spacing: var(--select-input-letter-spacing);\n font-family: var(--select-input-font-family, inherit);\n font-style: var(--select-input-font-style, normal);\n align-self: var(--select-input-align-self, center);\n appearance: none !important;\n -webkit-appearance: none !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: var(--select-input-text-align, inherit);\n white-space: nowrap;\n }\n \n .select-input::placeholder {\n color: var(--select-input-placeholder-color, var(--select-text-placeholder));\n font-weight: 400;\n }\n\n :host([dir=\"rtl\"]) .input-container {\n padding: var(--select-input-padding-rtl, 10px 14px 10px 52px);\n }\n\n :host([dir=\"rtl\"]) .input-container.has-clear-control {\n padding: var(--select-input-padding-with-clear-rtl, 10px 14px 10px 84px);\n }\n\n .input-container.input-container--multi > .select-input,\n .input-container.input-container--multi > input.select-input,\n .input-container.input-container--multi > .select-input[type=\"text\"] {\n width: auto;\n min-width: var(--select-multi-input-min-width, 96px);\n flex: 1 0 var(--select-multi-input-min-width, 96px);\n }\n\n .input-container.input-container--single > .select-input,\n .input-container.input-container--single > input.select-input,\n .input-container.input-container--single > .select-input[type=\"text\"] {\n width: var(--select-input-width, 100%);\n min-width: 0;\n flex: 1 1 auto;\n }\n \n .select-input:disabled {\n background-color: var(--select-disabled-bg, #f5f5f5);\n cursor: not-allowed;\n opacity: var(--select-input-disabled-opacity);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Dropdown Panel — Elegant floating container\n ───────────────────────────────────────────────────────────────────────── */\n \n .select-dropdown {\n position: absolute;\n scroll-behavior: var(--select-dropdown-scroll-behavior);\n top: var(--select-dropdown-top);\n bottom: auto;\n left: 0;\n right: 0;\n max-height: var(--select-dropdown-max-height, 320px);\n overflow: hidden;\n box-sizing: border-box;\n background: var(--select-dropdown-bg, var(--select-surface));\n border: 1px solid var(--select-dropdown-border, var(--select-border));\n border-radius: var(--select-dropdown-border-radius, var(--select-radius-lg));\n box-shadow: var(--select-dropdown-shadow, var(--select-shadow-lg));\n z-index: var(--select-dropdown-z-index, 1000);\n transform-origin: var(--select-dropdown-transform-origin);\n animation: var(--select-dropdown-animation);\n }\n\n .select-dropdown[data-placement=\"top\"] {\n top: auto;\n bottom: var(--select-dropdown-bottom, calc(100% + 6px));\n transform-origin: var(--select-dropdown-top-transform-origin, bottom center);\n }\n\n .select-dropdown[data-placement=\"top\"] {\n --select-dropdown-enter-from-transform: var(--select-dropdown-top-enter-from-transform, translateY(8px) scale(0.98));\n }\n \n @keyframes dropdownEnter {\n 0% {\n opacity: var(--select-dropdown-enter-from-opacity);\n transform: var(--select-dropdown-enter-from-transform);\n }\n 100% {\n opacity: var(--select-dropdown-enter-to-opacity);\n transform: var(--select-dropdown-enter-to-transform);\n }\n }\n \n .options-container {\n position: relative;\n max-height: var(--select-options-max-height, 320px);\n overflow: auto;\n box-sizing: border-box;\n padding: var(--select-options-padding, var(--select-dropdown-padding, 6px));\n background: var(--select-options-bg, var(--select-dropdown-bg, var(--select-surface)));\n \n /* Custom scrollbar styling */\n scrollbar-width: thin;\n scrollbar-color: var(--select-border) transparent;\n }\n \n .options-container::-webkit-scrollbar {\n width: var(--select-scrollbar-width);\n }\n \n .options-container::-webkit-scrollbar-track {\n background: transparent;\n }\n \n .options-container::-webkit-scrollbar-thumb {\n background: var(--select-border);\n border-radius: var(--select-scrollbar-thumb-radius);\n }\n \n .options-container::-webkit-scrollbar-thumb:hover {\n background: var(--select-text-muted);\n }\n\n /* ─────────────────────────────────────────────────────────────────────────\n Group Headers — Refined section dividers\n ───────────────────────────────────────────────────────────────────────── */\n\n .group-header {\n padding: var(--select-group-header-padding, 10px 12px 8px 12px);\n margin: var(--select-group-header-margin, 0 calc(var(--select-options-padding, 6px) * -1));\n font-weight: var(--select-group-header-weight, 600);\n color: var(--select-group-header-color, var(--select-text-muted));\n background: var(--select-group-header-bg, #f3f4f6);\n text-align: var(--select-group-header-text-align, left);\n font-size: var(--select-group-header-font-size, 0.7333em);\n text-transform: var(--select-group-header-text-transform, uppercase);\n letter-spacing: var(--select-group-header-letter-spacing, 0.08em);\n position: sticky;\n top: calc(var(--select-options-padding, 6px) * -1);\n left: 0;\n right: 0;\n z-index: 100;\n border: var(--select-group-header-border, none);\n border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(0, 0, 0, 0.08));\n border-radius: var(--select-group-header-border-radius, 0);\n box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.04));\n /* Force solid background to prevent option bleed-through */\n isolation: isolate;\n }\n \n .group-header:not(:first-child) {\n margin-top: calc(\n var(--select-group-header-separator-margin-top, 0px) +\n var(--select-group-header-separator-padding-top, 0px)\n );\n border-top: var(--select-group-header-separator-border-top);\n }\n\n /* ─────────────────────────────────────────────────────────────────────────\n Options — Elegant hover and selection states\n ───────────────────────────────────────────────────────────────────────── */\n\n .option {\n position: relative;\n padding: var(--select-option-padding, 10px 14px);\n cursor: pointer;\n color: var(--select-option-color, var(--select-text));\n background: var(--select-option-bg, transparent);\n border: var(--select-option-border, none);\n box-sizing: border-box;\n text-align: var(--select-option-text-align, start);\n transition: var(--select-option-transition, \n background var(--select-transition-fast),\n color var(--select-transition-fast),\n outline-color var(--select-transition-fast),\n box-shadow var(--select-transition-fast)\n );\n user-select: none;\n font-size: var(--select-option-font-size, inherit);\n font-weight: var(--select-option-font-weight);\n line-height: var(--select-option-line-height, 1.5);\n border-radius: var(--select-option-border-radius, var(--select-radius-sm));\n margin: var(--select-option-margin);\n }\n\n .option:hover:not(.disabled):not(.smilodon-option--disabled),\n .option.smilodon-option--disabled-hoverable:hover {\n background: var(--select-option-hover-bg, var(--select-surface-elevated));\n /* Hover decoration must not resize or translate the pointer hit target. */\n outline: var(--select-option-hover-border, none);\n outline-offset: -1px;\n color: var(--select-option-hover-color, var(--select-text));\n }\n\n .option.selected {\n background: var(--select-option-selected-bg, linear-gradient(135deg, rgba(15, 52, 96, 0.08) 0%, rgba(15, 52, 96, 0.04) 100%));\n border: var(--select-option-selected-border, var(--select-option-border, none));\n color: var(--select-option-selected-color, var(--select-accent));\n font-weight: var(--select-option-selected-weight, 550);\n }\n \n .option.selected::before {\n content: var(--select-option-selected-indicator-content, '');\n display: var(--select-option-selected-indicator-display, block);\n position: absolute;\n left: var(--select-option-selected-indicator-left);\n top: var(--select-option-selected-indicator-top);\n transform: var(--select-option-selected-indicator-transform);\n width: var(--select-option-selected-indicator-width);\n height: var(--select-option-selected-indicator-height);\n background: var(--select-option-selected-indicator-bg);\n border-radius: var(--select-option-selected-indicator-radius);\n animation: var(--select-option-selected-indicator-animation);\n }\n\n :host([dir=\"rtl\"]) .option.selected::before {\n left: auto;\n right: var(--select-option-selected-indicator-right, var(--select-option-selected-indicator-left));\n border-radius: var(--select-option-selected-indicator-radius-rtl, 2px 0 0 2px);\n }\n \n @keyframes selectedIndicator {\n 0% {\n height: var(--select-option-selected-indicator-from-height);\n opacity: var(--select-option-selected-indicator-from-opacity);\n }\n 100% {\n height: var(--select-option-selected-indicator-to-height);\n opacity: var(--select-option-selected-indicator-to-opacity);\n }\n }\n\n .option.selected:hover {\n background: var(--select-option-selected-hover-bg, var(--select-option-selected-bg, linear-gradient(135deg, rgba(15, 52, 96, 0.12) 0%, rgba(15, 52, 96, 0.06) 100%)));\n outline: var(--select-option-selected-hover-border, var(--select-option-hover-border, none));\n outline-offset: -1px;\n color: var(--select-option-selected-hover-color, var(--select-option-selected-color, var(--select-accent)));\n }\n\n .option.active:not(.selected):not(.disabled):not(.smilodon-option--disabled),\n .option.active.smilodon-option--disabled-focusable:not(.selected) {\n background: var(--select-option-active-bg, var(--select-surface-elevated));\n color: var(--select-option-active-color, var(--select-option-hover-color, var(--select-option-color, var(--select-text))));\n border: var(--select-option-active-border, var(--select-option-hover-border, var(--select-option-border, none)));\n outline: var(--select-option-active-outline, none);\n outline-offset: var(--select-option-active-outline-offset);\n box-shadow: var(--select-option-active-shadow, none);\n transform: var(--select-option-active-transform, none);\n }\n\n .option.selected.active:not(.disabled):not(.smilodon-option--disabled),\n .option.selected.active.smilodon-option--disabled-focusable {\n background: var(--select-option-selected-active-bg, var(--select-option-selected-hover-bg, var(--select-option-selected-bg, linear-gradient(135deg, rgba(15, 52, 96, 0.12) 0%, rgba(15, 52, 96, 0.06) 100%))));\n color: var(--select-option-selected-active-color, var(--select-option-selected-hover-color, var(--select-option-selected-color, var(--select-accent))));\n border: var(--select-option-selected-active-border, var(--select-option-selected-hover-border, var(--select-option-selected-border, var(--select-option-border, none))));\n outline: var(--select-option-selected-active-outline, var(--select-option-active-outline, none));\n outline-offset: var(--select-option-selected-active-outline-offset);\n box-shadow: var(--select-option-selected-active-shadow, var(--select-option-active-shadow, none));\n transform: var(--select-option-selected-active-transform, var(--select-option-active-transform, none));\n }\n\n .option.disabled,\n .option.smilodon-option--disabled {\n background: var(--select-option-disabled-bg, var(--select-option-bg, transparent));\n color: var(--select-option-disabled-color, var(--select-text-muted));\n border: var(--select-option-disabled-border, var(--select-option-border, none));\n opacity: var(--select-option-disabled-opacity, 0.5);\n cursor: var(--select-option-disabled-cursor, not-allowed);\n pointer-events: var(--select-option-disabled-pointer-events, none);\n }\n\n .option.smilodon-option--disabled-interactive {\n pointer-events: auto;\n }\n\n .option:active:not(.selected):not(.disabled):not(.smilodon-option--disabled),\n .option.smilodon-option--disabled-selectable:active:not(.selected) {\n background: var(--select-option-pressed-bg, rgba(15, 52, 96, 0.08));\n transform: var(--select-option-pressed-transform);\n }\n\n .option.selected:active:not(.disabled):not(.smilodon-option--disabled),\n .option.selected.smilodon-option--disabled-selectable:active {\n transform: var(--select-option-selected-pressed-transform);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Load More & Busy States — Refined feedback indicators\n ───────────────────────────────────────────────────────────────────────── */\n \n .load-more-container {\n padding: var(--select-load-more-padding, 12px);\n text-align: center;\n }\n \n .load-more-button {\n padding: var(--select-button-padding, 10px 20px);\n border: var(--select-button-border, 1.5px solid var(--select-border));\n background: var(--select-button-bg, transparent);\n color: var(--select-button-color, var(--select-accent));\n border-radius: var(--select-button-border-radius, var(--select-radius-md));\n cursor: pointer;\n font-size: var(--select-button-font-size, 0.8667em);\n font-weight: var(--select-button-font-weight);\n letter-spacing: var(--select-button-letter-spacing);\n transition: \n background var(--select-transition-fast),\n border-color var(--select-transition-fast),\n color var(--select-transition-fast),\n transform var(--select-transition-bounce);\n }\n \n .load-more-button:hover {\n background: var(--select-button-hover-bg, var(--select-accent));\n border-color: var(--select-accent);\n color: var(--select-button-hover-color, white);\n transform: var(--select-button-hover-transform);\n }\n \n .load-more-button:active {\n transform: var(--select-button-active-transform);\n }\n \n .load-more-button:disabled {\n opacity: var(--select-button-disabled-opacity, 0.5);\n cursor: not-allowed;\n transform: none;\n }\n \n .busy-bucket {\n padding: var(--select-busy-padding, 20px);\n text-align: center;\n color: var(--select-busy-color, var(--select-text-muted));\n background: var(--select-busy-bg, transparent);\n font-size: var(--select-busy-font-size, 0.8667em);\n }\n \n .spinner {\n display: inline-block;\n width: var(--select-spinner-size, 22px);\n height: var(--select-spinner-size, 22px);\n border: var(--select-spinner-border, 2px solid var(--select-border));\n border-top-color: var(--select-spinner-active-color, var(--select-accent));\n border-radius: 50%;\n animation: var(--select-spinner-animation);\n }\n \n @keyframes spin {\n to { transform: rotate(360deg); }\n }\n \n .empty-state {\n padding: var(--select-empty-padding, 32px 24px);\n text-align: center;\n color: var(--select-empty-color, var(--select-text-muted));\n font-size: var(--select-empty-font-size, 0.9333em);\n background: var(--select-empty-bg, transparent);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--select-empty-gap);\n }\n \n .searching-state {\n padding: var(--select-searching-padding, 32px 24px);\n text-align: center;\n color: var(--select-searching-color, var(--select-accent));\n font-size: var(--select-searching-font-size, 0.9333em);\n background: var(--select-searching-bg, transparent);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--select-searching-gap);\n }\n \n .searching-state::before {\n content: '';\n width: var(--select-searching-spinner-size);\n height: var(--select-searching-spinner-size);\n border: var(--select-searching-spinner-border);\n border-top-color: var(--select-searching-spinner-active-color);\n border-radius: 50%;\n animation: var(--select-searching-spinner-animation);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Error States — Clear visual feedback\n ───────────────────────────────────────────────────────────────────────── */\n \n .select-input[aria-invalid=\"true\"] {\n border-color: var(--select-error-border, #e94560);\n }\n \n .select-input[aria-invalid=\"true\"]:focus {\n border-color: var(--select-error-border, #e94560);\n box-shadow: 0 0 0 3px var(--select-error-shadow, rgba(233, 69, 96, 0.15));\n }\n \n /* ──────────────────────────────────────────────────��──────────────────────\n Accessibility — Reduced motion & High contrast\n ───────────────────────────────────────────────────────────────────────── */\n \n @media (prefers-reduced-motion: reduce) {\n *,\n *::before,\n *::after {\n animation-duration: var(--select-reduced-motion-duration) !important;\n animation-iteration-count: var(--select-reduced-motion-iteration-count) !important;\n transition-duration: var(--select-reduced-motion-duration) !important;\n }\n \n .dropdown-arrow.open {\n transform: var(--select-arrow-open-transform);\n }\n }\n \n @media (prefers-contrast: high) {\n .select-input:focus {\n outline-width: var(--select-high-contrast-focus-outline-width);\n outline-color: var(--select-high-contrast-focus-outline-color);\n }\n \n .input-container {\n border-width: var(--select-high-contrast-border-width);\n }\n \n .option.selected::before {\n width: var(--select-high-contrast-indicator-width);\n }\n }\n \n /* Touch targets (WCAG 2.5.5) */\n .load-more-button,\n select-option {\n min-height: var(--select-touch-target-min-height);\n }\n \n /* ─────────────────────────────────────────────────────────────────────────\n Dark Mode — Elegant dark theme\n ───────────────────────────────────────────────────────────────────────── */\n \n :host(.dark-mode),\n :host([dark-mode]),\n :host([darkmode]),\n :host([data-theme=\"dark\"]),\n :host([theme=\"dark\"]),\n :host-context(.dark-mode),\n :host-context(.dark),\n :host-context([dark-mode]),\n :host-context([darkmode]),\n :host-context([data-theme=\"dark\"]),\n :host-context([theme=\"dark\"]) {\n --select-primary: #e5e5e5;\n --select-primary-light: #2a2a3e;\n --select-accent: #6366f1;\n --select-accent-hover: #f43f5e;\n --select-surface: var(--select-dark-bg, #1a1a2e);\n --select-surface-elevated: #252540;\n --select-border: var(--select-dark-border, #3f3f5a);\n --select-border-focus: #6366f1;\n --select-text: var(--select-dark-text, #f5f5f5);\n --select-text-muted: #9ca3af;\n --select-text-placeholder: #6b7280;\n --select-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);\n --select-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);\n --select-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);\n --select-shadow-focus: 0 0 0 3px rgba(99, 102, 241, 0.25);\n\n --select-dropdown-bg: var(--select-dark-dropdown-bg, var(--select-surface));\n \n --select-arrow-color: var(--select-dark-arrow-color, #9ca3af);\n --select-arrow-hover-color: var(--select-dark-arrow-hover-color, #f5f5f5);\n --select-arrow-bg: var(--select-dark-arrow-bg, transparent);\n --select-arrow-hover-bg: var(--select-dark-arrow-hover-bg, rgba(156, 163, 175, 0.15));\n \n --select-separator-bg: var(--select-dark-separator-bg, var(--select-separator-dark-bg));\n --select-separator-width: var(--select-dark-separator-width, 1px);\n \n --select-badge-bg: var(--select-dark-badge-bg, rgba(99, 102, 241, 0.2));\n --select-badge-color: var(--select-dark-badge-color, #e0e7ff);\n --select-badge-border: var(--select-dark-badge-border, var(--select-badge-border, none));\n --select-badge-hover-border: var(--select-dark-badge-hover-border, var(--select-badge-hover-border, var(--select-badge-border, none)));\n --select-badge-active-border: var(--select-dark-badge-active-border, var(--select-badge-active-border, var(--select-badge-hover-border, var(--select-badge-border, none))));\n \n --select-group-header-bg: var(--select-group-header-dark-bg, #1a1a2e);\n --select-group-header-color: var(--select-group-header-dark-color, #9ca3af);\n \n --select-empty-color: var(--select-dark-empty-color, #9ca3af);\n \n --select-option-bg: var(--select-dark-option-bg, transparent);\n --select-option-color: var(--select-dark-option-color, var(--select-text));\n --select-option-border: var(--select-dark-option-border, none);\n --select-option-hover-bg: var(--select-dark-option-hover-bg, var(--select-surface-elevated));\n --select-option-hover-color: var(--select-dark-option-hover-color, var(--select-text));\n --select-option-hover-border: var(--select-dark-option-hover-border, var(--select-option-border, none));\n --select-option-selected-bg: var(--select-dark-option-selected-bg, linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%));\n --select-option-selected-color: var(--select-dark-option-selected-color, #a5b4fc);\n --select-option-selected-border: var(--select-dark-option-selected-border, var(--select-option-border, none));\n --select-option-selected-hover-bg: var(--select-dark-option-selected-hover-bg, var(--select-option-selected-bg));\n --select-option-selected-hover-color: var(--select-dark-option-selected-hover-color, var(--select-option-selected-color));\n --select-option-selected-hover-border: var(--select-dark-option-selected-hover-border, var(--select-option-selected-border, var(--select-option-hover-border, var(--select-option-border, none))));\n }\n\n :host(.dark-mode) .input-container,\n :host([dark-mode]) .input-container,\n :host([darkmode]) .input-container,\n :host([data-theme=\"dark\"]) .input-container,\n :host([theme=\"dark\"]) .input-container,\n :host-context(.dark-mode) .input-container,\n :host-context(.dark) .input-container,\n :host-context([dark-mode]) .input-container,\n :host-context([darkmode]) .input-container,\n :host-context([data-theme=\"dark\"]) .input-container,\n :host-context([theme=\"dark\"]) .input-container {\n background: var(--select-surface);\n border-color: var(--select-border);\n }\n\n :host(.dark-mode) .input-container:hover,\n :host([dark-mode]) .input-container:hover,\n :host([darkmode]) .input-container:hover,\n :host([data-theme=\"dark\"]) .input-container:hover,\n :host([theme=\"dark\"]) .input-container:hover,\n :host-context(.dark-mode) .input-container:hover,\n :host-context(.dark) .input-container:hover,\n :host-context([dark-mode]) .input-container:hover,\n :host-context([darkmode]) .input-container:hover,\n :host-context([data-theme=\"dark\"]) .input-container:hover,\n :host-context([theme=\"dark\"]) .input-container:hover {\n border-color: var(--select-dark-input-hover-border, var(--select-input-hover-border, var(--select-dark-border-focus, var(--select-border-focus, #6366f1))));\n box-shadow: var(--select-dark-input-hover-shadow, var(--select-input-hover-shadow, var(--select-shadow-sm), 0 0 0 1px rgba(99, 102, 241, 0.12)));\n }\n\n :host(.dark-mode) .input-container:focus-within,\n :host([dark-mode]) .input-container:focus-within,\n :host([darkmode]) .input-container:focus-within,\n :host([data-theme=\"dark\"]) .input-container:focus-within,\n :host([theme=\"dark\"]) .input-container:focus-within,\n :host-context(.dark-mode) .input-container:focus-within,\n :host-context(.dark) .input-container:focus-within,\n :host-context([dark-mode]) .input-container:focus-within,\n :host-context([darkmode]) .input-container:focus-within,\n :host-context([data-theme=\"dark\"]) .input-container:focus-within,\n :host-context([theme=\"dark\"]) .input-container:focus-within {\n border-color: var(--select-dark-border-focus, var(--select-border-focus, #6366f1));\n box-shadow: var(--select-dark-shadow-focus, var(--select-shadow-focus, 0 0 0 3px rgba(99, 102, 241, 0.25))), var(--select-shadow-sm);\n }\n\n :host(.dark-mode) .input-container::after,\n :host([dark-mode]) .input-container::after,\n :host([darkmode]) .input-container::after,\n :host([data-theme=\"dark\"]) .input-container::after,\n :host([theme=\"dark\"]) .input-container::after,\n :host-context(.dark-mode) .input-container::after,\n :host-context(.dark) .input-container::after,\n :host-context([dark-mode]) .input-container::after,\n :host-context([darkmode]) .input-container::after,\n :host-context([data-theme=\"dark\"]) .input-container::after,\n :host-context([theme=\"dark\"]) .input-container::after {\n background: var(--select-separator-dark-bg);\n }\n\n :host(.dark-mode) .select-dropdown,\n :host([dark-mode]) .select-dropdown,\n :host([darkmode]) .select-dropdown,\n :host([data-theme=\"dark\"]) .select-dropdown,\n :host([theme=\"dark\"]) .select-dropdown,\n :host-context(.dark-mode) .select-dropdown,\n :host-context(.dark) .select-dropdown,\n :host-context([dark-mode]) .select-dropdown,\n :host-context([darkmode]) .select-dropdown,\n :host-context([data-theme=\"dark\"]) .select-dropdown,\n :host-context([theme=\"dark\"]) .select-dropdown {\n background: var(--select-dropdown-bg, var(--select-surface));\n border-color: var(--select-border);\n }\n\n :host(.dark-mode) .options-container,\n :host([dark-mode]) .options-container,\n :host([darkmode]) .options-container,\n :host([data-theme=\"dark\"]) .options-container,\n :host([theme=\"dark\"]) .options-container,\n :host-context(.dark-mode) .options-container,\n :host-context(.dark) .options-container,\n :host-context([dark-mode]) .options-container,\n :host-context([darkmode]) .options-container,\n :host-context([data-theme=\"dark\"]) .options-container,\n :host-context([theme=\"dark\"]) .options-container {\n background: var(--select-dropdown-bg, var(--select-surface));\n scrollbar-color: var(--select-border) transparent;\n }\n\n :host(.dark-mode) .selection-badge,\n :host([dark-mode]) .selection-badge,\n :host([darkmode]) .selection-badge,\n :host([data-theme=\"dark\"]) .selection-badge,\n :host([theme=\"dark\"]) .selection-badge,\n :host-context(.dark-mode) .selection-badge,\n :host-context(.dark) .selection-badge,\n :host-context([dark-mode]) .selection-badge,\n :host-context([darkmode]) .selection-badge,\n :host-context([data-theme=\"dark\"]) .selection-badge,\n :host-context([theme=\"dark\"]) .selection-badge {\n background: var(--select-dark-badge-bg, var(--select-badge-bg, var(--select-badge-dark-bg)));\n color: var(--select-dark-badge-color, var(--select-badge-color, #e0e7ff));\n }\n\n :host(.dark-mode) .group-header:not(:first-child),\n :host([dark-mode]) .group-header:not(:first-child),\n :host([darkmode]) .group-header:not(:first-child),\n :host([data-theme=\"dark\"]) .group-header:not(:first-child),\n :host([theme=\"dark\"]) .group-header:not(:first-child),\n :host-context(.dark-mode) .group-header:not(:first-child),\n :host-context(.dark) .group-header:not(:first-child),\n :host-context([dark-mode]) .group-header:not(:first-child),\n :host-context([darkmode]) .group-header:not(:first-child),\n :host-context([data-theme=\"dark\"]) .group-header:not(:first-child),\n :host-context([theme=\"dark\"]) .group-header:not(:first-child) {\n border-top-color: var(--select-border);\n }\n\n :host(.dark-mode) .group-header,\n :host([dark-mode]) .group-header,\n :host([darkmode]) .group-header,\n :host([data-theme=\"dark\"]) .group-header,\n :host([theme=\"dark\"]) .group-header,\n :host-context(.dark-mode) .group-header,\n :host-context(.dark) .group-header,\n :host-context([dark-mode]) .group-header,\n :host-context([darkmode]) .group-header,\n :host-context([data-theme=\"dark\"]) .group-header,\n :host-context([theme=\"dark\"]) .group-header {\n color: var(--select-dark-group-header-color, var(--select-group-header-color, inherit));\n background: var(--select-dark-group-header-bg, var(--select-group-header-bg, #1a1a2e));\n border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(255, 255, 255, 0.08));\n box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.3));\n }\n\n :host(.dark-mode) .group-header,\n :host([dark-mode]) .group-header,\n :host([darkmode]) .group-header,\n :host([data-theme=\"dark\"]) .group-header,\n :host([theme=\"dark\"]) .group-header {\n color: var(--select-dark-group-header-color, var(--select-group-header-dark-color, #9ca3af));\n background: var(--select-dark-group-header-bg, var(--select-group-header-dark-bg, #1a1a2e));\n border-bottom: var(--select-group-header-border-bottom, 1px solid rgba(255, 255, 255, 0.08));\n box-shadow: var(--select-group-header-shadow, 0 1px 2px rgba(0, 0, 0, 0.3));\n }\n\n :host(.dark-mode) .group-header:not(:first-child),\n :host([dark-mode]) .group-header:not(:first-child),\n :host([darkmode]) .group-header:not(:first-child),\n :host([data-theme=\"dark\"]) .group-header:not(:first-child),\n :host([theme=\"dark\"]) .group-header:not(:first-child) {\n border-top-color: var(--select-border);\n }\n\n :host(.dark-mode) .option.selected::before,\n :host([dark-mode]) .option.selected::before,\n :host([darkmode]) .option.selected::before,\n :host([data-theme=\"dark\"]) .option.selected::before,\n :host([theme=\"dark\"]) .option.selected::before,\n :host-context(.dark-mode) .option.selected::before,\n :host-context(.dark) .option.selected::before,\n :host-context([dark-mode]) .option.selected::before,\n :host-context([darkmode]) .option.selected::before,\n :host-context([data-theme=\"dark\"]) .option.selected::before,\n :host-context([theme=\"dark\"]) .option.selected::before {\n background: var(--select-accent);\n }\n `;\n \n // Insert as first child to ensure styles are processed first\n if (this._shadow.firstChild) {\n this._shadow.insertBefore(style, this._shadow.firstChild);\n } else {\n this._shadow.appendChild(style);\n }\n \n }\n\n private _attachEventListeners(): void {\n // Arrow click handler\n if (this._arrowContainer) {\n this._boundArrowClick = (e: Event) => {\n e.stopPropagation();\n e.preventDefault();\n\n // delegate to the existing open/close helpers so we don't accidentally\n // drift out of sync with the logic in those methods (focus, events,\n // scroll-to-selected, etc.)\n if (this._state.isOpen && this._config.selection.toggleOnTriggerClick !== false) {\n this._handleClose();\n } else if (!this._state.isOpen) {\n this._handleOpen();\n }\n };\n this._arrowContainer.addEventListener('click', this._boundArrowClick);\n }\n\n if (this._clearControl) {\n this._clearControl.addEventListener('pointerdown', (e) => {\n e.stopPropagation();\n e.preventDefault();\n });\n\n this._clearControl.addEventListener('click', (e) => {\n e.stopPropagation();\n e.preventDefault();\n this._handleClearControlClick();\n });\n }\n\n // Input container click - focus input and open dropdown\n // Prevent the original pointer event from bubbling/causing default focus behavior\n // which can interfere with option click handling when opening the dropdown\n this._inputContainer.addEventListener('pointerdown', (e) => {\n // Prevent propagation to document click listener but do NOT preventDefault.\n // Allow default so browser events (click) on newly opened options still fire.\n // e.stopPropagation(); // BUG: By stopping propagation here, the document click listener doesn't see it, which is fine for not closing it. But be very careful.\n\n const target = e.target as HTMLElement | null;\n if (!this._config.enabled) return;\n if (target && target.closest('.dropdown-arrow-container')) return;\n if (target && target.closest('.clear-control-button')) return;\n if (this._isPointerOnInputScrollbar(e)) {\n this._suppressNextOpenClick = true;\n return;\n }\n\n const isHorizontalMultiMode = this._config.selection.mode === 'multi'\n && (this._config.multiSelectDisplay?.mode ?? 'wrap') === 'horizontal';\n const enableHorizontalDrag = this._canUseHorizontalMultiScroll(target);\n\n if (enableHorizontalDrag && e.button === 0) {\n this._beginMultiScrollDrag(e);\n this._suppressNextOpenClick = false;\n e.preventDefault();\n return;\n }\n \n // If we clicked the container, but not the input itself, we must prevent default\n // otherwise the browser moves focus from our input to the body, immediately triggering blur.\n if (target && !target.matches('.select-input')) {\n e.preventDefault();\n }\n\n const clickedInput = Boolean(target && target.matches('.select-input'));\n\n if (\n this._state.isOpen &&\n this._config.selection.toggleOnTriggerClick !== false &&\n !isHorizontalMultiMode &&\n !enableHorizontalDrag &&\n !(clickedInput && this._config.searchable)\n ) {\n this._handleClose();\n return;\n }\n\n const wasClosed = !this._state.isOpen;\n if (wasClosed) {\n this._handleOpen();\n }\n\n // Focus the input (do not prevent default behavior for input itself)\n this._applyFocusIntent('input', 'input-container-trigger');\n\n // If we just opened the dropdown, transfer pointer capture to the\n // options container so the subsequent pointerup lands there instead of\n // staying with the input container (which would swallow the event).\n if (wasClosed && this._optionsContainer && typeof e.pointerId === 'number') {\n try {\n this._optionsContainer.setPointerCapture(e.pointerId);\n } catch (_err) {\n // Some browsers may throw if element is not yet \"connected\"; ignore\n }\n }\n });\n\n this._inputContainer.addEventListener('click', (e) => {\n const target = e.target as HTMLElement | null;\n const isHorizontalMultiMode = this._config.selection.mode === 'multi'\n && (this._config.multiSelectDisplay?.mode ?? 'wrap') === 'horizontal';\n\n if (!this._config.enabled || !isHorizontalMultiMode) {\n this._suppressNextOpenClick = false;\n this._multiScrollDrag.moved = false;\n return;\n }\n\n if (target && target.closest('.dropdown-arrow-container, .clear-control-button')) {\n this._suppressNextOpenClick = false;\n this._multiScrollDrag.moved = false;\n return;\n }\n\n if (this._suppressNextOpenClick || this._multiScrollDrag.moved || this._isPointerOnInputScrollbar(e)) {\n this._suppressNextOpenClick = false;\n this._multiScrollDrag.moved = false;\n return;\n }\n\n this._suppressNextOpenClick = false;\n this._multiScrollDrag.moved = false;\n\n if (!this._state.isOpen) {\n this._handleOpen();\n }\n\n this._applyFocusIntent('input', 'input-container-activation');\n });\n\n this._inputContent.addEventListener('pointermove', (e) => {\n this._updateMultiScrollDrag(e);\n });\n\n this._inputContent.addEventListener('pointerup', (e) => {\n this._endMultiScrollDrag(e.pointerId);\n });\n\n this._inputContent.addEventListener('pointercancel', (e) => {\n this._endMultiScrollDrag(e.pointerId);\n });\n\n this._inputContent.addEventListener('wheel', (e) => {\n if (\n this._config.selection.mode === 'multi'\n && (this._config.multiSelectDisplay?.mode ?? 'wrap') === 'horizontal'\n ) {\n const primaryDelta = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY;\n if (primaryDelta !== 0) {\n this._inputContent.scrollLeft += primaryDelta;\n }\n e.preventDefault();\n }\n }, { passive: false });\n \n // Input container click - prevent event from reaching document listener\n this._container.addEventListener('click', (e) => {\n e.stopPropagation();\n });\n \n // Input focus/blur\n this._input.addEventListener('focus', () => {\n this._runEngineEffects(this._engine.dispatch({ type: 'FOCUS_GAINED' }));\n this._handleOpen();\n });\n // When the input loses focus we normally close the dropdown, but\n // clicking an option will blur the input before the option's click\n // handler executes. To avoid the blur timer closing the dropdown\n // prematurely we use a short-lived flag that is set whenever we start\n // interacting with the options container. The close callback checks this\n // flag and skips closing if the user is about to click an option.\n this._input.addEventListener('blur', (e) => {\n this._runEngineEffects(this._engine.dispatch({ type: 'FOCUS_LOST' }));\n const related = (e as FocusEvent).relatedTarget as Node | null;\n if (related && (this._shadow.contains(related) || this._container.contains(related))) {\n return;\n }\n\n // Delay to allow option click/focus transitions\n this._setLifecycleTimeout(() => {\n if (this._suppressBlurClose) {\n // another pointerdown inside options is in progress; keep open\n return;\n }\n\n const active = document.activeElement as Node | null;\n if (active && (this._shadow.contains(active) || this._container.contains(active))) {\n return;\n }\n\n this._handleClose('blur');\n }, 150);\n });\n \n // Input search\n this._input.addEventListener('input', (e) => {\n if (!this._config.searchable) return;\n const query = (e.target as HTMLInputElement).value;\n this._handleSearch(query);\n });\n\n // If the user presses down inside the options container we should\n // temporarily suppress blur-based closing until after the click has\n // been handled. Setting a flag that gets cleared in the next tick is\n // sufficient.\n this._optionsContainer.addEventListener('pointerdown', () => {\n this._suppressBlurClose = true;\n this._setLifecycleTimeout(() => {\n this._suppressBlurClose = false;\n }, 150); // Increased timeout to ensure click finishes before blur checks\n });\n\n // Delegated click listener for improved event handling (robust across shadow DOM)\n const handleOptionEvent = (e: MouseEvent | PointerEvent) => {\n\n const path = (e.composedPath && e.composedPath()) || [e.target];\n let option: Element | null = null;\n\n for (const node of path as any[]) {\n if (!(node instanceof Element)) continue;\n try {\n if (node.matches('[data-sm-selectable], [data-selectable], [data-sm-state]')) {\n option = node;\n break;\n }\n } catch (err) {\n continue;\n }\n }\n\n if (option && (!option.hasAttribute('aria-disabled') || option.classList.contains('smilodon-option--disabled-selectable'))) {\n const indexStr = option.getAttribute('data-sm-index') ?? option.getAttribute('data-index');\n const index = Number(indexStr);\n if (!Number.isNaN(index)) {\n this._selectOption(index, {\n shiftKey: (e as MouseEvent).shiftKey,\n toggleKey: (e as MouseEvent).ctrlKey || (e as MouseEvent).metaKey,\n });\n }\n }\n };\n\n this._optionsContainer.addEventListener('click', handleOptionEvent);\n \n // Keyboard navigation\n this._input.addEventListener('keydown', (e) => this._handleKeydown(e));\n \n }\n\n private _initializeObservers(): void {\n // Disconnect existing observer if any\n if (this._intersectionObserver) {\n this._intersectionObserver.disconnect();\n this._intersectionObserver = undefined;\n }\n\n if (this._dataLoadingConfig.protocol === 'acknowledged'\n && (!this._dataRequestCoordinator || !this._acknowledgedReady)) return;\n\n // Intersection observer for infinite scroll\n if (this._config.infiniteScroll.enabled) {\n const acknowledged = Boolean(\n this._dataRequestCoordinator && this._dataLoadingConfig.protocol === 'acknowledged',\n );\n if (acknowledged && typeof IntersectionObserver === 'undefined') return;\n\n let observer: IntersectionObserver;\n try {\n observer = new IntersectionObserver(\n (entries) => {\n if (this._intersectionObserver !== observer) return;\n entries.forEach((entry) => {\n if (acknowledged) {\n if (!this._acknowledgedReady || !this.isConnected || entry.target !== this._loadMoreTrigger) return;\n if (!entry.isIntersecting) {\n this._dataRequestCoordinator?.setSentinelIntersecting(false);\n return;\n }\n if (this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling) return;\n const actions = this._dataRequestCoordinator?.setSentinelIntersecting(true) ?? [];\n this._dispatchAcknowledgedActions(actions);\n return;\n }\n\n if (entry.isIntersecting && !this._state.isBusy) {\n this._loadMoreItems();\n }\n });\n },\n acknowledged\n ? { root: this._optionsContainer, threshold: 0.1 }\n : { threshold: 0.1 },\n );\n this._intersectionObserver = observer;\n } catch (error) {\n this._intersectionObserver = undefined;\n if (!acknowledged) throw error;\n }\n }\n }\n\n private async _loadInitialSelectedItems(): Promise<void> {\n if (!this._config.serverSide.fetchSelectedItems || !this._config.serverSide.initialSelectedValues) {\n return;\n }\n \n this._setBusy(true);\n const generation = ++this._asyncGeneration;\n \n try {\n const items = await this._config.serverSide.fetchSelectedItems(\n this._config.serverSide.initialSelectedValues\n );\n if (generation !== this._asyncGeneration || !this.isConnected) return;\n\n const fetchedRegistry = createItemRegistry(items, this._itemAdapter, {\n duplicateKeyPolicy: this._getDuplicateKeyPolicy(),\n });\n this._requestSelectionReplacement(fetchedRegistry.records, 'external-value-sync', 'initial selected items');\n \n this._updateInputDisplay();\n } catch (error) {\n if (generation !== this._asyncGeneration || !this.isConnected) return;\n this._handleError(error as Error);\n } finally {\n if (generation === this._asyncGeneration && this.isConnected) {\n this._setBusy(false);\n }\n }\n }\n\n private _runEngineEffects(effects: ReturnType<SelectEngineBridge['dispatch']>): void {\n this._effectRunner.run(effects, {\n focusTrigger: () => {\n this._applyFocusIntent('input', 'engine-focus-trigger');\n },\n syncAria: () => {\n this._syncPopupAria();\n },\n });\n }\n\n private _syncPopupAria(): void {\n if (!this._input) return;\n this._syncComboboxAccessibility();\n }\n\n private _syncComboboxAccessibility(): void {\n if (!this._input || !this._engine || !this._state) return;\n\n const accessibilityState = deriveAccessibilityState(this._engine.state, {\n searchable: this._config.searchable,\n readonly: !this._config.searchable,\n invalid: this._hasError,\n label: {\n ariaLabel: this.getAttribute('aria-label')?.trim() || null,\n ariaDescription: this.getAttribute('aria-description')?.trim() || null,\n },\n errorMessage: this._errorMessage,\n errorDescriptionId: this._hasError && this._errorMessage ? this._errorDescription?.id ?? null : null,\n });\n const effects = computeAccessibilityEffects(accessibilityState, {\n controlsId: this._dropdown?.id || null,\n optionKeys: [],\n }).filter((effect) => effect.type === 'SYNC_COMBOBOX_ARIA');\n\n applyAccessibilityEffects(effects, {\n combobox: this._input,\n getOptionByKey: (key) => {\n if (!this._state.isOpen) return null;\n const index = this._itemRegistry.keyToIndex.get(key);\n return index === undefined ? null : this._getOptionElementByIndex(index);\n },\n });\n }\n\n private _syncListboxAccessibility(): void {\n if (!this._dropdown || !this._engine || !this._state) return;\n\n const derivedState = deriveAccessibilityState(this._engine.state, {\n label: { ariaLabel: this.getAttribute('aria-label')?.trim() || null },\n });\n const accessibilityState = {\n ...derivedState,\n // The component's existing busy lifecycle is not yet mirrored to engine dataStatus.\n // Host presentation busy is additive only for the accepted acknowledged\n // protocol; legacy host attributes remain inert for listbox semantics.\n busy: this._state.isBusy || (\n this._dataLoadingConfig.protocol === 'acknowledged'\n && this.getAttribute('aria-busy') === 'true'\n ),\n };\n const effects = computeAccessibilityEffects(accessibilityState, {\n controlsId: this._dropdown.id || null,\n optionKeys: [],\n }).filter((effect) => effect.type === 'SYNC_LISTBOX_ARIA');\n\n applyAccessibilityEffects(effects, { listbox: this._dropdown });\n }\n\n private _syncRenderedOptionAccessibility(): void {\n if (!this._optionsContainer || !this._engine || !this._state) return;\n\n const optionTargets = new Map<SelectKey, HTMLElement>();\n this._optionsContainer.querySelectorAll<HTMLElement>('[data-index]').forEach((option) => {\n const index = Number(option.getAttribute('data-index'));\n if (!Number.isFinite(index)) return;\n const key = this._itemRegistry.indexToKey.get(index);\n if (key !== undefined) optionTargets.set(key, option);\n });\n if (optionTargets.size === 0) return;\n\n const effects = computeAccessibilityEffects(deriveAccessibilityState(this._engine.state), {\n controlsId: this._dropdown?.id || null,\n optionKeys: [...optionTargets.keys()],\n }).filter((effect) => effect.type === 'SYNC_OPTION_ARIA');\n\n applyAccessibilityEffects(effects, {\n getOptionByKey: (key) => optionTargets.get(key) ?? null,\n });\n }\n\n private _applyFocusIntent(\n target: 'input' | 'clear-button' | 'active-option' | 'none',\n reason: string,\n focusTarget?: HTMLElement | null,\n ): void {\n const effects = computeAccessibilityEffects(deriveAccessibilityState(this._engine.state), {\n optionKeys: [],\n focusIntents: [{ target, reason }],\n }).filter((effect) => effect.type === 'FOCUS_INTENT');\n\n applyAccessibilityEffects(effects, {\n focusTargets: {\n input: target === 'input' ? this._input : null,\n clearButton: target === 'clear-button' ? this._clearControl : null,\n getActiveOption: () => target === 'active-option' ? focusTarget ?? null : null,\n },\n }, { applyFocus: true });\n }\n\n private _handleOpen(): void {\n if (!this._config.enabled) {\n this._runEngineEffects(this._engine.dispatch({ type: 'DISABLED_CHANGED', disabled: true }));\n return;\n }\n if (this._state.isOpen) return;\n\n // close any other open selects before proceeding\n EnhancedSelect._instances.forEach(inst => {\n if (inst !== this) inst._handleClose();\n });\n\n const effects = this._engine.dispatch({ type: 'OPEN_REQUEST' });\n if (!effects.some((effect) => effect.type === 'POPUP_OPENED')) return;\n this._runEngineEffects(effects);\n\n this._markOpenStart();\n this.setAttribute('data-open', 'true');\n this._liftStackingAncestors();\n this._dropdown.style.display = 'block';\n this._updateArrowRotation();\n\n // Render options when opening\n this._renderOptions();\n this._syncDropdownPlacement();\n this._setInitialActiveOption();\n\n this._emit('open', {});\n this._config.callbacks.onOpen?.();\n this._announce('Options expanded');\n\n // Scroll to selected if configured\n if (this._config.scrollToSelected.enabled) {\n const keyboardActiveChangeGeneration = this._keyboardActiveChangeGeneration;\n const canRestoreOpenSelection = () => this._state.isOpen\n && this._keyboardActiveChangeGeneration === keyboardActiveChangeGeneration;\n\n // Use requestAnimationFrame for better timing after render\n this._requestLifecycleFrame(() => {\n if (!canRestoreOpenSelection()) return;\n // Double RAF to ensure layout is complete\n this._requestLifecycleFrame(() => {\n if (!canRestoreOpenSelection()) return;\n this._scrollToSelected();\n });\n });\n }\n }\n\n private _handleClose(reason: CloseReason = 'programmatic'): void {\n const effects = this._engine.dispatch({ type: 'CLOSE_REQUEST', reason });\n if (!effects.some((effect) => effect.type === 'POPUP_CLOSED')) return;\n\n this.removeAttribute('data-open');\n this._restoreLiftedAncestors();\n this._dropdown.style.display = 'none';\n this._dropdown.setAttribute('data-placement', this._resolvedDropdownPlacement);\n this._updateArrowRotation();\n this._runEngineEffects(effects);\n \n this._emit('close', {});\n this._config.callbacks.onClose?.();\n this._announce('Options collapsed');\n }\n\n private _updateDropdownVisibility(): void {\n if (this._state.isOpen) {\n this.setAttribute('data-open', 'true');\n this._liftStackingAncestors();\n this._dropdown.style.display = 'block';\n this._syncDropdownPlacement();\n } else {\n this.removeAttribute('data-open');\n this._restoreLiftedAncestors();\n this._dropdown.style.display = 'none';\n }\n this._syncComboboxAccessibility();\n }\n\n private _liftStackingAncestors(): void {\n this._restoreLiftedAncestors();\n\n let ancestor = this.parentElement;\n while (ancestor && ancestor !== document.body) {\n if (this._createsStackingContext(ancestor)) {\n const hadMarker = ancestor.hasAttribute('data-smilodon-open-ancestor');\n this._liftedAncestors.push({\n element: ancestor,\n position: ancestor.style.position,\n zIndex: ancestor.style.zIndex,\n hadMarker,\n });\n\n if (getComputedStyle(ancestor).position === 'static') {\n ancestor.style.position = 'relative';\n }\n\n ancestor.style.zIndex = 'var(--select-ancestor-open-z-index, var(--select-host-open-z-index, var(--select-dropdown-z-index, 1000)))';\n ancestor.setAttribute('data-smilodon-open-ancestor', 'true');\n }\n\n ancestor = ancestor.parentElement;\n }\n }\n\n private _restoreLiftedAncestors(): void {\n for (const lifted of this._liftedAncestors) {\n lifted.element.style.position = lifted.position;\n lifted.element.style.zIndex = lifted.zIndex;\n\n if (!lifted.hadMarker) {\n lifted.element.removeAttribute('data-smilodon-open-ancestor');\n }\n }\n\n this._liftedAncestors = [];\n }\n\n private _createsStackingContext(element: HTMLElement): boolean {\n const style = getComputedStyle(element);\n\n if (style.position === 'fixed' || style.position === 'sticky') return true;\n if (style.zIndex !== 'auto' && style.position !== 'static') return true;\n if (style.opacity !== '1') return true;\n if (style.transform !== 'none') return true;\n if (style.filter !== 'none') return true;\n if ((style as CSSStyleDeclaration & { backdropFilter?: string }).backdropFilter && (style as CSSStyleDeclaration & { backdropFilter?: string }).backdropFilter !== 'none') return true;\n if (style.perspective !== 'none') return true;\n if (style.mixBlendMode !== 'normal') return true;\n if (style.isolation === 'isolate') return true;\n if (style.contain.includes('paint') || style.contain.includes('layout')) return true;\n if (style.willChange.includes('transform') || style.willChange.includes('opacity') || style.willChange.includes('filter')) return true;\n\n return false;\n }\n\n private _updateArrowRotation(): void {\n if (this._arrowContainer) {\n const arrow = this._arrowContainer.querySelector('.dropdown-arrow');\n if (arrow) {\n if (this._state.isOpen) {\n arrow.classList.add('open');\n } else {\n arrow.classList.remove('open');\n }\n }\n }\n }\n\n private _isPerfEnabled(): boolean {\n return typeof globalThis !== 'undefined'\n && (globalThis as any).__SMILODON_DEV__ === true\n && typeof performance !== 'undefined'\n && typeof performance.mark === 'function'\n && typeof performance.measure === 'function';\n }\n\n private _perfMark(name: string): void {\n if (!this._isPerfEnabled()) return;\n performance.mark(name);\n }\n\n private _perfMeasure(name: string, start: string, end: string): void {\n if (!this._isPerfEnabled()) return;\n performance.measure(name, start, end);\n performance.clearMarks(start);\n performance.clearMarks(end);\n performance.clearMeasures(name);\n }\n\n private _markOpenStart(): void {\n if (!this._isPerfEnabled()) return;\n this._pendingFirstRenderMark = true;\n this._perfMark('smilodon-dropdown-open-start');\n }\n\n private _finalizePerfMarks(): void {\n if (!this._isPerfEnabled()) {\n this._pendingFirstRenderMark = false;\n this._pendingSearchRenderMark = false;\n return;\n }\n\n if (this._pendingFirstRenderMark) {\n this._pendingFirstRenderMark = false;\n this._perfMark('smilodon-first-render-complete');\n this._perfMeasure(\n 'smilodon-dropdown-to-first-render',\n 'smilodon-dropdown-open-start',\n 'smilodon-first-render-complete'\n );\n }\n\n if (this._pendingSearchRenderMark) {\n this._pendingSearchRenderMark = false;\n this._perfMark('smilodon-search-render-complete');\n this._perfMeasure(\n 'smilodon-search-to-render',\n 'smilodon-search-input-last',\n 'smilodon-search-render-complete'\n );\n }\n }\n\n /**\n * Filter items by search query (optimized hot path)\n * Uses for-loop with hoisted invariants for better performance\n */\n private _filterItemsByQuery(items: any[], query: string): any[] {\n // Early return for empty query\n if (!query?.trim()) return items;\n \n // PERF: Hoist invariants outside loop\n const lowerQuery = query.toLowerCase().trim();\n const getLabelFn = this._config.serverSide.getLabelFromItem \n ?? ((item: any) => item?.label ?? item?.text ?? String(item));\n \n const results: any[] = [];\n const len = items.length;\n \n // PERF: for-loop instead of filter (no closure allocation)\n for (let i = 0; i < len; i++) {\n const item = items[i];\n if (item == null) continue;\n \n try {\n const label = getLabelFn(item);\n if (label == null) continue;\n \n const labelStr = String(label).toLowerCase();\n if (labelStr.includes(lowerQuery)) {\n results.push(item);\n }\n } catch (e) {\n // Silent fail for robustness with external data\n continue;\n }\n }\n \n return results;\n }\n\n private _handleSearch(query: string): void {\n if (\n this._dataRequestCoordinator\n && (this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling)\n ) {\n // Keep the committed query/generation stable until the accepted snapshot\n // has been projected. Coalesce input as a latest-wins intent and dispatch\n // exactly one new generation after recovery/projection succeeds.\n this._acknowledgedPendingSearchQuery = query;\n this._input.value = query;\n this._syncClearControlState();\n return;\n }\n\n if (\n this._dataLoadingConfig.protocol === 'acknowledged'\n && (this._dataLoadingConfig.searchMode === 'remote' || this._dataLoadingConfig.searchMode === 'hybrid')\n ) {\n this._state.searchQuery = query;\n this._syncClearControlState();\n this._state.lastNotifiedQuery = query;\n this._state.lastNotifiedResultCount = 0;\n if (this._dataRequestCoordinator) {\n const actions = this._dataRequestCoordinator.setQuery(query);\n if (this._acknowledgedReady) this._dispatchAcknowledgedActions(actions);\n else this._renderOptions();\n } else if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n this._renderOptions();\n }\n return;\n }\n\n this._state.searchQuery = query;\n this._syncClearControlState();\n\n if (this._dataLoadingConfig.protocol === 'acknowledged' && this._dataRequestCoordinator) {\n // Local acknowledged search has no remote request, but pagination still\n // belongs to the coordinator's current query generation.\n this._dispatchAcknowledgedActions(this._dataRequestCoordinator.setQuery(query));\n }\n\n if (query.length > 0) {\n this._perfMark('smilodon-search-input-last');\n this._pendingSearchRenderMark = true;\n } else {\n this._pendingSearchRenderMark = false;\n }\n \n // Clear previous search timeout\n if (this._searchTimeout) {\n clearTimeout(this._searchTimeout);\n }\n\n // Search immediately - no debouncing for better responsiveness\n // Users expect instant feedback as they type\n this._state.isSearching = false;\n \n // Ensure dropdown is open when searching\n if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n // Filter and render options immediately\n this._renderOptions();\n }\n \n // PERF: Use optimized filter function\n const filteredItems = this._filterItemsByQuery(this._state.loadedItems, query);\n const count = filteredItems.length;\n \n // Announce search results for accessibility\n const trimmedQuery = query.trim();\n if (trimmedQuery) {\n this._announce(`${count} result${count !== 1 ? 's' : ''} found for \"${query}\"`);\n }\n \n // Only notify if query or result count changed to prevent infinite loops\n if (query !== this._state.lastNotifiedQuery || count !== this._state.lastNotifiedResultCount) {\n this._state.lastNotifiedQuery = query;\n this._state.lastNotifiedResultCount = count;\n \n // Use setTimeout to avoid synchronous state updates during render\n this._setLifecycleTimeout(() => {\n this._emit('search', { query, results: filteredItems, count });\n this._config.callbacks.onSearch?.(query);\n }, 0);\n }\n }\n\n private _handleKeydown(e: KeyboardEvent): void {\n if (!this._config.enabled) return;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n this._moveActive(1, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });\n }\n break;\n case 'ArrowUp':\n e.preventDefault();\n if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n this._moveActive(-1, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });\n }\n break;\n case 'Home':\n e.preventDefault();\n if (this._state.isOpen) {\n const selectableIndices = this._getSelectableOptionIndices();\n const firstIndex = selectableIndices[0];\n if (firstIndex === undefined) break;\n this._setActive(firstIndex);\n if (this._config.selection.mode === 'multi' && e.shiftKey) {\n this._selectRange(this._rangeAnchorIndex ?? firstIndex, firstIndex, { clear: !(e.ctrlKey || e.metaKey) });\n }\n }\n break;\n case 'End':\n e.preventDefault();\n if (this._state.isOpen) {\n const selectableIndices = this._getSelectableOptionIndices();\n const lastIndex = selectableIndices[selectableIndices.length - 1];\n if (lastIndex === undefined) break;\n this._setActive(lastIndex);\n if (this._config.selection.mode === 'multi' && e.shiftKey) {\n this._selectRange(this._rangeAnchorIndex ?? lastIndex, lastIndex, { clear: !(e.ctrlKey || e.metaKey) });\n }\n }\n break;\n case 'PageDown':\n e.preventDefault();\n if (this._state.isOpen) {\n this._moveActive(10, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });\n }\n break;\n case 'PageUp':\n e.preventDefault();\n if (this._state.isOpen) {\n this._moveActive(-10, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey });\n }\n break;\n case 'Enter':\n case ' ':\n e.preventDefault();\n if (!this._state.isOpen) {\n this._handleOpen();\n } else {\n const activeKey = this._engine.state.activeKey;\n const currentIndex = activeKey === null ? -1 : this._itemRegistry.keyToIndex.get(activeKey) ?? -1;\n if (currentIndex >= 0) {\n this._selectOption(currentIndex, { shiftKey: e.shiftKey, toggleKey: e.ctrlKey || e.metaKey, reason: 'keyboard' });\n }\n }\n break;\n case 'Escape':\n e.preventDefault();\n this._handleClose('escape');\n break;\n case 'Tab':\n if (this._state.isOpen) {\n this._handleClose();\n }\n break;\n case 'a':\n case 'A':\n if ((e.ctrlKey || e.metaKey) && this._config.selection.mode === 'multi') {\n e.preventDefault();\n this._selectAll();\n }\n break;\n default:\n // Type-ahead search\n if (e.key.length === 1 && !e.ctrlKey && !e.altKey && !e.metaKey) {\n this._handleTypeAhead(e.key);\n }\n break;\n }\n }\n\n private _moveActive(delta: number, opts?: { shiftKey?: boolean; toggleKey?: boolean }): void {\n const selectableIndices = this._getSelectableOptionIndices();\n if (selectableIndices.length === 0) return;\n\n const activeKey = this._engine.state.activeKey;\n const currentIndex = activeKey === null ? -1 : this._itemRegistry.keyToIndex.get(activeKey) ?? -1;\n const currentPosition = selectableIndices.indexOf(currentIndex);\n const basePosition = currentPosition >= 0\n ? currentPosition\n : delta >= 0\n ? -1\n : selectableIndices.length;\n const nextPosition = Math.max(0, Math.min(selectableIndices.length - 1, basePosition + delta));\n const next = selectableIndices[nextPosition];\n this._setActive(next);\n\n if (this._config.selection.mode === 'multi' && opts?.shiftKey) {\n const anchor = this._rangeAnchorIndex ?? currentIndex;\n const anchorIndex = anchor >= 0 ? anchor : next;\n if (this._rangeAnchorIndex === null) {\n this._rangeAnchorIndex = anchorIndex;\n }\n this._selectRange(anchorIndex, next, { clear: !opts?.toggleKey });\n }\n }\n\n private _setActive(index: number, reason: ActiveReason = 'keyboard'): void {\n this._ensureRegistryCurrent();\n const record = this._getRecordByIndex(index);\n let option = this._getOptionElementByIndex(index);\n if (!option && record && this._guardedVirtualizer) {\n this._materializeGuardedVirtualKey(record.key);\n option = this._getOptionElementByIndex(index);\n }\n if (!record || record.disabled || !option || option.getAttribute('aria-disabled') === 'true') {\n return;\n }\n\n if (reason === 'keyboard') this._keyboardActiveChangeGeneration += 1;\n\n const previousIndex = this._state.activeIndex;\n this._dispatchActiveKey(record.key, reason, 'set active');\n if (this._state.activeIndex !== index) return;\n\n // Clear previous active state\n if (previousIndex >= 0 && previousIndex !== index) {\n const prevOption = this._getOptionElementByIndex(previousIndex);\n if (prevOption) {\n // Check if it's a custom SelectOption or a lightweight DOM element\n if ('setActive' in prevOption && typeof (prevOption as any).setActive === 'function') {\n (prevOption as SelectOption).setActive(false);\n } else {\n this._syncCustomOptionActiveClasses(prevOption, false);\n }\n }\n }\n \n // Set new active state\n if (option) {\n // Check if it's a custom SelectOption or a lightweight DOM element\n if ('setActive' in option && typeof (option as any).setActive === 'function') {\n (option as SelectOption).setActive(true);\n } else {\n this._syncCustomOptionActiveClasses(option, true);\n }\n \n if (typeof option.scrollIntoView === 'function') {\n // Don't scroll wildly when just opening with pre-selections\n option.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n }\n \n // Announce position for screen readers\n const total = this._state.loadedItems.length;\n this._announce(`Item ${index + 1} of ${total}`);\n \n // Update aria-activedescendant using the actual option id when available\n this._syncLegacyActiveAria();\n }\n }\n\n private _getOptionElementByIndex(index: number): HTMLElement | null {\n return this._optionsContainer.querySelector(`[data-index=\"${index}\"]`) as HTMLElement | null;\n }\n\n private _getSelectableOptions(): HTMLElement[] {\n // Filter out group headers and other non-selectable elements\n // Only return elements with data-index or data-sm-selectable attributes\n return Array.from(this._optionsContainer.children).filter((child) => {\n return (child.hasAttribute('data-index') || child.hasAttribute('data-sm-selectable'))\n && child.getAttribute('aria-disabled') !== 'true';\n }) as HTMLElement[];\n }\n\n private _getSelectableOptionIndices(): number[] {\n if (this._guardedVirtualizer) {\n return this._renderPlan.filteredKeys.flatMap((key) => {\n const record = this._itemRegistry.keyToRecord.get(key);\n return record && !record.disabled ? [record.index] : [];\n });\n }\n\n return this._getSelectableOptions()\n .map((option) => Number(option.getAttribute('data-sm-index') ?? option.getAttribute('data-index')))\n .filter((index) => Number.isFinite(index));\n }\n\n private _buildRendererHelpers(): RendererHelpers {\n return {\n onSelect: (_item: unknown, index: number) => this._selectOption(index),\n getIndex: (node: Element | null) => {\n const el = node?.closest?.('[data-selectable]') as HTMLElement | null;\n if (!el) return null;\n const idx = Number(el.dataset.index);\n return Number.isFinite(idx) ? idx : null;\n },\n keyboardFocus: (index: number) => {\n this._setActive(index);\n const el = this._getOptionElementByIndex(index);\n this._applyFocusIntent('active-option', 'renderer-keyboard-focus', el);\n },\n };\n }\n\n private _handleTypeAhead(char: string): void {\n if (this._typeTimeout) clearTimeout(this._typeTimeout);\n \n this._typeBuffer += char.toLowerCase();\n this._typeTimeout = window.setTimeout(() => {\n this._typeBuffer = '';\n }, 500);\n \n // Find first matching option\n const getValue = this._config.serverSide.getLabelFromItem || ((item) => (item as any)?.label ?? String(item));\n const matchIndex = this._state.loadedItems.findIndex((item) =>\n getValue(item).toLowerCase().startsWith(this._typeBuffer)\n );\n \n if (matchIndex >= 0) {\n this._setActive(matchIndex, 'search');\n }\n }\n\n private _selectAll(): void {\n if (this._config.selection.mode !== 'multi') return;\n this._ensureRegistryCurrent();\n const options = this._getSelectableOptions();\n const entries = this._getSelectedEntries();\n options.forEach((option) => {\n const optionIndex = Number(option.getAttribute('data-sm-index') ?? option.getAttribute('data-index'));\n if (!Number.isFinite(optionIndex)) return;\n const record = this._getRecordByIndex(optionIndex);\n if (record && !this._isOptionSelectionBlocked(record.item)) entries.push(record);\n });\n this._requestSelectionReplacement(entries, 'keyboard', 'select all');\n this._renderOptions();\n this._updateInputDisplay();\n this._emitChange();\n this._announce(`Selected all ${options.length} items`);\n }\n\n private _selectRange(start: number, end: number, opts?: { clear?: boolean; reason?: SelectionReason }): void {\n if (this._config.selection.mode !== 'multi') return;\n this._ensureRegistryCurrent();\n const [min, max] = start < end ? [start, end] : [end, start];\n const selectedEntries = this._getSelectedEntries();\n const entries = opts?.clear\n ? selectedEntries.filter((entry) => !this._itemRegistry.keyToRecord.has(entry.key))\n : selectedEntries;\n for (let i = min; i <= max; i += 1) {\n const record = this._getRecordByIndex(i);\n const optionEl = this._getOptionElementByIndex(i);\n if (optionEl?.getAttribute('aria-disabled') === 'true' && !optionEl.classList.contains('smilodon-option--disabled-selectable')) continue;\n if (!record || this._isOptionSelectionBlocked(record.item)) continue;\n entries.push(record);\n }\n this._requestSelectionReplacement(entries, opts?.reason ?? 'keyboard', 'select range');\n this._renderOptions();\n this._updateInputDisplay();\n const target = this._getRecordByIndex(end);\n const selectDetail = target ? this._getSelectEventDetail(target) : null;\n if (selectDetail) this._emit('select', selectDetail);\n this._emitChange();\n this._announce(`${this._state.selectedIndices.size} items selected`);\n if (selectDetail) this._config.callbacks.onSelect?.(selectDetail);\n }\n\n private _getSelectEventDetail(record: ItemRecord<unknown, SelectKey>): SelectEventsDetailMap['select'] {\n const getValue = this._config.serverSide.getValueFromItem || ((item) => (item as any)?.value ?? item);\n const getLabel = this._config.serverSide.getLabelFromItem || ((item) => (item as any)?.label ?? String(item));\n\n return {\n item: record.item,\n index: record.index,\n value: getValue(record.item),\n label: getLabel(record.item),\n selected: this._engine.state.selectedKeys.has(record.key),\n multi: this._config.selection.mode === 'multi',\n };\n }\n\n private _setInitialActiveOption(): void {\n const selectableIndices = this._getSelectableOptionIndices();\n const selected = Array.from(this._state.selectedIndices).sort((a, b) => a - b);\n // Opening an empty select must not implicitly assign an active descendant.\n // Keyboard navigation and pointer interaction establish active identity.\n if (selectableIndices.length === 0 || selected.length === 0) {\n this._dispatchActiveKey(null, 'open', 'initial active option');\n return;\n }\n const target = selected.find((index) => selectableIndices.includes(index)) ?? selectableIndices[0];\n this._setActive(target, 'open');\n }\n\n private _announce(message: string): void {\n const effects = computeAccessibilityEffects(deriveAccessibilityState(this._engine.state), {\n optionKeys: [],\n announcements: [{ politeness: 'polite', message }],\n }).filter((effect) => effect.type === 'ANNOUNCE');\n\n applyAccessibilityEffects(effects, { liveRegion: this._liveRegion });\n if (!this._liveRegion) return;\n\n this._setLifecycleTimeout(() => {\n const clearEffects = computeAccessibilityEffects(deriveAccessibilityState(this._engine.state), {\n optionKeys: [],\n announcements: [{ politeness: 'polite', message: '' }],\n }).filter((effect) => effect.type === 'ANNOUNCE');\n applyAccessibilityEffects(clearEffects, { liveRegion: this._liveRegion });\n }, 1000);\n }\n\n private _selectOption(index: number, opts?: { shiftKey?: boolean; toggleKey?: boolean; reason?: SelectionReason }): void {\n // FIX: Do not rely on this._optionsContainer.children[index] because filtering changes the children\n // Instead, use the index to update state directly\n\n this._ensureRegistryCurrent();\n const record = this._getRecordByIndex(index);\n if (!record) return;\n index = record.index;\n const item = record.item;\n if (this._isOptionSelectionBlocked(item)) {\n return;\n }\n const isCurrentlySelected = this._engine.state.selectedKeys.has(record.key);\n const reason = opts?.reason ?? 'pointer';\n\n // Keep active/focus styling aligned with the most recently interacted option.\n // Without this, a previously selected item may retain active classes/styles\n // after selecting a different option.\n if (!record.disabled) {\n this._dispatchActiveKey(record.key, reason === 'keyboard' ? 'keyboard' : 'pointer', 'option selection');\n }\n if (this._config.selection.mode === 'single') {\n this._dispatchSelection({\n type: isCurrentlySelected && this._config.selection.allowDeselect ? 'TOGGLE_KEY_REQUEST' : 'SELECT_KEY_REQUEST',\n key: record.key,\n reason,\n }, 'single option selection');\n \n // Re-render to update all option styles\n this._renderOptions();\n \n if (this._config.selection.closeOnSelect) {\n this._handleClose('selection');\n }\n } else {\n const toggleKey = Boolean(opts?.toggleKey);\n const shiftKey = Boolean(opts?.shiftKey);\n\n if (shiftKey) {\n const anchor = this._rangeAnchorIndex ?? index;\n this._selectRange(anchor, index, { clear: !toggleKey, reason });\n this._rangeAnchorIndex = anchor;\n return;\n }\n\n // Multi select with toggle\n const maxSelections = this._config.selection.maxSelections || 0;\n\n if (!isCurrentlySelected && maxSelections > 0 && this._engine.state.selectedKeys.size >= maxSelections) {\n this._announce(`Maximum ${maxSelections} selections allowed`);\n this._renderOptions();\n return;\n }\n this._dispatchSelection({ type: 'TOGGLE_KEY_REQUEST', key: record.key, reason }, 'multi option selection');\n \n // Re-render to update styles (safer than trying to find the element in filtered list)\n this._renderOptions();\n }\n\n this._rangeAnchorIndex = index;\n \n this._updateInputDisplay();\n const selectDetail = this._getSelectEventDetail(record);\n this._emit('select', selectDetail);\n this._emitChange();\n\n const label = selectDetail.label;\n if (this._config.selection.mode === 'single') {\n this._announce(`Selected ${label}`);\n } else {\n const selectedCount = this._state.selectedIndices.size;\n const action = isCurrentlySelected ? 'Deselected' : 'Selected';\n this._announce(`${action} ${label}. ${selectedCount} selected`);\n }\n \n this._config.callbacks.onSelect?.(selectDetail);\n }\n\n private _handleOptionRemove(index: number, key?: SelectKey): void {\n this._ensureRegistryCurrent();\n const entry = this._getSelectedEntries().find((selected) => key === undefined\n ? selected.index === index\n : selected.key === key);\n if (!entry) return;\n const item = entry.item;\n const activeElement = this._shadow.activeElement;\n const focusedBadge = activeElement instanceof HTMLButtonElement\n && activeElement.getAttribute('part') === 'chip-remove'\n ? activeElement.closest('.selection-badge')\n : null;\n const hadFocusedChipRemove = focusedBadge !== null;\n const focusedBadgeIndex = focusedBadge\n ? Array.from(this._inputContent.querySelectorAll('.selection-badge')).indexOf(focusedBadge)\n : -1;\n const option = this._itemRegistry.keyToRecord.has(entry.key)\n ? this._getOptionElementByIndex(entry.index)\n : null;\n\n this._dispatchSelection({ type: 'DESELECT_KEY_REQUEST', key: entry.key, reason: 'pointer' }, 'remove selected item');\n\n if (option && 'setSelected' in option && typeof (option as SelectOption).setSelected === 'function') {\n (option as SelectOption).setSelected(false);\n } else if (option) {\n option.classList.remove('selected', 'sm-selected', 'smilodon-option--selected');\n\n const stateTokens = (option.dataset.smState || '')\n .split(' ')\n .map(token => token.trim())\n .filter(token => token && token !== 'selected');\n\n if (stateTokens.length > 0) {\n option.dataset.smState = stateTokens.join(' ');\n } else {\n delete option.dataset.smState;\n }\n }\n \n this._updateInputDisplay();\n this._renderOptions();\n this._emitChange();\n\n if (hadFocusedChipRemove && this.isConnected) {\n const removeButtons = this._inputContent.querySelectorAll<HTMLButtonElement>('[part=\"chip-remove\"]');\n if (removeButtons.length > 0) {\n const nextFocusIndex = Math.min(Math.max(focusedBadgeIndex, 0), removeButtons.length - 1);\n removeButtons[nextFocusIndex].focus();\n } else {\n this._applyFocusIntent('input', 'selected-chip-removed');\n }\n }\n \n const config = option && 'getConfig' in option && typeof (option as SelectOption).getConfig === 'function'\n ? (option as SelectOption).getConfig()\n : undefined;\n this._emit('remove', { item: config?.item ?? item, index: entry.index });\n }\n\n private _updateInputDisplay(): void {\n const selectedEntries = this._getSelectedEntries();\n const selectedItems = selectedEntries.map(({ item }) => item);\n const getLabel = this._config.serverSide.getLabelFromItem || ((item) => (item as any)?.label ?? String(item));\n \n if (selectedItems.length === 0) {\n this._input.value = '';\n this._input.placeholder = this._config.placeholder || 'Select an option...';\n // Clear any badges\n const existingBadges = this._inputContent.querySelectorAll('.selection-badge');\n existingBadges.forEach(badge => badge.remove());\n } else if (this._config.selection.mode === 'single') {\n this._input.value = getLabel(selectedItems[0]);\n } else {\n // Multi-select: show badges instead of text in input\n this._input.value = '';\n this._input.placeholder = '';\n \n // Clear existing badges\n const existingBadges = this._inputContent.querySelectorAll('.selection-badge');\n existingBadges.forEach(badge => badge.remove());\n \n // Create badges for each selected item\n selectedEntries.forEach(({ key, index, item }) => {\n const badge = document.createElement('span');\n badge.className = 'selection-badge';\n if (this._config.styles.classNames?.badge) {\n badge.classList.add(...this._config.styles.classNames.badge.split(' ').filter(Boolean));\n }\n badge.setAttribute('part', 'chip');\n\n const badgeLabel = document.createElement('span');\n badgeLabel.className = 'selection-badge-label';\n if (this._config.styles.classNames?.badgeLabel) {\n badgeLabel.classList.add(...this._config.styles.classNames.badgeLabel.split(' ').filter(Boolean));\n }\n badgeLabel.setAttribute('part', 'chip-label');\n badgeLabel.textContent = getLabel(item);\n badge.appendChild(badgeLabel);\n \n // Add remove button to badge\n if (this._config.selection.showRemoveButton !== false) {\n const removeBtn = document.createElement('button');\n removeBtn.type = 'button';\n removeBtn.className = 'badge-remove';\n if (this._config.styles.classNames?.removeButton) {\n removeBtn.classList.add(...this._config.styles.classNames.removeButton.split(' ').filter(Boolean));\n }\n if (this._config.styles.classNames?.badgeRemove) {\n removeBtn.classList.add(...this._config.styles.classNames.badgeRemove.split(' ').filter(Boolean));\n }\n removeBtn.setAttribute('part', 'chip-remove');\n removeBtn.setAttribute('aria-label', `Remove ${getLabel(item)}`);\n\n const removeIcon = document.createElement('span');\n removeIcon.className = 'badge-remove-icon';\n if (this._config.styles.classNames?.badgeRemoveIcon) {\n removeIcon.classList.add(...this._config.styles.classNames.badgeRemoveIcon.split(' ').filter(Boolean));\n }\n removeIcon.setAttribute('part', 'chip-remove-icon');\n this._setIconContent(removeIcon, this._config.selection.removeButtonIcon, '×');\n removeBtn.appendChild(removeIcon);\n\n removeBtn.addEventListener('pointerdown', (e) => {\n e.stopPropagation();\n e.preventDefault();\n });\n removeBtn.addEventListener('click', (e) => {\n e.stopPropagation();\n e.preventDefault();\n this._handleOptionRemove(index, key);\n });\n\n badge.appendChild(removeBtn);\n }\n this._inputContent.insertBefore(badge, this._input);\n });\n }\n\n // A query typed during an accepted-snapshot projection is a pending user\n // intent, not part of the committed projection state. Keep it visible even\n // when selection/display synchronization runs during that transaction.\n if (this._acknowledgedPendingSearchQuery !== null) {\n this._input.value = this._acknowledgedPendingSearchQuery;\n }\n this._syncClearControlState();\n }\n\n private _isActivelyEditingSearchInput(): boolean {\n return this._config.searchable === true\n && this._state.isOpen\n && this._shadow.activeElement === this._input;\n }\n\n private _renderOptionsWithAnimation(): void {\n // Add fade-out animation\n this._optionsContainer.style.opacity = '0';\n this._optionsContainer.style.transition = 'opacity 0.15s ease-out';\n \n this._setLifecycleTimeout(() => {\n this._renderOptions();\n // Fade back in\n this._optionsContainer.style.opacity = '1';\n this._optionsContainer.style.transition = 'opacity 0.2s ease-in';\n }, 150);\n }\n\n private _scrollToSelected(): void {\n if (this._state.selectedIndices.size === 0) return;\n \n const target = this._config.scrollToSelected.multiSelectTarget;\n const indices = Array.from(this._state.selectedIndices).filter((index) => index >= 0).sort((a, b) => a - b);\n if (indices.length === 0) return;\n \n // For multi-select, find the closest selected item to the current scroll position\n let targetIndex: number;\n \n if (this._config.selection.mode === 'multi' && indices.length > 1) {\n // Calculate which selected item is closest to the center of the viewport\n const dropdownRect = this._dropdown.getBoundingClientRect();\n const viewportCenter = this._dropdown.scrollTop + (dropdownRect.height / 2);\n \n // Find the selected item closest to viewport center\n let closestIndex = indices[0];\n let closestDistance = Infinity;\n \n for (const index of indices) {\n const option = this._getOptionElementByIndex(index);\n \n if (option) {\n const optionTop = option.offsetTop;\n const distance = Math.abs(optionTop - viewportCenter);\n \n if (distance < closestDistance) {\n closestDistance = distance;\n closestIndex = index;\n }\n }\n }\n \n targetIndex = closestIndex;\n } else {\n // For single select or only one selected item, use the configured target\n targetIndex = target === 'first' ? indices[0] : indices[indices.length - 1];\n }\n \n // Find and scroll to the target option\n let option = this._getOptionElementByIndex(targetIndex);\n if (!option && this._guardedVirtualizer) {\n const targetKey = this._itemRegistry.indexToKey.get(targetIndex);\n if (targetKey !== undefined) {\n this._materializeGuardedVirtualKey(targetKey);\n option = this._getOptionElementByIndex(targetIndex);\n }\n }\n \n if (option) {\n // Use smooth scrolling with center alignment for better UX\n if (typeof option.scrollIntoView === 'function') {\n option.scrollIntoView({\n block: this._config.scrollToSelected.block || 'center',\n behavior: 'smooth',\n });\n }\n \n // Also set it as active for keyboard navigation\n this._setActive(targetIndex, 'programmatic');\n }\n }\n\n private async _loadMoreItems(trigger: 'manual' | 'sentinel' = 'manual'): Promise<void> {\n if (this._dataLoadingConfig.protocol === 'acknowledged') {\n if (\n !this._dataRequestCoordinator\n || !this._acknowledgedReady\n || this._acknowledgedProjectionPending\n || this._acknowledgedProjectionSettling\n ) return;\n const actions = this._dataRequestCoordinator.requestLoadMore(trigger);\n this._dispatchAcknowledgedActions(actions);\n return;\n }\n\n if (this._dataRequestCoordinator) {\n if (!this._acknowledgedReady || this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling) return;\n const actions = this._dataRequestCoordinator.requestLoadMore(trigger);\n this._dispatchAcknowledgedActions(actions);\n return;\n }\n\n if (this._state.isBusy) return;\n \n this._setBusy(true);\n \n // Save scroll position before loading\n if (this._dropdown) {\n this._state.lastScrollPosition = this._dropdown.scrollTop;\n this._state.preserveScrollPosition = true;\n \n // Update dropdown to show loading indicator but keep the\n // same scrollTop so the visible items don't move.\n this._renderOptions();\n this._dropdown.scrollTop = this._state.lastScrollPosition;\n }\n \n try {\n // Emit event for parent to handle\n this._state.currentPage++;\n \n this._emit('loadMore', { page: this._state.currentPage, items: [] });\n this._config.callbacks.onLoadMore?.(this._state.currentPage);\n \n // NOTE: We do NOT set isBusy = false here.\n // The parent component MUST call setItems() or similar to clear the busy state.\n // This prevents the sentinel from reappearing before new items are loaded.\n } catch (error) {\n this._handleError(error as Error);\n this._setBusy(false); // Only clear on error\n }\n }\n\n private _setBusy(busy: boolean): void {\n this._state.isBusy = busy;\n this._syncListboxAccessibility();\n \n // Trigger re-render to show/hide busy indicator\n // We use _renderOptions to handle the UI update\n this._renderOptions();\n }\n\n private _handleError(error: Error): void {\n this._emit('error', { message: error.message, cause: error });\n this._config.callbacks.onError?.(error);\n }\n\n private _emit<K extends SelectEventName>(name: K, detail: SelectEventsDetailMap[K]): void {\n this.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));\n if (name !== 'diagnostic') {\n this._track('event', String(name), detail);\n }\n }\n\n private _track(source: 'event' | 'style' | 'limitation', name: string, detail?: unknown): void {\n const cfg = this._config.tracking;\n if (!cfg?.enabled) return;\n\n if (source === 'event' && !cfg.events) return;\n if (source === 'style' && !cfg.styling) return;\n if (source === 'limitation' && !cfg.limitations) return;\n\n const entry: TrackingEntry = {\n timestamp: Date.now(),\n source,\n name,\n detail,\n };\n\n const bucket = source === 'event'\n ? this._tracking.events\n : source === 'style'\n ? this._tracking.styles\n : this._tracking.limitations;\n\n bucket.push(entry);\n\n const maxEntries = Math.max(10, cfg.maxEntries || 200);\n if (bucket.length > maxEntries) {\n bucket.splice(0, bucket.length - maxEntries);\n }\n\n if (cfg.emitDiagnostics) {\n this.dispatchEvent(new CustomEvent('diagnostic', {\n detail: entry,\n bubbles: true,\n composed: true,\n }));\n }\n }\n\n private _getKnownLimitationDefinitions(): Omit<LimitationState, 'mode' | 'status'>[] {\n return [\n {\n id: 'variableItemHeight',\n title: 'Variable item height',\n description: 'Virtualization assumes fixed or estimated item heights; fully dynamic heights are not yet supported.',\n workaround: 'Use consistent item heights or set estimatedItemHeight to your dominant row size.',\n },\n {\n id: 'builtInFetchPaginationApi',\n title: 'Built-in fetch/pagination API',\n description: 'Core does not include a built-in fetchUrl/searchUrl pagination transport.',\n workaround: 'Use onSearch/onLoadMore callbacks and update data via setItems().',\n },\n {\n id: 'virtualizationOverheadSmallLists',\n title: 'Virtualization overhead for small lists',\n description: 'Virtualization can add slight overhead on very small lists.',\n workaround: 'Disable virtualization for tiny datasets when micro-latency is critical.',\n },\n {\n id: 'runtimeModeSwitching',\n title: 'Runtime single/multi mode switching',\n description: 'Switching between single and multi mode can require state reset for consistency.',\n workaround: 'Enable autoMitigateRuntimeModeSwitch or recreate/reset component state when toggling modes.',\n },\n {\n id: 'legacyBrowserSupport',\n title: 'Legacy browser support',\n description: 'Official support targets modern evergreen browsers.',\n },\n {\n id: 'webkitArchLinux',\n title: 'Playwright WebKit on Arch-based Linux',\n description: 'Native WebKit Playwright bundle depends on unavailable legacy system libraries on Arch-based distros.',\n workaround: 'Run WebKit E2E tests via Playwright Docker image.',\n },\n ];\n }\n\n private _evaluateLimitationStatus(id: KnownLimitationId): 'active' | 'mitigated' | 'suppressed' {\n const policyMode = this._config.limitations?.policies?.[id]?.mode ?? 'default';\n if (policyMode === 'suppress') return 'suppressed';\n\n if (id === 'runtimeModeSwitching' && this._config.limitations?.autoMitigateRuntimeModeSwitch) {\n return 'mitigated';\n }\n\n return 'active';\n }\n\n getKnownLimitations(): LimitationState[] {\n return this._getKnownLimitationDefinitions().map((limitation) => {\n const mode = this._config.limitations?.policies?.[limitation.id]?.mode ?? 'default';\n return {\n ...limitation,\n mode,\n status: this._evaluateLimitationStatus(limitation.id),\n };\n });\n }\n\n setLimitationPolicies(policies: LimitationPolicyMap): void {\n const next = {\n ...(this._config.limitations?.policies || {}),\n ...policies,\n };\n\n this.updateConfig({\n limitations: {\n ...(this._config.limitations || { autoMitigateRuntimeModeSwitch: true, policies: {} }),\n policies: next,\n },\n });\n\n this._track('limitation', 'policiesUpdated', { policies: next });\n }\n\n getTrackingSnapshot(): TrackingSnapshot {\n return {\n events: [...this._tracking.events],\n styles: [...this._tracking.styles],\n limitations: [...this._tracking.limitations],\n };\n }\n\n clearTracking(source?: 'event' | 'style' | 'limitation' | 'all'): void {\n if (!source || source === 'all') {\n this._tracking.events = [];\n this._tracking.styles = [];\n this._tracking.limitations = [];\n return;\n }\n\n if (source === 'event') this._tracking.events = [];\n if (source === 'style') this._tracking.styles = [];\n if (source === 'limitation') this._tracking.limitations = [];\n }\n\n getCapabilities(): SelectCapabilitiesReport {\n return {\n styling: {\n classMap: true,\n optionRenderer: true,\n groupHeaderRenderer: true,\n cssCustomProperties: true,\n shadowParts: true,\n globalStyleMirroring: true,\n },\n events: {\n emitted: ['select', 'open', 'close', 'search', 'change', 'loadMore', 'remove', 'clear', 'error', 'diagnostic'],\n diagnosticEvent: true,\n },\n functionality: {\n multiSelect: true,\n searchable: true,\n infiniteScroll: true,\n loadMore: true,\n clearControl: true,\n groupedItems: true,\n serverSideSelection: true,\n runtimeModeSwitchMitigation: Boolean(this._config.limitations?.autoMitigateRuntimeModeSwitch),\n },\n limitations: this.getKnownLimitations(),\n };\n }\n\n private _emitChange(): void {\n const selectedEntries = this._getSelectedEntries();\n const selectedItems = selectedEntries.map(({ item }) => item);\n const getValue = this._config.serverSide.getValueFromItem || ((item) => (item as any)?.value ?? item);\n const selectedValues = selectedItems.map(getValue);\n const selectedIndices = selectedEntries.map(({ index }) => index).filter((index) => index >= 0);\n\n this._emit('change', { selectedItems, selectedValues, selectedIndices });\n this._config.callbacks.onChange?.(selectedItems, selectedValues);\n }\n\n // Public API\n\n get optionRenderer(): OptionRendererFn | undefined {\n return this._optionRenderer;\n }\n\n set optionRenderer(renderer: OptionRendererFn | undefined) {\n if (this._optionRenderer === renderer) return;\n\n this._invalidateGuardedMeasurements();\n this._optionRenderer = renderer;\n this._setGlobalStylesMirroring(Boolean(renderer || this._classMap || this._groupHeaderRenderer));\n this._track('style', 'optionRendererChanged', { enabled: Boolean(renderer) });\n this._renderOptions();\n }\n \n /**\n * Set items to display in the select\n */\n setItems(items: unknown[]): void {\n this._invalidateGuardedMeasurements();\n const previousLength = this._state.loadedItems.length;\n this._rebuildItemRegistry(items);\n this._state.groupedItems = this._groupItemsByProperty(items);\n if (!this._state.searchQuery && !this._isActivelyEditingSearchInput()) this._updateInputDisplay();\n \n const newLength = this._state.loadedItems.length;\n\n if (this._dataRequestCoordinator) {\n const acknowledgedBusy = this._dataRequestCoordinator.getSnapshot().busy\n || this._acknowledgedProjectionPending;\n this._state.isSearching = false;\n this._state.isBusy = acknowledgedBusy;\n\n if (this._state.preserveScrollPosition && this._dropdown) {\n const targetScrollTop = this._state.lastScrollPosition;\n this._renderOptions();\n this._optionsContainer.scrollTop = targetScrollTop;\n this._requestLifecycleFrame(() => {\n if (this._optionsContainer) this._optionsContainer.scrollTop = targetScrollTop;\n });\n if (!acknowledgedBusy) this._state.preserveScrollPosition = false;\n } else {\n this._renderOptions();\n }\n return;\n }\n \n // When infinite scroll is active (preserveScrollPosition = true),\n // we need to maintain scroll position during the update\n if (this._state.preserveScrollPosition && this._dropdown) {\n const targetScrollTop = this._state.lastScrollPosition;\n \n // Only clear loading if we actually got more items\n if (newLength > previousLength) {\n this._state.isBusy = false;\n }\n \n this._renderOptions();\n \n // Restore the exact scrollTop we had before loading\n // so the previously visible items stay in place and\n // new ones simply appear below.\n this._dropdown.scrollTop = targetScrollTop;\n \n // Ensure it sticks after layout\n this._requestLifecycleFrame(() => {\n if (this._dropdown) {\n this._dropdown.scrollTop = targetScrollTop;\n }\n });\n \n // Only clear preserveScrollPosition if we got new items\n if (newLength > previousLength) {\n this._state.preserveScrollPosition = false;\n }\n } else {\n // Normal update - just render normally\n this._state.isBusy = false;\n this._renderOptions();\n }\n \n }\n\n private _groupItemsByProperty(items: unknown[]): GroupedItem[] {\n const hasGroupData = items.some((item, index) =>\n this._itemAdapter.getGroupKey?.(item, index) !== null\n );\n\n if (!hasGroupData) {\n return [];\n }\n\n const groups = new Map<string, unknown[]>();\n items.forEach((item, index) => {\n const rawGroup = this._itemAdapter.getGroupKey?.(item, index);\n const label = rawGroup == null ? 'Ungrouped' : String(rawGroup);\n const options = groups.get(label);\n if (options) {\n options.push(item);\n } else {\n groups.set(label, [item]);\n }\n });\n\n return Array.from(groups.entries()).map(([label, options]) => ({ label, options }));\n }\n\n /**\n * Set grouped items\n */\n setGroupedItems(groupedItems: GroupedItem[]): void {\n this._destroyGuardedVirtualizer();\n this._rebuildItemRegistry(groupedItems.flatMap(group => group.options));\n this._state.groupedItems = groupedItems;\n this._renderOptions();\n if (!this._state.searchQuery && !this._isActivelyEditingSearchInput()) this._updateInputDisplay();\n }\n\n /**\n * Get currently selected items\n */\n getSelectedItems(): unknown[] {\n this._ensureRegistryCurrent();\n return this._getSelectedEntries().map((entry) => entry.item);\n }\n\n /**\n * Get all loaded items\n */\n get loadedItems(): unknown[] {\n return this._state.loadedItems;\n }\n\n /**\n * Get currently selected values\n */\n getSelectedValues(): unknown[] {\n return this.getSelectedItems().map((item) => this._getItemValue(item));\n }\n\n /**\n * Set selected items by value\n */\n async setSelectedValues(values: unknown[]): Promise<void> {\n if (this._config.serverSide.enabled && this._config.serverSide.fetchSelectedItems) {\n await this._loadSelectedItemsByValues(values);\n } else {\n this._ensureRegistryCurrent();\n\n const selected = this._itemRegistry.records\n .filter((record) => arrayIncludesValue(values, record.value) && !this._isOptionSelectionBlocked(record.item));\n this._requestSelectionReplacement(selected, 'external-value-sync', 'setSelectedValues');\n \n this._renderOptions();\n this._updateInputDisplay();\n this._emitChange();\n }\n }\n\n /**\n * Load and select items by their values (for infinite scroll scenario)\n */\n private async _loadSelectedItemsByValues(values: unknown[]): Promise<void> {\n if (!this._config.serverSide.fetchSelectedItems) return;\n \n this._setBusy(true);\n const generation = ++this._asyncGeneration;\n \n try {\n const items = await this._config.serverSide.fetchSelectedItems(values);\n if (generation !== this._asyncGeneration || !this.isConnected) return;\n\n const fetchedRegistry = createItemRegistry(items, this._itemAdapter, {\n duplicateKeyPolicy: this._getDuplicateKeyPolicy(),\n });\n this._requestSelectionReplacement(fetchedRegistry.records, 'external-value-sync', 'fetched selected items');\n \n this._renderOptions();\n this._updateInputDisplay();\n this._emitChange();\n \n // Scroll to selected if configured\n if (this._config.scrollToSelected.enabled) {\n this._scrollToSelected();\n }\n } catch (error) {\n if (generation !== this._asyncGeneration || !this.isConnected) return;\n this._handleError(error as Error);\n } finally {\n if (generation === this._asyncGeneration && this.isConnected) {\n this._setBusy(false);\n }\n }\n }\n\n /**\n * Clear all selections\n */\n clear(): void {\n this._ensureRegistryCurrent();\n this._dispatchSelection({ type: 'CLEAR_SELECTION_REQUEST', reason: 'programmatic' }, 'clear');\n this._renderOptions();\n this._updateInputDisplay();\n this._emitChange();\n this._syncClearControlState();\n }\n\n /**\n * Clear search query and restore full option list\n */\n clearSearch(): void {\n this._state.searchQuery = '';\n if (this._config.searchable) {\n this._input.value = '';\n if (this._state.selectedIndices.size > 0) {\n this._updateInputDisplay();\n }\n }\n this._renderOptions();\n this._syncClearControlState();\n }\n\n /**\n * Open dropdown\n */\n open(): void {\n this._handleOpen();\n }\n\n /**\n * Close dropdown\n */\n close(): void {\n this._handleClose();\n }\n\n /**\n * Update component configuration\n */\n updateConfig(config: SelectInstanceConfig): void {\n this._invalidateGuardedMeasurements();\n const previousMode = this._config.selection.mode;\n const previousEnabled = this._config.enabled;\n const previousDataLoadingConfig = this._dataLoadingConfig;\n\n const { dataLoading, callbacks, ...legacyConfig } = config;\n const legacyUpdate = { ...legacyConfig } as Partial<GlobalSelectConfig>;\n let configErrorDetail: DataLoadingConfigErrorDetail | undefined;\n\n if (callbacks !== undefined && callbacks !== null) {\n const callbackInput = callbacks as typeof callbacks & {\n onDataLoadingConfigError?: ((detail: DataLoadingConfigErrorDetail) => void) | undefined;\n };\n if (Object.prototype.hasOwnProperty.call(callbackInput, 'onDataLoadingConfigError')) {\n this._dataLoadingConfigErrorCallback = callbackInput.onDataLoadingConfigError;\n }\n if (Object.prototype.hasOwnProperty.call(callbackInput, 'onDataRequestCancel')) {\n this._dataRequestCancelCallback = callbackInput.onDataRequestCancel;\n }\n if (Object.prototype.hasOwnProperty.call(callbackInput, 'onDataProjection')) {\n this._dataProjectionCallback = callbackInput.onDataProjection;\n }\n const legacyCallbacks = { ...callbackInput };\n delete legacyCallbacks.onDataLoadingConfigError;\n delete legacyCallbacks.onDataRequestCancel;\n delete legacyCallbacks.onDataProjection;\n legacyUpdate.callbacks = legacyCallbacks as Partial<CallbackConfig>;\n }\n\n this._config = this._mergeConfig(this._config, legacyUpdate);\n\n if (dataLoading !== undefined) {\n const dataLoadingPrototype = dataLoading !== null && typeof dataLoading === 'object'\n ? Object.getPrototypeOf(dataLoading)\n : undefined;\n const candidate = dataLoadingPrototype === Object.prototype || dataLoadingPrototype === null\n ? { ...this._dataLoadingConfig, ...dataLoading }\n : dataLoading;\n const validation = validateDataLoadingConfig(candidate);\n\n if (validation.valid) {\n this._dataLoadingConfig = validation.value;\n this._hasLastInvalidDataLoadingCandidate = false;\n this._lastInvalidDataLoadingCandidate = undefined;\n } else {\n const candidateSignature = createInvalidDataLoadingCandidateSignature(candidate, validation.issues);\n if (\n !this._hasLastInvalidDataLoadingCandidate ||\n !this._lastInvalidDataLoadingCandidate ||\n !invalidDataLoadingSignaturesEqual(this._lastInvalidDataLoadingCandidate, candidateSignature)\n ) {\n this._hasLastInvalidDataLoadingCandidate = true;\n this._lastInvalidDataLoadingCandidate = candidateSignature;\n configErrorDetail = { issues: validation.issues };\n }\n }\n }\n\n this._rebuildItemRegistry();\n if (previousEnabled !== this._config.enabled) {\n this._input.disabled = !this._config.enabled;\n if (!this._config.enabled && this._state.isOpen) {\n this._handleClose('disabled');\n }\n this._runEngineEffects(this._engine.dispatch({ type: 'DISABLED_CHANGED', disabled: !this._config.enabled }));\n }\n\n if (\n previousMode !== this._config.selection.mode &&\n this._config.limitations?.autoMitigateRuntimeModeSwitch\n ) {\n this.clear();\n this._track('limitation', 'runtimeModeSwitchMitigated', {\n from: previousMode,\n to: this._config.selection.mode,\n });\n } else if (previousMode !== this._config.selection.mode) {\n this._track('limitation', 'runtimeModeSwitchDetected', {\n from: previousMode,\n to: this._config.selection.mode,\n });\n }\n \n // Update input state based on new config\n if (this._input) {\n this._input.readOnly = !this._config.searchable;\n this._syncComboboxAccessibility();\n if (this._state.selectedIndices.size === 0) {\n this._input.placeholder = this._config.placeholder || 'Select an option...';\n }\n }\n\n if (this._clearControl) {\n this._clearControl.setAttribute('aria-label', this._config.clearControl.ariaLabel || 'Clear selection and search');\n }\n\n if (this._clearControlIcon) {\n // Use config icon if provided, otherwise default SVG\n if (this._config.clearControl.icon) {\n this._clearControlIcon.textContent = this._config.clearControl.icon;\n } else {\n this._clearControlIcon.innerHTML = `<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 4L4 12M4 4L12 12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\n }\n }\n\n this._syncStyleConfigVariables();\n\n this._syncListboxAccessibility();\n\n if (this.isConnected) {\n this._syncDirectionConfig();\n this._syncInputContainerMode();\n this._syncMultiSelectDisplayConfig();\n this._syncDropdownPlacement();\n \n // Re-initialize observers in case infinite scroll was enabled/disabled\n this._initializeObservers();\n\n this._syncClearControlState();\n if (!this._isActivelyEditingSearchInput()) this._updateInputDisplay();\n \n this._renderOptions();\n } else {\n this._syncInputContainerMode();\n this._syncMultiSelectDisplayConfig();\n this._syncClearControlState();\n if (!this._isActivelyEditingSearchInput()) this._updateInputDisplay();\n }\n\n this._acknowledgedSearchMode = this._dataLoadingConfig.searchMode;\n if (this._dataLoadingConfig.protocol === 'legacy') this._acknowledgedDeferredStart = false;\n const coordinator = this._dataRequestCoordinator;\n const switchesToLegacy = previousDataLoadingConfig.protocol === 'acknowledged'\n && this._dataLoadingConfig.protocol === 'legacy';\n const acknowledgedModeChanged = previousDataLoadingConfig.protocol !== this._dataLoadingConfig.protocol\n || previousDataLoadingConfig.searchMode !== this._dataLoadingConfig.searchMode\n || previousDataLoadingConfig.paginationMode !== this._dataLoadingConfig.paginationMode;\n\n if (coordinator && switchesToLegacy) {\n if (this._acknowledgedReady && !this._acknowledgedProjectionPending && !this._acknowledgedProjectionSettling) {\n const update = coordinator.updateConfig(this._createCoordinatorConfig());\n if (update.status === 'accepted') this._dispatchAcknowledgedActions(update.actions);\n }\n this._acknowledgedReady = false;\n this._dispatchAcknowledgedActions(coordinator.disconnect());\n if (this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling) {\n this._clearAcknowledgedCoordinatorAfterProjection = true;\n } else {\n this._dataRequestCoordinator = null;\n this._acknowledgedSearchMode = null;\n this._state.isBusy = false;\n this._state.isSearching = false;\n this._syncListboxAccessibility();\n this._renderOptions();\n }\n } else if (coordinator && this._dataLoadingConfig.protocol === 'acknowledged') {\n this._clearAcknowledgedCoordinatorAfterProjection = false;\n if (this._acknowledgedProjectionPending || this._acknowledgedProjectionSettling) {\n this._acknowledgedConfigUpdatePending = true;\n this._acknowledgedDeferredModeChange ||= acknowledgedModeChanged;\n } else if (this._acknowledgedReady) {\n const update = coordinator.updateConfig(this._createCoordinatorConfig());\n if (update.status === 'accepted') {\n this._dispatchAcknowledgedActions(update.actions);\n const snapshot = coordinator.getSnapshot();\n this._state.isBusy = snapshot.busy;\n this._state.isSearching = snapshot.activeRequest?.kind === 'search';\n this._syncListboxAccessibility();\n if (update.actions.every((action) => action.type !== 'request')) this._renderOptions();\n }\n }\n }\n\n if (configErrorDetail) {\n this._emit('dataLoadingConfigError', configErrorDetail);\n try {\n this._dataLoadingConfigErrorCallback?.(configErrorDetail);\n } catch (error) {\n this._handleError(error as Error);\n }\n }\n }\n\n /** Open the acknowledged request lifecycle after the host has installed listeners. */\n startDataLoading(): void {\n const projectionRecoveryOnly = Boolean(\n this._dataRequestCoordinator && this._acknowledgedProjectionPending,\n );\n if (this._dataLoadingConfig.protocol !== 'acknowledged' && !projectionRecoveryOnly) return;\n\n if (this._dataLoadingConfig.protocol === 'acknowledged' && !this._ensureDataRequestCoordinator()) return;\n if (!this.isConnected) {\n if (!this._hasEverConnected) this._acknowledgedDeferredStart = true;\n return;\n }\n if (this._acknowledgedReady) return;\n if (this._acknowledgedStartTask) {\n // A reconnect can arrive while the previous readiness task is still\n // unwinding an interrupted render. Preserve the restart request so the\n // accepted projection is recovered as soon as that task settles.\n this._acknowledgedDeferredStart = true;\n return;\n }\n\n const task = this._startAcknowledgedDataLoading();\n this._acknowledgedStartTask = task;\n void task.finally(() => {\n if (this._acknowledgedStartTask !== task) return;\n this._acknowledgedStartTask = null;\n if (this._acknowledgedDeferredStart && this.isConnected) {\n this._acknowledgedDeferredStart = false;\n this.startDataLoading();\n }\n }).catch((error) => this._handleError(error as Error));\n }\n\n /** Return detached coordinator state without exposing its canonical item storage. */\n getDataLoadingState(): DataLoadingStateSnapshot {\n const coordinator = this._dataRequestCoordinator;\n if (!coordinator) {\n const isRemote = this._dataLoadingConfig.searchMode === 'remote'\n || this._dataLoadingConfig.searchMode === 'hybrid';\n const nextEligiblePosition = this._dataLoadingConfig.paginationMode === 'cursor'\n ? { mode: 'cursor' as const, ordinal: 1 }\n : {\n mode: 'page' as const,\n page: isRemote\n ? this._dataLoadingConfig.firstPage\n : (this._config.infiniteScroll.initialPage ?? 1) + 1,\n };\n return {\n status: 'idle',\n connected: this.isConnected,\n busy: false,\n projectionPending: false,\n queryGeneration: 0,\n activeRequest: null,\n hasMore: this._dataLoadingConfig.protocol === 'acknowledged'\n && !isRemote\n && (this._config.infiniteScroll.enabled || this._config.loadMore.enabled),\n nextEligiblePosition,\n error: null,\n resourceLimit: null,\n };\n }\n\n const snapshot = coordinator.getSnapshot();\n const activeRequest = snapshot.activeRequest\n ? {\n ...snapshot.activeRequest,\n position: { ...snapshot.activeRequest.position },\n } as DataRequest\n : null;\n return {\n status: snapshot.status,\n connected: snapshot.connected,\n busy: snapshot.busy || this._acknowledgedProjectionPending,\n projectionPending: this._acknowledgedProjectionPending,\n queryGeneration: snapshot.queryGeneration,\n activeRequest,\n hasMore: snapshot.hasMore,\n nextEligiblePosition: { ...snapshot.nextEligiblePosition },\n error: snapshot.error ? { ...snapshot.error } : null,\n resourceLimit: snapshot.resourceLimit ? { ...snapshot.resourceLimit } : null,\n };\n }\n\n /** Synchronously accept/classify a host completion; DOM projection proceeds asynchronously. */\n completeDataRequest(completion: DataRequestCompletion): DataRequestCompletionResult {\n const coordinator = this._dataRequestCoordinator;\n if (!coordinator) {\n const candidate = completion as unknown;\n if (\n candidate === null\n || typeof candidate !== 'object'\n || !('requestId' in candidate)\n || typeof candidate.requestId !== 'string'\n || candidate.requestId.length === 0\n || !('queryGeneration' in candidate)\n || !Number.isSafeInteger(candidate.queryGeneration)\n || (candidate.queryGeneration as number) < 0\n || !('status' in candidate)\n || typeof candidate.status !== 'string'\n || !['succeeded', 'empty', 'exhausted', 'failed', 'cancelled'].includes(candidate.status)\n ) return 'invalid';\n return 'unknown-request';\n }\n\n const snapshotBefore = coordinator.getSnapshot();\n const completionRecord = completion && typeof completion === 'object'\n ? completion as unknown as Record<string, unknown>\n : null;\n const activeRequest = snapshotBefore.activeRequest;\n const request = activeRequest\n && completionRecord?.requestId === activeRequest.requestId\n && completionRecord?.queryGeneration === activeRequest.queryGeneration\n ? activeRequest\n : null;\n const status = completionRecord?.status;\n const advancesPosition = status === 'succeeded'\n || status === 'exhausted'\n || (status === 'empty' && completionRecord?.advance === 'next');\n const result = coordinator.completeDataRequest(completion);\n\n if (result === 'accepted' && request) {\n this._acknowledgedLastRequest = request;\n this._acknowledgedProjectionRequest = request;\n this._acknowledgedProjectionAttempt = 0;\n this._acknowledgedProjectionCommitsPosition = advancesPosition;\n void this._projectAcknowledgedSnapshot(\n coordinator.getSnapshot(),\n request,\n advancesPosition,\n );\n } else if (result === 'resource-limit') {\n const resourceLimit = coordinator.getSnapshot().resourceLimit;\n this._emit('diagnostic', {\n timestamp: Date.now(),\n source: 'event',\n name: 'acknowledgedDataLoadingResourceLimit',\n detail: resourceLimit,\n });\n }\n\n return result;\n }\n\n private _createCoordinatorConfig(): DataCoordinatorConfig {\n return {\n dataLoading: { ...this._dataLoadingConfig },\n infiniteScroll: {\n pageSize: this._config.infiniteScroll.pageSize,\n initialPage: this._config.infiniteScroll.initialPage,\n },\n };\n }\n\n private _ensureDataRequestCoordinator(): DataRequestCoordinator | null {\n if (!this._dataRequestCoordinator) {\n const isRemote = this._dataLoadingConfig.searchMode === 'remote'\n || this._dataLoadingConfig.searchMode === 'hybrid';\n try {\n this._dataRequestCoordinator = new DataRequestCoordinator({\n config: this._createCoordinatorConfig(),\n initialQuery: this._state.searchQuery,\n initialItems: this._state.loadedItems,\n hasMore: !isRemote && (this._config.infiniteScroll.enabled || this._config.loadMore.enabled),\n });\n } catch (error) {\n const detail: DataLoadingConfigErrorDetail = {\n issues: [{\n path: 'dataLoading',\n code: 'invalid-value',\n message: `Acknowledged data loading could not start: ${error instanceof Error ? error.message : String(error)}`,\n }],\n };\n this._emit('dataLoadingConfigError', detail);\n try {\n this._dataLoadingConfigErrorCallback?.(detail);\n } catch (callbackError) {\n this._handleError(callbackError as Error);\n }\n return null;\n }\n }\n this._acknowledgedSearchMode = this._dataLoadingConfig.searchMode;\n return this._dataRequestCoordinator;\n }\n\n private async _startAcknowledgedDataLoading(): Promise<void> {\n const coordinator = this._dataRequestCoordinator;\n const projectionRecoveryOnly = Boolean(coordinator && this._acknowledgedProjectionPending);\n if (\n !coordinator\n || (this._dataLoadingConfig.protocol !== 'acknowledged' && !projectionRecoveryOnly)\n || !this.isConnected\n ) return;\n if (this._acknowledgedReady) return;\n\n if (this._acknowledgedProjectionPending) {\n const interruptedProjection = this._acknowledgedProjectionTask;\n if (interruptedProjection) await interruptedProjection;\n if (!this.isConnected) return;\n if (this._acknowledgedProjectionPending) {\n await this._retryAcknowledgedProjection();\n }\n if (!this.isConnected || this._acknowledgedProjectionPending) return;\n }\n\n if (\n this._dataLoadingConfig.protocol !== 'acknowledged'\n || !this._dataRequestCoordinator\n ) return;\n\n if (this._acknowledgedPendingSearchQuery !== null) {\n this._state.searchQuery = this._acknowledgedPendingSearchQuery;\n this._input.value = this._acknowledgedPendingSearchQuery;\n this._acknowledgedPendingSearchQuery = null;\n }\n\n const configUpdate = coordinator.updateConfig(this._createCoordinatorConfig());\n if (configUpdate.status !== 'accepted') {\n this._acknowledgedReady = false;\n return;\n }\n this._acknowledgedConfigUpdatePending = false;\n this._acknowledgedDeferredModeChange = false;\n this._clearAcknowledgedCoordinatorAfterProjection = false;\n\n this._acknowledgedReady = true;\n this._initializeObservers();\n const configActions = configUpdate.actions;\n this._dispatchAcknowledgedActions(configActions);\n const connectionActions = coordinator.connect(this._state.searchQuery);\n this._dispatchAcknowledgedActions(connectionActions);\n if (configActions.length === 0 && connectionActions.length === 0) this._renderOptions();\n const readyRenderCycleId = this._renderCycleId;\n const readyRenderCompleted = await this._waitForRenderCycle(readyRenderCycleId);\n if (!readyRenderCompleted) {\n this._acknowledgedReady = false;\n throw new Error('Acknowledged readiness render was superseded before completion');\n }\n }\n\n private _mergeConfig<T extends Record<string, any>>(target: T, source: Partial<T>): T {\n const result: any = { ...target };\n\n // PERF: Avoid for...in, use Object.keys for predictable iteration\n const keys = Object.keys(source);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!Object.prototype.hasOwnProperty.call(source, key)) continue;\n\n const sourceValue = (source as any)[key];\n if (sourceValue === undefined) continue;\n\n const targetValue = result[key];\n\n // Optional adapter props are commonly forwarded as undefined. Preserve\n // the existing/default config in that case instead of erasing a section.\n if (sourceValue === undefined) continue;\n\n if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {\n result[key] = this._mergeConfig(\n targetValue && typeof targetValue === 'object' ? targetValue : {},\n sourceValue\n );\n } else {\n result[key] = sourceValue;\n }\n }\n\n return result as T;\n }\n\n private _handleClearControlClick(): void {\n const shouldClearSelection = this._config.clearControl.clearSelection !== false;\n const shouldClearSearch = this._config.clearControl.clearSearch !== false;\n\n const hadSelection = this._state.selectedIndices.size > 0;\n const hadSearch = this._state.searchQuery.length > 0;\n\n if (shouldClearSelection && hadSelection) {\n this.clear();\n }\n\n if (shouldClearSearch && hadSearch) {\n this.clearSearch();\n }\n\n this._emit('clear', {\n clearedSelection: shouldClearSelection && hadSelection,\n clearedSearch: shouldClearSearch && hadSearch,\n });\n\n this._config.callbacks.onClear?.({\n clearedSelection: shouldClearSelection && hadSelection,\n clearedSearch: shouldClearSearch && hadSearch,\n });\n\n this._applyFocusIntent('input', 'clear-control-complete');\n }\n\n private _syncClearControlState(): void {\n if (!this._clearControl || !this._inputContainer || !this._arrowContainer) return;\n\n const enabled = this._config.clearControl.enabled === true;\n const hasSelection = this._state.selectedIndices.size > 0;\n const visibleSearchQuery = this._acknowledgedPendingSearchQuery ?? this._state.searchQuery;\n const hasSearch = visibleSearchQuery.length > 0;\n const clearSelection = this._config.clearControl.clearSelection !== false;\n const clearSearch = this._config.clearControl.clearSearch !== false;\n const hasSomethingToClear = (clearSelection && hasSelection) || (clearSearch && hasSearch);\n const hideWhenEmpty = this._config.clearControl.hideWhenEmpty !== false;\n const visible = enabled && (!hideWhenEmpty || hasSomethingToClear);\n\n // Reserve the action area only while the clear control is actually visible.\n this._inputContainer.classList.toggle('has-clear-control', visible);\n this._arrowContainer.classList.toggle('with-clear-control', visible);\n this._clearControl.hidden = !visible;\n this._clearControl.disabled = !hasSomethingToClear;\n this._clearControl.setAttribute('aria-hidden', String(!visible));\n }\n\n /**\n * Set error state\n */\n setError(message: string): void {\n this._hasError = true;\n this._errorMessage = message;\n if (this._errorDescription) this._errorDescription.textContent = message;\n this._syncComboboxAccessibility();\n this._announce(`Error: ${message}`);\n }\n\n /**\n * Clear error state\n */\n clearError(): void {\n this._hasError = false;\n this._errorMessage = '';\n if (this._errorDescription) this._errorDescription.textContent = '';\n this._syncComboboxAccessibility();\n }\n\n /**\n * Set required state\n */\n setRequired(required: boolean): void {\n if (required) {\n this._input.setAttribute('required', '');\n } else {\n this._input.removeAttribute('required');\n }\n this._syncEngineSelectionConfig();\n this._syncComboboxAccessibility();\n }\n\n /**\n * Validate selection (for required fields)\n */\n validate(): boolean {\n const isRequired = this._input.hasAttribute('required');\n if (isRequired && this._state.selectedIndices.size === 0) {\n this.setError('Selection is required');\n return false;\n }\n this.clearError();\n return true;\n }\n\n /**\n * Render options based on current state\n */\n private _deriveVirtualizationScope(filteredIndices: readonly number[]): VirtualizationScope<SelectKey> {\n const keyForIndex = (index: number): SelectKey | undefined => this._itemRegistry.indexToKey.get(index);\n const filteredKeys = filteredIndices\n .map(keyForIndex)\n .filter((key): key is SelectKey => key !== undefined);\n return {\n dataKeys: this._itemRegistry.records.map((record) => record.key),\n filteredKeys,\n registeredKeys: Array.from(this._engine.state.registeredKeys),\n // The current chunked path schedules all filtered items for rendering;\n // this scaffold records that target set until bounded windows are wired.\n windowKeys: this._renderPlan.intendedRenderKeys.slice(),\n mountedKeys: this._getMountedVirtualizationKeys(this._optionsContainer.children),\n selectedKeys: new Set(this._engine.state.selectedKeys),\n activeKey: this._engine.state.activeKey,\n };\n }\n\n private _getMountedVirtualizationKeys(targets: ArrayLike<Element>): SelectKey[] {\n const keyForIndex = (index: number): SelectKey | undefined => this._itemRegistry.indexToKey.get(index);\n return Array.from(targets)\n .filter((target): target is HTMLElement => target instanceof HTMLElement\n && (target.hasAttribute('data-sm-selectable') || target.hasAttribute('data-selectable')))\n .map((target) => Number(target.getAttribute('data-sm-index') ?? target.getAttribute('data-index')))\n .filter(Number.isInteger)\n .map(keyForIndex)\n .filter((key): key is SelectKey => key !== undefined);\n }\n\n private _refreshMountedVirtualizationScope(): void {\n this._virtualizationScope = {\n ...this._virtualizationScope,\n mountedKeys: this._getMountedVirtualizationKeys(this._optionsContainer.children),\n registeredKeys: Array.from(this._engine.state.registeredKeys),\n selectedKeys: new Set(this._engine.state.selectedKeys),\n activeKey: this._engine.state.activeKey,\n };\n }\n\n private _appendMountedVirtualizationTargets(targets: ArrayLike<Element>): void {\n const mountedKeys = this._getMountedVirtualizationKeys(targets);\n this._virtualizationScope = {\n ...this._virtualizationScope,\n mountedKeys: [...new Set([...this._virtualizationScope.mountedKeys, ...mountedKeys])],\n registeredKeys: Array.from(this._engine.state.registeredKeys),\n selectedKeys: new Set(this._engine.state.selectedKeys),\n activeKey: this._engine.state.activeKey,\n };\n }\n\n private _createLegacyRenderPlan(filteredIndices: readonly number[]): EnhancedSelectRenderPlan {\n const indices = [...filteredIndices];\n const filteredKeys = indices\n .map((index) => this._itemRegistry.indexToKey.get(index))\n .filter((key): key is SelectKey => key !== undefined);\n const filteredIndexByKey = new Map<SelectKey, number>();\n filteredKeys.forEach((key, filteredIndex) => filteredIndexByKey.set(key, filteredIndex));\n\n return {\n mode: 'legacy-full',\n filteredIndices: indices,\n filteredKeys,\n intendedRenderKeys: filteredKeys.slice(),\n filteredIndexByKey,\n };\n }\n\n private _createVirtualRenderPlan(startIndex: number, endIndex: number): EnhancedSelectRenderPlan {\n const filteredKeys = this._renderPlan.filteredKeys.slice();\n const intendedRenderKeys = computeWindowKeys(filteredKeys, startIndex, endIndex);\n const filteredIndices = intendedRenderKeys\n .map((key) => this._itemRegistry.keyToIndex.get(key))\n .filter((index): index is number => index !== undefined);\n\n return {\n mode: 'virtual-window',\n filteredIndices,\n filteredKeys,\n intendedRenderKeys,\n filteredIndexByKey: new Map(this._renderPlan.filteredIndexByKey),\n };\n }\n\n private _ensureGuardedVirtualizer(filteredKeys: readonly SelectKey[]): Virtualizer {\n const keysChanged = this._guardedVirtualizer !== null && (\n filteredKeys.length !== this._guardedVirtualizerKeys.length\n || filteredKeys.some((key, index) => !Object.is(key, this._guardedVirtualizerKeys[index]))\n );\n if (keysChanged) this._destroyGuardedVirtualizer(true);\n\n if (!this._guardedVirtualizer) {\n // The controller only calculates ranges and scroll intents. Give it a\n // detached container so its internal styling never touches rendered UI.\n this._guardedVirtualizer = new Virtualizer(\n document.createElement('div'),\n filteredKeys.length,\n (index) => this._renderPlan.filteredKeys[index],\n {\n estimatedItemHeight: this._resolveGuardedEstimatedItemHeight(),\n buffer: 0,\n measurementThreshold: 0,\n },\n );\n this._guardedVirtualScrollTop = this._optionsContainer.scrollTop;\n this._guardedVirtualViewportHeight = this._resolveGuardedViewportHeight();\n this._optionsContainer.addEventListener('scroll', this._onGuardedVirtualScroll, { passive: true });\n this._guardedScrollListenerAttached = true;\n }\n\n this._guardedVirtualizerKeys = [...filteredKeys];\n return this._guardedVirtualizer;\n }\n\n private _resolveGuardedEstimatedItemHeight(): number {\n const configuredHeight = this._config.estimatedItemHeight;\n if (typeof configuredHeight === 'number' && Number.isFinite(configuredHeight) && configuredHeight > 0) {\n return configuredHeight;\n }\n\n const renderedOption = this._optionsContainer.querySelector<HTMLElement>('[part=\"option\"]');\n const measuredHeight = renderedOption?.getBoundingClientRect().height || renderedOption?.offsetHeight;\n if (typeof measuredHeight === 'number' && Number.isFinite(measuredHeight) && measuredHeight > 0) {\n return measuredHeight;\n }\n\n return 48;\n }\n\n private _resolveGuardedViewportHeight(): number {\n const candidates = [\n this._optionsContainer.clientHeight,\n this._optionsContainer.getBoundingClientRect().height,\n ];\n return candidates.find((height) => Number.isFinite(height) && height > 0) ?? 0;\n }\n\n private _clampGuardedScrollPosition(itemCount: number, viewportHeight: number): number {\n if (!this._guardedVirtualizer) return 0;\n\n const totalHeight = this._guardedVirtualizer.cumulativeOffset(itemCount);\n const maxScrollTop = Math.max(0, totalHeight - viewportHeight);\n const scrollTop = Math.min(Math.max(0, this._guardedVirtualScrollTop), maxScrollTop);\n this._guardedVirtualScrollTop = scrollTop;\n if (this._optionsContainer.scrollTop !== scrollTop) {\n this._optionsContainer.scrollTop = scrollTop;\n }\n return scrollTop;\n }\n\n private _createGuardedSpacer(position: 'top' | 'bottom', height: number): HTMLElement {\n const spacer = document.createElement('div');\n spacer.setAttribute('data-virtual-spacer', position);\n spacer.setAttribute('aria-hidden', 'true');\n spacer.setAttribute('role', 'presentation');\n spacer.style.height = `${Number.isFinite(height) ? Math.max(0, height) : 0}px`;\n spacer.style.minHeight = '0';\n spacer.style.flex = '0 0 auto';\n spacer.style.pointerEvents = 'none';\n return spacer;\n }\n\n private _appendGuardedTopSpacer(): void {\n const virtualizer = this._guardedVirtualizer;\n const window = this._guardedVirtualWindow;\n if (!virtualizer || !window) return;\n\n this._optionsContainer.appendChild(\n this._createGuardedSpacer('top', virtualizer.cumulativeOffset(window.startIndex)),\n );\n }\n\n private _appendGuardedBottomSpacer(): void {\n const virtualizer = this._guardedVirtualizer;\n const window = this._guardedVirtualWindow;\n if (!virtualizer || !window) return;\n\n const totalHeight = virtualizer.cumulativeOffset(this._renderPlan.filteredKeys.length);\n const endOffset = virtualizer.cumulativeOffset(window.endIndex);\n this._optionsContainer.appendChild(\n this._createGuardedSpacer('bottom', Math.max(0, totalHeight - endOffset)),\n );\n }\n\n private _resolveGuardedOverscan(): number {\n return 2;\n }\n\n private _applyGuardedWindowUpdate(\n update: { window: { startIndex: number; endIndex: number; windowSize: number }; scrollTop: number; viewportHeight: number },\n overscan = 0,\n ): boolean {\n if (!this._guardedVirtualizer) return false;\n\n this._guardedVirtualScrollTop = update.scrollTop;\n this._guardedVirtualViewportHeight = update.viewportHeight;\n const itemCount = this._renderPlan.filteredKeys.length;\n const nextWindow = {\n startIndex: Math.max(0, update.window.startIndex - overscan),\n endIndex: Math.min(itemCount, update.window.endIndex + 1 + overscan),\n };\n const changed = this._guardedVirtualWindow?.startIndex !== nextWindow.startIndex\n || this._guardedVirtualWindow?.endIndex !== nextWindow.endIndex;\n this._guardedVirtualWindow = nextWindow;\n return changed;\n }\n\n private _scheduleGuardedVirtualWindowUpdate(): void {\n if (!this._guardedVirtualizer || this._guardedVirtualWindowRafId !== null) return;\n\n this._guardedVirtualWindowRafId = this._requestLifecycleFrame(() => {\n this._guardedVirtualWindowRafId = null;\n const virtualizer = this._guardedVirtualizer;\n if (!virtualizer) return;\n\n const update = virtualizer.updateWindow(\n this._optionsContainer.scrollTop,\n this._resolveGuardedViewportHeight(),\n );\n this._guardedVirtualOverscan = this._resolveGuardedOverscan();\n if (update && this._applyGuardedWindowUpdate(update, this._guardedVirtualOverscan)) {\n this._renderOptions();\n }\n });\n }\n\n private _cancelGuardedVirtualWindowUpdate(): void {\n if (this._guardedVirtualWindowRafId === null) return;\n cancelAnimationFrame(this._guardedVirtualWindowRafId);\n this._lifecycleRafs.delete(this._guardedVirtualWindowRafId);\n this._guardedVirtualWindowRafId = null;\n }\n\n private _applyGuardedScrollResult(result: VirtualizerScrollResult | null): boolean {\n if (!result || !this._guardedVirtualizer) return false;\n\n this._guardedVirtualScrollTop = result.scrollTop;\n this._optionsContainer.scrollTop = result.scrollTop;\n const update = this._guardedVirtualizer.updateWindow(\n this._guardedVirtualScrollTop,\n this._guardedVirtualViewportHeight,\n );\n if (!update) return false;\n\n this._guardedVirtualWindow = {\n startIndex: update.window.startIndex,\n endIndex: update.window.endIndex + 1,\n };\n this._guardedVirtualOverscan = 0;\n return true;\n }\n\n /** Test-only activation seam; deliberately absent from public config/types. */\n private _enableAcknowledgedDataLoadingForTest(\n config: DataCoordinatorConfig,\n options: { hasMore?: boolean } = {},\n ): void {\n if (this._dataRequestCoordinator) {\n throw new Error('Acknowledged data loading is already enabled for this test instance');\n }\n const dataLoading = config.dataLoading;\n this._dataLoadingConfig = {\n protocol: dataLoading?.protocol ?? 'acknowledged',\n searchMode: dataLoading?.searchMode ?? 'local',\n paginationMode: dataLoading?.paginationMode ?? 'page',\n firstPage: dataLoading?.firstPage ?? 1,\n ...(dataLoading?.fetchLimit === undefined ? {} : { fetchLimit: dataLoading.fetchLimit }),\n };\n this._acknowledgedSearchMode = config.dataLoading?.searchMode ?? 'local';\n this._dataRequestCoordinator = new DataRequestCoordinator({\n config,\n initialQuery: this._state.searchQuery,\n initialItems: this._state.loadedItems,\n hasMore: options.hasMore,\n });\n this._acknowledgedReady = false;\n if (this.isConnected) this._initializeObservers();\n }\n\n /** Listener installation must precede this private test-only readiness gate. */\n private async _setAcknowledgedDataLoadingReadyForTest(): Promise<void> {\n if (!this._dataRequestCoordinator) throw new Error('Enable acknowledged data loading before readiness');\n if (!this.isConnected) throw new Error('Acknowledged readiness requires a connected test element');\n if (this._acknowledgedReady) return;\n\n if (this._acknowledgedProjectionPending) {\n const interruptedProjection = this._acknowledgedProjectionTask;\n if (interruptedProjection) await interruptedProjection;\n if (this._acknowledgedProjectionPending) {\n await this._retryAcknowledgedProjectionForTest();\n }\n if (this._acknowledgedProjectionPending) {\n throw new Error('Acknowledged readiness cannot open while snapshot projection is pending');\n }\n }\n\n if (this._acknowledgedPendingSearchQuery !== null) {\n this._state.searchQuery = this._acknowledgedPendingSearchQuery;\n this._input.value = this._acknowledgedPendingSearchQuery;\n this._acknowledgedPendingSearchQuery = null;\n }\n\n this._acknowledgedReady = true;\n this._initializeObservers();\n const actions = this._dataRequestCoordinator.connect(this._state.searchQuery);\n this._dispatchAcknowledgedActions(actions);\n if (actions.length === 0) this._renderOptions();\n const readyRenderCycleId = this._renderCycleId;\n const readyRenderCompleted = await this._waitForRenderCycle(readyRenderCycleId);\n if (!readyRenderCompleted) {\n this._acknowledgedReady = false;\n throw new Error('Acknowledged readiness render was superseded before completion');\n }\n }\n\n private _dispatchAcknowledgedActions(actions: readonly DataCoordinatorAction[]): void {\n for (const action of actions) {\n if (action.type === 'cancel') {\n this._dispatchAcknowledgedEvent('dataRequestCancel', action.notification);\n try {\n this._dataRequestCancelCallback?.(action.notification);\n } catch (error) {\n this._handleError(error as Error);\n }\n continue;\n }\n\n const request = action.request;\n const coordinator = this._dataRequestCoordinator;\n if (!coordinator || !this._acknowledgedReady) continue;\n\n if (request.kind === 'loadMore') {\n this._state.lastScrollPosition = this._optionsContainer.scrollTop;\n this._acknowledgedProjectionScrollTop = this._state.lastScrollPosition;\n this._state.preserveScrollPosition = true;\n this._state.isSearching = false;\n } else {\n this._acknowledgedProjectionScrollTop = 0;\n this._state.preserveScrollPosition = false;\n this._state.isSearching = true;\n }\n this._state.isBusy = true;\n this._acknowledgedLastRequest = request;\n this._syncListboxAccessibility();\n this._renderOptions();\n if (request.kind === 'loadMore') {\n this._optionsContainer.scrollTop = this._state.lastScrollPosition;\n }\n\n if (!coordinator.markNotificationsDispatched(request.requestId)) continue;\n\n if (request.kind === 'search') {\n const detail = { query: request.query, results: [], count: 0, request };\n this._dispatchAcknowledgedEvent('search', detail);\n try {\n const callback = this._config.callbacks.onSearch as unknown as\n ((query: string, context: DataRequest) => void) | undefined;\n callback?.(request.query, request);\n } catch (error) {\n this._handleError(error as Error);\n }\n } else {\n const page = request.position.mode === 'page'\n ? request.position.page\n : request.position.ordinal;\n const detail = { page, items: [], request };\n this._dispatchAcknowledgedEvent('loadMore', detail);\n try {\n const callback = this._config.callbacks.onLoadMore as unknown as\n ((page: number, context: DataRequest) => void) | undefined;\n callback?.(page, request);\n } catch (error) {\n this._handleError(error as Error);\n }\n }\n }\n }\n\n private _dispatchAcknowledgedEvent(name: string, detail: unknown): void {\n this.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));\n this._track('event', name, detail);\n }\n\n /** Test-only completion seam; accepted snapshots are projected from coordinator state. */\n private async _completeDataRequestForTest(completion: unknown): Promise<string> {\n const result = this.completeDataRequest(completion as DataRequestCompletion);\n if (result !== 'accepted') return result;\n await this._acknowledgedProjectionTask;\n return result;\n }\n\n private _failNextAcknowledgedProjectionForTest(stage: 'before-publish' | 'after-publish' = 'before-publish'): void {\n this._acknowledgedProjectionFailureStageForTest = stage;\n }\n\n /** Retries only from the canonical accepted coordinator snapshot, never a host payload. */\n private _retryAcknowledgedProjectionForTest(): Promise<void> {\n return this._retryAcknowledgedProjection();\n }\n\n private _retryAcknowledgedProjection(): Promise<void> {\n if (!this._dataRequestCoordinator || !this._acknowledgedProjectionPending) return Promise.resolve();\n return this._projectAcknowledgedSnapshot(\n this._dataRequestCoordinator.getSnapshot(),\n this._acknowledgedProjectionRequest ?? this._acknowledgedLastRequest,\n this._acknowledgedProjectionCommitsPosition,\n );\n }\n\n private _projectAcknowledgedSnapshot(\n snapshot: DataCoordinatorSnapshot,\n request: DataRequest | null,\n commitPosition: boolean,\n ): Promise<void> {\n if (this._acknowledgedProjectionRunning) {\n return this._acknowledgedProjectionTask ?? Promise.resolve();\n }\n\n this._acknowledgedProjectionRequest = request ?? this._acknowledgedProjectionRequest;\n this._acknowledgedProjectionAttempt += 1;\n this._acknowledgedProjectionPending = true;\n const items = Array.from(snapshot.items);\n let stagedRegistry: ItemRegistry<unknown, SelectKey>;\n let groupedItems: GroupedItem[];\n try {\n stagedRegistry = createItemRegistry(items, this._itemAdapter, {\n duplicateKeyPolicy: this._getDuplicateKeyPolicy(),\n });\n groupedItems = this._groupItemsByProperty(items);\n if (this._acknowledgedProjectionFailureStageForTest === 'before-publish') {\n this._acknowledgedProjectionFailureStageForTest = null;\n throw new Error('Injected acknowledged projection failure before publication');\n }\n } catch (error) {\n this._syncListboxAccessibility();\n this._recordAcknowledgedProjectionFailure(snapshot, request, error);\n return Promise.resolve();\n }\n\n this._acknowledgedProjectionRunning = true;\n const task = this._applyAcknowledgedSnapshot(snapshot, request, commitPosition, items, stagedRegistry, groupedItems);\n const trackedTask = task.finally(() => {\n if (this._acknowledgedProjectionTask === trackedTask) {\n this._acknowledgedProjectionRunning = false;\n this._acknowledgedProjectionTask = null;\n }\n });\n this._acknowledgedProjectionTask = trackedTask;\n return trackedTask;\n }\n\n private async _applyAcknowledgedSnapshot(\n snapshot: DataCoordinatorSnapshot,\n request: DataRequest | null,\n commitPosition: boolean,\n items: unknown[],\n stagedRegistry: ItemRegistry<unknown, SelectKey>,\n groupedItems: GroupedItem[],\n ): Promise<void> {\n let published = false;\n try {\n this._rebuildItemRegistry(items, stagedRegistry);\n this._state.groupedItems = groupedItems;\n if (commitPosition && request) {\n this._state.currentPage = snapshot.lastCommittedPage\n ?? (request.position.mode === 'page' ? request.position.page : request.position.ordinal);\n }\n this._state.isSearching = false;\n this._state.isBusy = true;\n this._state.lastScrollPosition = this._acknowledgedProjectionScrollTop;\n this._state.preserveScrollPosition = request?.kind === 'loadMore';\n published = true;\n\n if (this._acknowledgedProjectionFailureStageForTest === 'after-publish') {\n this._acknowledgedProjectionFailureStageForTest = null;\n throw new Error('Injected acknowledged projection failure after publication');\n }\n\n if (\n !this._state.searchQuery\n && this._acknowledgedPendingSearchQuery === null\n && !this._isActivelyEditingSearchInput()\n ) {\n this._updateInputDisplay();\n }\n this._syncListboxAccessibility();\n this._renderOptions();\n const renderCycleId = this._renderCycleId;\n const completed = await this._waitForRenderCycle(renderCycleId);\n if (!completed) throw new Error('Acknowledged snapshot render was superseded before completion');\n\n this._state.isBusy = snapshot.busy;\n if (!snapshot.busy) {\n this._optionsContainer.querySelector('.busy-bucket')?.remove();\n if (this._shouldRenderLoadMoreTrigger()) this._addLoadMoreTrigger();\n }\n this._optionsContainer.scrollTop = this._acknowledgedProjectionScrollTop;\n this._syncListboxAccessibility();\n this._syncRenderedOptionAccessibility();\n this._syncLegacyActiveAria();\n this._state.preserveScrollPosition = false;\n this._acknowledgedProjectionPending = false;\n this._acknowledgedProjectionDiagnostic = null;\n this._acknowledgedProjectionSettling = true;\n try {\n this._dispatchDataProjectionNotification({\n requestId: this._acknowledgedProjectionRequest?.requestId ?? request?.requestId ?? 'unknown',\n queryGeneration: this._acknowledgedProjectionRequest?.queryGeneration ?? snapshot.queryGeneration,\n attempt: this._acknowledgedProjectionAttempt,\n status: 'complete',\n });\n } finally {\n this._acknowledgedProjectionSettling = false;\n }\n if (this._clearAcknowledgedCoordinatorAfterProjection) {\n this._dataRequestCoordinator = null;\n this._acknowledgedSearchMode = null;\n this._clearAcknowledgedCoordinatorAfterProjection = false;\n this._acknowledgedProjectionRequest = null;\n } else {\n this._acknowledgedProjectionRequest = null;\n }\n this._finishAcknowledgedProjectionSettlement();\n } catch (error) {\n if (published) {\n if (this.isConnected) this._state.isBusy = true;\n this._state.isSearching = false;\n this._syncListboxAccessibility();\n }\n this._acknowledgedProjectionPending = true;\n this._recordAcknowledgedProjectionFailure(snapshot, request, error);\n }\n }\n\n private _recordAcknowledgedProjectionFailure(\n snapshot: DataCoordinatorSnapshot,\n request: DataRequest | null,\n error: unknown,\n ): void {\n const message = error instanceof Error ? error.message : String(error);\n const diagnostic = {\n requestId: this._acknowledgedProjectionRequest?.requestId ?? request?.requestId ?? 'unknown',\n queryGeneration: this._acknowledgedProjectionRequest?.queryGeneration ?? snapshot.queryGeneration,\n message,\n };\n this._acknowledgedProjectionDiagnostic = diagnostic;\n this._emit('diagnostic', {\n timestamp: Date.now(),\n source: 'event',\n name: 'acknowledgedProjectionFailed',\n detail: diagnostic,\n });\n if (diagnostic.requestId !== 'unknown') {\n this._dispatchDataProjectionNotification({\n requestId: diagnostic.requestId,\n queryGeneration: diagnostic.queryGeneration,\n attempt: this._acknowledgedProjectionAttempt,\n status: 'failed',\n error: { message },\n });\n }\n }\n\n private _dispatchDataProjectionNotification(detail: DataProjectionEventDetail): void {\n this._dispatchAcknowledgedEvent('dataProjection', detail);\n try {\n this._dataProjectionCallback?.(detail);\n } catch (error) {\n this._handleError(error as Error);\n }\n }\n\n private _dispatchPendingAcknowledgedSearchIntent(): void {\n const query = this._acknowledgedPendingSearchQuery;\n if (query === null || !this._acknowledgedReady || !this.isConnected) return;\n\n this._acknowledgedPendingSearchQuery = null;\n this._handleSearch(query);\n }\n\n /** Apply config/query changes coalesced while an accepted snapshot projected. */\n private _finishAcknowledgedProjectionSettlement(): void {\n const coordinator = this._dataRequestCoordinator;\n const query = this._acknowledgedPendingSearchQuery;\n\n if (this._dataLoadingConfig.protocol !== 'acknowledged' || !coordinator) {\n this._acknowledgedConfigUpdatePending = false;\n this._acknowledgedDeferredModeChange = false;\n if (this._dataLoadingConfig.protocol === 'legacy' && query !== null && this.isConnected) {\n this._acknowledgedPendingSearchQuery = null;\n this._handleSearch(query);\n } else {\n this._dispatchPendingAcknowledgedSearchIntent();\n }\n return;\n }\n\n if (!this.isConnected || !this._acknowledgedReady) return;\n\n if (this._acknowledgedConfigUpdatePending) {\n const requiresSingleLatestQueryRequest = this._acknowledgedDeferredModeChange && query !== null;\n if (requiresSingleLatestQueryRequest) {\n // Apply the mode transition while disconnected, set the latest query,\n // then reconnect once. This prevents an intermediate request for the\n // pre-projection query from escaping before the coalesced latest one.\n this._dispatchAcknowledgedActions(coordinator.disconnect());\n }\n\n const update = coordinator.updateConfig(this._createCoordinatorConfig());\n if (update.status !== 'accepted') {\n this._acknowledgedReady = false;\n return;\n }\n this._acknowledgedConfigUpdatePending = false;\n this._acknowledgedDeferredModeChange = false;\n\n if (requiresSingleLatestQueryRequest && query !== null) {\n this._acknowledgedPendingSearchQuery = null;\n this._state.searchQuery = query;\n this._input.value = query;\n this._dispatchAcknowledgedActions(coordinator.setQuery(query));\n this._dispatchAcknowledgedActions(coordinator.connect(query));\n this._syncListboxAccessibility();\n this._handleSearch(query);\n return;\n }\n\n this._dispatchAcknowledgedActions(update.actions);\n const state = coordinator.getSnapshot();\n this._state.isBusy = state.busy;\n this._state.isSearching = state.activeRequest?.kind === 'search';\n this._syncListboxAccessibility();\n }\n\n this._dispatchPendingAcknowledgedSearchIntent();\n }\n\n private _updateGuardedVirtualWindow(scrollTop: number, viewportHeight: number): boolean {\n this._guardedVirtualizationRequested = true;\n const virtualizer = this._ensureGuardedVirtualizer(this._renderPlan.filteredKeys);\n this._guardedVirtualScrollTop = scrollTop;\n this._guardedVirtualViewportHeight = viewportHeight;\n const update = virtualizer.updateWindow(scrollTop, viewportHeight);\n if (!update) return false;\n\n this._guardedVirtualOverscan = 0;\n this._applyGuardedWindowUpdate(update, this._guardedVirtualOverscan);\n this._optionsContainer.scrollTop = update.scrollTop;\n return true;\n }\n\n private _destroyGuardedVirtualizer(preserveRequestedMode = false): void {\n this._cancelGuardedVirtualWindowUpdate();\n this._guardedMeasurementGeneration += 1;\n if (this._guardedScrollListenerAttached) {\n this._optionsContainer.removeEventListener('scroll', this._onGuardedVirtualScroll);\n this._guardedScrollListenerAttached = false;\n }\n this._guardedVirtualizer?.destroy();\n this._guardedVirtualizer = null;\n this._teardownGuardedOptionResizeObserver();\n if (!preserveRequestedMode) this._guardedVirtualizationRequested = false;\n this._guardedVirtualizerKeys = [];\n this._guardedVirtualWindow = null;\n this._guardedVirtualScrollTop = 0;\n this._guardedVirtualViewportHeight = 0;\n this._guardedVirtualOverscan = 0;\n }\n\n private _invalidateGuardedMeasurements(): void {\n if (this._guardedVirtualizer) this._destroyGuardedVirtualizer(true);\n }\n\n private _createGuardedOptionResizeObserver(generation: number): void {\n if (typeof ResizeObserver === 'undefined') return;\n this._guardedOptionResizeObserver = new ResizeObserver((entries) => {\n if (\n generation !== this._guardedMeasurementGeneration\n || !this._guardedVirtualizer\n || !this._guardedVirtualizationRequested\n || !this.isConnected\n ) return;\n\n const virtualizer = this._guardedVirtualizer;\n const scrollTop = this._optionsContainer.scrollTop;\n const viewportHeight = this._resolveGuardedViewportHeight();\n const anchor = this._captureGuardedScrollAnchor(virtualizer, scrollTop, viewportHeight);\n let changed = false;\n\n for (const entry of entries) {\n const option = entry.target;\n if (!(option instanceof HTMLElement) || !this._guardedObservedOptions.has(option)) continue;\n if (!option.isConnected || !this._optionsContainer.contains(option)) continue;\n const meta = this._guardedOptionMeasurements.get(option);\n if (!meta || meta.generation !== generation) continue;\n const dataIndex = Number(option.getAttribute('data-index'));\n if (!Number.isInteger(dataIndex) || !Object.is(this._itemRegistry.indexToKey.get(dataIndex), meta.key)) continue;\n const currentIndex = this._renderPlan.filteredIndexByKey.get(meta.key);\n if (currentIndex === undefined || currentIndex !== meta.index) continue;\n\n const reportedHeight = entry.borderBoxSize?.[0]?.blockSize;\n const height = typeof reportedHeight === 'number' ? reportedHeight : entry.contentRect.height;\n if (!Number.isFinite(height) || height <= 0) continue;\n changed = virtualizer.measureItem(meta.index, height) || changed;\n }\n\n if (!changed) return;\n if (anchor) {\n const currentAnchorIndex = this._renderPlan.filteredIndexByKey.get(anchor.key);\n if (currentAnchorIndex !== undefined) {\n const anchoredScrollTop = Math.max(0, virtualizer.cumulativeOffset(currentAnchorIndex) + anchor.offset);\n this._guardedVirtualScrollTop = anchoredScrollTop;\n this._optionsContainer.scrollTop = anchoredScrollTop;\n }\n }\n const update = virtualizer.updateWindow(this._optionsContainer.scrollTop, viewportHeight);\n if (update) this._applyGuardedWindowUpdate(update, this._guardedVirtualOverscan);\n this._renderOptions();\n });\n }\n\n private _captureGuardedScrollAnchor(\n virtualizer: Virtualizer,\n scrollTop: number,\n viewportHeight: number,\n ): { key: SelectKey; offset: number } | null {\n const viewportTop = this._optionsContainer.getBoundingClientRect().top + this._optionsContainer.clientTop;\n const viewportBottom = viewportTop + viewportHeight;\n const visible = Array.from(this._guardedObservedOptions)\n .map((option) => ({ option, rect: option.getBoundingClientRect() }))\n .filter(({ rect }) => rect.height > 0 && rect.bottom > viewportTop && rect.top < viewportBottom)\n .sort((left, right) => left.rect.top - right.rect.top)[0];\n const visibleMeta = visible ? this._guardedOptionMeasurements.get(visible.option) : undefined;\n if (visibleMeta && visibleMeta.generation === this._guardedMeasurementGeneration) {\n return {\n key: visibleMeta.key,\n offset: scrollTop - virtualizer.cumulativeOffset(visibleMeta.index),\n };\n }\n\n if (this._renderPlan.filteredKeys.length === 0) return null;\n const index = virtualizer.computeWindow(scrollTop, 0).startIndex;\n const key = this._renderPlan.filteredKeys[index];\n return key === undefined ? null : {\n key,\n offset: scrollTop - virtualizer.cumulativeOffset(index),\n };\n }\n\n private _syncGuardedOptionResizeTargets(): void {\n const virtualizer = this._guardedVirtualizer;\n if (!virtualizer || !this._guardedVirtualizationRequested || !this.isConnected) return;\n\n const candidates: Array<{ option: HTMLElement; key: SelectKey; index: number }> = [];\n for (const child of Array.from(this._optionsContainer.children)) {\n if (!(child instanceof HTMLElement) || !child.hasAttribute('data-index')) continue;\n const dataIndex = Number(child.getAttribute('data-index'));\n if (!Number.isInteger(dataIndex)) continue;\n const key = this._itemRegistry.indexToKey.get(dataIndex);\n const index = key === undefined ? undefined : this._renderPlan.filteredIndexByKey.get(key);\n if (key === undefined || index === undefined) continue;\n candidates.push({ option: child, key, index });\n }\n\n const reusedTarget = candidates.some(({ option }) => this._guardedObserverSeenOptions.has(option));\n if (reusedTarget && this._guardedOptionResizeObserver) {\n this._guardedMeasurementGeneration += 1;\n this._teardownGuardedOptionResizeObserver();\n }\n if (!this._guardedOptionResizeObserver) {\n this._createGuardedOptionResizeObserver(this._guardedMeasurementGeneration);\n }\n const observer = this._guardedOptionResizeObserver;\n if (!observer) return;\n\n const current = new Set<HTMLElement>();\n for (const { option, key, index } of candidates) {\n current.add(option);\n this._guardedOptionMeasurements.set(option, {\n key,\n index,\n generation: this._guardedMeasurementGeneration,\n });\n if (!this._guardedObservedOptions.has(option)) {\n observer.observe(option);\n this._guardedObserverSeenOptions.add(option);\n }\n }\n\n for (const previous of this._guardedObservedOptions) {\n if (!current.has(previous)) observer.unobserve(previous);\n }\n this._guardedObservedOptions = current;\n }\n\n private _teardownGuardedOptionResizeObserver(): void {\n for (const option of this._guardedObservedOptions) {\n this._guardedOptionResizeObserver?.unobserve(option);\n }\n this._guardedObservedOptions.clear();\n this._guardedObserverSeenOptions = new WeakSet();\n this._guardedOptionResizeObserver?.disconnect();\n this._guardedOptionResizeObserver = null;\n this._guardedOptionMeasurements = new WeakMap();\n }\n\n private _materializeGuardedVirtualKey(key: SelectKey): boolean {\n if (!this._guardedVirtualizer) return false;\n\n const targetIndex = this._renderPlan.filteredIndexByKey.get(key);\n if (targetIndex === undefined) return false;\n\n this._ensureGuardedVirtualizer(this._renderPlan.filteredKeys);\n const result = this._guardedVirtualizer.scrollToKey(\n key,\n (candidate) => this._renderPlan.filteredIndexByKey.get(candidate),\n );\n if (!this._applyGuardedScrollResult(result)) return false;\n this._renderOptions();\n return true;\n }\n\n private _refreshVirtualizationScope(filteredIndices: readonly number[]): void {\n this._virtualizationScope = this._deriveVirtualizationScope(filteredIndices);\n }\n\n private _renderOptions(): void {\n this._ensureRegistryCurrent();\n const scrollTopBeforeRender = this._optionsContainer.scrollTop;\n this._renderCycleId += 1;\n const renderCycleId = this._renderCycleId;\n this._resolvePendingRenderCycles(false, renderCycleId);\n if (this._guardedVirtualizer) {\n this._guardedVirtualScrollTop = this._optionsContainer.scrollTop;\n }\n \n // Cleanup observer\n if (this._loadMoreTrigger && this._intersectionObserver) {\n this._intersectionObserver.unobserve(this._loadMoreTrigger);\n }\n if (this._dataRequestCoordinator) this._loadMoreTrigger = undefined;\n \n this._unobserveGuardedOptionResizeTargets();\n // Clear options container\n this._optionsContainer.innerHTML = '';\n let filteredIndicesForScope: number[] = [];\n let guardedScrollTopToRestore: number | null = null;\n \n // Ensure dropdown only contains options container (cleanup legacy direct children)\n // We need to preserve optionsContainer, so we can't just clear dropdown.innerHTML\n // But we can check if there are other children and remove them\n Array.from(this._dropdown.children).forEach(child => {\n if (child !== this._optionsContainer) {\n this._dropdown.removeChild(child);\n }\n });\n \n // Ensure dropdown is visible if we are rendering options\n if (this._state.isOpen && this._dropdown.style.display === 'none') {\n this._dropdown.style.display = 'block';\n }\n \n // Show searching state (exclusive state)\n if (this._state.isSearching) {\n this._registerShadowItems([]);\n this._renderPlan = this._createLegacyRenderPlan([]);\n this._refreshVirtualizationScope(filteredIndicesForScope);\n this._syncLegacyActiveAria();\n const searching = document.createElement('div');\n searching.className = 'searching-state';\n searching.setAttribute('part', 'loading');\n searching.textContent = 'Searching...';\n this._optionsContainer.appendChild(searching);\n this._resolveRenderCycle(renderCycleId, true);\n return;\n }\n \n const getValue = this._config.serverSide.getValueFromItem || ((item) => (item as any)?.value ?? item);\n const getLabel = this._config.serverSide.getLabelFromItem || ((item) => (item as any)?.label ?? String(item));\n \n // Filter items by search query\n const query = this._acknowledgedSearchMode === 'remote'\n ? ''\n : this._state.searchQuery.toLowerCase();\n if (this._guardedMeasurementQuery !== null && this._guardedMeasurementQuery !== query) {\n this._invalidateGuardedMeasurements();\n }\n this._guardedMeasurementQuery = query;\n \n // Handle Grouped Items Rendering (when no search query)\n if (this._state.groupedItems.length > 0 && !query) {\n this._destroyGuardedVirtualizer();\n this._renderPlan = this._createLegacyRenderPlan(this._itemRegistry.records.map((record) => record.index));\n filteredIndicesForScope = this._renderPlan.filteredIndices;\n this._registerShadowItems(filteredIndicesForScope);\n this._refreshVirtualizationScope(filteredIndicesForScope);\n this._state.groupedItems.forEach((group, groupIndex) => {\n let header: HTMLElement;\n if (this.groupHeaderRenderer) {\n header = this.groupHeaderRenderer(group, groupIndex);\n // make sure the returned element has the correct semantics so\n // people can style it. we add the class/part even if the renderer\n // returned something else to ensure backward compatibility.\n if (!(header instanceof HTMLElement)) {\n // fall back to default if API is misused\n header = document.createElement('div');\n header.textContent = String(group.label);\n }\n } else {\n header = document.createElement('div');\n header.textContent = group.label;\n }\n\n header.classList.add('group-header');\n if (this._config.styles.classNames?.groupHeader) {\n header.classList.add(...this._config.styles.classNames.groupHeader.split(' ').filter(Boolean));\n }\n if (!header.hasAttribute('role')) {\n header.setAttribute('role', 'presentation');\n }\n header.setAttribute('part', 'group-header');\n this._optionsContainer.appendChild(header);\n\n group.options.forEach(item => {\n // Find original index for correct ID generation and selection\n const index = this._state.loadedItems.indexOf(item);\n if (index !== -1) {\n this._renderSingleOption(item, index, getValue, getLabel);\n }\n });\n });\n } else {\n // Normal rendering (flat list or filtered)\n const computedFilteredIndices: number[] = [];\n this._state.loadedItems.forEach((item, index) => {\n if (query) {\n try {\n const label = String(getLabel(item)).toLowerCase();\n if (!label.includes(query)) return;\n } catch (_e) {\n return;\n }\n }\n\n computedFilteredIndices.push(index);\n });\n this._renderPlan = this._createLegacyRenderPlan(computedFilteredIndices);\n filteredIndicesForScope = this._renderPlan.filteredIndices;\n this._registerShadowItems(filteredIndicesForScope);\n if (this._guardedVirtualizationRequested && !this._guardedVirtualizer) {\n this._ensureGuardedVirtualizer(this._renderPlan.filteredKeys);\n this._guardedVirtualViewportHeight = this._resolveGuardedViewportHeight();\n // A data reorder/filter may have invalidated the old virtualizer, but\n // the physical position is still available before the DOM is cleared.\n this._guardedVirtualScrollTop = scrollTopBeforeRender;\n }\n if (this._guardedVirtualizer) {\n const virtualizer = this._ensureGuardedVirtualizer(this._renderPlan.filteredKeys);\n const measuredViewportHeight = this._resolveGuardedViewportHeight();\n if (measuredViewportHeight > 0) {\n this._guardedVirtualViewportHeight = measuredViewportHeight;\n }\n const scrollTop = this._clampGuardedScrollPosition(\n this._renderPlan.filteredKeys.length,\n this._guardedVirtualViewportHeight,\n );\n guardedScrollTopToRestore = scrollTop;\n const update = virtualizer.updateWindow(\n scrollTop,\n this._guardedVirtualViewportHeight,\n );\n if (update) {\n this._applyGuardedWindowUpdate(update, this._guardedVirtualOverscan);\n } else {\n this._guardedVirtualWindow = null;\n }\n }\n if (this._guardedVirtualWindow) {\n this._renderPlan = this._createVirtualRenderPlan(\n this._guardedVirtualWindow.startIndex,\n this._guardedVirtualWindow.endIndex,\n );\n }\n const filteredIndices = this._renderPlan.filteredIndices;\n this._refreshVirtualizationScope(filteredIndicesForScope);\n this._appendGuardedTopSpacer();\n\n if (filteredIndices.length === 0 && !this._state.isBusy) {\n const empty = document.createElement('div');\n empty.setAttribute('part', 'no-results');\n empty.className = 'empty-state';\n if (query) {\n empty.textContent = `No results found for \"${this._state.searchQuery}\"`;\n } else {\n empty.textContent = 'No options available';\n }\n this._optionsContainer.appendChild(empty);\n } else {\n const shouldIncrementalRender =\n !this._guardedVirtualizer\n && this._config.virtualize !== false\n && this._state.groupedItems.length === 0\n && filteredIndices.length > 300;\n\n if (shouldIncrementalRender) {\n const chunkSize = 80;\n let cursor = 0;\n let maxRenderTarget = 0;\n\n if (this._state.selectedIndices.size > 0 && this._config.scrollToSelected.enabled) {\n const indices = Array.from(this._state.selectedIndices).filter((index) => index >= 0).sort((a, b) => a - b);\n const targetIndex = this._config.scrollToSelected.multiSelectTarget === 'first' ? indices[0] : indices[indices.length - 1];\n const filteredPos = filteredIndices.indexOf(targetIndex);\n if (filteredPos !== -1) {\n maxRenderTarget = filteredPos + 20; // Ensure we render up to the selection\n }\n }\n\n const renderChunk = () => {\n if (renderCycleId !== this._renderCycleId) {\n this._resolveRenderCycle(renderCycleId, false);\n return;\n }\n\n const fragment = document.createDocumentFragment();\n const chunkEnd = Math.min(Math.max(cursor + chunkSize, maxRenderTarget), filteredIndices.length);\n maxRenderTarget = 0; // Reset after fast-forwarding\n\n for (; cursor < chunkEnd; cursor += 1) {\n const itemIndex = filteredIndices[cursor];\n const item = this._state.loadedItems[itemIndex];\n this._renderSingleOption(item, itemIndex, getValue, getLabel, fragment);\n }\n\n const renderedTargets = Array.from(fragment.children);\n this._optionsContainer.appendChild(fragment);\n this._appendMountedVirtualizationTargets(renderedTargets);\n this._syncRenderedOptionAccessibility();\n this._syncLegacyActiveAria();\n\n if (cursor < filteredIndices.length) {\n this._requestLifecycleFrame(renderChunk);\n } else {\n if (renderCycleId !== this._renderCycleId) {\n this._resolveRenderCycle(renderCycleId, false);\n return;\n }\n\n if (!this._state.isBusy && this._shouldRenderLoadMoreTrigger()) {\n this._addLoadMoreTrigger();\n }\n\n this._finalizePerfMarks();\n this._resolveRenderCycle(renderCycleId, true);\n }\n };\n\n renderChunk();\n return;\n }\n\n filteredIndices.forEach((itemIndex) => {\n const item = this._state.loadedItems[itemIndex];\n this._renderSingleOption(item, itemIndex, getValue, getLabel);\n });\n }\n this._appendGuardedBottomSpacer();\n }\n \n this._refreshMountedVirtualizationScope();\n // Append Busy Indicator if busy\n if (this._state.isBusy && this._config.busyBucket.enabled) {\n const busyBucket = document.createElement('div');\n busyBucket.setAttribute('part', 'loading');\n busyBucket.className = 'busy-bucket';\n \n if (this._config.busyBucket.showSpinner) {\n const spinner = document.createElement('div');\n spinner.className = 'spinner';\n busyBucket.appendChild(spinner);\n }\n \n if (this._config.busyBucket.message) {\n const message = document.createElement('div');\n message.textContent = this._config.busyBucket.message;\n busyBucket.appendChild(message);\n }\n \n this._optionsContainer.appendChild(busyBucket);\n }\n // Append Load More Trigger (Button or Sentinel) if enabled and not busy\n else if ((!this._dataRequestCoordinator || !this._state.isBusy) && this._shouldRenderLoadMoreTrigger()) {\n this._addLoadMoreTrigger();\n }\n\n // Rebuilding the list temporarily removes its spacer geometry. Browsers\n // clamp scrollTop during that interval, so restore the logical position\n // only after the new top/bottom spacers and mounted rows are present.\n if (guardedScrollTopToRestore !== null) {\n this._optionsContainer.scrollTop = guardedScrollTopToRestore;\n }\n\n this._syncRenderedOptionAccessibility();\n this._syncLegacyActiveAria();\n this._syncGuardedOptionResizeTargets();\n this._finalizePerfMarks();\n this._resolveRenderCycle(renderCycleId, true);\n \n }\n\n private _waitForRenderCycle(renderCycleId: number): Promise<boolean> {\n if (renderCycleId < this._renderCycleId) return Promise.resolve(false);\n if (renderCycleId <= this._completedRenderCycleId) return Promise.resolve(true);\n return new Promise((resolve) => {\n this._renderCycleWaiters.set(renderCycleId, resolve);\n const timeout = window.setTimeout(() => this._resolveRenderCycle(renderCycleId, false), 120_000);\n this._renderCycleWaiterTimeouts.set(renderCycleId, timeout);\n });\n }\n\n private _resolveRenderCycle(renderCycleId: number, completed: boolean): void {\n if (completed) this._completedRenderCycleId = Math.max(this._completedRenderCycleId, renderCycleId);\n const resolve = this._renderCycleWaiters.get(renderCycleId);\n const timeout = this._renderCycleWaiterTimeouts.get(renderCycleId);\n if (timeout !== undefined) window.clearTimeout(timeout);\n this._renderCycleWaiterTimeouts.delete(renderCycleId);\n if (!resolve) return;\n this._renderCycleWaiters.delete(renderCycleId);\n resolve(completed);\n }\n\n private _resolvePendingRenderCycles(completed: boolean, beforeCycleId = Number.POSITIVE_INFINITY): void {\n for (const [renderCycleId, resolve] of this._renderCycleWaiters) {\n if (renderCycleId >= beforeCycleId) continue;\n const timeout = this._renderCycleWaiterTimeouts.get(renderCycleId);\n if (timeout !== undefined) window.clearTimeout(timeout);\n this._renderCycleWaiterTimeouts.delete(renderCycleId);\n this._renderCycleWaiters.delete(renderCycleId);\n resolve(completed);\n }\n }\n\n private _unobserveGuardedOptionResizeTargets(): void {\n for (const option of this._guardedObservedOptions) {\n this._guardedOptionResizeObserver?.unobserve(option);\n }\n this._guardedObservedOptions.clear();\n }\n\n private _renderSingleOption(\n item: any,\n index: number,\n getValue: (item: any) => any,\n getLabel: (item: any) => string,\n targetContainer: Node = this._optionsContainer,\n ) {\n const isSelected = this._state.selectedIndices.has(index);\n const isDisabled = Boolean((item as any)?.disabled);\n const disabledBehavior = this._getDisabledOptionBehavior();\n const optionId = `${this._uniqueId}-option-${index}`;\n\n if (this._optionRenderer) {\n const rendered = this._optionRenderer(item, index, this._rendererHelpers);\n // Ensure the returned element has the correct classes and listeners\n const optionElement = this._normalizeCustomOptionElement(rendered, {\n index,\n value: getValue(item),\n label: getLabel(item),\n selected: isSelected,\n active: this._state.activeIndex === index,\n disabled: isDisabled,\n disabledBehavior,\n id: optionId,\n });\n optionElement.setAttribute('dir', this._config.direction ?? 'ltr');\n targetContainer.appendChild(optionElement);\n return;\n }\n\n const option = new SelectOption({\n item,\n index,\n id: optionId,\n selected: isSelected,\n disabled: isDisabled,\n disabledBehavior,\n active: this._state.activeIndex === index,\n getValue,\n getLabel,\n showRemoveButton: this._config.selection.mode === 'multi' && this._config.selection.showRemoveButton,\n removeButtonIcon: this._config.selection.removeButtonIcon,\n classMap: this.classMap,\n className: this._config.styles?.classNames?.option,\n });\n\n if (this._config.styles?.classNames?.option) {\n option.classList.add(...this._config.styles.classNames.option.split(' ').filter(Boolean));\n }\n option.setAttribute('dir', this._config.direction ?? 'ltr');\n if (isSelected && this._config.styles?.classNames?.selectedOption) {\n option.classList.add(...this._config.styles.classNames.selectedOption.split(' ').filter(Boolean));\n }\n if (this._state.activeIndex === index && this._config.styles?.classNames?.activeOption) {\n option.classList.add(...this._config.styles.classNames.activeOption.split(' ').filter(Boolean));\n }\n if (isDisabled && this._config.styles.classNames?.disabledOption) {\n option.classList.add(...this._config.styles.classNames.disabledOption.split(' ').filter(Boolean));\n }\n\n // Valid part attribute on the web component host itself\n option.setAttribute('part', 'option');\n\n option.dataset.index = String(index);\n option.dataset.value = String(getValue(item));\n // New standard attributes on Host\n option.dataset.smIndex = String(index);\n if (!option.hasAttribute('data-sm-selectable')) {\n option.toggleAttribute('data-sm-selectable', true);\n }\n const val = getValue(item);\n if (val != null) {\n option.dataset.smValue = String(val);\n }\n\n option.id = option.id || optionId;\n\n // Do NOT bind a native click listener here for SelectOption elements.\n // Like custom rendered options, they are fully handled by the `handleOptionEvent` delegator \n // on `this._optionsContainer` (line 1221).\n // Adding this listener causes the double-click toggle bug since both fire on selection!\n \n option.addEventListener('optionRemove', (event: Event) => {\n const detail = (event as CustomEvent).detail as { index?: number } | undefined;\n const targetIndex = detail?.index ?? index;\n this._handleOptionRemove(targetIndex);\n });\n\n targetContainer.appendChild(option);\n\n if (option instanceof SelectOption) {\n option.ensureRendered();\n }\n }\n\n /** Keep custom option active classes aligned with the engine, including previous class maps. */\n private _syncCustomOptionActiveClasses(option: HTMLElement, active: boolean): void {\n const mapped = (this.classMap?.active ?? 'active sm-active').split(/\\s+/).filter(Boolean);\n const styled = (this._config.styles.classNames?.activeOption ?? '').split(/\\s+/).filter(Boolean);\n const current = [...new Set([...mapped, ...styled, 'smilodon-option--active'])];\n const previous = this._customOptionManagedActiveClasses.get(option) ?? [];\n option.classList.remove(...new Set([...previous, ...current, 'active', 'sm-active', 'smilodon-option--active']));\n if (active) option.classList.add(...current);\n this._customOptionManagedActiveClasses.set(option, current);\n\n const states = new Set((option.dataset.smState ?? '').split(/\\s+/).filter(Boolean));\n if (active) states.add('active');\n else states.delete('active');\n if (states.size) option.dataset.smState = [...states].join(' ');\n else delete option.dataset.smState;\n }\n\n private _normalizeCustomOptionElement(element: HTMLElement | null | undefined, meta: {\n index: number;\n value: unknown;\n label: string;\n selected: boolean;\n active: boolean;\n disabled: boolean;\n disabledBehavior: {\n selectable: boolean;\n hoverable: boolean;\n focusable: boolean;\n };\n id: string;\n }): HTMLElement {\n const optionEl = element instanceof HTMLElement ? element : document.createElement('div');\n\n // Add part attribute for styling\n if (!optionEl.hasAttribute('part')) {\n optionEl.setAttribute('part', 'option');\n }\n\n // Add both semantic namespaced classes and the legacy internal classes that CSS uses\n optionEl.classList.add('smilodon-option', 'option');\n if (this._config.styles.classNames?.option) {\n optionEl.classList.add(...this._config.styles.classNames.option.split(' ').filter(Boolean));\n }\n \n // Toggle state classes using classMap if available\n const isSelected = meta.selected;\n const isActive = meta.active;\n const isDisabled = meta.disabled;\n const isDisabledSelectable = isDisabled && meta.disabledBehavior.selectable;\n const isDisabledHoverable = isDisabled && meta.disabledBehavior.hoverable;\n const isDisabledFocusable = isDisabled && meta.disabledBehavior.focusable;\n const isDisabledInteractive = isDisabled && (isDisabledSelectable || isDisabledHoverable);\n\n // Resolve classes from classMap or defaults\n const selectedClasses = (this.classMap?.selected ?? 'selected sm-selected').split(' ').filter(Boolean);\n const disabledClasses = (this.classMap?.disabled ?? 'disabled sm-disabled').split(' ').filter(Boolean);\n\n if (isSelected) {\n optionEl.classList.add(...selectedClasses);\n optionEl.classList.add('smilodon-option--selected');\n if (this._config.styles.classNames?.selectedOption) {\n optionEl.classList.add(...this._config.styles.classNames.selectedOption.split(' ').filter(Boolean));\n }\n } else {\n optionEl.classList.remove(...selectedClasses);\n optionEl.classList.remove('smilodon-option--selected');\n if (this._config.styles.classNames?.selectedOption) {\n optionEl.classList.remove(...this._config.styles.classNames.selectedOption.split(' ').filter(Boolean));\n }\n }\n\n this._syncCustomOptionActiveClasses(optionEl, isActive);\n\n if (isDisabled) {\n optionEl.classList.add(...disabledClasses);\n optionEl.classList.add('smilodon-option--disabled');\n if (this._config.styles.classNames?.disabledOption) {\n optionEl.classList.add(...this._config.styles.classNames.disabledOption.split(' ').filter(Boolean));\n }\n } else {\n optionEl.classList.remove(...disabledClasses);\n optionEl.classList.remove('smilodon-option--disabled');\n if (this._config.styles.classNames?.disabledOption) {\n optionEl.classList.remove(...this._config.styles.classNames.disabledOption.split(' ').filter(Boolean));\n }\n }\n\n optionEl.classList.toggle('smilodon-option--disabled-interactive', isDisabledInteractive);\n optionEl.classList.toggle('smilodon-option--disabled-hoverable', isDisabledHoverable);\n optionEl.classList.toggle('smilodon-option--disabled-focusable', isDisabledFocusable);\n optionEl.classList.toggle('smilodon-option--disabled-selectable', isDisabledSelectable);\n\n // Data Attributes Contract\n const state = [];\n if (isSelected) state.push('selected');\n if (isActive) state.push('active');\n if (state.length) {\n optionEl.dataset.smState = state.join(' ');\n } else {\n delete optionEl.dataset.smState;\n }\n\n // Legacy data attribute support\n if (!optionEl.hasAttribute('data-selectable')) {\n optionEl.setAttribute('data-selectable', '');\n }\n // New delegation attribute\n if (!optionEl.hasAttribute('data-sm-selectable')) {\n optionEl.setAttribute('data-sm-selectable', '');\n }\n\n optionEl.dataset.index = String(meta.index);\n optionEl.dataset.value = String(meta.value);\n // New standard attributes\n optionEl.dataset.smIndex = String(meta.index);\n if (meta.value != null) {\n optionEl.dataset.smValue = String(meta.value);\n } else {\n delete optionEl.dataset.smValue;\n }\n \n // Refresh component-generated IDs when a renderer reuses an option node,\n // while preserving an ID that the renderer supplied itself.\n const previousNormalizedId = this._customOptionNormalizedIds.get(optionEl);\n if (!optionEl.id || (previousNormalizedId !== undefined && optionEl.id === previousNormalizedId)) {\n optionEl.id = meta.id;\n this._customOptionNormalizedIds.set(optionEl, meta.id);\n } else {\n this._customOptionNormalizedIds.delete(optionEl);\n }\n\n if (!optionEl.hasAttribute('tabindex')) {\n optionEl.tabIndex = -1;\n }\n\n if (!this._customOptionBoundElements.has(optionEl)) {\n // Intentionally NOT binding native option click listeners for custom options! \n // All option interactions are globally handled by _optionsContainer.addEventListener('click', handleOptionEvent);\n // Re-attaching here causes the double-click toggle bug if a child component fails to stopPropagation.\n \n this._customOptionBoundElements.add(optionEl);\n }\n\n this._normalizeCustomOptionAccessibility(optionEl, {\n label: meta.label,\n disabled: meta.disabled,\n });\n\n return optionEl;\n }\n\n private _addLoadMoreTrigger(): void {\n const container = document.createElement('div');\n container.className = 'load-more-container';\n\n if (this._dataRequestCoordinator) {\n const shouldObserve = this._config.infiniteScroll.enabled\n && Boolean(this._intersectionObserver)\n && this._acknowledgedReady;\n let sentinel: HTMLElement | undefined;\n\n if (shouldObserve) {\n sentinel = this._acknowledgedSentinel ?? document.createElement('div');\n sentinel.className = 'infinite-scroll-sentinel';\n sentinel.style.height = '10px';\n sentinel.style.width = '100%';\n sentinel.style.opacity = '0';\n this._acknowledgedSentinel = sentinel as HTMLDivElement;\n this._loadMoreTrigger = sentinel;\n container.appendChild(sentinel);\n }\n\n // Keep an explicit keyboard-accessible path even when automatic\n // observation is enabled, and use it as the fallback if IO is absent.\n if (this._config.loadMore.enabled || this._config.infiniteScroll.enabled) {\n const button = document.createElement('button');\n button.className = 'load-more-button';\n button.textContent = `Load ${this._config.loadMore.itemsPerLoad} more`;\n button.addEventListener('click', () => this._loadMoreItems('manual'));\n container.appendChild(button);\n if (!sentinel) this._loadMoreTrigger = button;\n }\n\n this._optionsContainer.appendChild(container);\n\n if (sentinel && this._intersectionObserver) {\n try {\n this._intersectionObserver.observe(sentinel);\n } catch (_error) {\n this._intersectionObserver.disconnect();\n this._intersectionObserver = undefined;\n sentinel.remove();\n this._loadMoreTrigger = container.querySelector<HTMLElement>('.load-more-button') ?? undefined;\n }\n }\n return;\n }\n \n if (this._config.infiniteScroll.enabled) {\n // Infinite Scroll: Render an invisible sentinel\n // It must have some height to be intersected\n const sentinel = document.createElement('div');\n sentinel.className = 'infinite-scroll-sentinel';\n sentinel.style.height = '10px';\n sentinel.style.width = '100%';\n sentinel.style.opacity = '0'; // Invisible\n \n this._loadMoreTrigger = sentinel;\n container.appendChild(sentinel);\n } else {\n // Manual Load More: Render a button\n const button = document.createElement('button');\n button.className = 'load-more-button';\n button.textContent = `Load ${this._config.loadMore.itemsPerLoad} more`;\n button.addEventListener('click', () => this._loadMoreItems());\n \n this._loadMoreTrigger = button;\n container.appendChild(button);\n }\n \n this._optionsContainer.appendChild(container);\n \n // Setup intersection observer for auto-load\n if (this._intersectionObserver && this._loadMoreTrigger) {\n this._intersectionObserver.observe(this._loadMoreTrigger);\n }\n }\n\n private _shouldRenderLoadMoreTrigger(): boolean {\n if (!this._config.loadMore.enabled && !this._config.infiniteScroll.enabled) return false;\n if (this._dataLoadingConfig.protocol === 'acknowledged'\n && (!this._dataRequestCoordinator || !this._acknowledgedReady)) return false;\n if (!this._dataRequestCoordinator) return this._state.loadedItems.length > 0;\n const snapshot = this._dataRequestCoordinator.getSnapshot();\n if (snapshot.status === 'resource-limited') return false;\n return snapshot.hasMore\n || snapshot.error !== null\n || snapshot.status === 'empty'\n || snapshot.status === 'failed'\n || snapshot.status === 'cancelled';\n }\n}\n\n// Register custom element\nif (!customElements.get('enhanced-select')) {\n customElements.define('enhanced-select', EnhancedSelect);\n}\n","/**\n * Web Worker protocol types for off-main-thread processing.\n * Supports heavy transforms, fuzzy search, and data processing.\n */\n\nexport interface WorkerRequest {\n id: string;\n type: 'transform' | 'search' | 'filter' | 'sort';\n payload: unknown;\n}\n\nexport interface WorkerResponse<T = unknown> {\n id: string;\n success: boolean;\n data?: T;\n error?: string;\n duration?: number; // milliseconds\n}\n\nexport interface TransformRequest {\n items: unknown[];\n transformer: string; // serialized function\n}\n\nexport interface SearchRequest {\n items: unknown[];\n query: string;\n fuzzy?: boolean;\n maxResults?: number;\n}\n\nexport interface FilterRequest {\n items: unknown[];\n predicate: string; // serialized function\n}\n\nexport interface SortRequest {\n items: unknown[];\n comparator: string; // serialized function\n}\n\n/**\n * Worker manager for handling off-main-thread processing.\n * Automatically falls back if workers not available or blocked by COOP/COEP.\n */\nexport class WorkerManager {\n private worker: Worker | null = null;\n private pending = new Map<string, {\n resolve: (data: any) => void;\n reject: (error: Error) => void;\n timeout: number;\n }>();\n private supportsWorkers = false;\n private supportsSharedArrayBuffer = false;\n private nextId = 0;\n\n constructor() {\n this.detectFeatures();\n this.initWorker();\n }\n\n /**\n * Detect browser capabilities\n */\n private detectFeatures(): void {\n this.supportsWorkers = typeof Worker !== 'undefined';\n this.supportsSharedArrayBuffer = typeof SharedArrayBuffer !== 'undefined';\n }\n\n /**\n * Initialize worker (inline blob URL for simplicity)\n */\n private initWorker(): void {\n if (!this.supportsWorkers) return;\n\n try {\n const workerCode = this.generateWorkerCode();\n const blob = new Blob([workerCode], { type: 'application/javascript' });\n const url = URL.createObjectURL(blob);\n \n this.worker = new Worker(url);\n this.worker.onmessage = this.handleMessage.bind(this);\n this.worker.onerror = this.handleError.bind(this);\n \n // Cleanup blob URL after worker loads\n URL.revokeObjectURL(url);\n } catch (err) {\n console.warn('Worker initialization failed, falling back to main thread', err);\n this.worker = null;\n }\n }\n\n /**\n * Generate worker code as string\n */\n private generateWorkerCode(): string {\n return `\n // Worker code\n self.onmessage = function(e) {\n const start = performance.now();\n const { id, type, payload } = e.data;\n \n // Lookup object for O(1) operation dispatch\n const operations = {\n 'transform': handleTransform,\n 'search': handleSearch,\n 'filter': handleFilter,\n 'sort': handleSort,\n };\n \n try {\n const handler = operations[type];\n if (!handler) {\n throw new Error('Unknown operation: ' + type);\n }\n \n const result = handler(payload);\n const duration = performance.now() - start;\n \n self.postMessage({\n id,\n success: true,\n data: result,\n duration,\n });\n } catch (error) {\n self.postMessage({\n id,\n success: false,\n error: error.message,\n });\n }\n };\n \n function handleTransform({ items, transformer }) {\n const fn = new Function('item', 'index', 'return (' + transformer + ')(item, index)');\n return items.map((item, i) => fn(item, i));\n }\n \n function handleSearch({ items, query, fuzzy, maxResults }) {\n const lowerQuery = query.toLowerCase();\n const results = [];\n \n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n const text = String(item).toLowerCase();\n \n if (fuzzy) {\n if (fuzzyMatch(text, lowerQuery)) {\n results.push({ item, index: i, score: fuzzyScore(text, lowerQuery) });\n }\n } else {\n if (text.includes(lowerQuery)) {\n results.push({ item, index: i });\n }\n }\n \n if (maxResults && results.length >= maxResults) break;\n }\n \n if (fuzzy) {\n results.sort((a, b) => b.score - a.score);\n }\n \n return results;\n }\n \n function handleFilter({ items, predicate }) {\n const fn = new Function('item', 'index', 'return (' + predicate + ')(item, index)');\n return items.filter((item, i) => fn(item, i));\n }\n \n function handleSort({ items, comparator }) {\n const fn = new Function('a', 'b', 'return (' + comparator + ')(a, b)');\n return [...items].sort(fn);\n }\n \n // Simple fuzzy matching (Levenshtein-inspired)\n function fuzzyMatch(text, query) {\n let qi = 0;\n for (let ti = 0; ti < text.length && qi < query.length; ti++) {\n if (text[ti] === query[qi]) qi++;\n }\n return qi === query.length;\n }\n \n function fuzzyScore(text, query) {\n let score = 0;\n let qi = 0;\n for (let ti = 0; ti < text.length && qi < query.length; ti++) {\n if (text[ti] === query[qi]) {\n score += 100 - ti; // Earlier matches score higher\n qi++;\n }\n }\n return score;\n }\n `;\n }\n\n /**\n * Handle worker message\n */\n private handleMessage(e: MessageEvent<WorkerResponse>): void {\n const { id, success, data, error } = e.data;\n const pending = this.pending.get(id);\n \n if (!pending) return;\n \n clearTimeout(pending.timeout);\n this.pending.delete(id);\n \n if (success) {\n pending.resolve(data);\n } else {\n pending.reject(new Error(error || 'Worker error'));\n }\n }\n\n /**\n * Handle worker error\n */\n private handleError(err: ErrorEvent): void {\n console.error('Worker error:', err);\n // Reject all pending requests\n for (const [id, pending] of this.pending) {\n clearTimeout(pending.timeout);\n pending.reject(new Error('Worker crashed'));\n }\n this.pending.clear();\n }\n\n /**\n * Execute operation (worker or fallback)\n */\n async execute<T = unknown>(\n type: WorkerRequest['type'],\n payload: unknown,\n timeout = 5000\n ): Promise<T> {\n // Fallback to main thread if no worker\n if (!this.worker) {\n return this.executeFallback<T>(type, payload);\n }\n\n const id = `req_${this.nextId++}`;\n \n return new Promise((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n this.pending.delete(id);\n reject(new Error('Worker timeout'));\n }, timeout) as unknown as number;\n\n this.pending.set(id, { resolve, reject, timeout: timeoutId });\n\n this.worker!.postMessage({ id, type, payload });\n });\n }\n\n /**\n * Operation handlers for fallback execution\n */\n private readonly _fallbackOperations: Record<string, <T>(payload: any) => T> = {\n 'transform': <T>(payload: any): T => {\n const { items, transformer } = payload as TransformRequest;\n const fn = new Function('item', 'index', `return (${transformer})(item, index)`);\n return items.map((item, i) => fn(item, i)) as T;\n },\n 'search': <T>(payload: any): T => {\n const { items, query, fuzzy } = payload as SearchRequest;\n const lowerQuery = query.toLowerCase();\n const results: { item: any; index: number }[] = [];\n \n // Use for-loop instead of forEach for better performance (no closure allocation)\n for (let index = 0; index < items.length; index++) {\n const item = items[index];\n \n // PERF: Check for label/value properties first before converting entire object\n const itemAny = item as any;\n const itemText = itemAny?.label ?? itemAny?.value ?? item;\n const itemStr = String(itemText).toLowerCase();\n \n if (fuzzy) {\n // Simple fuzzy match - check if all query chars appear in order\n let queryIndex = 0;\n for (let i = 0; i < itemStr.length && queryIndex < lowerQuery.length; i++) {\n if (itemStr[i] === lowerQuery[queryIndex]) {\n queryIndex++;\n }\n }\n if (queryIndex === lowerQuery.length) {\n results.push({ item, index });\n }\n } else {\n // Exact substring match\n if (itemStr.includes(lowerQuery)) {\n results.push({ item, index });\n }\n }\n }\n \n return results as T;\n },\n 'filter': <T>(payload: any): T => {\n const { items, predicate } = payload as FilterRequest;\n const fn = new Function('item', 'index', `return (${predicate})(item, index)`);\n return items.filter((item, i) => fn(item, i)) as T;\n },\n 'sort': <T>(payload: any): T => {\n const { items, comparator } = payload as SortRequest;\n const fn = new Function('a', 'b', `return (${comparator})(a, b)`) as (a: any, b: any) => number;\n return [...items].sort(fn) as T;\n },\n };\n\n /**\n * Fallback to main thread execution\n */\n private async executeFallback<T>(type: string, payload: any): Promise<T> {\n const handler = this._fallbackOperations[type];\n if (!handler) {\n throw new Error(`Unknown operation: ${type}`);\n }\n return handler<T>(payload);\n }\n\n /**\n * Transform items with custom function\n */\n async transform<T, R>(items: T[], transformer: (item: T, index: number) => R): Promise<R[]> {\n return this.execute<R[]>('transform', {\n items,\n transformer: transformer.toString(),\n });\n }\n\n /**\n * Search items with optional fuzzy matching\n */\n async search<T>(items: T[], query: string, fuzzy = false): Promise<{ item: T; index: number }[]> {\n return this.execute('search', { items, query, fuzzy });\n }\n\n /**\n * Filter items with predicate\n */\n async filter<T>(items: T[], predicate: (item: T, index: number) => boolean): Promise<T[]> {\n return this.execute<T[]>('filter', {\n items,\n predicate: predicate.toString(),\n });\n }\n\n /**\n * Sort items with comparator\n */\n async sort<T>(items: T[], comparator: (a: T, b: T) => number): Promise<T[]> {\n return this.execute<T[]>('sort', {\n items,\n comparator: comparator.toString(),\n });\n }\n\n /**\n * Check if workers are supported\n */\n get hasWorkerSupport(): boolean {\n return this.supportsWorkers && this.worker !== null;\n }\n\n /**\n * Check if SharedArrayBuffer is supported\n */\n get hasSharedArrayBuffer(): boolean {\n return this.supportsSharedArrayBuffer;\n }\n\n /**\n * Terminate worker\n */\n destroy(): void {\n if (this.worker) {\n // Reject all pending\n for (const [id, pending] of this.pending) {\n clearTimeout(pending.timeout);\n pending.reject(new Error('Worker terminated'));\n }\n this.pending.clear();\n \n this.worker.terminate();\n this.worker = null;\n }\n }\n}\n\n/**\n * Singleton instance\n */\nlet workerManager: WorkerManager | null = null;\n\nexport function getWorkerManager(): WorkerManager {\n if (!workerManager) {\n workerManager = new WorkerManager();\n }\n return workerManager;\n}\n","/**\n * Performance telemetry module for tracking frame timing and performance metrics.\n * Uses PerformanceObserver for precise measurements.\n * \n * Tracks:\n * - Frame time (should be < 16.67ms for 60fps)\n * - Main thread work per frame (target < 8ms, ideal 4-6ms)\n * - Long tasks (> 50ms blocks)\n * - Memory usage (if available)\n */\n\nexport interface FrameMetrics {\n frameTime: number; // milliseconds\n fps: number;\n longTasks: number; // count of frames > 16.67ms\n droppedFrames: number;\n}\n\nexport interface PerformanceMetrics {\n frames: FrameMetrics;\n mainThreadWork: number; // average ms per frame\n longTaskCount: number;\n memory?: {\n usedJSHeapSize: number;\n totalJSHeapSize: number;\n jsHeapSizeLimit: number;\n };\n}\n\nexport class PerformanceTelemetry {\n private frameTimes: number[] = [];\n private longTasks: number = 0;\n private lastFrameTime: number = 0;\n private rafId: number = 0;\n private measuring = false;\n private observer: PerformanceObserver | null = null;\n private workTotal = 0;\n private workCount = 0;\n\n /**\n * Setup PerformanceObserver for long tasks\n */\n private setupObserver(): void {\n if (typeof PerformanceObserver === 'undefined') return;\n\n try {\n this.observer = new PerformanceObserver((list) => {\n if (!this.measuring) return;\n\n for (const entry of list.getEntries()) {\n if (entry.entryType === 'longtask' && entry.duration > 50) {\n this.longTasks++;\n }\n if (entry.entryType === 'measure') {\n this.workTotal += entry.duration;\n this.workCount += 1;\n }\n }\n });\n\n // Observe long tasks if supported\n try {\n this.observer.observe({ entryTypes: ['longtask', 'measure'] });\n } catch {\n // Fallback to just measure if longtask not supported\n this.observer.observe({ entryTypes: ['measure'] });\n }\n } catch (err) {\n console.warn('PerformanceObserver not available', err);\n }\n }\n\n /**\n * Start measuring frame performance\n */\n start(): void {\n if (this.measuring) return;\n \n this.measuring = true;\n this.frameTimes = [];\n this.workTotal = 0;\n this.workCount = 0;\n this.longTasks = 0;\n this.lastFrameTime = performance.now();\n this.setupObserver();\n \n this.measureFrame();\n }\n\n /**\n * Stop measuring\n */\n stop(): void {\n this.measuring = false;\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n this.rafId = 0;\n }\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n }\n\n /**\n * Measure frame timing via requestAnimationFrame\n */\n private measureFrame = (): void => {\n if (!this.measuring) return;\n\n const now = performance.now();\n const frameTime = now - this.lastFrameTime;\n \n this.frameTimes.push(frameTime);\n \n // Keep last 60 frames (1 second at 60fps)\n if (this.frameTimes.length > 60) {\n this.frameTimes.shift();\n }\n \n this.lastFrameTime = now;\n this.rafId = requestAnimationFrame(this.measureFrame);\n };\n\n /**\n * Mark start of work for custom measurement\n */\n markStart(label: string): void {\n performance.mark(`${label}-start`);\n }\n\n /**\n * Mark end of work and measure duration\n */\n markEnd(label: string): number {\n const startMark = `${label}-start`;\n const endMark = `${label}-end`;\n\n performance.mark(endMark);\n const measure = performance.measure(label, startMark, endMark);\n const duration = measure ? measure.duration : 0;\n\n performance.clearMarks(startMark);\n performance.clearMarks(endMark);\n performance.clearMeasures(label);\n\n return duration;\n }\n\n /**\n * Get current metrics snapshot\n */\n getMetrics(): PerformanceMetrics {\n const avgFrameTime = this.frameTimes.length > 0\n ? this.frameTimes.reduce((a, b) => a + b, 0) / this.frameTimes.length\n : 0;\n \n const fps = avgFrameTime > 0 ? 1000 / avgFrameTime : 0;\n \n const longFrames = this.frameTimes.filter(t => t > 16.67).length;\n const droppedFrames = this.frameTimes.filter(t => t > 33.33).length; // > 2 frames\n \n const avgMainThreadWork = this.workCount > 0\n ? this.workTotal / this.workCount\n : 0;\n\n const metrics: PerformanceMetrics = {\n frames: {\n frameTime: avgFrameTime,\n fps,\n longTasks: longFrames,\n droppedFrames,\n },\n mainThreadWork: avgMainThreadWork,\n longTaskCount: this.longTasks,\n };\n\n // Add memory info if available\n if ('memory' in performance && (performance as any).memory) {\n const mem = (performance as any).memory;\n metrics.memory = {\n usedJSHeapSize: mem.usedJSHeapSize,\n totalJSHeapSize: mem.totalJSHeapSize,\n jsHeapSizeLimit: mem.jsHeapSizeLimit,\n };\n }\n\n return metrics;\n }\n\n /**\n * Check if performance is acceptable\n */\n isPerformanceGood(): boolean {\n const metrics = this.getMetrics();\n \n // Target: 60fps (16.67ms), < 8ms main thread work, minimal long tasks\n return (\n metrics.frames.fps >= 55 && // Allow some variance\n metrics.mainThreadWork < 8 &&\n metrics.frames.longTasks < 3 // Max 5% long frames\n );\n }\n\n /**\n * Get detailed report as string\n */\n getReport(): string {\n const metrics = this.getMetrics();\n \n let report = '=== Performance Report ===\\n';\n report += `FPS: ${metrics.frames.fps.toFixed(2)}\\n`;\n report += `Avg Frame Time: ${metrics.frames.frameTime.toFixed(2)}ms\\n`;\n report += `Long Frames (>16.67ms): ${metrics.frames.longTasks}\\n`;\n report += `Dropped Frames (>33ms): ${metrics.frames.droppedFrames}\\n`;\n report += `Avg Main Thread Work: ${metrics.mainThreadWork.toFixed(2)}ms\\n`;\n report += `Long Tasks (>50ms): ${metrics.longTaskCount}\\n`;\n \n if (metrics.memory) {\n const usedMB = (metrics.memory.usedJSHeapSize / 1024 / 1024).toFixed(2);\n const limitMB = (metrics.memory.jsHeapSizeLimit / 1024 / 1024).toFixed(2);\n report += `Memory: ${usedMB}MB / ${limitMB}MB\\n`;\n }\n \n report += `Status: ${this.isPerformanceGood() ? '✓ GOOD' : '✗ POOR'}\\n`;\n \n return report;\n }\n\n /**\n * Reset all metrics\n */\n reset(): void {\n this.frameTimes = [];\n this.workTotal = 0;\n this.workCount = 0;\n this.longTasks = 0;\n }\n\n /**\n * Cleanup\n */\n destroy(): void {\n this.stop();\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n }\n}\n\n/**\n * Singleton instance\n */\nlet telemetry: PerformanceTelemetry | null = null;\n\nexport function getTelemetry(): PerformanceTelemetry {\n if (!telemetry) {\n telemetry = new PerformanceTelemetry();\n }\n return telemetry;\n}\n\n/**\n * Helper to measure async function execution\n */\nexport async function measureAsync<T>(\n label: string,\n fn: () => Promise<T>\n): Promise<{ result: T; duration: number }> {\n const start = performance.now();\n const result = await fn();\n const duration = performance.now() - start;\n \n \n return { result, duration };\n}\n\n/**\n * Helper to measure sync function execution\n */\nexport function measureSync<T>(\n label: string,\n fn: () => T\n): { result: T; duration: number } {\n const start = performance.now();\n const result = fn();\n const duration = performance.now() - start;\n \n \n return { result, duration };\n}\n","/**\n * Security utilities for CSP-compliant environments.\n * All utilities are opt-in and do not run by default.\n */\n\n/**\n * HTML Sanitizer interface - developers must provide their own implementation\n * (e.g., DOMPurify) or use the no-op default.\n */\nexport interface HTMLSanitizer {\n sanitize(html: string): string;\n}\n\n/**\n * No-op sanitizer - DOES NOT sanitize HTML.\n * Used by default to avoid forcing a dependency on sanitizer libraries.\n * Developers using untrusted data MUST provide a real sanitizer.\n */\nclass NoOpSanitizer implements HTMLSanitizer {\n sanitize(html: string): string {\n return html;\n }\n}\n\n/**\n * Registry for custom sanitizer implementation.\n * Defaults to no-op - developers must explicitly set a sanitizer.\n */\nlet globalSanitizer: HTMLSanitizer = new NoOpSanitizer();\n\n/**\n * Set a custom HTML sanitizer (e.g., DOMPurify).\n * \n * @example\n * import DOMPurify from 'dompurify';\n * setHTMLSanitizer({\n * sanitize: (html) => DOMPurify.sanitize(html)\n * });\n */\nexport function setHTMLSanitizer(sanitizer: HTMLSanitizer): void {\n globalSanitizer = sanitizer;\n}\n\n/**\n * Reset to the default no-op sanitizer.\n * Mainly for testing purposes.\n */\nexport function resetHTMLSanitizer(): void {\n globalSanitizer = new NoOpSanitizer();\n}\n\n/**\n * Get the current HTML sanitizer.\n */\nexport function getHTMLSanitizer(): HTMLSanitizer {\n return globalSanitizer;\n}\n\n/**\n * Sanitize HTML using the registered sanitizer.\n * WARNING: Default is no-op! Set a real sanitizer for untrusted content.\n * \n * @param html - HTML string to sanitize\n * @returns Sanitized HTML string\n */\nexport function sanitizeHTML(html: string): string {\n return globalSanitizer.sanitize(html);\n}\n\n/**\n * Create a text node (CSP-safe alternative to innerHTML for text content).\n * \n * @param text - Text content\n * @returns Text node\n */\nexport function createTextNode(text: string): Text {\n return document.createTextNode(text);\n}\n\n/**\n * Set text content safely (CSP-compliant).\n * \n * @param element - Target element\n * @param text - Text content\n */\nexport function setTextContent(element: Element, text: string): void {\n element.textContent = text;\n}\n\n/**\n * Create an element with attributes (CSP-safe).\n * No inline styles or event handlers.\n * \n * @param tagName - HTML tag name\n * @param attributes - Element attributes (excluding style and on* handlers)\n * @param textContent - Optional text content\n * @returns Created element\n */\nexport function createElement(\n tagName: string,\n attributes?: Record<string, string>,\n textContent?: string\n): HTMLElement {\n const el = document.createElement(tagName);\n \n if (attributes) {\n for (const [key, value] of Object.entries(attributes)) {\n // Block dangerous attributes\n if (key.startsWith('on') || key === 'style') {\n console.warn(`[NativeSelect Security] Blocked attribute: ${key}`);\n continue;\n }\n el.setAttribute(key, value);\n }\n }\n \n if (textContent !== undefined) {\n el.textContent = textContent;\n }\n \n return el;\n}\n\n/**\n * Set CSS custom properties (CSP-safe way to style elements).\n * \n * @param element - Target element\n * @param properties - CSS custom properties (e.g., { '--color': 'red' })\n */\nexport function setCSSProperties(element: HTMLElement, properties: Record<string, string>): void {\n for (const [key, value] of Object.entries(properties)) {\n if (!key.startsWith('--')) {\n console.warn(`[NativeSelect Security] CSS property must start with --: ${key}`);\n continue;\n }\n element.style.setProperty(key, value);\n }\n}\n\n/**\n * Feature detection utilities for CSP-restricted environments.\n */\nexport const CSPFeatures = {\n /**\n * Check if inline scripts are allowed (CSP: script-src 'unsafe-inline').\n */\n hasInlineScripts(): boolean {\n try {\n // Try to create a function (blocked by CSP: script-src without 'unsafe-eval')\n new Function('return true');\n return true;\n } catch {\n return false;\n }\n },\n\n /**\n * Check if eval is allowed (CSP: script-src 'unsafe-eval').\n */\n hasEval(): boolean {\n try {\n eval('true');\n return true;\n } catch {\n return false;\n }\n },\n\n /**\n * Check if SharedArrayBuffer is available.\n * Required for some Worker features, blocked without COOP/COEP headers.\n */\n hasSharedArrayBuffer(): boolean {\n return typeof SharedArrayBuffer !== 'undefined';\n },\n\n /**\n * Check if Web Workers are available and functional.\n */\n hasWorkers(): boolean {\n try {\n return typeof Worker !== 'undefined';\n } catch {\n return false;\n }\n },\n\n /**\n * Check if we're in a sandboxed iframe.\n */\n isSandboxed(): boolean {\n try {\n // Sandboxed iframes may not have access to parent\n return window !== window.parent && !window.parent;\n } catch {\n return true;\n }\n },\n\n /**\n * Check CSP policy via meta tag or SecurityPolicyViolationEvent.\n */\n getCSPDirectives(): string[] {\n const metaTags = document.querySelectorAll('meta[http-equiv=\"Content-Security-Policy\"]');\n const directives: string[] = [];\n \n metaTags.forEach((meta) => {\n const content = meta.getAttribute('content');\n if (content) {\n directives.push(content);\n }\n });\n \n return directives;\n }\n};\n\n/**\n * Runtime environment checks for degraded features.\n */\nexport interface EnvironmentCapabilities {\n canUseWorkers: boolean;\n canUseSharedArrayBuffer: boolean;\n canUseInlineScripts: boolean;\n canUseEval: boolean;\n isSandboxed: boolean;\n cspDirectives: string[];\n}\n\n/**\n * Detect environment capabilities once at initialization.\n */\nexport function detectEnvironment(): EnvironmentCapabilities {\n return {\n canUseWorkers: CSPFeatures.hasWorkers(),\n canUseSharedArrayBuffer: CSPFeatures.hasSharedArrayBuffer(),\n canUseInlineScripts: CSPFeatures.hasInlineScripts(),\n canUseEval: CSPFeatures.hasEval(),\n isSandboxed: CSPFeatures.isSandboxed(),\n cspDirectives: CSPFeatures.getCSPDirectives()\n };\n}\n\n/**\n * Validation for untrusted HTML in templates.\n * Logs warning if no sanitizer is configured.\n */\nexport function validateTemplate(html: string, source: string): string {\n if (globalSanitizer instanceof NoOpSanitizer) {\n console.warn(\n `[NativeSelect Security] Template from \"${source}\" contains HTML but no sanitizer is configured. ` +\n `This may be unsafe if the content is untrusted. ` +\n `Call setHTMLSanitizer() with a sanitizer like DOMPurify.`\n );\n }\n return sanitizeHTML(html);\n}\n\n/**\n * Check if a string looks like it might contain executable code.\n */\nexport function containsSuspiciousPatterns(str: string): boolean {\n const patterns = [\n /<script/i,\n /javascript:/i,\n /on\\w+\\s*=/i, // event handlers like onclick=\n /eval\\s*\\(/i,\n /Function\\s*\\(/i,\n /setTimeout\\s*\\(/i,\n /setInterval\\s*\\(/i\n ];\n \n return patterns.some(pattern => pattern.test(str));\n}\n\n/**\n * Escape HTML entities for text content.\n */\nexport function escapeHTML(text: string): string {\n const div = document.createElement('div');\n div.textContent = text;\n return div.innerHTML;\n}\n\n/**\n * Escape attribute values.\n */\nexport function escapeAttribute(attr: string): string {\n return attr\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n","/**\n * CSP-compliant styling utilities.\n * No inline styles or runtime style tag injection.\n * Uses CSS custom properties and class names only.\n */\n\n/**\n * Apply CSS classes to an element (CSP-safe).\n */\nexport function applyClasses(element: HTMLElement, classes: string[]): void {\n element.className = classes.filter(Boolean).join(' ');\n}\n\n/**\n * Toggle a CSS class (CSP-safe).\n */\nexport function toggleClass(element: HTMLElement, className: string, force?: boolean): void {\n element.classList.toggle(className, force);\n}\n\n/**\n * Set CSS custom properties (CSP-safe dynamic styling).\n * All properties must start with -- (CSS variables).\n * \n * @example\n * setCustomProperties(element, {\n * '--item-height': '48px',\n * '--selected-bg': '#0066cc'\n * });\n */\nexport function setCustomProperties(\n element: HTMLElement,\n properties: Record<string, string>\n): void {\n for (const [key, value] of Object.entries(properties)) {\n if (!key.startsWith('--')) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[NativeSelect CSP] Custom property must start with --: \"${key}\". Skipping.`\n );\n }\n continue;\n }\n element.style.setProperty(key, value);\n }\n}\n\n/**\n * Get a CSS custom property value.\n */\nexport function getCustomProperty(element: HTMLElement, propertyName: string): string {\n return getComputedStyle(element).getPropertyValue(propertyName).trim();\n}\n\n/**\n * Remove a CSS custom property.\n */\nexport function removeCustomProperty(element: HTMLElement, propertyName: string): void {\n element.style.removeProperty(propertyName);\n}\n\n/**\n * Predefined theme as CSS custom properties.\n * Can be overridden by consumers via CSS.\n */\nexport const defaultTheme = {\n '--ns-item-height': '40px',\n '--ns-item-padding': '8px 12px',\n '--ns-item-bg': 'transparent',\n '--ns-item-hover-bg': 'rgba(0, 0, 0, 0.05)',\n '--ns-item-selected-bg': 'rgba(0, 102, 204, 0.1)',\n '--ns-item-active-bg': 'rgba(0, 102, 204, 0.2)',\n '--ns-item-color': 'inherit',\n '--ns-item-selected-color': '#0066cc',\n '--ns-border-color': '#ccc',\n '--ns-border-radius': '4px',\n '--ns-focus-outline': '2px solid #0066cc',\n '--ns-font-size': '14px',\n '--ns-font-family': 'system-ui, -apple-system, sans-serif'\n};\n\n/**\n * Apply the default theme to an element.\n */\nexport function applyDefaultTheme(element: HTMLElement): void {\n setCustomProperties(element, defaultTheme);\n}\n\n/**\n * Static CSS for shadow DOM (no runtime injection).\n * This CSS is CSP-safe because it's defined at build time as a string constant,\n * not generated at runtime.\n */\nexport const shadowDOMStyles = `\n:host {\n display: block;\n box-sizing: border-box;\n font-family: var(--ns-font-family, system-ui, -apple-system, sans-serif);\n font-size: var(--ns-font-size, 14px);\n}\n\n* {\n box-sizing: border-box;\n}\n\n.ns-list {\n position: relative;\n overflow: auto;\n max-height: var(--ns-max-height, 300px);\n border: 1px solid var(--ns-border-color, #ccc);\n border-radius: var(--ns-border-radius, 4px);\n background: var(--ns-bg, white);\n outline: none;\n}\n\n.ns-list:focus {\n outline: var(--ns-focus-outline, 2px solid #0066cc);\n outline-offset: -2px;\n}\n\n.ns-item {\n padding: var(--ns-item-padding, 8px 12px);\n min-height: var(--ns-item-height, 40px);\n color: var(--ns-item-color, inherit);\n background: var(--ns-item-bg, transparent);\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n transition: background-color 0.15s ease;\n}\n\n.ns-item:hover {\n background: var(--ns-item-hover-bg, rgba(0, 0, 0, 0.05));\n}\n\n.ns-item[aria-selected=\"true\"] {\n background: var(--ns-item-selected-bg, rgba(0, 102, 204, 0.1));\n color: var(--ns-item-selected-color, #0066cc);\n}\n\n.ns-item[data-active=\"true\"]:not([aria-selected=\"true\"]) {\n background: var(--ns-item-active-bg, rgba(0, 102, 204, 0.2));\n}\n\n.ns-item[aria-selected=\"true\"][data-active=\"true\"] {\n background: var(--ns-item-selected-active-bg, var(--ns-item-selected-bg, rgba(0, 102, 204, 0.1)));\n color: var(--ns-item-selected-active-color, var(--ns-item-selected-color, #0066cc));\n outline: var(--ns-item-selected-active-outline, 2px solid #0066cc);\n outline-offset: -2px;\n}\n\n.ns-item[aria-disabled=\"true\"] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.ns-viewport {\n position: relative;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.ns-spacer {\n position: absolute;\n top: 0;\n left: 0;\n width: 1px;\n pointer-events: none;\n}\n\n/* Screen reader only */\n.ns-sr-only {\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n}\n\n/* Portal mode (teleported outside shadow DOM) */\n.ns-portal {\n position: fixed;\n z-index: var(--ns-portal-z-index, 9999);\n}\n\n/* CSP warning banner (only shown in development) */\n.ns-csp-warning {\n padding: 8px;\n background: #fff3cd;\n border: 1px solid #ffc107;\n border-radius: 4px;\n color: #856404;\n font-size: 12px;\n margin-bottom: 8px;\n}\n`;\n\n/**\n * Inject static styles into shadow root (CSP-safe).\n * Only called once during component initialization.\n */\nexport function injectShadowStyles(shadowRoot: ShadowRoot): void {\n const style = document.createElement('style');\n style.textContent = shadowDOMStyles;\n shadowRoot.appendChild(style);\n}\n\n/**\n * Check if element has overflow:hidden ancestors (portal fallback detection).\n */\nexport function hasOverflowHiddenAncestor(element: HTMLElement): boolean {\n let current: HTMLElement | null = element.parentElement;\n \n while (current && current !== document.body) {\n const overflow = getComputedStyle(current).overflow;\n if (overflow === 'hidden' || overflow === 'clip') {\n return true;\n }\n current = current.parentElement;\n }\n \n return false;\n}\n\n/**\n * Runtime warning for CSP violations (development only).\n */\nexport function warnCSPViolation(feature: string, fallback: string): void {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `[NativeSelect CSP] Feature \"${feature}\" blocked by Content Security Policy. ` +\n `Falling back to \"${fallback}\".`\n );\n }\n}\n"],"names":["UnifiedOptionRenderer","isRecord"],"mappings":"MAKa,qBAAqB,GAAG,CAAC,QAAgD,MAAuB;IAC3G,QAAQ;AACR,IAAA,QAAQ,EAAE,CAAC,IAAoB,KAAI;QACjC,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,GAAG,mBAAmB,CAAuB;AACrE,QAAA,IAAI,CAAC,EAAE;AAAE,YAAA,OAAO,IAAI;QACpB,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;AACpC,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI;IAC1C,CAAC;AACD,IAAA,aAAa,EAAE,CAAC,KAAa,KAAI;QAC/B,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA,8BAAA,EAAiC,KAAK,CAAA,EAAA,CAAI,CAAuB;AACnG,QAAA,EAAE,EAAE,KAAK,IAAI;IACf;AACD,CAAA;AAED;SACgB,cAAc,CAAC,SAAsB,EAAE,KAA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