@humain/ui 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/index194.js +6 -8
  2. package/dist/index194.js.map +1 -1
  3. package/dist/index24.js +1 -1
  4. package/dist/index24.js.map +1 -1
  5. package/dist/styles.css +1 -1
  6. package/dist/wc/AIClarificationCard.js +1 -1
  7. package/dist/wc/AIContainer.js +1 -1
  8. package/dist/wc/AIForm.js +17 -17
  9. package/dist/wc/AIInput.js +1 -1
  10. package/dist/wc/AIMermaidDiagram.js +1 -1
  11. package/dist/wc/AIMessage.js +1 -1
  12. package/dist/wc/AIScrollButton.js +4 -4
  13. package/dist/wc/AIToolCall.js +5 -5
  14. package/dist/wc/AppSidebar.constants.js +1 -1
  15. package/dist/wc/AvatarFallback.js +5 -5
  16. package/dist/wc/CheckboxIndicator.js +7 -7
  17. package/dist/wc/CollapsiblePanel.js +1 -1
  18. package/dist/wc/DialogTrigger.js +9 -9
  19. package/dist/wc/DropdownMenu.js +16 -16
  20. package/dist/wc/MenuSubmenuTrigger.js +31 -31
  21. package/dist/wc/PopoverDescription.js +30 -30
  22. package/dist/wc/PrehydrationScript.js +1 -1
  23. package/dist/wc/Select.js +18 -18
  24. package/dist/wc/SelectSeparator.js +72 -72
  25. package/dist/wc/SelectSeparator.js.map +1 -1
  26. package/dist/wc/Tabs.js +18 -18
  27. package/dist/wc/TooltipProvider.js +9 -9
  28. package/dist/wc/chart.js +1 -1
  29. package/dist/wc/chunk-75Z2AOVW.js +39 -39
  30. package/dist/wc/chunk-OSK3NFVY.js +32 -32
  31. package/dist/wc/command.js +4 -4
  32. package/dist/wc/form-field.js +1 -1
  33. package/dist/wc/form-fieldset.js +5 -5
  34. package/dist/wc/hf-accordion-card.js +4 -4
  35. package/dist/wc/hf-accordion.js +6 -6
  36. package/dist/wc/hf-ai-feedback-bar.js +5 -5
  37. package/dist/wc/hf-ai-reasoning-block.js +6 -6
  38. package/dist/wc/hf-ai-system-message.js +1 -1
  39. package/dist/wc/hf-ai-tool-run.js +1 -1
  40. package/dist/wc/hf-area-chart.js +15 -15
  41. package/dist/wc/hf-autocomplete.js +36 -36
  42. package/dist/wc/hf-bar-chart.js +4 -4
  43. package/dist/wc/hf-calendar.js +4 -4
  44. package/dist/wc/hf-carousel.js +1 -1
  45. package/dist/wc/hf-context-menu.js +8 -8
  46. package/dist/wc/hf-donut-chart.js +10 -10
  47. package/dist/wc/hf-empty-state.js +87 -88
  48. package/dist/wc/hf-empty-state.js.map +1 -1
  49. package/dist/wc/hf-history.js +4 -4
  50. package/dist/wc/hf-horizontal-bar-chart.js +7 -7
  51. package/dist/wc/hf-hover-card.js +6 -6
  52. package/dist/wc/hf-line-chart.js +4 -4
  53. package/dist/wc/hf-metric-card.js +5 -5
  54. package/dist/wc/hf-metric-item.js +8 -8
  55. package/dist/wc/hf-metric-item.js.map +1 -1
  56. package/dist/wc/hf-nav-account-menu.js +4 -4
  57. package/dist/wc/hf-notification-panel.js +2 -2
  58. package/dist/wc/hf-pie-chart.js +17 -17
  59. package/dist/wc/hf-radar-chart.js +16 -16
  60. package/dist/wc/hf-section-header.js +6 -6
  61. package/dist/wc/hf-sheet.js +1 -1
  62. package/dist/wc/hf-sparkline-chart.js +5 -5
  63. package/dist/wc/hf-steps.js +6 -6
  64. package/dist/wc/journeyDiagram-3NMN7TZE.js +10 -10
  65. package/dist/wc/pieDiagram-E7YTZNPT.js +16 -16
  66. package/dist/wc/popupStateMapping.js +53 -53
  67. package/dist/wc/popupStateMapping.js.map +1 -1
  68. package/dist/wc/selection-group.js +1 -1
  69. package/dist/wc/selection-group.js.map +1 -1
  70. package/dist/wc/{useOpenChangeComplete.js → stateAttributesMapping.js} +21 -21
  71. package/dist/wc/stateAttributesMapping.js.map +1 -0
  72. package/dist/wc/stateDiagram-D77RDMKH.js +3 -3
  73. package/dist/wc/timeline-definition-24CTP7MA.js +19 -19
  74. package/dist/wc/useCollapsiblePanel.js +3 -3
  75. package/dist/wc/usePopupHandleStore.js +4 -4
  76. package/dist/wc/useScrollLock.js +1 -1
  77. package/dist/wc/vendor/recharts.js +525 -524
  78. package/dist/wc/vendor/recharts.js.map +1 -1
  79. package/dist/wc/xychartDiagram-S5SC5T6Z.js +6 -6
  80. package/dist/wc-react/AIClarificationCard.js +1 -1
  81. package/dist/wc-react/AIContainer.js +1 -1
  82. package/dist/wc-react/AIForm.js +17 -17
  83. package/dist/wc-react/AIInput.js +1 -1
  84. package/dist/wc-react/AIMermaidDiagram.js +1 -1
  85. package/dist/wc-react/AIMessage.js +1 -1
  86. package/dist/wc-react/AIScrollButton.js +4 -4
  87. package/dist/wc-react/AIToolCall.js +5 -5
  88. package/dist/wc-react/AppSidebar.constants.js +1 -1
  89. package/dist/wc-react/AvatarFallback.js +5 -5
  90. package/dist/wc-react/CheckboxIndicator.js +7 -7
  91. package/dist/wc-react/CollapsiblePanel.js +1 -1
  92. package/dist/wc-react/DialogTrigger.js +9 -9
  93. package/dist/wc-react/DropdownMenu.js +16 -16
  94. package/dist/wc-react/FloatingPortalLite.js +3 -3
  95. package/dist/wc-react/MenuSubmenuTrigger.js +31 -31
  96. package/dist/wc-react/PopoverDescription.js +31 -31
  97. package/dist/wc-react/PrehydrationScript.js +1 -1
  98. package/dist/wc-react/Select.js +18 -18
  99. package/dist/wc-react/SelectSeparator.js +71 -70
  100. package/dist/wc-react/SelectSeparator.js.map +1 -1
  101. package/dist/wc-react/Tabs.js +18 -18
  102. package/dist/wc-react/TooltipProvider.js +9 -9
  103. package/dist/wc-react/chart.js +1 -1
  104. package/dist/wc-react/chunk-75Z2AOVW.js +39 -39
  105. package/dist/wc-react/chunk-OSK3NFVY.js +32 -32
  106. package/dist/wc-react/command.js +4 -4
  107. package/dist/wc-react/form-field.js +1 -1
  108. package/dist/wc-react/form-fieldset.js +77 -77
  109. package/dist/wc-react/hf-accordion-card.js +4 -4
  110. package/dist/wc-react/hf-accordion.js +6 -6
  111. package/dist/wc-react/hf-ai-feedback-bar.js +5 -5
  112. package/dist/wc-react/hf-ai-reasoning-block.js +6 -6
  113. package/dist/wc-react/hf-ai-system-message.js +1 -1
  114. package/dist/wc-react/hf-ai-tool-run.js +1 -1
  115. package/dist/wc-react/hf-autocomplete.js +37 -37
  116. package/dist/wc-react/hf-calendar.js +4 -4
  117. package/dist/wc-react/hf-carousel.js +1 -1
  118. package/dist/wc-react/hf-context-menu.js +8 -8
  119. package/dist/wc-react/hf-data-table.js +1 -1
  120. package/dist/wc-react/hf-empty-state.js +87 -88
  121. package/dist/wc-react/hf-empty-state.js.map +1 -1
  122. package/dist/wc-react/hf-history.js +4 -4
  123. package/dist/wc-react/hf-hover-card.js +6 -6
  124. package/dist/wc-react/hf-metric-item.js +6 -6
  125. package/dist/wc-react/hf-metric-item.js.map +1 -1
  126. package/dist/wc-react/hf-nav-account-menu.js +4 -4
  127. package/dist/wc-react/hf-notification-panel.js +2 -2
  128. package/dist/wc-react/hf-section-header.js +6 -6
  129. package/dist/wc-react/hf-sheet.js +1 -1
  130. package/dist/wc-react/hf-steps.js +5 -5
  131. package/dist/wc-react/journeyDiagram-3NMN7TZE.js +10 -10
  132. package/dist/wc-react/pieDiagram-E7YTZNPT.js +16 -16
  133. package/dist/wc-react/popupStateMapping.js +54 -54
  134. package/dist/wc-react/popupStateMapping.js.map +1 -1
  135. package/dist/wc-react/selection-group.js +1 -1
  136. package/dist/wc-react/selection-group.js.map +1 -1
  137. package/dist/wc-react/{useOpenChangeComplete.js → stateAttributesMapping.js} +19 -19
  138. package/dist/wc-react/stateAttributesMapping.js.map +1 -0
  139. package/dist/wc-react/stateDiagram-D77RDMKH.js +3 -3
  140. package/dist/wc-react/timeline-definition-24CTP7MA.js +19 -19
  141. package/dist/wc-react/useCollapsiblePanel.js +3 -3
  142. package/dist/wc-react/usePopupHandleStore.js +3 -3
  143. package/dist/wc-react/useScrollLock.js +1 -1
  144. package/dist/wc-react/vendor/recharts.js +525 -524
  145. package/dist/wc-react/vendor/recharts.js.map +1 -1
  146. package/dist/wc-react/xychartDiagram-S5SC5T6Z.js +6 -6
  147. package/package.json +1 -1
  148. package/skills/humain-ui/SKILL.md +1 -1
  149. package/skills/humain-ui-wc/SKILL.md +1 -1
  150. package/skills/humain-ui-wc.skill +0 -0
  151. package/skills/humain-ui.skill +0 -0
  152. package/dist/wc/useOpenChangeComplete.js.map +0 -1
  153. package/dist/wc-react/useOpenChangeComplete.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SelectSeparator.js","names":["_formatErrorMessage","REASONS.none","stateAttributesMapping","REASONS.none","REASONS.cancelOpen","stateAttributesMapping","_formatErrorMessage","REASONS.none","ownerWindow","platform.engine.webkit","REASONS.windowResize","floatingPlatform","_formatErrorMessage","REASONS.itemPress","_formatErrorMessage"],"sources":["../../../../node_modules/.bun/@base-ui+utils@0.3.2+8fa0c0869acb2741/node_modules/@base-ui/utils/usePreviousValue.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/root/SelectRootContext.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/store.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/root/SelectRoot.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/value/SelectValue.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/icon/SelectIcon.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/portal/SelectPortal.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/popup/utils.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/positioner/SelectPositioner.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/popup/SelectPopup.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/list/SelectList.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/item/SelectItemContext.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/item/SelectItem.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/item-text/SelectItemText.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/scroll-arrow/SelectScrollArrow.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/scroll-down-arrow/SelectScrollDownArrow.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/scroll-up-arrow/SelectScrollUpArrow.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/group/SelectGroupContext.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/group/SelectGroup.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/utils/listbox-separator/ListboxSeparator.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/separator/SelectSeparator.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a previous value of its argument.\n * @param value Current value.\n * @returns Previous value, or null if there is no previous value.\n */\nexport function usePreviousValue(value) {\n const [state, setState] = React.useState({\n current: value,\n previous: null\n });\n if (!Object.is(value, state.current)) {\n setState({\n current: value,\n previous: state.current\n });\n }\n return state.previous;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectRootContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") SelectRootContext.displayName = \"SelectRootContext\";\nexport function useSelectRootContext() {\n const context = React.useContext(SelectRootContext);\n if (context === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(60));\n }\n return context;\n}","import { compareItemEquality } from \"../internals/itemEquality.mjs\";\nimport { hasNullItemLabel, stringifyAsValue } from \"../internals/resolveValueLabel.mjs\";\nexport const selectors = {\n id: state => state.id,\n labelId: state => state.labelId,\n modal: state => state.modal,\n items: state => state.items,\n itemToStringLabel: state => state.itemToStringLabel,\n isItemEqualToValue: state => state.isItemEqualToValue,\n value: state => state.value,\n hasSelectedValue: state => {\n const {\n value,\n multiple,\n itemToStringValue\n } = state;\n if (value == null) {\n return false;\n }\n if (multiple && Array.isArray(value)) {\n return value.length > 0;\n }\n return stringifyAsValue(value, itemToStringValue) !== '';\n },\n hasNullItemLabel: (state, enabled) => {\n return enabled ? hasNullItemLabel(state.items) : false;\n },\n open: state => state.open,\n mounted: state => state.mounted,\n forceMount: state => state.forceMount,\n transitionStatus: state => state.transitionStatus,\n openMethod: state => state.openMethod,\n activeIndex: state => state.activeIndex,\n selectedIndex: state => state.selectedIndex,\n isActive: (state, index) => state.activeIndex === index,\n isSelected: (state, itemValue) => {\n const comparer = state.isItemEqualToValue;\n const storeValue = state.value;\n if (state.multiple) {\n return Array.isArray(storeValue) && storeValue.some(selectedItem => compareItemEquality(itemValue, selectedItem, comparer));\n }\n\n // The value is the source of truth: a stale `selectedIndex` (e.g. the controlled\n // value changes while the popup is open, where the index sync is deferred) must not\n // keep a previously selected item marked as selected.\n return compareItemEquality(itemValue, storeValue, comparer);\n },\n isSelectedByFocus: (state, index) => {\n return state.selectedIndex === index;\n },\n popupProps: state => state.popupProps,\n triggerProps: state => state.triggerProps,\n triggerElement: state => state.triggerElement,\n positionerElement: state => state.positionerElement,\n listElement: state => state.listElement,\n popupSide: state => state.popupSide,\n scrollUpArrowVisible: state => state.scrollUpArrowVisible,\n scrollDownArrowVisible: state => state.scrollDownArrowVisible,\n hasScrollArrows: state => state.hasScrollArrows\n};","'use client';\n\nimport * as React from 'react';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';\nimport { usePreviousValue } from '@base-ui/utils/usePreviousValue';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStore, ReactStore } from '@base-ui/utils/store';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useClick, useDismiss, useFloatingRootContext, useListNavigation, useTypeahead } from \"../../floating-ui-react/index.mjs\";\nimport { SelectRootContext } from \"./SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { stringifyAsLabel, stringifyAsValue } from \"../../internals/resolveValueLabel.mjs\";\nimport { compareItemEquality, defaultItemEquality, findItemIndex } from \"../../internals/itemEquality.mjs\";\nimport { areArraysEqual } from \"../../internals/areArraysEqual.mjs\";\nimport { useValueChanged } from \"../../internals/useValueChanged.mjs\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.mjs\";\nimport { getMaxScrollOffset, normalizeScrollOffset } from \"../../utils/scrollEdges.mjs\";\nimport { FOCUSABLE_POPUP_PROPS } from \"../../utils/popups/index.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\n\n/**\n * Groups all parts of the select.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function SelectRoot(props) {\n const {\n id,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n name: nameProp,\n form,\n autoComplete,\n disabled: disabledProp = false,\n readOnly = false,\n required = false,\n modal = true,\n actionsRef,\n inputRef,\n onOpenChangeComplete,\n items,\n multiple = false,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue = defaultItemEquality,\n highlightItemOnHover = true,\n children\n } = props;\n const {\n clearErrors\n } = useFormContext();\n const {\n setDirty,\n setTouched,\n setFocused,\n validityData,\n setFilled,\n name: fieldName,\n disabled: fieldDisabled,\n validation,\n validationMode\n } = useFieldRootContext();\n const generatedId = useLabelableId({\n id\n });\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const [value, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: multiple ? defaultValue ?? EMPTY_ARRAY : defaultValue,\n name: 'Select',\n state: 'value'\n });\n const [open, setOpenUnwrapped] = useControlled({\n controlled: openProp,\n default: defaultOpen,\n name: 'Select',\n state: 'open'\n });\n const listRef = React.useRef([]);\n const labelsRef = React.useRef([]);\n const popupRef = React.useRef(null);\n const scrollHandlerRef = React.useRef(null);\n const scrollArrowsMountedCountRef = React.useRef(0);\n const valueRef = React.useRef(null);\n const valuesRef = React.useRef([]);\n const typingRef = React.useRef(false);\n const firstItemTextRef = React.useRef(null);\n const selectedItemTextRef = React.useRef(null);\n const selectionRef = React.useRef({\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n });\n const alignItemWithTriggerActiveRef = React.useRef(false);\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n const {\n openMethod,\n triggerProps: interactionTypeProps\n } = useOpenInteractionType(open);\n const store = useRefWithInit(() => new ReactStore({\n id: generatedId,\n labelId: undefined,\n modal,\n multiple,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n value,\n open,\n mounted,\n transitionStatus,\n items,\n forceMount: false,\n openMethod: null,\n activeIndex: null,\n selectedIndex: null,\n popupProps: {},\n triggerProps: {},\n triggerElement: null,\n positionerElement: null,\n listElement: null,\n popupSide: null,\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false,\n hasScrollArrows: false\n })).current;\n const activeIndex = useStore(store, selectors.activeIndex);\n const selectedIndex = useStore(store, selectors.selectedIndex);\n const triggerElement = useStore(store, selectors.triggerElement);\n const positionerElement = useStore(store, selectors.positionerElement);\n const previousOpenMethod = usePreviousValue(openMethod);\n const renderedOpenMethod = openMethod ?? previousOpenMethod;\n const serializedValue = React.useMemo(() => {\n // In multiple mode the shared input is nameless; per-value entries are submitted via\n // `hiddenInputs`. Its value is therefore irrelevant, and passing the whole array to\n // `stringifyAsValue` would invoke a user `itemToStringValue` with an array it doesn't expect.\n if (multiple) {\n return '';\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const fieldStringValue = React.useMemo(() => {\n if (multiple && Array.isArray(value)) {\n return value.map(currentValue => stringifyAsValue(currentValue, itemToStringValue));\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const controlRef = useValueAsRef(triggerElement);\n const getStringifiedValueForForm = useStableCallback(() => fieldStringValue);\n useRegisterFieldControl(controlRef, generatedId, value, getStringifiedValueForForm, !disabled, nameProp);\n const initialValueRef = React.useRef(value);\n // Mirror the `hasSelectedValue` store selector so the Field's filled state agrees with the\n // trigger/value placeholder semantics (a value serializing to `''` counts as empty).\n const hasSelectedValue = multiple ? Array.isArray(value) && value.length > 0 : value != null && serializedValue !== '';\n useIsoLayoutEffect(() => {\n setFilled(hasSelectedValue);\n }, [hasSelectedValue, setFilled]);\n useIsoLayoutEffect(function syncSelectedIndex() {\n let target = value;\n let empty = false;\n if (multiple) {\n const currentValue = Array.isArray(value) ? value : [];\n empty = currentValue.length === 0;\n target = currentValue[currentValue.length - 1];\n }\n const index = empty ? -1 : findItemIndex(valuesRef.current, target, isItemEqualToValue);\n const nextIndex = index === -1 ? null : index;\n if (nextIndex === null) {\n selectedItemTextRef.current = null;\n }\n if (open) {\n return;\n }\n store.set('selectedIndex', nextIndex);\n }, [multiple, open, value, isItemEqualToValue, store]);\n function isSelectedValueDirty(currentValue) {\n const initialValue = validityData.initialValue;\n if (Array.isArray(currentValue) && Array.isArray(initialValue)) {\n return !areArraysEqual(currentValue, initialValue, (itemValue, initialItemValue) => compareItemEquality(itemValue, initialItemValue, isItemEqualToValue));\n }\n return currentValue !== initialValue;\n }\n useValueChanged(value, () => {\n clearErrors(name);\n setDirty(isSelectedValueDirty(value));\n validation.change(value);\n });\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setOpenUnwrapped(nextOpen);\n if (!nextOpen && (eventDetails.reason === REASONS.focusOut || eventDetails.reason === REASONS.outsidePress)) {\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n }\n });\n const handleUnmount = useStableCallback(() => {\n setMounted(false);\n store.update({\n activeIndex: null,\n openMethod: null,\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false\n });\n onOpenChangeComplete?.(false);\n });\n useOpenChangeComplete({\n enabled: !actionsRef,\n open,\n ref: popupRef,\n onComplete() {\n if (!open) {\n handleUnmount();\n }\n }\n });\n React.useImperativeHandle(actionsRef, () => ({\n unmount: handleUnmount\n }), [handleUnmount]);\n const setValue = useStableCallback((nextValue, eventDetails) => {\n onValueChange?.(nextValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueUnwrapped(nextValue);\n });\n const handleScrollArrowVisibility = useStableCallback(scroller => {\n const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);\n const shouldShowUp = scrollTop > 0;\n const shouldShowDown = scrollTop < maxScrollTop;\n store.set('scrollUpArrowVisible', shouldShowUp);\n store.set('scrollDownArrowVisible', shouldShowDown);\n });\n const floatingContext = useFloatingRootContext({\n open,\n onOpenChange: setOpen,\n elements: {\n reference: triggerElement,\n floating: positionerElement\n }\n });\n const click = useClick(floatingContext, {\n enabled: !readOnly && !disabled,\n event: 'mousedown'\n });\n const dismiss = useDismiss(floatingContext);\n const listNavigation = useListNavigation(floatingContext, {\n enabled: !readOnly && !disabled,\n listRef,\n activeIndex,\n selectedIndex,\n disabledIndices: EMPTY_ARRAY,\n onNavigate(nextActiveIndex) {\n // Retain the highlight while transitioning out.\n if (nextActiveIndex === null && !open) {\n return;\n }\n store.set('activeIndex', nextActiveIndex);\n },\n focusItemOnHover: highlightItemOnHover\n });\n const typeahead = useTypeahead(floatingContext, {\n enabled: !readOnly && !disabled && (open || !multiple),\n listRef: labelsRef,\n activeIndex,\n selectedIndex,\n // Skip disabled items while matching so typeahead advances to the next selectable item\n // (a click can never select a disabled item and native `<select>` skips them too). Resolve\n // the disabled state from the element via the attribute-only `isElementDisabled` so the\n // hidden, force-mounted items used for closed-trigger typeahead aren't dropped by the\n // `elementsRef`/visibility filter that `disabledIndices` deliberately sidesteps.\n disabledIndices: index => isElementDisabled(listRef.current[index]),\n onMatch(index) {\n if (open) {\n store.set('activeIndex', index);\n } else {\n setValue(valuesRef.current[index], createChangeEventDetails(REASONS.none));\n }\n },\n onTyping(typing) {\n typingRef.current = typing;\n }\n });\n\n // `Select.Trigger` applies the id itself from the store, so it's deliberately not merged here.\n const mergedTriggerProps = React.useMemo(() => mergeProps(typeahead.reference, listNavigation.reference, dismiss.reference, click.reference, interactionTypeProps), [click.reference, typeahead.reference, listNavigation.reference, dismiss.reference, interactionTypeProps]);\n const popupProps = React.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, typeahead.floating, listNavigation.floating, dismiss.floating), [typeahead.floating, listNavigation.floating, dismiss.floating]);\n const itemProps = listNavigation.item ?? EMPTY_OBJECT;\n useOnFirstRender(() => {\n store.update({\n popupProps,\n triggerProps: mergedTriggerProps\n });\n });\n store.useSyncedValues({\n id: generatedId,\n modal,\n multiple,\n value,\n open,\n mounted,\n transitionStatus,\n popupProps,\n triggerProps: mergedTriggerProps,\n items,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n openMethod: renderedOpenMethod\n });\n const contextValue = React.useMemo(() => ({\n store,\n floatingContext,\n required,\n disabled,\n readOnly,\n multiple,\n highlightItemOnHover,\n setValue,\n setOpen,\n listRef,\n popupRef,\n scrollHandlerRef,\n handleScrollArrowVisibility,\n scrollArrowsMountedCountRef,\n itemProps,\n valueRef,\n valuesRef,\n labelsRef,\n typingRef,\n selectionRef,\n firstItemTextRef,\n selectedItemTextRef,\n validation,\n onOpenChangeComplete,\n alignItemWithTriggerActiveRef,\n initialValueRef\n }), [store, floatingContext, required, disabled, readOnly, multiple, highlightItemOnHover, setValue, setOpen, itemProps, validation, onOpenChangeComplete, handleScrollArrowVisibility]);\n const ref = useMergedRefs(inputRef, validation.inputRef);\n const hiddenInputName = multiple ? undefined : name;\n const hiddenInputs = React.useMemo(() => {\n if (!multiple || !Array.isArray(value) || !name) {\n return null;\n }\n return value.map(v => {\n const currentSerializedValue = stringifyAsValue(v, itemToStringValue);\n return /*#__PURE__*/_jsx(\"input\", {\n type: \"hidden\",\n form: form,\n name: name,\n value: currentSerializedValue,\n disabled: disabled\n }, currentSerializedValue);\n });\n }, [multiple, value, form, name, itemToStringValue, disabled]);\n return /*#__PURE__*/_jsxs(SelectRootContext.Provider, {\n value: contextValue,\n children: [children, /*#__PURE__*/_jsx(\"input\", {\n ...validation.getValidationProps(disabled, {\n onFocus() {\n // Move focus to the trigger element when the hidden input is focused.\n store.state.triggerElement?.focus({\n // Supported in Chrome from 144 (January 2026)\n focusVisible: true\n });\n },\n // Handle browser autofill.\n onChange(event) {\n // Workaround for https://github.com/react/react/issues/9023\n if (event.nativeEvent.defaultPrevented || disabled || readOnly) {\n return;\n }\n const nextValue = event.currentTarget.value;\n const details = createChangeEventDetails(REASONS.none, event.nativeEvent);\n function handleChange() {\n if (multiple) {\n // Browser autofill only writes a single scalar value.\n return;\n }\n\n // Preserve the original serialized matching, then fall back to rendered text,\n // which browsers can autofill for primitive values like `value=\"US\">United States`.\n const nextValueLower = nextValue.toLowerCase();\n let matchingIndex = valuesRef.current.findIndex(candidate => stringifyAsValue(candidate, itemToStringValue).toLowerCase() === nextValueLower || stringifyAsLabel(candidate, itemToStringLabel).toLowerCase() === nextValueLower);\n if (matchingIndex === -1) {\n matchingIndex = valuesRef.current.findIndex((_, index) => {\n const renderedLabel = labelsRef.current[index];\n return renderedLabel != null && renderedLabel.toLowerCase() === nextValueLower;\n });\n }\n const matchingValue = valuesRef.current[matchingIndex];\n if (matchingValue != null) {\n // `setValue` may be canceled by `onValueChange`; rely on `useValueChanged` to\n // mark the field dirty and run validation only when the value actually changes.\n setValue(matchingValue, details);\n }\n }\n store.set('forceMount', true);\n queueMicrotask(handleChange);\n }\n }),\n id: generatedId && hiddenInputName == null ? `${generatedId}-hidden-input` : undefined,\n form: form,\n name: hiddenInputName,\n autoComplete: autoComplete,\n value: serializedValue,\n disabled: disabled,\n required: required && !(multiple && hasSelectedValue),\n readOnly: readOnly,\n ref: ref,\n style: name ? visuallyHiddenInput : visuallyHidden,\n tabIndex: -1,\n \"aria-hidden\": true,\n suppressHydrationWarning: true\n }), hiddenInputs]\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { isMouseWithinBounds } from \"../../utils/getPseudoElementBounds.mjs\";\nimport { contains, getFloatingFocusElement } from \"../../floating-ui-react/utils.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { resolveAriaLabelledBy } from \"../../utils/resolveAriaLabelledBy.mjs\";\nconst SELECTED_DELAY = 400;\nconst stateAttributesMapping = {\n ...pressableTriggerOpenStateMapping,\n ...fieldValidityMapping,\n popupSide: side => side ? {\n 'data-popup-side': side\n } : null,\n value: () => null\n};\n\n/**\n * A button that opens the select popup.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectTrigger = /*#__PURE__*/React.forwardRef(function SelectTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n disabled: disabledProp = false,\n nativeButton = true,\n style,\n ...elementProps\n } = componentProps;\n const {\n setTouched,\n setFocused,\n validationMode,\n state: fieldState,\n disabled: fieldDisabled\n } = useFieldRootContext();\n const {\n labelId: fieldLabelId\n } = useLabelableContext();\n const {\n store,\n setOpen,\n selectionRef,\n validation,\n readOnly,\n required,\n alignItemWithTriggerActiveRef,\n disabled: selectDisabled\n } = useSelectRootContext();\n const disabled = fieldDisabled || selectDisabled || disabledProp;\n const open = useStore(store, selectors.open);\n const mounted = useStore(store, selectors.mounted);\n const value = useStore(store, selectors.value);\n const triggerProps = useStore(store, selectors.triggerProps);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const popupSideValue = useStore(store, selectors.popupSide);\n const rootId = useStore(store, selectors.id);\n const selectLabelId = useStore(store, selectors.labelId);\n const hasSelectedValue = useStore(store, selectors.hasSelectedValue);\n const popupSide = mounted && positionerElement ? popupSideValue : null;\n const id = idProp ?? rootId;\n const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, selectLabelId);\n useLabelableId({\n id\n });\n const positionerRef = useValueAsRef(positionerElement);\n const triggerRef = React.useRef(null);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const setTriggerElement = store.useStateSetter('triggerElement');\n const timeoutFocus = useTimeout();\n const timeoutMouseDown = useTimeout();\n const selectedDelayTimeout = useTimeout();\n React.useEffect(() => {\n if (open) {\n // A mousedown on the trigger can open the popup under the cursor. Keep mouseup selection\n // disabled briefly so releasing over either the selected item or a neighboring item doesn't\n // commit an accidental selection. SelectItem can still opt into unselected mouseup sooner\n // after a real drag over the item.\n selectedDelayTimeout.start(SELECTED_DELAY, () => {\n selectionRef.current.allowUnselectedMouseUp = true;\n selectionRef.current.allowSelectedMouseUp = true;\n });\n return () => {\n selectedDelayTimeout.clear();\n };\n }\n selectionRef.current = {\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n };\n timeoutMouseDown.clear();\n return undefined;\n }, [open, selectionRef, timeoutMouseDown, selectedDelayTimeout]);\n const mergedProps = mergeProps(triggerProps, {\n id,\n role: 'combobox',\n 'aria-expanded': open,\n 'aria-haspopup': 'listbox',\n 'aria-controls': open ? listElement?.id ?? getFloatingFocusElement(positionerElement)?.id : undefined,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-readonly': readOnly || undefined,\n 'aria-required': required || undefined,\n tabIndex: disabled ? -1 : 0,\n onFocus(event) {\n setFocused(true);\n\n // The popup element shouldn't obscure the focused trigger.\n if (open && alignItemWithTriggerActiveRef.current) {\n setOpen(false, createChangeEventDetails(REASONS.none, event.nativeEvent));\n }\n\n // Saves a re-render on initial click: `forceMount === true` mounts\n // the items before `open === true`. We could sync those cycles better\n // without a timeout, but this is enough for now.\n timeoutFocus.start(0, () => {\n store.set('forceMount', true);\n });\n },\n onBlur(event) {\n // If focus is moving into the popup, don't count it as a blur.\n if (contains(positionerElement, event.relatedTarget)) {\n return;\n }\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n },\n onMouseDown(event) {\n if (open) {\n return;\n }\n const doc = ownerDocument(event.currentTarget);\n function handleMouseUp(mouseEvent) {\n if (!triggerRef.current) {\n return;\n }\n const mouseUpTarget = mouseEvent.target;\n\n // Don't treat the release as an outside press when it lands on the trigger or inside\n // the popup positioner (or their children).\n if (contains(triggerRef.current, mouseUpTarget) || contains(positionerRef.current, mouseUpTarget)) {\n return;\n }\n if (isMouseWithinBounds(mouseEvent, triggerRef.current)) {\n return;\n }\n setOpen(false, createChangeEventDetails(REASONS.cancelOpen, mouseEvent));\n }\n\n // Firefox can fire this upon mousedown\n timeoutMouseDown.start(0, () => {\n doc.addEventListener('mouseup', handleMouseUp, {\n once: true\n });\n });\n }\n }, elementProps, getButtonProps);\n const props = validation.getValidationProps(disabled, mergedProps);\n\n // ensure nested useButton does not overwrite the combobox role:\n // <Toolbar.Button render={<Select.Trigger />} />\n props.role = 'combobox';\n const state = {\n ...fieldState,\n open,\n disabled,\n value,\n readOnly,\n popupSide,\n placeholder: !hasSelectedValue\n };\n return useRenderElement('button', componentProps, {\n ref: [forwardedRef, triggerRef, buttonRef, setTriggerElement],\n state,\n stateAttributesMapping,\n props\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectTrigger.displayName = \"SelectTrigger\";","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { resolveMultipleLabels, resolveSelectedLabel } from \"../../internals/resolveValueLabel.mjs\";\nimport { selectors } from \"../store.mjs\";\nconst stateAttributesMapping = {\n value: () => null\n};\n\n/**\n * A text label of the currently selected item.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectValue = /*#__PURE__*/React.forwardRef(function SelectValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children: childrenProp,\n placeholder,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n valueRef\n } = useSelectRootContext();\n const value = useStore(store, selectors.value);\n const items = useStore(store, selectors.items);\n const itemToStringLabel = useStore(store, selectors.itemToStringLabel);\n const hasSelectedValue = useStore(store, selectors.hasSelectedValue);\n const shouldCheckNullItemLabel = !hasSelectedValue && placeholder != null && childrenProp == null;\n const hasNullLabel = useStore(store, selectors.hasNullItemLabel, shouldCheckNullItemLabel);\n const state = {\n value,\n placeholder: !hasSelectedValue\n };\n let children = null;\n if (typeof childrenProp === 'function') {\n children = childrenProp(value);\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (shouldCheckNullItemLabel && !hasNullLabel) {\n children = placeholder;\n } else if (Array.isArray(value)) {\n children = resolveMultipleLabels(value, items, itemToStringLabel);\n } else {\n children = resolveSelectedLabel(value, items, itemToStringLabel);\n }\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, valueRef],\n props: [{\n children\n }, elementProps],\n stateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectValue.displayName = \"SelectValue\";","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * An icon that indicates that the trigger button opens a select popup.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectIcon = /*#__PURE__*/React.forwardRef(function SelectIcon(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useSelectRootContext();\n const open = useStore(store, selectors.open);\n const state = {\n open\n };\n const element = useRenderElement('span', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n 'aria-hidden': true,\n children: '▼'\n }, elementProps],\n stateAttributesMapping: triggerOpenStateMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectIcon.displayName = \"SelectIcon\";","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectPortal = /*#__PURE__*/React.forwardRef(function SelectPortal(portalProps, forwardedRef) {\n const {\n store\n } = useSelectRootContext();\n const mounted = useStore(store, selectors.mounted);\n const forceMount = useStore(store, selectors.forceMount);\n const shouldRender = mounted || forceMount;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPortal.displayName = \"SelectPortal\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectPositionerContext.displayName = \"SelectPositionerContext\";\nexport function useSelectPositionerContext() {\n const context = React.useContext(SelectPositionerContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.' : _formatErrorMessage(59));\n }\n return context;\n}","export function clearStyles(element, originalStyles) {\n if (element) {\n Object.assign(element.style, originalStyles);\n }\n}\nexport const LIST_FUNCTIONAL_STYLES = {\n position: 'relative',\n maxHeight: '100%',\n overflowX: 'hidden',\n overflowY: 'auto'\n};","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { useAnchorPositioning } from \"../../internals/useAnchorPositioning.mjs\";\nimport { SelectPositionerContext } from \"./SelectPositionerContext.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\nimport { DROPDOWN_COLLISION_AVOIDANCE } from \"../../internals/constants.mjs\";\nimport { clearStyles } from \"../popup/utils.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { findItemIndex } from \"../../internals/itemEquality.mjs\";\nimport { usePositioner } from \"../../utils/usePositioner.mjs\";\nimport { useAnchoredPopupScrollLock } from \"../../utils/useAnchoredPopupScrollLock.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst FIXED = {\n position: 'fixed'\n};\n\n/**\n * Positions the select popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPositioner = /*#__PURE__*/React.forwardRef(function SelectPositioner(componentProps, forwardedRef) {\n const {\n anchor,\n className,\n render,\n // `useAnchorPositioning` applies the same defaults to the undefined values; the names\n // remain destructured to exclude the props from `elementProps`.\n positionMethod,\n side,\n align,\n sideOffset,\n alignOffset,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding,\n arrowPadding,\n sticky,\n disableAnchorTracking,\n alignItemWithTrigger = true,\n collisionAvoidance = DROPDOWN_COLLISION_AVOIDANCE,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n listRef,\n labelsRef,\n alignItemWithTriggerActiveRef,\n selectedItemTextRef,\n valuesRef,\n initialValueRef,\n popupRef,\n setValue,\n floatingContext: floatingRootContext\n } = useSelectRootContext();\n const open = useStore(store, selectors.open);\n const mounted = useStore(store, selectors.mounted);\n const modal = useStore(store, selectors.modal);\n const value = useStore(store, selectors.value);\n const openMethod = useStore(store, selectors.openMethod);\n const positionerElement = useStore(store, selectors.positionerElement);\n const triggerElement = useStore(store, selectors.triggerElement);\n const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);\n const transitionStatus = useStore(store, selectors.transitionStatus);\n const scrollUpArrowRef = React.useRef(null);\n const scrollDownArrowRef = React.useRef(null);\n const [controlledAlignItemWithTrigger, setControlledAlignItemWithTrigger] = React.useState(alignItemWithTrigger);\n const alignItemWithTriggerActive = mounted && controlledAlignItemWithTrigger && openMethod !== 'touch';\n if (!mounted && controlledAlignItemWithTrigger !== alignItemWithTrigger) {\n setControlledAlignItemWithTrigger(alignItemWithTrigger);\n }\n React.useImperativeHandle(alignItemWithTriggerActiveRef, () => alignItemWithTriggerActive);\n useAnchoredPopupScrollLock((alignItemWithTriggerActive || modal) && open, openMethod === 'touch', positionerElement, triggerElement);\n const positioning = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod,\n mounted,\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n disableAnchorTracking: disableAnchorTracking ?? alignItemWithTriggerActive,\n collisionAvoidance,\n keepMounted: true\n });\n const renderedSide = alignItemWithTriggerActive ? 'none' : positioning.side;\n const positionerStyles = alignItemWithTriggerActive ? FIXED : positioning.positionerStyles;\n const state = {\n open,\n side: renderedSide,\n align: positioning.align,\n anchorHidden: positioning.anchorHidden\n };\n useIsoLayoutEffect(() => {\n store.set('popupSide', positioning.side);\n }, [store, positioning.side]);\n const setPositionerElement = store.useStateSetter('positionerElement');\n const element = usePositioner(componentProps, state, {\n styles: positionerStyles,\n transitionStatus,\n props: elementProps,\n refs: [forwardedRef, setPositionerElement],\n hidden: !mounted,\n inert: !open\n });\n const prevMapSizeRef = React.useRef(0);\n const onMapChange = useStableCallback(map => {\n if (valuesRef.current.length === 0) {\n return;\n }\n const prevSize = prevMapSizeRef.current;\n prevMapSizeRef.current = map.size;\n if (map.size === prevSize) {\n return;\n }\n const eventDetails = createChangeEventDetails(REASONS.none);\n if (prevSize !== 0 && !store.state.multiple && value !== null) {\n const selectedValueIndex = findItemIndex(valuesRef.current, value, isItemEqualToValue);\n if (selectedValueIndex === -1) {\n const initialSelectedValue = initialValueRef.current;\n const hasInitial = initialSelectedValue != null && findItemIndex(valuesRef.current, initialSelectedValue, isItemEqualToValue) !== -1;\n const nextValue = hasInitial ? initialSelectedValue : null;\n setValue(nextValue, eventDetails);\n if (nextValue === null) {\n store.set('selectedIndex', null);\n selectedItemTextRef.current = null;\n }\n }\n }\n if (prevSize !== 0 && store.state.multiple && Array.isArray(value)) {\n const nextValue = value.filter(selectedItemValue => findItemIndex(valuesRef.current, selectedItemValue, isItemEqualToValue) !== -1);\n if (nextValue.length !== value.length) {\n setValue(nextValue, eventDetails);\n if (nextValue.length === 0) {\n store.set('selectedIndex', null);\n selectedItemTextRef.current = null;\n }\n }\n }\n if (open && alignItemWithTriggerActive) {\n store.update({\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false\n });\n const stylesToClear = {\n height: ''\n };\n clearStyles(positionerElement, stylesToClear);\n clearStyles(popupRef.current, stylesToClear);\n }\n });\n const contextValue = React.useMemo(() => ({\n ...positioning,\n side: renderedSide,\n alignItemWithTriggerActive,\n setControlledAlignItemWithTrigger,\n scrollUpArrowRef,\n scrollDownArrowRef\n }), [positioning, renderedSide, alignItemWithTriggerActive, setControlledAlignItemWithTrigger]);\n return /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: listRef,\n labelsRef: labelsRef,\n onMapChange: onMapChange,\n children: /*#__PURE__*/_jsxs(SelectPositionerContext.Provider, {\n value: contextValue,\n children: [mounted && modal && /*#__PURE__*/_jsx(InternalBackdrop, {\n inert: inertValue(!open),\n cutout: triggerElement\n }), element]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPositioner.displayName = \"SelectPositioner\";","'use client';\n\nimport * as React from 'react';\nimport { rectToClientRect } from '@floating-ui/utils';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { platform } from '@base-ui/utils/platform';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { FloatingFocusManager, platform as floatingPlatform } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { clearStyles, LIST_FUNCTIONAL_STYLES } from \"./utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../internals/getDisabledMountTransitionStyles.mjs\";\nimport { clamp } from \"../../internals/clamp.mjs\";\nimport { getMaxScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from \"../../utils/scrollEdges.mjs\";\nimport { useCSPContext } from \"../../internals/csp-context/CSPContext.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping\n};\n\n/**\n * A container for the select list.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPopup = /*#__PURE__*/React.forwardRef(function SelectPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n ...elementProps\n } = componentProps;\n const {\n store,\n popupRef,\n onOpenChangeComplete,\n setOpen,\n valueRef,\n firstItemTextRef,\n selectedItemTextRef,\n multiple,\n handleScrollArrowVisibility,\n scrollHandlerRef,\n listRef,\n highlightItemOnHover,\n floatingContext: floatingRootContext\n } = useSelectRootContext();\n const {\n side,\n align,\n alignItemWithTriggerActive,\n isPositioned,\n setControlledAlignItemWithTrigger\n } = useSelectPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const direction = useDirection();\n const {\n nonce,\n disableStyleElements\n } = useCSPContext();\n const id = useStore(store, selectors.id);\n const open = useStore(store, selectors.open);\n const openMethod = useStore(store, selectors.openMethod);\n const mounted = useStore(store, selectors.mounted);\n const popupProps = useStore(store, selectors.popupProps);\n const transitionStatus = useStore(store, selectors.transitionStatus);\n const triggerElement = useStore(store, selectors.triggerElement);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const reachedMaxHeightRef = React.useRef(false);\n const initialPlacedRef = React.useRef(false);\n const originalPositionerStylesRef = React.useRef({});\n const scrollArrowFrame = useAnimationFrame();\n const handleScroll = useStableCallback(scroller => {\n if (!positionerElement || !popupRef.current || !initialPlacedRef.current) {\n return;\n }\n const isTopPositioned = positionerElement.style.top === '0px';\n const isBottomPositioned = positionerElement.style.bottom === '0px';\n if (reachedMaxHeightRef.current || !alignItemWithTriggerActive || !isTopPositioned && !isBottomPositioned) {\n handleScrollArrowVisibility(scroller);\n return;\n }\n const scale = getScale(positionerElement);\n const currentHeight = normalizeSize(positionerElement.getBoundingClientRect().height, 'y', scale);\n const doc = ownerDocument(positionerElement);\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const marginTop = parseFloat(positionerStyles.marginTop);\n const marginBottom = parseFloat(positionerStyles.marginBottom);\n const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(popupRef.current));\n const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight);\n const scrollTop = scroller.scrollTop;\n const maxScrollTop = getMaxScrollTop(scroller);\n\n // `Infinity` requests a scroll to the recomputed maximum offset.\n let nextScrollTop = null;\n const setHeight = height => {\n positionerElement.style.height = `${height}px`;\n };\n const diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop;\n const nextHeight = Math.min(currentHeight + diff, maxAvailableHeight);\n if (diff <= SCROLL_EDGE_TOLERANCE_PX) {\n const heightDelta = clamp(diff, 0, maxAvailableHeight - currentHeight);\n if (heightDelta > 0) {\n // Consume the remaining scroll in height.\n setHeight(currentHeight + heightDelta);\n }\n scroller.scrollTop = isTopPositioned ? maxScrollTop : 0;\n if (maxAvailableHeight - (currentHeight + heightDelta) <= SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility(scroller);\n return;\n }\n if (maxAvailableHeight - nextHeight > SCROLL_EDGE_TOLERANCE_PX) {\n nextScrollTop = isTopPositioned ? Infinity : 0;\n } else if (isBottomPositioned && scrollTop < maxScrollTop) {\n const overshoot = currentHeight + diff - maxAvailableHeight;\n nextScrollTop = scrollTop - (diff - overshoot);\n }\n const nextPositionerHeight = Math.ceil(nextHeight);\n if (nextPositionerHeight !== 0) {\n setHeight(nextPositionerHeight);\n }\n if (nextScrollTop != null) {\n // Recompute bounds after resizing (clientHeight likely changed).\n const target = clamp(nextScrollTop, 0, getMaxScrollTop(scroller));\n\n // Avoid adjustments that re-trigger scroll events forever.\n if (Math.abs(scroller.scrollTop - target) > SCROLL_EDGE_TOLERANCE_PX) {\n scroller.scrollTop = target;\n }\n }\n if (nextPositionerHeight >= maxAvailableHeight - SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility(scroller);\n });\n React.useImperativeHandle(scrollHandlerRef, () => handleScroll, [handleScroll]);\n useOpenChangeComplete({\n open,\n ref: popupRef,\n onComplete() {\n if (open) {\n onOpenChangeComplete?.(true);\n }\n }\n });\n const state = {\n open,\n transitionStatus,\n side,\n align\n };\n useIsoLayoutEffect(() => {\n if (!positionerElement || !popupRef.current || Object.keys(originalPositionerStylesRef.current).length) {\n return;\n }\n originalPositionerStylesRef.current = {\n top: positionerElement.style.top || '0',\n left: positionerElement.style.left || '0',\n right: positionerElement.style.right,\n height: positionerElement.style.height,\n bottom: positionerElement.style.bottom,\n minHeight: positionerElement.style.minHeight,\n maxHeight: positionerElement.style.maxHeight,\n marginTop: positionerElement.style.marginTop,\n marginBottom: positionerElement.style.marginBottom\n };\n }, [popupRef, positionerElement]);\n useIsoLayoutEffect(() => {\n if (open || alignItemWithTriggerActive) {\n return;\n }\n initialPlacedRef.current = false;\n reachedMaxHeightRef.current = false;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n }, [open, alignItemWithTriggerActive, positionerElement, popupRef]);\n useIsoLayoutEffect(() => {\n const popupElement = popupRef.current;\n\n // Wait for Floating UI's first positioning pass before reading DOM geometry.\n // We replace the final coordinates for aligned selects, but still need middleware\n // like `size()` to set CSS variables such as `--anchor-width`.\n if (!open || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === 'ending') {\n return;\n }\n initialPlacedRef.current = true;\n popupElement.style.removeProperty('--transform-origin');\n if (!alignItemWithTriggerActive) {\n // The wrapper supplies the scroller: the list owns scrolling once it has mounted, and\n // this effect re-runs (cancelling the stale frame) when that happens.\n scrollArrowFrame.request(() => handleScrollArrowVisibility(listElement || popupElement));\n return;\n }\n\n // Ensure we remove any transforms that can affect the location of the popup\n // and therefore the calculations.\n const restoreTransformStyles = unsetTransformStyles(popupElement);\n try {\n let textElement = selectedItemTextRef.current;\n if (!textElement?.isConnected) {\n const hasSelectedValue = selectors.hasSelectedValue(store.state);\n textElement = !hasSelectedValue && firstItemTextRef.current?.isConnected ? firstItemTextRef.current : null;\n }\n const valueElement = valueRef.current;\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const popupStyles = win.getComputedStyle(popupElement);\n const doc = ownerDocument(triggerElement);\n const scale = getScale(triggerElement);\n const triggerRect = normalizeRect(triggerElement.getBoundingClientRect(), scale);\n const positionerRect = normalizeRect(positionerElement.getBoundingClientRect(), scale);\n const triggerHeight = triggerRect.height;\n const scroller = listElement || popupElement;\n const scrollHeight = scroller.scrollHeight;\n const borderBottom = parseFloat(popupStyles.borderBottomWidth);\n // The `|| N` fallbacks cover an unset/`auto` value (parses to `NaN`). Note a literal `0`\n // also resolves to the fallback, so an explicit `margin: 0` or `min-height: 0` still takes\n // the default below.\n const marginTop = parseFloat(positionerStyles.marginTop) || 10;\n const marginBottom = parseFloat(positionerStyles.marginBottom) || 10;\n const minHeight = parseFloat(positionerStyles.minHeight) || 100;\n const maxPopupHeight = getMaxPopupHeight(popupStyles);\n const paddingLeft = 5;\n const paddingRight = 5;\n const triggerCollisionThreshold = 20;\n const viewportHeight = doc.documentElement.clientHeight - marginTop - marginBottom;\n const viewportWidth = doc.documentElement.clientWidth;\n const availableSpaceBeneathTrigger = viewportHeight - triggerRect.bottom + triggerHeight;\n let textRect;\n let alignedLeft = direction === 'rtl' ? triggerRect.right - positionerRect.width : triggerRect.left;\n let offsetY = 0;\n if (textElement && valueElement) {\n const valueRect = normalizeRect(valueElement.getBoundingClientRect(), scale);\n textRect = normalizeRect(textElement.getBoundingClientRect(), scale);\n alignedLeft = positionerRect.left + (direction === 'rtl' ? valueRect.right - textRect.right : valueRect.left - textRect.left);\n const valueCenterFromTriggerTop = valueRect.top - triggerRect.top + valueRect.height / 2;\n const textCenterFromPositionerTop = textRect.top - positionerRect.top + textRect.height / 2;\n offsetY = textCenterFromPositionerTop - valueCenterFromTriggerTop;\n }\n const idealHeight = availableSpaceBeneathTrigger + offsetY + marginBottom + borderBottom;\n let height = Math.min(viewportHeight, idealHeight);\n const maxHeight = viewportHeight - marginTop - marginBottom;\n const scrollTop = idealHeight - height;\n const maxRight = viewportWidth - paddingRight;\n positionerElement.style.left = `${clamp(alignedLeft, paddingLeft, maxRight - positionerRect.width)}px`;\n positionerElement.style.height = `${height}px`;\n // `none` (not the invalid `auto`) so the explicit height governs in align mode and isn't\n // clamped by a `max-height` from user CSS.\n positionerElement.style.maxHeight = 'none';\n positionerElement.style.marginTop = `${marginTop}px`;\n positionerElement.style.marginBottom = `${marginBottom}px`;\n popupElement.style.height = '100%';\n const maxScrollTop = getMaxScrollTop(scroller);\n const isTopPositioned = scrollTop >= maxScrollTop - SCROLL_EDGE_TOLERANCE_PX;\n if (isTopPositioned) {\n height = Math.min(viewportHeight, positionerRect.height) - (scrollTop - maxScrollTop);\n }\n\n // When the trigger is too close to the top or bottom of the viewport, or the minHeight is\n // reached, we fallback to aligning the popup to the trigger as the UX is poor otherwise.\n const fallbackToAlignPopupToTrigger = triggerRect.top < triggerCollisionThreshold || triggerRect.bottom > viewportHeight - triggerCollisionThreshold || Math.ceil(height) + SCROLL_EDGE_TOLERANCE_PX < Math.min(scrollHeight, minHeight);\n\n // Safari doesn't position the popup correctly when pinch-zoomed.\n const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && platform.engine.webkit;\n if (fallbackToAlignPopupToTrigger || isPinchZoomed) {\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n setControlledAlignItemWithTrigger(false);\n return;\n }\n const initialHeight = Math.max(minHeight, height);\n if (isTopPositioned) {\n const topOffset = Math.max(0, viewportHeight - idealHeight);\n positionerElement.style.top = positionerRect.height >= maxHeight ? '0' : `${topOffset}px`;\n positionerElement.style.height = `${height}px`;\n scroller.scrollTop = getMaxScrollTop(scroller);\n } else {\n positionerElement.style.bottom = '0';\n scroller.scrollTop = scrollTop;\n }\n if (textRect) {\n const popupTop = positionerRect.top;\n const popupHeight = positionerRect.height;\n const textCenterY = textRect.top + textRect.height / 2;\n const clampedY = clamp(popupHeight > 0 ? (textCenterY - popupTop) / popupHeight * 100 : 50, 0, 100);\n popupElement.style.setProperty('--transform-origin', `50% ${clampedY}%`);\n }\n if (initialHeight === viewportHeight || height >= maxPopupHeight) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility(scroller);\n if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && listRef.current[0] != null) {\n store.set('activeIndex', 0);\n }\n } finally {\n restoreTransformStyles();\n }\n }, [store, open, positionerElement, triggerElement, valueRef, firstItemTextRef, selectedItemTextRef, popupRef, handleScrollArrowVisibility, alignItemWithTriggerActive, setControlledAlignItemWithTrigger, scrollArrowFrame, listElement, listRef, highlightItemOnHover, direction, isPositioned]);\n React.useEffect(() => {\n if (!alignItemWithTriggerActive || !positionerElement || !open) {\n return undefined;\n }\n const win = ownerWindow(positionerElement);\n function handleResize(event) {\n setOpen(false, createChangeEventDetails(REASONS.windowResize, event));\n }\n return addEventListener(win, 'resize', handleResize);\n }, [setOpen, alignItemWithTriggerActive, positionerElement, open]);\n const defaultProps = {\n ...(listElement ? {\n role: 'presentation',\n 'aria-orientation': undefined\n } : {\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n id: `${id}-list`\n }),\n onKeyDown(event) {\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onScroll(event) {\n if (listElement) {\n return;\n }\n handleScroll(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: listElement ? {\n height: '100%'\n } : LIST_FUNCTIONAL_STYLES\n }),\n className: !listElement && alignItemWithTriggerActive ? styleDisableScrollbar.className : undefined\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, popupRef],\n state,\n stateAttributesMapping,\n props: [popupProps, defaultProps, getDisabledMountTransitionStyles(transitionStatus), elementProps]\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n modal: false,\n disabled: !mounted,\n openInteractionType: openMethod,\n returnFocus: finalFocus,\n restoreFocus: true,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPopup.displayName = \"SelectPopup\";\nfunction getMaxPopupHeight(popupStyles) {\n const maxHeightStyle = popupStyles.maxHeight;\n return maxHeightStyle.endsWith('px') ? parseFloat(maxHeightStyle) || Infinity : Infinity;\n}\nfunction getMaxScrollTop(scroller) {\n return getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n}\nfunction getScale(element) {\n // The platform API is async-capable, but the DOM platform returns a plain scale object.\n return floatingPlatform.getScale(element);\n}\nfunction normalizeSize(size, axis, scale) {\n return size / scale[axis];\n}\nfunction normalizeRect(rect, scale) {\n return rectToClientRect({\n x: normalizeSize(rect.x, 'x', scale),\n y: normalizeSize(rect.y, 'y', scale),\n width: normalizeSize(rect.width, 'x', scale),\n height: normalizeSize(rect.height, 'y', scale)\n });\n}\nconst TRANSFORM_STYLE_RESETS = [['transform', 'none'], ['scale', '1'], ['translate', '0 0']];\nfunction unsetTransformStyles(popupElement) {\n const {\n style\n } = popupElement;\n const originalStyles = {};\n for (const [property, value] of TRANSFORM_STYLE_RESETS) {\n originalStyles[property] = style.getPropertyValue(property);\n style.setProperty(property, value, 'important');\n }\n return () => {\n for (const [property] of TRANSFORM_STYLE_RESETS) {\n const originalValue = originalStyles[property];\n if (originalValue) {\n style.setProperty(property, originalValue);\n } else {\n style.removeProperty(property);\n }\n }\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { LIST_FUNCTIONAL_STYLES } from \"../popup/utils.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * A container for the select items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectList = /*#__PURE__*/React.forwardRef(function SelectList(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n scrollHandlerRef,\n multiple\n } = useSelectRootContext();\n const {\n alignItemWithTriggerActive\n } = useSelectPositionerContext();\n const hasScrollArrows = useStore(store, selectors.hasScrollArrows);\n const openMethod = useStore(store, selectors.openMethod);\n const id = useStore(store, selectors.id);\n const defaultProps = {\n id: `${id}-list`,\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n onScroll(event) {\n scrollHandlerRef.current?.(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: LIST_FUNCTIONAL_STYLES\n }),\n className: hasScrollArrows && openMethod !== 'touch' ? styleDisableScrollbar.className : undefined\n };\n const setListElement = store.useStateSetter('listElement');\n return useRenderElement('div', componentProps, {\n ref: [forwardedRef, setListElement],\n props: [defaultProps, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectList.displayName = \"SelectList\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectItemContext.displayName = \"SelectItemContext\";\nexport function useSelectItemContext() {\n const context = React.useContext(SelectItemContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.' : _formatErrorMessage(57));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { SelectItemContext } from \"./SelectItemContext.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { compareItemEquality, removeItem } from \"../../internals/itemEquality.mjs\";\nimport { isVirtualClick } from \"../../floating-ui-react/utils/event.mjs\";\n\n/**\n * An individual option in the select popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectItem = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItem(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n value: itemValue = null,\n label,\n disabled: disabledProp = false,\n nativeButton = false,\n ...elementProps\n } = componentProps;\n const textRef = React.useRef(null);\n const listItem = useCompositeListItem({\n guess: true,\n label,\n textRef\n });\n const {\n store,\n itemProps,\n setOpen,\n setValue,\n selectionRef,\n typingRef,\n valuesRef,\n multiple,\n selectedItemTextRef,\n disabled: selectDisabled,\n readOnly\n } = useSelectRootContext();\n const disabled = selectDisabled || disabledProp;\n const highlighted = useStore(store, selectors.isActive, listItem.index);\n const open = useStore(store, selectors.open);\n const selected = useStore(store, selectors.isSelected, itemValue);\n const selectedByFocus = useStore(store, selectors.isSelectedByFocus, listItem.index);\n const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);\n const index = listItem.index;\n const itemRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n const values = valuesRef.current;\n values[index] = itemValue;\n return () => {\n delete values[index];\n };\n }, [index, itemValue, valuesRef]);\n useIsoLayoutEffect(() => {\n const selectedValue = store.state.value;\n let selectedCandidate = selectedValue;\n if (multiple && Array.isArray(selectedValue)) {\n // Compare against the last selected item, or `undefined` when nothing is selected — never\n // the raw array, which a custom `isItemEqualToValue` isn't expected to receive.\n selectedCandidate = selectedValue.length > 0 ? selectedValue[selectedValue.length - 1] : undefined;\n }\n if (selectedCandidate !== undefined && compareItemEquality(itemValue, selectedCandidate, isItemEqualToValue)) {\n store.set('selectedIndex', index);\n // Make sure SelectPopup can measure the selected item on first open.\n // SelectItemText can still update this ref later when focus moves.\n if (textRef.current) {\n selectedItemTextRef.current = textRef.current;\n }\n }\n }, [index, multiple, isItemEqualToValue, store, itemValue, selectedItemTextRef]);\n const pointerTypeRef = React.useRef('mouse');\n const allowMouseSelectionRef = React.useRef(false);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const state = {\n disabled,\n selected,\n highlighted\n };\n function commitSelection(event) {\n // A forced-open select (`open`/`defaultOpen`) can still receive item activations even\n // when the root is disabled or read-only, so guard the commit here too.\n if (selectDisabled || readOnly) {\n return;\n }\n const selectedValue = store.state.value;\n if (multiple) {\n const currentValue = Array.isArray(selectedValue) ? selectedValue : [];\n const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue];\n setValue(nextValue, createChangeEventDetails(REASONS.itemPress, event));\n } else {\n setValue(itemValue, createChangeEventDetails(REASONS.itemPress, event));\n setOpen(false, createChangeEventDetails(REASONS.itemPress, event));\n }\n }\n function resetDragMovement() {\n selectionRef.current.dragY = 0;\n }\n const defaultProps = {\n role: 'option',\n 'aria-selected': selected,\n tabIndex: open && highlighted ? 0 : -1,\n onKeyDown(event) {\n store.set('activeIndex', index);\n if (event.key === ' ' && typingRef.current) {\n // `useButton` skips Space activation for `role=\"option\"` items when the keydown\n // is `defaultPrevented`, keeping typeahead spaces from committing a selection.\n event.preventDefault();\n }\n },\n onClick(event) {\n const isMouseClick = pointerTypeRef.current !== 'touch';\n const clickPointerType = event.nativeEvent.pointerType;\n const isVirtualMouseClick = isMouseClick && isVirtualClick(event.nativeEvent) && (\n // Generic no-pointer `detail === 0` clicks stay tied to highlight state. Virtual\n // clicks that carry browser pointer data, including an empty string from assistive\n // technology, can activate unhighlighted items.\n clickPointerType !== undefined || highlighted);\n // With alignItemWithTrigger, opening can place an item under the cursor. Real mouse\n // clicks must start on the item, while virtual clicks represent explicit keyboard or\n // assistive technology activation.\n const isInvalidMouseClick = isMouseClick && !isVirtualMouseClick && !allowMouseSelectionRef.current;\n allowMouseSelectionRef.current = false;\n if (disabled || isInvalidMouseClick) {\n return;\n }\n commitSelection(event.nativeEvent);\n },\n onPointerEnter(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onPointerMove(event) {\n if (event.pointerType === 'mouse' && event.buttons === 1) {\n const selection = selectionRef.current;\n selection.dragY += event.movementY;\n if (selection.dragY ** 2 >= 64) {\n selection.allowUnselectedMouseUp = true;\n }\n }\n },\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n allowMouseSelectionRef.current = true;\n resetDragMovement();\n },\n onMouseUp() {\n resetDragMovement();\n if (disabled || pointerTypeRef.current === 'touch') {\n return;\n }\n\n // Regular clicks are committed by the click event.\n if (allowMouseSelectionRef.current) {\n return;\n }\n const disallowSelectedMouseUp = !selectionRef.current.allowSelectedMouseUp && selected;\n const disallowUnselectedMouseUp = !selectionRef.current.allowUnselectedMouseUp && !selected;\n if (disallowSelectedMouseUp || disallowUnselectedMouseUp) {\n return;\n }\n allowMouseSelectionRef.current = true;\n itemRef.current?.click();\n allowMouseSelectionRef.current = false;\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [buttonRef, forwardedRef, listItem.ref, itemRef],\n state,\n props: [itemProps, defaultProps, elementProps, getButtonProps]\n });\n const contextValue = React.useMemo(() => ({\n selected,\n index,\n textRef,\n selectedByFocus\n }), [selected, index, textRef, selectedByFocus]);\n return /*#__PURE__*/_jsx(SelectItemContext.Provider, {\n value: contextValue,\n children: element\n });\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItem.displayName = \"SelectItem\";","'use client';\n\nimport * as React from 'react';\nimport { useSelectItemContext } from \"../item/SelectItemContext.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\n\n/**\n * Indicates whether the select item is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectItemIndicator = /*#__PURE__*/React.forwardRef(function SelectItemIndicator(componentProps, forwardedRef) {\n const {\n selected\n } = useSelectItemContext();\n const shouldRender = componentProps.keepMounted || selected;\n if (!shouldRender) {\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return /*#__PURE__*/_jsx(Inner, {\n ...componentProps,\n ref: forwardedRef\n });\n});\n\n// Split the core implementation to avoid paying the hook costs unless the element needs to mount.\nif (process.env.NODE_ENV !== \"production\") SelectItemIndicator.displayName = \"SelectItemIndicator\";\nconst Inner = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef((componentProps, forwardedRef) => {\n const {\n render,\n className,\n style,\n keepMounted,\n ...elementProps\n } = componentProps;\n const {\n selected\n } = useSelectItemContext();\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n setMounted\n } = useTransitionStatus(selected);\n const state = {\n selected,\n transitionStatus\n };\n const element = useRenderElement('span', componentProps, {\n ref: [forwardedRef, indicatorRef],\n state,\n props: [{\n 'aria-hidden': true,\n children: '✔️'\n }, elementProps],\n stateAttributesMapping: transitionStatusMapping\n });\n useOpenChangeComplete({\n open: selected,\n ref: indicatorRef,\n onComplete() {\n if (!selected) {\n setMounted(false);\n }\n }\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") Inner.displayName = \"Inner\";","'use client';\n\nimport * as React from 'react';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectItemContext } from \"../item/SelectItemContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * A text label of the select item.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectItemText = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItemText(componentProps, forwardedRef) {\n const {\n index,\n textRef,\n selectedByFocus\n } = useSelectItemContext();\n const {\n firstItemTextRef,\n selectedItemTextRef\n } = useSelectRootContext();\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const localRef = React.useCallback(node => {\n if (!node) {\n return;\n }\n if (index === 0) {\n firstItemTextRef.current = node;\n }\n if (selectedByFocus) {\n selectedItemTextRef.current = node;\n }\n }, [firstItemTextRef, selectedItemTextRef, index, selectedByFocus]);\n const element = useRenderElement('div', componentProps, {\n ref: [localRef, forwardedRef, textRef],\n props: elementProps\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItemText.displayName = \"SelectItemText\";","'use client';\n\nimport * as React from 'react';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStore } from '@base-ui/utils/store';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { getMaxScrollOffset, normalizeScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from \"../../utils/scrollEdges.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * @internal\n */\nexport const SelectScrollArrow = /*#__PURE__*/React.forwardRef(function SelectScrollArrow(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n direction,\n keepMounted,\n ...elementProps\n } = componentProps;\n const isUp = direction === 'up';\n const {\n store,\n popupRef,\n listRef,\n handleScrollArrowVisibility,\n scrollArrowsMountedCountRef\n } = useSelectRootContext();\n const {\n side,\n scrollDownArrowRef,\n scrollUpArrowRef\n } = useSelectPositionerContext();\n const visibleSelector = isUp ? selectors.scrollUpArrowVisible : selectors.scrollDownArrowVisible;\n const stateVisible = useStore(store, visibleSelector);\n const openMethod = useStore(store, selectors.openMethod);\n\n // Scroll arrows are disabled for touch modality as they are a hover-only element.\n const visible = stateVisible && openMethod !== 'touch';\n const timeout = useTimeout();\n const scrollArrowRef = isUp ? scrollUpArrowRef : scrollDownArrowRef;\n const {\n mounted,\n transitionStatus,\n setMounted\n } = useTransitionStatus(visible);\n useIsoLayoutEffect(() => {\n scrollArrowsMountedCountRef.current += 1;\n store.set('hasScrollArrows', true);\n return () => {\n scrollArrowsMountedCountRef.current = Math.max(0, scrollArrowsMountedCountRef.current - 1);\n if (scrollArrowsMountedCountRef.current === 0) {\n store.set('hasScrollArrows', false);\n }\n };\n }, [store, scrollArrowsMountedCountRef]);\n useOpenChangeComplete({\n open: visible,\n ref: scrollArrowRef,\n onComplete() {\n if (!visible) {\n setMounted(false);\n }\n }\n });\n const state = {\n direction,\n visible,\n side,\n transitionStatus\n };\n const defaultProps = {\n 'aria-hidden': true,\n children: isUp ? '▲' : '▼',\n style: {\n position: 'absolute'\n },\n onMouseMove(event) {\n if (event.movementX === 0 && event.movementY === 0 || timeout.isStarted()) {\n return;\n }\n store.set('activeIndex', null);\n function scrollNextItem() {\n const scroller = store.state.listElement ?? popupRef.current;\n if (!scroller) {\n return;\n }\n store.set('activeIndex', null);\n handleScrollArrowVisibility(scroller);\n const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);\n const isScrolledToEdge = scrollTop === (isUp ? 0 : maxScrollTop);\n const items = listRef.current;\n if (scrollTop !== scroller.scrollTop) {\n scroller.scrollTop = scrollTop;\n }\n if (isScrolledToEdge) {\n timeout.clear();\n return;\n }\n if (items.length > 0) {\n const scrollArrowHeight = scrollArrowRef.current?.offsetHeight || 0;\n scroller.scrollTop = getTargetScrollTop(items, isUp, scrollTop, scroller.clientHeight, scrollArrowHeight, maxScrollTop);\n }\n timeout.start(40, scrollNextItem);\n }\n timeout.start(40, scrollNextItem);\n },\n onMouseLeave() {\n timeout.clear();\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, scrollArrowRef],\n state,\n props: [defaultProps, elementProps],\n stateAttributesMapping: transitionStatusMapping\n });\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectScrollArrow.displayName = \"SelectScrollArrow\";\nfunction getTargetScrollTop(items, isUp, scrollTop, clientHeight, scrollArrowHeight, maxScrollTop) {\n if (isUp) {\n let firstVisibleIndex = 0;\n const visibleTop = scrollTop + scrollArrowHeight - SCROLL_EDGE_TOLERANCE_PX;\n for (let i = 0; i < items.length; i += 1) {\n const item = items[i];\n if (item && item.offsetTop >= visibleTop) {\n firstVisibleIndex = i;\n break;\n }\n }\n const targetIndex = Math.max(0, firstVisibleIndex - 1);\n const targetItem = items[targetIndex];\n return targetIndex < firstVisibleIndex && targetItem ? normalizeScrollOffset(targetItem.offsetTop - scrollArrowHeight, maxScrollTop) : 0;\n }\n let lastVisibleIndex = items.length - 1;\n const visibleBottom = scrollTop + clientHeight - scrollArrowHeight + SCROLL_EDGE_TOLERANCE_PX;\n for (let i = 0; i < items.length; i += 1) {\n const item = items[i];\n if (item && item.offsetTop + item.offsetHeight > visibleBottom) {\n lastVisibleIndex = Math.max(0, i - 1);\n break;\n }\n }\n const targetIndex = Math.min(items.length - 1, lastVisibleIndex + 1);\n const targetItem = items[targetIndex];\n return targetIndex > lastVisibleIndex && targetItem ? normalizeScrollOffset(targetItem.offsetTop + targetItem.offsetHeight - clientHeight + scrollArrowHeight, maxScrollTop) : maxScrollTop;\n}","'use client';\n\nimport * as React from 'react';\nimport { SelectScrollArrow } from \"../scroll-arrow/SelectScrollArrow.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * An element that scrolls the select popup down when hovered. Does not render when using touch input.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectScrollDownArrow = /*#__PURE__*/React.forwardRef(function SelectScrollDownArrow(props, forwardedRef) {\n return /*#__PURE__*/_jsx(SelectScrollArrow, {\n ...props,\n ref: forwardedRef,\n direction: \"down\"\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectScrollDownArrow.displayName = \"SelectScrollDownArrow\";","'use client';\n\nimport * as React from 'react';\nimport { SelectScrollArrow } from \"../scroll-arrow/SelectScrollArrow.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * An element that scrolls the select popup up when hovered. Does not render when using touch input.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectScrollUpArrow = /*#__PURE__*/React.forwardRef(function SelectScrollUpArrow(props, forwardedRef) {\n return /*#__PURE__*/_jsx(SelectScrollArrow, {\n ...props,\n ref: forwardedRef,\n direction: \"up\"\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectScrollUpArrow.displayName = \"SelectScrollUpArrow\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectGroupContext.displayName = \"SelectGroupContext\";\nexport function useSelectGroupContext() {\n const context = React.useContext(SelectGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.' : _formatErrorMessage(56));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { SelectGroupContext } from \"./SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Groups related select items with the corresponding label.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectGroup = /*#__PURE__*/React.forwardRef(function SelectGroup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState();\n const contextValue = React.useMemo(() => ({\n labelId,\n setLabelId\n }), [labelId, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n role: 'group',\n 'aria-labelledby': labelId\n }, elementProps]\n });\n return /*#__PURE__*/_jsx(SelectGroupContext.Provider, {\n value: contextValue,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroup.displayName = \"SelectGroup\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useSelectGroupContext } from \"../group/SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * An accessible label that is automatically associated with its parent group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectGroupLabel = /*#__PURE__*/React.forwardRef(function SelectGroupLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n setLabelId\n } = useSelectGroupContext();\n const id = useBaseUiId(idProp);\n useIsoLayoutEffect(() => {\n setLabelId(id);\n return () => {\n setLabelId(currentId => currentId === id ? undefined : currentId);\n };\n }, [id, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroupLabel.displayName = \"SelectGroupLabel\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * A visual separator between items.\n * Renders a `<div>` element.\n *\n * @internal\n */\nexport const ListboxSeparator = /*#__PURE__*/React.forwardRef(function ListboxSeparator(componentProps, forwardedRef) {\n const {\n className,\n render,\n orientation = 'horizontal',\n style,\n ...elementProps\n } = componentProps;\n const state = {\n orientation\n };\n return useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n role: 'presentation'\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") ListboxSeparator.displayName = \"ListboxSeparator\";","'use client';\n\nimport { ListboxSeparator } from \"../../utils/listbox-separator/ListboxSeparator.mjs\";\n/**\n * A visual separator between items or groups.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectSeparator = ListboxSeparator;"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,SAAgB,GAAiB,GAAO;AACtC,QAAM,CAAC,GAAO,CAAA,IAAA,EAAkB,SAAS;AAAA,IACvC,SAAS;AAAA,IACT,UAAU;AAAA,EACZ,CAAC;AACD,SAAK,OAAO,GAAG,GAAO,EAAM,OAAO,KACjC,EAAS;AAAA,IACP,SAAS;AAAA,IACT,UAAU,EAAM;AAAA,EAClB,CAAC,GAEI,EAAM;AACf;ACjBA,IAAa,KAAiC,gBAAA,EAAM,cAAc,IAAI;AAEtE,SAAgB,KAAuB;AACrC,QAAM,IAAA,EAAgB,WAAW,EAAiB;AAClD,MAAI,MAAY,KACd,OAAM,IAAI,MAA2IA,GAAoB,EAAE,CAAC;AAE9K,SAAO;AACT;ACVA,IAAa,IAAY;AAAA,EACvB,IAAA,CAAI,MAAS,EAAM;AAAA,EACnB,SAAA,CAAS,MAAS,EAAM;AAAA,EACxB,OAAA,CAAO,MAAS,EAAM;AAAA,EACtB,OAA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C7C,OAAA,EAHA,aAAA,EAGI;AAAA,IACJ,KAAK;AAAA,IACL,OAAO,CAAC,EACN,MAAM,eACR,GAAG,CAAY;AAAA,EACjB,CAAC;AACH,CAAC,GCpBY,KAAkB"}
