'use client'; /* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */ import * as React from 'react'; import PropTypes from 'prop-types'; import useForkRef from '@mui/utils/useForkRef'; import ownerDocument from '@mui/utils/ownerDocument'; import getReactElementRef from '@mui/utils/getReactElementRef'; import exactProp from '@mui/utils/exactProp'; import elementAcceptingRef from '@mui/utils/elementAcceptingRef'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; // Inspired by https://github.com/focus-trap/tabbable const candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])'].join(','); function getTabIndex(node) { const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10); if (!Number.isNaN(tabindexAttr)) { return tabindexAttr; } // Browsers do not return `tabIndex` correctly for contentEditable nodes; // https://issues.chromium.org/issues/41283952 // so if they don't have a tabindex attribute specifically set, assume it's 0. // in Chrome,
,