{"version":3,"names":["rectToClientRect","dynamic","createEffect","createMemo","omit","onCleanup","untrack","createChangeEventDetails","REASONS","composeRefs","userRef","ownerDocument","ownerWindow","FloatingFocusManager","isWebKit","mergeRootProps","resolveClassStyle","getMaxScrollOffset","SCROLL_EDGE_TOLERANCE_PX","styleDisableScrollbar","clamp","useAnimationFrame","useSelectPositionerContext","useSelectRootContext","getMaxPopupHeight","popupStyles","maxHeightStyle","maxHeight","endsWith","Number","POSITIVE_INFINITY","parsed","parseFloat","isFinite","getMaxScrollTop","scroller","scrollHeight","clientHeight","getScale","element","rect","getBoundingClientRect","width","offsetWidth","height","offsetHeight","x","y","normalizeSize","size","axis","scale","normalizeRect","TRANSFORM_STYLE_RESETS","unsetTransformStyles","popupElement","style","originalStyles","property","value","getPropertyValue","setProperty","originalValue","removeProperty","clearPositionerStyles","original","top","left","right","bottom","minHeight","marginTop","marginBottom","LIST_FUNCTIONAL_STYLES","overflow","SelectPopup","props","root","positioner","setPopupRef","el","popupRef","current","hasList","listElement","mountedNow","mounted","aligned","alignItemWithTriggerActive","listPresent","popup","shouldAdd","classList","toggle","className","key","Object","entries","String","keys","state","open","side","align","transitionStatus","reachedMaxHeight","initialPlaced","originalPositionerStyles","scrollArrowFrame","handleScrollArrowVisibility","popupEl","maxScrollTop","scrollTop","upVisible","downVisible","scrollUpArrowVisible","setScrollUpArrowVisible","scrollDownArrowVisible","setScrollDownArrowVisible","handleScrollArrowVisibilityRef","handleScroll","positionerElementActual","parent","parentElement","positionerNode","isTopPositioned","isBottomPositioned","currentHeight","doc","positionerStyles","getComputedStyle","maxPopupHeight","maxAvailableHeight","Math","min","documentElement","nextPositionerHeight","nextScrollTop","setReachedMax","scrollToMax","setHeight","handleSmallDiff","diff","targetScrollTop","heightDelta","nextHeight","overshoot","ceil","nextMaxScrollTop","target","abs","scrollHandlerRef","positionerElement","isOpen","alignActive","trigger","triggerElement","isPositioned","transition","listEl","request","restoreTransformStyles","textElement","selectedItemTextRef","valueElement","valueRef","win","triggerRect","positionerRect","triggerHeight","borderBottom","borderBottomWidth","paddingLeft","paddingRight","triggerCollisionThreshold","viewportHeight","viewportWidth","clientWidth","availableSpaceBeneathTrigger","textRect","alignedLeft","offsetY","valueRect","valueCenterFromTriggerTop","textCenterFromPositionerTop","idealHeight","maxRight","fallbackToAlignPopupToTrigger","isPinchZoomed","visualViewport","setControlledAlignItemWithTrigger","initialHeightCalc","max","topOffset","popupTop","popupHeight","textCenterY","transformOriginY","clampedY","highlightItemOnHover","selectedIndex","activeIndex","listRef","setActiveIndex","undefined","onResize","event","setOpen","windowResize","addEventListener","removeEventListener","internal","role","id","aria-multiselectable","multiple","aria-orientation","onKeyDown","keyboardActiveRef","onMouseMove","onScroll","currentTarget","data-open","data-closed","data-starting-style","data-ending-style","data-side","data-align","userClassStyle","userProps","merged","interactions","getFloatingProps","Tag","as","floatingRootContext","finalFocus"],"sources":["select-popup.tsx"],"sourcesContent":["import type { JSX, ValidComponent } from \"@solidjs/web\";\n/**\n * `<Select.Popup>` — the popup container that renders the select listbox.\n * Mirrors `packages/react/src/select/popup/SelectPopup.tsx`.\n *\n * Wraps `<FloatingFocusManager>` (non-modal per React — modal semantics\n * live on the Positioner via the InternalBackdrop + scroll-lock). When a\n * `<Select.List>` child is present, the popup becomes `role=\"presentation\"`\n * and the list element owns the listbox role; otherwise the popup itself\n * is the listbox.\n *\n * Trigger-aligned placement (`alignItemWithTrigger`) is implemented here —\n * the geometry effect measures the trigger + value + selected-item-text\n * rects and writes `positioner.style.{top,bottom,left,height,marginTop,\n * marginBottom,maxHeight}` so the selected item's text aligns with the\n * trigger's value text. The popup also wires `store.scrollUpArrowVisible` /\n * `scrollDownArrowVisible` flags (surfaced to `<Select.ScrollUpArrow>` /\n * `<Select.ScrollDownArrow>`). None of the geometry is exercisable in\n * happy-dom (0 rects); the state-machine wiring is unit-tested and the\n * math remains a browser-test gap.\n */\n\nimport { rectToClientRect } from \"@floating-ui/utils\";\nimport { dynamic } from \"@solidjs/web\";\nimport { createEffect, createMemo, omit, onCleanup, untrack } from \"solid-js\";\nimport {\n\tcreateChangeEventDetails,\n\tREASONS,\n} from \"../../internals/change-event-details\";\nimport { composeRefs, userRef } from \"../../internals/compose-refs\";\nimport { ownerDocument } from \"../../internals/dom/owner-document\";\nimport { ownerWindow } from \"../../internals/dom/owner-window\";\nimport { FloatingFocusManager } from \"../../internals/floating-ui/components/floating-focus-manager\";\nimport { isWebKit } from \"../../internals/floating-ui/detect-browser\";\nimport { mergeRootProps } from \"../../internals/merge-root-props\";\nimport { resolveClassStyle } from \"../../internals/resolve-class-style\";\nimport {\n\tgetMaxScrollOffset,\n\tSCROLL_EDGE_TOLERANCE_PX,\n} from \"../../internals/scroll-area-utils/scroll-edges\";\nimport { styleDisableScrollbar } from \"../../internals/scroll-area-utils/style-disable-scrollbar\";\nimport { clamp } from \"../../internals/slider-utils/clamp\";\nimport type { BaseUIComponentProps } from \"../../internals/types\";\nimport { useAnimationFrame } from \"../../internals/use-animation-frame\";\nimport type { TransitionStatus } from \"../../internals/use-transition-status/use-transition-status\";\nimport {\n\ttype SelectAlign,\n\ttype SelectSide,\n\tuseSelectPositionerContext,\n} from \"../positioner/select-positioner-context\";\nimport { useSelectRootContext } from \"../select-root-context\";\n\nexport interface SelectPopupState {\n\topen: boolean;\n\tside: SelectSide;\n\talign: SelectAlign;\n\ttransitionStatus: TransitionStatus;\n}\n\nexport interface SelectPopupProps\n\textends BaseUIComponentProps<\"div\", SelectPopupState> {\n\tas?: ValidComponent;\n\t/**\n\t * Element to focus when the popup closes.\n\t *  - `false`: do not move focus\n\t *  - `true`: default (trigger)\n\t *  - `HTMLElement` or ref: explicit target\n\t */\n\tfinalFocus?:\n\t\t| boolean\n\t\t| HTMLElement\n\t\t| { current: HTMLElement | null }\n\t\t| undefined;\n}\n\ntype ClientRectObject = ReturnType<typeof rectToClientRect>;\n\nfunction getMaxPopupHeight(popupStyles: CSSStyleDeclaration): number {\n\tconst maxHeightStyle = popupStyles.maxHeight || \"\";\n\tif (!maxHeightStyle.endsWith(\"px\")) return Number.POSITIVE_INFINITY;\n\tconst parsed = Number.parseFloat(maxHeightStyle);\n\treturn Number.isFinite(parsed) ? parsed : Number.POSITIVE_INFINITY;\n}\n\nfunction getMaxScrollTop(scroller: HTMLElement): number {\n\treturn getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n}\n\nfunction getScale(element: HTMLElement): { x: number; y: number } {\n\t// Approximate `@floating-ui/dom`'s `platform.getScale` — we don't bring\n\t// in the whole platform module here.\n\tconst rect = element.getBoundingClientRect();\n\tconst width = element.offsetWidth;\n\tconst height = element.offsetHeight;\n\tconst x = width > 0 ? rect.width / width : 1;\n\tconst y = height > 0 ? rect.height / height : 1;\n\treturn {\n\t\tx: Number.isFinite(x) && x !== 0 ? x : 1,\n\t\ty: Number.isFinite(y) && y !== 0 ? y : 1,\n\t};\n}\n\nfunction normalizeSize(\n\tsize: number,\n\taxis: \"x\" | \"y\",\n\tscale: { x: number; y: number },\n): number {\n\treturn size / scale[axis];\n}\n\nfunction normalizeRect(\n\trect: DOMRect | DOMRectReadOnly,\n\tscale: { x: number; y: number },\n): ClientRectObject {\n\treturn rectToClientRect({\n\t\tx: normalizeSize(rect.x, \"x\", scale),\n\t\ty: normalizeSize(rect.y, \"y\", scale),\n\t\twidth: normalizeSize(rect.width, \"x\", scale),\n\t\theight: normalizeSize(rect.height, \"y\", scale),\n\t});\n}\n\nconst TRANSFORM_STYLE_RESETS = [\n\t[\"transform\", \"none\"],\n\t[\"scale\", \"1\"],\n\t[\"translate\", \"0 0\"],\n] as const;\n\ntype TransformStyleProperty = (typeof TRANSFORM_STYLE_RESETS)[number][0];\n\nfunction unsetTransformStyles(popupElement: HTMLElement): () => void {\n\tconst { style } = popupElement;\n\tconst originalStyles = {} as Record<TransformStyleProperty, string>;\n\tfor (const [property, value] of TRANSFORM_STYLE_RESETS) {\n\t\toriginalStyles[property] = style.getPropertyValue(property);\n\t\tstyle.setProperty(property, value, \"important\");\n\t}\n\treturn () => {\n\t\tfor (const [property] of TRANSFORM_STYLE_RESETS) {\n\t\t\tconst originalValue = originalStyles[property];\n\t\t\tif (originalValue) {\n\t\t\t\tstyle.setProperty(property, originalValue);\n\t\t\t} else {\n\t\t\t\tstyle.removeProperty(property);\n\t\t\t}\n\t\t}\n\t};\n}\n\ninterface PositionerStylesSnapshot {\n\ttop: string;\n\tleft: string;\n\tright: string;\n\theight: string;\n\tbottom: string;\n\tminHeight: string;\n\tmaxHeight: string;\n\tmarginTop: string;\n\tmarginBottom: string;\n}\n\nfunction clearPositionerStyles(\n\telement: HTMLElement | null,\n\toriginal: PositionerStylesSnapshot,\n): void {\n\tif (!element) return;\n\telement.style.top = original.top;\n\telement.style.left = original.left;\n\telement.style.right = original.right;\n\telement.style.height = original.height;\n\telement.style.bottom = original.bottom;\n\telement.style.minHeight = original.minHeight;\n\telement.style.maxHeight = original.maxHeight;\n\telement.style.marginTop = original.marginTop;\n\telement.style.marginBottom = original.marginBottom;\n}\n\n/** Mirrors React's `LIST_FUNCTIONAL_STYLES`. */\nconst LIST_FUNCTIONAL_STYLES: JSX.CSSProperties = {\n\toverflow: \"auto\",\n\t\"overscroll-behavior\": \"contain\",\n};\n\nexport function SelectPopup(props: SelectPopupProps): JSX.Element {\n\tconst root = useSelectRootContext();\n\tconst positioner = useSelectPositionerContext();\n\n\t// Toggle the disable-scrollbar class imperatively via classList so the\n\t// spread boundary stays stable (a reactive `get class()` that flips\n\t// between \"\" and a class name at runtime breaks Solid 2's DOM binding\n\t// for a particular class-update path). Driven by a\n\t// render effect that reacts to `alignItemWithTriggerActive()` plus the\n\t// list-present check.\n\tconst setPopupRef = (el: HTMLElement | null): void => {\n\t\troot.popupRef.current = el;\n\t};\n\n\t// Declared as a hoisted `function` (not a `const` arrow) on purpose:\n\t// the `internal` role/id/aria-* getters below are read by the `{...merged}`\n\t// spread's render-effect, whose compute runs synchronously at creation in\n\t// Solid 2. Under CDP's renderer scheduling a re-entrant re-flush can invoke\n\t// one of those getters while this body is still suspended above its own\n\t// declaration line — a `const` binding would throw `Cannot access 'hasList'\n\t// before initialization`. A function declaration hoists with its\n\t// body, so there is no temporal dead zone. Do NOT convert back to a const.\n\tfunction hasList(): boolean {\n\t\treturn root.listElement() != null;\n\t}\n\n\tcreateEffect(\n\t\t() => ({\n\t\t\t// Track `mounted` so the effect re-fires after the popup's ref\n\t\t\t// callback has run (the ref fires during `insert` — before the\n\t\t\t// first effect apply — in Solid 2).\n\t\t\tmountedNow: root.mounted(),\n\t\t\taligned: positioner.alignItemWithTriggerActive(),\n\t\t\tlistPresent: hasList(),\n\t\t}),\n\t\t({ aligned, listPresent }) => {\n\t\t\tconst popup = root.popupRef.current;\n\t\t\tif (!popup) return;\n\t\t\tconst shouldAdd = !listPresent && aligned;\n\t\t\tpopup.classList.toggle(styleDisableScrollbar.className, shouldAdd);\n\t\t\tif (aligned && !listPresent) {\n\t\t\t\tfor (const [key, value] of Object.entries(LIST_FUNCTIONAL_STYLES)) {\n\t\t\t\t\tpopup.style.setProperty(key, String(value));\n\t\t\t\t}\n\t\t\t} else if (aligned && listPresent) {\n\t\t\t\tpopup.style.height = \"100%\";\n\t\t\t} else {\n\t\t\t\tfor (const key of Object.keys(LIST_FUNCTIONAL_STYLES)) {\n\t\t\t\t\tpopup.style.removeProperty(key);\n\t\t\t\t}\n\t\t\t\tif (popup.style.height === \"100%\") {\n\t\t\t\t\tpopup.style.removeProperty(\"height\");\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t);\n\n\tconst state = createMemo<SelectPopupState>(() => ({\n\t\topen: root.open(),\n\t\tside: positioner.side(),\n\t\talign: positioner.align(),\n\t\ttransitionStatus: root.transitionStatus(),\n\t}));\n\n\t// Note: `as`, `class`, `style`, `render`, `finalFocus` stripped at the\n\t// bottom via `omit` before user spread.\n\n\t// Geometry bookkeeping — `reachedMaxHeightRef` mirrors React's\n\t// `useRef(false)`, `initialPlacedRef` tracks whether the align effect has\n\t// run for the current open, and `originalPositionerStylesRef` captures\n\t// the positioner's styles on mount so we can restore them.\n\tlet reachedMaxHeight = false;\n\tlet initialPlaced = false;\n\tlet originalPositionerStyles: PositionerStylesSnapshot | null = null;\n\n\tconst scrollArrowFrame = useAnimationFrame();\n\n\t/**\n\t * Probes the popup / list scroller's `scrollTop` against max-scroll and\n\t * writes the `scrollUp/DownArrowVisible` flags. Mirrors React's\n\t * `handleScrollArrowVisibility` (via the same name in `popup-store-utils`\n\t * on the React side). Runs after every layout change + scroll event.\n\t */\n\tconst handleScrollArrowVisibility = (): void => {\n\t\tconst popupEl = root.popupRef.current;\n\t\tif (!popupEl) return;\n\t\tconst scroller = root.listElement() ?? popupEl;\n\t\tif (!scroller) return;\n\t\tconst maxScrollTop = getMaxScrollTop(scroller);\n\t\tconst scrollTop = scroller.scrollTop;\n\t\tconst upVisible = scrollTop > SCROLL_EDGE_TOLERANCE_PX;\n\t\tconst downVisible = scrollTop < maxScrollTop - SCROLL_EDGE_TOLERANCE_PX;\n\t\tif (root.scrollUpArrowVisible() !== upVisible) {\n\t\t\troot.setScrollUpArrowVisible(upVisible);\n\t\t}\n\t\tif (root.scrollDownArrowVisible() !== downVisible) {\n\t\t\troot.setScrollDownArrowVisible(downVisible);\n\t\t}\n\t};\n\troot.handleScrollArrowVisibilityRef.current = handleScrollArrowVisibility;\n\tonCleanup(() => {\n\t\tif (\n\t\t\troot.handleScrollArrowVisibilityRef.current ===\n\t\t\thandleScrollArrowVisibility\n\t\t) {\n\t\t\troot.handleScrollArrowVisibilityRef.current = () => {};\n\t\t}\n\t});\n\n\t/**\n\t * Incremental scroll-height management for trigger-aligned popups. When\n\t * the user scrolls to the edge, we grow the positioner to consume the\n\t * remaining space (matches the item-aligned UX React ships). Only active\n\t * when `initialPlaced && !reachedMaxHeight && alignItemWithTriggerActive`.\n\t * For the non-aligned path we simply re-probe the scroll arrows.\n\t */\n\tconst handleScroll = (scroller: HTMLElement): void => {\n\t\tconst positionerElementActual = (() => {\n\t\t\t// The positioner element is the popup's offsetParent when `position:\n\t\t\t// fixed` is used for trigger-aligned. Walk up from the popup.\n\t\t\tconst el = root.popupRef.current;\n\t\t\tif (!el) return null;\n\t\t\tconst parent = el.parentElement;\n\t\t\treturn parent;\n\t\t})();\n\t\tconst positionerNode = positionerElementActual;\n\t\tif (!positionerNode || !root.popupRef.current || !initialPlaced) return;\n\n\t\tif (reachedMaxHeight || !positioner.alignItemWithTriggerActive()) {\n\t\t\thandleScrollArrowVisibility();\n\t\t\treturn;\n\t\t}\n\n\t\tconst isTopPositioned = positionerNode.style.top === \"0px\";\n\t\tconst isBottomPositioned = positionerNode.style.bottom === \"0px\";\n\n\t\tif (!isTopPositioned && !isBottomPositioned) {\n\t\t\thandleScrollArrowVisibility();\n\t\t\treturn;\n\t\t}\n\n\t\tconst scale = getScale(positionerNode);\n\t\tconst currentHeight = normalizeSize(\n\t\t\tpositionerNode.getBoundingClientRect().height,\n\t\t\t\"y\",\n\t\t\tscale,\n\t\t);\n\t\tconst doc = ownerDocument(positionerNode);\n\t\tconst positionerStyles = getComputedStyle(positionerNode);\n\t\tconst marginTop = Number.parseFloat(positionerStyles.marginTop) || 0;\n\t\tconst marginBottom = Number.parseFloat(positionerStyles.marginBottom) || 0;\n\t\tconst maxPopupHeight = getMaxPopupHeight(\n\t\t\tgetComputedStyle(root.popupRef.current),\n\t\t);\n\t\tconst maxAvailableHeight = Math.min(\n\t\t\tdoc.documentElement.clientHeight - marginTop - marginBottom,\n\t\t\tmaxPopupHeight,\n\t\t);\n\n\t\tconst scrollTop = scroller.scrollTop;\n\t\tconst maxScrollTop = getMaxScrollTop(scroller);\n\n\t\tlet nextPositionerHeight = 0;\n\t\tlet nextScrollTop: number | null = null;\n\t\tlet setReachedMax = false;\n\t\tlet scrollToMax = false;\n\n\t\tconst setHeight = (height: number): void => {\n\t\t\tpositionerNode.style.height = `${height}px`;\n\t\t};\n\n\t\tconst handleSmallDiff = (diff: number, targetScrollTop: number): void => {\n\t\t\tconst heightDelta = clamp(diff, 0, maxAvailableHeight - currentHeight);\n\t\t\tif (heightDelta > 0) {\n\t\t\t\tsetHeight(currentHeight + heightDelta);\n\t\t\t}\n\t\t\tscroller.scrollTop = targetScrollTop;\n\t\t\tif (\n\t\t\t\tmaxAvailableHeight - (currentHeight + heightDelta) <=\n\t\t\t\tSCROLL_EDGE_TOLERANCE_PX\n\t\t\t) {\n\t\t\t\treachedMaxHeight = true;\n\t\t\t}\n\t\t\thandleScrollArrowVisibility();\n\t\t};\n\n\t\tconst diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop;\n\t\tconst nextHeight = Math.min(currentHeight + diff, maxAvailableHeight);\n\n\t\tnextPositionerHeight = nextHeight;\n\n\t\tif (diff <= SCROLL_EDGE_TOLERANCE_PX) {\n\t\t\thandleSmallDiff(diff, isTopPositioned ? maxScrollTop : 0);\n\t\t\treturn;\n\t\t}\n\n\t\tif (maxAvailableHeight - nextHeight > SCROLL_EDGE_TOLERANCE_PX) {\n\t\t\tif (isTopPositioned) {\n\t\t\t\tscrollToMax = true;\n\t\t\t} else {\n\t\t\t\tnextScrollTop = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tsetReachedMax = true;\n\t\t\tif (isBottomPositioned && scrollTop < maxScrollTop) {\n\t\t\t\tconst overshoot = currentHeight + diff - maxAvailableHeight;\n\t\t\t\tnextScrollTop = scrollTop - (diff - overshoot);\n\t\t\t}\n\t\t}\n\n\t\tnextPositionerHeight = Math.ceil(nextPositionerHeight);\n\t\tif (nextPositionerHeight !== 0) {\n\t\t\tsetHeight(nextPositionerHeight);\n\t\t}\n\n\t\tif (scrollToMax || nextScrollTop != null) {\n\t\t\tconst nextMaxScrollTop = getMaxScrollTop(scroller);\n\t\t\tconst target = scrollToMax\n\t\t\t\t? nextMaxScrollTop\n\t\t\t\t: clamp(nextScrollTop as number, 0, nextMaxScrollTop);\n\t\t\tif (Math.abs(scroller.scrollTop - target) > SCROLL_EDGE_TOLERANCE_PX) {\n\t\t\t\tscroller.scrollTop = target;\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\tsetReachedMax ||\n\t\t\tnextPositionerHeight >= maxAvailableHeight - SCROLL_EDGE_TOLERANCE_PX\n\t\t) {\n\t\t\treachedMaxHeight = true;\n\t\t}\n\t\thandleScrollArrowVisibility();\n\t};\n\n\troot.scrollHandlerRef.current = handleScroll;\n\tonCleanup(() => {\n\t\tif (root.scrollHandlerRef.current === handleScroll) {\n\t\t\troot.scrollHandlerRef.current = () => {};\n\t\t}\n\t});\n\n\t// Capture positioner styles once the popup + positioner element are\n\t// both present. Use a plain effect — we snapshot defensively; timing\n\t// isn't critical here (the trigger-aligned writes happen in the\n\t// geometry effect below).\n\tcreateEffect(\n\t\t() => ({\n\t\t\tpopup: root.popupRef.current,\n\t\t\t// Re-run on mount transitions so the snapshot is current for the\n\t\t\t// next open.\n\t\t\tmountedNow: root.mounted(),\n\t\t}),\n\t\t({ popup, mountedNow }) => {\n\t\t\tif (!popup || !mountedNow) return;\n\t\t\tconst positionerElement = popup.parentElement;\n\t\t\tif (!positionerElement || originalPositionerStyles) return;\n\t\t\toriginalPositionerStyles = {\n\t\t\t\ttop: positionerElement.style.top || \"0\",\n\t\t\t\tleft: positionerElement.style.left || \"0\",\n\t\t\t\tright: positionerElement.style.right,\n\t\t\t\theight: positionerElement.style.height,\n\t\t\t\tbottom: positionerElement.style.bottom,\n\t\t\t\tminHeight: positionerElement.style.minHeight,\n\t\t\t\tmaxHeight: positionerElement.style.maxHeight,\n\t\t\t\tmarginTop: positionerElement.style.marginTop,\n\t\t\t\tmarginBottom: positionerElement.style.marginBottom,\n\t\t\t};\n\t\t},\n\t);\n\n\t// Reset trigger-aligned geometry when the popup is not open or the\n\t// feature is inactive. Matches React's `useIsoLayoutEffect` branch.\n\tcreateEffect(\n\t\t() => ({\n\t\t\tisOpen: root.open(),\n\t\t\talignActive: positioner.alignItemWithTriggerActive(),\n\t\t}),\n\t\t({ isOpen, alignActive }) => {\n\t\t\tif (isOpen || alignActive) return;\n\t\t\tinitialPlaced = false;\n\t\t\treachedMaxHeight = false;\n\t\t\tconst popup = root.popupRef.current;\n\t\t\tconst positionerElement = popup?.parentElement;\n\t\t\tif (positionerElement && originalPositionerStyles) {\n\t\t\t\tclearPositionerStyles(positionerElement, originalPositionerStyles);\n\t\t\t}\n\t\t},\n\t);\n\n\t// Trigger-aligned placement effect. Runs as a regular effect —\n\t// happy-dom rects are all zero so the math is inert here, but the state-\n\t// machine transitions (init-placed flip, fallback-to-trigger-aligned,\n\t// transform-origin) are wired for browser coverage.\n\tcreateEffect(\n\t\t() => ({\n\t\t\tisOpen: root.open(),\n\t\t\ttrigger: root.triggerElement(),\n\t\t\talignActive: positioner.alignItemWithTriggerActive(),\n\t\t\tisPositioned: positioner.isPositioned(),\n\t\t\tmountedNow: root.mounted(),\n\t\t\ttransition: root.transitionStatus(),\n\t\t\tlistEl: root.listElement(),\n\t\t}),\n\t\t// Apply scope is unowned/untracked — wrap the entire body so\n\t\t// reactive reads inside the geometry math (`root.listElement()`,\n\t\t// `root.highlightItemOnHover()`, `root.selectedIndex()`,\n\t\t// `root.activeIndex()`) plus the writebacks\n\t\t// (`root.setActiveIndex`, `positioner.setControlledAlignItemWithTrigger`)\n\t\t// don't trip `[STRICT_READ_UNTRACKED]`. The compute object above\n\t\t// already drives re-runs on every reactive input we care about.\n\t\t({ isOpen, trigger, alignActive, isPositioned, transition }) =>\n\t\t\tuntrack(() => {\n\t\t\t\tconst popupElement = root.popupRef.current;\n\t\t\t\tif (!popupElement) return;\n\t\t\t\tconst positionerElement = popupElement.parentElement;\n\t\t\t\tif (!positionerElement) return;\n\t\t\t\tif (!isOpen || !trigger) return;\n\t\t\t\tif (alignActive && !isPositioned) return;\n\t\t\t\tif (transition === \"ending\") return;\n\n\t\t\t\tif (!alignActive) {\n\t\t\t\t\tinitialPlaced = true;\n\t\t\t\t\tscrollArrowFrame.request(handleScrollArrowVisibility);\n\t\t\t\t\tpopupElement.style.removeProperty(\"--transform-origin\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst restoreTransformStyles = unsetTransformStyles(popupElement);\n\t\t\t\tpopupElement.style.removeProperty(\"--transform-origin\");\n\n\t\t\t\ttry {\n\t\t\t\t\tconst textElement = root.selectedItemTextRef.current;\n\t\t\t\t\tconst valueElement = root.valueRef.current;\n\n\t\t\t\t\tconst positionerStyles = getComputedStyle(positionerElement);\n\t\t\t\t\tconst popupStyles = getComputedStyle(popupElement);\n\n\t\t\t\t\tconst doc = ownerDocument(trigger);\n\t\t\t\t\tconst win = ownerWindow(positionerElement);\n\t\t\t\t\tconst scale = getScale(trigger);\n\t\t\t\t\tconst triggerRect = normalizeRect(\n\t\t\t\t\t\ttrigger.getBoundingClientRect(),\n\t\t\t\t\t\tscale,\n\t\t\t\t\t);\n\t\t\t\t\tconst positionerRect = normalizeRect(\n\t\t\t\t\t\tpositionerElement.getBoundingClientRect(),\n\t\t\t\t\t\tscale,\n\t\t\t\t\t);\n\t\t\t\t\tconst triggerHeight = triggerRect.height;\n\t\t\t\t\tconst scroller = root.listElement() ?? popupElement;\n\t\t\t\t\tconst scrollHeight = scroller.scrollHeight;\n\n\t\t\t\t\tconst borderBottom =\n\t\t\t\t\t\tNumber.parseFloat(popupStyles.borderBottomWidth) || 0;\n\t\t\t\t\tconst marginTop = Number.parseFloat(positionerStyles.marginTop) || 10;\n\t\t\t\t\tconst marginBottom =\n\t\t\t\t\t\tNumber.parseFloat(positionerStyles.marginBottom) || 10;\n\t\t\t\t\tconst minHeight =\n\t\t\t\t\t\tNumber.parseFloat(positionerStyles.minHeight) || 100;\n\t\t\t\t\tconst maxPopupHeight = getMaxPopupHeight(popupStyles);\n\n\t\t\t\t\tconst paddingLeft = 5;\n\t\t\t\t\tconst paddingRight = 5;\n\t\t\t\t\tconst triggerCollisionThreshold = 20;\n\n\t\t\t\t\tconst viewportHeight =\n\t\t\t\t\t\tdoc.documentElement.clientHeight - marginTop - marginBottom;\n\t\t\t\t\tconst viewportWidth = doc.documentElement.clientWidth;\n\t\t\t\t\tconst availableSpaceBeneathTrigger =\n\t\t\t\t\t\tviewportHeight - triggerRect.bottom + triggerHeight;\n\n\t\t\t\t\tlet textRect: ClientRectObject | undefined;\n\t\t\t\t\tlet alignedLeft = triggerRect.left;\n\t\t\t\t\tlet offsetY = 0;\n\n\t\t\t\t\tif (textElement && valueElement) {\n\t\t\t\t\t\tconst valueRect = normalizeRect(\n\t\t\t\t\t\t\tvalueElement.getBoundingClientRect(),\n\t\t\t\t\t\t\tscale,\n\t\t\t\t\t\t);\n\t\t\t\t\t\ttextRect = normalizeRect(\n\t\t\t\t\t\t\ttextElement.getBoundingClientRect(),\n\t\t\t\t\t\t\tscale,\n\t\t\t\t\t\t);\n\t\t\t\t\t\talignedLeft =\n\t\t\t\t\t\t\tpositionerRect.left + (valueRect.left - textRect.left);\n\t\t\t\t\t\tconst valueCenterFromTriggerTop =\n\t\t\t\t\t\t\tvalueRect.top - triggerRect.top + valueRect.height / 2;\n\t\t\t\t\t\tconst textCenterFromPositionerTop =\n\t\t\t\t\t\t\ttextRect.top - positionerRect.top + textRect.height / 2;\n\t\t\t\t\t\toffsetY = textCenterFromPositionerTop - valueCenterFromTriggerTop;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst idealHeight =\n\t\t\t\t\t\tavailableSpaceBeneathTrigger +\n\t\t\t\t\t\toffsetY +\n\t\t\t\t\t\tmarginBottom +\n\t\t\t\t\t\tborderBottom;\n\t\t\t\t\tlet height = Math.min(viewportHeight, idealHeight);\n\t\t\t\t\tconst maxHeight = viewportHeight - marginTop - marginBottom;\n\t\t\t\t\tconst scrollTop = idealHeight - height;\n\t\t\t\t\tconst maxRight = viewportWidth - paddingRight;\n\n\t\t\t\t\tpositionerElement.style.left = `${clamp(\n\t\t\t\t\t\talignedLeft,\n\t\t\t\t\t\tpaddingLeft,\n\t\t\t\t\t\tmaxRight - positionerRect.width,\n\t\t\t\t\t)}px`;\n\t\t\t\t\tpositionerElement.style.height = `${height}px`;\n\t\t\t\t\tpositionerElement.style.maxHeight = \"auto\";\n\t\t\t\t\tpositionerElement.style.marginTop = `${marginTop}px`;\n\t\t\t\t\tpositionerElement.style.marginBottom = `${marginBottom}px`;\n\t\t\t\t\tpopupElement.style.height = \"100%\";\n\n\t\t\t\t\tconst maxScrollTop = getMaxScrollTop(scroller);\n\t\t\t\t\tconst isTopPositioned =\n\t\t\t\t\t\tscrollTop >= maxScrollTop - SCROLL_EDGE_TOLERANCE_PX;\n\n\t\t\t\t\tif (isTopPositioned) {\n\t\t\t\t\t\theight =\n\t\t\t\t\t\t\tMath.min(viewportHeight, positionerRect.height) -\n\t\t\t\t\t\t\t(scrollTop - maxScrollTop);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst fallbackToAlignPopupToTrigger =\n\t\t\t\t\t\ttriggerRect.top < triggerCollisionThreshold ||\n\t\t\t\t\t\ttriggerRect.bottom > viewportHeight - triggerCollisionThreshold ||\n\t\t\t\t\t\tMath.ceil(height) + SCROLL_EDGE_TOLERANCE_PX <\n\t\t\t\t\t\t\tMath.min(scrollHeight, minHeight);\n\t\t\t\t\tconst isPinchZoomed =\n\t\t\t\t\t\t(win.visualViewport?.scale ?? 1) !== 1 && isWebKit;\n\n\t\t\t\t\tif (fallbackToAlignPopupToTrigger || isPinchZoomed) {\n\t\t\t\t\t\tinitialPlaced = true;\n\t\t\t\t\t\tif (originalPositionerStyles) {\n\t\t\t\t\t\t\tclearPositionerStyles(\n\t\t\t\t\t\t\t\tpositionerElement,\n\t\t\t\t\t\t\t\toriginalPositionerStyles,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpositioner.setControlledAlignItemWithTrigger(false);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst initialHeightCalc = Math.max(minHeight, height);\n\n\t\t\t\t\tif (isTopPositioned) {\n\t\t\t\t\t\tconst topOffset = Math.max(0, viewportHeight - idealHeight);\n\t\t\t\t\t\tpositionerElement.style.top =\n\t\t\t\t\t\t\tpositionerRect.height >= maxHeight ? \"0\" : `${topOffset}px`;\n\t\t\t\t\t\tpositionerElement.style.height = `${height}px`;\n\t\t\t\t\t\tscroller.scrollTop = getMaxScrollTop(scroller);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionerElement.style.bottom = \"0\";\n\t\t\t\t\t\tscroller.scrollTop = scrollTop;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (textRect) {\n\t\t\t\t\t\tconst popupTop = positionerRect.top;\n\t\t\t\t\t\tconst popupHeight = positionerRect.height;\n\t\t\t\t\t\tconst textCenterY = textRect.top + textRect.height / 2;\n\t\t\t\t\t\tconst transformOriginY =\n\t\t\t\t\t\t\tpopupHeight > 0\n\t\t\t\t\t\t\t\t? ((textCenterY - popupTop) / popupHeight) * 100\n\t\t\t\t\t\t\t\t: 50;\n\t\t\t\t\t\tconst clampedY = clamp(transformOriginY, 0, 100);\n\t\t\t\t\t\tpopupElement.style.setProperty(\n\t\t\t\t\t\t\t\"--transform-origin\",\n\t\t\t\t\t\t\t`50% ${clampedY}%`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tinitialHeightCalc === viewportHeight ||\n\t\t\t\t\t\theight >= maxPopupHeight\n\t\t\t\t\t) {\n\t\t\t\t\t\treachedMaxHeight = true;\n\t\t\t\t\t}\n\n\t\t\t\t\thandleScrollArrowVisibility();\n\n\t\t\t\t\tif (\n\t\t\t\t\t\troot.highlightItemOnHover() &&\n\t\t\t\t\t\troot.selectedIndex() === null &&\n\t\t\t\t\t\troot.activeIndex() === null &&\n\t\t\t\t\t\troot.listRef.current[0] != null\n\t\t\t\t\t) {\n\t\t\t\t\t\troot.setActiveIndex(0);\n\t\t\t\t\t}\n\n\t\t\t\t\tinitialPlaced = true;\n\t\t\t\t} finally {\n\t\t\t\t\trestoreTransformStyles();\n\t\t\t\t}\n\t\t\t}),\n\t);\n\n\t// Window-resize dismisses the popup while trigger-aligned (React parity).\n\tcreateEffect(\n\t\t() => ({\n\t\t\talignActive: positioner.alignItemWithTriggerActive(),\n\t\t\tisOpen: root.open(),\n\t\t}),\n\t\t({ alignActive, isOpen }) => {\n\t\t\tif (!alignActive || !isOpen) return undefined;\n\t\t\tconst popup = root.popupRef.current;\n\t\t\tconst win = ownerWindow(popup);\n\t\t\tconst onResize = (event: UIEvent): void => {\n\t\t\t\troot.setOpen(\n\t\t\t\t\tfalse,\n\t\t\t\t\tcreateChangeEventDetails(REASONS.windowResize, event),\n\t\t\t\t);\n\t\t\t};\n\t\t\twin.addEventListener(\"resize\", onResize);\n\t\t\t// Apply scope is unowned — return cleanup instead of `onCleanup`.\n\t\t\treturn () => {\n\t\t\t\twin.removeEventListener(\"resize\", onResize);\n\t\t\t};\n\t\t},\n\t);\n\n\tconst internal = {\n\t\tget role() {\n\t\t\treturn hasList() ? \"presentation\" : \"listbox\";\n\t\t},\n\t\tget id() {\n\t\t\tif (hasList()) return \"\";\n\t\t\treturn `${root.id() ?? \"\"}-list`;\n\t\t},\n\t\tget \"aria-multiselectable\"() {\n\t\t\tif (hasList()) return \"\";\n\t\t\treturn root.multiple() ? \"true\" : \"\";\n\t\t},\n\t\tget \"aria-orientation\"() {\n\t\t\treturn hasList() ? \"\" : \"\";\n\t\t},\n\t\tonKeyDown(event: KeyboardEvent): void {\n\t\t\troot.keyboardActiveRef.current = true;\n\t\t\tvoid event;\n\t\t},\n\t\tonMouseMove(event: MouseEvent): void {\n\t\t\troot.keyboardActiveRef.current = false;\n\t\t\tvoid event;\n\t\t},\n\t\tonScroll(event: Event): void {\n\t\t\tif (root.listElement()) return;\n\t\t\tconst target = event.currentTarget as HTMLElement | null;\n\t\t\tif (target) {\n\t\t\t\troot.scrollHandlerRef.current(target);\n\t\t\t}\n\t\t},\n\t\t// popupWithTransitionStateMapping projection.\n\t\tget \"data-open\"() {\n\t\t\treturn state().open ? \"\" : undefined;\n\t\t},\n\t\tget \"data-closed\"() {\n\t\t\treturn state().open ? undefined : \"\";\n\t\t},\n\t\tget \"data-starting-style\"() {\n\t\t\treturn state().transitionStatus === \"starting\" ? \"\" : undefined;\n\t\t},\n\t\tget \"data-ending-style\"() {\n\t\t\treturn state().transitionStatus === \"ending\" ? \"\" : undefined;\n\t\t},\n\t\t// `side`/`align` are state but not in popupWithTransitionStateMapping.\n\t\t// Default projection runs unmapped keys: data-side, data-align.\n\t\tget \"data-side\"() {\n\t\t\treturn state().side;\n\t\t},\n\t\tget \"data-align\"() {\n\t\t\treturn state().align;\n\t\t},\n\t};\n\n\tconst userClassStyle = resolveClassStyle(props, () => state());\n\tconst userProps = omit(props, \"as\", \"class\", \"style\", \"attrs\", \"finalFocus\");\n\n\tlet merged: Record<string, unknown> = mergeRootProps(\n\t\troot.interactions.getFloatingProps(),\n\t\tinternal,\n\t);\n\tmerged = mergeRootProps(merged, userClassStyle);\n\tmerged = mergeRootProps(merged, userProps);\n\n\tconst Tag = dynamic(() => props.as ?? \"div\");\n\tconst popupElement = (\n\t\t<Tag {...merged} ref={composeRefs(setPopupRef, userRef(props))} />\n\t);\n\n\treturn (\n\t\t<FloatingFocusManager\n\t\t\tcontext={root.floatingRootContext}\n\t\t\tmodal={false}\n\t\t\tdisabled={!root.mounted()}\n\t\t\treturnFocus={props.finalFocus ?? true}\n\t\t\trestoreFocus=\"popup\"\n\t\t>\n\t\t\t{popupElement}\n\t\t</FloatingFocusManager>\n\t);\n}\n"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,YAAY,EAAEC,UAAU,EAAEC,IAAI,EAAEC,SAAS,EAAEC,OAAO,QAAQ,UAAU;AAC7E,SACCC,wBAAwB,EACxBC,OAAO,QACD,sCAAsC;AAC7C,SAASC,WAAW,EAAEC,OAA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