{"version":3,"names":["floor","getComputedStyle","ARROW_DOWN","ARROW_LEFT","ARROW_RIGHT","ARROW_UP","stopEvent","isDifferentGridRow","index","cols","prevRow","Math","isIndexOutOfListBounds","list","length","getMinListIndex","listRef","disabledIndices","findNonDisabledListIndex","current","getMaxListIndex","decrement","startingIndex","amount","isListIndexDisabled","getGridNavigatedIndex","event","orientation","loopFocus","onLoop","rtl","minIndex","maxIndex","prevIndex","stop","nextIndex","verticalDirection","key","rows","rowIndexMap","hasRoleRow","visibleItemCount","currentRowEl","currentRowIndex","forEach","el","idx","rowEl","closest","push","hasDomRows","inferredDomCols","row","rowLength","hasVirtualizedGaps","verticalCols","navigateVertically","direction","undefined","currentRow","currentRowEntries","colInRow","indexOf","step","nextRow","i","loopRow","clampedCol","min","targetItemIndex","returnedItemIndex","targetRow","col","candidate","navigateVerticallyWithInferredRows","rowStep","lastRowStart","rowCount","rowStart","rowEnd","verticalCandidate","maxCol","offset","lastRow","createGridCellMap","sizes","dense","cellMap","startIndex","width","height","process","env","NODE_ENV","Error","itemPlaced","targetCells","j","every","cell","getGridCellIndexOfCorner","corner","firstCellIndex","sizeItem","lastIndexOf","getGridCellIndices","indices","flatMap","cellIndex","includes","isExplicitlyDisabled","element","isElementVisible","hasAttribute","getAttribute","checkVisibility","display"],"sources":["composite.ts"],"sourcesContent":["import { floor } from \"@floating-ui/utils\";\nimport { getComputedStyle } from \"@floating-ui/utils/dom\";\n\nimport type { Dimensions, MutableRef } from \"../types\";\nimport { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from \"./constants\";\nimport { stopEvent } from \"./event\";\n\n/**\n * List-nav / grid-nav math. Ported 1:1 from the React source with only\n * framework-specific substitutions:\n *\n * - `React.KeyboardEvent` → native `KeyboardEvent`. Solid hands handlers\n *   the raw event, and `.key` / `.preventDefault` are identical.\n * - `React.RefObject<T[]>` → our `MutableRef<T[]>` (see `../types.ts`),\n *   whose `.current` is a mutable slot.\n *\n * Everything else — `isElementVisible`, grid cell layout, disabled-index\n * probing — is pure data/DOM work.\n */\n\ntype DisabledIndices = ReadonlyArray<number> | ((index: number) => boolean);\n\nexport function isDifferentGridRow(\n\tindex: number,\n\tcols: number,\n\tprevRow: number,\n): boolean {\n\treturn Math.floor(index / cols) !== prevRow;\n}\n\nexport function isIndexOutOfListBounds(\n\tlist: Array<HTMLElement | null>,\n\tindex: number,\n): boolean {\n\treturn index < 0 || index >= list.length;\n}\n\nexport function getMinListIndex(\n\tlistRef: MutableRef<ReadonlyArray<HTMLElement | null>>,\n\tdisabledIndices?: DisabledIndices | undefined,\n): number {\n\treturn findNonDisabledListIndex(listRef.current, { disabledIndices });\n}\n\nexport function getMaxListIndex(\n\tlistRef: MutableRef<Array<HTMLElement | null>>,\n\tdisabledIndices?: DisabledIndices | undefined,\n): number {\n\treturn findNonDisabledListIndex(listRef.current, {\n\t\tdecrement: true,\n\t\tstartingIndex: listRef.current.length,\n\t\tdisabledIndices,\n\t});\n}\n\nexport function findNonDisabledListIndex(\n\tlist: ReadonlyArray<HTMLElement | null>,\n\t{\n\t\tstartingIndex = -1,\n\t\tdecrement = false,\n\t\tdisabledIndices,\n\t\tamount = 1,\n\t}: {\n\t\tstartingIndex?: number | undefined;\n\t\tdecrement?: boolean | undefined;\n\t\tdisabledIndices?: DisabledIndices | undefined;\n\t\tamount?: number | undefined;\n\t} = {},\n): number {\n\tlet index = startingIndex;\n\tdo {\n\t\tindex += decrement ? -amount : amount;\n\t} while (\n\t\tindex >= 0 &&\n\t\tindex <= list.length - 1 &&\n\t\tisListIndexDisabled(list, index, disabledIndices)\n\t);\n\n\treturn index;\n}\n\nexport function getGridNavigatedIndex(\n\tlist: Array<HTMLElement | null>,\n\t{\n\t\tevent,\n\t\torientation,\n\t\tloopFocus,\n\t\tonLoop,\n\t\trtl,\n\t\tcols,\n\t\tdisabledIndices,\n\t\tminIndex,\n\t\tmaxIndex,\n\t\tprevIndex,\n\t\tstopEvent: stop = false,\n\t}: {\n\t\tevent: KeyboardEvent;\n\t\torientation: \"horizontal\" | \"vertical\" | \"both\";\n\t\tloopFocus: boolean;\n\t\tonLoop?:\n\t\t\t| ((event: KeyboardEvent, prevIndex: number, nextIndex: number) => number)\n\t\t\t| undefined;\n\t\trtl: boolean;\n\t\tcols: number;\n\t\tdisabledIndices: DisabledIndices | undefined;\n\t\tminIndex: number;\n\t\tmaxIndex: number;\n\t\tprevIndex: number;\n\t\tstopEvent?: boolean | undefined;\n\t},\n): number {\n\tlet nextIndex = prevIndex;\n\n\tlet verticalDirection: \"up\" | \"down\" | undefined;\n\tif (event.key === ARROW_UP) {\n\t\tverticalDirection = \"up\";\n\t} else if (event.key === ARROW_DOWN) {\n\t\tverticalDirection = \"down\";\n\t}\n\n\tif (verticalDirection) {\n\t\t// Detect row structure only when handling vertical navigation — keeps\n\t\t// non-vertical key paths free from row-inference work.\n\t\tconst rows: number[][] = [];\n\t\tconst rowIndexMap: number[] = [];\n\t\tlet hasRoleRow = false;\n\t\tlet visibleItemCount = 0;\n\t\t{\n\t\t\tlet currentRowEl: Element | null = null;\n\t\t\tlet currentRowIndex = -1;\n\n\t\t\tlist.forEach((el, idx) => {\n\t\t\t\tif (el == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisibleItemCount += 1;\n\n\t\t\t\tconst rowEl = el.closest('[role=\"row\"]');\n\t\t\t\tif (rowEl) {\n\t\t\t\t\thasRoleRow = true;\n\t\t\t\t}\n\n\t\t\t\tif (rowEl !== currentRowEl || currentRowIndex === -1) {\n\t\t\t\t\tcurrentRowEl = rowEl;\n\t\t\t\t\tcurrentRowIndex += 1;\n\t\t\t\t\trows[currentRowIndex] = [];\n\t\t\t\t}\n\t\t\t\t// biome-ignore lint/style/noNonNullAssertion: row is populated on lines above.\n\t\t\t\trows[currentRowIndex]!.push(idx);\n\t\t\t\trowIndexMap[idx] = currentRowIndex;\n\t\t\t});\n\t\t}\n\n\t\tlet hasDomRows = false;\n\t\tlet inferredDomCols = 0;\n\n\t\tif (hasRoleRow) {\n\t\t\tfor (const row of rows) {\n\t\t\t\tconst rowLength = row.length;\n\t\t\t\tif (rowLength > inferredDomCols) {\n\t\t\t\t\tinferredDomCols = rowLength;\n\t\t\t\t}\n\t\t\t\tif (rowLength !== cols) {\n\t\t\t\t\thasDomRows = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst hasVirtualizedGaps = hasDomRows && visibleItemCount < list.length;\n\t\tconst verticalCols = inferredDomCols || cols;\n\n\t\tconst navigateVertically = (direction: \"up\" | \"down\") => {\n\t\t\tif (!hasDomRows || prevIndex === -1) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst currentRow = rowIndexMap[prevIndex];\n\t\t\tif (currentRow == null) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst currentRowEntries = rows[currentRow];\n\t\t\tif (!currentRowEntries) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst colInRow = currentRowEntries.indexOf(prevIndex);\n\t\t\tconst step = direction === \"up\" ? -1 : 1;\n\n\t\t\tfor (\n\t\t\t\tlet nextRow = currentRow + step, i = 0;\n\t\t\t\ti < rows.length;\n\t\t\t\ti += 1, nextRow += step\n\t\t\t) {\n\t\t\t\tif (nextRow < 0 || nextRow >= rows.length) {\n\t\t\t\t\tif (!loopFocus || hasVirtualizedGaps) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\tnextRow = nextRow < 0 ? rows.length - 1 : 0;\n\t\t\t\t\tif (onLoop) {\n\t\t\t\t\t\tconst loopRow = rows[nextRow];\n\t\t\t\t\t\tif (loopRow && loopRow.length > 0) {\n\t\t\t\t\t\t\tconst clampedCol = Math.min(colInRow, loopRow.length - 1);\n\t\t\t\t\t\t\tconst targetItemIndex = loopRow[clampedCol] ?? loopRow[0];\n\t\t\t\t\t\t\tif (targetItemIndex != null) {\n\t\t\t\t\t\t\t\tconst returnedItemIndex = onLoop(\n\t\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\t\tprevIndex,\n\t\t\t\t\t\t\t\t\ttargetItemIndex,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tnextRow = rowIndexMap[returnedItemIndex] ?? nextRow;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst targetRow = rows[nextRow];\n\t\t\t\tif (!targetRow) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfor (\n\t\t\t\t\tlet col = Math.min(colInRow, targetRow.length - 1);\n\t\t\t\t\tcol >= 0;\n\t\t\t\t\tcol -= 1\n\t\t\t\t) {\n\t\t\t\t\tconst candidate = targetRow[col];\n\t\t\t\t\tif (\n\t\t\t\t\t\tcandidate != null &&\n\t\t\t\t\t\t!isListIndexDisabled(list, candidate, disabledIndices)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn candidate;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t};\n\n\t\tconst navigateVerticallyWithInferredRows = (direction: \"up\" | \"down\") => {\n\t\t\tif (!hasVirtualizedGaps || prevIndex === -1) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst colInRow = prevIndex % verticalCols;\n\t\t\tconst rowStep = direction === \"up\" ? -verticalCols : verticalCols;\n\t\t\tconst lastRowStart = maxIndex - (maxIndex % verticalCols);\n\t\t\tconst rowCount = floor(maxIndex / verticalCols) + 1;\n\n\t\t\tfor (\n\t\t\t\tlet rowStart = prevIndex - colInRow + rowStep, i = 0;\n\t\t\t\ti < rowCount;\n\t\t\t\ti += 1, rowStart += rowStep\n\t\t\t) {\n\t\t\t\tif (rowStart < 0 || rowStart > maxIndex) {\n\t\t\t\t\tif (!loopFocus) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\trowStart = rowStart < 0 ? lastRowStart : 0;\n\t\t\t\t}\n\t\t\t\tconst rowEnd = Math.min(rowStart + verticalCols - 1, maxIndex);\n\t\t\t\tfor (\n\t\t\t\t\tlet candidate = Math.min(rowStart + colInRow, rowEnd);\n\t\t\t\t\tcandidate >= rowStart;\n\t\t\t\t\tcandidate -= 1\n\t\t\t\t) {\n\t\t\t\t\tif (!isListIndexDisabled(list, candidate, disabledIndices)) {\n\t\t\t\t\t\treturn candidate;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn undefined;\n\t\t};\n\n\t\tif (stop) {\n\t\t\tstopEvent(event);\n\t\t}\n\n\t\tconst verticalCandidate =\n\t\t\tnavigateVertically(verticalDirection) ??\n\t\t\tnavigateVerticallyWithInferredRows(verticalDirection);\n\n\t\tif (verticalCandidate !== undefined) {\n\t\t\tnextIndex = verticalCandidate;\n\t\t} else if (prevIndex === -1) {\n\t\t\tnextIndex = verticalDirection === \"up\" ? maxIndex : minIndex;\n\t\t} else {\n\t\t\tnextIndex = findNonDisabledListIndex(list, {\n\t\t\t\tstartingIndex: prevIndex,\n\t\t\t\tamount: verticalCols,\n\t\t\t\tdecrement: verticalDirection === \"up\",\n\t\t\t\tdisabledIndices,\n\t\t\t});\n\n\t\t\tif (loopFocus) {\n\t\t\t\tif (\n\t\t\t\t\tverticalDirection === \"up\" &&\n\t\t\t\t\t(prevIndex - verticalCols < minIndex || nextIndex < 0)\n\t\t\t\t) {\n\t\t\t\t\tconst col = prevIndex % verticalCols;\n\t\t\t\t\tconst maxCol = maxIndex % verticalCols;\n\t\t\t\t\tconst offset = maxIndex - (maxCol - col);\n\n\t\t\t\t\tif (maxCol === col) {\n\t\t\t\t\t\tnextIndex = maxIndex;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextIndex = maxCol > col ? offset : offset - verticalCols;\n\t\t\t\t\t}\n\t\t\t\t\tif (onLoop) {\n\t\t\t\t\t\tnextIndex = onLoop(event, prevIndex, nextIndex);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tverticalDirection === \"down\" &&\n\t\t\t\t\tprevIndex + verticalCols > maxIndex\n\t\t\t\t) {\n\t\t\t\t\tnextIndex = findNonDisabledListIndex(list, {\n\t\t\t\t\t\tstartingIndex: (prevIndex % verticalCols) - verticalCols,\n\t\t\t\t\t\tamount: verticalCols,\n\t\t\t\t\t\tdisabledIndices,\n\t\t\t\t\t});\n\t\t\t\t\tif (onLoop) {\n\t\t\t\t\t\tnextIndex = onLoop(event, prevIndex, nextIndex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isIndexOutOfListBounds(list, nextIndex)) {\n\t\t\tnextIndex = prevIndex;\n\t\t}\n\t}\n\n\t// Remains on the same row/column.\n\tif (orientation === \"both\") {\n\t\tconst prevRow = floor(prevIndex / cols);\n\n\t\tif (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {\n\t\t\tif (stop) {\n\t\t\t\tstopEvent(event);\n\t\t\t}\n\n\t\t\tif (prevIndex % cols !== cols - 1) {\n\t\t\t\tnextIndex = findNonDisabledListIndex(list, {\n\t\t\t\t\tstartingIndex: prevIndex,\n\t\t\t\t\tdisabledIndices,\n\t\t\t\t});\n\n\t\t\t\tif (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {\n\t\t\t\t\tnextIndex = findNonDisabledListIndex(list, {\n\t\t\t\t\t\tstartingIndex: prevIndex - (prevIndex % cols) - 1,\n\t\t\t\t\t\tdisabledIndices,\n\t\t\t\t\t});\n\t\t\t\t\tif (onLoop) {\n\t\t\t\t\t\tnextIndex = onLoop(event, prevIndex, nextIndex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (loopFocus) {\n\t\t\t\tnextIndex = findNonDisabledListIndex(list, {\n\t\t\t\t\tstartingIndex: prevIndex - (prevIndex % cols) - 1,\n\t\t\t\t\tdisabledIndices,\n\t\t\t\t});\n\t\t\t\tif (onLoop) {\n\t\t\t\t\tnextIndex = onLoop(event, prevIndex, nextIndex);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isDifferentGridRow(nextIndex, cols, prevRow)) {\n\t\t\t\tnextIndex = prevIndex;\n\t\t\t}\n\t\t}\n\n\t\tif (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {\n\t\t\tif (stop) {\n\t\t\t\tstopEvent(event);\n\t\t\t}\n\n\t\t\tif (prevIndex % cols !== 0) {\n\t\t\t\tnextIndex = findNonDisabledListIndex(list, {\n\t\t\t\t\tstartingIndex: prevIndex,\n\t\t\t\t\tdecrement: true,\n\t\t\t\t\tdisabledIndices,\n\t\t\t\t});\n\n\t\t\t\tif (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {\n\t\t\t\t\tnextIndex = findNonDisabledListIndex(list, {\n\t\t\t\t\t\tstartingIndex: prevIndex + (cols - (prevIndex % cols)),\n\t\t\t\t\t\tdecrement: true,\n\t\t\t\t\t\tdisabledIndices,\n\t\t\t\t\t});\n\t\t\t\t\tif (onLoop) {\n\t\t\t\t\t\tnextIndex = onLoop(event, prevIndex, nextIndex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (loopFocus) {\n\t\t\t\tnextIndex = findNonDisabledListIndex(list, {\n\t\t\t\t\tstartingIndex: prevIndex + (cols - (prevIndex % cols)),\n\t\t\t\t\tdecrement: true,\n\t\t\t\t\tdisabledIndices,\n\t\t\t\t});\n\t\t\t\tif (onLoop) {\n\t\t\t\t\tnextIndex = onLoop(event, prevIndex, nextIndex);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isDifferentGridRow(nextIndex, cols, prevRow)) {\n\t\t\t\tnextIndex = prevIndex;\n\t\t\t}\n\t\t}\n\n\t\tconst lastRow = floor(maxIndex / cols) === prevRow;\n\n\t\tif (isIndexOutOfListBounds(list, nextIndex)) {\n\t\t\tif (loopFocus && lastRow) {\n\t\t\t\tnextIndex =\n\t\t\t\t\tevent.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)\n\t\t\t\t\t\t? maxIndex\n\t\t\t\t\t\t: findNonDisabledListIndex(list, {\n\t\t\t\t\t\t\t\tstartingIndex: prevIndex - (prevIndex % cols) - 1,\n\t\t\t\t\t\t\t\tdisabledIndices,\n\t\t\t\t\t\t\t});\n\t\t\t\tif (onLoop) {\n\t\t\t\t\tnextIndex = onLoop(event, prevIndex, nextIndex);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnextIndex = prevIndex;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell. */\nexport function createGridCellMap(\n\tsizes: Dimensions[],\n\tcols: number,\n\tdense: boolean,\n): (number | undefined)[] {\n\tconst cellMap: (number | undefined)[] = [];\n\tlet startIndex = 0;\n\tsizes.forEach(({ width, height }, index) => {\n\t\tif (width > cols) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`[Floating UI]: Invalid grid - item width at index ${index} is greater than grid columns`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tlet itemPlaced = false;\n\t\tif (dense) {\n\t\t\tstartIndex = 0;\n\t\t}\n\t\twhile (!itemPlaced) {\n\t\t\tconst targetCells: number[] = [];\n\t\t\tfor (let i = 0; i < width; i += 1) {\n\t\t\t\tfor (let j = 0; j < height; j += 1) {\n\t\t\t\t\ttargetCells.push(startIndex + i + j * cols);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (\n\t\t\t\t(startIndex % cols) + width <= cols &&\n\t\t\t\ttargetCells.every((cell) => cellMap[cell] == null)\n\t\t\t) {\n\t\t\t\ttargetCells.forEach((cell) => {\n\t\t\t\t\tcellMap[cell] = index;\n\t\t\t\t});\n\t\t\t\titemPlaced = true;\n\t\t\t} else {\n\t\t\t\tstartIndex += 1;\n\t\t\t}\n\t\t}\n\t});\n\n\treturn [...cellMap];\n}\n\n/** Gets cell index of an item's corner, or -1 when index is -1. */\nexport function getGridCellIndexOfCorner(\n\tindex: number,\n\tsizes: Dimensions[],\n\tcellMap: (number | undefined)[],\n\tcols: number,\n\tcorner: \"tl\" | \"tr\" | \"bl\" | \"br\",\n): number {\n\tif (index === -1) {\n\t\treturn -1;\n\t}\n\n\tconst firstCellIndex = cellMap.indexOf(index);\n\tconst sizeItem = sizes[index];\n\n\tswitch (corner) {\n\t\tcase \"tl\":\n\t\t\treturn firstCellIndex;\n\t\tcase \"tr\":\n\t\t\tif (!sizeItem) {\n\t\t\t\treturn firstCellIndex;\n\t\t\t}\n\t\t\treturn firstCellIndex + sizeItem.width - 1;\n\t\tcase \"bl\":\n\t\t\tif (!sizeItem) {\n\t\t\t\treturn firstCellIndex;\n\t\t\t}\n\t\t\treturn firstCellIndex + (sizeItem.height - 1) * cols;\n\t\tcase \"br\":\n\t\t\treturn cellMap.lastIndexOf(index);\n\t\tdefault:\n\t\t\treturn -1;\n\t}\n}\n\n/** Gets all cell indices that correspond to the specified indices. */\nexport function getGridCellIndices(\n\tindices: (number | undefined)[],\n\tcellMap: (number | undefined)[],\n): number[] {\n\treturn cellMap.flatMap((index, cellIndex) =>\n\t\tindices.includes(index) ? [cellIndex] : [],\n\t);\n}\n\nexport function isListIndexDisabled(\n\tlist: ReadonlyArray<HTMLElement | null>,\n\tindex: number,\n\tdisabledIndices?: DisabledIndices,\n): boolean {\n\tconst isExplicitlyDisabled =\n\t\ttypeof disabledIndices === \"function\"\n\t\t\t? disabledIndices(index)\n\t\t\t: (disabledIndices?.includes(index) ?? false);\n\n\tif (isExplicitlyDisabled) {\n\t\treturn true;\n\t}\n\n\tconst element = list[index];\n\tif (!element) {\n\t\treturn false;\n\t}\n\n\tif (!isElementVisible(element)) {\n\t\treturn true;\n\t}\n\n\treturn (\n\t\t!disabledIndices &&\n\t\t(element.hasAttribute(\"disabled\") ||\n\t\t\telement.getAttribute(\"aria-disabled\") === \"true\")\n\t);\n}\n\nexport function isElementVisible(element: Element): boolean {\n\tif (typeof element.checkVisibility === \"function\") {\n\t\treturn element.checkVisibility();\n\t}\n\treturn getComputedStyle(element).display !== \"none\";\n}\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,gBAAgB,QAAQ,wBAAwB;AAGzD,SAASC,UAAU,EAAEC,UAAU,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,aAAa;AAC3E,SAASC,SAAS,QAAQ,SAAS;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASC,kBAAkBA,CACjCC,KAAa,EACbC,IAAY,EACZC,OAAe,EACL;EACV,OAAOC,IAAI,CAACX,KAAK,CAACQ,KAAK,GAAGC,IAAI,CAAC,KAAKC,OAAO;AAC5C;AAEA,OAAO,SAASE,sBAAsBA,CACrCC,IAA+B,EAC/BL,KAAa,EACH;EACV,OAAOA,KAAK,GAAG,CAAC,IAAIA,KAAK,IAAIK,IAAI,CAACC,MAAM;AACzC;AAEA,OAAO,SAASC,eAAeA,CAC9BC,OAAsD,EACtDC,eAA6C,EACpC;EACT,OAAOC,wBAAwB,CAACF,OAAO,CAACG,OAAO,EAAE;IAAEF;EAAgB,CAAC,CAAC;AACtE;AAEA,OAAO,SAASG,eAAeA,CAC9BJ,OAA8C,EAC9CC,eAA6C,EACpC;EACT,OAAOC,wBAAwB,CAACF,OAAO,CAACG,OAAO,EAAE;IAChDE,SAAS,EAAE,IAAI;IACfC,aAAa,EAAEN,OAAO,CAACG,OAAO,CAACL,MAAM;IACrCG;EACD,CAAC,CAAC;AACH;AAEA,OAAO,SAASC,wBAAwBA,CACvCL,IAAuC,EACvC;EACCS,aAAa,GAAG,CAAC,CAAC;EAClBD,SAAS,GAAG,KAAK;EACjBJ,eAAe;EACfM,MAAM,GAAG;AAMV,CAAC,GAAG,CAAC,CAAC,EACG;EACT,IAAIf,KAAK,GAAGc,aAAa;EACzB,GAAG;IACFd,KAAK,IAAIa,SAAS,GAAG,CAACE,MAAM,GAAGA,MAAM;EACtC,CA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