(our hidden element)\n // react-dom in dev mode will warn about this. There doesn't seem to be a way to render arbitrary\n // user Head without hitting this issue (our hidden element could be just \"new Document()\", but\n // this can only have 1 child, and we don't control what is being rendered so that's not an option)\n // instead we continue to render to
, and just silence warnings for and elements\n // https://github.com/facebook/react/blob/e2424f33b3ad727321fc12e75c5e94838e84c2b5/packages/react-dom-bindings/src/client/validateDOMNesting.js#L498-L520\n const originalConsoleError = console.error.bind(console)\n console.error = (...args) => {\n if (\n Array.isArray(args) &&\n args.length >= 2 &&\n args[0]?.includes?.(`validateDOMNesting(...): %s cannot appear as`) &&\n (args[1] === `` || args[1] === ``)\n ) {\n return undefined\n }\n return originalConsoleError(...args)\n }\n\n /* We set up observer to be able to regenerate after react-refresh\n updates our hidden element.\n */\n const observer = new MutationObserver(onHeadRendered)\n observer.observe(hiddenRoot, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true,\n })\n}\n\nexport function headHandlerForBrowser({\n pageComponent,\n staticQueryResults,\n pageComponentProps,\n}) {\n useEffect(() => {\n if (pageComponent?.Head) {\n headExportValidator(pageComponent.Head)\n\n const { render } = reactDOMUtils()\n\n const HeadElement = (\n
\n )\n\n const WrapHeadElement = apiRunner(\n `wrapRootElement`,\n { element: HeadElement },\n HeadElement,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n render(\n // just a hack to call the callback after react has done first render\n // Note: In dev, we call onHeadRendered twice( in FireCallbackInEffect and after mutualution observer dectects initail render into hiddenRoot) this is for hot reloading\n // In Prod we only call onHeadRendered in FireCallbackInEffect to render to head\n
\n \n {WrapHeadElement}\n \n ,\n hiddenRoot\n )\n }\n\n return () => {\n removePrevHeadElements()\n removeHtmlAndBodyAttributes(keysOfHtmlAndBodyAttributes)\n }\n })\n}\n","import React, { Suspense, createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\nimport { headHandlerForBrowser } from \"./head/head-export-handler-for-browser\"\n\n// Renders page\nfunction PageRenderer(props) {\n const pageComponentProps = {\n ...props,\n params: {\n ...grabMatchParams(props.location.pathname),\n ...props.pageResources.json.pageContext.__params,\n },\n }\n\n const preferDefault = m => (m && m.default) || m\n\n let pageElement\n if (props.pageResources.partialHydration) {\n pageElement = props.pageResources.partialHydration\n } else {\n pageElement = createElement(preferDefault(props.pageResources.component), {\n ...pageComponentProps,\n key: props.path || props.pageResources.page.path,\n })\n }\n\n const pageComponent = props.pageResources.head\n\n headHandlerForBrowser({\n pageComponent,\n staticQueryResults: props.pageResources.staticQueryResults,\n pageComponentProps,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n {\n element: pageElement,\n props: pageComponentProps,\n },\n pageElement,\n ({ result }) => {\n return { element: result, props: pageComponentProps }\n }\n ).pop()\n\n return wrappedPage\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport { maybeGetBrowserRedirect } from \"./redirect-utils.js\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport {\n navigate as reachNavigate,\n globalHistory,\n} from \"@gatsbyjs/reach-router\"\nimport { parsePath } from \"gatsby-link\"\n\nfunction maybeRedirect(pathname) {\n const redirect = maybeGetBrowserRedirect(pathname)\n const { hash, search } = window.location\n\n if (redirect != null) {\n window.___replace(redirect.toPath + search + hash)\n return true\n } else {\n return false\n }\n}\n\n// Catch unhandled chunk loading errors and force a restart of the app.\nlet nextRoute = ``\n\nwindow.addEventListener(`unhandledrejection`, event => {\n if (/loading chunk \\d* failed./i.test(event.reason)) {\n if (nextRoute) {\n window.location.pathname = nextRoute\n }\n }\n})\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n nextRoute = location.pathname\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n const { pathname, search, hash } = parsePath(to)\n const redirect = maybeGetBrowserRedirect(pathname)\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath + search + hash\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname + search + hash\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname + search).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname + search + hash\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n // FIXME this is actually a big code smell, we should fix this\n // eslint-disable-next-line @babel/no-invalid-this\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
\n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(nextProps) {\n if (compareLocationProps(this.props.location, nextProps.location)) {\n onPreRouteUpdate(nextProps.location, this.props.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n
\n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates, maybeGetBrowserRedirect }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources:\n pageResources ||\n loader.loadPageSync(location.pathname + location.search, {\n withErrorDetails: true,\n }),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(\n location.pathname + location.search,\n {\n withErrorDetails: true,\n }\n )\n\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(\n nextProps.location.pathname + nextProps.location.search\n )\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (\n process.env.NODE_ENV !== `production` &&\n (!this.state.pageResources ||\n this.state.pageResources.status === PageResourceStatus.Error)\n ) {\n const message = `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n if (this.state.pageResources?.error) {\n console.error(message)\n throw this.state.pageResources.error\n }\n\n throw new Error(message)\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport { Router, navigate, Location, BaseContext } from \"@gatsbyjs/reach-router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport { StaticQueryContext } from \"./static-query\"\nimport {\n SlicesMapContext,\n SlicesContext,\n SlicesResultsContext,\n} from \"./slice/context\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n getSliceResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\nimport { reactDOMUtils } from \"./react-dom-utils\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths, window.pageData)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nconst { render, hydrate } = reactDOMUtils()\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\nconst reloadStorageKey = `gatsby-reload-compilation-hash-match`\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).filter(Boolean).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n
\n \n \n )\n\n const DataContext = React.createContext({})\n\n const slicesContext = {\n renderEnvironment: `browser`,\n }\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n
\n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n const sliceResults = getSliceResults()\n\n return (\n \n \n \n \n \n {children}\n \n \n \n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n
\n {({ pageResources, location }) => (\n \n \n \n \n \n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). SSR\n // page paths might include search params, while SSG and DSG won't.\n // If page path include search params we also compare query params.\n // But only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !==\n browserLoc.pathname + (pagePath.includes(`?`) ? browserLoc.search : ``) &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath.match(/^\\/(404|500)(\\/?|.html)$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(\n __BASE_PATH__ +\n pagePath +\n (!pagePath.includes(`?`) ? browserLoc.search : ``) +\n browserLoc.hash,\n {\n replace: true,\n }\n )\n }\n\n // It's possible that sessionStorage can throw an exception if access is not granted, see https://github.com/gatsbyjs/gatsby/issues/34512\n const getSessionStorage = () => {\n try {\n return sessionStorage\n } catch {\n return null\n }\n }\n\n publicLoader.loadPage(browserLoc.pathname + browserLoc.search).then(page => {\n const sessionStorage = getSessionStorage()\n\n if (\n page?.page?.webpackCompilationHash &&\n page.page.webpackCompilationHash !== window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n // We have not matching html + js (inlined `window.___webpackCompilationHash`)\n // with our data (coming from `app-data.json` file). This can cause issues such as\n // errors trying to load static queries (as list of static queries is inside `page-data`\n // which might not match to currently loaded `.js` scripts).\n // We are making attempt to reload if hashes don't match, but we also have to handle case\n // when reload doesn't fix it (possibly broken deploy) so we don't end up in infinite reload loop\n if (sessionStorage) {\n const isReloaded = sessionStorage.getItem(reloadStorageKey) === `1`\n\n if (!isReloaded) {\n sessionStorage.setItem(reloadStorageKey, `1`)\n window.location.reload(true)\n return\n }\n }\n }\n\n if (sessionStorage) {\n sessionStorage.removeItem(reloadStorageKey)\n }\n\n if (!page || page.status === PageResourceStatus.Error) {\n const message = `page resources for ${browserLoc.pathname} not found. Not rendering React`\n\n // if the chunk throws an error we want to capture the real error\n // This should help with https://github.com/gatsbyjs/gatsby/issues/19618\n if (page && page.error) {\n console.error(message)\n throw page.error\n }\n\n throw new Error(message)\n }\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element:
},\n
,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = function App() {\n const onClientEntryRanRef = React.useRef(false)\n\n React.useEffect(() => {\n if (!onClientEntryRanRef.current) {\n onClientEntryRanRef.current = true\n if (performance.mark) {\n performance.mark(`onInitialClientRender`)\n }\n\n apiRunner(`onInitialClientRender`)\n }\n }, [])\n\n return
{SiteRoot}\n }\n\n const focusEl = document.getElementById(`gatsby-focus-wrapper`)\n\n // Client only pages have any empty body so we just do a normal\n // render to avoid React complaining about hydration mis-matches.\n let defaultRenderer = render\n if (focusEl && focusEl.children.length) {\n defaultRenderer = hydrate\n }\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n defaultRenderer\n )[0]\n\n function runRender() {\n const rootElement =\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : null\n\n renderer(
, rootElement)\n }\n\n // https://github.com/madrobby/zepto/blob/b5ed8d607f67724788ec9ff492be297f64d47dfc/src/zepto.js#L439-L450\n // TODO remove IE 10 support\n const doc = document\n if (\n doc.readyState === `complete` ||\n (doc.readyState !== `loading` && !doc.documentElement.doScroll)\n ) {\n setTimeout(function () {\n runRender()\n }, 0)\n } else {\n const handler = function () {\n doc.removeEventListener(`DOMContentLoaded`, handler, false)\n window.removeEventListener(`load`, handler, false)\n\n runRender()\n }\n\n doc.addEventListener(`DOMContentLoaded`, handler, false)\n window.addEventListener(`load`, handler, false)\n }\n\n return\n })\n})\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","const map = new WeakMap()\n\nexport function reactDOMUtils() {\n const reactDomClient = require(`react-dom/client`)\n\n const render = (Component, el) => {\n let root = map.get(el)\n if (!root) {\n map.set(el, (root = reactDomClient.createRoot(el)))\n }\n root.render(Component)\n }\n\n const hydrate = (Component, el) => reactDomClient.hydrateRoot(el, Component)\n\n return { render, hydrate }\n}\n","import redirects from \"./redirects.json\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nexport function maybeGetBrowserRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n return redirect\n}\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","import React from \"react\"\n\nconst SlicesResultsContext = React.createContext({})\nconst SlicesContext = React.createContext({})\nconst SlicesMapContext = React.createContext({})\nconst SlicesPropsContext = React.createContext({})\n\nexport {\n SlicesResultsContext,\n SlicesContext,\n SlicesMapContext,\n SlicesPropsContext,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { createServerOrClientContext } from \"./context-utils\"\n\nconst StaticQueryContext = createServerOrClientContext(`StaticQuery`, {})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n
\n {finalData && render(finalData)}\n {!finalData && Loading (StaticQuery)
}\n \n )\n}\n\nlet warnedAboutStaticQuery = false\n\n// TODO(v6): Remove completely\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n if (process.env.NODE_ENV === `development` && !warnedAboutStaticQuery) {\n console.warn(\n `The
component is deprecated and will be removed in Gatsby v6. Use useStaticQuery instead. Refer to the migration guide for more information: https://gatsby.dev/migrating-4-to-5/#staticquery--is-deprecated`\n )\n warnedAboutStaticQuery = true\n }\n\n return (\n
\n {staticQueryData => (\n \n )}\n \n )\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n // TODO(v5): Remove since we require React >= 18\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nexport { StaticQuery, StaticQueryContext, useStaticQuery }\n","import React from \"react\"\n\n// Ensure serverContext is not created more than once as React will throw when creating it more than once\n// https://github.com/facebook/react/blob/dd2d6522754f52c70d02c51db25eb7cbd5d1c8eb/packages/react/src/ReactServerContext.js#L101\nconst createServerContext = (name, defaultValue = null) => {\n /* eslint-disable no-undef */\n if (!globalThis.__SERVER_CONTEXT) {\n globalThis.__SERVER_CONTEXT = {}\n }\n\n if (!globalThis.__SERVER_CONTEXT[name]) {\n globalThis.__SERVER_CONTEXT[name] = React.createServerContext(\n name,\n defaultValue\n )\n }\n\n return globalThis.__SERVER_CONTEXT[name]\n}\n\nfunction createServerOrClientContext(name, defaultValue) {\n if (React.createServerContext) {\n return createServerContext(name, defaultValue)\n }\n\n return React.createContext(defaultValue)\n}\n\nexport { createServerOrClientContext }\n","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Global } from '@emotion/react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nexport default function GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/_jsx(Global, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes = {\n defaultTheme: PropTypes.object,\n styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])\n} : void 0;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles as MuiGlobalStyles } from '@mui/styled-engine';\nimport useTheme from '../useTheme';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GlobalStyles({\n styles,\n themeId,\n defaultTheme = {}\n}) {\n const upperTheme = useTheme(defaultTheme);\n const globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;\n return /*#__PURE__*/_jsx(MuiGlobalStyles, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * @ignore\n */\n defaultTheme: PropTypes.object,\n /**\n * @ignore\n */\n styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool]),\n /**\n * @ignore\n */\n themeId: PropTypes.string\n} : void 0;\nexport default GlobalStyles;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles } from '@mui/system';\nimport defaultTheme from '../styles/defaultTheme';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Kickstart an elegant, consistent, and simple baseline to build upon.\n *\n * Demos:\n *\n * - [CSS Baseline](https://mui.com/joy-ui/react-css-baseline/)\n *\n * API:\n *\n * - [CssBaseline API](https://mui.com/joy-ui/api/css-baseline/)\n */\nfunction CssBaseline(props) {\n const {\n children,\n disableColorScheme = false\n } = props;\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(GlobalStyles, {\n styles: theme => {\n var _components$JoyTypogr, _components;\n const colorSchemeStyles = {};\n if (!disableColorScheme) {\n // The CssBaseline is wrapped inside a CssVarsProvider\n Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {\n var _scheme$palette;\n colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\\s*&/, '')] = {\n colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode\n };\n });\n }\n const defaultTypographyLevel = (_components$JoyTypogr = (_components = theme.components) == null || (_components = _components.JoyTypography) == null || (_components = _components.defaultProps) == null ? void 0 : _components.level) != null ? _components$JoyTypogr : 'body-md';\n return _extends({\n html: {\n WebkitFontSmoothing: 'antialiased',\n MozOsxFontSmoothing: 'grayscale',\n // Change from `box-sizing: content-box` so that `width`\n // is not affected by `padding` or `border`.\n boxSizing: 'border-box',\n // Fix font resize problem in iOS\n WebkitTextSizeAdjust: '100%'\n },\n '*, *::before, *::after': {\n boxSizing: 'inherit'\n },\n 'strong, b': {\n fontWeight: theme.vars.fontWeight.lg\n },\n body: _extends({\n margin: 0,\n // Remove the margin in all browsers.\n color: theme.vars.palette.text.primary,\n fontFamily: theme.vars.fontFamily.body\n }, theme.typography[defaultTypographyLevel], {\n backgroundColor: theme.vars.palette.background.body,\n '@media print': {\n // Save printer ink.\n backgroundColor: theme.vars.palette.common.white\n },\n // Add support for document.body.requestFullScreen().\n // Other elements, if background transparent, are not supported.\n '&::backdrop': {\n backgroundColor: theme.vars.palette.background.backdrop\n }\n })\n }, colorSchemeStyles);\n },\n defaultTheme: defaultTheme\n }), children]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? CssBaseline.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * You can wrap a node.\n */\n children: PropTypes.node,\n /**\n * Disable `color-scheme` CSS property.\n *\n * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme\n * For browser support, check out https://caniuse.com/?search=color-scheme\n * @default false\n */\n disableColorScheme: PropTypes.bool\n} : void 0;\nexport default CssBaseline;","export default __webpack_public_path__ + \"static/star-logo-color-c257f5aba5aa72dfc91c41156d4f982f.png\";","import React from 'react'\nimport { useStaticQuery, graphql } from 'gatsby'\nimport { Stack, Box } from '@mui/joy'\nimport { Link } from './link'\nimport starLogo from '../images/star-logo-color.png'\n\nexport const Menu = () => {\n const data = useStaticQuery(graphql`\n query ThemeQuery {\n themeYaml {\n navigation {\n label\n path\n }\n }\n }\n `)\n\n return (\n
\n \n \n \n \n\n \n {\n data.themeYaml.navigation.map(({ label, path }) => (\n \n \n { label }\n \n \n ))\n }\n \n )\n}\n","import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n return container.scrollHeight > container.clientHeight;\n}\nexport function ariaHidden(element, show) {\n if (show) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\nfunction getPaddingRight(element) {\n return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;\n}\nfunction isAriaHiddenForbiddenOnElement(element) {\n // The forbidden HTML tags are the ones from ARIA specification that\n // can be children of body and can't have aria-hidden attribute.\n // cf. https://www.w3.org/TR/html-aria/#docconformance\n const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];\n const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;\n const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';\n return isForbiddenTagName || isInputHidden;\n}\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n [].forEach.call(container.children, element => {\n const isNotExcludedElement = blacklist.indexOf(element) === -1;\n const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);\n if (isNotExcludedElement && isNotForbiddenElement) {\n ariaHidden(element, show);\n }\n });\n}\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n return false;\n });\n return idx;\n}\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerDocument(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;\n\n // .mui-fixed is a global helper.\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n }\n let scrollContainer;\n if (container.parentNode instanceof DocumentFragment) {\n scrollContainer = ownerDocument(container).body;\n } else {\n // Support html overflow-y: auto for scroll stability between pages\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;\n }\n\n // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n return restore;\n}\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport class ModalManager {\n constructor() {\n this.containers = void 0;\n this.modals = void 0;\n this.modals = [];\n this.containers = [];\n }\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n if (modalIndex !== -1) {\n return modalIndex;\n }\n modalIndex = this.modals.length;\n this.modals.push(modal);\n\n // If the modal we are adding is already in the DOM.\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n remove(modal, ariaHiddenState = true) {\n const modalIndex = this.modals.indexOf(modal);\n if (modalIndex === -1) {\n return modalIndex;\n }\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1);\n\n // If that was the last modal in a container, clean up the container.\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, ariaHiddenState);\n }\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1];\n // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n return modalIndex;\n }\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(doc) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = doc.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_createChainedFunction as createChainedFunction } from '@mui/utils';\nimport { extractEventHandlers } from '../utils';\nimport { ModalManager, ariaHidden } from './ModalManager';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\nfunction getHasTransition(children) {\n return children ? children.props.hasOwnProperty('in') : false;\n}\n\n// A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\nconst defaultManager = new ModalManager();\n/**\n *\n * Demos:\n *\n * - [Modal](https://mui.com/base-ui/react-modal/#hook)\n *\n * API:\n *\n * - [useModal API](https://mui.com/base-ui/react-modal/hooks-api/#use-modal)\n */\nexport function useModal(parameters) {\n const {\n container,\n disableEscapeKeyDown = false,\n disableScrollLock = false,\n // @ts-ignore internal logic - Base UI supports the manager as a prop too\n manager = defaultManager,\n closeAfterTransition = false,\n onTransitionEnter,\n onTransitionExited,\n children,\n onClose,\n open,\n rootRef\n } = parameters;\n\n // @ts-ignore internal logic\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, rootRef);\n const [exited, setExited] = React.useState(!open);\n const hasTransition = getHasTransition(children);\n let ariaHiddenProp = true;\n if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {\n ariaHiddenProp = false;\n }\n const getDoc = () => ownerDocument(mountNodeRef.current);\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mount = mountNodeRef.current;\n return modal.current;\n };\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n });\n\n // Fix a bug on Chrome where the scroll isn't initially 0.\n if (modalRef.current) {\n modalRef.current.scrollTop = 0;\n }\n };\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer);\n\n // The element was already mounted.\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = React.useCallback(() => manager.isTopModal(getModal()), [manager]);\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n if (!node) {\n return;\n }\n if (open && isTopModal()) {\n handleMounted();\n } else if (modalRef.current) {\n ariaHidden(modalRef.current, ariaHiddenProp);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal(), ariaHiddenProp);\n }, [ariaHiddenProp, manager]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n const createHandleKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || !isTopModal()) {\n return;\n }\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n const createHandleBackdropClick = otherHandlers => event => {\n var _otherHandlers$onClic;\n (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event);\n if (event.target !== event.currentTarget) {\n return;\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const getRootProps = (otherHandlers = {}) => {\n const propsEventHandlers = extractEventHandlers(parameters);\n\n // The custom event handlers shouldn't be spread on the root element\n delete propsEventHandlers.onTransitionEnter;\n delete propsEventHandlers.onTransitionExited;\n const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers);\n return _extends({\n role: 'presentation'\n }, externalEventHandlers, {\n onKeyDown: createHandleKeyDown(externalEventHandlers),\n ref: handleRef\n });\n };\n const getBackdropProps = (otherHandlers = {}) => {\n const externalEventHandlers = otherHandlers;\n return _extends({\n 'aria-hidden': true\n }, externalEventHandlers, {\n onClick: createHandleBackdropClick(externalEventHandlers),\n open\n });\n };\n const getTransitionProps = () => {\n const handleEnter = () => {\n setExited(false);\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n const handleExited = () => {\n setExited(true);\n if (onTransitionExited) {\n onTransitionExited();\n }\n if (closeAfterTransition) {\n handleClose();\n }\n };\n return {\n onEnter: createChainedFunction(handleEnter, children == null ? void 0 : children.props.onEnter),\n onExited: createChainedFunction(handleExited, children == null ? void 0 : children.props.onExited)\n };\n };\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n isTopModal,\n exited,\n hasTransition\n };\n}","'use client';\n\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome,
,
and
elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n return 0;\n }\n return node.tabIndex;\n}\nfunction isNonTabbableRadio(node) {\n if (node.tagName !== 'INPUT' || node.type !== 'radio') {\n return false;\n }\n if (!node.name) {\n return false;\n }\n const getRadio = selector => node.ownerDocument.querySelector(`input[type=\"radio\"]${selector}`);\n let roving = getRadio(`[name=\"${node.name}\"]:checked`);\n if (!roving) {\n roving = getRadio(`[name=\"${node.name}\"]`);\n }\n return roving !== node;\n}\nfunction isNodeMatchingSelectorFocusable(node) {\n if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {\n return false;\n }\n return true;\n}\nfunction defaultGetTabbable(root) {\n const regularTabNodes = [];\n const orderedTabNodes = [];\n Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {\n const nodeTabIndex = getTabIndex(node);\n if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {\n return;\n }\n if (nodeTabIndex === 0) {\n regularTabNodes.push(node);\n } else {\n orderedTabNodes.push({\n documentOrder: i,\n tabIndex: nodeTabIndex,\n node: node\n });\n }\n });\n return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);\n}\nfunction defaultIsEnabled() {\n return true;\n}\n\n/**\n * Utility component that locks focus inside the component.\n *\n * Demos:\n *\n * - [Focus Trap](https://mui.com/base-ui/react-focus-trap/)\n *\n * API:\n *\n * - [FocusTrap API](https://mui.com/base-ui/react-focus-trap/components-api/#focus-trap)\n */\nfunction FocusTrap(props) {\n const {\n children,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableRestoreFocus = false,\n getTabbable = defaultGetTabbable,\n isEnabled = defaultIsEnabled,\n open\n } = props;\n const ignoreNextEnforceFocus = React.useRef(false);\n const sentinelStart = React.useRef(null);\n const sentinelEnd = React.useRef(null);\n const nodeToRestore = React.useRef(null);\n const reactFocusEventTarget = React.useRef(null);\n // This variable is useful when disableAutoFocus is true.\n // It waits for the active element to move into the component to activate.\n const activated = React.useRef(false);\n const rootRef = React.useRef(null);\n // @ts-expect-error TODO upstream fix\n const handleRef = useForkRef(children.ref, rootRef);\n const lastKeydown = React.useRef(null);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n activated.current = !disableAutoFocus;\n }, [disableAutoFocus, open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n if (!rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n rootRef.current.setAttribute('tabIndex', '-1');\n }\n if (activated.current) {\n rootRef.current.focus();\n }\n }\n return () => {\n // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE11 have a focus method.\n // Once IE11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\n }\n nodeToRestore.current = null;\n }\n };\n // Missing `disableRestoreFocus` which is fine.\n // We don't support changing that prop on an open FocusTrap\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const loopFocus = nativeEvent => {\n lastKeydown.current = nativeEvent;\n if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {\n return;\n }\n\n // Make sure the next tab starts from the right place.\n // doc.activeElement refers to the origin.\n if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (sentinelEnd.current) {\n sentinelEnd.current.focus();\n }\n }\n };\n const contain = () => {\n const rootElement = rootRef.current;\n\n // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) {\n return;\n }\n if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n // The focus is already inside\n if (rootElement.contains(doc.activeElement)) {\n return;\n }\n\n // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)\n if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {\n return;\n }\n\n // if the focus event is not coming from inside the children's react tree, reset the refs\n if (doc.activeElement !== reactFocusEventTarget.current) {\n reactFocusEventTarget.current = null;\n } else if (reactFocusEventTarget.current !== null) {\n return;\n }\n if (!activated.current) {\n return;\n }\n let tabbable = [];\n if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {\n tabbable = getTabbable(rootRef.current);\n }\n\n // one of the sentinel nodes was focused, so move the focus\n // to the first/last tabbable element inside the focus trap\n if (tabbable.length > 0) {\n var _lastKeydown$current, _lastKeydown$current2;\n const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === 'Tab');\n const focusNext = tabbable[0];\n const focusPrevious = tabbable[tabbable.length - 1];\n if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {\n if (isShiftTab) {\n focusPrevious.focus();\n } else {\n focusNext.focus();\n }\n }\n // no tabbable elements in the trap focus or the focus was outside of the focus trap\n } else {\n rootElement.focus();\n }\n };\n doc.addEventListener('focusin', contain);\n doc.addEventListener('keydown', loopFocus, true);\n\n // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n // Instead, we can look if the active element was restored on the BODY element.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n const interval = setInterval(() => {\n if (doc.activeElement && doc.activeElement.tagName === 'BODY') {\n contain();\n }\n }, 50);\n return () => {\n clearInterval(interval);\n doc.removeEventListener('focusin', contain);\n doc.removeEventListener('keydown', loopFocus, true);\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);\n const onFocus = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n reactFocusEventTarget.current = event.target;\n const childrenPropsHandler = children.props.onFocus;\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n const handleFocusSentinel = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelStart,\n \"data-testid\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n onFocus\n }), /*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelEnd,\n \"data-testid\": \"sentinelEnd\"\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? FocusTrap.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n /**\n * If `true`, the focus trap will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not restore focus to previously focused element once\n * focus trap is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.\n * For instance, you can provide the \"tabbable\" npm dependency.\n * @param {HTMLElement} root\n */\n getTabbable: PropTypes.func,\n /**\n * This prop extends the `open` prop.\n * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.\n * This prop should be memoized.\n * It can be used to support multiple focus trap mounted at the same time.\n * @default function defaultIsEnabled(): boolean {\n * return true;\n * }\n */\n isEnabled: PropTypes.func,\n /**\n * If `true`, focus is locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n FocusTrap['propTypes' + ''] = exactProp(FocusTrap.propTypes);\n}\nexport { FocusTrap };","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"container\", \"disableAutoFocus\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"keepMounted\", \"onClose\", \"onKeyDown\", \"open\", \"component\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { elementAcceptingRef, HTMLElementType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { Portal } from '@mui/base/Portal';\nimport { FocusTrap } from '@mui/base/FocusTrap';\nimport { unstable_useModal as useModal } from '@mui/base/unstable_useModal';\nimport { styled, useThemeProps } from '../styles';\nimport useSlot from '../utils/useSlot';\nimport { getModalUtilityClass } from './modalClasses';\nimport CloseModalContext from './CloseModalContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n open\n } = ownerState;\n const slots = {\n root: ['root', !open && 'hidden'],\n backdrop: ['backdrop']\n };\n return composeClasses(slots, getModalUtilityClass, {});\n};\nexport const StyledModalRoot = styled('div')(({\n ownerState,\n theme\n}) => _extends({\n '--unstable_popup-zIndex': `calc(${theme.vars.zIndex.modal} + 1)`,\n '& ~ [role=\"listbox\"]': {\n // target all the listbox (Autocomplete, Menu, Select, etc.) that uses portal\n '--unstable_popup-zIndex': `calc(${theme.vars.zIndex.modal} + 1)`\n },\n position: 'fixed',\n zIndex: theme.vars.zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0\n}, !ownerState.open && {\n visibility: 'hidden'\n}));\nconst ModalRoot = styled(StyledModalRoot, {\n name: 'JoyModal',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const StyledModalBackdrop = styled('div')(({\n theme\n}) => ({\n zIndex: -1,\n position: 'fixed',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: theme.vars.palette.background.backdrop,\n WebkitTapHighlightColor: 'transparent',\n backdropFilter: 'blur(8px)'\n}));\nexport const ModalBackdrop = styled(StyledModalBackdrop, {\n name: 'JoyModal',\n slot: 'Backdrop',\n overridesResolver: (props, styles) => styles.backdrop\n})({});\n/**\n *\n * Demos:\n *\n * - [Modal](https://mui.com/joy-ui/react-modal/)\n *\n * API:\n *\n * - [Modal API](https://mui.com/joy-ui/api/modal/)\n */\nconst Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyModal'\n });\n const {\n children,\n container,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false,\n onClose,\n open,\n component,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n });\n const {\n getRootProps,\n getBackdropProps,\n rootRef,\n portalRef,\n isTopModal\n } = useModal(_extends({}, ownerState, {\n rootRef: ref\n }));\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n ref: rootRef,\n className: classes.root,\n elementType: ModalRoot,\n externalForwardedProps,\n getSlotProps: getRootProps,\n ownerState\n });\n const [SlotBackdrop, backdropProps] = useSlot('backdrop', {\n className: classes.backdrop,\n elementType: ModalBackdrop,\n externalForwardedProps,\n getSlotProps: getBackdropProps,\n ownerState\n });\n if (!keepMounted && !open) {\n return null;\n }\n return /*#__PURE__*/_jsx(CloseModalContext.Provider, {\n value: onClose,\n children: /*#__PURE__*/_jsx(Portal, {\n ref: portalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(SlotRoot, _extends({}, rootProps, {\n children: [!hideBackdrop ? /*#__PURE__*/_jsx(SlotBackdrop, _extends({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: React.Children.only(children) && /*#__PURE__*/React.cloneElement(children, _extends({}, children.props.tabIndex === undefined && {\n tabIndex: -1\n }))\n })]\n }))\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"closeClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Modal;","import * as React from 'react';\nconst CloseModalContext = /*#__PURE__*/React.createContext(undefined);\nexport default CloseModalContext;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getDrawerUtilityClass(slot) {\n return generateUtilityClass('MuiDrawer', slot);\n}\nconst drawerClasses = generateUtilityClasses('MuiDrawer', ['root', 'hidden', 'backdrop', 'content', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'variantPlain', 'variantOutlined', 'variantSoft', 'variantSolid', 'sizeSm', 'sizeMd', 'sizeLg']);\nexport default drawerClasses;","import * as React from 'react';\nconst ModalDialogVariantColorContext = /*#__PURE__*/React.createContext(undefined);\nexport default ModalDialogVariantColorContext;","import * as React from 'react';\nconst ModalDialogSizeContext = /*#__PURE__*/React.createContext(undefined);\nexport default ModalDialogSizeContext;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getDialogTitleUtilityClass(slot) {\n return generateUtilityClass('MuiDialogTitle', slot);\n}\nconst dialogTitleClasses = generateUtilityClasses('MuiDialogTitle', ['root', 'h1', 'h2', 'h3', 'h4', 'title-lg', 'title-md', 'title-sm', 'body-lg', 'body-md', 'body-sm', 'body-xs', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'variantPlain', 'variantOutlined', 'variantSoft', 'variantSolid']);\nexport default dialogTitleClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"anchor\", \"container\", \"disableAutoFocus\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"color\", \"variant\", \"invertedColors\", \"size\", \"onClose\", \"onKeyDown\", \"open\", \"component\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { HTMLElementType, unstable_capitalize as capitalize, unstable_useId as useId } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { unstable_useModal as useModal } from '@mui/base/unstable_useModal';\nimport { Portal } from '@mui/base/Portal';\nimport { FocusTrap } from '@mui/base/FocusTrap';\nimport { useThemeProps, styled, ColorInversionProvider, useColorInversion } from '../styles';\nimport { StyledModalBackdrop, StyledModalRoot } from '../Modal/Modal';\nimport CloseModalContext from '../Modal/CloseModalContext';\nimport useSlot from '../utils/useSlot';\nimport { getDrawerUtilityClass } from './drawerClasses';\nimport ModalDialogVariantColorContext from '../ModalDialog/ModalDialogVariantColorContext';\nimport ModalDialogSizeContext from '../ModalDialog/ModalDialogSizeContext';\nimport dialogTitleClasses from '../DialogTitle/dialogTitleClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n open,\n variant,\n color,\n size\n } = ownerState;\n const slots = {\n root: ['root', !open && 'hidden', variant && `variant${capitalize(variant)}`, color && `color${capitalize(color)}`, size && `size${capitalize(size)}`],\n backdrop: ['backdrop'],\n content: ['content']\n };\n return composeClasses(slots, getDrawerUtilityClass, {});\n};\nconst DrawerRoot = styled(StyledModalRoot, {\n name: 'JoyDrawer',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n ownerState\n}) => _extends({\n '--Drawer-transitionDuration': '0.3s',\n '--Drawer-transitionFunction': 'ease',\n '--ModalClose-radius': 'max((var(--Drawer-contentRadius) - var(--variant-borderWidth, 0px)) - var(--ModalClose-inset), min(var(--ModalClose-inset) / 2, (var(--Drawer-contentRadius) - var(--variant-borderWidth, 0px)) / 2))'\n}, ownerState.size === 'sm' && {\n '--ModalClose-inset': '0.5rem',\n '--Drawer-verticalSize': 'clamp(350px, 30%, 100%)',\n '--Drawer-horizontalSize': 'clamp(256px, 20%, 100%)',\n '--Drawer-titleMargin': '0.625rem 0.75rem calc(0.625rem / 2)'\n}, ownerState.size === 'md' && {\n '--ModalClose-inset': '0.5rem',\n '--Drawer-verticalSize': 'clamp(400px, 45%, 100%)',\n '--Drawer-horizontalSize': 'clamp(300px, 30%, 100%)',\n '--Drawer-titleMargin': '0.75rem 0.75rem calc(0.75rem / 2)'\n}, ownerState.size === 'lg' && {\n '--ModalClose-inset': '0.75rem',\n '--Drawer-verticalSize': 'clamp(500px, 60%, 100%)',\n '--Drawer-horizontalSize': 'clamp(440px, 60%, 100%)',\n '--Drawer-titleMargin': '1rem 1rem calc(1rem / 2)'\n}, {\n transitionProperty: 'visibility',\n transitionDelay: ownerState.open ? '0s' : 'var(--Drawer-transitionDuration)'\n}, !ownerState.open && {\n visibility: 'hidden'\n}));\nconst DrawerBackdrop = styled(StyledModalBackdrop, {\n name: 'JoyDrawer',\n slot: 'Backdrop',\n overridesResolver: (props, styles) => styles.backdrop\n})(({\n ownerState\n}) => ({\n opacity: ownerState.open ? 1 : 0,\n transition: 'opacity var(--Drawer-transitionDuration) ease-in-out'\n}));\nconst DrawerContent = styled('div', {\n name: 'JoyDrawer',\n slot: 'Content',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme,\n ownerState\n}) => {\n var _theme$variants;\n return _extends({}, theme.typography[`body-${ownerState.size}`], {\n boxShadow: theme.shadow.md,\n backgroundColor: theme.vars.palette.background.surface,\n outline: 0,\n display: 'flex',\n flexDirection: 'column',\n position: 'fixed',\n boxSizing: 'border-box',\n overflow: 'auto'\n }, ownerState.anchor === 'left' && {\n top: 0,\n left: 0,\n transform: ownerState.open ? 'translateX(0)' : 'translateX(-100%)'\n }, ownerState.anchor === 'right' && {\n top: 0,\n right: 0,\n transform: ownerState.open ? 'translateX(0)' : 'translateX(100%)'\n }, ownerState.anchor === 'top' && {\n top: 0,\n transform: ownerState.open ? 'translateY(0)' : 'translateY(-100%)'\n }, ownerState.anchor === 'bottom' && {\n bottom: 0,\n transform: ownerState.open ? 'translateY(0)' : 'translateY(100%)'\n }, {\n height: ownerState.anchor.match(/(left|right)/) ? '100%' : 'min(100vh, var(--Drawer-verticalSize))',\n width: ownerState.anchor.match(/(top|bottom)/) ? '100vw' : 'min(100vw, var(--Drawer-horizontalSize))',\n transition: 'transform var(--Drawer-transitionDuration) var(--Drawer-transitionFunction)'\n }, (_theme$variants = theme.variants[ownerState.variant]) == null ? void 0 : _theme$variants[ownerState.color], {\n [`& > .${dialogTitleClasses.root}`]: {\n '--unstable_DialogTitle-margin': 'var(--Drawer-titleMargin)'\n }\n });\n});\n\n/**\n * The navigation drawers (or \"sidebars\") provide ergonomic access to destinations in a site or app functionality such as switching accounts.\n *\n * Demos:\n *\n * - [Drawer](https://mui.com/joy-ui/react-drawer/)\n *\n * API:\n *\n * - [Drawer API](https://mui.com/joy-ui/api/drawer/)\n */\nconst Drawer = /*#__PURE__*/React.forwardRef(function Drawer(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyDrawer'\n });\n const {\n children,\n anchor = 'left',\n container,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n color: colorProp = 'neutral',\n variant = 'plain',\n invertedColors = false,\n size = 'md',\n onClose,\n open,\n component,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, colorProp);\n const ownerState = _extends({}, props, {\n anchor,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n color,\n variant,\n size\n });\n const {\n getRootProps,\n getBackdropProps,\n rootRef,\n portalRef,\n isTopModal\n } = useModal(_extends({}, ownerState, {\n rootRef: ref,\n children: null\n }));\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const labelledBy = useId();\n const describedBy = useId();\n const contextValue = React.useMemo(() => ({\n variant,\n color: color === 'context' ? undefined : color,\n labelledBy,\n describedBy\n }), [color, variant, labelledBy, describedBy]);\n const [SlotRoot, rootProps] = useSlot('root', {\n ref: rootRef,\n className: classes.root,\n elementType: DrawerRoot,\n externalForwardedProps,\n getSlotProps: getRootProps,\n ownerState\n });\n const [SlotBackdrop, backdropProps] = useSlot('backdrop', {\n className: classes.backdrop,\n elementType: DrawerBackdrop,\n externalForwardedProps,\n getSlotProps: getBackdropProps,\n ownerState\n });\n const [SlotContent, contentProps] = useSlot('content', {\n className: classes.content,\n elementType: DrawerContent,\n additionalProps: {\n tabIndex: -1,\n role: 'dialog',\n 'aria-modal': 'true',\n 'aria-labelledby': labelledBy,\n 'aria-describedby': describedBy\n },\n externalForwardedProps,\n ownerState\n });\n const result = /*#__PURE__*/_jsx(CloseModalContext.Provider, {\n value: onClose,\n children: /*#__PURE__*/_jsx(ModalDialogSizeContext.Provider, {\n value: size,\n children: /*#__PURE__*/_jsx(ModalDialogVariantColorContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(Portal, {\n ref: portalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(SlotRoot, _extends({}, rootProps, {\n children: [!hideBackdrop ? /*#__PURE__*/_jsx(SlotBackdrop, _extends({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: /*#__PURE__*/_jsx(SlotContent, _extends({}, contentProps, {\n children: children\n }))\n })]\n }))\n })\n })\n })\n });\n if (invertedColors) {\n return /*#__PURE__*/_jsx(ColorInversionProvider, {\n variant: variant,\n children: result\n });\n }\n return result;\n});\nprocess.env.NODE_ENV !== \"production\" ? Drawer.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Side from which the drawer will appear.\n * @default 'left'\n */\n anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * If `true`, the children with an implicit color prop invert their colors to match the component's variant and color.\n * @default false\n */\n invertedColors: PropTypes.bool,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"closeClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The size of the component.\n * @default 'md'\n */\n size: PropTypes.oneOf(['sm', 'md', 'lg']),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n content: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n content: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'plain'\n */\n variant: PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid'])\n} : void 0;\nexport default Drawer;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getModalCloseUtilityClass(slot) {\n return generateUtilityClass('MuiModalClose', slot);\n}\nconst modalCloseClasses = generateUtilityClasses('MuiModalClose', ['root', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'variantPlain', 'variantOutlined', 'variantSoft', 'variantSolid', 'sizeSm', 'sizeMd', 'sizeLg']);\nexport default modalCloseClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nvar _CloseIcon;\nconst _excluded = [\"component\", \"color\", \"variant\", \"size\", \"onClick\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { unstable_capitalize as capitalize } from '@mui/utils';\nimport { useButton } from '@mui/base/useButton';\nimport useSlot from '../utils/useSlot';\nimport { useThemeProps, styled } from '../styles';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport { StyledIconButton } from '../IconButton/IconButton';\nimport { getModalCloseUtilityClass } from './modalCloseClasses';\nimport CloseIcon from '../internal/svg-icons/Close';\nimport CloseModalContext from '../Modal/CloseModalContext';\nimport ModalDialogSizeContext from '../ModalDialog/ModalDialogSizeContext';\nimport ModalDialogVariantColorContext from '../ModalDialog/ModalDialogVariantColorContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n variant,\n color,\n disabled,\n focusVisible,\n size\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible', variant && `variant${capitalize(variant)}`, color && `color${capitalize(color)}`, size && `size${capitalize(size)}`]\n };\n return composeClasses(slots, getModalCloseUtilityClass, {});\n};\nexport const ModalCloseRoot = styled(StyledIconButton, {\n name: 'JoyModalClose',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n ownerState,\n theme\n}) => {\n var _theme$variants;\n return _extends({}, ownerState.size === 'sm' && {\n '--IconButton-size': '1.75rem'\n }, ownerState.size === 'md' && {\n '--IconButton-size': '2rem'\n }, ownerState.size === 'lg' && {\n '--IconButton-size': '2.25rem'\n }, {\n position: 'absolute',\n zIndex: 1,\n // stay on top of the title in case it is positioned relatively\n top: `var(--ModalClose-inset, 0.625rem)`,\n right: `var(--ModalClose-inset, 0.625rem)`,\n borderRadius: `var(--ModalClose-radius, ${theme.vars.radius.sm})`\n }, !((_theme$variants = theme.variants[ownerState.variant]) != null && (_theme$variants = _theme$variants[ownerState.color]) != null && _theme$variants.backgroundColor) && {\n color: theme.vars.palette.text.secondary\n });\n});\nconst modalDialogVariantMapping = {\n plain: 'plain',\n outlined: 'plain',\n soft: 'soft',\n solid: 'solid'\n};\n/**\n *\n * Demos:\n *\n * - [Modal](https://mui.com/joy-ui/react-modal/)\n *\n * API:\n *\n * - [ModalClose API](https://mui.com/joy-ui/api/modal-close/)\n */\nconst ModalClose = /*#__PURE__*/React.forwardRef(function ModalClose(inProps, ref) {\n var _ref, _inProps$variant, _modalDialogVariantCo, _ref2, _inProps$size;\n const props = useThemeProps({\n props: inProps,\n name: 'JoyModalClose'\n });\n const {\n component = 'button',\n color: colorProp = 'neutral',\n variant: variantProp = 'plain',\n size: sizeProp = 'md',\n onClick,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const closeModalContext = React.useContext(CloseModalContext);\n const modalDialogVariantColor = React.useContext(ModalDialogVariantColorContext);\n const variant = (_ref = (_inProps$variant = inProps.variant) != null ? _inProps$variant : modalDialogVariantMapping[modalDialogVariantColor == null ? void 0 : modalDialogVariantColor.variant]) != null ? _ref : variantProp;\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, (_modalDialogVariantCo = modalDialogVariantColor == null ? void 0 : modalDialogVariantColor.color) != null ? _modalDialogVariantCo : colorProp);\n const modalDialogSize = React.useContext(ModalDialogSizeContext);\n const size = (_ref2 = (_inProps$size = inProps.size) != null ? _inProps$size : modalDialogSize) != null ? _ref2 : sizeProp;\n const {\n focusVisible,\n getRootProps\n } = useButton(_extends({}, props, {\n rootRef: ref\n }));\n const ownerState = _extends({}, props, {\n color,\n component,\n variant,\n size,\n focusVisible\n });\n const classes = useUtilityClasses(ownerState);\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n elementType: ModalCloseRoot,\n getSlotProps: getRootProps,\n externalForwardedProps: _extends({\n onClick: event => {\n closeModalContext == null || closeModalContext(event, 'closeClick');\n onClick == null || onClick(event);\n }\n }, other, {\n component,\n slots,\n slotProps\n }),\n className: classes.root,\n ownerState\n });\n return /*#__PURE__*/_jsx(SlotRoot, _extends({}, rootProps, {\n children: _CloseIcon || (_CloseIcon = /*#__PURE__*/_jsx(CloseIcon, {}))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ModalClose.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * The size of the component.\n * @default 'md'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['sm', 'md', 'lg']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'plain'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']), PropTypes.string])\n} : void 0;\nexport default ModalClose;","'use client';\n\nimport * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');","import React, { Fragment, useState } from 'react'\nimport PropTypes from 'prop-types'\nimport { Box, Divider, Drawer, IconButton, ModalClose, Stack } from '@mui/joy'\nimport { Link } from './link'\nimport { useStaticQuery, graphql } from 'gatsby'\nimport MenuIcon from '@mui/icons-material/Menu';\nimport starLogo from '../images/star-logo-color.png'\n\nexport const MobileMenu = () => {\n const data = useStaticQuery(graphql`\n query ThemeQuery {\n themeYaml {\n navigation {\n label\n path\n }\n }\n }\n`)\nconst [open, setOpen] = useState(false)\n\n return (\n
\n \n setOpen(true) }\n sx={{ \n mx: 1, \n borderColor: '#41404270', \n '&:hover': {\n backgroundColor: '#04758e10'\n }, \n }}\n >\n \n \n \n \n \n \n setOpen(false) }\n >\n \n setOpen(false) }>\n \n \n\n \n \n\n \n\n a': {\n width: '100%',\n padding: 2,\n textDecoration: 'none',\n textTransform: 'uppercase',\n fontWeight: 500,\n color: '#414042',\n },\n '[aria-current=\"page\"]': {\n 'backgroundColor': '#04758e10',\n },\n }}\n >\n {\n data.themeYaml.navigation.map(({ label, path }) => (\n \n \n setOpen(false) }\n >{ label }\n \n \n \n ))\n }\n \n \n \n )\n}\n\nconst MenuOptionPropTypes = PropTypes.shape({\n label: PropTypes.string.isRequired,\n path: PropTypes.string.isRequired,\n}).isRequired\n\nMobileMenu.propTypes = {\n options: PropTypes.arrayOf(\n MenuOptionPropTypes\n )\n}\n","import React, { useMemo } from 'react'\nimport { Sheet } from '@mui/joy'\nimport { Container } from './container'\nimport { useScrolling, useWindowWidth } from '../hooks'\nimport { Menu } from './menu'\nimport { MobileMenu } from './mobile-menu'\n\nconst Header = () => {\n const { isCompact } = useWindowWidth();\n\n const { scrollPosition } = useScrolling()\n\n // reduce header after user has scrolled down an bit,\n // at least through the hero.\n const reducedHeader = useMemo(() => {\n return scrollPosition > 500\n }, [scrollPosition])\n\n return (\n
\n \n\n {\n isCompact ? : \n }\n\n \n \n )\n}\n\nexport default Header\n","export default __webpack_public_path__ + \"static/star-renci-logo-combined-60edcc68e5a3e6311738262a55a414aa.png\";","import React from 'react'\nimport { graphql, useStaticQuery } from 'gatsby'\nimport { Typography, Box, Container, Grid, useTheme } from '@mui/joy'\nimport { Link } from './link'\nimport starRenciLogo from '../images/star-renci-logo-combined.png'\n\nexport const Footer = () => {\n const data = useStaticQuery(graphql`\n query FooterQuery {\n themeYaml {\n footer {\n copyright\n email\n socials {\n name\n url\n }\n }\n }\n }\n `)\n const theme = useTheme()\n\n return (\n
\n \n \n \n \n \n \n Student Advancement at RENCI\n Europa Center\n 100 Europa Drive, Suite 540\n Chapel Hill, NC 27517\n {data.themeYaml.footer.email}\n 919-445-9640\n \n \n Stay Connected with RENCI\n \n {\n data.themeYaml.footer.socials.map((item) => (\n - {item.name}
\n ))\n }\n
\n \n\n \n © { new Date().getFullYear() }\n \n \n \n \n )\n}\n\nexport default Footer\n","import React, { Fragment } from 'react'\nimport { CssBaseline, Sheet } from '@mui/joy'\nimport Header from './header'\nimport Footer from './footer'\n\nexport const Layout = ({ children }) => (\n
\n \n \n \n \n \n { children }\n \n\n \n\n \n \n)\n\nexport default Layout\n","import * as React from 'react';\nconst ThemeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'ThemeContext';\n}\nexport default ThemeContext;","import * as React from 'react';\nimport ThemeContext from './ThemeContext';\nexport default function useTheme() {\n const theme = React.useContext(ThemeContext);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme;\n}","const hasSymbol = typeof Symbol === 'function' && Symbol.for;\nexport default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@mui/utils';\nimport ThemeContext from '../useTheme/ThemeContext';\nimport useTheme from '../useTheme';\nimport nested from './nested';\n\n// To support composition of theme.\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(outerTheme);\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['MUI: You should return an object from your theme function, i.e.', '
({})} />'].join('\\n'));\n }\n }\n return mergedTheme;\n }\n return _extends({}, outerTheme, localTheme);\n}\n\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme\n } = props;\n const outerTheme = useTheme();\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', ' outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const theme = React.useMemo(() => {\n const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/_jsx(ThemeContext.Provider, {\n value: theme,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '@mui/private-theming';\nimport { exactProp } from '@mui/utils';\nimport { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';\nimport useThemeWithoutDefault from '../useThemeWithoutDefault';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst EMPTY_THEME = {};\nfunction useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {\n return React.useMemo(() => {\n const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(resolvedTheme);\n const result = themeId ? _extends({}, upperTheme, {\n [themeId]: mergedTheme\n }) : mergedTheme;\n // must return a function for the private theme to NOT merge with the upper theme.\n // see the test case \"use provided theme from a callback\" in ThemeProvider.test.js\n if (isPrivate) {\n return () => result;\n }\n return result;\n }\n return themeId ? _extends({}, upperTheme, {\n [themeId]: localTheme\n }) : _extends({}, upperTheme, localTheme);\n }, [themeId, upperTheme, localTheme, isPrivate]);\n}\n\n/**\n * This component makes the `theme` available down the React tree.\n * It should preferably be used at **the root of your component tree**.\n *\n * // existing use case\n * // theme scoping\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme,\n themeId\n } = props;\n const upperTheme = useThemeWithoutDefault(EMPTY_THEME);\n const upperPrivateTheme = usePrivateTheme() || EMPTY_THEME;\n if (process.env.NODE_ENV !== 'production') {\n if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', ' outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);\n const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);\n return /*#__PURE__*/_jsx(MuiThemeProvider, {\n theme: privateTheme,\n children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {\n value: engineTheme,\n children: children\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n /**\n * The design system's unique id for getting the corresponded theme when there are multiple design systems.\n */\n themeId: PropTypes.string\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","import * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DEFAULT_MODE_STORAGE_KEY = 'mode';\nexport const DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';\nexport const DEFAULT_ATTRIBUTE = 'data-color-scheme';\nexport default function getInitColorSchemeScript(options) {\n const {\n defaultMode = 'light',\n defaultLightColorScheme = 'light',\n defaultDarkColorScheme = 'dark',\n modeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n attribute = DEFAULT_ATTRIBUTE,\n colorSchemeNode = 'document.documentElement'\n } = options || {};\n return /*#__PURE__*/_jsx(\"script\", {\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML: {\n __html: `(function() {\ntry {\n var mode = localStorage.getItem('${modeStorageKey}') || '${defaultMode}';\n var colorScheme = '';\n if (mode === 'system') {\n // handle system mode\n var mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';\n } else {\n colorScheme = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';\n }\n }\n if (mode === 'light') {\n colorScheme = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';\n }\n if (mode === 'dark') {\n colorScheme = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';\n }\n if (colorScheme) {\n ${colorSchemeNode}.setAttribute('${attribute}', colorScheme);\n }\n} catch(e){}})();`\n }\n }, \"mui-color-scheme-init\");\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { DEFAULT_MODE_STORAGE_KEY, DEFAULT_COLOR_SCHEME_STORAGE_KEY } from './getInitColorSchemeScript';\nexport function getSystemMode(mode) {\n if (typeof window !== 'undefined' && mode === 'system') {\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n return 'dark';\n }\n return 'light';\n }\n return undefined;\n}\nfunction processState(state, callback) {\n if (state.mode === 'light' || state.mode === 'system' && state.systemMode === 'light') {\n return callback('light');\n }\n if (state.mode === 'dark' || state.mode === 'system' && state.systemMode === 'dark') {\n return callback('dark');\n }\n return undefined;\n}\nexport function getColorScheme(state) {\n return processState(state, mode => {\n if (mode === 'light') {\n return state.lightColorScheme;\n }\n if (mode === 'dark') {\n return state.darkColorScheme;\n }\n return undefined;\n });\n}\nfunction initializeValue(key, defaultValue) {\n if (typeof window === 'undefined') {\n return undefined;\n }\n let value;\n try {\n value = localStorage.getItem(key) || undefined;\n if (!value) {\n // the first time that user enters the site.\n localStorage.setItem(key, defaultValue);\n }\n } catch (e) {\n // Unsupported\n }\n return value || defaultValue;\n}\nexport default function useCurrentColorScheme(options) {\n const {\n defaultMode = 'light',\n defaultLightColorScheme,\n defaultDarkColorScheme,\n supportedColorSchemes = [],\n modeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n storageWindow = typeof window === 'undefined' ? undefined : window\n } = options;\n const joinedColorSchemes = supportedColorSchemes.join(',');\n const [state, setState] = React.useState(() => {\n const initialMode = initializeValue(modeStorageKey, defaultMode);\n const lightColorScheme = initializeValue(`${colorSchemeStorageKey}-light`, defaultLightColorScheme);\n const darkColorScheme = initializeValue(`${colorSchemeStorageKey}-dark`, defaultDarkColorScheme);\n return {\n mode: initialMode,\n systemMode: getSystemMode(initialMode),\n lightColorScheme,\n darkColorScheme\n };\n });\n const colorScheme = getColorScheme(state);\n const setMode = React.useCallback(mode => {\n setState(currentState => {\n if (mode === currentState.mode) {\n // do nothing if mode does not change\n return currentState;\n }\n const newMode = !mode ? defaultMode : mode;\n try {\n localStorage.setItem(modeStorageKey, newMode);\n } catch (e) {\n // Unsupported\n }\n return _extends({}, currentState, {\n mode: newMode,\n systemMode: getSystemMode(newMode)\n });\n });\n }, [modeStorageKey, defaultMode]);\n const setColorScheme = React.useCallback(value => {\n if (!value) {\n setState(currentState => {\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-light`, defaultLightColorScheme);\n localStorage.setItem(`${colorSchemeStorageKey}-dark`, defaultDarkColorScheme);\n } catch (e) {\n // Unsupported\n }\n return _extends({}, currentState, {\n lightColorScheme: defaultLightColorScheme,\n darkColorScheme: defaultDarkColorScheme\n });\n });\n } else if (typeof value === 'string') {\n if (value && !joinedColorSchemes.includes(value)) {\n console.error(`\\`${value}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n setState(currentState => {\n const newState = _extends({}, currentState);\n processState(currentState, mode => {\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-${mode}`, value);\n } catch (e) {\n // Unsupported\n }\n if (mode === 'light') {\n newState.lightColorScheme = value;\n }\n if (mode === 'dark') {\n newState.darkColorScheme = value;\n }\n });\n return newState;\n });\n }\n } else {\n setState(currentState => {\n const newState = _extends({}, currentState);\n const newLightColorScheme = value.light === null ? defaultLightColorScheme : value.light;\n const newDarkColorScheme = value.dark === null ? defaultDarkColorScheme : value.dark;\n if (newLightColorScheme) {\n if (!joinedColorSchemes.includes(newLightColorScheme)) {\n console.error(`\\`${newLightColorScheme}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n newState.lightColorScheme = newLightColorScheme;\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-light`, newLightColorScheme);\n } catch (error) {\n // Unsupported\n }\n }\n }\n if (newDarkColorScheme) {\n if (!joinedColorSchemes.includes(newDarkColorScheme)) {\n console.error(`\\`${newDarkColorScheme}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n newState.darkColorScheme = newDarkColorScheme;\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-dark`, newDarkColorScheme);\n } catch (error) {\n // Unsupported\n }\n }\n }\n return newState;\n });\n }\n }, [joinedColorSchemes, colorSchemeStorageKey, defaultLightColorScheme, defaultDarkColorScheme]);\n const handleMediaQuery = React.useCallback(e => {\n if (state.mode === 'system') {\n setState(currentState => _extends({}, currentState, {\n systemMode: e != null && e.matches ? 'dark' : 'light'\n }));\n }\n }, [state.mode]);\n\n // Ref hack to avoid adding handleMediaQuery as a dep\n const mediaListener = React.useRef(handleMediaQuery);\n mediaListener.current = handleMediaQuery;\n React.useEffect(() => {\n const handler = (...args) => mediaListener.current(...args);\n\n // Always listen to System preference\n const media = window.matchMedia('(prefers-color-scheme: dark)');\n\n // Intentionally use deprecated listener methods to support iOS & old browsers\n media.addListener(handler);\n handler(media);\n return () => media.removeListener(handler);\n }, []);\n\n // Handle when localStorage has changed\n React.useEffect(() => {\n const handleStorage = event => {\n const value = event.newValue;\n if (typeof event.key === 'string' && event.key.startsWith(colorSchemeStorageKey) && (!value || joinedColorSchemes.match(value))) {\n // If the key is deleted, value will be null then reset color scheme to the default one.\n if (event.key.endsWith('light')) {\n setColorScheme({\n light: value\n });\n }\n if (event.key.endsWith('dark')) {\n setColorScheme({\n dark: value\n });\n }\n }\n if (event.key === modeStorageKey && (!value || ['light', 'dark', 'system'].includes(value))) {\n setMode(value || defaultMode);\n }\n };\n if (storageWindow) {\n // For syncing color-scheme changes between iframes\n storageWindow.addEventListener('storage', handleStorage);\n return () => storageWindow.removeEventListener('storage', handleStorage);\n }\n return undefined;\n }, [setColorScheme, setMode, modeStorageKey, colorSchemeStorageKey, joinedColorSchemes, defaultMode, storageWindow]);\n return _extends({}, state, {\n colorScheme,\n setMode,\n setColorScheme\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\nconst _excluded = [\"colorSchemes\", \"components\", \"generateCssVars\", \"cssVarPrefix\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { deepmerge } from '@mui/utils';\nimport { GlobalStyles } from '@mui/styled-engine';\nimport { useTheme as muiUseTheme } from '@mui/private-theming';\nimport ThemeProvider from '../ThemeProvider';\nimport systemGetInitColorSchemeScript, { DEFAULT_ATTRIBUTE, DEFAULT_COLOR_SCHEME_STORAGE_KEY, DEFAULT_MODE_STORAGE_KEY } from './getInitColorSchemeScript';\nimport useCurrentColorScheme from './useCurrentColorScheme';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';\nexport default function createCssVarsProvider(options) {\n const {\n themeId,\n /**\n * This `theme` object needs to follow a certain structure to\n * be used correctly by the finel `CssVarsProvider`. It should have a\n * `colorSchemes` key with the light and dark (and any other) palette.\n * It should also ideally have a vars object created using `prepareCssVars`.\n */\n theme: defaultTheme = {},\n attribute: defaultAttribute = DEFAULT_ATTRIBUTE,\n modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey: defaultColorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n defaultMode: designSystemMode = 'light',\n defaultColorScheme: designSystemColorScheme,\n disableTransitionOnChange: designSystemTransitionOnChange = false,\n resolveTheme,\n excludeVariablesFromRoot\n } = options;\n if (!defaultTheme.colorSchemes || typeof designSystemColorScheme === 'string' && !defaultTheme.colorSchemes[designSystemColorScheme] || typeof designSystemColorScheme === 'object' && !defaultTheme.colorSchemes[designSystemColorScheme == null ? void 0 : designSystemColorScheme.light] || typeof designSystemColorScheme === 'object' && !defaultTheme.colorSchemes[designSystemColorScheme == null ? void 0 : designSystemColorScheme.dark]) {\n console.error(`MUI: \\`${designSystemColorScheme}\\` does not exist in \\`theme.colorSchemes\\`.`);\n }\n const ColorSchemeContext = /*#__PURE__*/React.createContext(undefined);\n const useColorScheme = () => {\n const value = React.useContext(ColorSchemeContext);\n if (!value) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`useColorScheme\\` must be called under ` : _formatMuiErrorMessage(19));\n }\n return value;\n };\n function CssVarsProvider({\n children,\n theme: themeProp = defaultTheme,\n modeStorageKey = defaultModeStorageKey,\n colorSchemeStorageKey = defaultColorSchemeStorageKey,\n attribute = defaultAttribute,\n defaultMode = designSystemMode,\n defaultColorScheme = designSystemColorScheme,\n disableTransitionOnChange = designSystemTransitionOnChange,\n storageWindow = typeof window === 'undefined' ? undefined : window,\n documentNode = typeof document === 'undefined' ? undefined : document,\n colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,\n colorSchemeSelector = ':root',\n disableNestedContext = false,\n disableStyleSheetGeneration = false\n }) {\n const hasMounted = React.useRef(false);\n const upperTheme = muiUseTheme();\n const ctx = React.useContext(ColorSchemeContext);\n const nested = !!ctx && !disableNestedContext;\n const scopedTheme = themeProp[themeId];\n const _ref = scopedTheme || themeProp,\n {\n colorSchemes = {},\n components = {},\n generateCssVars = () => ({\n vars: {},\n css: {}\n }),\n cssVarPrefix\n } = _ref,\n restThemeProp = _objectWithoutPropertiesLoose(_ref, _excluded);\n const allColorSchemes = Object.keys(colorSchemes);\n const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;\n const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;\n\n // 1. Get the data about the `mode`, `colorScheme`, and setter functions.\n const {\n mode: stateMode,\n setMode,\n systemMode,\n lightColorScheme,\n darkColorScheme,\n colorScheme: stateColorScheme,\n setColorScheme\n } = useCurrentColorScheme({\n supportedColorSchemes: allColorSchemes,\n defaultLightColorScheme,\n defaultDarkColorScheme,\n modeStorageKey,\n colorSchemeStorageKey,\n defaultMode,\n storageWindow\n });\n let mode = stateMode;\n let colorScheme = stateColorScheme;\n if (nested) {\n mode = ctx.mode;\n colorScheme = ctx.colorScheme;\n }\n const calculatedMode = (() => {\n if (mode) {\n return mode;\n }\n // This scope occurs on the server\n if (defaultMode === 'system') {\n return designSystemMode;\n }\n return defaultMode;\n })();\n const calculatedColorScheme = (() => {\n if (!colorScheme) {\n // This scope occurs on the server\n if (calculatedMode === 'dark') {\n return defaultDarkColorScheme;\n }\n // use light color scheme, if default mode is 'light' | 'system'\n return defaultLightColorScheme;\n }\n return colorScheme;\n })();\n\n // 2. Create CSS variables and store them in objects (to be generated in stylesheets in the final step)\n const {\n css: rootCss,\n vars: rootVars\n } = generateCssVars();\n\n // 3. Start composing the theme object\n const theme = _extends({}, restThemeProp, {\n components,\n colorSchemes,\n cssVarPrefix,\n vars: rootVars,\n getColorSchemeSelector: targetColorScheme => `[${attribute}=\"${targetColorScheme}\"] &`\n });\n\n // 4. Create color CSS variables and store them in objects (to be generated in stylesheets in the final step)\n // The default color scheme stylesheet is constructed to have the least CSS specificity.\n // The other color schemes uses selector, default as data attribute, to increase the CSS specificity so that they can override the default color scheme stylesheet.\n const defaultColorSchemeStyleSheet = {};\n const otherColorSchemesStyleSheet = {};\n Object.entries(colorSchemes).forEach(([key, scheme]) => {\n const {\n css,\n vars\n } = generateCssVars(key);\n theme.vars = deepmerge(theme.vars, vars);\n if (key === calculatedColorScheme) {\n // 4.1 Merge the selected color scheme to the theme\n Object.keys(scheme).forEach(schemeKey => {\n if (scheme[schemeKey] && typeof scheme[schemeKey] === 'object') {\n // shallow merge the 1st level structure of the theme.\n theme[schemeKey] = _extends({}, theme[schemeKey], scheme[schemeKey]);\n } else {\n theme[schemeKey] = scheme[schemeKey];\n }\n });\n if (theme.palette) {\n theme.palette.colorScheme = key;\n }\n }\n const resolvedDefaultColorScheme = (() => {\n if (typeof defaultColorScheme === 'string') {\n return defaultColorScheme;\n }\n if (defaultMode === 'dark') {\n return defaultColorScheme.dark;\n }\n return defaultColorScheme.light;\n })();\n if (key === resolvedDefaultColorScheme) {\n if (excludeVariablesFromRoot) {\n const excludedVariables = {};\n excludeVariablesFromRoot(cssVarPrefix).forEach(cssVar => {\n excludedVariables[cssVar] = css[cssVar];\n delete css[cssVar];\n });\n defaultColorSchemeStyleSheet[`[${attribute}=\"${key}\"]`] = excludedVariables;\n }\n defaultColorSchemeStyleSheet[`${colorSchemeSelector}, [${attribute}=\"${key}\"]`] = css;\n } else {\n otherColorSchemesStyleSheet[`${colorSchemeSelector === ':root' ? '' : colorSchemeSelector}[${attribute}=\"${key}\"]`] = css;\n }\n });\n theme.vars = deepmerge(theme.vars, rootVars);\n\n // 5. Declaring effects\n // 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.\n React.useEffect(() => {\n if (colorScheme && colorSchemeNode) {\n // attaches attribute to because the css variables are attached to :root (html)\n colorSchemeNode.setAttribute(attribute, colorScheme);\n }\n }, [colorScheme, attribute, colorSchemeNode]);\n\n // 5.2 Remove the CSS transition when color scheme changes to create instant experience.\n // credit: https://github.com/pacocoursey/next-themes/blob/b5c2bad50de2d61ad7b52a9c5cdc801a78507d7a/index.tsx#L313\n React.useEffect(() => {\n let timer;\n if (disableTransitionOnChange && hasMounted.current && documentNode) {\n const css = documentNode.createElement('style');\n css.appendChild(documentNode.createTextNode(DISABLE_CSS_TRANSITION));\n documentNode.head.appendChild(css);\n\n // Force browser repaint\n (() => window.getComputedStyle(documentNode.body))();\n timer = setTimeout(() => {\n documentNode.head.removeChild(css);\n }, 1);\n }\n return () => {\n clearTimeout(timer);\n };\n }, [colorScheme, disableTransitionOnChange, documentNode]);\n React.useEffect(() => {\n hasMounted.current = true;\n return () => {\n hasMounted.current = false;\n };\n }, []);\n const contextValue = React.useMemo(() => ({\n mode,\n systemMode,\n setMode,\n lightColorScheme,\n darkColorScheme,\n colorScheme,\n setColorScheme,\n allColorSchemes\n }), [allColorSchemes, colorScheme, darkColorScheme, lightColorScheme, mode, setColorScheme, setMode, systemMode]);\n let shouldGenerateStyleSheet = true;\n if (disableStyleSheetGeneration || nested && (upperTheme == null ? void 0 : upperTheme.cssVarPrefix) === cssVarPrefix) {\n shouldGenerateStyleSheet = false;\n }\n const element = /*#__PURE__*/_jsxs(React.Fragment, {\n children: [shouldGenerateStyleSheet && /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(GlobalStyles, {\n styles: {\n [colorSchemeSelector]: rootCss\n }\n }), /*#__PURE__*/_jsx(GlobalStyles, {\n styles: defaultColorSchemeStyleSheet\n }), /*#__PURE__*/_jsx(GlobalStyles, {\n styles: otherColorSchemesStyleSheet\n })]\n }), /*#__PURE__*/_jsx(ThemeProvider, {\n themeId: scopedTheme ? themeId : undefined,\n theme: resolveTheme ? resolveTheme(theme) : theme,\n children: children\n })]\n });\n if (nested) {\n return element;\n }\n return /*#__PURE__*/_jsx(ColorSchemeContext.Provider, {\n value: contextValue,\n children: element\n });\n }\n process.env.NODE_ENV !== \"production\" ? CssVarsProvider.propTypes = {\n /**\n * The body attribute name to attach colorScheme.\n */\n attribute: PropTypes.string,\n /**\n * The component tree.\n */\n children: PropTypes.node,\n /**\n * The node used to attach the color-scheme attribute\n */\n colorSchemeNode: PropTypes.any,\n /**\n * The CSS selector for attaching the generated custom properties\n */\n colorSchemeSelector: PropTypes.string,\n /**\n * localStorage key used to store `colorScheme`\n */\n colorSchemeStorageKey: PropTypes.string,\n /**\n * The initial color scheme used.\n */\n defaultColorScheme: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n /**\n * The initial mode used.\n */\n defaultMode: PropTypes.string,\n /**\n * If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.\n */\n disableNestedContext: PropTypes.bool,\n /**\n * If `true`, the style sheet won't be generated.\n *\n * This is useful for controlling nested CssVarsProvider behavior.\n */\n disableStyleSheetGeneration: PropTypes.bool,\n /**\n * Disable CSS transitions when switching between modes or color schemes.\n */\n disableTransitionOnChange: PropTypes.bool,\n /**\n * The document to attach the attribute to.\n */\n documentNode: PropTypes.any,\n /**\n * The key in the local storage used to store current color scheme.\n */\n modeStorageKey: PropTypes.string,\n /**\n * The window that attaches the 'storage' event listener.\n * @default window\n */\n storageWindow: PropTypes.any,\n /**\n * The calculated theme object that will be passed through context.\n */\n theme: PropTypes.object\n } : void 0;\n const defaultLightColorScheme = typeof designSystemColorScheme === 'string' ? designSystemColorScheme : designSystemColorScheme.light;\n const defaultDarkColorScheme = typeof designSystemColorScheme === 'string' ? designSystemColorScheme : designSystemColorScheme.dark;\n const getInitColorSchemeScript = params => systemGetInitColorSchemeScript(_extends({\n attribute: defaultAttribute,\n colorSchemeStorageKey: defaultColorSchemeStorageKey,\n defaultMode: designSystemMode,\n defaultLightColorScheme,\n defaultDarkColorScheme,\n modeStorageKey: defaultModeStorageKey\n }, params));\n return {\n CssVarsProvider,\n useColorScheme,\n getInitColorSchemeScript\n };\n}","'use client';\n\nimport { deepmerge } from '@mui/utils';\nimport { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport { createSoftInversion, createSolidInversion } from './variantUtils';\nimport THEME_ID from './identifier';\nconst {\n CssVarsProvider,\n useColorScheme,\n getInitColorSchemeScript\n} = createCssVarsProvider({\n themeId: THEME_ID,\n theme: defaultTheme,\n attribute: 'data-joy-color-scheme',\n modeStorageKey: 'joy-mode',\n colorSchemeStorageKey: 'joy-color-scheme',\n defaultColorScheme: {\n light: 'light',\n dark: 'dark'\n },\n resolveTheme: mergedTheme => {\n const colorInversionInput = mergedTheme.colorInversion;\n mergedTheme.colorInversion = deepmerge({\n soft: createSoftInversion(mergedTheme),\n solid: createSolidInversion(mergedTheme)\n }, typeof colorInversionInput === 'function' ? colorInversionInput(mergedTheme) : colorInversionInput, {\n clone: false\n });\n return mergedTheme;\n }\n});\nexport { CssVarsProvider, useColorScheme, getInitColorSchemeScript };","import { extendTheme } from '@mui/joy/styles';\n\nconst palette = {\n light: {\n palette: {\n // affects all Joy components that has `color=\"primary\"` prop.\n primary: {\n 50: '#b8eaff',\n 100: '#92cce2',\n 200: '#6caec6',\n 300: '#529bb4',\n 400: '#0592b1',\n 500: '#04758e',\n 600: '#035e72',\n 700: '#022f39',\n 800: '#022f39',\n 900: '#01232b',\n },\n },\n },\n}\n\nconst theme = extendTheme({\n colorSchemes: palette,\n fontFamily: {\n display: 'Inter, var(--joy-fontFamily-fallback)',\n body: 'Inter, var(--joy-fontFamily-fallback)',\n },\n typography: {\n h1: {\n\n },\n h2: {\n paddingBottom: '1.75rem',\n fontWeight: '500',\n color: palette.light.palette.primary[700],\n fontSize: '2rem',\n letterSpacing: '0.2px'\n },\n h3: {\n fontWeight: '500',\n fontSize: '1.6rem',\n letterSpacing: '0.1px'\n },\n h4: {\n fontWeight: '500',\n fontSize: '1.4rem'\n }\n },\n\n});\n\nexport default theme","import React from \"react\"\nimport { Layout } from \"./src/components/layout\"\nimport { CssVarsProvider } from '@mui/joy/styles';\nimport theme from './src/styles/theme'\nimport { PositionsProvider } from './src/components/positions'\n\nexport const wrapPageElement = ({ element, props }) => {\n return (\n \n \n {element}\n \n \n )\n}","/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\nimport { withPrefix } from \"gatsby\";\nimport getManifestForPathname from \"./get-manifest-pathname\";\n\n// when we don't have localisation in our manifest, we tree shake everything away\nexport const onRouteUpdate = function onRouteUpdate({\n location\n}, pluginOptions) {\n if (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n const {\n localize\n } = pluginOptions;\n const manifestFilename = getManifestForPathname(location.pathname, localize, true);\n const manifestEl = document.head.querySelector(`link[rel=\"manifest\"]`);\n if (manifestEl) {\n manifestEl.setAttribute(`href`, withPrefix(manifestFilename));\n }\n }\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _gatsby = require(\"gatsby\");\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @param {boolean} shouldPrependPathPrefix\n * @return string\n */\nvar _default = (pathname, localizedManifests, shouldPrependPathPrefix = false) => {\n const defaultFilename = `manifest.webmanifest`;\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n const localizedManifest = localizedManifests.find(app => {\n let startUrl = app.start_url;\n if (shouldPrependPathPrefix) {\n startUrl = (0, _gatsby.withPrefix)(startUrl);\n }\n return pathname.startsWith(startUrl);\n });\n if (!localizedManifest) {\n return defaultFilename;\n }\n return `manifest_${localizedManifest.lang}.webmanifest`;\n};\nexports.default = _default;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getCircularProgressUtilityClass(slot) {\n return generateUtilityClass('MuiCircularProgress', slot);\n}\nconst circularProgressClasses = generateUtilityClasses('MuiCircularProgress', ['root', 'determinate', 'svg', 'track', 'progress', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'sizeSm', 'sizeMd', 'sizeLg', 'variantPlain', 'variantOutlined', 'variantSoft', 'variantSolid']);\nexport default circularProgressClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nlet _ = t => t,\n _t;\nconst _excluded = [\"color\", \"backgroundColor\"],\n _excluded2 = [\"children\", \"className\", \"color\", \"size\", \"variant\", \"thickness\", \"determinate\", \"value\", \"component\", \"slots\", \"slotProps\"];\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { unstable_capitalize as capitalize } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { css, keyframes } from '@mui/system';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport useSlot from '../utils/useSlot';\nimport { getCircularProgressUtilityClass } from './circularProgressClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst circulate = keyframes({\n '0%': {\n // let the progress start at the top of the ring\n transform: 'rotate(-90deg)'\n },\n '100%': {\n transform: 'rotate(270deg)'\n }\n});\nconst useUtilityClasses = ownerState => {\n const {\n determinate,\n color,\n variant,\n size\n } = ownerState;\n const slots = {\n root: ['root', determinate && 'determinate', color && `color${capitalize(color)}`, variant && `variant${capitalize(variant)}`, size && `size${capitalize(size)}`],\n svg: ['svg'],\n track: ['track'],\n progress: ['progress']\n };\n return composeClasses(slots, getCircularProgressUtilityClass, {});\n};\nfunction getThickness(slot, defaultValue) {\n return `var(--CircularProgress-${slot}Thickness, var(--CircularProgress-thickness, ${defaultValue}))`;\n}\nconst CircularProgressRoot = styled('span', {\n name: 'JoyCircularProgress',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n ownerState,\n theme\n}) => {\n var _theme$variants;\n const _ref = ((_theme$variants = theme.variants[ownerState.variant]) == null ? void 0 : _theme$variants[ownerState.color]) || {},\n {\n color,\n backgroundColor\n } = _ref,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return _extends({\n // integration with icon\n '--Icon-fontSize': 'calc(0.4 * var(--_root-size))',\n // public variables\n '--CircularProgress-trackColor': backgroundColor,\n '--CircularProgress-progressColor': color,\n '--CircularProgress-percent': ownerState.value,\n // 0 - 100\n '--CircularProgress-linecap': 'round'\n }, ownerState.size === 'sm' && {\n '--_root-size': 'var(--CircularProgress-size, 24px)',\n // use --_root-size to let other components overrides via --CircularProgress-size\n '--_track-thickness': getThickness('track', '3px'),\n '--_progress-thickness': getThickness('progress', '3px')\n }, ownerState.instanceSize === 'sm' && {\n '--CircularProgress-size': '24px'\n }, ownerState.size === 'md' && {\n '--_track-thickness': getThickness('track', '6px'),\n '--_progress-thickness': getThickness('progress', '6px'),\n '--_root-size': 'var(--CircularProgress-size, 40px)'\n }, ownerState.instanceSize === 'md' && {\n '--CircularProgress-size': '40px'\n }, ownerState.size === 'lg' && {\n '--_track-thickness': getThickness('track', '8px'),\n '--_progress-thickness': getThickness('progress', '8px'),\n '--_root-size': 'var(--CircularProgress-size, 64px)'\n }, ownerState.instanceSize === 'lg' && {\n '--CircularProgress-size': '64px'\n }, ownerState.thickness && {\n '--_track-thickness': `${ownerState.thickness}px`,\n '--_progress-thickness': `${ownerState.thickness}px`\n }, {\n // internal variables\n '--_thickness-diff': 'calc(var(--_track-thickness) - var(--_progress-thickness))',\n '--_inner-size': 'calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))',\n '--_outlined-inset': 'max(var(--_track-thickness), var(--_progress-thickness))',\n width: 'var(--_root-size)',\n height: 'var(--_root-size)',\n borderRadius: 'var(--_root-size)',\n margin: 'var(--CircularProgress-margin)',\n boxSizing: 'border-box',\n display: 'inline-flex',\n justifyContent: 'center',\n alignItems: 'center',\n flexShrink: 0,\n // prevent from shrinking when CircularProgress is in a flex container.\n position: 'relative',\n color\n }, ownerState.children && {\n // only add font related properties when there is a child.\n // so that when there is no child, the size can be controlled by the parent font-size e.g. Link\n fontFamily: theme.vars.fontFamily.body,\n fontWeight: theme.vars.fontWeight.md,\n fontSize: 'calc(0.2 * var(--_root-size))'\n }, rest, ownerState.variant === 'outlined' && {\n '&:before': _extends({\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n borderRadius: 'inherit',\n top: 'var(--_outlined-inset)',\n left: 'var(--_outlined-inset)',\n right: 'var(--_outlined-inset)',\n bottom: 'var(--_outlined-inset)'\n }, rest)\n });\n});\nconst CircularProgressSvg = styled('svg', {\n name: 'JoyCircularProgress',\n slot: 'Svg',\n overridesResolver: (props, styles) => styles.svg\n})({\n width: 'inherit',\n height: 'inherit',\n display: 'inherit',\n boxSizing: 'inherit',\n position: 'absolute',\n top: 'calc(-1 * var(--variant-borderWidth, 0px))',\n // centered align\n left: 'calc(-1 * var(--variant-borderWidth, 0px))' // centered align\n});\n\nconst CircularProgressTrack = styled('circle', {\n name: 'JoyCircularProgress',\n slot: 'track',\n overridesResolver: (props, styles) => styles.track\n})({\n cx: '50%',\n cy: '50%',\n r: 'calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))',\n fill: 'transparent',\n strokeWidth: 'var(--_track-thickness)',\n stroke: 'var(--CircularProgress-trackColor)'\n});\nconst CircularProgressProgress = styled('circle', {\n name: 'JoyCircularProgress',\n slot: 'progress',\n overridesResolver: (props, styles) => styles.progress\n})({\n '--_progress-radius': 'calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))',\n '--_progress-length': 'calc(2 * 3.1415926535 * var(--_progress-radius))',\n // the circumference around the progress\n cx: '50%',\n cy: '50%',\n r: 'var(--_progress-radius)',\n fill: 'transparent',\n strokeWidth: 'var(--_progress-thickness)',\n stroke: 'var(--CircularProgress-progressColor)',\n strokeLinecap: 'var(--CircularProgress-linecap, round)',\n // can't use CSS variable directly, need to cast type.\n strokeDasharray: 'var(--_progress-length)',\n strokeDashoffset: 'calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)',\n transformOrigin: 'center',\n transform: 'rotate(-90deg)' // to initially appear at the top-center of the circle.\n}, ({\n ownerState\n}) => !ownerState.determinate && css(_t || (_t = _`\n animation: var(--CircularProgress-circulation, 0.8s linear 0s infinite normal none running)\n ${0};\n `), circulate));\n\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n *\n * Demos:\n *\n * - [Circular Progress](https://mui.com/joy-ui/react-circular-progress/)\n *\n * API:\n *\n * - [CircularProgress API](https://mui.com/joy-ui/api/circular-progress/)\n */\nconst CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyCircularProgress'\n });\n const {\n children,\n className,\n color: colorProp = 'primary',\n size = 'md',\n variant = 'soft',\n thickness,\n determinate = false,\n value = determinate ? 0 : 25,\n // `25` is the 1/4 of the circle.\n component,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, colorProp);\n const ownerState = _extends({}, props, {\n color,\n size,\n variant,\n thickness,\n value,\n determinate,\n instanceSize: inProps.size\n });\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n className: clsx(classes.root, className),\n elementType: CircularProgressRoot,\n externalForwardedProps,\n ownerState,\n additionalProps: _extends({\n role: 'progressbar',\n style: {\n // Setting this CSS variable via inline-style\n // prevents the generation of new CSS every time\n // `value` prop updates\n '--CircularProgress-percent': value\n }\n }, value && determinate && {\n 'aria-valuenow': typeof value === 'number' ? Math.round(value) : Math.round(Number(value || 0))\n })\n });\n const [SlotSvg, svgProps] = useSlot('svg', {\n className: classes.svg,\n elementType: CircularProgressSvg,\n externalForwardedProps,\n ownerState\n });\n const [SlotTrack, trackProps] = useSlot('track', {\n className: classes.track,\n elementType: CircularProgressTrack,\n externalForwardedProps,\n ownerState\n });\n const [SlotProgress, progressProps] = useSlot('progress', {\n className: classes.progress,\n elementType: CircularProgressProgress,\n externalForwardedProps,\n ownerState\n });\n return /*#__PURE__*/_jsxs(SlotRoot, _extends({}, rootProps, {\n children: [/*#__PURE__*/_jsxs(SlotSvg, _extends({}, svgProps, {\n children: [/*#__PURE__*/_jsx(SlotTrack, _extends({}, trackProps)), /*#__PURE__*/_jsx(SlotProgress, _extends({}, progressProps))]\n })), children]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The boolean to select a variant.\n * Use indeterminate when there is no progress value.\n * @default false\n */\n determinate: PropTypes.bool,\n /**\n * The size of the component.\n * It accepts theme values between 'sm' and 'lg'.\n * @default 'md'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['sm', 'md', 'lg']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n progress: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n svg: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n track: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n progress: PropTypes.elementType,\n root: PropTypes.elementType,\n svg: PropTypes.elementType,\n track: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The thickness of the circle.\n */\n thickness: PropTypes.number,\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n *\n * @default determinate ? 0 : 25\n */\n value: PropTypes.number,\n /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'soft'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']), PropTypes.string])\n} : void 0;\nexport default CircularProgress;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"action\", \"color\", \"variant\", \"size\", \"fullWidth\", \"startDecorator\", \"endDecorator\", \"loading\", \"loadingPosition\", \"loadingIndicator\", \"disabled\", \"component\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useButton } from '@mui/base/useButton';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { unstable_capitalize as capitalize, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { styled, useThemeProps } from '../styles';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport useSlot from '../utils/useSlot';\nimport CircularProgress from '../CircularProgress';\nimport buttonClasses, { getButtonUtilityClass } from './buttonClasses';\nimport ButtonGroupContext from '../ButtonGroup/ButtonGroupContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disabled,\n focusVisible,\n focusVisibleClassName,\n fullWidth,\n size,\n variant,\n loading\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible', fullWidth && 'fullWidth', variant && `variant${capitalize(variant)}`, color && `color${capitalize(color)}`, size && `size${capitalize(size)}`, loading && 'loading'],\n startDecorator: ['startDecorator'],\n endDecorator: ['endDecorator'],\n loadingIndicatorCenter: ['loadingIndicatorCenter']\n };\n const composedClasses = composeClasses(slots, getButtonUtilityClass, {});\n if (focusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n return composedClasses;\n};\nconst ButtonStartDecorator = styled('span', {\n name: 'JoyButton',\n slot: 'StartDecorator',\n overridesResolver: (props, styles) => styles.startDecorator\n})({\n '--Icon-margin': '0 0 0 calc(var(--Button-gap) / -2)',\n '--CircularProgress-margin': '0 0 0 calc(var(--Button-gap) / -2)',\n display: 'inherit',\n marginRight: 'var(--Button-gap)'\n});\nconst ButtonEndDecorator = styled('span', {\n name: 'JoyButton',\n slot: 'EndDecorator',\n overridesResolver: (props, styles) => styles.endDecorator\n})({\n '--Icon-margin': '0 calc(var(--Button-gap) / -2) 0 0',\n '--CircularProgress-margin': '0 calc(var(--Button-gap) / -2) 0 0',\n display: 'inherit',\n marginLeft: 'var(--Button-gap)'\n});\nconst ButtonLoadingCenter = styled('span', {\n name: 'JoyButton',\n slot: 'LoadingCenter',\n overridesResolver: (props, styles) => styles.loadingIndicatorCenter\n})(({\n theme,\n ownerState\n}) => {\n var _theme$variants, _theme$variants2;\n return _extends({\n display: 'inherit',\n position: 'absolute',\n left: '50%',\n transform: 'translateX(-50%)',\n color: (_theme$variants = theme.variants[ownerState.variant]) == null || (_theme$variants = _theme$variants[ownerState.color]) == null ? void 0 : _theme$variants.color\n }, ownerState.disabled && {\n color: (_theme$variants2 = theme.variants[`${ownerState.variant}Disabled`]) == null || (_theme$variants2 = _theme$variants2[ownerState.color]) == null ? void 0 : _theme$variants2.color\n });\n});\nexport const getButtonStyles = ({\n theme,\n ownerState\n}) => {\n var _theme$variants3, _theme$variants4, _theme$variants5, _theme$variants6;\n return [_extends({\n '--Icon-margin': 'initial',\n // reset the icon's margin.\n '--Icon-color': ownerState.color !== 'neutral' || ownerState.variant === 'solid' ? 'currentColor' : theme.vars.palette.text.icon\n }, ownerState.size === 'sm' && {\n '--Icon-fontSize': theme.vars.fontSize.lg,\n '--CircularProgress-size': '20px',\n // must be `px` unit, otherwise the CircularProgress is broken in Safari\n '--CircularProgress-thickness': '2px',\n '--Button-gap': '0.375rem',\n minHeight: 'var(--Button-minHeight, 2rem)',\n fontSize: theme.vars.fontSize.sm,\n paddingBlock: '2px',\n paddingInline: '0.75rem'\n }, ownerState.size === 'md' && {\n '--Icon-fontSize': theme.vars.fontSize.xl,\n '--CircularProgress-size': '20px',\n // must be `px` unit, otherwise the CircularProgress is broken in Safari\n '--CircularProgress-thickness': '2px',\n '--Button-gap': '0.5rem',\n minHeight: 'var(--Button-minHeight, 2.25rem)',\n // use min-height instead of height to make the button resilient to its content\n fontSize: theme.vars.fontSize.sm,\n paddingBlock: '0.25rem',\n // the padding-block act as a minimum spacing between content and root element\n paddingInline: '1rem'\n }, ownerState.size === 'lg' && {\n '--Icon-fontSize': theme.vars.fontSize.xl2,\n '--CircularProgress-size': '28px',\n // must be `px` unit, otherwise the CircularProgress is broken in Safari\n '--CircularProgress-thickness': '4px',\n '--Button-gap': '0.75rem',\n minHeight: 'var(--Button-minHeight, 2.75rem)',\n fontSize: theme.vars.fontSize.md,\n paddingBlock: '0.375rem',\n paddingInline: '1.5rem'\n }, {\n WebkitTapHighlightColor: 'transparent',\n borderRadius: `var(--Button-radius, ${theme.vars.radius.sm})`,\n // to be controlled by other components, e.g. Input\n margin: `var(--Button-margin)`,\n // to be controlled by other components, e.g. Input\n border: 'none',\n backgroundColor: 'transparent',\n cursor: 'pointer',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n textDecoration: 'none',\n // prevent user agent underline when used as anchor\n fontFamily: theme.vars.fontFamily.body,\n fontWeight: theme.vars.fontWeight.lg,\n lineHeight: 1\n }, ownerState.fullWidth && {\n width: '100%'\n }, {\n [theme.focus.selector]: theme.focus.default\n }), _extends({}, (_theme$variants3 = theme.variants[ownerState.variant]) == null ? void 0 : _theme$variants3[ownerState.color], {\n '&:hover': {\n '@media (hover: hover)': (_theme$variants4 = theme.variants[`${ownerState.variant}Hover`]) == null ? void 0 : _theme$variants4[ownerState.color]\n },\n '&:active, &[aria-pressed=\"true\"]': (_theme$variants5 = theme.variants[`${ownerState.variant}Active`]) == null ? void 0 : _theme$variants5[ownerState.color],\n '&:disabled': (_theme$variants6 = theme.variants[`${ownerState.variant}Disabled`]) == null ? void 0 : _theme$variants6[ownerState.color]\n }, ownerState.loadingPosition === 'center' && {\n // this has to come after the variant styles to take effect.\n [`&.${buttonClasses.loading}`]: {\n color: 'transparent'\n }\n })];\n};\nconst ButtonRoot = styled('button', {\n name: 'JoyButton',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(getButtonStyles);\n/**\n *\n * Demos:\n *\n * - [Button](https://mui.com/joy-ui/react-button/)\n * - [Button Group](https://mui.com/joy-ui/react-button-group/)\n * - [Toggle Button Group](https://mui.com/joy-ui/react-toggle-button-group/)\n *\n * API:\n *\n * - [Button API](https://mui.com/joy-ui/api/button/)\n */\nconst Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {\n var _ref;\n const props = useThemeProps({\n props: inProps,\n name: 'JoyButton'\n });\n const {\n children,\n action,\n color: colorProp = 'primary',\n variant: variantProp = 'solid',\n size: sizeProp = 'md',\n fullWidth = false,\n startDecorator,\n endDecorator,\n loading = false,\n loadingPosition = 'center',\n loadingIndicator: loadingIndicatorProp,\n disabled: disabledProp,\n component,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const buttonGroup = React.useContext(ButtonGroupContext);\n const variant = inProps.variant || buttonGroup.variant || variantProp;\n const size = inProps.size || buttonGroup.size || sizeProp;\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, buttonGroup.color || colorProp);\n const disabled = (_ref = inProps.disabled || inProps.loading) != null ? _ref : buttonGroup.disabled || disabledProp || loading;\n const buttonRef = React.useRef(null);\n const handleRef = useForkRef(buttonRef, ref);\n const {\n focusVisible,\n setFocusVisible,\n getRootProps\n } = useButton(_extends({}, props, {\n disabled,\n rootRef: handleRef\n }));\n const loadingIndicator = loadingIndicatorProp != null ? loadingIndicatorProp : /*#__PURE__*/_jsx(CircularProgress, _extends({}, color !== 'context' && {\n color\n }, {\n thickness: {\n sm: 2,\n md: 3,\n lg: 4\n }[size] || 3\n }));\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n var _buttonRef$current;\n setFocusVisible(true);\n (_buttonRef$current = buttonRef.current) == null || _buttonRef$current.focus();\n }\n }), [setFocusVisible]);\n const ownerState = _extends({}, props, {\n color,\n fullWidth,\n variant,\n size,\n focusVisible,\n loading,\n loadingPosition,\n disabled\n });\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n className: classes.root,\n elementType: ButtonRoot,\n externalForwardedProps,\n getSlotProps: getRootProps,\n ownerState\n });\n const [SlotStartDecorator, startDecoratorProps] = useSlot('startDecorator', {\n className: classes.startDecorator,\n elementType: ButtonStartDecorator,\n externalForwardedProps,\n ownerState\n });\n const [SlotEndDecorator, endDecoratorProps] = useSlot('endDecorator', {\n className: classes.endDecorator,\n elementType: ButtonEndDecorator,\n externalForwardedProps,\n ownerState\n });\n const [SlotLoadingIndicatorCenter, loadingIndicatorCenterProps] = useSlot('loadingIndicatorCenter', {\n className: classes.loadingIndicatorCenter,\n elementType: ButtonLoadingCenter,\n externalForwardedProps,\n ownerState\n });\n return /*#__PURE__*/_jsxs(SlotRoot, _extends({}, rootProps, {\n children: [(startDecorator || loading && loadingPosition === 'start') && /*#__PURE__*/_jsx(SlotStartDecorator, _extends({}, startDecoratorProps, {\n children: loading && loadingPosition === 'start' ? loadingIndicator : startDecorator\n })), children, loading && loadingPosition === 'center' && /*#__PURE__*/_jsx(SlotLoadingIndicatorCenter, _extends({}, loadingIndicatorCenterProps, {\n children: loadingIndicator\n })), (endDecorator || loading && loadingPosition === 'end') && /*#__PURE__*/_jsx(SlotEndDecorator, _extends({}, endDecoratorProps, {\n children: loading && loadingPosition === 'end' ? loadingIndicator : endDecorator\n }))]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * A ref for imperative actions. It currently only supports `focusVisible()` action.\n */\n action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n focusVisible: PropTypes.func.isRequired\n })\n })]),\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * Element placed after the children.\n */\n endDecorator: PropTypes.node,\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * If `true`, the loading indicator is shown and the button becomes disabled.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * The node should contain an element with `role=\"progressbar\"` with an accessible name.\n * By default we render a `CircularProgress` that is labelled by the button itself.\n * @default \n */\n loadingIndicator: PropTypes.node,\n /**\n * The loading indicator can be positioned on the start, end, or the center of the button.\n * @default 'center'\n */\n loadingPosition: PropTypes.oneOf(['center', 'end', 'start']),\n /**\n * The size of the component.\n * @default 'md'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['sm', 'md', 'lg']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n endDecorator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n loadingIndicatorCenter: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n startDecorator: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n endDecorator: PropTypes.elementType,\n loadingIndicatorCenter: PropTypes.elementType,\n root: PropTypes.elementType,\n startDecorator: PropTypes.elementType\n }),\n /**\n * Element placed before the children.\n */\n startDecorator: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @default 0\n */\n tabIndex: PropTypes.number,\n /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'solid'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']), PropTypes.string])\n} : void 0;\n\n// @ts-ignore internal logic for ToggleButtonGroup\nButton.muiName = 'Button';\nexport default Button;","import React from 'react'\nimport { Button as MUIButton, Typography} from '@mui/joy'\nimport { Link } from './link'\nimport OpenInNew from '@mui/icons-material/OpenInNew';\n\nexport const Button = ({children, to, large, external, color, text, hero, ...props}) => {\n\n return (\n }\n \n sx={{\n padding: large ? '1rem 3rem' : '0.5rem 2rem',\n backgroundColor: color,\n ':hover': {\n backgroundColor: `${color}99`\n },\n filter: hero ? 'drop-shadow(5px 5px 8px #00000090);' : null\n }}\n >\n \n {children}\n \n \n )\n}\n","import React from 'react'\nimport { Sheet } from '@mui/joy'\n\nexport const Container = ({\n children,\n className = 'container', // allows custom styling\n maxWidth = '1200px',\n sx = {},\n}) => {\n return (\n \n { children }\n \n )\n}\n","import React, { Fragment } from 'react'\nimport PropTypes from 'prop-types'\nimport { Link as GatsbyLink } from 'gatsby'\nimport { Link as MUILink} from '@mui/joy'\n\n\nexport const ExternalLinkIcon = ({ size, fill, ...rest }) => {\n return (\n \n )\n}\n\nExternalLinkIcon.propTypes = {\n size: PropTypes.number.isRequired,\n}\n\nexport const MailtoLinkIcon = ({ size = 12, fill, ...rest }) => {\n return (\n \n )\n}\n\nexport const ExternalLink = ({ to, children, noIcon, fill, ...etc }) => {\n return (\n \n \n { children }\n {\n !noIcon && (\n \n )\n }\n \n \n )\n}\nexport const MailtoLink = ({ to, children }) => {\n return (\n \n { children }\n \n \n )\n}\n\nexport const InternalLink = React.forwardRef(({ to, children, ...props }, ref) => {\n return (\n \n { children }\n \n )\n})\n\nexport const Link = React.forwardRef(({ to, children, noIcon, fill, ...props }, ref) => {\n const externalUrlPattern = new RegExp(/^https?:\\/\\//)\n const match = externalUrlPattern.exec(to)\n const mailtoPattern = new RegExp(/^mailto:/)\n const mailtoMatch = mailtoPattern.exec(to)\n\n if (match) {\n return { children }\n }\n if (mailtoMatch) {\n return { children }\n }\n return { children }\n})","import React, { createContext, useContext, useMemo, useState } from 'react'\nimport { graphql, useStaticQuery } from 'gatsby'\nconst PositionsContext = createContext({ })\nexport const usePositions = () => useContext(PositionsContext)\n\n/*\n * This utility function turns strings in an array\n * into properties in an object, all of whose values\n * are set to a given initial value.\n * \n * @param {string[]} keysArray strings to be used as\n * the returned object keys \n * @param {any} initialValue='' value to initialize\n * the object with\n * \n * @return {object} incoming strings as properties and\n * values equal to the initial value.\n */\nfunction objectFromArray(keysArray, initialValue = '') {\n if (\n !Array.isArray(keysArray) ||\n keysArray.some(v => typeof value !== 'string')\n ) { return {} }\n return keysArray.reduce((acc, col) => {\n acc[col.field] = initialValue\n return acc\n }, {})\n}\n\nexport const PositionsProvider = ({ children }) => {\n // this query grabs all the position data that is\n // coming directly from the monday source plugin.\n const data = useStaticQuery(graphql`\n query PositionsQuery {\n allPositionColumn {\n nodes {\n id\n field\n title\n options\n }\n }\n allPositionItem(filter: {status: {eq: \"Reviewed\"}}) {\n nodes {\n id\n name\n education\n domain\n group\n division\n semester\n startDate\n duration\n abstract\n description\n pay\n url\n }\n }\n }\n `)\n\n // extract the data nodes.\n const columns = useMemo(() => data?.allPositionColumn?.nodes ?? [], [data])\n const positions = useMemo(() => data?.allPositionItem?.nodes ?? [], [data])\n // `filters` is an object whose keys are position\n // properties and whose values are ones to match\n // on positions in the respective property,\n // e.g., { education: '', domain: 'Research', ... }.\n const [filters, setFilters] = useState(() => objectFromArray(columns), [columns])\n // activeFilters is an array of filter keys that are in use,\n // e.g., ['domain'].\n const activeFilters = useMemo(() => Object.keys(filters)\n .filter(key => !!filters[key]), [filters])\n // `filteredPositions` contains those positions that\n // match active filter values, and it updates on\n // changes to `filters`. if there are no active filters,\n // all positions are returned.\n const filteredPositions = useMemo(() => {\n if (!activeFilters.length) {\n return positions\n }\n // this is an inclusive or, which may not match user expectations. \n return positions\n .filter(position => {\n return activeFilters\n .some(key => position[key] === filters[key])\n })\n }, [activeFilters, filters, positions])\n\n // sets all filter properties to the empty string.\n const resetFilters = () => setFilters(objectFromArray(columns))\n\n if (!data) {\n // todo: implement a more appropriate fallback.\n return 'There is no data.'\n }\n\n return (\n { children }\n )\n}\n","import * as React from 'react';\n\n/**\n * @internal\n */\n\nconst FormControlContext = /*#__PURE__*/React.createContext(undefined);\nexport default FormControlContext;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getFormControlUtilityClass(slot) {\n return generateUtilityClass('MuiFormControl', slot);\n}\nconst formControlClasses = generateUtilityClasses('MuiFormControl', ['root', 'error', 'disabled', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'sizeSm', 'sizeMd', 'sizeLg', 'horizontal', 'vertical']);\nexport default formControlClasses;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getSwitchUtilityClass(slot) {\n return generateUtilityClass('MuiSwitch', slot);\n}\nconst switchClasses = generateUtilityClasses('MuiSwitch', ['root', 'checked', 'disabled', 'action', 'input', 'thumb', 'track', 'focusVisible', 'readOnly', 'colorPrimary', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'sizeSm', 'sizeMd', 'sizeLg', 'variantOutlined', 'variantSoft', 'variantSolid', 'startDecorator', 'endDecorator']);\nexport default switchClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"id\", \"className\", \"component\", \"disabled\", \"required\", \"error\", \"color\", \"size\", \"orientation\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_useId as useId, unstable_capitalize as capitalize } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { useThemeProps } from '../styles';\nimport styled from '../styles/styled';\nimport FormControlContext from './FormControlContext';\nimport formControlClasses, { getFormControlUtilityClass } from './formControlClasses';\nimport switchClasses from '../Switch/switchClasses';\nimport useSlot from '../utils/useSlot';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n error,\n size,\n color,\n orientation\n } = ownerState;\n const slots = {\n root: ['root', orientation, disabled && 'disabled', error && 'error', color && `color${capitalize(color)}`, size && `size${capitalize(size)}`]\n };\n return composeClasses(slots, getFormControlUtilityClass, {});\n};\nexport const FormControlRoot = styled('div', {\n name: 'JoyFormControl',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme,\n ownerState\n}) => {\n var _theme$vars$palette$o, _theme$vars$palette, _theme$vars$palette2;\n return _extends({\n '--unstable_RadioGroup-margin': '0.5rem 0',\n '--FormLabel-alignSelf': ownerState.orientation === 'horizontal' ? 'align-items' : 'flex-start',\n '--FormLabel-asteriskColor': theme.vars.palette.danger[500]\n }, ownerState.size === 'sm' && {\n '--FormLabel-fontSize': theme.vars.fontSize.xs,\n '--FormLabel-lineHeight': theme.vars.lineHeight.xl,\n '--FormLabel-margin': ownerState.orientation === 'horizontal' ? '0 0.5rem 0 0' : '0 0 0.25rem 0',\n '--FormHelperText-fontSize': theme.vars.fontSize.xs,\n '--FormHelperText-lineHeight': theme.vars.lineHeight.xl\n }, ownerState.size === 'md' && {\n '--FormLabel-fontSize': theme.vars.fontSize.sm,\n '--FormLabel-lineHeight': theme.vars.lineHeight.sm,\n '--FormLabel-margin': ownerState.orientation === 'horizontal' ? '0 0.75rem 0 0' : '0 0 0.375rem 0',\n '--FormHelperText-fontSize': theme.vars.fontSize.sm,\n '--FormHelperText-lineHeight': theme.vars.lineHeight.sm\n }, ownerState.size === 'lg' && {\n '--FormLabel-fontSize': theme.vars.fontSize.md,\n '--FormLabel-lineHeight': theme.vars.lineHeight.md,\n '--FormLabel-margin': ownerState.orientation === 'horizontal' ? '0 1rem 0 0' : '0 0 0.5rem 0',\n '--FormHelperText-fontSize': theme.vars.fontSize.sm,\n '--FormHelperText-lineHeight': theme.vars.lineHeight.sm\n }, ownerState.color && ownerState.color !== 'context' && {\n '--FormHelperText-color': (_theme$vars$palette$o = theme.vars.palette[ownerState.color]) == null ? void 0 : _theme$vars$palette$o[500]\n }, {\n '--FormHelperText-margin': '0.375rem 0 0 0',\n [`&.${formControlClasses.error}`]: {\n '--FormHelperText-color': theme.vars.palette.danger[500]\n },\n [`&.${formControlClasses.disabled}`]: _extends({}, ownerState.color !== 'context' && {\n '--FormLabel-color': (_theme$vars$palette = theme.vars.palette[ownerState.color || 'neutral']) == null ? void 0 : _theme$vars$palette.plainDisabledColor,\n '--FormHelperText-color': (_theme$vars$palette2 = theme.vars.palette[ownerState.color || 'neutral']) == null ? void 0 : _theme$vars$palette2.plainDisabledColor\n }),\n display: 'flex',\n position: 'relative',\n // for keeping the control action area, e.g. Switch\n flexDirection: ownerState.orientation === 'horizontal' ? 'row' : 'column'\n }, ownerState.orientation === 'horizontal' && {\n [`& > label ~ .${switchClasses.root}`]: {\n '--unstable_Switch-margin': '0 0 0 auto'\n }\n });\n});\n/**\n *\n * Demos:\n *\n * - [Input](https://mui.com/joy-ui/react-input/)\n *\n * API:\n *\n * - [FormControl API](https://mui.com/joy-ui/api/form-control/)\n */\nconst FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyFormControl'\n });\n const {\n id: idOverride,\n className,\n component = 'div',\n disabled = false,\n required = false,\n error = false,\n color,\n size = 'md',\n orientation = 'vertical',\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const id = useId(idOverride);\n const [helperText, setHelperText] = React.useState(null);\n const ownerState = _extends({}, props, {\n id,\n component,\n color,\n disabled,\n error,\n required,\n size,\n orientation\n });\n let registerEffect;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const registeredInput = React.useRef(false);\n registerEffect = () => {\n if (registeredInput.current) {\n console.error(['Joy: A FormControl can contain only one control component (Autocomplete | Input | Textarea | Select | RadioGroup)', 'You should not mix those components inside a single FormControl instance'].join('\\n'));\n }\n registeredInput.current = true;\n return () => {\n registeredInput.current = false;\n };\n };\n }\n const classes = useUtilityClasses(ownerState);\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n className: clsx(classes.root, className),\n elementType: FormControlRoot,\n externalForwardedProps: _extends({}, other, {\n component,\n slots,\n slotProps\n }),\n ownerState\n });\n const formControlContextValue = React.useMemo(() => ({\n disabled,\n required,\n error,\n color,\n size,\n htmlFor: id,\n labelId: `${id}-label`,\n 'aria-describedby': helperText ? `${id}-helper-text` : undefined,\n setHelperText,\n registerEffect: registerEffect\n }), [color, disabled, error, helperText, id, registerEffect, required, size]);\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: formControlContextValue,\n children: /*#__PURE__*/_jsx(SlotRoot, _extends({}, rootProps))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the children are in disabled state.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the children will indicate an error.\n * @default false\n */\n error: PropTypes.bool,\n /**\n * @ignore\n */\n id: PropTypes.string,\n /**\n * The content direction flow.\n * @default 'vertical'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n /**\n * If `true`, the user must specify a value for the input before the owning form can be submitted.\n * If `true`, the asterisk appears on the FormLabel.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * @default 'md'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['sm', 'md', 'lg']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default FormControl;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getFormLabelUtilityClass(slot) {\n return generateUtilityClass('MuiFormLabel', slot);\n}\nconst formLabelClasses = generateUtilityClasses('MuiFormLabel', ['root', 'asterisk']);\nexport default formLabelClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"component\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { styled, useThemeProps } from '../styles';\nimport useSlot from '../utils/useSlot';\nimport { getFormLabelUtilityClass } from './formLabelClasses';\nimport FormControlContext from '../FormControl/FormControlContext';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = () => {\n const slots = {\n root: ['root'],\n asterisk: ['asterisk']\n };\n return composeClasses(slots, getFormLabelUtilityClass, {});\n};\nconst FormLabelRoot = styled('label', {\n name: 'JoyFormLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme\n}) => ({\n '--Icon-fontSize': 'calc(var(--FormLabel-lineHeight) * 1em)',\n WebkitTapHighlightColor: 'transparent',\n alignSelf: 'var(--FormLabel-alignSelf)',\n // to not fill the block space. It seems like a bug when clicking on empty space (within the label area), even though it is not.\n display: 'flex',\n gap: '2px',\n alignItems: 'center',\n flexWrap: 'wrap',\n userSelect: 'none',\n fontFamily: theme.vars.fontFamily.body,\n fontSize: `var(--FormLabel-fontSize, ${theme.vars.fontSize.sm})`,\n fontWeight: theme.vars.fontWeight.md,\n lineHeight: `var(--FormLabel-lineHeight, ${theme.vars.lineHeight.sm})`,\n color: `var(--FormLabel-color, ${theme.vars.palette.text.primary})`,\n margin: 'var(--FormLabel-margin, 0px)'\n}));\nconst AsteriskComponent = styled('span', {\n name: 'JoyFormLabel',\n slot: 'Asterisk',\n overridesResolver: (props, styles) => styles.asterisk\n})({\n color: 'var(--FormLabel-asteriskColor)'\n});\n/**\n *\n * Demos:\n *\n * - [Input](https://mui.com/joy-ui/react-input/)\n *\n * API:\n *\n * - [FormLabel API](https://mui.com/joy-ui/api/form-label/)\n */\nconst FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {\n var _ref, _inProps$required;\n const props = useThemeProps({\n props: inProps,\n name: 'JoyFormLabel'\n });\n const {\n children,\n component = 'label',\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const formControl = React.useContext(FormControlContext);\n const required = (_ref = (_inProps$required = inProps.required) != null ? _inProps$required : formControl == null ? void 0 : formControl.required) != null ? _ref : false;\n const ownerState = _extends({}, props, {\n required\n });\n const classes = useUtilityClasses();\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n additionalProps: {\n htmlFor: formControl == null ? void 0 : formControl.htmlFor,\n id: formControl == null ? void 0 : formControl.labelId\n },\n ref,\n className: classes.root,\n elementType: FormLabelRoot,\n externalForwardedProps,\n ownerState\n });\n const [SlotAsterisk, asteriskProps] = useSlot('asterisk', {\n additionalProps: {\n 'aria-hidden': true\n },\n className: classes.asterisk,\n elementType: AsteriskComponent,\n externalForwardedProps,\n ownerState\n });\n return /*#__PURE__*/_jsxs(SlotRoot, _extends({}, rootProps, {\n children: [children, required && /*#__PURE__*/_jsxs(SlotAsterisk, _extends({}, asteriskProps, {\n children: [\"\\u2009\", '*']\n }))]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormLabel.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The asterisk is added if required=`true`\n */\n required: PropTypes.bool,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n asterisk: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n asterisk: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default FormLabel;","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { generateUtilityClass } from '../generateUtilityClass';\nimport { generateUtilityClasses } from '../generateUtilityClasses';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass('MuiPopper', slot);\n}\nexport const popperClasses = generateUtilityClasses('MuiPopper', ['root']);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"elementType\", \"externalSlotProps\", \"ownerState\", \"skipResolvingSlotProps\"];\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { appendOwnerState } from './appendOwnerState';\nimport { mergeSlotProps } from './mergeSlotProps';\nimport { resolveComponentProps } from './resolveComponentProps';\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nexport function useSlotProps(parameters) {\n var _parameters$additiona;\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false\n } = parameters,\n rest = _objectWithoutPropertiesLoose(parameters, _excluded);\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps(_extends({}, rest, {\n externalSlotProps: resolvedComponentsProps\n }));\n const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);\n const props = appendOwnerState(elementType, _extends({}, mergedProps, {\n ref\n }), ownerState);\n return props;\n}","'use client';\n\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultContextValue = {\n disableDefaultClasses: false\n};\nconst ClassNameConfiguratorContext = /*#__PURE__*/React.createContext(defaultContextValue);\n/**\n * @ignore - internal hook.\n *\n * Wraps the `generateUtilityClass` function and controls how the classes are generated.\n * Currently it only affects whether the classes are applied or not.\n *\n * @returns Function to be called with the `generateUtilityClass` function specific to a component to generate the classes.\n */\nexport function useClassNamesOverride(generateUtilityClass) {\n const {\n disableDefaultClasses\n } = React.useContext(ClassNameConfiguratorContext);\n return slot => {\n if (disableDefaultClasses) {\n return '';\n }\n return generateUtilityClass(slot);\n };\n}\n\n/**\n * Allows to configure the components within to not apply any built-in classes.\n */\nexport function ClassNameConfigurator(props) {\n const {\n disableDefaultClasses,\n children\n } = props;\n const contextValue = React.useMemo(() => ({\n disableDefaultClasses: disableDefaultClasses != null ? disableDefaultClasses : false\n }), [disableDefaultClasses]);\n return /*#__PURE__*/_jsx(ClassNameConfiguratorContext.Provider, {\n value: contextValue,\n children: children\n });\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"anchorEl\", \"children\", \"direction\", \"disablePortal\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"slotProps\", \"slots\", \"TransitionProps\", \"ownerState\"],\n _excluded2 = [\"anchorEl\", \"children\", \"container\", \"direction\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"style\", \"transition\", \"slotProps\", \"slots\"];\nimport * as React from 'react';\nimport { chainPropTypes, HTMLElementType, refType, unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { createPopper } from '@popperjs/core';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '../composeClasses';\nimport { Portal } from '../Portal';\nimport { getPopperUtilityClass } from './popperClasses';\nimport { useSlotProps } from '../utils';\nimport { useClassNamesOverride } from '../utils/ClassNameConfigurator';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction flipPlacement(placement, direction) {\n if (direction === 'ltr') {\n return placement;\n }\n switch (placement) {\n case 'bottom-end':\n return 'bottom-start';\n case 'bottom-start':\n return 'bottom-end';\n case 'top-end':\n return 'top-start';\n case 'top-start':\n return 'top-end';\n default:\n return placement;\n }\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nfunction isHTMLElement(element) {\n return element.nodeType !== undefined;\n}\nfunction isVirtualElement(element) {\n return !isHTMLElement(element);\n}\nconst useUtilityClasses = () => {\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, useClassNamesOverride(getPopperUtilityClass));\n};\nconst defaultPopperOptions = {};\nconst PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props, forwardedRef) {\n var _slots$root;\n const {\n anchorEl,\n children,\n direction,\n disablePortal,\n modifiers,\n open,\n placement: initialPlacement,\n popperOptions,\n popperRef: popperRefProp,\n slotProps = {},\n slots = {},\n TransitionProps\n // @ts-ignore internal logic\n // prevent from spreading to DOM, it can come from the parent component e.g. Select.\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const tooltipRef = React.useRef(null);\n const ownRef = useForkRef(tooltipRef, forwardedRef);\n const popperRef = React.useRef(null);\n const handlePopperRef = useForkRef(popperRef, popperRefProp);\n const handlePopperRefRef = React.useRef(handlePopperRef);\n useEnhancedEffect(() => {\n handlePopperRefRef.current = handlePopperRef;\n }, [handlePopperRef]);\n React.useImperativeHandle(popperRefProp, () => popperRef.current, []);\n const rtlPlacement = flipPlacement(initialPlacement, direction);\n /**\n * placement initialized from prop but can change during lifetime if modifiers.flip.\n * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n */\n const [placement, setPlacement] = React.useState(rtlPlacement);\n const [resolvedAnchorElement, setResolvedAnchorElement] = React.useState(resolveAnchorEl(anchorEl));\n React.useEffect(() => {\n if (popperRef.current) {\n popperRef.current.forceUpdate();\n }\n });\n React.useEffect(() => {\n if (anchorEl) {\n setResolvedAnchorElement(resolveAnchorEl(anchorEl));\n }\n }, [anchorEl]);\n useEnhancedEffect(() => {\n if (!resolvedAnchorElement || !open) {\n return undefined;\n }\n const handlePopperUpdate = data => {\n setPlacement(data.placement);\n };\n if (process.env.NODE_ENV !== 'production') {\n if (resolvedAnchorElement && isHTMLElement(resolvedAnchorElement) && resolvedAnchorElement.nodeType === 1) {\n const box = resolvedAnchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n }\n let popperModifiers = [{\n name: 'preventOverflow',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'flip',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'onUpdate',\n enabled: true,\n phase: 'afterWrite',\n fn: ({\n state\n }) => {\n handlePopperUpdate(state);\n }\n }];\n if (modifiers != null) {\n popperModifiers = popperModifiers.concat(modifiers);\n }\n if (popperOptions && popperOptions.modifiers != null) {\n popperModifiers = popperModifiers.concat(popperOptions.modifiers);\n }\n const popper = createPopper(resolvedAnchorElement, tooltipRef.current, _extends({\n placement: rtlPlacement\n }, popperOptions, {\n modifiers: popperModifiers\n }));\n handlePopperRefRef.current(popper);\n return () => {\n popper.destroy();\n handlePopperRefRef.current(null);\n };\n }, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]);\n const childProps = {\n placement: placement\n };\n if (TransitionProps !== null) {\n childProps.TransitionProps = TransitionProps;\n }\n const classes = useUtilityClasses();\n const Root = (_slots$root = slots.root) != null ? _slots$root : 'div';\n const rootProps = useSlotProps({\n elementType: Root,\n externalSlotProps: slotProps.root,\n externalForwardedProps: other,\n additionalProps: {\n role: 'tooltip',\n ref: ownRef\n },\n ownerState: props,\n className: classes.root\n });\n return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n children: typeof children === 'function' ? children(childProps) : children\n }));\n});\n\n/**\n * Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v2/) for positioning.\n *\n * Demos:\n *\n * - [Popper](https://mui.com/base-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://mui.com/base-ui/react-popper/components-api/#popper)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(props, forwardedRef) {\n const {\n anchorEl,\n children,\n container: containerProp,\n direction = 'ltr',\n disablePortal = false,\n keepMounted = false,\n modifiers,\n open,\n placement = 'bottom',\n popperOptions = defaultPopperOptions,\n popperRef,\n style,\n transition = false,\n slotProps = {},\n slots = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const [exited, setExited] = React.useState(true);\n const handleEnter = () => {\n setExited(false);\n };\n const handleExited = () => {\n setExited(true);\n };\n if (!keepMounted && !open && (!transition || exited)) {\n return null;\n }\n\n // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n let container;\n if (containerProp) {\n container = containerProp;\n } else if (anchorEl) {\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n container = resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) ? ownerDocument(resolvedAnchorEl).body : ownerDocument(null).body;\n }\n const display = !open && keepMounted && (!transition || exited) ? 'none' : undefined;\n const transitionProps = transition ? {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited\n } : undefined;\n return /*#__PURE__*/_jsx(Portal, {\n disablePortal: disablePortal,\n container: container,\n children: /*#__PURE__*/_jsx(PopperTooltip, _extends({\n anchorEl: anchorEl,\n direction: direction,\n disablePortal: disablePortal,\n modifiers: modifiers,\n ref: forwardedRef,\n open: transition ? !exited : open,\n placement: placement,\n popperOptions: popperOptions,\n popperRef: popperRef,\n slotProps: slotProps,\n slots: slots\n }, other, {\n style: _extends({\n // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n position: 'fixed',\n // Fix Popper.js display issue\n top: 0,\n left: 0,\n display\n }, style),\n TransitionProps: transitionProps,\n children: children\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), props => {\n if (props.open) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || isVirtualElement(resolvedAnchorEl) && resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * Direction of the text.\n * @default 'ltr'\n */\n direction: PropTypes.oneOf(['ltr', 'rtl']),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport { Popper };","export const SelectActionTypes = {\n buttonClick: 'buttonClick'\n};","const defaultOptionStringifier = option => {\n const {\n label,\n value\n } = option;\n if (typeof label === 'string') {\n return label;\n }\n if (typeof value === 'string') {\n return value;\n }\n\n // Fallback string representation\n return String(option);\n};\nexport { defaultOptionStringifier };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { moveHighlight, listReducer, ListActionTypes } from '../useList';\nimport { SelectActionTypes } from './useSelect.types';\nexport function selectReducer(state, action) {\n const {\n open\n } = state;\n const {\n context: {\n selectionMode\n }\n } = action;\n if (action.type === SelectActionTypes.buttonClick) {\n var _state$selectedValues;\n const itemToHighlight = (_state$selectedValues = state.selectedValues[0]) != null ? _state$selectedValues : moveHighlight(null, 'start', action.context);\n return _extends({}, state, {\n open: !open,\n highlightedValue: !open ? itemToHighlight : null\n });\n }\n const newState = listReducer(state, action);\n switch (action.type) {\n case ListActionTypes.keyDown:\n if (state.open) {\n if (action.event.key === 'Escape') {\n return _extends({}, newState, {\n open: false\n });\n }\n if (selectionMode === 'single' && (action.event.key === 'Enter' || action.event.key === ' ')) {\n return _extends({}, newState, {\n open: false\n });\n }\n } else {\n if (action.event.key === 'Enter' || action.event.key === ' ' || action.event.key === 'ArrowDown') {\n var _state$selectedValues2;\n return _extends({}, state, {\n open: true,\n highlightedValue: (_state$selectedValues2 = state.selectedValues[0]) != null ? _state$selectedValues2 : moveHighlight(null, 'start', action.context)\n });\n }\n if (action.event.key === 'ArrowUp') {\n var _state$selectedValues3;\n return _extends({}, state, {\n open: true,\n highlightedValue: (_state$selectedValues3 = state.selectedValues[0]) != null ? _state$selectedValues3 : moveHighlight(null, 'end', action.context)\n });\n }\n }\n break;\n case ListActionTypes.itemClick:\n if (selectionMode === 'single') {\n return _extends({}, newState, {\n open: false\n });\n }\n break;\n case ListActionTypes.blur:\n return _extends({}, newState, {\n open: false\n });\n default:\n return newState;\n }\n return newState;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Combines the two get*Props functions from Base UI hooks into one.\n * Useful when a hook uses two other hooks behind the scenes\n * (such as useSelect that depends on useList and useButton for its root slot).\n *\n * The resulting function will return the combined props.\n * They are merged from left to right, similarly to how Object.assign works.\n *\n * The getSecondProps function will receive the result of the getFirstProps function as its argument,\n * so its event handlers can call the previous handlers and act depending on its result.\n *\n * @param getFirstProps - A getter function that returns the props for the first slot. It receives the external event handlers as its argument.\n * @param getSecondProps - A getter function that returns the props for the second slot. It receives the result of the getFirstProps function as its argument.\n */\nexport function combineHooksSlotProps(getFirstProps, getSecondProps) {\n return function getCombinedProps(external = {}) {\n const firstResult = _extends({}, external, getFirstProps(external));\n const result = _extends({}, firstResult, getSecondProps(firstResult));\n return result;\n };\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useForkRef as useForkRef, unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { useButton } from '../useButton';\nimport { SelectActionTypes } from './useSelect.types';\nimport { useList } from '../useList';\nimport { defaultOptionStringifier } from './defaultOptionStringifier';\nimport { useCompoundParent } from '../utils/useCompound';\nimport { selectReducer } from './selectReducer';\nimport { combineHooksSlotProps } from '../utils/combineHooksSlotProps';\n// visually hidden style based on https://webaim.org/techniques/css/invisiblecontent/\nconst visuallyHiddenStyle = {\n clip: 'rect(1px, 1px, 1px, 1px)',\n clipPath: 'inset(50%)',\n height: '1px',\n width: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n left: '50%',\n bottom: 0 // to display the native browser validation error at the bottom of the Select.\n};\n\nconst noop = () => {};\nfunction defaultFormValueProvider(selectedOption) {\n if (Array.isArray(selectedOption)) {\n if (selectedOption.length === 0) {\n return '';\n }\n return JSON.stringify(selectedOption.map(o => o.value));\n }\n if ((selectedOption == null ? void 0 : selectedOption.value) == null) {\n return '';\n }\n if (typeof selectedOption.value === 'string' || typeof selectedOption.value === 'number') {\n return selectedOption.value;\n }\n return JSON.stringify(selectedOption.value);\n}\nfunction preventDefault(event) {\n event.preventDefault();\n}\n\n/**\n *\n * Demos:\n *\n * - [Select](https://mui.com/base-ui/react-select/#hooks)\n *\n * API:\n *\n * - [useSelect API](https://mui.com/base-ui/react-select/hooks-api/#use-select)\n */\nfunction useSelect(props) {\n const {\n areOptionsEqual,\n buttonRef: buttonRefProp,\n defaultOpen = false,\n defaultValue: defaultValueProp,\n disabled = false,\n listboxId: listboxIdProp,\n listboxRef: listboxRefProp,\n multiple = false,\n name,\n required,\n onChange,\n onHighlightChange,\n onOpenChange,\n open: openProp,\n options: optionsParam,\n getOptionAsString = defaultOptionStringifier,\n getSerializedValue = defaultFormValueProvider,\n value: valueProp\n } = props;\n const buttonRef = React.useRef(null);\n const handleButtonRef = useForkRef(buttonRefProp, buttonRef);\n const listboxRef = React.useRef(null);\n const listboxId = useId(listboxIdProp);\n let defaultValue;\n if (valueProp === undefined && defaultValueProp === undefined) {\n defaultValue = [];\n } else if (defaultValueProp !== undefined) {\n if (multiple) {\n defaultValue = defaultValueProp;\n } else {\n defaultValue = defaultValueProp == null ? [] : [defaultValueProp];\n }\n }\n const value = React.useMemo(() => {\n if (valueProp !== undefined) {\n if (multiple) {\n return valueProp;\n }\n return valueProp == null ? [] : [valueProp];\n }\n return undefined;\n }, [valueProp, multiple]);\n const {\n subitems,\n contextValue: compoundComponentContextValue\n } = useCompoundParent();\n const options = React.useMemo(() => {\n if (optionsParam != null) {\n return new Map(optionsParam.map((option, index) => [option.value, {\n value: option.value,\n label: option.label,\n disabled: option.disabled,\n ref: /*#__PURE__*/React.createRef(),\n id: `${listboxId}_${index}`\n }]));\n }\n return subitems;\n }, [optionsParam, subitems, listboxId]);\n const handleListboxRef = useForkRef(listboxRefProp, listboxRef);\n const {\n getRootProps: getButtonRootProps,\n active: buttonActive,\n focusVisible: buttonFocusVisible,\n rootRef: mergedButtonRef\n } = useButton({\n disabled,\n rootRef: handleButtonRef\n });\n const optionValues = React.useMemo(() => Array.from(options.keys()), [options]);\n const getOptionByValue = React.useCallback(valueToGet => {\n // This can't be simply `options.get(valueToGet)` because of the `areOptionsEqual` prop.\n // If it's provided, we assume that the user wants to compare the options by value.\n if (areOptionsEqual !== undefined) {\n const similarValue = optionValues.find(optionValue => areOptionsEqual(optionValue, valueToGet));\n return options.get(similarValue);\n }\n return options.get(valueToGet);\n }, [options, areOptionsEqual, optionValues]);\n const isItemDisabled = React.useCallback(valueToCheck => {\n var _option$disabled;\n const option = getOptionByValue(valueToCheck);\n return (_option$disabled = option == null ? void 0 : option.disabled) != null ? _option$disabled : false;\n }, [getOptionByValue]);\n const stringifyOption = React.useCallback(valueToCheck => {\n const option = getOptionByValue(valueToCheck);\n if (!option) {\n return '';\n }\n return getOptionAsString(option);\n }, [getOptionByValue, getOptionAsString]);\n const controlledState = React.useMemo(() => ({\n selectedValues: value,\n open: openProp\n }), [value, openProp]);\n const getItemId = React.useCallback(itemValue => {\n var _options$get;\n return (_options$get = options.get(itemValue)) == null ? void 0 : _options$get.id;\n }, [options]);\n const handleSelectionChange = React.useCallback((event, newValues) => {\n if (multiple) {\n onChange == null || onChange(event, newValues);\n } else {\n var _newValues$;\n onChange == null || onChange(event, (_newValues$ = newValues[0]) != null ? _newValues$ : null);\n }\n }, [multiple, onChange]);\n const handleHighlightChange = React.useCallback((event, newValue) => {\n onHighlightChange == null || onHighlightChange(event, newValue != null ? newValue : null);\n }, [onHighlightChange]);\n const handleStateChange = React.useCallback((event, field, fieldValue) => {\n if (field === 'open') {\n onOpenChange == null || onOpenChange(fieldValue);\n if (fieldValue === false && (event == null ? void 0 : event.type) !== 'blur') {\n var _buttonRef$current;\n (_buttonRef$current = buttonRef.current) == null || _buttonRef$current.focus();\n }\n }\n }, [onOpenChange]);\n const useListParameters = {\n getInitialState: () => {\n var _defaultValue;\n return {\n highlightedValue: null,\n selectedValues: (_defaultValue = defaultValue) != null ? _defaultValue : [],\n open: defaultOpen\n };\n },\n getItemId,\n controlledProps: controlledState,\n itemComparer: areOptionsEqual,\n isItemDisabled,\n rootRef: mergedButtonRef,\n onChange: handleSelectionChange,\n onHighlightChange: handleHighlightChange,\n onStateChange: handleStateChange,\n reducerActionContext: React.useMemo(() => ({\n multiple\n }), [multiple]),\n items: optionValues,\n getItemAsString: stringifyOption,\n selectionMode: multiple ? 'multiple' : 'single',\n stateReducer: selectReducer\n };\n const {\n dispatch,\n getRootProps: getListboxRootProps,\n contextValue: listContextValue,\n state: {\n open,\n highlightedValue: highlightedOption,\n selectedValues: selectedOptions\n },\n rootRef: mergedListRootRef\n } = useList(useListParameters);\n const createHandleButtonMouseDown = otherHandlers => event => {\n var _otherHandlers$onMous;\n otherHandlers == null || (_otherHandlers$onMous = otherHandlers.onMouseDown) == null || _otherHandlers$onMous.call(otherHandlers, event);\n if (!event.defaultMuiPrevented) {\n const action = {\n type: SelectActionTypes.buttonClick,\n event\n };\n dispatch(action);\n }\n };\n useEnhancedEffect(() => {\n // Scroll to the currently highlighted option.\n if (highlightedOption != null) {\n var _getOptionByValue;\n const optionRef = (_getOptionByValue = getOptionByValue(highlightedOption)) == null ? void 0 : _getOptionByValue.ref;\n if (!listboxRef.current || !(optionRef != null && optionRef.current)) {\n return;\n }\n const listboxClientRect = listboxRef.current.getBoundingClientRect();\n const optionClientRect = optionRef.current.getBoundingClientRect();\n if (optionClientRect.top < listboxClientRect.top) {\n listboxRef.current.scrollTop -= listboxClientRect.top - optionClientRect.top;\n } else if (optionClientRect.bottom > listboxClientRect.bottom) {\n listboxRef.current.scrollTop += optionClientRect.bottom - listboxClientRect.bottom;\n }\n }\n }, [highlightedOption, getOptionByValue]);\n const getOptionMetadata = React.useCallback(optionValue => getOptionByValue(optionValue), [getOptionByValue]);\n const getSelectTriggerProps = (otherHandlers = {}) => {\n return _extends({}, otherHandlers, {\n onMouseDown: createHandleButtonMouseDown(otherHandlers),\n ref: mergedListRootRef,\n role: 'combobox',\n 'aria-expanded': open,\n 'aria-controls': listboxId\n });\n };\n const getButtonProps = (otherHandlers = {}) => {\n const listboxAndButtonProps = combineHooksSlotProps(getButtonRootProps, getListboxRootProps);\n const combinedProps = combineHooksSlotProps(listboxAndButtonProps, getSelectTriggerProps);\n return combinedProps(otherHandlers);\n };\n const getListboxProps = (otherHandlers = {}) => {\n return _extends({}, otherHandlers, {\n id: listboxId,\n role: 'listbox',\n 'aria-multiselectable': multiple ? 'true' : undefined,\n ref: handleListboxRef,\n onMouseDown: preventDefault // to prevent the button from losing focus when interacting with the listbox\n });\n };\n\n React.useDebugValue({\n selectedOptions,\n highlightedOption,\n open\n });\n const contextValue = React.useMemo(() => _extends({}, listContextValue, compoundComponentContextValue), [listContextValue, compoundComponentContextValue]);\n let selectValue;\n if (props.multiple) {\n selectValue = selectedOptions;\n } else {\n selectValue = selectedOptions.length > 0 ? selectedOptions[0] : null;\n }\n let selectedOptionsMetadata;\n if (multiple) {\n selectedOptionsMetadata = selectValue.map(v => getOptionMetadata(v)).filter(o => o !== undefined);\n } else {\n var _getOptionMetadata;\n selectedOptionsMetadata = (_getOptionMetadata = getOptionMetadata(selectValue)) != null ? _getOptionMetadata : null;\n }\n const getHiddenInputProps = (otherHandlers = {}) => _extends({\n name,\n tabIndex: -1,\n 'aria-hidden': true,\n required: required ? true : undefined,\n value: getSerializedValue(selectedOptionsMetadata),\n onChange: noop,\n style: visuallyHiddenStyle\n }, otherHandlers);\n return {\n buttonActive,\n buttonFocusVisible,\n buttonRef: mergedButtonRef,\n contextValue,\n disabled,\n dispatch,\n getButtonProps,\n getHiddenInputProps,\n getListboxProps,\n getOptionMetadata,\n listboxRef: mergedListRootRef,\n open,\n options: optionValues,\n value: selectValue,\n highlightedOption\n };\n}\nexport { useSelect };","'use client';\n\nimport * as React from 'react';\nimport { ListContext } from '../useList/ListContext';\nimport { CompoundComponentContext } from '../utils/useCompound';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Sets up the contexts for the underlying Option components.\n *\n * @ignore - do not document.\n */\nexport function SelectProvider(props) {\n const {\n value,\n children\n } = props;\n const {\n dispatch,\n getItemIndex,\n getItemState,\n registerHighlightChangeHandler,\n registerSelectionChangeHandler,\n registerItem,\n totalSubitemCount\n } = value;\n const listContextValue = React.useMemo(() => ({\n dispatch,\n getItemState,\n getItemIndex,\n registerHighlightChangeHandler,\n registerSelectionChangeHandler\n }), [dispatch, getItemIndex, getItemState, registerHighlightChangeHandler, registerSelectionChangeHandler]);\n const compoundComponentContextValue = React.useMemo(() => ({\n getItemIndex,\n registerItem,\n totalSubitemCount\n }), [registerItem, getItemIndex, totalSubitemCount]);\n return /*#__PURE__*/_jsx(CompoundComponentContext.Provider, {\n value: compoundComponentContextValue,\n children: /*#__PURE__*/_jsx(ListContext.Provider, {\n value: listContextValue,\n children: children\n })\n });\n}","'use client';\n\nimport * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"m12 5.83 2.46 2.46c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 3.7a.9959.9959 0 0 0-1.41 0L8.12 6.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 5.83zm0 12.34-2.46-2.46a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l3.17 3.18c.39.39 1.02.39 1.41 0l3.17-3.17c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L12 18.17z\"\n}), 'Unfold');","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getSelectUtilityClass(slot) {\n return generateUtilityClass('MuiSelect', slot);\n}\nconst selectClasses = generateUtilityClasses('MuiSelect', ['root', 'button', 'indicator', 'startDecorator', 'endDecorator', 'popper', 'listbox', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'variantPlain', 'variantOutlined', 'variantSoft', 'variantSolid', 'sizeSm', 'sizeMd', 'sizeLg', 'focusVisible', 'disabled', 'expanded']);\nexport default selectClasses;","import * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst VariantColorContext = /*#__PURE__*/React.createContext(undefined);\n\n/**\n * @internal For internal usage only.\n *\n * Use this function in a slot to get the matched default variant and color when the parent's variant and/or color changes.\n */\nexport function getChildVariantAndColor(parentVariant, parentColor) {\n let childColor = parentColor;\n let childVariant = parentVariant;\n if (parentVariant === 'outlined') {\n childColor = 'neutral';\n childVariant = 'plain';\n }\n if (parentVariant === 'plain') {\n childColor = 'neutral';\n }\n return {\n variant: childVariant,\n color: childColor\n };\n}\n\n/**\n * @internal For internal usage only.\n *\n * This hook should be used in a children that are connected with its parent\n * to get the matched default variant and color when the parent's variant and/or color changes.\n *\n * For example, the `Option` component in `Select` component is using this function.\n */\nexport function useVariantColor(instanceVariant, instanceColor, alwaysInheritColor = false) {\n const value = React.useContext(VariantColorContext);\n const [variant, color] = typeof value === 'string' ? value.split(':') : [];\n const result = getChildVariantAndColor(variant || undefined, color || undefined);\n result.variant = instanceVariant || result.variant;\n result.color = instanceColor || (alwaysInheritColor ? color : result.color);\n return result;\n}\n\n/**\n * @internal For internal usage only.\n */\nexport function VariantColorProvider({\n children,\n color,\n variant\n}) {\n return /*#__PURE__*/_jsx(VariantColorContext.Provider, {\n value: `${variant || ''}:${color || ''}`,\n children: children\n });\n}","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nvar _Unfold;\nconst _excluded = [\"action\", \"autoFocus\", \"children\", \"defaultValue\", \"defaultListboxOpen\", \"disabled\", \"getSerializedValue\", \"placeholder\", \"listboxId\", \"listboxOpen\", \"onChange\", \"onListboxOpenChange\", \"onClose\", \"renderValue\", \"required\", \"value\", \"size\", \"variant\", \"color\", \"startDecorator\", \"endDecorator\", \"indicator\", \"aria-describedby\", \"aria-label\", \"aria-labelledby\", \"id\", \"name\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_capitalize as capitalize, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { Popper } from '@mui/base/Popper';\nimport { useSelect, SelectProvider } from '@mui/base/useSelect';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { StyledList } from '../List/List';\nimport ListProvider, { scopedVariables } from '../List/ListProvider';\nimport GroupListContext from '../List/GroupListContext';\nimport Unfold from '../internal/svg-icons/Unfold';\nimport { styled, useThemeProps } from '../styles';\nimport ColorInversion, { useColorInversion } from '../styles/ColorInversion';\nimport { resolveSxValue } from '../styles/styleUtils';\nimport useSlot from '../utils/useSlot';\nimport selectClasses, { getSelectUtilityClass } from './selectClasses';\nimport FormControlContext from '../FormControl/FormControlContext';\nimport { VariantColorProvider } from '../styles/variantColorInheritance';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction defaultRenderSingleValue(selectedOption) {\n var _selectedOption$label;\n return (_selectedOption$label = selectedOption == null ? void 0 : selectedOption.label) != null ? _selectedOption$label : '';\n}\nconst defaultModifiers = [{\n name: 'offset',\n options: {\n offset: [0, 4]\n }\n}, {\n // popper will have the same width as root element when open\n name: 'equalWidth',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles'],\n fn: ({\n state\n }) => {\n state.styles.popper.width = `${state.rects.reference.width}px`;\n }\n}];\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disabled,\n focusVisible,\n size,\n variant,\n open\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible', open && 'expanded', variant && `variant${capitalize(variant)}`, color && `color${capitalize(color)}`, size && `size${capitalize(size)}`],\n button: ['button'],\n startDecorator: ['startDecorator'],\n endDecorator: ['endDecorator'],\n indicator: ['indicator', open && 'expanded'],\n listbox: ['listbox', open && 'expanded', disabled && 'disabled']\n };\n return composeClasses(slots, getSelectUtilityClass, {});\n};\nconst SelectRoot = styled('div', {\n name: 'JoySelect',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme,\n ownerState\n}) => {\n var _theme$variants, _theme$vars$palette, _theme$variants2, _theme$variants3;\n const variantStyle = (_theme$variants = theme.variants[`${ownerState.variant}`]) == null ? void 0 : _theme$variants[ownerState.color];\n const {\n borderRadius\n } = resolveSxValue({\n theme,\n ownerState\n }, ['borderRadius']);\n return [_extends({\n '--Select-radius': theme.vars.radius.sm,\n '--Select-gap': '0.5rem',\n '--Select-placeholderOpacity': 0.64,\n '--Select-decoratorColor': theme.vars.palette.text.icon,\n '--Select-focusedThickness': theme.vars.focus.thickness\n }, ownerState.color === 'context' ? {\n '--Select-focusedHighlight': theme.vars.palette.focusVisible\n } : {\n '--Select-focusedHighlight': (_theme$vars$palette = theme.vars.palette[ownerState.color === 'neutral' ? 'primary' : ownerState.color]) == null ? void 0 : _theme$vars$palette[500]\n }, {\n '--Select-indicatorColor': variantStyle != null && variantStyle.backgroundColor ? variantStyle == null ? void 0 : variantStyle.color : theme.vars.palette.text.tertiary\n }, ownerState.size === 'sm' && {\n '--Select-minHeight': '2rem',\n '--Select-paddingInline': '0.5rem',\n '--Select-decoratorChildHeight': 'min(1.5rem, var(--Select-minHeight))',\n '--Icon-fontSize': theme.vars.fontSize.xl\n }, ownerState.size === 'md' && {\n '--Select-minHeight': '2.25rem',\n '--Select-paddingInline': '0.75rem',\n '--Select-decoratorChildHeight': 'min(1.75rem, var(--Select-minHeight))',\n '--Icon-fontSize': theme.vars.fontSize.xl2\n }, ownerState.size === 'lg' && {\n '--Select-minHeight': '2.75rem',\n '--Select-paddingInline': '1rem',\n '--Select-decoratorChildHeight': 'min(2.375rem, var(--Select-minHeight))',\n '--Icon-fontSize': theme.vars.fontSize.xl2\n }, {\n // variables for controlling child components\n '--Select-decoratorChildOffset': 'min(calc(var(--Select-paddingInline) - (var(--Select-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Select-decoratorChildHeight)) / 2), var(--Select-paddingInline))',\n '--_Select-paddingBlock': 'max((var(--Select-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Select-decoratorChildHeight)) / 2, 0px)',\n '--Select-decoratorChildRadius': 'max(var(--Select-radius) - var(--variant-borderWidth, 0px) - var(--_Select-paddingBlock), min(var(--_Select-paddingBlock) + var(--variant-borderWidth, 0px), var(--Select-radius) / 2))',\n '--Button-minHeight': 'var(--Select-decoratorChildHeight)',\n '--IconButton-size': 'var(--Select-decoratorChildHeight)',\n '--Button-radius': 'var(--Select-decoratorChildRadius)',\n '--IconButton-radius': 'var(--Select-decoratorChildRadius)',\n boxSizing: 'border-box'\n }, ownerState.variant !== 'plain' && {\n boxShadow: theme.shadow.xs\n }, {\n minWidth: 0,\n minHeight: 'var(--Select-minHeight)',\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n borderRadius: 'var(--Select-radius)',\n cursor: 'pointer'\n }, !(variantStyle != null && variantStyle.backgroundColor) && {\n backgroundColor: theme.vars.palette.background.surface\n }, ownerState.size && {\n paddingBlock: {\n sm: 2,\n md: 3,\n lg: 4\n }[ownerState.size] // the padding-block act as a minimum spacing between content and root element\n }, {\n paddingInline: `var(--Select-paddingInline)`\n }, theme.typography[`body-${ownerState.size}`], variantStyle, {\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n pointerEvents: 'none',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 1,\n borderRadius: 'inherit',\n margin: 'calc(var(--variant-borderWidth, 0px) * -1)' // for outlined variant\n },\n\n [`&.${selectClasses.focusVisible}`]: {\n '--Select-indicatorColor': variantStyle == null ? void 0 : variantStyle.color,\n '&::before': {\n boxShadow: `inset 0 0 0 var(--Select-focusedThickness) var(--Select-focusedHighlight)`\n }\n },\n [`&.${selectClasses.disabled}`]: {\n '--Select-indicatorColor': 'inherit'\n }\n }), {\n '&:hover': (_theme$variants2 = theme.variants[`${ownerState.variant}Hover`]) == null ? void 0 : _theme$variants2[ownerState.color],\n [`&.${selectClasses.disabled}`]: (_theme$variants3 = theme.variants[`${ownerState.variant}Disabled`]) == null ? void 0 : _theme$variants3[ownerState.color]\n }, borderRadius !== undefined && {\n '--Select-radius': borderRadius\n }];\n});\nconst SelectButton = styled('button', {\n name: 'JoySelect',\n slot: 'Button',\n overridesResolver: (props, styles) => styles.button\n})(({\n ownerState\n}) => _extends({\n // reset user-agent button style\n border: 0,\n outline: 0,\n background: 'none',\n padding: 0,\n fontSize: 'inherit',\n color: 'inherit',\n alignSelf: 'stretch',\n // make children horizontally aligned\n display: 'flex',\n alignItems: 'center',\n flex: 1,\n fontFamily: 'inherit',\n cursor: 'pointer',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n}, (ownerState.value === null || ownerState.value === undefined) && {\n opacity: 'var(--Select-placeholderOpacity)'\n}, {\n '&::before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n // TODO: use https://caniuse.com/?search=inset when ~94%\n top: 'calc(-1 * var(--variant-borderWidth, 0px))',\n left: 'calc(-1 * var(--variant-borderWidth, 0px))',\n right: 'calc(-1 * var(--variant-borderWidth, 0px))',\n bottom: 'calc(-1 * var(--variant-borderWidth, 0px))',\n borderRadius: 'var(--Select-radius)'\n }\n}));\nconst SelectListbox = styled(StyledList, {\n name: 'JoySelect',\n slot: 'Listbox',\n overridesResolver: (props, styles) => styles.listbox\n})(({\n theme,\n ownerState\n}) => {\n var _theme$variants4;\n const variantStyle = ownerState.color === 'context' ? undefined : (_theme$variants4 = theme.variants[ownerState.variant]) == null ? void 0 : _theme$variants4[ownerState.color];\n return _extends({\n '--focus-outline-offset': `calc(${theme.vars.focus.thickness} * -1)`,\n // to prevent the focus outline from being cut by overflow\n '--ListItem-stickyBackground': (variantStyle == null ? void 0 : variantStyle.backgroundColor) || (variantStyle == null ? void 0 : variantStyle.background) || theme.vars.palette.background.popup,\n '--ListItem-stickyTop': 'calc(var(--List-padding, var(--ListDivider-gap)) * -1)'\n }, scopedVariables, {\n minWidth: 'max-content',\n // prevent options from shrinking if some of them is wider than the Select's root.\n maxHeight: '44vh',\n // the best value from what I tried so far which does not cause screen flicker when listbox is open.\n overflow: 'auto',\n outline: 0,\n boxShadow: theme.shadow.md,\n borderRadius: `var(--List-radius, ${theme.vars.radius.sm})`,\n // `unstable_popup-zIndex` is a private variable that lets other component, e.g. Modal, to override the z-index so that the listbox can be displayed above the Modal.\n zIndex: `var(--unstable_popup-zIndex, ${theme.vars.zIndex.popup})`\n }, !(variantStyle != null && variantStyle.backgroundColor) && {\n backgroundColor: theme.vars.palette.background.popup\n });\n});\nconst SelectStartDecorator = styled('span', {\n name: 'JoySelect',\n slot: 'StartDecorator',\n overridesResolver: (props, styles) => styles.startDecorator\n})({\n '--Button-margin': '0 0 0 calc(var(--Select-decoratorChildOffset) * -1)',\n '--IconButton-margin': '0 0 0 calc(var(--Select-decoratorChildOffset) * -1)',\n '--Icon-margin': '0 0 0 calc(var(--Select-paddingInline) / -4)',\n display: 'inherit',\n alignItems: 'center',\n color: 'var(--Select-decoratorColor)',\n marginInlineEnd: 'var(--Select-gap)'\n});\nconst SelectEndDecorator = styled('span', {\n name: 'JoySelect',\n slot: 'EndDecorator',\n overridesResolver: (props, styles) => styles.endDecorator\n})({\n '--Button-margin': '0 calc(var(--Select-decoratorChildOffset) * -1) 0 0',\n '--IconButton-margin': '0 calc(var(--Select-decoratorChildOffset) * -1) 0 0',\n '--Icon-margin': '0 calc(var(--Select-paddingInline) / -4) 0 0',\n display: 'inherit',\n alignItems: 'center',\n color: 'var(--Select-decoratorColor)',\n marginInlineStart: 'var(--Select-gap)'\n});\nconst SelectIndicator = styled('span', {\n name: 'JoySelect',\n slot: 'Indicator'\n})(({\n ownerState,\n theme\n}) => _extends({}, ownerState.size === 'sm' && {\n '--Icon-fontSize': theme.vars.fontSize.lg\n}, ownerState.size === 'md' && {\n '--Icon-fontSize': theme.vars.fontSize.xl\n}, ownerState.size === 'lg' && {\n '--Icon-fontSize': theme.vars.fontSize.xl2\n}, {\n '--Icon-color': ownerState.color !== 'neutral' || ownerState.variant === 'solid' ? 'currentColor' : theme.vars.palette.text.icon,\n display: 'inherit',\n alignItems: 'center',\n marginInlineStart: 'var(--Select-gap)',\n marginInlineEnd: 'calc(var(--Select-paddingInline) / -4)',\n [`.${selectClasses.endDecorator} + &`]: {\n marginInlineStart: 'calc(var(--Select-gap) / 2)'\n },\n [`&.${selectClasses.expanded}, .${selectClasses.disabled} > &`]: {\n '--Icon-color': 'currentColor'\n }\n}));\n/**\n *\n * Demos:\n *\n * - [Select](https://mui.com/joy-ui/react-select/)\n *\n * API:\n *\n * - [Select API](https://mui.com/joy-ui/api/select/)\n */\nconst Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {\n var _ref2, _inProps$disabled, _ref3, _inProps$size, _formControl$color;\n const props = useThemeProps({\n props: inProps,\n name: 'JoySelect'\n });\n const _ref = props,\n {\n action,\n autoFocus,\n children,\n defaultValue,\n defaultListboxOpen = false,\n disabled: disabledExternalProp,\n getSerializedValue,\n placeholder,\n listboxId,\n listboxOpen: listboxOpenProp,\n onChange,\n onListboxOpenChange,\n onClose,\n renderValue: renderValueProp,\n required = false,\n value: valueProp,\n size: sizeProp = 'md',\n variant = 'outlined',\n color: colorProp = 'neutral',\n startDecorator,\n endDecorator,\n indicator = _Unfold || (_Unfold = /*#__PURE__*/_jsx(Unfold, {})),\n // props to forward to the button (all handlers should go through slotProps.button)\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n id,\n name,\n slots = {},\n slotProps = {}\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n const formControl = React.useContext(FormControlContext);\n if (process.env.NODE_ENV !== 'production') {\n const registerEffect = formControl == null ? void 0 : formControl.registerEffect;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (registerEffect) {\n return registerEffect();\n }\n return undefined;\n }, [registerEffect]);\n }\n const disabledProp = (_ref2 = (_inProps$disabled = inProps.disabled) != null ? _inProps$disabled : formControl == null ? void 0 : formControl.disabled) != null ? _ref2 : disabledExternalProp;\n const size = (_ref3 = (_inProps$size = inProps.size) != null ? _inProps$size : formControl == null ? void 0 : formControl.size) != null ? _ref3 : sizeProp;\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, formControl != null && formControl.error ? 'danger' : (_formControl$color = formControl == null ? void 0 : formControl.color) != null ? _formControl$color : colorProp);\n const renderValue = renderValueProp != null ? renderValueProp : defaultRenderSingleValue;\n const [anchorEl, setAnchorEl] = React.useState(null);\n const rootRef = React.useRef(null);\n const buttonRef = React.useRef(null);\n const listboxRef = React.useRef(null);\n const handleRef = useForkRef(ref, rootRef);\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n var _buttonRef$current;\n (_buttonRef$current = buttonRef.current) == null || _buttonRef$current.focus();\n }\n }), []);\n React.useEffect(() => {\n setAnchorEl(rootRef.current);\n }, []);\n React.useEffect(() => {\n if (autoFocus) {\n buttonRef.current.focus();\n }\n }, [autoFocus]);\n const handleOpenChange = React.useCallback(isOpen => {\n onListboxOpenChange == null || onListboxOpenChange(isOpen);\n if (!isOpen) {\n onClose == null || onClose();\n }\n }, [onClose, onListboxOpenChange]);\n const {\n buttonActive,\n buttonFocusVisible,\n contextValue,\n disabled,\n getButtonProps,\n getListboxProps,\n getHiddenInputProps,\n getOptionMetadata,\n open: listboxOpen,\n value\n } = useSelect({\n buttonRef,\n defaultOpen: defaultListboxOpen,\n defaultValue,\n disabled: disabledProp,\n getSerializedValue,\n listboxId,\n multiple: false,\n name,\n required,\n onChange,\n onOpenChange: handleOpenChange,\n open: listboxOpenProp,\n value: valueProp\n });\n const ownerState = _extends({}, props, {\n active: buttonActive,\n defaultListboxOpen,\n disabled,\n focusVisible: buttonFocusVisible,\n open: listboxOpen,\n renderValue,\n value,\n size,\n variant,\n color\n });\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n slots,\n slotProps\n });\n const selectedOption = React.useMemo(() => {\n var _getOptionMetadata;\n return (_getOptionMetadata = getOptionMetadata(value)) != null ? _getOptionMetadata : null;\n }, [getOptionMetadata, value]);\n const [SlotRoot, rootProps] = useSlot('root', {\n ref: handleRef,\n className: classes.root,\n elementType: SelectRoot,\n externalForwardedProps,\n ownerState\n });\n const [SlotButton, buttonProps] = useSlot('button', {\n additionalProps: {\n 'aria-describedby': ariaDescribedby != null ? ariaDescribedby : formControl == null ? void 0 : formControl['aria-describedby'],\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby != null ? ariaLabelledby : formControl == null ? void 0 : formControl.labelId,\n 'aria-required': required ? 'true' : undefined,\n id: id != null ? id : formControl == null ? void 0 : formControl.htmlFor,\n name\n },\n className: classes.button,\n elementType: SelectButton,\n externalForwardedProps,\n getSlotProps: getButtonProps,\n ownerState\n });\n const [SlotListbox, listboxProps] = useSlot('listbox', {\n additionalProps: {\n ref: listboxRef,\n anchorEl,\n open: listboxOpen,\n placement: 'bottom',\n keepMounted: true\n },\n className: classes.listbox,\n elementType: SelectListbox,\n externalForwardedProps,\n getSlotProps: getListboxProps,\n ownerState: _extends({}, ownerState, {\n nesting: false,\n row: false,\n wrap: false\n }),\n getSlotOwnerState: mergedProps => ({\n size: mergedProps.size || size,\n variant: mergedProps.variant || variant,\n color: mergedProps.color || (!mergedProps.disablePortal ? colorProp : color),\n disableColorInversion: !mergedProps.disablePortal\n })\n });\n const [SlotStartDecorator, startDecoratorProps] = useSlot('startDecorator', {\n className: classes.startDecorator,\n elementType: SelectStartDecorator,\n externalForwardedProps,\n ownerState\n });\n const [SlotEndDecorator, endDecoratorProps] = useSlot('endDecorator', {\n className: classes.endDecorator,\n elementType: SelectEndDecorator,\n externalForwardedProps,\n ownerState\n });\n const [SlotIndicator, indicatorProps] = useSlot('indicator', {\n className: classes.indicator,\n elementType: SelectIndicator,\n externalForwardedProps,\n ownerState\n });\n\n // Wait for `listboxProps` because `slotProps.listbox` could be a function.\n const modifiers = React.useMemo(() => [...defaultModifiers, ...(listboxProps.modifiers || [])], [listboxProps.modifiers]);\n let result = null;\n if (anchorEl) {\n var _listboxProps$ownerSt, _props$slots;\n result = /*#__PURE__*/_jsx(SlotListbox, _extends({}, listboxProps, {\n className: clsx(listboxProps.className, ((_listboxProps$ownerSt = listboxProps.ownerState) == null ? void 0 : _listboxProps$ownerSt.color) === 'context' && selectClasses.colorContext)\n // @ts-ignore internal logic (too complex to typed PopperOwnProps to SlotListbox but this should be removed when we have `usePopper`)\n ,\n modifiers: modifiers\n }, !((_props$slots = props.slots) != null && _props$slots.listbox) && {\n as: Popper,\n slots: {\n root: listboxProps.as || 'ul'\n }\n }, {\n children: /*#__PURE__*/_jsx(SelectProvider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(VariantColorProvider, {\n variant: variant,\n color: colorProp,\n children: /*#__PURE__*/_jsx(GroupListContext.Provider, {\n value: \"select\",\n children: /*#__PURE__*/_jsx(ListProvider, {\n nested: true,\n children: children\n })\n })\n })\n })\n }));\n if (!listboxProps.disablePortal) {\n result =\n /*#__PURE__*/\n // For portal popup, the children should not inherit color inversion from the upper parent.\n _jsx(ColorInversion.Provider, {\n value: undefined,\n children: result\n });\n }\n }\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsxs(SlotRoot, _extends({}, rootProps, {\n children: [startDecorator && /*#__PURE__*/_jsx(SlotStartDecorator, _extends({}, startDecoratorProps, {\n children: startDecorator\n })), /*#__PURE__*/_jsx(SlotButton, _extends({}, buttonProps, {\n children: selectedOption ? renderValue(selectedOption) : placeholder\n })), endDecorator && /*#__PURE__*/_jsx(SlotEndDecorator, _extends({}, endDecoratorProps, {\n children: endDecorator\n })), indicator && /*#__PURE__*/_jsx(SlotIndicator, _extends({}, indicatorProps, {\n children: indicator\n })), /*#__PURE__*/_jsx(\"input\", _extends({}, getHiddenInputProps()))]\n })), result]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Select.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * A ref for imperative actions. It currently only supports `focusVisible()` action.\n */\n action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n focusVisible: PropTypes.func.isRequired\n })\n })]),\n /**\n * If `true`, the select element is focused during the first mount\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the select will be initially open.\n * @default false\n */\n defaultListboxOpen: PropTypes.bool,\n /**\n * The default selected value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * Trailing adornment for the select.\n */\n endDecorator: PropTypes.node,\n /**\n * A function to convert the currently selected value to a string.\n * Used to set a value of a hidden input associated with the select,\n * so that the selected value can be posted with a form.\n */\n getSerializedValue: PropTypes.func,\n /**\n * The indicator(*) for the select.\n * ________________\n * [ value * ]\n * ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾\n */\n indicator: PropTypes.node,\n /**\n * `id` attribute of the listbox element.\n * Also used to derive the `id` attributes of options.\n */\n listboxId: PropTypes.string,\n /**\n * Controls the open state of the select's listbox.\n * @default undefined\n */\n listboxOpen: PropTypes.bool,\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n * If the name is provided, the component will render a hidden input element that can be submitted to a server.\n */\n name: PropTypes.string,\n /**\n * Callback fired when an option is selected.\n */\n onChange: PropTypes.func,\n /**\n * Triggered when focus leaves the menu and the menu should close.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be opened.\n * Use in controlled mode (see listboxOpen).\n */\n onListboxOpenChange: PropTypes.func,\n /**\n * Text to show when there is no selected value.\n */\n placeholder: PropTypes.node,\n /**\n * Function that customizes the rendering of the selected value.\n */\n renderValue: PropTypes.func,\n /**\n * If `true`, the Select cannot be empty when submitting form.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['sm', 'md', 'lg']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n button: PropTypes.elementType,\n endDecorator: PropTypes.elementType,\n indicator: PropTypes.elementType,\n listbox: PropTypes.elementType,\n root: PropTypes.elementType,\n startDecorator: PropTypes.elementType\n }),\n /**\n * Leading adornment for the select.\n */\n startDecorator: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The selected value.\n * Set to `null` to deselect all options.\n */\n value: PropTypes.any,\n /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'outlined'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']), PropTypes.string])\n} : void 0;\nexport default Select;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getOptionUtilityClass(slot) {\n return generateUtilityClass('MuiOption', slot);\n}\nconst optionClasses = generateUtilityClasses('MuiOption', ['root', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'focusVisible', 'disabled', 'selected', 'highlighted', 'variantPlain', 'variantSoft', 'variantOutlined', 'variantSolid']);\nexport default optionClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"component\", \"children\", \"disabled\", \"value\", \"label\", \"variant\", \"color\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { useOption } from '@mui/base/useOption';\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport useSlot from '../utils/useSlot';\nimport { StyledListItemButton } from '../ListItemButton/ListItemButton';\nimport { styled, useThemeProps } from '../styles';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport { useVariantColor } from '../styles/variantColorInheritance';\nimport optionClasses, { getOptionUtilityClass } from './optionClasses';\nimport RowListContext from '../List/RowListContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n highlighted,\n selected\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', highlighted && 'highlighted', selected && 'selected']\n };\n return composeClasses(slots, getOptionUtilityClass, {});\n};\nconst OptionRoot = styled(StyledListItemButton, {\n name: 'JoyOption',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme,\n ownerState\n}) => {\n var _theme$variants;\n const variantStyle = (_theme$variants = theme.variants[`${ownerState.variant}Hover`]) == null ? void 0 : _theme$variants[ownerState.color];\n return {\n [`&.${optionClasses.highlighted}:not([aria-selected=\"true\"])`]: {\n backgroundColor: variantStyle == null ? void 0 : variantStyle.backgroundColor\n }\n };\n});\n/**\n *\n * Demos:\n *\n * - [Select](https://mui.com/joy-ui/react-select/)\n *\n * API:\n *\n * - [Option API](https://mui.com/joy-ui/api/option/)\n */\nconst Option = /*#__PURE__*/React.forwardRef(function Option(inProps, ref) {\n var _optionRef$current;\n const props = useThemeProps({\n props: inProps,\n name: 'JoyOption'\n });\n const {\n component = 'li',\n children,\n disabled = false,\n value,\n label,\n variant: variantProp = 'plain',\n color: colorProp = 'neutral',\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const row = React.useContext(RowListContext);\n const {\n variant = variantProp,\n color: inheritedColor = colorProp\n } = useVariantColor(inProps.variant, inProps.color);\n const optionRef = React.useRef(null);\n const combinedRef = useForkRef(optionRef, ref);\n const computedLabel = label != null ? label : typeof children === 'string' ? children : (_optionRef$current = optionRef.current) == null ? void 0 : _optionRef$current.innerText;\n const {\n getRootProps,\n selected,\n highlighted,\n index\n } = useOption({\n disabled,\n label: computedLabel,\n value,\n rootRef: combinedRef\n });\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, inheritedColor);\n const ownerState = _extends({}, props, {\n disabled,\n selected,\n highlighted,\n index,\n component,\n variant,\n color,\n row\n });\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n getSlotProps: getRootProps,\n elementType: OptionRoot,\n externalForwardedProps,\n className: classes.root,\n ownerState\n });\n return /*#__PURE__*/_jsx(SlotRoot, _extends({}, rootProps, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Option.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * A text representation of the option's content.\n * Used for keyboard text navigation matching.\n */\n label: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The option value.\n */\n value: PropTypes.any.isRequired,\n /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'plain'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']), PropTypes.string])\n} : void 0;\nexport default Option;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useForkRef as useForkRef, unstable_useId as useId } from '@mui/utils';\nimport { useListItem } from '../useList';\nimport { useCompoundItem } from '../utils/useCompoundItem';\n\n/**\n *\n * Demos:\n *\n * - [Select](https://mui.com/base-ui/react-select/#hooks)\n *\n * API:\n *\n * - [useOption API](https://mui.com/base-ui/react-select/hooks-api/#use-option)\n */\nexport function useOption(params) {\n const {\n value,\n label,\n disabled,\n rootRef: optionRefParam,\n id: idParam\n } = params;\n const {\n getRootProps: getListItemProps,\n rootRef: listItemRefHandler,\n highlighted,\n selected\n } = useListItem({\n item: value\n });\n const id = useId(idParam);\n const optionRef = React.useRef(null);\n const selectOption = React.useMemo(() => ({\n disabled,\n label,\n value,\n ref: optionRef,\n id\n }), [disabled, label, value, id]);\n const {\n index\n } = useCompoundItem(value, selectOption);\n const handleRef = useForkRef(optionRefParam, optionRef, listItemRefHandler);\n return {\n getRootProps: (otherHandlers = {}) => _extends({}, otherHandlers, getListItemProps(otherHandlers), {\n id,\n ref: handleRef,\n role: 'option',\n 'aria-selected': selected\n }),\n highlighted,\n index,\n selected,\n rootRef: handleRef\n };\n}","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');","import React, { useRef } from 'react'\nimport { Card, FormControl, FormLabel, IconButton, Option, Select, Stack } from '@mui/joy'\nimport { Close as ClearSelectionIcon } from '@mui/icons-material'\nimport { usePositions } from './context'\n\nconst FilterSelect = ({ field, label, options, title, value, onChange }) => {\n const action = useRef(null)\n\n return (\n \n { label }\n \n \n )\n}\n\nexport const FiltersTray = () => {\n const { columns, filters } = usePositions()\n\n const handleChangeFilter = field => (event, newValue) => {\n filters.set({ ...filters.current, [field]: newValue ?? '' })\n }\n\n const handleClickClearFilters = () => {\n filters.reset()\n }\n\n return (\n \n \n {\n columns.filter(c => !!c.field).map(column => (\n \n ))\n }\n {\n filters.active.length > 0 && (\n \n \n \n )\n }\n \n \n )\n}\n\n","'use client';\n\nimport * as React from 'react';\nimport { getThemeProps, useThemeWithoutDefault as useTheme } from '@mui/system';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\n\n/**\n * @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.\n */\n\n/**\n * @deprecated Not used internally. Use `MediaQueryList` from lib.dom.d.ts instead.\n */\n\n/**\n * @deprecated Not used internally. Use `(event: MediaQueryListEvent) => void` instead.\n */\n\nfunction useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {\n const [match, setMatch] = React.useState(() => {\n if (noSsr && matchMedia) {\n return matchMedia(query).matches;\n }\n if (ssrMatchMedia) {\n return ssrMatchMedia(query).matches;\n }\n\n // Once the component is mounted, we rely on the\n // event listeners to return the correct matches value.\n return defaultMatches;\n });\n useEnhancedEffect(() => {\n let active = true;\n if (!matchMedia) {\n return undefined;\n }\n const queryList = matchMedia(query);\n const updateMatch = () => {\n // Workaround Safari wrong implementation of matchMedia\n // TODO can we remove it?\n // https://github.com/mui/material-ui/pull/17315#issuecomment-528286677\n if (active) {\n setMatch(queryList.matches);\n }\n };\n updateMatch();\n // TODO: Use `addEventListener` once support for Safari < 14 is dropped\n queryList.addListener(updateMatch);\n return () => {\n active = false;\n queryList.removeListener(updateMatch);\n };\n }, [query, matchMedia]);\n return match;\n}\n\n// eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseSyncExternalStore = React['useSyncExternalStore' + ''];\nfunction useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {\n const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);\n const getServerSnapshot = React.useMemo(() => {\n if (noSsr && matchMedia) {\n return () => matchMedia(query).matches;\n }\n if (ssrMatchMedia !== null) {\n const {\n matches\n } = ssrMatchMedia(query);\n return () => matches;\n }\n return getDefaultSnapshot;\n }, [getDefaultSnapshot, query, ssrMatchMedia, noSsr, matchMedia]);\n const [getSnapshot, subscribe] = React.useMemo(() => {\n if (matchMedia === null) {\n return [getDefaultSnapshot, () => () => {}];\n }\n const mediaQueryList = matchMedia(query);\n return [() => mediaQueryList.matches, notify => {\n // TODO: Use `addEventListener` once support for Safari < 14 is dropped\n mediaQueryList.addListener(notify);\n return () => {\n mediaQueryList.removeListener(notify);\n };\n }];\n }, [getDefaultSnapshot, matchMedia, query]);\n const match = maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n return match;\n}\nexport default function useMediaQuery(queryInput, options = {}) {\n const theme = useTheme();\n // Wait for jsdom to support the match media feature.\n // All the browsers MUI support have this built-in.\n // This defensive check is here for simplicity.\n // Most of the time, the match media logic isn't central to people tests.\n const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n const {\n defaultMatches = false,\n matchMedia = supportMatchMedia ? window.matchMedia : null,\n ssrMatchMedia = null,\n noSsr = false\n } = getThemeProps({\n name: 'MuiUseMediaQuery',\n props: options,\n theme\n });\n if (process.env.NODE_ENV !== 'production') {\n if (typeof queryInput === 'function' && theme === null) {\n console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n query = query.replace(/^@media( ?)/m, '');\n\n // TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable\n const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;\n const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue({\n query,\n match\n });\n }\n return match;\n}","import React from 'react'\nimport { \n Box, \n Card, \n Stack, \n Typography, \n Divider, \n List,\n ListItem } from '@mui/joy'\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { useTheme } from '@mui/material/styles';\nimport { Button } from '../button'\n\nexport const PositionsCard = ({ position }) => {\n const theme = useTheme();\n\n const DisplaySemester = (semester, startDate) => {\n const displaySemester = semester.split(\" \")[0]\n\n const displayYear = startDate.split(\"-\")[0]\n\n return `${displaySemester} ${displayYear}`\n }\n\n const DisplayDate = (startDate) => {\n const date = new Date(startDate);\n const formattedDate = `${date.getMonth() + 1}-${date.getDate() + 1}-${date.getFullYear()}`;\n\n return formattedDate\n }\n\n return (\n \n \n )}\n >\n \n DOMAIN\n \n {position.domain}\n \n\n GROUP\n \n {position.group}\n \n\n \n \n \n {position.name}, {DisplaySemester(position.semester, position.startDate)}\n \n {position.description}\n
\n \n \n \n Minimum Education: {position.education}\n \n \n \n \n Anticipated Start Date: {DisplayDate(position.startDate)}\n \n \n \n \n Estimated Duration: {position.duration} weeks\n \n \n \n \n Pay Range: {position.pay}\n \n \n
\n\n
\n \n \n \n \n \n )\n}\n","'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport default function useTheme() {\n const theme = useThemeSystem(defaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme[THEME_ID] || theme;\n}","import React from 'react'\nimport { Stack, Typography } from '@mui/joy'\nimport { usePositions } from './context'\nimport { PositionsCard } from './positions-card'\n\nexport const PositionsList = () => {\n const { filters, filteredPositions } = usePositions()\n\n if (filteredPositions.length === 0) {\n return (\n \n \n {\n filters.active.length\n ? 'No positions match your search criteria!'\n : 'Sorry, we don\\'t currently have open positions!'\n }\n \n \n )\n }\n\n return (\n \n {\n filteredPositions.map(position => (\n \n ))\n }\n \n\n )\n}\n","import { graphql, useStaticQuery } from 'gatsby'\n\n/**\n * This uses a static query to pull in all section content.\n *\n * @param {string} id The section identifier, `section_id`\n * @return {object} All sectionsYaml content\n * */\nexport const useSectionContent = () => {\n return useStaticQuery(graphql`\n query AllSectionContentQuery {\n AboutStar: sectionsYaml(section_id: { eq: \"about-star\" }) {\n blurb\n bullets {\n item\n }\n }\n Forms: sectionsYaml(section_id: { eq: \"forms\" }) {\n title\n sections {\n heading\n links {\n name\n url\n }\n } \n }\n ImportantDates: allImportantDate {\n nodes {\n id\n name\n audience\n dates {\n date\n year\n }\n }\n }\n InterviewTips: sectionsYaml(section_id: { eq: \"interview-tips\" }) {\n title\n featured_img {\n childImageSharp {\n gatsbyImageData(\n width: 800\n height: 860\n placeholder: BLURRED\n formats: [AUTO, WEBP]\n )\n }\n }\n interviewPDF\n tips {\n title\n description\n }\n }\n KeyContacts: sectionsYaml(section_id: { eq: \"key-contacts\" }) {\n title\n people {\n name\n description\n photoURL\n }\n }\n ProcessOverview: sectionsYaml(section_id: { eq: \"process-overview\" }) {\n title\n steps {\n title\n description\n }\n }\n ProgramsOverview: sectionsYaml(section_id: { eq: \"programs-overview\" }) {\n title\n programs {\n title\n program_id\n subtitle\n }\n starShipContent {\n program_id\n description\n sections {\n heading\n contentType\n content {\n title\n url\n }\n }\n }\n starVenturesContent {\n program_id\n description\n starVenturesImg {\n childImageSharp {\n gatsbyImageData(\n width: 1600\n height: 700\n placeholder: BLURRED\n formats: [AUTO, WEBP]\n )\n }\n }\n sections {\n heading\n contentType\n content {\n title\n }\n }\n applicationLink\n minorsNote\n }\n irodsContent {\n program_id\n description\n sections {\n heading\n contentType\n content {\n title\n }\n }\n learnMoreLink\n }\n lowerBanner {\n childImageSharp {\n gatsbyImageData(\n width: 2400\n height: 500\n placeholder: BLURRED\n formats: [AUTO, WEBP]\n )\n }\n }\n }\n StarShowcase: sectionsYaml(section_id: { eq: \"star-showcase\" }) {\n title\n students {\n student_name\n semester\n title\n project_description\n project_link_text\n project_link\n }\n }\n Resources: sectionsYaml(section_id: { eq: \"resources\" }) {\n title\n sections {\n heading\n description\n links {\n title\n url\n }\n stayConnectedList {\n item\n }\n }\n stayConnectedButtonText\n stayConnectedButtonURL\n }\n StudentsStaffCtas: sectionsYaml(section_id: { eq: \"students-staff-ctas\" }) {\n staff_cta {\n title\n background_image {\n childImageSharp {\n gatsbyImageData(\n width: 600\n height: 400\n placeholder: BLURRED\n formats: [AUTO, WEBP]\n )\n }\n }\n }\n students_cta {\n title\n background_image {\n childImageSharp {\n gatsbyImageData(\n width: 600\n height: 400\n placeholder: BLURRED\n formats: [AUTO, WEBP]\n )\n }\n }\n }\n }\n Testimonials: sectionsYaml(section_id: { eq: \"testimonials\" }) {\n title\n quotes {\n quote\n attribution\n }\n }\n WhyRenci: sectionsYaml(section_id: { eq: \"why-renci\" }) {\n title\n reasons {\n title\n description\n }\n }\n }\n `)\n}","import { useEffect, useState } from 'react'\n\nexport const useScrolling = () => {\n const [scrollPosition, setScrollPosition] = useState(0)\n const [scrollDirection, setScrollDirection] = useState(1) // 1 up, -1 down\n\n useEffect(() => {\n let previousScrollPosition = scrollPosition\n let ticking = false\n\n const handleScroll = e => {\n setScrollDirection(previousScrollPosition < window.scrollY ? -1 : 1)\n previousScrollPosition = window.scrollY\n if (!ticking) {\n window.requestAnimationFrame(function () {\n setScrollPosition(previousScrollPosition)\n ticking = false\n })\n ticking = true\n }\n }\n\n window.addEventListener('scroll', handleScroll)\n\n return () => {\n window.removeEventListener('scroll', handleScroll)\n }\n })\n \n return { scrollDirection, scrollPosition }\n}","import { useState, useEffect } from \"react\";\n\nlet defaultWidth;\n\n// This conditional makes the build work.\n// The browser handles this fine during development.\n// However, Node has no window object, so we check here to see if it exists.\nif (typeof window !== \"undefined\") {\n defaultWidth = window.innerWidth;\n}\n\nconst COMPACT_THRESHOLD = 899;\n\nexport const useWindowWidth = (initialWidth = defaultWidth) => {\n const [width, setWidth] = useState(initialWidth);\n const [isCompact, setIsCompact] = useState(null);\n\n useEffect(() => {\n const determineCompactness = () => width < COMPACT_THRESHOLD;\n setIsCompact(determineCompactness());\n }, [width]);\n\n useEffect(() => {\n setWidth(typeof window !== \"undefined\" ? window.innerWidth : 0);\n }, []);\n\n useEffect(() => {\n const handleResize = () => setWidth(window.innerWidth);\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n return { width, isCompact };\n};\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-server-dom-webpack.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var k=require(\"react\"),l={stream:!0},n=new Map,p=Symbol.for(\"react.element\"),q=Symbol.for(\"react.lazy\"),r=Symbol.for(\"react.default_value\"),t=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function u(a){t[a]||(t[a]=k.createServerContext(a,r));return t[a]}function v(a,b,c){this._status=a;this._value=b;this._response=c}v.prototype.then=function(a){0===this._status?(null===this._value&&(this._value=[]),this._value.push(a)):a()};\nfunction w(a){switch(a._status){case 3:return a._value;case 1:var b=JSON.parse(a._value,a._response._fromJSON);a._status=3;return a._value=b;case 2:b=a._value;for(var c=b.chunks,d=0;d {\n const { forward = [], ...filteredConfig } = config || {};\n const configStr = JSON.stringify(filteredConfig, (k, v) => {\n if (typeof v === 'function') {\n v = String(v);\n if (v.startsWith(k + '(')) {\n v = 'function ' + v;\n }\n }\n return v;\n });\n return [\n `!(function(w,p,f,c){`,\n Object.keys(filteredConfig).length > 0\n ? `c=w[p]=Object.assign(w[p]||{},${configStr});`\n : `c=w[p]=w[p]||{};`,\n `c[f]=(c[f]||[])`,\n forward.length > 0 ? `.concat(${JSON.stringify(forward)})` : ``,\n `})(window,'partytown','forward');`,\n snippetCode,\n ].join('');\n};\n\n/**\n * The `type` attribute for Partytown scripts, which does two things:\n *\n * 1. Prevents the `