1
+ {"version":3,"file":"SelectSeparator.js","names":["_formatErrorMessage","REASONS.none","stateAttributesMapping","REASONS.none","REASONS.cancelOpen","stateAttributesMapping","_formatErrorMessage","REASONS.none","ownerWindow","platform.engine.webkit","REASONS.windowResize","floatingPlatform","_formatErrorMessage","REASONS.itemPress","_formatErrorMessage"],"sources":["../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/utils/listbox-separator/ListboxSeparator.mjs","../../../../node_modules/.bun/@base-ui+utils@0.3.2+8fa0c0869acb2741/node_modules/@base-ui/utils/usePreviousValue.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/root/SelectRootContext.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/store.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/root/SelectRoot.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/value/SelectValue.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/icon/SelectIcon.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/portal/SelectPortal.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/popup/utils.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/positioner/SelectPositioner.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/popup/SelectPopup.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/list/SelectList.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/item/SelectItemContext.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/item/SelectItem.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/item-text/SelectItemText.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/scroll-arrow/SelectScrollArrow.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/scroll-down-arrow/SelectScrollDownArrow.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/scroll-up-arrow/SelectScrollUpArrow.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/group/SelectGroupContext.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/group/SelectGroup.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs","../../../../node_modules/.bun/@base-ui+react@1.7.0+8a291ac5721f2b4f/node_modules/@base-ui/react/select/separator/SelectSeparator.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * A visual separator between items.\n * Renders a `<div>` element.\n *\n * @internal\n */\nexport const ListboxSeparator = /*#__PURE__*/React.forwardRef(function ListboxSeparator(componentProps, forwardedRef) {\n const {\n className,\n render,\n orientation = 'horizontal',\n style,\n ...elementProps\n } = componentProps;\n const state = {\n orientation\n };\n return useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n role: 'presentation'\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") ListboxSeparator.displayName = \"ListboxSeparator\";","'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a previous value of its argument.\n * @param value Current value.\n * @returns Previous value, or null if there is no previous value.\n */\nexport function usePreviousValue(value) {\n const [state, setState] = React.useState({\n current: value,\n previous: null\n });\n if (!Object.is(value, state.current)) {\n setState({\n current: value,\n previous: state.current\n });\n }\n return state.previous;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectRootContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") SelectRootContext.displayName = \"SelectRootContext\";\nexport function useSelectRootContext() {\n const context = React.useContext(SelectRootContext);\n if (context === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(60));\n }\n return context;\n}","import { compareItemEquality } from \"../internals/itemEquality.mjs\";\nimport { hasNullItemLabel, stringifyAsValue } from \"../internals/resolveValueLabel.mjs\";\nexport const selectors = {\n id: state => state.id,\n labelId: state => state.labelId,\n modal: state => state.modal,\n items: state => state.items,\n itemToStringLabel: state => state.itemToStringLabel,\n isItemEqualToValue: state => state.isItemEqualToValue,\n value: state => state.value,\n hasSelectedValue: state => {\n const {\n value,\n multiple,\n itemToStringValue\n } = state;\n if (value == null) {\n return false;\n }\n if (multiple && Array.isArray(value)) {\n return value.length > 0;\n }\n return stringifyAsValue(value, itemToStringValue) !== '';\n },\n hasNullItemLabel: (state, enabled) => {\n return enabled ? hasNullItemLabel(state.items) : false;\n },\n open: state => state.open,\n mounted: state => state.mounted,\n forceMount: state => state.forceMount,\n transitionStatus: state => state.transitionStatus,\n openMethod: state => state.openMethod,\n activeIndex: state => state.activeIndex,\n selectedIndex: state => state.selectedIndex,\n isActive: (state, index) => state.activeIndex === index,\n isSelected: (state, itemValue) => {\n const comparer = state.isItemEqualToValue;\n const storeValue = state.value;\n if (state.multiple) {\n return Array.isArray(storeValue) && storeValue.some(selectedItem => compareItemEquality(itemValue, selectedItem, comparer));\n }\n\n // The value is the source of truth: a stale `selectedIndex` (e.g. the controlled\n // value changes while the popup is open, where the index sync is deferred) must not\n // keep a previously selected item marked as selected.\n return compareItemEquality(itemValue, storeValue, comparer);\n },\n isSelectedByFocus: (state, index) => {\n return state.selectedIndex === index;\n },\n popupProps: state => state.popupProps,\n triggerProps: state => state.triggerProps,\n triggerElement: state => state.triggerElement,\n positionerElement: state => state.positionerElement,\n listElement: state => state.listElement,\n popupSide: state => state.popupSide,\n scrollUpArrowVisible: state => state.scrollUpArrowVisible,\n scrollDownArrowVisible: state => state.scrollDownArrowVisible,\n hasScrollArrows: state => state.hasScrollArrows\n};","'use client';\n\nimport * as React from 'react';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';\nimport { usePreviousValue } from '@base-ui/utils/usePreviousValue';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStore, ReactStore } from '@base-ui/utils/store';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useClick, useDismiss, useFloatingRootContext, useListNavigation, useTypeahead } from \"../../floating-ui-react/index.mjs\";\nimport { SelectRootContext } from \"./SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { stringifyAsLabel, stringifyAsValue } from \"../../internals/resolveValueLabel.mjs\";\nimport { compareItemEquality, defaultItemEquality, findItemIndex } from \"../../internals/itemEquality.mjs\";\nimport { areArraysEqual } from \"../../internals/areArraysEqual.mjs\";\nimport { useValueChanged } from \"../../internals/useValueChanged.mjs\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.mjs\";\nimport { getMaxScrollOffset, normalizeScrollOffset } from \"../../utils/scrollEdges.mjs\";\nimport { FOCUSABLE_POPUP_PROPS } from \"../../utils/popups/index.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\n\n/**\n * Groups all parts of the select.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function SelectRoot(props) {\n const {\n id,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n name: nameProp,\n form,\n autoComplete,\n disabled: disabledProp = false,\n readOnly = false,\n required = false,\n modal = true,\n actionsRef,\n inputRef,\n onOpenChangeComplete,\n items,\n multiple = false,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue = defaultItemEquality,\n highlightItemOnHover = true,\n children\n } = props;\n const {\n clearErrors\n } = useFormContext();\n const {\n setDirty,\n setTouched,\n setFocused,\n validityData,\n setFilled,\n name: fieldName,\n disabled: fieldDisabled,\n validation,\n validationMode\n } = useFieldRootContext();\n const generatedId = useLabelableId({\n id\n });\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const [value, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: multiple ? defaultValue ?? EMPTY_ARRAY : defaultValue,\n name: 'Select',\n state: 'value'\n });\n const [open, setOpenUnwrapped] = useControlled({\n controlled: openProp,\n default: defaultOpen,\n name: 'Select',\n state: 'open'\n });\n const listRef = React.useRef([]);\n const labelsRef = React.useRef([]);\n const popupRef = React.useRef(null);\n const scrollHandlerRef = React.useRef(null);\n const scrollArrowsMountedCountRef = React.useRef(0);\n const valueRef = React.useRef(null);\n const valuesRef = React.useRef([]);\n const typingRef = React.useRef(false);\n const firstItemTextRef = React.useRef(null);\n const selectedItemTextRef = React.useRef(null);\n const selectionRef = React.useRef({\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n });\n const alignItemWithTriggerActiveRef = React.useRef(false);\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n const {\n openMethod,\n triggerProps: interactionTypeProps\n } = useOpenInteractionType(open);\n const store = useRefWithInit(() => new ReactStore({\n id: generatedId,\n labelId: undefined,\n modal,\n multiple,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n value,\n open,\n mounted,\n transitionStatus,\n items,\n forceMount: false,\n openMethod: null,\n activeIndex: null,\n selectedIndex: null,\n popupProps: {},\n triggerProps: {},\n triggerElement: null,\n positionerElement: null,\n listElement: null,\n popupSide: null,\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false,\n hasScrollArrows: false\n })).current;\n const activeIndex = useStore(store, selectors.activeIndex);\n const selectedIndex = useStore(store, selectors.selectedIndex);\n const triggerElement = useStore(store, selectors.triggerElement);\n const positionerElement = useStore(store, selectors.positionerElement);\n const previousOpenMethod = usePreviousValue(openMethod);\n const renderedOpenMethod = openMethod ?? previousOpenMethod;\n const serializedValue = React.useMemo(() => {\n // In multiple mode the shared input is nameless; per-value entries are submitted via\n // `hiddenInputs`. Its value is therefore irrelevant, and passing the whole array to\n // `stringifyAsValue` would invoke a user `itemToStringValue` with an array it doesn't expect.\n if (multiple) {\n return '';\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const fieldStringValue = React.useMemo(() => {\n if (multiple && Array.isArray(value)) {\n return value.map(currentValue => stringifyAsValue(currentValue, itemToStringValue));\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const controlRef = useValueAsRef(triggerElement);\n const getStringifiedValueForForm = useStableCallback(() => fieldStringValue);\n useRegisterFieldControl(controlRef, generatedId, value, getStringifiedValueForForm, !disabled, nameProp);\n const initialValueRef = React.useRef(value);\n // Mirror the `hasSelectedValue` store selector so the Field's filled state agrees with the\n // trigger/value placeholder semantics (a value serializing to `''` counts as empty).\n const hasSelectedValue = multiple ? Array.isArray(value) && value.length > 0 : value != null && serializedValue !== '';\n useIsoLayoutEffect(() => {\n setFilled(hasSelectedValue);\n }, [hasSelectedValue, setFilled]);\n useIsoLayoutEffect(function syncSelectedIndex() {\n let target = value;\n let empty = false;\n if (multiple) {\n const currentValue = Array.isArray(value) ? value : [];\n empty = currentValue.length === 0;\n target = currentValue[currentValue.length - 1];\n }\n const index = empty ? -1 : findItemIndex(valuesRef.current, target, isItemEqualToValue);\n const nextIndex = index === -1 ? null : index;\n if (nextIndex === null) {\n selectedItemTextRef.current = null;\n }\n if (open) {\n return;\n }\n store.set('selectedIndex', nextIndex);\n }, [multiple, open, value, isItemEqualToValue, store]);\n function isSelectedValueDirty(currentValue) {\n const initialValue = validityData.initialValue;\n if (Array.isArray(currentValue) && Array.isArray(initialValue)) {\n return !areArraysEqual(currentValue, initialValue, (itemValue, initialItemValue) => compareItemEquality(itemValue, initialItemValue, isItemEqualToValue));\n }\n return currentValue !== initialValue;\n }\n useValueChanged(value, () => {\n clearErrors(name);\n setDirty(isSelectedValueDirty(value));\n validation.change(value);\n });\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setOpenUnwrapped(nextOpen);\n if (!nextOpen && (eventDetails.reason === REASONS.focusOut || eventDetails.reason === REASONS.outsidePress)) {\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n }\n });\n const handleUnmount = useStableCallback(() => {\n setMounted(false);\n store.update({\n activeIndex: null,\n openMethod: null,\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false\n });\n onOpenChangeComplete?.(false);\n });\n useOpenChangeComplete({\n enabled: !actionsRef,\n open,\n ref: popupRef,\n onComplete() {\n if (!open) {\n handleUnmount();\n }\n }\n });\n React.useImperativeHandle(actionsRef, () => ({\n unmount: handleUnmount\n }), [handleUnmount]);\n const setValue = useStableCallback((nextValue, eventDetails) => {\n onValueChange?.(nextValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueUnwrapped(nextValue);\n });\n const handleScrollArrowVisibility = useStableCallback(scroller => {\n const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);\n const shouldShowUp = scrollTop > 0;\n const shouldShowDown = scrollTop < maxScrollTop;\n store.set('scrollUpArrowVisible', shouldShowUp);\n store.set('scrollDownArrowVisible', shouldShowDown);\n });\n const floatingContext = useFloatingRootContext({\n open,\n onOpenChange: setOpen,\n elements: {\n reference: triggerElement,\n floating: positionerElement\n }\n });\n const click = useClick(floatingContext, {\n enabled: !readOnly && !disabled,\n event: 'mousedown'\n });\n const dismiss = useDismiss(floatingContext);\n const listNavigation = useListNavigation(floatingContext, {\n enabled: !readOnly && !disabled,\n listRef,\n activeIndex,\n selectedIndex,\n disabledIndices: EMPTY_ARRAY,\n onNavigate(nextActiveIndex) {\n // Retain the highlight while transitioning out.\n if (nextActiveIndex === null && !open) {\n return;\n }\n store.set('activeIndex', nextActiveIndex);\n },\n focusItemOnHover: highlightItemOnHover\n });\n const typeahead = useTypeahead(floatingContext, {\n enabled: !readOnly && !disabled && (open || !multiple),\n listRef: labelsRef,\n activeIndex,\n selectedIndex,\n // Skip disabled items while matching so typeahead advances to the next selectable item\n // (a click can never select a disabled item and native `<select>` skips them too). Resolve\n // the disabled state from the element via the attribute-only `isElementDisabled` so the\n // hidden, force-mounted items used for closed-trigger typeahead aren't dropped by the\n // `elementsRef`/visibility filter that `disabledIndices` deliberately sidesteps.\n disabledIndices: index => isElementDisabled(listRef.current[index]),\n onMatch(index) {\n if (open) {\n store.set('activeIndex', index);\n } else {\n setValue(valuesRef.current[index], createChangeEventDetails(REASONS.none));\n }\n },\n onTyping(typing) {\n typingRef.current = typing;\n }\n });\n\n // `Select.Trigger` applies the id itself from the store, so it's deliberately not merged here.\n const mergedTriggerProps = React.useMemo(() => mergeProps(typeahead.reference, listNavigation.reference, dismiss.reference, click.reference, interactionTypeProps), [click.reference, typeahead.reference, listNavigation.reference, dismiss.reference, interactionTypeProps]);\n const popupProps = React.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, typeahead.floating, listNavigation.floating, dismiss.floating), [typeahead.floating, listNavigation.floating, dismiss.floating]);\n const itemProps = listNavigation.item ?? EMPTY_OBJECT;\n useOnFirstRender(() => {\n store.update({\n popupProps,\n triggerProps: mergedTriggerProps\n });\n });\n store.useSyncedValues({\n id: generatedId,\n modal,\n multiple,\n value,\n open,\n mounted,\n transitionStatus,\n popupProps,\n triggerProps: mergedTriggerProps,\n items,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n openMethod: renderedOpenMethod\n });\n const contextValue = React.useMemo(() => ({\n store,\n floatingContext,\n required,\n disabled,\n readOnly,\n multiple,\n highlightItemOnHover,\n setValue,\n setOpen,\n listRef,\n popupRef,\n scrollHandlerRef,\n handleScrollArrowVisibility,\n scrollArrowsMountedCountRef,\n itemProps,\n valueRef,\n valuesRef,\n labelsRef,\n typingRef,\n selectionRef,\n firstItemTextRef,\n selectedItemTextRef,\n validation,\n onOpenChangeComplete,\n alignItemWithTriggerActiveRef,\n initialValueRef\n }), [store, floatingContext, required, disabled, readOnly, multiple, highlightItemOnHover, setValue, setOpen, itemProps, validation, onOpenChangeComplete, handleScrollArrowVisibility]);\n const ref = useMergedRefs(inputRef, validation.inputRef);\n const hiddenInputName = multiple ? undefined : name;\n const hiddenInputs = React.useMemo(() => {\n if (!multiple || !Array.isArray(value) || !name) {\n return null;\n }\n return value.map(v => {\n const currentSerializedValue = stringifyAsValue(v, itemToStringValue);\n return /*#__PURE__*/_jsx(\"input\", {\n type: \"hidden\",\n form: form,\n name: name,\n value: currentSerializedValue,\n disabled: disabled\n }, currentSerializedValue);\n });\n }, [multiple, value, form, name, itemToStringValue, disabled]);\n return /*#__PURE__*/_jsxs(SelectRootContext.Provider, {\n value: contextValue,\n children: [children, /*#__PURE__*/_jsx(\"input\", {\n ...validation.getValidationProps(disabled, {\n onFocus() {\n // Move focus to the trigger element when the hidden input is focused.\n store.state.triggerElement?.focus({\n // Supported in Chrome from 144 (January 2026)\n focusVisible: true\n });\n },\n // Handle browser autofill.\n onChange(event) {\n // Workaround for https://github.com/react/react/issues/9023\n if (event.nativeEvent.defaultPrevented || disabled || readOnly) {\n return;\n }\n const nextValue = event.currentTarget.value;\n const details = createChangeEventDetails(REASONS.none, event.nativeEvent);\n function handleChange() {\n if (multiple) {\n // Browser autofill only writes a single scalar value.\n return;\n }\n\n // Preserve the original serialized matching, then fall back to rendered text,\n // which browsers can autofill for primitive values like `value=\"US\">United States`.\n const nextValueLower = nextValue.toLowerCase();\n let matchingIndex = valuesRef.current.findIndex(candidate => stringifyAsValue(candidate, itemToStringValue).toLowerCase() === nextValueLower || stringifyAsLabel(candidate, itemToStringLabel).toLowerCase() === nextValueLower);\n if (matchingIndex === -1) {\n matchingIndex = valuesRef.current.findIndex((_, index) => {\n const renderedLabel = labelsRef.current[index];\n return renderedLabel != null && renderedLabel.toLowerCase() === nextValueLower;\n });\n }\n const matchingValue = valuesRef.current[matchingIndex];\n if (matchingValue != null) {\n // `setValue` may be canceled by `onValueChange`; rely on `useValueChanged` to\n // mark the field dirty and run validation only when the value actually changes.\n setValue(matchingValue, details);\n }\n }\n store.set('forceMount', true);\n queueMicrotask(handleChange);\n }\n }),\n id: generatedId && hiddenInputName == null ? `${generatedId}-hidden-input` : undefined,\n form: form,\n name: hiddenInputName,\n autoComplete: autoComplete,\n value: serializedValue,\n disabled: disabled,\n required: required && !(multiple && hasSelectedValue),\n readOnly: readOnly,\n ref: ref,\n style: name ? visuallyHiddenInput : visuallyHidden,\n tabIndex: -1,\n \"aria-hidden\": true,\n suppressHydrationWarning: true\n }), hiddenInputs]\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { isMouseWithinBounds } from \"../../utils/getPseudoElementBounds.mjs\";\nimport { contains, getFloatingFocusElement } from \"../../floating-ui-react/utils.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { resolveAriaLabelledBy } from \"../../utils/resolveAriaLabelledBy.mjs\";\nconst SELECTED_DELAY = 400;\nconst stateAttributesMapping = {\n ...pressableTriggerOpenStateMapping,\n ...fieldValidityMapping,\n popupSide: side => side ? {\n 'data-popup-side': side\n } : null,\n value: () => null\n};\n\n/**\n * A button that opens the select popup.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectTrigger = /*#__PURE__*/React.forwardRef(function SelectTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n disabled: disabledProp = false,\n nativeButton = true,\n style,\n ...elementProps\n } = componentProps;\n const {\n setTouched,\n setFocused,\n validationMode,\n state: fieldState,\n disabled: fieldDisabled\n } = useFieldRootContext();\n const {\n labelId: fieldLabelId\n } = useLabelableContext();\n const {\n store,\n setOpen,\n selectionRef,\n validation,\n readOnly,\n required,\n alignItemWithTriggerActiveRef,\n disabled: selectDisabled\n } = useSelectRootContext();\n const disabled = fieldDisabled || selectDisabled || disabledProp;\n const open = useStore(store, selectors.open);\n const mounted = useStore(store, selectors.mounted);\n const value = useStore(store, selectors.value);\n const triggerProps = useStore(store, selectors.triggerProps);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const popupSideValue = useStore(store, selectors.popupSide);\n const rootId = useStore(store, selectors.id);\n const selectLabelId = useStore(store, selectors.labelId);\n const hasSelectedValue = useStore(store, selectors.hasSelectedValue);\n const popupSide = mounted && positionerElement ? popupSideValue : null;\n const id = idProp ?? rootId;\n const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, selectLabelId);\n useLabelableId({\n id\n });\n const positionerRef = useValueAsRef(positionerElement);\n const triggerRef = React.useRef(null);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const setTriggerElement = store.useStateSetter('triggerElement');\n const timeoutFocus = useTimeout();\n const timeoutMouseDown = useTimeout();\n const selectedDelayTimeout = useTimeout();\n React.useEffect(() => {\n if (open) {\n // A mousedown on the trigger can open the popup under the cursor. Keep mouseup selection\n // disabled briefly so releasing over either the selected item or a neighboring item doesn't\n // commit an accidental selection. SelectItem can still opt into unselected mouseup sooner\n // after a real drag over the item.\n selectedDelayTimeout.start(SELECTED_DELAY, () => {\n selectionRef.current.allowUnselectedMouseUp = true;\n selectionRef.current.allowSelectedMouseUp = true;\n });\n return () => {\n selectedDelayTimeout.clear();\n };\n }\n selectionRef.current = {\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n };\n timeoutMouseDown.clear();\n return undefined;\n }, [open, selectionRef, timeoutMouseDown, selectedDelayTimeout]);\n const mergedProps = mergeProps(triggerProps, {\n id,\n role: 'combobox',\n 'aria-expanded': open,\n 'aria-haspopup': 'listbox',\n 'aria-controls': open ? listElement?.id ?? getFloatingFocusElement(positionerElement)?.id : undefined,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-readonly': readOnly || undefined,\n 'aria-required': required || undefined,\n tabIndex: disabled ? -1 : 0,\n onFocus(event) {\n setFocused(true);\n\n // The popup element shouldn't obscure the focused trigger.\n if (open && alignItemWithTriggerActiveRef.current) {\n setOpen(false, createChangeEventDetails(REASONS.none, event.nativeEvent));\n }\n\n // Saves a re-render on initial click: `forceMount === true` mounts\n // the items before `open === true`. We could sync those cycles better\n // without a timeout, but this is enough for now.\n timeoutFocus.start(0, () => {\n store.set('forceMount', true);\n });\n },\n onBlur(event) {\n // If focus is moving into the popup, don't count it as a blur.\n if (contains(positionerElement, event.relatedTarget)) {\n return;\n }\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n },\n onMouseDown(event) {\n if (open) {\n return;\n }\n const doc = ownerDocument(event.currentTarget);\n function handleMouseUp(mouseEvent) {\n if (!triggerRef.current) {\n return;\n }\n const mouseUpTarget = mouseEvent.target;\n\n // Don't treat the release as an outside press when it lands on the trigger or inside\n // the popup positioner (or their children).\n if (contains(triggerRef.current, mouseUpTarget) || contains(positionerRef.current, mouseUpTarget)) {\n return;\n }\n if (isMouseWithinBounds(mouseEvent, triggerRef.current)) {\n return;\n }\n setOpen(false, createChangeEventDetails(REASONS.cancelOpen, mouseEvent));\n }\n\n // Firefox can fire this upon mousedown\n timeoutMouseDown.start(0, () => {\n doc.addEventListener('mouseup', handleMouseUp, {\n once: true\n });\n });\n }\n }, elementProps, getButtonProps);\n const props = validation.getValidationProps(disabled, mergedProps);\n\n // ensure nested useButton does not overwrite the combobox role:\n // <Toolbar.Button render={<Select.Trigger />} />\n props.role = 'combobox';\n const state = {\n ...fieldState,\n open,\n disabled,\n value,\n readOnly,\n popupSide,\n placeholder: !hasSelectedValue\n };\n return useRenderElement('button', componentProps, {\n ref: [forwardedRef, triggerRef, buttonRef, setTriggerElement],\n state,\n stateAttributesMapping,\n props\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectTrigger.displayName = \"SelectTrigger\";","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { resolveMultipleLabels, resolveSelectedLabel } from \"../../internals/resolveValueLabel.mjs\";\nimport { selectors } from \"../store.mjs\";\nconst stateAttributesMapping = {\n value: () => null\n};\n\n/**\n * A text label of the currently selected item.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectValue = /*#__PURE__*/React.forwardRef(function SelectValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children: childrenProp,\n placeholder,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n valueRef\n } = useSelectRootContext();\n const value = useStore(store, selectors.value);\n const items = useStore(store, selectors.items);\n const itemToStringLabel = useStore(store, selectors.itemToStringLabel);\n const hasSelectedValue = useStore(store, selectors.hasSelectedValue);\n const shouldCheckNullItemLabel = !hasSelectedValue && placeholder != null && childrenProp == null;\n const hasNullLabel = useStore(store, selectors.hasNullItemLabel, shouldCheckNullItemLabel);\n const state = {\n value,\n placeholder: !hasSelectedValue\n };\n let children = null;\n if (typeof childrenProp === 'function') {\n children = childrenProp(value);\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (shouldCheckNullItemLabel && !hasNullLabel) {\n children = placeholder;\n } else if (Array.isArray(value)) {\n children = resolveMultipleLabels(value, items, itemToStringLabel);\n } else {\n children = resolveSelectedLabel(value, items, itemToStringLabel);\n }\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, valueRef],\n props: [{\n children\n }, elementProps],\n stateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectValue.displayName = \"SelectValue\";","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * An icon that indicates that the trigger button opens a select popup.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectIcon = /*#__PURE__*/React.forwardRef(function SelectIcon(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useSelectRootContext();\n const open = useStore(store, selectors.open);\n const state = {\n open\n };\n const element = useRenderElement('span', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n 'aria-hidden': true,\n children: '▼'\n }, elementProps],\n stateAttributesMapping: triggerOpenStateMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectIcon.displayName = \"SelectIcon\";","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectPortal = /*#__PURE__*/React.forwardRef(function SelectPortal(portalProps, forwardedRef) {\n const {\n store\n } = useSelectRootContext();\n const mounted = useStore(store, selectors.mounted);\n const forceMount = useStore(store, selectors.forceMount);\n const shouldRender = mounted || forceMount;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPortal.displayName = \"SelectPortal\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectPositionerContext.displayName = \"SelectPositionerContext\";\nexport function useSelectPositionerContext() {\n const context = React.useContext(SelectPositionerContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.' : _formatErrorMessage(59));\n }\n return context;\n}","export function clearStyles(element, originalStyles) {\n if (element) {\n Object.assign(element.style, originalStyles);\n }\n}\nexport const LIST_FUNCTIONAL_STYLES = {\n position: 'relative',\n maxHeight: '100%',\n overflowX: 'hidden',\n overflowY: 'auto'\n};","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { useAnchorPositioning } from \"../../internals/useAnchorPositioning.mjs\";\nimport { SelectPositionerContext } from \"./SelectPositionerContext.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\nimport { DROPDOWN_COLLISION_AVOIDANCE } from \"../../internals/constants.mjs\";\nimport { clearStyles } from \"../popup/utils.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { findItemIndex } from \"../../internals/itemEquality.mjs\";\nimport { usePositioner } from \"../../utils/usePositioner.mjs\";\nimport { useAnchoredPopupScrollLock } from \"../../utils/useAnchoredPopupScrollLock.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst FIXED = {\n position: 'fixed'\n};\n\n/**\n * Positions the select popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPositioner = /*#__PURE__*/React.forwardRef(function SelectPositioner(componentProps, forwardedRef) {\n const {\n anchor,\n className,\n render,\n // `useAnchorPositioning` applies the same defaults to the undefined values; the names\n // remain destructured to exclude the props from `elementProps`.\n positionMethod,\n side,\n align,\n sideOffset,\n alignOffset,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding,\n arrowPadding,\n sticky,\n disableAnchorTracking,\n alignItemWithTrigger = true,\n collisionAvoidance = DROPDOWN_COLLISION_AVOIDANCE,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n listRef,\n labelsRef,\n alignItemWithTriggerActiveRef,\n selectedItemTextRef,\n valuesRef,\n initialValueRef,\n popupRef,\n setValue,\n floatingContext: floatingRootContext\n } = useSelectRootContext();\n const open = useStore(store, selectors.open);\n const mounted = useStore(store, selectors.mounted);\n const modal = useStore(store, selectors.modal);\n const value = useStore(store, selectors.value);\n const openMethod = useStore(store, selectors.openMethod);\n const positionerElement = useStore(store, selectors.positionerElement);\n const triggerElement = useStore(store, selectors.triggerElement);\n const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);\n const transitionStatus = useStore(store, selectors.transitionStatus);\n const scrollUpArrowRef = React.useRef(null);\n const scrollDownArrowRef = React.useRef(null);\n const [controlledAlignItemWithTrigger, setControlledAlignItemWithTrigger] = React.useState(alignItemWithTrigger);\n const alignItemWithTriggerActive = mounted && controlledAlignItemWithTrigger && openMethod !== 'touch';\n if (!mounted && controlledAlignItemWithTrigger !== alignItemWithTrigger) {\n setControlledAlignItemWithTrigger(alignItemWithTrigger);\n }\n React.useImperativeHandle(alignItemWithTriggerActiveRef, () => alignItemWithTriggerActive);\n useAnchoredPopupScrollLock((alignItemWithTriggerActive || modal) && open, openMethod === 'touch', positionerElement, triggerElement);\n const positioning = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod,\n mounted,\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n disableAnchorTracking: disableAnchorTracking ?? alignItemWithTriggerActive,\n collisionAvoidance,\n keepMounted: true\n });\n const renderedSide = alignItemWithTriggerActive ? 'none' : positioning.side;\n const positionerStyles = alignItemWithTriggerActive ? FIXED : positioning.positionerStyles;\n const state = {\n open,\n side: renderedSide,\n align: positioning.align,\n anchorHidden: positioning.anchorHidden\n };\n useIsoLayoutEffect(() => {\n store.set('popupSide', positioning.side);\n }, [store, positioning.side]);\n const setPositionerElement = store.useStateSetter('positionerElement');\n const element = usePositioner(componentProps, state, {\n styles: positionerStyles,\n transitionStatus,\n props: elementProps,\n refs: [forwardedRef, setPositionerElement],\n hidden: !mounted,\n inert: !open\n });\n const prevMapSizeRef = React.useRef(0);\n const onMapChange = useStableCallback(map => {\n if (valuesRef.current.length === 0) {\n return;\n }\n const prevSize = prevMapSizeRef.current;\n prevMapSizeRef.current = map.size;\n if (map.size === prevSize) {\n return;\n }\n const eventDetails = createChangeEventDetails(REASONS.none);\n if (prevSize !== 0 && !store.state.multiple && value !== null) {\n const selectedValueIndex = findItemIndex(valuesRef.current, value, isItemEqualToValue);\n if (selectedValueIndex === -1) {\n const initialSelectedValue = initialValueRef.current;\n const hasInitial = initialSelectedValue != null && findItemIndex(valuesRef.current, initialSelectedValue, isItemEqualToValue) !== -1;\n const nextValue = hasInitial ? initialSelectedValue : null;\n setValue(nextValue, eventDetails);\n if (nextValue === null) {\n store.set('selectedIndex', null);\n selectedItemTextRef.current = null;\n }\n }\n }\n if (prevSize !== 0 && store.state.multiple && Array.isArray(value)) {\n const nextValue = value.filter(selectedItemValue => findItemIndex(valuesRef.current, selectedItemValue, isItemEqualToValue) !== -1);\n if (nextValue.length !== value.length) {\n setValue(nextValue, eventDetails);\n if (nextValue.length === 0) {\n store.set('selectedIndex', null);\n selectedItemTextRef.current = null;\n }\n }\n }\n if (open && alignItemWithTriggerActive) {\n store.update({\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false\n });\n const stylesToClear = {\n height: ''\n };\n clearStyles(positionerElement, stylesToClear);\n clearStyles(popupRef.current, stylesToClear);\n }\n });\n const contextValue = React.useMemo(() => ({\n ...positioning,\n side: renderedSide,\n alignItemWithTriggerActive,\n setControlledAlignItemWithTrigger,\n scrollUpArrowRef,\n scrollDownArrowRef\n }), [positioning, renderedSide, alignItemWithTriggerActive, setControlledAlignItemWithTrigger]);\n return /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: listRef,\n labelsRef: labelsRef,\n onMapChange: onMapChange,\n children: /*#__PURE__*/_jsxs(SelectPositionerContext.Provider, {\n value: contextValue,\n children: [mounted && modal && /*#__PURE__*/_jsx(InternalBackdrop, {\n inert: inertValue(!open),\n cutout: triggerElement\n }), element]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPositioner.displayName = \"SelectPositioner\";","'use client';\n\nimport * as React from 'react';\nimport { rectToClientRect } from '@floating-ui/utils';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { platform } from '@base-ui/utils/platform';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { FloatingFocusManager, platform as floatingPlatform } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { clearStyles, LIST_FUNCTIONAL_STYLES } from \"./utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../internals/getDisabledMountTransitionStyles.mjs\";\nimport { clamp } from \"../../internals/clamp.mjs\";\nimport { getMaxScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from \"../../utils/scrollEdges.mjs\";\nimport { useCSPContext } from \"../../internals/csp-context/CSPContext.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping\n};\n\n/**\n * A container for the select list.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPopup = /*#__PURE__*/React.forwardRef(function SelectPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n ...elementProps\n } = componentProps;\n const {\n store,\n popupRef,\n onOpenChangeComplete,\n setOpen,\n valueRef,\n firstItemTextRef,\n selectedItemTextRef,\n multiple,\n handleScrollArrowVisibility,\n scrollHandlerRef,\n listRef,\n highlightItemOnHover,\n floatingContext: floatingRootContext\n } = useSelectRootContext();\n const {\n side,\n align,\n alignItemWithTriggerActive,\n isPositioned,\n setControlledAlignItemWithTrigger\n } = useSelectPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const direction = useDirection();\n const {\n nonce,\n disableStyleElements\n } = useCSPContext();\n const id = useStore(store, selectors.id);\n const open = useStore(store, selectors.open);\n const openMethod = useStore(store, selectors.openMethod);\n const mounted = useStore(store, selectors.mounted);\n const popupProps = useStore(store, selectors.popupProps);\n const transitionStatus = useStore(store, selectors.transitionStatus);\n const triggerElement = useStore(store, selectors.triggerElement);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const reachedMaxHeightRef = React.useRef(false);\n const initialPlacedRef = React.useRef(false);\n const originalPositionerStylesRef = React.useRef({});\n const scrollArrowFrame = useAnimationFrame();\n const handleScroll = useStableCallback(scroller => {\n if (!positionerElement || !popupRef.current || !initialPlacedRef.current) {\n return;\n }\n const isTopPositioned = positionerElement.style.top === '0px';\n const isBottomPositioned = positionerElement.style.bottom === '0px';\n if (reachedMaxHeightRef.current || !alignItemWithTriggerActive || !isTopPositioned && !isBottomPositioned) {\n handleScrollArrowVisibility(scroller);\n return;\n }\n const scale = getScale(positionerElement);\n const currentHeight = normalizeSize(positionerElement.getBoundingClientRect().height, 'y', scale);\n const doc = ownerDocument(positionerElement);\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const marginTop = parseFloat(positionerStyles.marginTop);\n const marginBottom = parseFloat(positionerStyles.marginBottom);\n const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(popupRef.current));\n const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight);\n const scrollTop = scroller.scrollTop;\n const maxScrollTop = getMaxScrollTop(scroller);\n\n // `Infinity` requests a scroll to the recomputed maximum offset.\n let nextScrollTop = null;\n const setHeight = height => {\n positionerElement.style.height = `${height}px`;\n };\n const diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop;\n const nextHeight = Math.min(currentHeight + diff, maxAvailableHeight);\n if (diff <= SCROLL_EDGE_TOLERANCE_PX) {\n const heightDelta = clamp(diff, 0, maxAvailableHeight - currentHeight);\n if (heightDelta > 0) {\n // Consume the remaining scroll in height.\n setHeight(currentHeight + heightDelta);\n }\n scroller.scrollTop = isTopPositioned ? maxScrollTop : 0;\n if (maxAvailableHeight - (currentHeight + heightDelta) <= SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility(scroller);\n return;\n }\n if (maxAvailableHeight - nextHeight > SCROLL_EDGE_TOLERANCE_PX) {\n nextScrollTop = isTopPositioned ? Infinity : 0;\n } else if (isBottomPositioned && scrollTop < maxScrollTop) {\n const overshoot = currentHeight + diff - maxAvailableHeight;\n nextScrollTop = scrollTop - (diff - overshoot);\n }\n const nextPositionerHeight = Math.ceil(nextHeight);\n if (nextPositionerHeight !== 0) {\n setHeight(nextPositionerHeight);\n }\n if (nextScrollTop != null) {\n // Recompute bounds after resizing (clientHeight likely changed).\n const target = clamp(nextScrollTop, 0, getMaxScrollTop(scroller));\n\n // Avoid adjustments that re-trigger scroll events forever.\n if (Math.abs(scroller.scrollTop - target) > SCROLL_EDGE_TOLERANCE_PX) {\n scroller.scrollTop = target;\n }\n }\n if (nextPositionerHeight >= maxAvailableHeight - SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility(scroller);\n });\n React.useImperativeHandle(scrollHandlerRef, () => handleScroll, [handleScroll]);\n useOpenChangeComplete({\n open,\n ref: popupRef,\n onComplete() {\n if (open) {\n onOpenChangeComplete?.(true);\n }\n }\n });\n const state = {\n open,\n transitionStatus,\n side,\n align\n };\n useIsoLayoutEffect(() => {\n if (!positionerElement || !popupRef.current || Object.keys(originalPositionerStylesRef.current).length) {\n return;\n }\n originalPositionerStylesRef.current = {\n top: positionerElement.style.top || '0',\n left: positionerElement.style.left || '0',\n right: positionerElement.style.right,\n height: positionerElement.style.height,\n bottom: positionerElement.style.bottom,\n minHeight: positionerElement.style.minHeight,\n maxHeight: positionerElement.style.maxHeight,\n marginTop: positionerElement.style.marginTop,\n marginBottom: positionerElement.style.marginBottom\n };\n }, [popupRef, positionerElement]);\n useIsoLayoutEffect(() => {\n if (open || alignItemWithTriggerActive) {\n return;\n }\n initialPlacedRef.current = false;\n reachedMaxHeightRef.current = false;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n }, [open, alignItemWithTriggerActive, positionerElement, popupRef]);\n useIsoLayoutEffect(() => {\n const popupElement = popupRef.current;\n\n // Wait for Floating UI's first positioning pass before reading DOM geometry.\n // We replace the final coordinates for aligned selects, but still need middleware\n // like `size()` to set CSS variables such as `--anchor-width`.\n if (!open || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === 'ending') {\n return;\n }\n initialPlacedRef.current = true;\n popupElement.style.removeProperty('--transform-origin');\n if (!alignItemWithTriggerActive) {\n // The wrapper supplies the scroller: the list owns scrolling once it has mounted, and\n // this effect re-runs (cancelling the stale frame) when that happens.\n scrollArrowFrame.request(() => handleScrollArrowVisibility(listElement || popupElement));\n return;\n }\n\n // Ensure we remove any transforms that can affect the location of the popup\n // and therefore the calculations.\n const restoreTransformStyles = unsetTransformStyles(popupElement);\n try {\n let textElement = selectedItemTextRef.current;\n if (!textElement?.isConnected) {\n const hasSelectedValue = selectors.hasSelectedValue(store.state);\n textElement = !hasSelectedValue && firstItemTextRef.current?.isConnected ? firstItemTextRef.current : null;\n }\n const valueElement = valueRef.current;\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const popupStyles = win.getComputedStyle(popupElement);\n const doc = ownerDocument(triggerElement);\n const scale = getScale(triggerElement);\n const triggerRect = normalizeRect(triggerElement.getBoundingClientRect(), scale);\n const positionerRect = normalizeRect(positionerElement.getBoundingClientRect(), scale);\n const triggerHeight = triggerRect.height;\n const scroller = listElement || popupElement;\n const scrollHeight = scroller.scrollHeight;\n const borderBottom = parseFloat(popupStyles.borderBottomWidth);\n // The `|| N` fallbacks cover an unset/`auto` value (parses to `NaN`). Note a literal `0`\n // also resolves to the fallback, so an explicit `margin: 0` or `min-height: 0` still takes\n // the default below.\n const marginTop = parseFloat(positionerStyles.marginTop) || 10;\n const marginBottom = parseFloat(positionerStyles.marginBottom) || 10;\n const minHeight = parseFloat(positionerStyles.minHeight) || 100;\n const maxPopupHeight = getMaxPopupHeight(popupStyles);\n const paddingLeft = 5;\n const paddingRight = 5;\n const triggerCollisionThreshold = 20;\n const viewportHeight = doc.documentElement.clientHeight - marginTop - marginBottom;\n const viewportWidth = doc.documentElement.clientWidth;\n const availableSpaceBeneathTrigger = viewportHeight - triggerRect.bottom + triggerHeight;\n let textRect;\n let alignedLeft = direction === 'rtl' ? triggerRect.right - positionerRect.width : triggerRect.left;\n let offsetY = 0;\n if (textElement && valueElement) {\n const valueRect = normalizeRect(valueElement.getBoundingClientRect(), scale);\n textRect = normalizeRect(textElement.getBoundingClientRect(), scale);\n alignedLeft = positionerRect.left + (direction === 'rtl' ? valueRect.right - textRect.right : valueRect.left - textRect.left);\n const valueCenterFromTriggerTop = valueRect.top - triggerRect.top + valueRect.height / 2;\n const textCenterFromPositionerTop = textRect.top - positionerRect.top + textRect.height / 2;\n offsetY = textCenterFromPositionerTop - valueCenterFromTriggerTop;\n }\n const idealHeight = availableSpaceBeneathTrigger + offsetY + marginBottom + borderBottom;\n let height = Math.min(viewportHeight, idealHeight);\n const maxHeight = viewportHeight - marginTop - marginBottom;\n const scrollTop = idealHeight - height;\n const maxRight = viewportWidth - paddingRight;\n positionerElement.style.left = `${clamp(alignedLeft, paddingLeft, maxRight - positionerRect.width)}px`;\n positionerElement.style.height = `${height}px`;\n // `none` (not the invalid `auto`) so the explicit height governs in align mode and isn't\n // clamped by a `max-height` from user CSS.\n positionerElement.style.maxHeight = 'none';\n positionerElement.style.marginTop = `${marginTop}px`;\n positionerElement.style.marginBottom = `${marginBottom}px`;\n popupElement.style.height = '100%';\n const maxScrollTop = getMaxScrollTop(scroller);\n const isTopPositioned = scrollTop >= maxScrollTop - SCROLL_EDGE_TOLERANCE_PX;\n if (isTopPositioned) {\n height = Math.min(viewportHeight, positionerRect.height) - (scrollTop - maxScrollTop);\n }\n\n // When the trigger is too close to the top or bottom of the viewport, or the minHeight is\n // reached, we fallback to aligning the popup to the trigger as the UX is poor otherwise.\n const fallbackToAlignPopupToTrigger = triggerRect.top < triggerCollisionThreshold || triggerRect.bottom > viewportHeight - triggerCollisionThreshold || Math.ceil(height) + SCROLL_EDGE_TOLERANCE_PX < Math.min(scrollHeight, minHeight);\n\n // Safari doesn't position the popup correctly when pinch-zoomed.\n const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && platform.engine.webkit;\n if (fallbackToAlignPopupToTrigger || isPinchZoomed) {\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n setControlledAlignItemWithTrigger(false);\n return;\n }\n const initialHeight = Math.max(minHeight, height);\n if (isTopPositioned) {\n const topOffset = Math.max(0, viewportHeight - idealHeight);\n positionerElement.style.top = positionerRect.height >= maxHeight ? '0' : `${topOffset}px`;\n positionerElement.style.height = `${height}px`;\n scroller.scrollTop = getMaxScrollTop(scroller);\n } else {\n positionerElement.style.bottom = '0';\n scroller.scrollTop = scrollTop;\n }\n if (textRect) {\n const popupTop = positionerRect.top;\n const popupHeight = positionerRect.height;\n const textCenterY = textRect.top + textRect.height / 2;\n const clampedY = clamp(popupHeight > 0 ? (textCenterY - popupTop) / popupHeight * 100 : 50, 0, 100);\n popupElement.style.setProperty('--transform-origin', `50% ${clampedY}%`);\n }\n if (initialHeight === viewportHeight || height >= maxPopupHeight) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility(scroller);\n if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && listRef.current[0] != null) {\n store.set('activeIndex', 0);\n }\n } finally {\n restoreTransformStyles();\n }\n }, [store, open, positionerElement, triggerElement, valueRef, firstItemTextRef, selectedItemTextRef, popupRef, handleScrollArrowVisibility, alignItemWithTriggerActive, setControlledAlignItemWithTrigger, scrollArrowFrame, listElement, listRef, highlightItemOnHover, direction, isPositioned]);\n React.useEffect(() => {\n if (!alignItemWithTriggerActive || !positionerElement || !open) {\n return undefined;\n }\n const win = ownerWindow(positionerElement);\n function handleResize(event) {\n setOpen(false, createChangeEventDetails(REASONS.windowResize, event));\n }\n return addEventListener(win, 'resize', handleResize);\n }, [setOpen, alignItemWithTriggerActive, positionerElement, open]);\n const defaultProps = {\n ...(listElement ? {\n role: 'presentation',\n 'aria-orientation': undefined\n } : {\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n id: `${id}-list`\n }),\n onKeyDown(event) {\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onScroll(event) {\n if (listElement) {\n return;\n }\n handleScroll(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: listElement ? {\n height: '100%'\n } : LIST_FUNCTIONAL_STYLES\n }),\n className: !listElement && alignItemWithTriggerActive ? styleDisableScrollbar.className : undefined\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, popupRef],\n state,\n stateAttributesMapping,\n props: [popupProps, defaultProps, getDisabledMountTransitionStyles(transitionStatus), elementProps]\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n modal: false,\n disabled: !mounted,\n openInteractionType: openMethod,\n returnFocus: finalFocus,\n restoreFocus: true,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPopup.displayName = \"SelectPopup\";\nfunction getMaxPopupHeight(popupStyles) {\n const maxHeightStyle = popupStyles.maxHeight;\n return maxHeightStyle.endsWith('px') ? parseFloat(maxHeightStyle) || Infinity : Infinity;\n}\nfunction getMaxScrollTop(scroller) {\n return getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n}\nfunction getScale(element) {\n // The platform API is async-capable, but the DOM platform returns a plain scale object.\n return floatingPlatform.getScale(element);\n}\nfunction normalizeSize(size, axis, scale) {\n return size / scale[axis];\n}\nfunction normalizeRect(rect, scale) {\n return rectToClientRect({\n x: normalizeSize(rect.x, 'x', scale),\n y: normalizeSize(rect.y, 'y', scale),\n width: normalizeSize(rect.width, 'x', scale),\n height: normalizeSize(rect.height, 'y', scale)\n });\n}\nconst TRANSFORM_STYLE_RESETS = [['transform', 'none'], ['scale', '1'], ['translate', '0 0']];\nfunction unsetTransformStyles(popupElement) {\n const {\n style\n } = popupElement;\n const originalStyles = {};\n for (const [property, value] of TRANSFORM_STYLE_RESETS) {\n originalStyles[property] = style.getPropertyValue(property);\n style.setProperty(property, value, 'important');\n }\n return () => {\n for (const [property] of TRANSFORM_STYLE_RESETS) {\n const originalValue = originalStyles[property];\n if (originalValue) {\n style.setProperty(property, originalValue);\n } else {\n style.removeProperty(property);\n }\n }\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { LIST_FUNCTIONAL_STYLES } from \"../popup/utils.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * A container for the select items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectList = /*#__PURE__*/React.forwardRef(function SelectList(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n scrollHandlerRef,\n multiple\n } = useSelectRootContext();\n const {\n alignItemWithTriggerActive\n } = useSelectPositionerContext();\n const hasScrollArrows = useStore(store, selectors.hasScrollArrows);\n const openMethod = useStore(store, selectors.openMethod);\n const id = useStore(store, selectors.id);\n const defaultProps = {\n id: `${id}-list`,\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n onScroll(event) {\n scrollHandlerRef.current?.(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: LIST_FUNCTIONAL_STYLES\n }),\n className: hasScrollArrows && openMethod !== 'touch' ? styleDisableScrollbar.className : undefined\n };\n const setListElement = store.useStateSetter('listElement');\n return useRenderElement('div', componentProps, {\n ref: [forwardedRef, setListElement],\n props: [defaultProps, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectList.displayName = \"SelectList\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectItemContext.displayName = \"SelectItemContext\";\nexport function useSelectItemContext() {\n const context = React.useContext(SelectItemContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.' : _formatErrorMessage(57));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { SelectItemContext } from \"./SelectItemContext.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { compareItemEquality, removeItem } from \"../../internals/itemEquality.mjs\";\nimport { isVirtualClick } from \"../../floating-ui-react/utils/event.mjs\";\n\n/**\n * An individual option in the select popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectItem = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItem(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n value: itemValue = null,\n label,\n disabled: disabledProp = false,\n nativeButton = false,\n ...elementProps\n } = componentProps;\n const textRef = React.useRef(null);\n const listItem = useCompositeListItem({\n guess: true,\n label,\n textRef\n });\n const {\n store,\n itemProps,\n setOpen,\n setValue,\n selectionRef,\n typingRef,\n valuesRef,\n multiple,\n selectedItemTextRef,\n disabled: selectDisabled,\n readOnly\n } = useSelectRootContext();\n const disabled = selectDisabled || disabledProp;\n const highlighted = useStore(store, selectors.isActive, listItem.index);\n const open = useStore(store, selectors.open);\n const selected = useStore(store, selectors.isSelected, itemValue);\n const selectedByFocus = useStore(store, selectors.isSelectedByFocus, listItem.index);\n const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);\n const index = listItem.index;\n const itemRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n const values = valuesRef.current;\n values[index] = itemValue;\n return () => {\n delete values[index];\n };\n }, [index, itemValue, valuesRef]);\n useIsoLayoutEffect(() => {\n const selectedValue = store.state.value;\n let selectedCandidate = selectedValue;\n if (multiple && Array.isArray(selectedValue)) {\n // Compare against the last selected item, or `undefined` when nothing is selected — never\n // the raw array, which a custom `isItemEqualToValue` isn't expected to receive.\n selectedCandidate = selectedValue.length > 0 ? selectedValue[selectedValue.length - 1] : undefined;\n }\n if (selectedCandidate !== undefined && compareItemEquality(itemValue, selectedCandidate, isItemEqualToValue)) {\n store.set('selectedIndex', index);\n // Make sure SelectPopup can measure the selected item on first open.\n // SelectItemText can still update this ref later when focus moves.\n if (textRef.current) {\n selectedItemTextRef.current = textRef.current;\n }\n }\n }, [index, multiple, isItemEqualToValue, store, itemValue, selectedItemTextRef]);\n const pointerTypeRef = React.useRef('mouse');\n const allowMouseSelectionRef = React.useRef(false);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const state = {\n disabled,\n selected,\n highlighted\n };\n function commitSelection(event) {\n // A forced-open select (`open`/`defaultOpen`) can still receive item activations even\n // when the root is disabled or read-only, so guard the commit here too.\n if (selectDisabled || readOnly) {\n return;\n }\n const selectedValue = store.state.value;\n if (multiple) {\n const currentValue = Array.isArray(selectedValue) ? selectedValue : [];\n const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue];\n setValue(nextValue, createChangeEventDetails(REASONS.itemPress, event));\n } else {\n setValue(itemValue, createChangeEventDetails(REASONS.itemPress, event));\n setOpen(false, createChangeEventDetails(REASONS.itemPress, event));\n }\n }\n function resetDragMovement() {\n selectionRef.current.dragY = 0;\n }\n const defaultProps = {\n role: 'option',\n 'aria-selected': selected,\n tabIndex: open && highlighted ? 0 : -1,\n onKeyDown(event) {\n store.set('activeIndex', index);\n if (event.key === ' ' && typingRef.current) {\n // `useButton` skips Space activation for `role=\"option\"` items when the keydown\n // is `defaultPrevented`, keeping typeahead spaces from committing a selection.\n event.preventDefault();\n }\n },\n onClick(event) {\n const isMouseClick = pointerTypeRef.current !== 'touch';\n const clickPointerType = event.nativeEvent.pointerType;\n const isVirtualMouseClick = isMouseClick && isVirtualClick(event.nativeEvent) && (\n // Generic no-pointer `detail === 0` clicks stay tied to highlight state. Virtual\n // clicks that carry browser pointer data, including an empty string from assistive\n // technology, can activate unhighlighted items.\n clickPointerType !== undefined || highlighted);\n // With alignItemWithTrigger, opening can place an item under the cursor. Real mouse\n // clicks must start on the item, while virtual clicks represent explicit keyboard or\n // assistive technology activation.\n const isInvalidMouseClick = isMouseClick && !isVirtualMouseClick && !allowMouseSelectionRef.current;\n allowMouseSelectionRef.current = false;\n if (disabled || isInvalidMouseClick) {\n return;\n }\n commitSelection(event.nativeEvent);\n },\n onPointerEnter(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onPointerMove(event) {\n if (event.pointerType === 'mouse' && event.buttons === 1) {\n const selection = selectionRef.current;\n selection.dragY += event.movementY;\n if (selection.dragY ** 2 >= 64) {\n selection.allowUnselectedMouseUp = true;\n }\n }\n },\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n allowMouseSelectionRef.current = true;\n resetDragMovement();\n },\n onMouseUp() {\n resetDragMovement();\n if (disabled || pointerTypeRef.current === 'touch') {\n return;\n }\n\n // Regular clicks are committed by the click event.\n if (allowMouseSelectionRef.current) {\n return;\n }\n const disallowSelectedMouseUp = !selectionRef.current.allowSelectedMouseUp && selected;\n const disallowUnselectedMouseUp = !selectionRef.current.allowUnselectedMouseUp && !selected;\n if (disallowSelectedMouseUp || disallowUnselectedMouseUp) {\n return;\n }\n allowMouseSelectionRef.current = true;\n itemRef.current?.click();\n allowMouseSelectionRef.current = false;\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [buttonRef, forwardedRef, listItem.ref, itemRef],\n state,\n props: [itemProps, defaultProps, elementProps, getButtonProps]\n });\n const contextValue = React.useMemo(() => ({\n selected,\n index,\n textRef,\n selectedByFocus\n }), [selected, index, textRef, selectedByFocus]);\n return /*#__PURE__*/_jsx(SelectItemContext.Provider, {\n value: contextValue,\n children: element\n });\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItem.displayName = \"SelectItem\";","'use client';\n\nimport * as React from 'react';\nimport { useSelectItemContext } from \"../item/SelectItemContext.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\n\n/**\n * Indicates whether the select item is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectItemIndicator = /*#__PURE__*/React.forwardRef(function SelectItemIndicator(componentProps, forwardedRef) {\n const {\n selected\n } = useSelectItemContext();\n const shouldRender = componentProps.keepMounted || selected;\n if (!shouldRender) {\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return /*#__PURE__*/_jsx(Inner, {\n ...componentProps,\n ref: forwardedRef\n });\n});\n\n// Split the core implementation to avoid paying the hook costs unless the element needs to mount.\nif (process.env.NODE_ENV !== \"production\") SelectItemIndicator.displayName = \"SelectItemIndicator\";\nconst Inner = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef((componentProps, forwardedRef) => {\n const {\n render,\n className,\n style,\n keepMounted,\n ...elementProps\n } = componentProps;\n const {\n selected\n } = useSelectItemContext();\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n setMounted\n } = useTransitionStatus(selected);\n const state = {\n selected,\n transitionStatus\n };\n const element = useRenderElement('span', componentProps, {\n ref: [forwardedRef, indicatorRef],\n state,\n props: [{\n 'aria-hidden': true,\n children: '✔️'\n }, elementProps],\n stateAttributesMapping: transitionStatusMapping\n });\n useOpenChangeComplete({\n open: selected,\n ref: indicatorRef,\n onComplete() {\n if (!selected) {\n setMounted(false);\n }\n }\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") Inner.displayName = \"Inner\";","'use client';\n\nimport * as React from 'react';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectItemContext } from \"../item/SelectItemContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * A text label of the select item.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectItemText = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItemText(componentProps, forwardedRef) {\n const {\n index,\n textRef,\n selectedByFocus\n } = useSelectItemContext();\n const {\n firstItemTextRef,\n selectedItemTextRef\n } = useSelectRootContext();\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const localRef = React.useCallback(node => {\n if (!node) {\n return;\n }\n if (index === 0) {\n firstItemTextRef.current = node;\n }\n if (selectedByFocus) {\n selectedItemTextRef.current = node;\n }\n }, [firstItemTextRef, selectedItemTextRef, index, selectedByFocus]);\n const element = useRenderElement('div', componentProps, {\n ref: [localRef, forwardedRef, textRef],\n props: elementProps\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItemText.displayName = \"SelectItemText\";","'use client';\n\nimport * as React from 'react';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStore } from '@base-ui/utils/store';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { getMaxScrollOffset, normalizeScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from \"../../utils/scrollEdges.mjs\";\nimport { selectors } from \"../store.mjs\";\n\n/**\n * @internal\n */\nexport const SelectScrollArrow = /*#__PURE__*/React.forwardRef(function SelectScrollArrow(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n direction,\n keepMounted,\n ...elementProps\n } = componentProps;\n const isUp = direction === 'up';\n const {\n store,\n popupRef,\n listRef,\n handleScrollArrowVisibility,\n scrollArrowsMountedCountRef\n } = useSelectRootContext();\n const {\n side,\n scrollDownArrowRef,\n scrollUpArrowRef\n } = useSelectPositionerContext();\n const visibleSelector = isUp ? selectors.scrollUpArrowVisible : selectors.scrollDownArrowVisible;\n const stateVisible = useStore(store, visibleSelector);\n const openMethod = useStore(store, selectors.openMethod);\n\n // Scroll arrows are disabled for touch modality as they are a hover-only element.\n const visible = stateVisible && openMethod !== 'touch';\n const timeout = useTimeout();\n const scrollArrowRef = isUp ? scrollUpArrowRef : scrollDownArrowRef;\n const {\n mounted,\n transitionStatus,\n setMounted\n } = useTransitionStatus(visible);\n useIsoLayoutEffect(() => {\n scrollArrowsMountedCountRef.current += 1;\n store.set('hasScrollArrows', true);\n return () => {\n scrollArrowsMountedCountRef.current = Math.max(0, scrollArrowsMountedCountRef.current - 1);\n if (scrollArrowsMountedCountRef.current === 0) {\n store.set('hasScrollArrows', false);\n }\n };\n }, [store, scrollArrowsMountedCountRef]);\n useOpenChangeComplete({\n open: visible,\n ref: scrollArrowRef,\n onComplete() {\n if (!visible) {\n setMounted(false);\n }\n }\n });\n const state = {\n direction,\n visible,\n side,\n transitionStatus\n };\n const defaultProps = {\n 'aria-hidden': true,\n children: isUp ? '▲' : '▼',\n style: {\n position: 'absolute'\n },\n onMouseMove(event) {\n if (event.movementX === 0 && event.movementY === 0 || timeout.isStarted()) {\n return;\n }\n store.set('activeIndex', null);\n function scrollNextItem() {\n const scroller = store.state.listElement ?? popupRef.current;\n if (!scroller) {\n return;\n }\n store.set('activeIndex', null);\n handleScrollArrowVisibility(scroller);\n const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);\n const isScrolledToEdge = scrollTop === (isUp ? 0 : maxScrollTop);\n const items = listRef.current;\n if (scrollTop !== scroller.scrollTop) {\n scroller.scrollTop = scrollTop;\n }\n if (isScrolledToEdge) {\n timeout.clear();\n return;\n }\n if (items.length > 0) {\n const scrollArrowHeight = scrollArrowRef.current?.offsetHeight || 0;\n scroller.scrollTop = getTargetScrollTop(items, isUp, scrollTop, scroller.clientHeight, scrollArrowHeight, maxScrollTop);\n }\n timeout.start(40, scrollNextItem);\n }\n timeout.start(40, scrollNextItem);\n },\n onMouseLeave() {\n timeout.clear();\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, scrollArrowRef],\n state,\n props: [defaultProps, elementProps],\n stateAttributesMapping: transitionStatusMapping\n });\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectScrollArrow.displayName = \"SelectScrollArrow\";\nfunction getTargetScrollTop(items, isUp, scrollTop, clientHeight, scrollArrowHeight, maxScrollTop) {\n if (isUp) {\n let firstVisibleIndex = 0;\n const visibleTop = scrollTop + scrollArrowHeight - SCROLL_EDGE_TOLERANCE_PX;\n for (let i = 0; i < items.length; i += 1) {\n const item = items[i];\n if (item && item.offsetTop >= visibleTop) {\n firstVisibleIndex = i;\n break;\n }\n }\n const targetIndex = Math.max(0, firstVisibleIndex - 1);\n const targetItem = items[targetIndex];\n return targetIndex < firstVisibleIndex && targetItem ? normalizeScrollOffset(targetItem.offsetTop - scrollArrowHeight, maxScrollTop) : 0;\n }\n let lastVisibleIndex = items.length - 1;\n const visibleBottom = scrollTop + clientHeight - scrollArrowHeight + SCROLL_EDGE_TOLERANCE_PX;\n for (let i = 0; i < items.length; i += 1) {\n const item = items[i];\n if (item && item.offsetTop + item.offsetHeight > visibleBottom) {\n lastVisibleIndex = Math.max(0, i - 1);\n break;\n }\n }\n const targetIndex = Math.min(items.length - 1, lastVisibleIndex + 1);\n const targetItem = items[targetIndex];\n return targetIndex > lastVisibleIndex && targetItem ? normalizeScrollOffset(targetItem.offsetTop + targetItem.offsetHeight - clientHeight + scrollArrowHeight, maxScrollTop) : maxScrollTop;\n}","'use client';\n\nimport * as React from 'react';\nimport { SelectScrollArrow } from \"../scroll-arrow/SelectScrollArrow.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * An element that scrolls the select popup down when hovered. Does not render when using touch input.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectScrollDownArrow = /*#__PURE__*/React.forwardRef(function SelectScrollDownArrow(props, forwardedRef) {\n return /*#__PURE__*/_jsx(SelectScrollArrow, {\n ...props,\n ref: forwardedRef,\n direction: \"down\"\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectScrollDownArrow.displayName = \"SelectScrollDownArrow\";","'use client';\n\nimport * as React from 'react';\nimport { SelectScrollArrow } from \"../scroll-arrow/SelectScrollArrow.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * An element that scrolls the select popup up when hovered. Does not render when using touch input.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectScrollUpArrow = /*#__PURE__*/React.forwardRef(function SelectScrollUpArrow(props, forwardedRef) {\n return /*#__PURE__*/_jsx(SelectScrollArrow, {\n ...props,\n ref: forwardedRef,\n direction: \"up\"\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectScrollUpArrow.displayName = \"SelectScrollUpArrow\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectGroupContext.displayName = \"SelectGroupContext\";\nexport function useSelectGroupContext() {\n const context = React.useContext(SelectGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.' : _formatErrorMessage(56));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { SelectGroupContext } from \"./SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * Groups related select items with the corresponding label.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectGroup = /*#__PURE__*/React.forwardRef(function SelectGroup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState();\n const contextValue = React.useMemo(() => ({\n labelId,\n setLabelId\n }), [labelId, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n role: 'group',\n 'aria-labelledby': labelId\n }, elementProps]\n });\n return /*#__PURE__*/_jsx(SelectGroupContext.Provider, {\n value: contextValue,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroup.displayName = \"SelectGroup\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useSelectGroupContext } from \"../group/SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * An accessible label that is automatically associated with its parent group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectGroupLabel = /*#__PURE__*/React.forwardRef(function SelectGroupLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n setLabelId\n } = useSelectGroupContext();\n const id = useBaseUiId(idProp);\n useIsoLayoutEffect(() => {\n setLabelId(id);\n return () => {\n setLabelId(currentId => currentId === id ? undefined : currentId);\n };\n }, [id, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroupLabel.displayName = \"SelectGroupLabel\";","'use client';\n\nimport { ListboxSeparator } from \"../../utils/listbox-separator/ListboxSeparator.mjs\";\n/**\n * A visual separator between items or groups.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectSeparator = ListboxSeparator;"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAWa,KAAgC,gBAAA,EAAM,WAAW,SAA0B,GAAgB,GAAc;AACpH,QAAM,EACJ,WAAA,GACA,QAAA,GACA,aAAA,IAAc,cACd,OAAA,GACA,GAAG,EAAA,IACD;AAIJ,SAAO,GAAiB,OAAO,GAAgB;AAAA,IAC7C,OAAA,EAHA,aAAA,EAGI;AAAA,IACJ,KAAK;AAAA,IACL,OAAO,CAAC,EACN,MAAM,eACR,GAAG,CAAY;AAAA,EACjB,CAAC;AACH,CAAC;ACpBD,SAAgB,GAAiB,GAAO;AACtC,QAAM,CAAC,GAAO,CAAA,IAAA,EAAkB,SAAS;AAAA,IACvC,SAAS;AAAA,IACT,UAAU;AAAA,EACZ,CAAC;AACD,SAAK,OAAO,GAAG,GAAO,EAAM,OAAO,KACjC,EAAS;AAAA,IACP,SAAS;AAAA,IACT,UAAU,EAAM;AAAA,EAClB,CAAC,GAEI,EAAM;AACf;ACjBA,IAAa,KAAiC,gBAAA,EAAM,cAAc,IAAI;AAEtE,SAAgB,KAAuB;AACrC,QAAM,IAAA,EAAgB,WAAW,EAAiB;AAClD,MAAI,MAAY,KACd,OAAM,IAAI,MAA2IA,GAAoB,EAAE,CAAC;AAE9K,SAAO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