diff --git a/c-sharp/Projects/DigitalBibleLibrary/DblDownloadableDataProvider.cs b/c-sharp/Projects/DigitalBibleLibrary/DblDownloadableDataProvider.cs index 097f4ca8ee..61d6d678bd 100644 --- a/c-sharp/Projects/DigitalBibleLibrary/DblDownloadableDataProvider.cs +++ b/c-sharp/Projects/DigitalBibleLibrary/DblDownloadableDataProvider.cs @@ -30,7 +30,7 @@ string ProjectId public string DisplayName { get; set; } = DisplayName; public string FullName { get; set; } = FullName; public string BestLanguageName { get; set; } = BestLanguageName; - public string Type { get; set; } = Type.ToString(); + public string Type { get; set; } = Type.ToString() + "Resource"; public long Size { get; set; } = Size; public bool Installed { get; set; } = Installed; public bool UpdateAvailable { get; set; } = UpdateAvailable; diff --git a/extensions/src/platform-get-resources/contributions/localizedStrings.json b/extensions/src/platform-get-resources/contributions/localizedStrings.json index c9d3d3ea5a..e47809202c 100644 --- a/extensions/src/platform-get-resources/contributions/localizedStrings.json +++ b/extensions/src/platform-get-resources/contributions/localizedStrings.json @@ -2,27 +2,27 @@ "metadata": {}, "localizedStrings": { "en": { - "%getResources_action%": "Action", - "%getResources_dialog_subtitle%": "Add resources to Home", - "%getResources_dialog_title%": "Get Resources", - "%getResources_filterInput%": "Search by name, language, type", - "%getResources_fullName%": "Full Name", - "%getResources_get%": "Get", - "%getResources_installed%": "Installed", - "%getResources_language%": "Language", - "%getResources_languageFilter%": "Filter by language", - "%getResources_loadingResources%": "Loading resources...", - "%getResources_noResults%": "No results found", - "%getResources_open%": "Open", - "%getResources_remove%": "Remove", - "%getResources_size%": "Size", - "%getResources_type%": "Type", - "%getResources_type_DBL%": "DBL Resource", - "%getResources_type_ER%": "Enhanced Resource", - "%getResources_type_SLR%": "Source Language Text", - "%getResources_type_XR%": "XML Resource", - "%getResources_type_unknown%": "Unknown resource type", - "%getResources_update%": "Update", + "%resources_action%": "Action", + "%resources_dialog_subtitle%": "Add resources to Home", + "%resources_dialog_title%": "Get Resources", + "%resources_filterInput%": "Search by name, language, type", + "%resources_fullName%": "Full Name", + "%resources_get%": "Get", + "%resources_installed%": "Installed", + "%resources_language%": "Language", + "%resources_languageFilter%": "Filter by language", + "%resources_loadingResources%": "Loading resources...", + "%resources_noResults%": "No results found", + "%resources_open%": "Open", + "%resources_remove%": "Remove", + "%resources_size%": "Size", + "%resources_type%": "Type", + "%resources_type_DBL%": "DBL Resource", + "%resources_type_ER%": "Enhanced Resource", + "%resources_type_SLR%": "Source Language Text", + "%resources_type_XR%": "XML Resource", + "%resources_type_unknown%": "Unknown resource type", + "%resources_update%": "Update", "%mainMenu_openGetResources%": "Get Resources" } } diff --git a/extensions/src/platform-get-resources/src/get-resources.web-view.tsx b/extensions/src/platform-get-resources/src/get-resources.web-view.tsx index 29aa3339ca..8cab55d868 100644 --- a/extensions/src/platform-get-resources/src/get-resources.web-view.tsx +++ b/extensions/src/platform-get-resources/src/get-resources.web-view.tsx @@ -1,494 +1,39 @@ import { WebViewProps } from '@papi/core'; -import papi, { logger } from '@papi/frontend'; +import papi from '@papi/frontend'; import { useData, useDataProvider, useLocalizedStrings } from '@papi/frontend/react'; -import { - BookOpen, - ChevronDown, - ChevronsUpDown, - ChevronUp, - Ellipsis, - Loader, - Search, -} from 'lucide-react'; -import { - Button, - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, - ComboBox, - DropdownMenu, - DropdownMenuCheckboxItem, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, - Input, - Label, - LocalizeKey, - Spinner, - Table, - TableBody, - TableCell, - TableHead, - TableHeader, - TableRow, -} from 'platform-bible-react'; -import { getErrorMessage } from 'platform-bible-utils'; -import type { DblResourceData, ResourceType } from 'platform-get-resources'; -import { useEffect, useMemo, useState } from 'react'; - -const LOCALIZED_STRING_KEYS: LocalizeKey[] = [ - '%getResources_action%', - '%getResources_dialog_subtitle%', - '%getResources_dialog_title%', - '%getResources_filterInput%', - '%getResources_fullName%', - '%getResources_get%', - '%getResources_installed%', - '%getResources_language%', - '%getResources_languageFilter%', - '%getResources_loadingResources%', - '%getResources_noResults%', - '%getResources_open%', - '%getResources_remove%', - '%getResources_size%', - '%getResources_type%', - '%getResources_type_DBL%', - '%getResources_type_ER%', - '%getResources_type_SLR%', - '%getResources_type_XR%', - '%getResources_type_unknown%', - '%getResources_update%', -]; - -type InstallInfo = { - dblEntryUid: string; - action: 'installing' | 'removing'; -}; - -type SortConfig = { - key: 'fullName' | 'bestLanguageName'; - direction: 'ascending' | 'descending'; -}; - -type TypeOptions = { - type: ResourceType; - localizedValue: string; -}; - -const getLanguageOptions = ( - dblResources: DblResourceData[], - languageFilter: string[], -): string[] => { - const sortedLanguages = Array.from( - new Set(dblResources.map((resource) => resource.bestLanguageName)), - ); - - const prioritizedLanguages = new Set( - languageFilter.concat( - dblResources - .filter((resource) => resource.installed) - .map((resource) => resource.bestLanguageName), - ), - ); - - return sortedLanguages.sort((a, b) => { - const aIsPrioritized = prioritizedLanguages.has(a); - const bIsPrioritized = prioritizedLanguages.has(b); - - if (aIsPrioritized && bIsPrioritized) { - return a.localeCompare(b); - } - if (aIsPrioritized) return -1; - if (bIsPrioritized) return 1; - - return a.localeCompare(b); - }); -}; - -const getActionButtonContent = ( - resource: DblResourceData, - buttonText: string, - installResource: (dblEntryUid: string, action: 'install' | 'remove') => void, -) => { - return ( - - ); -}; - -const getActionContent = ( - resource: DblResourceData, - idsBeingHandled: string[], - getText: string, - updateText: string, - installedText: string, - installResource: (dblEntryUid: string, action: 'install' | 'remove') => void, -) => { - const isBeingHandled = idsBeingHandled.includes(resource.dblEntryUid); - if (isBeingHandled) { - return ( - - ); - } - if (!resource.installed) { - return getActionButtonContent(resource, getText, installResource); - } - if (resource.updateAvailable) { - return getActionButtonContent(resource, updateText, installResource); - } - return ; -}; +import type { ResourceType } from 'platform-bible-utils'; +import { FilterableResourceList, FILTERABLE_RESOURCE_LIST_STRING_KEYS } from 'platform-bible-react'; globalThis.webViewComponent = function GetResourcesDialog({ useWebViewState }: WebViewProps) { - const [localizedStrings] = useLocalizedStrings(LOCALIZED_STRING_KEYS); - - const actionText: string = localizedStrings['%getResources_action%']; - const dialogSubtitleText: string = localizedStrings['%getResources_dialog_subtitle%']; - const dialogTitleText: string = localizedStrings['%getResources_dialog_title%']; - const filterInputText: string = localizedStrings['%getResources_filterInput%']; - const fullNameText: string = localizedStrings['%getResources_fullName%']; - const getText: string = localizedStrings['%getResources_get%']; - const installedText: string = localizedStrings['%getResources_installed%']; - const languageText: string = localizedStrings['%getResources_language%']; - const languageFilterText: string = localizedStrings['%getResources_languageFilter%']; - const loadingResourcesText: string = localizedStrings['%getResources_loadingResources%']; - const noResultsText: string = localizedStrings['%getResources_noResults%']; - const openText: string = localizedStrings['%getResources_open%']; - const removeText: string = localizedStrings['%getResources_remove%']; - const sizeText: string = localizedStrings['%getResources_size%']; - const typeText: string = localizedStrings['%getResources_type%']; - const typeDblText: string = localizedStrings['%getResources_type_DBL%']; - const typeErText: string = localizedStrings['%getResources_type_ER%']; - const typeSlrText: string = localizedStrings['%getResources_type_SLR%']; - const typeXrText: string = localizedStrings['%getResources_type_XR%']; - const typeUnknownText: string = localizedStrings['%getResources_type_unknown%']; - const updateText: string = localizedStrings['%getResources_update%']; + const [localizedStrings] = useLocalizedStrings(FILTERABLE_RESOURCE_LIST_STRING_KEYS); const dblResourcesProvider = useDataProvider('platformGetResources.dblResourcesProvider'); + const [dblResources, , isLoadingDblResources] = useData( 'platformGetResources.dblResourcesProvider', ).DblResources(undefined, []); - const [installInfo, setInstallInfo] = useState([]); - - const installOrRemoveResource = (dblEntryUid: string, action: 'install' | 'remove'): void => { - if (!dblResourcesProvider) return; - const newInstallInfo: InstallInfo = { - dblEntryUid, - action: action === 'install' ? 'installing' : 'removing', - }; - - setInstallInfo((prevInfo) => [...prevInfo, newInstallInfo]); - - const actionFunction = - action === 'install' - ? dblResourcesProvider?.installDblResource - : dblResourcesProvider?.uninstallDblResource; - - actionFunction(dblEntryUid).catch((error) => { - logger.debug(getErrorMessage(error)); - }); - }; - - /** Removes resources from array of resources that are currently being handled */ - useEffect(() => { - setInstallInfo((currentInstallInfo) => - currentInstallInfo.filter((info) => { - const resource = dblResources.find((res) => res.dblEntryUid === info.dblEntryUid); - - if (!resource) return true; - - if (info.action === 'installing' && resource.installed) return false; - if (info.action === 'removing' && !resource.installed) return false; - - return true; - }), - ); - }, [dblResources]); - - const [textFilter, setTextFilter] = useState(''); - - const textFilteredResources = useMemo(() => { - return dblResources.filter((resource) => { - const filter = textFilter.toLowerCase(); - return ( - resource.displayName.toLowerCase().includes(filter) || - resource.fullName.toLowerCase().includes(filter) || - resource.bestLanguageName.toLowerCase().includes(filter) - ); - }); - }, [dblResources, textFilter]); - - const [typeFilter, setTypeFilter] = useWebViewState('typeFilter', ['DBL']); - - const typeOptions: TypeOptions[] = useMemo(() => { - return [ - { type: 'DBL', localizedValue: typeDblText }, - { type: 'EnhancedResource', localizedValue: typeErText }, - { type: 'SourceLanguageResource', localizedValue: typeSlrText }, - { type: 'XmlResource', localizedValue: typeXrText }, - ]; - }, [typeDblText, typeErText, typeSlrText, typeXrText]); - - const typeFilterChangeHandler = (newType: ResourceType): void => { - const prevTypeFilter: ResourceType[] = [...typeFilter]; - let newTypeFilter: ResourceType[] = []; - - if (!prevTypeFilter || prevTypeFilter.length === 0) { - newTypeFilter = [newType]; - } else { - newTypeFilter = prevTypeFilter.includes(newType) - ? prevTypeFilter.filter((value) => value !== newType) - : [...prevTypeFilter, newType]; - } - setTypeFilter(newTypeFilter); - }; - - const textAndTypeFilteredResources = useMemo(() => { - return textFilteredResources.filter((resource) => { - return typeFilter.includes(resource.type); - }); - }, [textFilteredResources, typeFilter]); + const [typeFilter, setTypeFilter] = useWebViewState('typeFilter', [ + 'DBLResource', + ]); const [languageFilter, setLanguageFilter] = useWebViewState('languageFilter', []); - useEffect(() => { - if (languageFilter.length === 0) { - setLanguageFilter( - dblResources - .filter((resource) => resource.installed === true) - .map((resource) => resource.bestLanguageName), - ); - } - }, [dblResources, languageFilter.length, setLanguageFilter]); - - const languageFilterChangeHandler = (newLanguage: string): void => { - const prevLanguageFilter: string[] = [...languageFilter]; - let newLanguageFilter: string[] = []; - - if (!prevLanguageFilter || prevLanguageFilter.length === 0) { - newLanguageFilter = [newLanguage]; - } else { - newLanguageFilter = prevLanguageFilter.includes(newLanguage) - ? prevLanguageFilter.filter((value) => value !== newLanguage) - : [...prevLanguageFilter, newLanguage]; - } - setLanguageFilter(newLanguageFilter); - }; - - const textAndTypeAndLanguageFilteredResources = useMemo(() => { - return textAndTypeFilteredResources.filter((resource) => { - return languageFilter.includes(resource.bestLanguageName); - }); - }, [languageFilter, textAndTypeFilteredResources]); - - const [sortConfig, setSortConfig] = useState({ - key: 'bestLanguageName', - direction: 'ascending', - }); - - const sortedResources = useMemo(() => { - return [...textAndTypeAndLanguageFilteredResources].sort((a, b) => { - const aValue = a[sortConfig.key]; - const bValue = b[sortConfig.key]; - - if (aValue < bValue) { - return sortConfig.direction === 'ascending' ? -1 : 1; - } - if (aValue > bValue) { - return sortConfig.direction === 'ascending' ? 1 : -1; - } - return 0; - }); - }, [sortConfig.direction, sortConfig.key, textAndTypeAndLanguageFilteredResources]); - - const handleSort = (key: SortConfig['key']) => { - const newSortConfig: SortConfig = { key, direction: 'ascending' }; - if (sortConfig.key === key && sortConfig.direction === 'ascending') { - newSortConfig.direction = 'descending'; - } - setSortConfig(newSortConfig); - }; + const openResource = (projectId: string) => + papi.commands.sendCommand('platformScriptureEditor.openResourceViewer', projectId); return ( - - -
- -
- {dialogTitleText} - {dialogSubtitleText} -
-
-
- - {isLoadingDblResources || !dblResources ? ( -
- - -
- ) : ( -
-
-
- setTextFilter(event.target.value)} - value={textFilter} - placeholder={filterInputText} - /> - -
- - - - - - {typeOptions.map((option) => ( - { - e.preventDefault(); - typeFilterChangeHandler(option.type); - }} - > - {option.localizedValue} - - ))} - - - } - // hideChevrons - // alignMenu="start" - // keepOpen - /> -
- - {sortedResources.length === 0 ? ( -
- -
- ) : ( - - - - - - handleSort('fullName')}> -
- {fullNameText} - {sortConfig.key !== 'fullName' && ( - - )} - {sortConfig.key === 'fullName' && - (sortConfig.direction === 'ascending' ? ( - - ) : ( - - ))} -
-
- handleSort('bestLanguageName')}> -
- {languageText} - {sortConfig.key !== 'bestLanguageName' && ( - - )} - {sortConfig.key === 'bestLanguageName' && - (sortConfig.direction === 'ascending' ? ( - - ) : ( - - ))} -
-
- {typeText} - {sizeText} - {actionText} -
-
- - {sortedResources.map((resource) => ( - - - - - {resource.displayName} - {resource.fullName} - {resource.bestLanguageName} - - {typeOptions.find((type) => type.type === resource.type)?.localizedValue ?? - typeUnknownText} - - {resource.size} - -
- {getActionContent( - resource, - installInfo.map((info) => info.dblEntryUid), - getText, - updateText, - installedText, - installOrRemoveResource, - )} - {resource.installed && ( - - - - - - - papi.commands.sendCommand( - 'platformScriptureEditor.openResourceViewer', - resource.projectId, - ) - } - > - {openText} - - - - - installOrRemoveResource(resource.dblEntryUid, 'remove') - } - > - {removeText} - - - - )} -
-
-
- ))} -
-
- )} -
- )} -
-
+ ); }; diff --git a/extensions/src/platform-get-resources/src/main.ts b/extensions/src/platform-get-resources/src/main.ts index 84ef175bf9..1ccfdc68ba 100644 --- a/extensions/src/platform-get-resources/src/main.ts +++ b/extensions/src/platform-get-resources/src/main.ts @@ -22,7 +22,7 @@ const getResourcesWebViewProvider: IWebViewProvider = { return { allowPopups: true, title: await papi.localization.getLocalizedString({ - localizeKey: '%getResources_dialog_title%', + localizeKey: '%resources_dialog_title%', }), ...savedWebView, content: getResourcesDialogReact, diff --git a/extensions/src/platform-get-resources/src/types/platform-get-resources.d.ts b/extensions/src/platform-get-resources/src/types/platform-get-resources.d.ts index fdffeeaab6..2737eba964 100644 --- a/extensions/src/platform-get-resources/src/types/platform-get-resources.d.ts +++ b/extensions/src/platform-get-resources/src/types/platform-get-resources.d.ts @@ -1,24 +1,7 @@ declare module 'platform-get-resources' { // @ts-ignore: TS2307 - Cannot find module '@papi/core' or its corresponding type declarations import { DataProviderDataType, IDataProvider } from '@papi/core'; - - export type ResourceType = 'DBL' | 'EnhancedResource' | 'XmlResource' | 'SourceLanguageResource'; - - /** - * Contains small amount of information about DBL resources, for the purpose of presenting a list - * of available resources to the user - */ - export type DblResourceData = { - dblEntryUid: string; - displayName: string; - fullName: string; - bestLanguageName: string; - type: ResourceType; - size: number; - installed: boolean; - updateAvailable: boolean; - projectId: string; - }; + import type { DblResourceData } from 'platform-bible-utils'; export type GetResourcesDataTypes = { /** List of information about resources that are available from the DBL */ diff --git a/extensions/src/platform-home/contributions/localizedStrings.json b/extensions/src/platform-home/contributions/localizedStrings.json index a483a73b08..e1723396b5 100644 --- a/extensions/src/platform-home/contributions/localizedStrings.json +++ b/extensions/src/platform-home/contributions/localizedStrings.json @@ -2,12 +2,27 @@ "metadata": {}, "localizedStrings": { "en": { - "%home_action%": "Action", - "%home_getResources%": "Get Resources", - "%home_language%": "Language", - "%home_loadingProjectsAndResources%": "Loading Projects and Resources", - "%home_dialogTitle%": "Home", - "%home_name%": "Name", + "%resources_action%": "Action", + "%resources_dialog_subtitle%": "", + "%resources_dialog_title%": "Home", + "%resources_filterInput%": "Search by name, language, type", + "%resources_fullName%": "Full Name", + "%resources_get%": "Get", + "%resources_installed%": "Installed", + "%resources_language%": "Language", + "%resources_languageFilter%": "Filter by language", + "%resources_loadingResources%": "Loading Projects and Resource", + "%resources_noResults%": "No results found", + "%resources_open%": "Open", + "%resources_remove%": "Remove", + "%resources_size%": "Size", + "%resources_type%": "Type", + "%resources_type_DBL%": "DBL Resource", + "%resources_type_ER%": "Enhanced Resource", + "%resources_type_SLR%": "Source Language Text", + "%resources_type_XR%": "XML Resource", + "%resources_type_unknown%": "Unknown resource type", + "%resources_update%": "Update", "%mainMenu_openHome%": "Home..." } } diff --git a/extensions/src/platform-home/src/home.web-view.tsx b/extensions/src/platform-home/src/home.web-view.tsx index f155f8c169..8cab55d868 100644 --- a/extensions/src/platform-home/src/home.web-view.tsx +++ b/extensions/src/platform-home/src/home.web-view.tsx @@ -1,95 +1,39 @@ -import { useLocalizedStrings } from '@papi/frontend/react'; -import { BookOpen, Home, Plus } from 'lucide-react'; -import { - Button, - Card, - CardContent, - CardHeader, - CardTitle, - Label, - LocalizeKey, - Spinner, - Table, - TableBody, - TableCell, - TableHead, - TableHeader, - TableRow, -} from 'platform-bible-react'; +import { WebViewProps } from '@papi/core'; +import papi from '@papi/frontend'; +import { useData, useDataProvider, useLocalizedStrings } from '@papi/frontend/react'; +import type { ResourceType } from 'platform-bible-utils'; +import { FilterableResourceList, FILTERABLE_RESOURCE_LIST_STRING_KEYS } from 'platform-bible-react'; -const LOCALIZED_STRING_KEYS: LocalizeKey[] = [ - '%home_action%', - '%home_dialogTitle%', - '%home_getResources%', - '%home_language%', - '%home_loadingProjectsAndResources%', - '%home_name%', -]; +globalThis.webViewComponent = function GetResourcesDialog({ useWebViewState }: WebViewProps) { + const [localizedStrings] = useLocalizedStrings(FILTERABLE_RESOURCE_LIST_STRING_KEYS); -globalThis.webViewComponent = function DownloadResourcesDialog() { - const [localizedStrings] = useLocalizedStrings(LOCALIZED_STRING_KEYS); + const dblResourcesProvider = useDataProvider('platformGetResources.dblResourcesProvider'); - const actionText: string = localizedStrings['%home_action%']; - const dialogTitleText: string = localizedStrings['%home_dialogTitle%']; - const getResourcesText: string = localizedStrings['%home_getResources%']; - const languageText: string = localizedStrings['%home_language%']; - const loadingProjectsAndResourcesText: string = - localizedStrings['%home_loadingProjectsAndResources%']; - const nameText: string = localizedStrings['%home_name%']; + const [dblResources, , isLoadingDblResources] = useData( + 'platformGetResources.dblResourcesProvider', + ).DblResources(undefined, []); - const projects: unknown[] = []; - const isLoading: boolean = false; + const [typeFilter, setTypeFilter] = useWebViewState('typeFilter', [ + 'DBLResource', + ]); - return ( - - -
- -
- {dialogTitleText} -
-
-
- - {isLoading ? ( -
- - -
- ) : ( -
- + const [languageFilter, setLanguageFilter] = useWebViewState('languageFilter', []); + + const openResource = (projectId: string) => + papi.commands.sendCommand('platformScriptureEditor.openResourceViewer', projectId); - - - - - {nameText} - - {languageText} - {actionText} - - - - {projects.map(() => ( - - - - - A - B - C - D - - ))} - -
-
- )} -
-
+ return ( + ); }; diff --git a/extensions/src/platform-home/src/main.ts b/extensions/src/platform-home/src/main.ts index 0212074461..42d8e35e7c 100644 --- a/extensions/src/platform-home/src/main.ts +++ b/extensions/src/platform-home/src/main.ts @@ -22,7 +22,7 @@ const homeWebViewProvider: IWebViewProvider = { return { allowPopups: true, title: await papi.localization.getLocalizedString({ - localizeKey: '%home_dialog_title%', + localizeKey: '%resources_dialog_title%', }), ...savedWebView, content: homeDialogReact, diff --git a/lib/platform-bible-react/dist/index.cjs b/lib/platform-bible-react/dist/index.cjs index d80e3ce3bb..8b70549d09 100644 --- a/lib/platform-bible-react/dist/index.cjs +++ b/lib/platform-bible-react/dist/index.cjs @@ -1,23 +1,23 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),y=require("react"),J=require("lucide-react"),ot=require("clsx"),Qi=require("tailwind-merge"),Ws=require("@radix-ui/react-dropdown-menu"),W=require("platform-bible-utils"),el=require("@radix-ui/react-slot"),Nn=require("class-variance-authority"),tl=require("@radix-ui/react-label"),nl=require("@radix-ui/react-radio-group"),rl=require("@radix-ui/react-popover"),Ce=require("cmdk"),ol=require("@radix-ui/react-dialog"),Ne=require("@tanstack/react-table"),sl=require("@radix-ui/react-select"),al=require("@radix-ui/react-checkbox"),il=require("@radix-ui/react-toggle-group"),ll=require("@radix-ui/react-toggle"),cl=require("@radix-ui/react-tabs"),dl=require("@radix-ui/react-separator"),Ar=require("@mui/styled-engine"),Ie=require("@mui/material"),sn=require("react-dom"),Ks=require("sonner"),ul=require("@radix-ui/react-slider"),pl=require("@radix-ui/react-switch"),wl=require("markdown-to-jsx");function ke(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=ke(y),pe=ke(Ws),Js=ke(tl),hn=ke(nl),gn=ke(rl),Xe=ke(ol),ge=ke(sl),Br=ke(al),er=ke(il),Zs=ke(ll),Oe=ke(cl),Qs=ke(dl),fl=ke(sn),an=ke(ul),Vr=ke(pl);const ml=Qi.extendTailwindMerge({prefix:"tw-"});function S(...e){return ml(ot.clsx(e))}const qt=y.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:S("pr-twp tw-flex tw-h-10 tw-rounded-md tw-border tw-border-input tw-bg-background tw-px-3 tw-py-2 tw-text-sm tw-ring-offset-background file:tw-border-0 file:tw-bg-transparent file:tw-text-sm file:tw-font-medium file:tw-text-foreground placeholder:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50",e),ref:r,...n}));qt.displayName="Input";const hl=y.forwardRef(({handleSearch:e,handleKeyDown:t,handleOnClick:n,handleSubmit:r,...o},s)=>a.jsxs("div",{className:"tw-relative",children:[a.jsx(qt,{...o,type:"text",className:"tw-box-border tw-gap-2.5 tw-rounded-lg tw-border tw-border-solid tw-bg-background tw-py-2 tw-pl-4 tw-pr-3 tw-font-medium tw-shadow-none tw-outline-none",onChange:i=>e(i.target.value),onKeyDown:i=>{i.key==="Enter"&&r(),t(i)},onClick:n,ref:s}),a.jsx(J.History,{className:"tw-absolute tw-right-3 tw-top-1/2 tw-h-4 tw-w-4 tw--translate-y-1/2 tw-transform tw-cursor-pointer tw-text-muted-foreground",onClick:()=>{console.log("back in history")}})]}));var gl=Object.defineProperty,bl=(e,t,n)=>t in e?gl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ne=(e,t,n)=>bl(e,typeof t!="symbol"?t+"":t,n);const gt=["GEN","EXO","LEV","NUM","DEU","JOS","JDG","RUT","1SA","2SA","1KI","2KI","1CH","2CH","EZR","NEH","EST","JOB","PSA","PRO","ECC","SNG","ISA","JER","LAM","EZK","DAN","HOS","JOL","AMO","OBA","JON","MIC","NAM","HAB","ZEP","HAG","ZEC","MAL","MAT","MRK","LUK","JHN","ACT","ROM","1CO","2CO","GAL","EPH","PHP","COL","1TH","2TH","1TI","2TI","TIT","PHM","HEB","JAS","1PE","2PE","1JN","2JN","3JN","JUD","REV","TOB","JDT","ESG","WIS","SIR","BAR","LJE","S3Y","SUS","BEL","1MA","2MA","3MA","4MA","1ES","2ES","MAN","PS2","ODA","PSS","JSA","JDB","TBS","SST","DNT","BLT","XXA","XXB","XXC","XXD","XXE","XXF","XXG","FRT","BAK","OTH","3ES","EZA","5EZ","6EZ","INT","CNC","GLO","TDX","NDX","DAG","PS3","2BA","LBA","JUB","ENO","1MQ","2MQ","3MQ","REP","4BA","LAO"],Jr=["XXA","XXB","XXC","XXD","XXE","XXF","XXG","FRT","BAK","OTH","INT","CNC","GLO","TDX","NDX"],ea=["Genesis","Exodus","Leviticus","Numbers","Deuteronomy","Joshua","Judges","Ruth","1 Samuel","2 Samuel","1 Kings","2 Kings","1 Chronicles","2 Chronicles","Ezra","Nehemiah","Esther (Hebrew)","Job","Psalms","Proverbs","Ecclesiastes","Song of Songs","Isaiah","Jeremiah","Lamentations","Ezekiel","Daniel (Hebrew)","Hosea","Joel","Amos","Obadiah","Jonah","Micah","Nahum","Habakkuk","Zephaniah","Haggai","Zechariah","Malachi","Matthew","Mark","Luke","John","Acts","Romans","1 Corinthians","2 Corinthians","Galatians","Ephesians","Philippians","Colossians","1 Thessalonians","2 Thessalonians","1 Timothy","2 Timothy","Titus","Philemon","Hebrews","James","1 Peter","2 Peter","1 John","2 John","3 John","Jude","Revelation","Tobit","Judith","Esther Greek","Wisdom of Solomon","Sirach (Ecclesiasticus)","Baruch","Letter of Jeremiah","Song of 3 Young Men","Susanna","Bel and the Dragon","1 Maccabees","2 Maccabees","3 Maccabees","4 Maccabees","1 Esdras (Greek)","2 Esdras (Latin)","Prayer of Manasseh","Psalm 151","Odes","Psalms of Solomon","Joshua A. *obsolete*","Judges B. *obsolete*","Tobit S. *obsolete*","Susanna Th. *obsolete*","Daniel Th. *obsolete*","Bel Th. *obsolete*","Extra A","Extra B","Extra C","Extra D","Extra E","Extra F","Extra G","Front Matter","Back Matter","Other Matter","3 Ezra *obsolete*","Apocalypse of Ezra","5 Ezra (Latin Prologue)","6 Ezra (Latin Epilogue)","Introduction","Concordance ","Glossary ","Topical Index","Names Index","Daniel Greek","Psalms 152-155","2 Baruch (Apocalypse)","Letter of Baruch","Jubilees","Enoch","1 Meqabyan","2 Meqabyan","3 Meqabyan","Reproof (Proverbs 25-31)","4 Baruch (Rest of Baruch)","Laodiceans"],ts=Cl();function Ht(e,t=!0){return t&&(e=e.toUpperCase()),e in ts?ts[e]:0}function Zr(e){return Ht(e)>0}function vl(e){const t=typeof e=="string"?Ht(e):e;return t>=40&&t<=66}function yl(e){return(typeof e=="string"?Ht(e):e)<=39}function ta(e){return e<=66}function xl(e){const t=typeof e=="string"?Ht(e):e;return oa(t)&&!ta(t)}function*Nl(){for(let e=1;e<=gt.length;e++)yield e}const kl=1,na=gt.length;function El(){return["XXA","XXB","XXC","XXD","XXE","XXF","XXG"]}function Qr(e,t="***"){const n=e-1;return n<0||n>=gt.length?t:gt[n]}function ra(e){return e<=0||e>na?"******":ea[e-1]}function Sl(e){return ra(Ht(e))}function oa(e){const t=typeof e=="number"?Qr(e):e;return Zr(t)&&!Jr.includes(t)}function jl(e){const t=typeof e=="number"?Qr(e):e;return Zr(t)&&Jr.includes(t)}function Tl(e){return ea[e-1].includes("*obsolete*")}function Cl(){const e={};for(let t=0;t(e[e.Unknown=0]="Unknown",e[e.Original=1]="Original",e[e.Septuagint=2]="Septuagint",e[e.Vulgate=3]="Vulgate",e[e.English=4]="English",e[e.RussianProtestant=5]="RussianProtestant",e[e.RussianOrthodox=6]="RussianOrthodox",e))(qe||{});const Pe=class{constructor(t){if(ne(this,"name"),ne(this,"fullPath"),ne(this,"isPresent"),ne(this,"hasVerseSegments"),ne(this,"isCustomized"),ne(this,"baseVersification"),ne(this,"scriptureBooks"),ne(this,"_type"),t==null)throw new Error("Argument undefined");typeof t=="string"?(this.name=t,this._type=qe[t]):(this._type=t,this.name=qe[t])}get type(){return this._type}equals(t){return!t.type||!this.type?!1:t.type===this.type}};ne(Pe,"Original",new Pe(qe.Original)),ne(Pe,"Septuagint",new Pe(qe.Septuagint)),ne(Pe,"Vulgate",new Pe(qe.Vulgate)),ne(Pe,"English",new Pe(qe.English)),ne(Pe,"RussianProtestant",new Pe(qe.RussianProtestant)),ne(Pe,"RussianOrthodox",new Pe(qe.RussianOrthodox));let ut=Pe;function ns(e,t){const n=t[0];for(let r=1;r(e[e.Valid=0]="Valid",e[e.UnknownVersification=1]="UnknownVersification",e[e.OutOfRange=2]="OutOfRange",e[e.VerseOutOfOrder=3]="VerseOutOfOrder",e[e.VerseRepeated=4]="VerseRepeated",e))(sa||{});const Se=class re{constructor(t,n,r,o){if(ne(this,"firstChapter"),ne(this,"lastChapter"),ne(this,"lastVerse"),ne(this,"hasSegmentsDefined"),ne(this,"text"),ne(this,"BBBCCCVVVS"),ne(this,"longHashCode"),ne(this,"versification"),ne(this,"rtlMark","‏"),ne(this,"_bookNum",0),ne(this,"_chapterNum",0),ne(this,"_verseNum",0),ne(this,"_verse"),r==null&&o==null)if(t!=null&&typeof t=="string"){const s=t,i=n!=null&&n instanceof ut?n:void 0;this.setEmpty(i),this.parse(s)}else if(t!=null&&typeof t=="number"){const s=n!=null&&n instanceof ut?n:void 0;this.setEmpty(s),this._verseNum=t%re.chapterDigitShifter,this._chapterNum=Math.floor(t%re.bookDigitShifter/re.chapterDigitShifter),this._bookNum=Math.floor(t/re.bookDigitShifter)}else if(n==null)if(t!=null&&t instanceof re){const s=t;this._bookNum=s.bookNum,this._chapterNum=s.chapterNum,this._verseNum=s.verseNum,this._verse=s.verse,this.versification=s.versification}else{if(t==null)return;const s=t instanceof ut?t:re.defaultVersification;this.setEmpty(s)}else throw new Error("VerseRef constructor not supported.");else if(t!=null&&n!=null&&r!=null)if(typeof t=="string"&&typeof n=="string"&&typeof r=="string")this.setEmpty(o),this.updateInternal(t,n,r);else if(typeof t=="number"&&typeof n=="number"&&typeof r=="number")this._bookNum=t,this._chapterNum=n,this._verseNum=r,this.versification=o??re.defaultVersification;else throw new Error("VerseRef constructor not supported.");else throw new Error("VerseRef constructor not supported.")}static isVerseParseable(t){return t.length>0&&"0123456789".includes(t[0])&&!t.endsWith(this.verseRangeSeparator)&&!t.endsWith(this.verseSequenceIndicator)}static tryParse(t){let n;try{return n=new re(t),{success:!0,verseRef:n}}catch(r){if(r instanceof en)return n=new re,{success:!1,verseRef:n};throw r}}static getBBBCCCVVV(t,n,r){return t%re.bcvMaxValue*re.bookDigitShifter+(n>=0?n%re.bcvMaxValue*re.chapterDigitShifter:0)+(r>=0?r%re.bcvMaxValue:0)}static fromJSON(t){const{book:n,chapterNum:r,verseNum:o,verse:s,versificationStr:i}=t,l=s||o.toString();let c;return i&&(c=new ut(i)),n?new re(n,r.toString(),l,c):new re}static tryGetVerseNum(t){let n;if(!t)return n=-1,{success:!0,vNum:n};n=0;let r;for(let o=0;o"9")return o===0&&(n=-1),{success:!1,vNum:n};if(n=n*10+ +r-0,n>re.bcvMaxValue)return n=-1,{success:!1,vNum:n}}return{success:!0,vNum:n}}get isDefault(){return this.bookNum===0&&this.chapterNum===0&&this.verseNum===0&&this.versification==null}get hasMultiple(){return this._verse!=null&&(this._verse.includes(re.verseRangeSeparator)||this._verse.includes(re.verseSequenceIndicator))}get book(){return se.bookNumberToId(this.bookNum,"")}set book(t){this.bookNum=se.bookIdToNumber(t)}get chapter(){return this.isDefault||this._chapterNum<0?"":this._chapterNum.toString()}set chapter(t){const n=+t;this._chapterNum=Number.isInteger(n)?n:-1}get verse(){return this._verse!=null?this._verse:this.isDefault||this._verseNum<0?"":this._verseNum.toString()}set verse(t){const{success:n,vNum:r}=re.tryGetVerseNum(t);this._verse=n?void 0:t.replace(this.rtlMark,""),this._verseNum=r,!(this._verseNum>=0)&&({vNum:this._verseNum}=re.tryGetVerseNum(this._verse))}get bookNum(){return this._bookNum}set bookNum(t){if(t<=0||t>se.lastBook)throw new en("BookNum must be greater than zero and less than or equal to last book");this._bookNum=t}get chapterNum(){return this._chapterNum}set chapterNum(t){this.chapterNum=t}get verseNum(){return this._verseNum}set verseNum(t){this._verseNum=t}get versificationStr(){var t;return(t=this.versification)==null?void 0:t.name}set versificationStr(t){this.versification=this.versification!=null?new ut(t):void 0}get valid(){return this.validStatus===0}get validStatus(){return this.validateVerse(re.verseRangeSeparators,re.verseSequenceIndicators)}get BBBCCC(){return re.getBBBCCCVVV(this._bookNum,this._chapterNum,0)}get BBBCCCVVV(){return re.getBBBCCCVVV(this._bookNum,this._chapterNum,this._verseNum)}get isExcluded(){return!1}parse(t){if(t=t.replace(this.rtlMark,""),t.includes("/")){const s=t.split("/");if(t=s[0],s.length>1)try{const i=+s[1].trim();this.versification=new ut(qe[i])}catch{throw new en("Invalid reference : "+t)}}const n=t.trim().split(" ");if(n.length!==2)throw new en("Invalid reference : "+t);const r=n[1].split(":"),o=+r[0];if(r.length!==2||se.bookIdToNumber(n[0])===0||!Number.isInteger(o)||o<0||!re.isVerseParseable(r[1]))throw new en("Invalid reference : "+t);this.updateInternal(n[0],r[0],r[1])}simplify(){this._verse=void 0}clone(){return new re(this)}toString(){const t=this.book;return t===""?"":`${t} ${this.chapter}:${this.verse}`}toJSON(){let t=this.verse;(t===""||t===this.verseNum.toString())&&(t=void 0);const n={book:this.book,chapterNum:this.chapterNum,verseNum:this.verseNum,verse:t,versificationStr:this.versificationStr};return t||delete n.verse,n}equals(t){return t instanceof re?t._bookNum===this._bookNum&&t._chapterNum===this._chapterNum&&t._verseNum===this._verseNum&&t.verse===this.verse&&(t.versification==null&&this.versification==null||t.versification!=null&&this.versification!=null&&t.versification.equals(this.versification)):!1}allVerses(t=!1,n=re.verseRangeSeparators,r=re.verseSequenceIndicators){if(this._verse==null||this.chapterNum<=0)return[this.clone()];const o=[],s=ns(this._verse,r);for(const i of s.map(l=>ns(l,n))){const l=this.clone();l.verse=i[0];const c=l.verseNum;if(o.push(l),i.length>1){const d=this.clone();if(d.verse=i[1],!t)for(let u=c+1;ui)return 3;if(r===i)return 4;r=i}return 0}get internalValid(){return this.versification==null?1:this._bookNum<=0||this._bookNum>se.lastBook?2:(se.isCanonical(this._bookNum),0)}setEmpty(t=re.defaultVersification){this._bookNum=0,this._chapterNum=-1,this._verse=void 0,this.versification=t}updateInternal(t,n,r){this.bookNum=se.bookIdToNumber(t),this.chapter=n,this.verse=r}};ne(Se,"defaultVersification",ut.English),ne(Se,"verseRangeSeparator","-"),ne(Se,"verseSequenceIndicator",","),ne(Se,"verseRangeSeparators",[Se.verseRangeSeparator]),ne(Se,"verseSequenceIndicators",[Se.verseSequenceIndicator]),ne(Se,"chapterDigitShifter",1e3),ne(Se,"bookDigitShifter",Se.chapterDigitShifter*Se.chapterDigitShifter),ne(Se,"bcvMaxValue",Se.chapterDigitShifter-1),ne(Se,"ValidStatusType",sa);class en extends Error{}const tr=pe.Root,eo=pe.Trigger,aa=pe.Group,Ol=pe.Portal,Rl=pe.Sub,Pl=pe.RadioGroup,ia=y.forwardRef(({className:e,inset:t,children:n,...r},o)=>a.jsxs(pe.SubTrigger,{ref:o,className:S("tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none focus:tw-bg-accent data-[state=open]:tw-bg-accent",t&&"tw-pl-8",e),...r,children:[n,a.jsx(J.ChevronRight,{className:"tw-ml-auto tw-h-4 tw-w-4"})]}));ia.displayName=pe.SubTrigger.displayName;const la=y.forwardRef(({className:e,...t},n)=>a.jsx(pe.SubContent,{ref:n,className:S("tw-z-50 tw-min-w-[8rem] tw-overflow-hidden tw-rounded-md tw-border tw-bg-popover tw-p-1 tw-text-popover-foreground tw-shadow-lg data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2",e),...t}));la.displayName=pe.SubContent.displayName;const kn=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(pe.Portal,{children:a.jsx(pe.Content,{ref:r,sideOffset:t,className:S("pr-twp tw-z-50 tw-min-w-[8rem] tw-overflow-hidden tw-rounded-md tw-border tw-bg-popover tw-p-1 tw-text-popover-foreground tw-shadow-md data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2",e),...n})}));kn.displayName=pe.Content.displayName;const to=y.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(pe.Item,{ref:r,className:S("tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none tw-transition-colors focus:tw-bg-accent data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50",t&&"tw-pl-8",e),...n}));to.displayName=pe.Item.displayName;const nr=y.forwardRef(({className:e,children:t,checked:n,...r},o)=>a.jsxs(pe.CheckboxItem,{ref:o,className:S("tw-relative tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-outline-none tw-transition-colors focus:tw-bg-accent focus:tw-text-accent-foreground data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50",e),checked:n,...r,children:[a.jsx("span",{className:"tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center",children:a.jsx(pe.ItemIndicator,{children:a.jsx(J.Check,{className:"tw-h-4 tw-w-4"})})}),t]}));nr.displayName=pe.CheckboxItem.displayName;const no=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(pe.RadioItem,{ref:r,className:S("tw-relative tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-outline-none tw-transition-colors focus:tw-bg-accent focus:tw-text-accent-foreground data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50",e),...n,children:[a.jsx("span",{className:"tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center",children:a.jsx(pe.ItemIndicator,{children:a.jsx(J.Circle,{className:"tw-h-2 tw-w-2 tw-fill-current"})})}),t]}));no.displayName=pe.RadioItem.displayName;const Xt=y.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(pe.Label,{ref:r,className:S("tw-px-2 tw-py-1.5 tw-text-sm tw-font-semibold",t&&"tw-pl-8",e),...n}));Xt.displayName=pe.Label.displayName;const En=y.forwardRef(({className:e,...t},n)=>a.jsx(pe.Separator,{ref:n,className:S("tw--mx-1 tw-my-1 tw-h-px tw-bg-muted",e),...t}));En.displayName=pe.Separator.displayName;function ca({className:e,...t}){return a.jsx("span",{className:S("tw-ml-auto tw-text-xs tw-tracking-widest tw-opacity-60",e),...t})}ca.displayName="DropdownMenuShortcut";const _l=y.forwardRef(({bookId:e,handleSelectBook:t,isSelected:n,handleHighlightBook:r,handleKeyDown:o,bookType:s,children:i},l)=>a.jsxs(to,{ref:l,textValue:e,className:S("tw-mx-1 tw-px-1 tw-font-normal tw-text-foreground/80",{"tw-bg-amber-50 tw-text-yellow-900 data-[highlighted]:tw-bg-amber-100":n}),onSelect:c=>{c.preventDefault(),t()},onKeyDown:c=>{o(c)},onFocus:r,onMouseMove:r,children:[a.jsx("span",{className:S("tw-border-b-0 tw-border-l-2 tw-border-r-0 tw-border-t-0 tw-border-solid tw-px-2",{"tw-font-bold":n,"tw-border-l-red-200":s.toLowerCase()==="ot","tw-border-l-purple-200":s.toLowerCase()==="nt","tw-border-l-indigo-200":s.toLowerCase()==="dc"}),children:se.bookIdToEnglishName(e)}),n&&a.jsx("div",{children:i})]},e));function Il({handleSelectChapter:e,endChapter:t,activeChapter:n,highlightedChapter:r,handleHighlightedChapter:o}){const s=Array.from({length:t},(l,c)=>c+1),i=y.useCallback(l=>{o(l)},[o]);return a.jsx("div",{className:S("tw-flex tw-flex-wrap tw-items-start tw-justify-start tw-self-stretch"),children:s.map(l=>a.jsx("div",{className:S("tw-box-content tw-flex tw-h-4 tw-w-4 tw-cursor-pointer tw-items-center tw-justify-end tw-rounded-md tw-p-2 tw-text-amber-800",{"tw-font-semibold tw-text-amber-900":l===n,"tw-bg-amber-200":l===r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),e(l)},role:"button",onKeyDown:c=>{c.key==="Enter"&&e(l)},tabIndex:0,onMouseMove:()=>i(l),children:l},l))})}function $l({handleSort:e,handleLocationHistory:t,handleBookmarks:n}){return a.jsxs(Xt,{className:"tw-flex tw-justify-between",children:[a.jsx("p",{className:"tw-inline-block tw-align-middle",children:"Go To"}),a.jsxs("div",{className:"tw-flex tw-items-center",children:[a.jsx(J.ArrowDownWideNarrow,{onClick:e,className:"tw-m-2 tw-h-4 tw-w-4 tw-cursor-pointer tw-gap-2"}),a.jsx(J.Clock,{onClick:t,className:"tw-m-2 tw-h-4 tw-w-4 tw-cursor-pointer tw-gap-2"}),a.jsx(J.Bookmark,{onClick:n,className:"tw-m-2 tw-h-4 tw-w-4 tw-cursor-pointer tw-gap-2"})]})]})}const un=se.allBookIds,Ml={OT:"Old Testament",NT:"New Testament",DC:"Deuterocanon"},rs=["OT","NT","DC"],Dl=32+32+32,Al=[/^(\w+)$/i,/^(\w+)(?:\s(\d+))$/i,/^(\w+)(?:\s(\d+):(\d+))$/i],Bl=e=>({OT:un.filter(n=>se.isBookOT(n)),NT:un.filter(n=>se.isBookNT(n)),DC:un.filter(n=>se.isBookDC(n))})[e],tn=e=>W.getChaptersForBook(se.bookIdToNumber(e));function Vl(){return un.map(t=>se.bookIdToEnglishName(t))}function Ll(e){return Vl().includes(e)}function Fl(e){const t=e.toLowerCase().replace(/^\w/,n=>n.toUpperCase());if(Ll(t))return un.find(r=>se.bookIdToEnglishName(r)===t)}function zl({scrRef:e,handleSubmit:t}){const[n,r]=y.useState(""),[o,s]=y.useState(se.bookNumberToId(e.bookNum)),[i,l]=y.useState(e.chapterNum??0),[c,d]=y.useState(se.bookNumberToId(e.bookNum)),[u,h]=y.useState(!1),[w,b]=y.useState(u),v=y.useRef(void 0),f=y.useRef(void 0),m=y.useRef(void 0),N=y.useCallback(k=>Bl(k).filter(D=>{const $=se.bookIdToEnglishName(D).toLowerCase(),Z=n.replace(/[^a-zA-Z]/g,"").toLowerCase();return $.includes(Z)||D.toLowerCase().includes(Z)}),[n]),I=k=>{r(k)},C=y.useRef(!1),E=y.useCallback(k=>{if(C.current){C.current=!1;return}h(k)},[]),g=y.useCallback((k,D,$,Z)=>{if(l(se.bookNumberToId(e.bookNum)!==k?1:e.chapterNum),D||tn(k)===-1){t({bookNum:se.bookIdToNumber(k),chapterNum:$||1,verseNum:Z||1}),h(!1),r("");return}s(o!==k?k:""),h(!D)},[t,e.bookNum,e.chapterNum,o]),P=k=>{k<=0||k>tn(o)||g(o,!0,k)},V=y.useCallback(()=>{Al.forEach(k=>{const D=n.match(k);if(D){const[$,Z=void 0,Y=void 0]=D.slice(1),z=Fl($);(se.isBookIdValid($)||z)&&g(z??$,!0,Z?parseInt(Z,10):1,Y?parseInt(Y,10):1)}})},[g,n]),U=y.useCallback(k=>{u?(k.key==="ArrowDown"||k.key==="ArrowUp")&&(typeof m<"u"&&m.current!==null?m.current.focus():typeof f<"u"&&f.current!==null&&f.current.focus(),k.preventDefault()):h(!0)},[u]),j=k=>{const{key:D}=k;D==="ArrowRight"||D==="ArrowLeft"||D==="ArrowDown"||D==="ArrowUp"||D==="Enter"||(v.current.dispatchEvent(new KeyboardEvent("keydown",{key:D})),v.current.focus())},R=k=>{const{key:D}=k;if(c===o){if(D==="Enter"){k.preventDefault(),g(o,!0,i);return}let $=0;if(D==="ArrowRight")if(i1)$=-1;else{k.preventDefault();return}else D==="ArrowDown"?$=6:D==="ArrowUp"&&($=-6);i+$<=0||i+$>tn(c)?l(0):$!==0&&(l(i+$),k.preventDefault())}};return y.useEffect(()=>{o===c?o===se.bookNumberToId(e.bookNum)?l(e.chapterNum):l(1):l(0)},[c,e.bookNum,e.chapterNum,o]),y.useLayoutEffect(()=>{b(u)},[u]),y.useLayoutEffect(()=>{const k=setTimeout(()=>{if(w&&f.current&&m.current){const $=m.current.offsetTop-Dl;f.current.scrollTo({top:$,behavior:"instant"})}},10);return()=>{clearTimeout(k)}},[w]),a.jsx("div",{className:"pr-twp tw-flex",children:a.jsxs(tr,{modal:!1,open:u,onOpenChange:E,children:[a.jsx(eo,{asChild:!0,children:a.jsx(hl,{ref:v,value:n,handleSearch:I,handleKeyDown:U,handleOnClick:()=>{s(se.bookNumberToId(e.bookNum)),d(se.bookNumberToId(e.bookNum)),l(e.chapterNum>0?e.chapterNum:0),h(!0),v.current.focus()},onFocus:()=>{C.current=!0},handleSubmit:V,placeholder:`${se.bookNumberToEnglishName(e.bookNum)} ${e.chapterNum}:${e.verseNum}`})}),a.jsxs(kn,{className:"tw-m-1 tw-overflow-y-auto tw-p-0 tw-font-normal tw-text-foreground/80",style:{width:"233px",maxHeight:"500px",zIndex:"250"},onKeyDown:j,align:"start",ref:f,children:[a.jsx($l,{handleSort:()=>console.log("sorting"),handleLocationHistory:()=>console.log("location history"),handleBookmarks:()=>console.log("bookmarks")}),rs.map((k,D)=>N(k).length>0&&a.jsxs("div",{children:[a.jsx(Xt,{className:"tw-font-semibold tw-text-foreground/80",children:Ml[k]}),N(k).map($=>a.jsx("div",{children:a.jsx(_l,{bookId:$,handleSelectBook:()=>g($,!1),isSelected:o===$,handleHighlightBook:()=>d($),handleKeyDown:R,bookType:k,ref:Z=>{o===$&&(m.current=Z)},children:a.jsx(Il,{handleSelectChapter:P,endChapter:tn($),activeChapter:e.bookNum===se.bookIdToNumber($)?e.chapterNum:0,highlightedChapter:i,handleHighlightedChapter:Z=>{l(Z)}})})},$)),rs.length-1!==D?a.jsx(En,{}):void 0]},k))]})]})})}const da=Nn.cva("pr-twp tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50",{variants:{variant:{default:"tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/90",destructive:"tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/90",outline:"tw-border tw-border-input tw-bg-background hover:tw-bg-accent hover:tw-text-accent-foreground",secondary:"tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80",ghost:"hover:tw-bg-accent hover:tw-text-accent-foreground",link:"tw-text-primary tw-underline-offset-4 hover:tw-underline"},size:{default:"tw-h-10 tw-px-4 tw-py-2",sm:"tw-h-9 tw-rounded-md tw-px-3",lg:"tw-h-11 tw-rounded-md tw-px-8",icon:"tw-h-10 tw-w-10"}},defaultVariants:{variant:"default",size:"default"}}),fe=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?el.Slot:"button";return a.jsx(i,{className:S(da({variant:t,size:n,className:e})),ref:s,...o})});fe.displayName="Button";const Gl=Nn.cva("tw-text-sm tw-font-medium tw-leading-none peer-disabled:tw-cursor-not-allowed peer-disabled:tw-opacity-70"),Ue=y.forwardRef(({className:e,...t},n)=>a.jsx(Js.Root,{ref:n,className:S("pr-twp",Gl(),e),...t}));Ue.displayName=Js.Root.displayName;const ro=y.forwardRef(({className:e,...t},n)=>a.jsx(hn.Root,{className:S("pr-twp tw-grid tw-gap-2",e),...t,ref:n}));ro.displayName=hn.Root.displayName;const Hn=y.forwardRef(({className:e,...t},n)=>a.jsx(hn.Item,{ref:n,className:S("pr-twp tw-aspect-square tw-h-4 tw-w-4 tw-rounded-full tw-border tw-border-primary tw-text-primary tw-ring-offset-background focus:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50",e),...t,children:a.jsx(hn.Indicator,{className:"tw-flex tw-items-center tw-justify-center",children:a.jsx(J.Circle,{className:"tw-h-2.5 tw-w-2.5 tw-fill-current tw-text-current"})})}));Hn.displayName=hn.Item.displayName;const ua=gn.Root,pa=gn.Trigger,oo=y.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>a.jsx(gn.Portal,{children:a.jsx(gn.Content,{ref:o,align:t,sideOffset:n,className:S("pr-twp tw-z-50 tw-w-72 tw-rounded-md tw-border tw-bg-popover tw-p-4 tw-text-popover-foreground tw-shadow-md tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2",e),...r})}));oo.displayName=gn.Content.displayName;const Ul=Xe.Portal,wa=y.forwardRef(({className:e,...t},n)=>a.jsx(Xe.Overlay,{ref:n,className:S("tw-fixed tw-inset-0 tw-z-50 tw-bg-black/80 data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0",e),...t}));wa.displayName=Xe.Overlay.displayName;const ql=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(Ul,{children:[a.jsx(wa,{}),a.jsxs(Xe.Content,{ref:r,className:S("pr-twp tw-fixed tw-left-[50%] tw-top-[50%] tw-z-50 tw-grid tw-w-full tw-max-w-lg tw-translate-x-[-50%] tw-translate-y-[-50%] tw-gap-4 tw-border tw-bg-background tw-p-6 tw-shadow-lg tw-duration-200 data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[state=closed]:tw-slide-out-to-left-1/2 data-[state=closed]:tw-slide-out-to-top-[48%] data-[state=open]:tw-slide-in-from-left-1/2 data-[state=open]:tw-slide-in-from-top-[48%] sm:tw-rounded-lg",e),...n,children:[t,a.jsxs(Xe.Close,{className:"tw-absolute tw-right-4 tw-top-4 tw-rounded-sm tw-opacity-70 tw-ring-offset-background tw-transition-opacity hover:tw-opacity-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2 disabled:tw-pointer-events-none data-[state=open]:tw-bg-accent data-[state=open]:tw-text-muted-foreground",children:[a.jsx(J.X,{className:"tw-h-4 tw-w-4"}),a.jsx("span",{className:"tw-sr-only",children:"Close"})]})]})]}));ql.displayName=Xe.Content.displayName;const Hl=y.forwardRef(({className:e,...t},n)=>a.jsx(Xe.Title,{ref:n,className:S("tw-text-lg tw-font-semibold tw-leading-none tw-tracking-tight",e),...t}));Hl.displayName=Xe.Title.displayName;const Xl=y.forwardRef(({className:e,...t},n)=>a.jsx(Xe.Description,{ref:n,className:S("tw-text-sm tw-text-muted-foreground",e),...t}));Xl.displayName=Xe.Description.displayName;const so=y.forwardRef(({className:e,...t},n)=>a.jsx(Ce.Command,{ref:n,className:S("tw-flex tw-h-full tw-w-full tw-flex-col tw-overflow-hidden tw-rounded-md tw-bg-popover tw-text-popover-foreground",e),...t}));so.displayName=Ce.Command.displayName;const ao=y.forwardRef(({className:e,...t},n)=>a.jsxs("div",{className:"tw-flex tw-items-center tw-border-b tw-px-3",children:[a.jsx(J.Search,{className:"tw-me-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50"}),a.jsx(Ce.Command.Input,{ref:n,className:S("tw-flex tw-h-11 tw-w-full tw-rounded-md tw-bg-transparent tw-py-3 tw-text-sm tw-outline-none placeholder:tw-text-muted-foreground disabled:tw-cursor-not-allowed disabled:tw-opacity-50",e),...t})]}));ao.displayName=Ce.Command.Input.displayName;const io=y.forwardRef(({className:e,...t},n)=>a.jsx(Ce.Command.List,{ref:n,className:S("tw-max-h-[300px] tw-overflow-y-auto tw-overflow-x-hidden",e),...t}));io.displayName=Ce.Command.List.displayName;const lo=y.forwardRef((e,t)=>a.jsx(Ce.Command.Empty,{ref:t,className:"tw-py-6 tw-text-center tw-text-sm",...e}));lo.displayName=Ce.Command.Empty.displayName;const fa=y.forwardRef(({className:e,...t},n)=>a.jsx(Ce.Command.Group,{ref:n,className:S("tw-overflow-hidden tw-p-1 tw-text-foreground [&_[cmdk-group-heading]]:tw-px-2 [&_[cmdk-group-heading]]:tw-py-1.5 [&_[cmdk-group-heading]]:tw-text-xs [&_[cmdk-group-heading]]:tw-font-medium [&_[cmdk-group-heading]]:tw-text-muted-foreground",e),...t}));fa.displayName=Ce.Command.Group.displayName;const Yl=y.forwardRef(({className:e,...t},n)=>a.jsx(Ce.Command.Separator,{ref:n,className:S("tw--mx-1 tw-h-px tw-bg-border",e),...t}));Yl.displayName=Ce.Command.Separator.displayName;const co=y.forwardRef(({className:e,...t},n)=>a.jsx(Ce.Command.Item,{ref:n,className:S("tw-relative tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none data-[disabled=true]:tw-pointer-events-none data-[selected=true]:tw-bg-accent data-[selected=true]:tw-text-accent-foreground data-[disabled=true]:tw-opacity-50",e),...t}));co.displayName=Ce.Command.Item.displayName;function Wl(e){return typeof e=="string"?e:typeof e=="number"?e.toString():e.label}function Lr({id:e,options:t=[],className:n,value:r,onChange:o=()=>{},getOptionLabel:s=Wl,icon:i=void 0,buttonPlaceholder:l="",textPlaceholder:c="",commandEmptyMessage:d="No option found",buttonVariant:u="outline",alignDropDown:h="start",dir:w="ltr",isDisabled:b=!1,...v}){const[f,m]=y.useState(!1);return a.jsxs(ua,{open:f,onOpenChange:m,...v,children:[a.jsx(pa,{asChild:!0,children:a.jsxs(fe,{variant:u,role:"combobox","aria-expanded":f,id:e,className:S("tw-flex tw-w-[200px] tw-items-center tw-justify-between tw-overflow-hidden",n),disabled:b,children:[a.jsxs("div",{className:"tw-flex tw-flex-1 tw-items-center tw-overflow-hidden",children:[i&&a.jsx("div",{className:"tw-pr-2",children:i}),a.jsx("span",{className:"tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap",children:r?s(r):l})]}),a.jsx(J.ChevronsUpDown,{className:"tw-ms-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50"})]})}),a.jsx(oo,{align:h,className:"tw-w-[200px] tw-p-0",dir:w,children:a.jsxs(so,{children:[a.jsx(ao,{dir:w,placeholder:c,className:"tw-text-inherit"}),a.jsx(lo,{children:d}),a.jsx(io,{children:t.map(N=>a.jsxs(co,{value:s(N),onSelect:()=>{o(N),m(!1)},children:[a.jsx(J.Check,{className:S("tw-me-2 tw-h-4 tw-w-4",{"tw-opacity-0":!r||s(r)!==s(N)})}),s(N)]},s(N)))})]})})]})}function ma({startChapter:e,endChapter:t,handleSelectStartChapter:n,handleSelectEndChapter:r,isDisabled:o=!1,chapterCount:s}){const i=y.useMemo(()=>Array.from({length:s},(d,u)=>u+1),[s]),l=d=>{n(d),d>t&&r(d)},c=d=>{r(d),dd.toString(),value:e},"start chapter"),a.jsx(Ue,{htmlFor:"end-chapters-combobox",children:"to"}),a.jsx(Lr,{isDisabled:o,onChange:c,className:"tw-ml-2 tw-w-20",options:i,getOptionLabel:d=>d.toString(),value:t},"end chapter")]})}var ha=(e=>(e.CURRENT_BOOK="current book",e.CHOOSE_BOOKS="choose books",e))(ha||{});const Kl=Object.freeze(["%webView_bookSelector_currentBook%","%webView_bookSelector_choose%","%webView_bookSelector_chooseBooks%"]),kr=(e,t)=>e[t]??t;function Jl({handleBookSelectionModeChange:e,currentBookName:t,onSelectBooks:n,selectedBookIds:r,chapterCount:o,endChapter:s,handleSelectEndChapter:i,startChapter:l,handleSelectStartChapter:c,localizedStrings:d}){const u=kr(d,"%webView_bookSelector_currentBook%"),h=kr(d,"%webView_bookSelector_choose%"),w=kr(d,"%webView_bookSelector_chooseBooks%"),[b,v]=y.useState("current book"),f=m=>{v(m),e(m)};return a.jsx(ro,{className:"pr-twp tw-flex",value:b,onValueChange:m=>f(m),children:a.jsxs("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-4",children:[a.jsxs("div",{className:"tw-grid tw-grid-cols-[25%,25%,50%]",children:[a.jsxs("div",{className:"tw-flex tw-items-center",children:[a.jsx(Hn,{value:"current book"}),a.jsx(Ue,{className:"tw-ml-1",children:u})]}),a.jsx(Ue,{className:"tw-flex tw-items-center",children:t}),a.jsx("div",{className:"tw-flex tw-items-center tw-justify-end",children:a.jsx(ma,{isDisabled:b==="choose books",handleSelectStartChapter:c,handleSelectEndChapter:i,chapterCount:o,startChapter:l,endChapter:s})})]}),a.jsxs("div",{className:"tw-grid tw-grid-cols-[25%,50%,25%]",children:[a.jsxs("div",{className:"tw-flex tw-items-center",children:[a.jsx(Hn,{value:"choose books"}),a.jsx(Ue,{className:"tw-ml-1",children:w})]}),a.jsx(Ue,{className:"tw-flex tw-items-center",children:r.map(m=>se.bookIdToEnglishName(m)).join(", ")}),a.jsx(fe,{disabled:b==="current book",onClick:()=>n(),children:h})]})]})})}function Zl({table:e}){return a.jsxs(tr,{children:[a.jsx(Ws.DropdownMenuTrigger,{asChild:!0,children:a.jsxs(fe,{variant:"outline",size:"sm",className:"tw-ml-auto tw-hidden tw-h-8 lg:tw-flex",children:[a.jsx(J.FilterIcon,{className:"tw-mr-2 tw-h-4 tw-w-4"}),"View"]})}),a.jsxs(kn,{align:"end",className:"tw-w-[150px]",children:[a.jsx(Xt,{children:"Toggle columns"}),a.jsx(En,{}),e.getAllColumns().filter(t=>t.getCanHide()).map(t=>a.jsx(nr,{className:"tw-capitalize",checked:t.getIsVisible(),onCheckedChange:n=>t.toggleVisibility(!!n),children:t.id},t.id))]})]})}const Dt=ge.Root,ga=ge.Group,At=ge.Value,bt=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(ge.Trigger,{ref:r,className:S("tw-flex tw-h-10 tw-w-full tw-items-center tw-justify-between tw-rounded-md tw-border tw-border-input tw-bg-background tw-px-3 tw-py-2 tw-text-sm tw-ring-offset-background placeholder:tw-text-muted-foreground focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50 [&>span]:tw-line-clamp-1",e),...n,children:[t,a.jsx(ge.Icon,{asChild:!0,children:a.jsx(J.ChevronDown,{className:"tw-h-4 tw-w-4 tw-opacity-50"})})]}));bt.displayName=ge.Trigger.displayName;const uo=y.forwardRef(({className:e,...t},n)=>a.jsx(ge.ScrollUpButton,{ref:n,className:S("tw-flex tw-cursor-default tw-items-center tw-justify-center tw-py-1",e),...t,children:a.jsx(J.ChevronUp,{className:"tw-h-4 tw-w-4"})}));uo.displayName=ge.ScrollUpButton.displayName;const po=y.forwardRef(({className:e,...t},n)=>a.jsx(ge.ScrollDownButton,{ref:n,className:S("tw-flex tw-cursor-default tw-items-center tw-justify-center tw-py-1",e),...t,children:a.jsx(J.ChevronDown,{className:"tw-h-4 tw-w-4"})}));po.displayName=ge.ScrollDownButton.displayName;const vt=y.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>a.jsx(ge.Portal,{children:a.jsxs(ge.Content,{ref:o,className:S("pr-twp tw-relative tw-z-50 tw-max-h-96 tw-min-w-[8rem] tw-overflow-hidden tw-rounded-md tw-border tw-bg-popover tw-text-popover-foreground tw-shadow-md data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:tw-translate-y-1 data-[side=left]:tw--translate-x-1 data-[side=right]:tw-translate-x-1 data-[side=top]:tw--translate-y-1",e),position:n,...r,children:[a.jsx(uo,{}),a.jsx(ge.Viewport,{className:S("tw-p-1",n==="popper"&&"tw-h-[var(--radix-select-trigger-height)] tw-w-full tw-min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(po,{})]})}));vt.displayName=ge.Content.displayName;const ba=y.forwardRef(({className:e,...t},n)=>a.jsx(ge.Label,{ref:n,className:S("tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-font-semibold",e),...t}));ba.displayName=ge.Label.displayName;const De=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(ge.Item,{ref:r,className:S("tw-relative tw-flex tw-w-full tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-outline-none focus:tw-bg-accent focus:tw-text-accent-foreground data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50",e),...n,children:[a.jsx("span",{className:"tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center",children:a.jsx(ge.ItemIndicator,{children:a.jsx(J.Check,{className:"tw-h-4 tw-w-4"})})}),a.jsx(ge.ItemText,{children:t})]}));De.displayName=ge.Item.displayName;const va=y.forwardRef(({className:e,...t},n)=>a.jsx(ge.Separator,{ref:n,className:S("tw--mx-1 tw-my-1 tw-h-px tw-bg-muted",e),...t}));va.displayName=ge.Separator.displayName;function Ql({table:e}){return a.jsx("div",{className:"tw-flex tw-items-center tw-justify-between tw-px-2 tw-pb-3 tw-pt-3",children:a.jsxs("div",{className:"tw-flex tw-items-center tw-space-x-6 lg:tw-space-x-8",children:[a.jsxs("div",{className:"tw-flex-1 tw-text-sm tw-text-muted-foreground",children:[e.getFilteredSelectedRowModel().rows.length," of"," ",e.getFilteredRowModel().rows.length," row(s) selected"]}),a.jsxs("div",{className:"tw-flex tw-items-center tw-space-x-2",children:[a.jsx("p",{className:"tw-text-nowrap tw-text-sm tw-font-medium",children:"Rows per page"}),a.jsxs(Dt,{value:`${e.getState().pagination.pageSize}`,onValueChange:t=>{e.setPageSize(Number(t))},children:[a.jsx(bt,{className:"tw-h-8 tw-w-[70px]",children:a.jsx(At,{placeholder:e.getState().pagination.pageSize})}),a.jsx(vt,{side:"top",children:[10,20,30,40,50].map(t=>a.jsx(De,{value:`${t}`,children:t},t))})]})]}),a.jsxs("div",{className:"tw-flex tw-w-[100px] tw-items-center tw-justify-center tw-text-sm tw-font-medium",children:["Page ",e.getState().pagination.pageIndex+1," of ",e.getPageCount()]}),a.jsxs("div",{className:"tw-flex tw-items-center tw-space-x-2",children:[a.jsxs(fe,{variant:"outline",size:"icon",className:"tw-hidden tw-h-8 tw-w-8 tw-p-0 lg:tw-flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[a.jsx("span",{className:"tw-sr-only",children:"Go to first page"}),a.jsx(J.ArrowLeftIcon,{className:"tw-h-4 tw-w-4"})]}),a.jsxs(fe,{variant:"outline",size:"icon",className:"tw-h-8 tw-w-8 tw-p-0",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[a.jsx("span",{className:"tw-sr-only",children:"Go to previous page"}),a.jsx(J.ChevronLeftIcon,{className:"tw-h-4 tw-w-4"})]}),a.jsxs(fe,{variant:"outline",size:"icon",className:"tw-h-8 tw-w-8 tw-p-0",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[a.jsx("span",{className:"tw-sr-only",children:"Go to next page"}),a.jsx(J.ChevronRightIcon,{className:"tw-h-4 tw-w-4"})]}),a.jsxs(fe,{variant:"outline",size:"icon",className:"tw-hidden tw-h-8 tw-w-8 tw-p-0 lg:tw-flex",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[a.jsx("span",{className:"tw-sr-only",children:"Go to last page"}),a.jsx(J.ArrowRightIcon,{className:"tw-h-4 tw-w-4"})]})]})]})})}const Sn=y.forwardRef(({className:e,stickyHeader:t,...n},r)=>a.jsx("div",{className:S("pr-twp tw-relative tw-w-full",{"tw-overflow-auto":!t}),children:a.jsx("table",{ref:r,className:S("tw-w-full tw-caption-bottom tw-text-sm",e),...n})}));Sn.displayName="Table";const jn=y.forwardRef(({className:e,stickyHeader:t,...n},r)=>a.jsx("thead",{ref:r,className:S({"tw-sticky tw-top-[-1px] tw-bg-background tw-drop-shadow-sm":t},"[&_tr]:tw-border-b",e),...n}));jn.displayName="TableHeader";const Tn=y.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:S("[&_tr:last-child]:tw-border-0",e),...t}));Tn.displayName="TableBody";const ya=y.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:S("tw-border-t tw-bg-muted/50 tw-font-medium [&>tr]:last:tw-border-b-0",e),...t}));ya.displayName="TableFooter";const Ze=y.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:S("tw-border-b tw-transition-colors hover:tw-bg-muted/50 data-[state=selected]:tw-bg-muted",e),...t}));Ze.displayName="TableRow";const Bt=y.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:S("tw-h-12 tw-px-4 tw-text-start tw-align-middle tw-font-medium tw-text-muted-foreground [&:has([role=checkbox])]:tw-pe-0",e),...t}));Bt.displayName="TableHead";const yt=y.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:S("tw-p-4 tw-align-middle [&:has([role=checkbox])]:tw-pe-0",e),...t}));yt.displayName="TableCell";const xa=y.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:S("tw-mt-4 tw-text-sm tw-text-muted-foreground",e),...t}));xa.displayName="TableCaption";function Na({columns:e,data:t,enablePagination:n=!1,showPaginationControls:r=!1,showColumnVisibilityControls:o=!1,stickyHeader:s=!1,onRowClickHandler:i=()=>{}}){var m;const[l,c]=y.useState([]),[d,u]=y.useState([]),[h,w]=y.useState({}),[b,v]=y.useState({}),f=Ne.useReactTable({data:t,columns:e,getCoreRowModel:Ne.getCoreRowModel(),...n&&{getPaginationRowModel:Ne.getPaginationRowModel()},onSortingChange:c,getSortedRowModel:Ne.getSortedRowModel(),onColumnFiltersChange:u,getFilteredRowModel:Ne.getFilteredRowModel(),onColumnVisibilityChange:w,onRowSelectionChange:v,state:{sorting:l,columnFilters:d,columnVisibility:h,rowSelection:b}});return a.jsxs("div",{className:"pr-twp",children:[o&&a.jsx(Zl,{table:f}),a.jsxs(Sn,{stickyHeader:s,children:[a.jsx(jn,{stickyHeader:s,children:f.getHeaderGroups().map(N=>a.jsx(Ze,{children:N.headers.map(I=>a.jsx(Bt,{children:I.isPlaceholder?void 0:Ne.flexRender(I.column.columnDef.header,I.getContext())},I.id))},N.id))}),a.jsx(Tn,{children:(m=f.getRowModel().rows)!=null&&m.length?f.getRowModel().rows.map(N=>a.jsx(Ze,{onClick:()=>i(N,f),"data-state":N.getIsSelected()&&"selected",children:N.getVisibleCells().map(I=>a.jsx(yt,{children:Ne.flexRender(I.column.columnDef.cell,I.getContext())},I.id))},N.id)):a.jsx(Ze,{children:a.jsx(yt,{colSpan:e.length,className:"tw-h-24 tw-text-center",children:"No results."})})})]}),n&&a.jsxs("div",{className:"tw-flex tw-items-center tw-justify-end tw-space-x-2 tw-py-4",children:[a.jsx(fe,{variant:"outline",size:"sm",onClick:()=>f.previousPage(),disabled:!f.getCanPreviousPage(),children:"Previous"}),a.jsx(fe,{variant:"outline",size:"sm",onClick:()=>f.nextPage(),disabled:!f.getCanNextPage(),children:"Next"})]}),n&&r&&a.jsx(Ql,{table:f})]})}function ec({occurrenceData:e,setScriptureReference:t,localizedStrings:n}){const r=n["%webView_inventory_occurrences_table_header_reference%"],o=n["%webView_inventory_occurrences_table_header_occurrence%"],s=y.useMemo(()=>{const i=[];return e.forEach(l=>{i.some(c=>W.deepEqual(c,l))||i.push(l)}),i},[e]);return a.jsxs(Sn,{stickyHeader:!0,children:[a.jsx(jn,{stickyHeader:!0,children:a.jsxs(Ze,{children:[a.jsx(Bt,{children:r}),a.jsx(Bt,{children:o})]})}),a.jsx(Tn,{children:s.length>0&&s.map(i=>a.jsxs(Ze,{onClick:()=>{t(i.reference)},children:[a.jsx(yt,{children:`${se.bookNumberToEnglishName(i.reference.bookNum)} ${i.reference.chapterNum}:${i.reference.verseNum}`}),a.jsx(yt,{children:i.text})]},`${i.reference.bookNum} ${i.reference.chapterNum}:${i.reference.verseNum}-${i.text}`))})]})}const rr=y.forwardRef(({className:e,...t},n)=>a.jsx(Br.Root,{ref:n,className:S("tw-peer pr-twp tw-h-4 tw-w-4 tw-shrink-0 tw-rounded-sm tw-border tw-border-primary tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50 data-[state=checked]:tw-bg-primary data-[state=checked]:tw-text-primary-foreground",e),...t,children:a.jsx(Br.Indicator,{className:S("tw-flex tw-items-center tw-justify-center tw-text-current"),children:a.jsx(J.Check,{className:"tw-h-4 tw-w-4"})})}));rr.displayName=Br.Root.displayName;const ka=e=>e.split(/(?:\r?\n|\r)|(?=(?:\\(?:v|c|id)))/g),Fr=e=>{const t=/^\\[vc]\s+(\d+)/,n=e.match(t);if(n)return+n[1]},Ea=e=>{const t=e.match(/^\\id\s+([A-Za-z]+)/);return t?se.bookIdToNumber(t[1]):0},Sa=(e,t,n)=>n.includes(e)?"unapproved":t.includes(e)?"approved":"unknown",ja=Nn.cva("pr-twp tw-inline-flex tw-items-center tw-justify-center tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors hover:tw-bg-muted hover:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=on]:tw-bg-accent data-[state=on]:tw-text-accent-foreground",{variants:{variant:{default:"tw-bg-transparent",outline:"tw-border tw-border-input tw-bg-transparent hover:tw-bg-accent hover:tw-text-accent-foreground"},size:{default:"tw-h-10 tw-px-3",sm:"tw-h-9 tw-px-2.5",lg:"tw-h-11 tw-px-5"}},defaultVariants:{variant:"default",size:"default"}}),tc=y.forwardRef(({className:e,variant:t,size:n,...r},o)=>a.jsx(Zs.Root,{ref:o,className:S(ja({variant:t,size:n,className:e})),...r}));tc.displayName=Zs.Root.displayName;const Ta=y.createContext({size:"default",variant:"default"}),wo=y.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>a.jsx(er.Root,{ref:s,className:S("pr-twp tw-flex tw-items-center tw-justify-center tw-gap-1",e),...o,children:a.jsx(Ta.Provider,{value:{variant:t,size:n},children:r})}));wo.displayName=er.Root.displayName;const pn=y.forwardRef(({className:e,children:t,variant:n,size:r,...o},s)=>{const i=y.useContext(Ta);return a.jsx(er.Item,{ref:s,className:S(ja({variant:i.variant||n,size:i.size||r}),e),...o,children:t})});pn.displayName=er.Item.displayName;const or=e=>e==="asc"?a.jsx(J.ArrowUpIcon,{className:"tw-ms-2 tw-h-4 tw-w-4"}):e==="desc"?a.jsx(J.ArrowDownIcon,{className:"tw-ms-2 tw-h-4 tw-w-4"}):a.jsx(J.ArrowUpDownIcon,{className:"tw-ms-2 tw-h-4 tw-w-4"}),nc=e=>({accessorKey:"item",accessorFn:t=>t.items[0],header:({column:t})=>a.jsxs(fe,{variant:"ghost",onClick:()=>t.toggleSorting(void 0),children:[e,or(t.getIsSorted())]})}),rc=(e,t)=>({accessorKey:`item${t}`,accessorFn:n=>n.items[t],header:({column:n})=>a.jsxs(fe,{variant:"ghost",onClick:()=>n.toggleSorting(void 0),children:[e,or(n.getIsSorted())]})}),oc=e=>({accessorKey:"count",header:({column:t})=>a.jsx("div",{className:"tw-flex tw-justify-end tw-tabular-nums",children:a.jsxs(fe,{variant:"ghost",onClick:()=>t.toggleSorting(void 0),children:[e,or(t.getIsSorted())]})}),cell:({row:t})=>a.jsx("div",{className:"tw-flex tw-justify-end",children:t.getValue("count")})}),Er=(e,t,n,r,o,s)=>{let i=[...n];e.forEach(c=>{t==="approved"?i.includes(c)||i.push(c):i=i.filter(d=>d!==c)}),r(i);let l=[...o];e.forEach(c=>{t==="unapproved"?l.includes(c)||l.push(c):l=l.filter(d=>d!==c)}),s(l)},sc=(e,t,n,r,o)=>({accessorKey:"status",header:({column:s})=>a.jsx("div",{className:"tw-flex tw-justify-center",children:a.jsxs(fe,{variant:"ghost",onClick:()=>s.toggleSorting(void 0),children:[e,or(s.getIsSorted())]})}),cell:({row:s})=>{const i=s.getValue("status"),l=s.getValue("item");return a.jsxs(wo,{value:i,variant:"outline",type:"single",children:[a.jsx(pn,{onClick:()=>Er([l],"approved",t,n,r,o),value:"approved",children:a.jsx(J.CircleCheckIcon,{})}),a.jsx(pn,{onClick:()=>Er([l],"unapproved",t,n,r,o),value:"unapproved",children:a.jsx(J.CircleXIcon,{})}),a.jsx(pn,{onClick:()=>Er([l],"unknown",t,n,r,o),value:"unknown",children:a.jsx(J.CircleHelpIcon,{})})]})}}),ac=Object.freeze(["%webView_inventory_all%","%webView_inventory_approved%","%webView_inventory_unapproved%","%webView_inventory_unknown%","%webView_inventory_scope_currentBook%","%webView_inventory_scope_chapter%","%webView_inventory_scope_verse%","%webView_inventory_filter_text%","%webView_inventory_show_additional_items%","%webView_inventory_occurrences_table_header_reference%","%webView_inventory_occurrences_table_header_occurrence%"]),ic=(e,t,n)=>{let r=e;return t!=="all"&&(r=r.filter(o=>t==="approved"&&o.status==="approved"||t==="unapproved"&&o.status==="unapproved"||t==="unknown"&&o.status==="unknown")),n!==""&&(r=r.filter(o=>o.items[0].includes(n))),r},lc=(e,t,n,r,o)=>{if(!e)return[];const s=[];let i=t.bookNum,l=t.chapterNum,c=t.verseNum;return ka(e).forEach(u=>{u.startsWith("\\id")&&(i=Ea(u),l=0,c=0),u.startsWith("\\c")&&(l=Fr(u),c=0),u.startsWith("\\v")&&(c=Fr(u),l===0&&(l=t.chapterNum));let h=o.exec(u)??void 0;for(;h;){const w=[];h.forEach(m=>w.push(m));const b=h.index,v=s.find(m=>W.deepEqual(m.items,w)),f={reference:{bookNum:i!==void 0?i:-1,chapterNum:l!==void 0?l:-1,verseNum:c!==void 0?c:-1},text:W.substring(u,Math.max(0,b-25),Math.min(b+25,u.length))};if(v)v.count+=1,v.occurrences.push(f);else{const m={items:w,count:1,status:Sa(w[0],n,r),occurrences:[f]};s.push(m)}h=o.exec(u)??void 0}}),s},Je=(e,t)=>e[t]??t;function cc({scriptureReference:e,setScriptureReference:t,localizedStrings:n,extractItems:r,additionalItemsLabels:o,approvedItems:s,unapprovedItems:i,text:l,scope:c,onScopeChange:d,columns:u}){const h=Je(n,"%webView_inventory_all%"),w=Je(n,"%webView_inventory_approved%"),b=Je(n,"%webView_inventory_unapproved%"),v=Je(n,"%webView_inventory_unknown%"),f=Je(n,"%webView_inventory_scope_currentBook%"),m=Je(n,"%webView_inventory_scope_chapter%"),N=Je(n,"%webView_inventory_scope_verse%"),I=Je(n,"%webView_inventory_filter_text%"),C=Je(n,"%webView_inventory_show_additional_items%"),[E,g]=y.useState(!1),[P,V]=y.useState("all"),[U,j]=y.useState(""),[R,k]=y.useState([]),D=y.useMemo(()=>l?r instanceof RegExp?lc(l,e,s,i,r):r(l,e,s,i):[],[l,r,e,s,i]),$=y.useMemo(()=>{if(E)return D;const x=[];return D.forEach(T=>{const L=T.items[0],F=x.find(B=>B.items[0]===L);F?(F.count+=T.count,F.occurrences=F.occurrences.concat(T.occurrences)):x.push({items:[L],count:T.count,occurrences:T.occurrences,status:T.status})}),x},[E,D]),Z=y.useMemo(()=>ic($,P,U),[$,P,U]),Y=y.useMemo(()=>{var L,F;if(!E)return u;const x=(L=o==null?void 0:o.tableHeaders)==null?void 0:L.length;if(!x)return u;const T=[];for(let B=0;B{k([])},[Z]);const z=(x,T)=>{T.setRowSelection(()=>{const L={};return L[x.index]=!0,L}),k(x.original.items)},te=x=>{if(x==="book"||x==="chapter"||x==="verse")d(x);else throw new Error(`Invalid scope value: ${x}`)},ae=x=>{if(x==="all"||x==="approved"||x==="unapproved"||x==="unknown")V(x);else throw new Error(`Invalid status filter value: ${x}`)},oe=y.useMemo(()=>{if($.length===0||R.length===0)return[];const x=$.filter(T=>W.deepEqual(E?T.items:[T.items[0]],R));if(x.length>1)throw new Error("Selected item is not unique");return x[0].occurrences},[R,E,$]);return a.jsxs("div",{className:"pr-twp tw-flex tw-h-full tw-flex-col",children:[a.jsxs("div",{className:"tw-flex tw-items-stretch",children:[a.jsxs(Dt,{onValueChange:x=>ae(x),defaultValue:P,children:[a.jsx(bt,{className:"tw-m-1",children:a.jsx(At,{placeholder:"Select filter"})}),a.jsxs(vt,{children:[a.jsx(De,{value:"all",children:h}),a.jsx(De,{value:"approved",children:w}),a.jsx(De,{value:"unapproved",children:b}),a.jsx(De,{value:"unknown",children:v})]})]}),a.jsxs(Dt,{onValueChange:x=>te(x),defaultValue:c,children:[a.jsx(bt,{className:"tw-m-1",children:a.jsx(At,{placeholder:"Select scope"})}),a.jsxs(vt,{children:[a.jsx(De,{value:"book",children:f}),a.jsx(De,{value:"chapter",children:m}),a.jsx(De,{value:"verse",children:N})]})]}),a.jsx(qt,{className:"tw-m-1 tw-rounded-md tw-border",placeholder:I,value:U,onChange:x=>{j(x.target.value)}}),o&&a.jsxs("div",{className:"tw-m-1 tw-flex tw-items-center tw-rounded-md tw-border",children:[a.jsx(rr,{className:"tw-m-1",checked:E,onCheckedChange:x=>{k([]),g(x)}}),a.jsx(Ue,{className:"tw-m-1 tw-flex-shrink-0 tw-whitespace-nowrap",children:(o==null?void 0:o.checkboxText)??C})]})]}),a.jsx("div",{className:"tw-m-1 tw-flex-1 tw-overflow-auto tw-rounded-md tw-border",children:a.jsx(Na,{columns:Y,data:Z,onRowClickHandler:z,stickyHeader:!0})}),oe.length>0&&a.jsx("div",{className:"tw-m-1 tw-flex-1 tw-overflow-auto tw-rounded-md tw-border",children:a.jsx(ec,{occurrenceData:oe,setScriptureReference:t,localizedStrings:n})})]})}function dc({entries:e,getEntriesCount:t=void 0,selected:n,onChange:r,placeholder:o,commandEmptyMessage:s="No option found",customSelectedText:i,sortSelected:l=!1,icon:c=void 0}){const[d,u]=y.useState(!1),h=y.useCallback(v=>{r(n.includes(v)?n.filter(f=>f!==v):[...n,v])},[n,r]),w=()=>{var v;return n.length===1?((v=e.find(f=>f.value===n[0]))==null?void 0:v.label)??o:i||o},b=y.useMemo(()=>{if(!l)return e;const v=e.filter(m=>m.starred).sort((m,N)=>m.label.localeCompare(N.label)),f=e.filter(m=>!m.starred).sort((m,N)=>{const I=n.includes(m.value),C=n.includes(N.value);return I&&!C?-1:!I&&C?1:m.label.localeCompare(N.label)});return[...v,...f]},[e,n,l]);return a.jsxs(ua,{open:d,onOpenChange:u,children:[a.jsx(pa,{asChild:!0,children:a.jsxs(fe,{variant:"outline",role:"combobox","aria-expanded":d,className:S("tw-w-full tw-justify-between",n.length>0&&n.length{const f=t?t(v):void 0;return a.jsxs(co,{value:v.value,onSelect:h,className:"tw-flex tw-items-center tw-gap-2",children:[a.jsx("div",{className:"w-4",children:a.jsx(J.Check,{className:S("tw-h-4 tw-w-4",n.includes(v.value)?"tw-opacity-100":"tw-opacity-0")})}),a.jsx("div",{className:"tw-w-4",children:v.starred&&a.jsx(J.Star,{className:"tw-h-4 tw-w-4"})}),a.jsx("div",{className:"tw-flex-grow",children:v.label}),t&&a.jsx("div",{className:"tw-w-10 tw-text-right tw-text-muted-foreground",children:f})]},v.value)})})]})]})})]})}function Ca({onSearch:e,placeholder:t,isFullWidth:n,className:r}){const[o,s]=y.useState(""),i=l=>{s(l),e(l)};return a.jsxs("div",{className:"tw-relative",children:[a.jsx(J.Search,{className:"tw-absolute tw-left-3 tw-top-1/2 tw-h-4 tw-w-4 tw--translate-y-1/2 tw-transform tw-opacity-50"}),a.jsx(qt,{className:S("tw-flex tw-h-10 tw-w-full tw-text-ellipsis tw-rounded-md tw-border tw-border-input tw-bg-background tw-py-2 tw-pe-3 tw-ps-9 tw-text-sm tw-ring-offset-background file:tw-border-0 file:tw-bg-transparent file:tw-text-sm file:tw-font-medium placeholder:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-[color:hsl(240,5%,64.9%)] focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50",{"tw-w-full":n},{"tw-pe-9":o},r),placeholder:t,value:o,onChange:l=>i(l.target.value)}),o&&a.jsxs(fe,{variant:"ghost",size:"icon",className:"tw-absolute tw-right-0 tw-top-1/2 tw-h-7 tw--translate-y-1/2 tw-transform hover:tw-bg-transparent",children:[a.jsx(J.X,{className:"tw-h-4 tw-w-4",onClick:()=>{i("")}}),a.jsx("span",{className:"tw-sr-only",children:"Clear"})]})]})}const fo=y.forwardRef(({className:e,...t},n)=>a.jsx(Oe.Root,{orientation:"vertical",ref:n,className:S("tw-flex tw-gap-1 tw-rounded-md tw-text-muted-foreground",e),...t}));fo.displayName=Oe.List.displayName;const mo=y.forwardRef(({className:e,...t},n)=>a.jsx(Oe.List,{ref:n,className:S("tw-flex-fit tw-mlk-items-center tw-w-[124px] tw-justify-center tw-rounded-md tw-bg-muted tw-p-1 tw-text-muted-foreground",e),...t}));mo.displayName=Oe.List.displayName;const Oa=y.forwardRef(({className:e,...t},n)=>a.jsx(Oe.Trigger,{ref:n,...t,className:S("overflow-clip tw-inline-flex tw-w-[116px] tw-cursor-pointer tw-items-center tw-justify-center tw-break-words tw-rounded-sm tw-border-0 tw-bg-muted tw-px-3 tw-py-1.5 tw-text-sm tw-font-medium tw-text-inherit tw-ring-offset-background tw-transition-all hover:tw-text-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=active]:tw-bg-background data-[state=active]:tw-text-foreground data-[state=active]:tw-shadow-sm",e)})),ho=y.forwardRef(({className:e,...t},n)=>a.jsx(Oe.Content,{ref:n,className:S("tw-ms-5 tw-flex-grow tw-text-foreground tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2",e),...t}));ho.displayName=Oe.Content.displayName;function uc({tabList:e,onSearch:t,searchPlaceholder:n,headerTitle:r,isSearchBarFullWidth:o=!1,direction:s="ltr"}){return a.jsxs("div",{className:"pr-twp",children:[a.jsxs("div",{className:"tw-sticky tw-top-0 tw-space-y-2 tw-pb-2",children:[r?a.jsx("h1",{children:r}):"",a.jsx(Ca,{isFullWidth:o,onSearch:t,placeholder:n})]}),a.jsxs(fo,{dir:s,children:[a.jsx(mo,{children:e.map(i=>a.jsx(Oa,{value:i.value,children:i.value},i.key))}),e.map(i=>a.jsx(ho,{value:i.value,children:i.content},i.key))]})]})}const rt="scrBook",pc="scrRef",pt="source",wc="details",fc="Scripture Reference",mc="Scripture Book",Ra="Type",hc="Details";function gc(e,t){const n=t??!1;return[{accessorFn:r=>`${se.bookNumberToId(r.start.bookNum)} ${r.start.chapterNum}:${r.start.verseNum}`,id:rt,header:(e==null?void 0:e.scriptureReferenceColumnName)??fc,cell:r=>{const o=r.row.original;return r.row.getIsGrouped()?se.bookNumberToEnglishName(o.start.bookNum):r.row.groupingColumnId===rt?W.formatScrRef(o.start):void 0},getGroupingValue:r=>r.start.bookNum,sortingFn:(r,o)=>W.compareScrRefs(r.original.start,o.original.start),enableGrouping:!0},{accessorFn:r=>W.formatScrRef(r.start),id:pc,header:void 0,cell:r=>{const o=r.row.original;return r.row.getIsGrouped()?void 0:W.formatScrRef(o.start)},sortingFn:(r,o)=>W.compareScrRefs(r.original.start,o.original.start),enableGrouping:!1},{accessorFn:r=>r.source.displayName,id:pt,header:n?(e==null?void 0:e.typeColumnName)??Ra:void 0,cell:r=>n||r.row.getIsGrouped()?r.getValue():void 0,getGroupingValue:r=>r.source.id,sortingFn:(r,o)=>r.original.source.displayName.localeCompare(o.original.source.displayName),enableGrouping:!0},{accessorFn:r=>r.detail,id:wc,header:(e==null?void 0:e.detailsColumnName)??hc,cell:r=>r.getValue(),enableGrouping:!1}]}const bc=e=>{if(!("offset"in e.start))throw new Error("No offset available in range start");if(e.end&&!("offset"in e.end))throw new Error("No offset available in range end");const{offset:t}=e.start;let n=0;return e.end&&({offset:n}=e.end),!e.end||W.compareScrRefs(e.start,e.end)===0?`${W.scrRefToBBBCCCVVV(e.start)}+${t}`:`${W.scrRefToBBBCCCVVV(e.start)}+${t}-${W.scrRefToBBBCCCVVV(e.end)}+${n}`},os=e=>`${bc({start:e.start,end:e.end})} ${e.source.displayName} ${e.detail}`;function vc({sources:e,showColumnHeaders:t=!1,showSourceColumn:n=!1,scriptureReferenceColumnName:r,scriptureBookGroupName:o,typeColumnName:s,detailsColumnName:i,onRowSelected:l,direction:c="ltr"}){const[d,u]=y.useState([]),[h,w]=y.useState([{id:rt,desc:!1}]),[b,v]=y.useState({}),f=y.useMemo(()=>e.flatMap(j=>j.data.map(R=>({...R,source:j.source}))),[e]),m=y.useMemo(()=>gc({scriptureReferenceColumnName:r,typeColumnName:s,detailsColumnName:i},n),[r,s,i,n]);y.useEffect(()=>{d.includes(pt)?w([{id:pt,desc:!1},{id:rt,desc:!1}]):w([{id:rt,desc:!1}])},[d]);const N=Ne.useReactTable({data:f,columns:m,state:{grouping:d,sorting:h,rowSelection:b},onGroupingChange:u,onSortingChange:w,onRowSelectionChange:v,getExpandedRowModel:Ne.getExpandedRowModel(),getGroupedRowModel:Ne.getGroupedRowModel(),getCoreRowModel:Ne.getCoreRowModel(),getSortedRowModel:Ne.getSortedRowModel(),getRowId:os,autoResetExpanded:!1,enableMultiRowSelection:!1,enableSubRowSelection:!1});y.useEffect(()=>{if(l){const j=N.getSelectedRowModel().rowsById,R=Object.keys(j);if(R.length===1){const k=f.find(D=>os(D)===R[0])||void 0;k&&l(k)}}},[b,f,l,N]);const I=o??mc,C=s??Ra,E=[{label:"No Grouping",value:[]},{label:`Group by ${I}`,value:[rt]},{label:`Group by ${C}`,value:[pt]},{label:`Group by ${I} and ${C}`,value:[rt,pt]},{label:`Group by ${C} and ${I}`,value:[pt,rt]}],g=j=>{u(JSON.parse(j))},P=(j,R)=>{!j.getIsGrouped()&&!j.getIsSelected()&&j.getToggleSelectedHandler()(R)},V=(j,R)=>j.getIsGrouped()?"":S("banded-row",R%2===0?"even":"odd"),U=(j,R,k)=>{if(!((j==null?void 0:j.length)===0||R.depth{g(j)},children:[a.jsx(bt,{className:"tw-mb-1 tw-mt-2",children:a.jsx(At,{})}),a.jsx(vt,{position:"item-aligned",children:a.jsx(ga,{children:E.map(j=>a.jsx(De,{value:JSON.stringify(j.value),children:j.label},j.label))})})]}),a.jsxs(Sn,{className:"tw-relative tw-flex tw-flex-col tw-overflow-y-auto tw-p-0",children:[t&&a.jsx(jn,{children:N.getHeaderGroups().map(j=>a.jsx(Ze,{children:j.headers.filter(R=>R.column.columnDef.header).map(R=>a.jsx(Bt,{colSpan:R.colSpan,className:"top-0 tw-sticky",children:R.isPlaceholder?void 0:a.jsxs("div",{children:[R.column.getCanGroup()?a.jsx(fe,{variant:"ghost",title:`Toggle grouping by ${R.column.columnDef.header}`,onClick:R.column.getToggleGroupingHandler(),type:"button",children:R.column.getIsGrouped()?"🛑":"👊 "}):void 0," ",Ne.flexRender(R.column.columnDef.header,R.getContext())]})},R.id))},j.id))}),a.jsx(Tn,{children:N.getRowModel().rows.map((j,R)=>a.jsx(Ze,{"data-state":j.getIsSelected()?"selected":"",className:S(V(j,R)),onClick:k=>P(j,k),children:j.getVisibleCells().map(k=>{if(!(k.getIsPlaceholder()||k.column.columnDef.enableGrouping&&!k.getIsGrouped()&&(k.column.columnDef.id!==pt||!n)))return a.jsx(yt,{className:S(k.column.columnDef.id,"tw-p-[1px]",U(d,j,k)),children:(()=>k.getIsGrouped()?a.jsxs(fe,{variant:"link",onClick:j.getToggleExpandedHandler(),type:"button",children:[j.getIsExpanded()&&a.jsx(J.ChevronDown,{}),!j.getIsExpanded()&&(c==="ltr"?a.jsx(J.ChevronRight,{}):a.jsx(J.ChevronLeft,{}))," ",Ne.flexRender(k.column.columnDef.cell,k.getContext())," (",j.subRows.length,")"]}):Ne.flexRender(k.column.columnDef.cell,k.getContext()))()},k.id)})},j.id))})]})]})}const Sr={[W.getLocalizeKeyForScrollGroupId("undefined")]:"Ø",[W.getLocalizeKeyForScrollGroupId(0)]:"A",[W.getLocalizeKeyForScrollGroupId(1)]:"B",[W.getLocalizeKeyForScrollGroupId(2)]:"C",[W.getLocalizeKeyForScrollGroupId(3)]:"D",[W.getLocalizeKeyForScrollGroupId(4)]:"E",[W.getLocalizeKeyForScrollGroupId(5)]:"F",[W.getLocalizeKeyForScrollGroupId(6)]:"G",[W.getLocalizeKeyForScrollGroupId(7)]:"H",[W.getLocalizeKeyForScrollGroupId(8)]:"I",[W.getLocalizeKeyForScrollGroupId(9)]:"J",[W.getLocalizeKeyForScrollGroupId(10)]:"K",[W.getLocalizeKeyForScrollGroupId(11)]:"L",[W.getLocalizeKeyForScrollGroupId(12)]:"M",[W.getLocalizeKeyForScrollGroupId(13)]:"N",[W.getLocalizeKeyForScrollGroupId(14)]:"O",[W.getLocalizeKeyForScrollGroupId(15)]:"P",[W.getLocalizeKeyForScrollGroupId(16)]:"Q",[W.getLocalizeKeyForScrollGroupId(17)]:"R",[W.getLocalizeKeyForScrollGroupId(18)]:"S",[W.getLocalizeKeyForScrollGroupId(19)]:"T",[W.getLocalizeKeyForScrollGroupId(20)]:"U",[W.getLocalizeKeyForScrollGroupId(21)]:"V",[W.getLocalizeKeyForScrollGroupId(22)]:"W",[W.getLocalizeKeyForScrollGroupId(23)]:"X",[W.getLocalizeKeyForScrollGroupId(24)]:"Y",[W.getLocalizeKeyForScrollGroupId(25)]:"Z"};function yc({availableScrollGroupIds:e,scrollGroupId:t,onChangeScrollGroupId:n,localizedStrings:r={}}){const o={...Sr,...Object.fromEntries(Object.entries(r).map(([s,i])=>[s,s===i&&s in Sr?Sr[s]:i]))};return a.jsxs(Dt,{value:`${t}`,onValueChange:s=>n(s==="undefined"?void 0:parseInt(s,10)),children:[a.jsx(bt,{className:"pr-twp tw-w-auto",children:a.jsx(At,{placeholder:o[W.getLocalizeKeyForScrollGroupId(t)]??t})}),a.jsx(vt,{style:{zIndex:250},children:e.map(s=>a.jsx(De,{value:`${s}`,children:o[W.getLocalizeKeyForScrollGroupId(s)]},`${s}`))})]})}const go=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>a.jsx(Qs.Root,{ref:o,decorative:n,orientation:t,className:S("pr-twp tw-shrink-0 tw-bg-border",t==="horizontal"?"tw-h-[1px] tw-w-full":"tw-h-full tw-w-[1px]",e),...r}));go.displayName=Qs.Root.displayName;function xc({children:e}){return a.jsx("div",{className:"pr-twp tw-grid",children:e})}function Nc({primary:e,secondary:t,children:n,isLoading:r=!1,loadingMessage:o}){return a.jsxs("div",{className:"tw-flex tw-items-center tw-justify-between tw-space-x-4 tw-py-2",children:[a.jsxs("div",{children:[a.jsx("p",{className:"tw-text-sm tw-font-medium tw-leading-none",children:e}),a.jsx("p",{className:"tw-whitespace-normal tw-break-words tw-text-sm tw-text-muted-foreground",children:t})]}),r?a.jsx("p",{className:"tw-text-sm tw-text-muted-foreground",children:o}):a.jsx("div",{children:n})]})}function kc({primary:e,secondary:t,includeSeparator:n=!1}){return a.jsxs("div",{className:"tw-space-y-4 tw-py-2",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"tw-text-lg tw-font-medium",children:e}),a.jsx("p",{className:"tw-text-sm tw-text-muted-foreground",children:t})]}),n?a.jsx(go,{}):""]})}function Ec({id:e,className:t,listItems:n,selectedListItems:r,handleSelectListItem:o,createLabel:s}){return a.jsx("div",{id:e,className:t,children:n.map(i=>a.jsxs("div",{className:"tw-m-2 tw-flex tw-items-center",children:[a.jsx(rr,{className:"tw-mr-2 tw-align-middle",checked:r.includes(i),onCheckedChange:l=>o(i,l)}),a.jsx(Ue,{children:s?s(i):i})]},i))})}function Sc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jc(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var bo={},Pa={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Pa);var Tc=Pa.exports,jr={};function vo(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[n]=_a(e[n])}),t}function Qe(e,t,n={clone:!0}){const r=n.clone?O({},e):e;return mt(e)&&mt(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(mt(t[o])&&o in e&&mt(e[o])?r[o]=Qe(e[o],t[o],n):n.clone?r[o]=mt(t[o])?_a(t[o]):t[o]:r[o]=t[o])}),r}var zr={exports:{}},Bn={exports:{}},ie={};/** @license React v16.13.1 +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),g=require("react"),H=require("lucide-react"),at=require("clsx"),el=require("tailwind-merge"),ta=require("@radix-ui/react-dropdown-menu"),Q=require("platform-bible-utils"),tl=require("@radix-ui/react-slot"),Rn=require("class-variance-authority"),nl=require("@radix-ui/react-label"),rl=require("@radix-ui/react-radio-group"),ol=require("@radix-ui/react-popover"),Re=require("cmdk"),sl=require("@radix-ui/react-dialog"),Ne=require("@tanstack/react-table"),al=require("@radix-ui/react-select"),il=require("@radix-ui/react-checkbox"),ll=require("@radix-ui/react-toggle-group"),cl=require("@radix-ui/react-toggle"),dl=require("@radix-ui/react-tabs"),ul=require("@radix-ui/react-separator"),Lr=require("@mui/styled-engine"),De=require("@mui/material"),pn=require("react-dom"),na=require("sonner"),pl=require("@radix-ui/react-slider"),wl=require("@radix-ui/react-switch"),fl=require("markdown-to-jsx");function ke(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=ke(g),fe=ke(ta),ra=ke(nl),Nn=ke(rl),kn=ke(ol),Ke=ke(sl),be=ke(al),Fr=ke(il),sr=ke(ll),oa=ke(cl),_e=ke(dl),sa=ke(ul),ml=ke(pn),wn=ke(pl),zr=ke(wl);const hl=el.extendTailwindMerge({prefix:"tw-"});function S(...e){return hl(at.clsx(e))}const Tt=g.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:S("pr-twp tw-flex tw-h-10 tw-rounded-md tw-border tw-border-input tw-bg-background tw-px-3 tw-py-2 tw-text-sm tw-ring-offset-background file:tw-border-0 file:tw-bg-transparent file:tw-text-sm file:tw-font-medium file:tw-text-foreground placeholder:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50",e),ref:r,...n}));Tt.displayName="Input";const gl=g.forwardRef(({handleSearch:e,handleKeyDown:t,handleOnClick:n,handleSubmit:r,...o},a)=>s.jsxs("div",{className:"tw-relative",children:[s.jsx(Tt,{...o,type:"text",className:"tw-box-border tw-gap-2.5 tw-rounded-lg tw-border tw-border-solid tw-bg-background tw-py-2 tw-pl-4 tw-pr-3 tw-font-medium tw-shadow-none tw-outline-none",onChange:i=>e(i.target.value),onKeyDown:i=>{i.key==="Enter"&&r(),t(i)},onClick:n,ref:a}),s.jsx(H.History,{className:"tw-absolute tw-right-3 tw-top-1/2 tw-h-4 tw-w-4 tw--translate-y-1/2 tw-transform tw-cursor-pointer tw-text-muted-foreground",onClick:()=>{console.log("back in history")}})]}));var bl=Object.defineProperty,vl=(e,t,n)=>t in e?bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,re=(e,t,n)=>vl(e,typeof t!="symbol"?t+"":t,n);const xt=["GEN","EXO","LEV","NUM","DEU","JOS","JDG","RUT","1SA","2SA","1KI","2KI","1CH","2CH","EZR","NEH","EST","JOB","PSA","PRO","ECC","SNG","ISA","JER","LAM","EZK","DAN","HOS","JOL","AMO","OBA","JON","MIC","NAM","HAB","ZEP","HAG","ZEC","MAL","MAT","MRK","LUK","JHN","ACT","ROM","1CO","2CO","GAL","EPH","PHP","COL","1TH","2TH","1TI","2TI","TIT","PHM","HEB","JAS","1PE","2PE","1JN","2JN","3JN","JUD","REV","TOB","JDT","ESG","WIS","SIR","BAR","LJE","S3Y","SUS","BEL","1MA","2MA","3MA","4MA","1ES","2ES","MAN","PS2","ODA","PSS","JSA","JDB","TBS","SST","DNT","BLT","XXA","XXB","XXC","XXD","XXE","XXF","XXG","FRT","BAK","OTH","3ES","EZA","5EZ","6EZ","INT","CNC","GLO","TDX","NDX","DAG","PS3","2BA","LBA","JUB","ENO","1MQ","2MQ","3MQ","REP","4BA","LAO"],Qr=["XXA","XXB","XXC","XXD","XXE","XXF","XXG","FRT","BAK","OTH","INT","CNC","GLO","TDX","NDX"],aa=["Genesis","Exodus","Leviticus","Numbers","Deuteronomy","Joshua","Judges","Ruth","1 Samuel","2 Samuel","1 Kings","2 Kings","1 Chronicles","2 Chronicles","Ezra","Nehemiah","Esther (Hebrew)","Job","Psalms","Proverbs","Ecclesiastes","Song of Songs","Isaiah","Jeremiah","Lamentations","Ezekiel","Daniel (Hebrew)","Hosea","Joel","Amos","Obadiah","Jonah","Micah","Nahum","Habakkuk","Zephaniah","Haggai","Zechariah","Malachi","Matthew","Mark","Luke","John","Acts","Romans","1 Corinthians","2 Corinthians","Galatians","Ephesians","Philippians","Colossians","1 Thessalonians","2 Thessalonians","1 Timothy","2 Timothy","Titus","Philemon","Hebrews","James","1 Peter","2 Peter","1 John","2 John","3 John","Jude","Revelation","Tobit","Judith","Esther Greek","Wisdom of Solomon","Sirach (Ecclesiasticus)","Baruch","Letter of Jeremiah","Song of 3 Young Men","Susanna","Bel and the Dragon","1 Maccabees","2 Maccabees","3 Maccabees","4 Maccabees","1 Esdras (Greek)","2 Esdras (Latin)","Prayer of Manasseh","Psalm 151","Odes","Psalms of Solomon","Joshua A. *obsolete*","Judges B. *obsolete*","Tobit S. *obsolete*","Susanna Th. *obsolete*","Daniel Th. *obsolete*","Bel Th. *obsolete*","Extra A","Extra B","Extra C","Extra D","Extra E","Extra F","Extra G","Front Matter","Back Matter","Other Matter","3 Ezra *obsolete*","Apocalypse of Ezra","5 Ezra (Latin Prologue)","6 Ezra (Latin Epilogue)","Introduction","Concordance ","Glossary ","Topical Index","Names Index","Daniel Greek","Psalms 152-155","2 Baruch (Apocalypse)","Letter of Baruch","Jubilees","Enoch","1 Meqabyan","2 Meqabyan","3 Meqabyan","Reproof (Proverbs 25-31)","4 Baruch (Rest of Baruch)","Laodiceans"],as=Ol();function Wt(e,t=!0){return t&&(e=e.toUpperCase()),e in as?as[e]:0}function eo(e){return Wt(e)>0}function xl(e){const t=typeof e=="string"?Wt(e):e;return t>=40&&t<=66}function yl(e){return(typeof e=="string"?Wt(e):e)<=39}function ia(e){return e<=66}function Nl(e){const t=typeof e=="string"?Wt(e):e;return da(t)&&!ia(t)}function*kl(){for(let e=1;e<=xt.length;e++)yield e}const El=1,la=xt.length;function jl(){return["XXA","XXB","XXC","XXD","XXE","XXF","XXG"]}function to(e,t="***"){const n=e-1;return n<0||n>=xt.length?t:xt[n]}function ca(e){return e<=0||e>la?"******":aa[e-1]}function Sl(e){return ca(Wt(e))}function da(e){const t=typeof e=="number"?to(e):e;return eo(t)&&!Qr.includes(t)}function Tl(e){const t=typeof e=="number"?to(e):e;return eo(t)&&Qr.includes(t)}function Cl(e){return aa[e-1].includes("*obsolete*")}function Ol(){const e={};for(let t=0;t(e[e.Unknown=0]="Unknown",e[e.Original=1]="Original",e[e.Septuagint=2]="Septuagint",e[e.Vulgate=3]="Vulgate",e[e.English=4]="English",e[e.RussianProtestant=5]="RussianProtestant",e[e.RussianOrthodox=6]="RussianOrthodox",e))(Ye||{});const Ie=class{constructor(t){if(re(this,"name"),re(this,"fullPath"),re(this,"isPresent"),re(this,"hasVerseSegments"),re(this,"isCustomized"),re(this,"baseVersification"),re(this,"scriptureBooks"),re(this,"_type"),t==null)throw new Error("Argument undefined");typeof t=="string"?(this.name=t,this._type=Ye[t]):(this._type=t,this.name=Ye[t])}get type(){return this._type}equals(t){return!t.type||!this.type?!1:t.type===this.type}};re(Ie,"Original",new Ie(Ye.Original)),re(Ie,"Septuagint",new Ie(Ye.Septuagint)),re(Ie,"Vulgate",new Ie(Ye.Vulgate)),re(Ie,"English",new Ie(Ye.English)),re(Ie,"RussianProtestant",new Ie(Ye.RussianProtestant)),re(Ie,"RussianOrthodox",new Ie(Ye.RussianOrthodox));let ft=Ie;function is(e,t){const n=t[0];for(let r=1;r(e[e.Valid=0]="Valid",e[e.UnknownVersification=1]="UnknownVersification",e[e.OutOfRange=2]="OutOfRange",e[e.VerseOutOfOrder=3]="VerseOutOfOrder",e[e.VerseRepeated=4]="VerseRepeated",e))(ua||{});const je=class ae{constructor(t,n,r,o){if(re(this,"firstChapter"),re(this,"lastChapter"),re(this,"lastVerse"),re(this,"hasSegmentsDefined"),re(this,"text"),re(this,"BBBCCCVVVS"),re(this,"longHashCode"),re(this,"versification"),re(this,"rtlMark","‏"),re(this,"_bookNum",0),re(this,"_chapterNum",0),re(this,"_verseNum",0),re(this,"_verse"),r==null&&o==null)if(t!=null&&typeof t=="string"){const a=t,i=n!=null&&n instanceof ft?n:void 0;this.setEmpty(i),this.parse(a)}else if(t!=null&&typeof t=="number"){const a=n!=null&&n instanceof ft?n:void 0;this.setEmpty(a),this._verseNum=t%ae.chapterDigitShifter,this._chapterNum=Math.floor(t%ae.bookDigitShifter/ae.chapterDigitShifter),this._bookNum=Math.floor(t/ae.bookDigitShifter)}else if(n==null)if(t!=null&&t instanceof ae){const a=t;this._bookNum=a.bookNum,this._chapterNum=a.chapterNum,this._verseNum=a.verseNum,this._verse=a.verse,this.versification=a.versification}else{if(t==null)return;const a=t instanceof ft?t:ae.defaultVersification;this.setEmpty(a)}else throw new Error("VerseRef constructor not supported.");else if(t!=null&&n!=null&&r!=null)if(typeof t=="string"&&typeof n=="string"&&typeof r=="string")this.setEmpty(o),this.updateInternal(t,n,r);else if(typeof t=="number"&&typeof n=="number"&&typeof r=="number")this._bookNum=t,this._chapterNum=n,this._verseNum=r,this.versification=o??ae.defaultVersification;else throw new Error("VerseRef constructor not supported.");else throw new Error("VerseRef constructor not supported.")}static isVerseParseable(t){return t.length>0&&"0123456789".includes(t[0])&&!t.endsWith(this.verseRangeSeparator)&&!t.endsWith(this.verseSequenceIndicator)}static tryParse(t){let n;try{return n=new ae(t),{success:!0,verseRef:n}}catch(r){if(r instanceof an)return n=new ae,{success:!1,verseRef:n};throw r}}static getBBBCCCVVV(t,n,r){return t%ae.bcvMaxValue*ae.bookDigitShifter+(n>=0?n%ae.bcvMaxValue*ae.chapterDigitShifter:0)+(r>=0?r%ae.bcvMaxValue:0)}static fromJSON(t){const{book:n,chapterNum:r,verseNum:o,verse:a,versificationStr:i}=t,l=a||o.toString();let c;return i&&(c=new ft(i)),n?new ae(n,r.toString(),l,c):new ae}static tryGetVerseNum(t){let n;if(!t)return n=-1,{success:!0,vNum:n};n=0;let r;for(let o=0;o"9")return o===0&&(n=-1),{success:!1,vNum:n};if(n=n*10+ +r-0,n>ae.bcvMaxValue)return n=-1,{success:!1,vNum:n}}return{success:!0,vNum:n}}get isDefault(){return this.bookNum===0&&this.chapterNum===0&&this.verseNum===0&&this.versification==null}get hasMultiple(){return this._verse!=null&&(this._verse.includes(ae.verseRangeSeparator)||this._verse.includes(ae.verseSequenceIndicator))}get book(){return ie.bookNumberToId(this.bookNum,"")}set book(t){this.bookNum=ie.bookIdToNumber(t)}get chapter(){return this.isDefault||this._chapterNum<0?"":this._chapterNum.toString()}set chapter(t){const n=+t;this._chapterNum=Number.isInteger(n)?n:-1}get verse(){return this._verse!=null?this._verse:this.isDefault||this._verseNum<0?"":this._verseNum.toString()}set verse(t){const{success:n,vNum:r}=ae.tryGetVerseNum(t);this._verse=n?void 0:t.replace(this.rtlMark,""),this._verseNum=r,!(this._verseNum>=0)&&({vNum:this._verseNum}=ae.tryGetVerseNum(this._verse))}get bookNum(){return this._bookNum}set bookNum(t){if(t<=0||t>ie.lastBook)throw new an("BookNum must be greater than zero and less than or equal to last book");this._bookNum=t}get chapterNum(){return this._chapterNum}set chapterNum(t){this.chapterNum=t}get verseNum(){return this._verseNum}set verseNum(t){this._verseNum=t}get versificationStr(){var t;return(t=this.versification)==null?void 0:t.name}set versificationStr(t){this.versification=this.versification!=null?new ft(t):void 0}get valid(){return this.validStatus===0}get validStatus(){return this.validateVerse(ae.verseRangeSeparators,ae.verseSequenceIndicators)}get BBBCCC(){return ae.getBBBCCCVVV(this._bookNum,this._chapterNum,0)}get BBBCCCVVV(){return ae.getBBBCCCVVV(this._bookNum,this._chapterNum,this._verseNum)}get isExcluded(){return!1}parse(t){if(t=t.replace(this.rtlMark,""),t.includes("/")){const a=t.split("/");if(t=a[0],a.length>1)try{const i=+a[1].trim();this.versification=new ft(Ye[i])}catch{throw new an("Invalid reference : "+t)}}const n=t.trim().split(" ");if(n.length!==2)throw new an("Invalid reference : "+t);const r=n[1].split(":"),o=+r[0];if(r.length!==2||ie.bookIdToNumber(n[0])===0||!Number.isInteger(o)||o<0||!ae.isVerseParseable(r[1]))throw new an("Invalid reference : "+t);this.updateInternal(n[0],r[0],r[1])}simplify(){this._verse=void 0}clone(){return new ae(this)}toString(){const t=this.book;return t===""?"":`${t} ${this.chapter}:${this.verse}`}toJSON(){let t=this.verse;(t===""||t===this.verseNum.toString())&&(t=void 0);const n={book:this.book,chapterNum:this.chapterNum,verseNum:this.verseNum,verse:t,versificationStr:this.versificationStr};return t||delete n.verse,n}equals(t){return t instanceof ae?t._bookNum===this._bookNum&&t._chapterNum===this._chapterNum&&t._verseNum===this._verseNum&&t.verse===this.verse&&(t.versification==null&&this.versification==null||t.versification!=null&&this.versification!=null&&t.versification.equals(this.versification)):!1}allVerses(t=!1,n=ae.verseRangeSeparators,r=ae.verseSequenceIndicators){if(this._verse==null||this.chapterNum<=0)return[this.clone()];const o=[],a=is(this._verse,r);for(const i of a.map(l=>is(l,n))){const l=this.clone();l.verse=i[0];const c=l.verseNum;if(o.push(l),i.length>1){const d=this.clone();if(d.verse=i[1],!t)for(let u=c+1;ui)return 3;if(r===i)return 4;r=i}return 0}get internalValid(){return this.versification==null?1:this._bookNum<=0||this._bookNum>ie.lastBook?2:(ie.isCanonical(this._bookNum),0)}setEmpty(t=ae.defaultVersification){this._bookNum=0,this._chapterNum=-1,this._verse=void 0,this.versification=t}updateInternal(t,n,r){this.bookNum=ie.bookIdToNumber(t),this.chapter=n,this.verse=r}};re(je,"defaultVersification",ft.English),re(je,"verseRangeSeparator","-"),re(je,"verseSequenceIndicator",","),re(je,"verseRangeSeparators",[je.verseRangeSeparator]),re(je,"verseSequenceIndicators",[je.verseSequenceIndicator]),re(je,"chapterDigitShifter",1e3),re(je,"bookDigitShifter",je.chapterDigitShifter*je.chapterDigitShifter),re(je,"bcvMaxValue",je.chapterDigitShifter-1),re(je,"ValidStatusType",ua);class an extends Error{}const Lt=fe.Root,En=fe.Trigger,pa=fe.Group,Rl=fe.Portal,_l=fe.Sub,Pl=fe.RadioGroup,wa=g.forwardRef(({className:e,inset:t,children:n,...r},o)=>s.jsxs(fe.SubTrigger,{ref:o,className:S("tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none focus:tw-bg-accent data-[state=open]:tw-bg-accent",t&&"tw-pl-8",e),...r,children:[n,s.jsx(H.ChevronRight,{className:"tw-ml-auto tw-h-4 tw-w-4"})]}));wa.displayName=fe.SubTrigger.displayName;const fa=g.forwardRef(({className:e,...t},n)=>s.jsx(fe.SubContent,{ref:n,className:S("tw-z-50 tw-min-w-[8rem] tw-overflow-hidden tw-rounded-md tw-border tw-bg-popover tw-p-1 tw-text-popover-foreground tw-shadow-lg data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2",e),...t}));fa.displayName=fe.SubContent.displayName;const yt=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(fe.Portal,{children:s.jsx(fe.Content,{ref:r,sideOffset:t,className:S("pr-twp tw-z-50 tw-min-w-[8rem] tw-overflow-hidden tw-rounded-md tw-border tw-bg-popover tw-p-1 tw-text-popover-foreground tw-shadow-md data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2",e),...n})}));yt.displayName=fe.Content.displayName;const jn=g.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(fe.Item,{ref:r,className:S("tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none tw-transition-colors focus:tw-bg-accent data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50",t&&"tw-pl-8",e),...n}));jn.displayName=fe.Item.displayName;const _n=g.forwardRef(({className:e,children:t,checked:n,...r},o)=>s.jsxs(fe.CheckboxItem,{ref:o,className:S("tw-relative tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-outline-none tw-transition-colors focus:tw-bg-accent focus:tw-text-accent-foreground data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50",e),checked:n,...r,children:[s.jsx("span",{className:"tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center",children:s.jsx(fe.ItemIndicator,{children:s.jsx(H.Check,{className:"tw-h-4 tw-w-4"})})}),t]}));_n.displayName=fe.CheckboxItem.displayName;const no=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(fe.RadioItem,{ref:r,className:S("tw-relative tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-outline-none tw-transition-colors focus:tw-bg-accent focus:tw-text-accent-foreground data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50",e),...n,children:[s.jsx("span",{className:"tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center",children:s.jsx(fe.ItemIndicator,{children:s.jsx(H.Circle,{className:"tw-h-2 tw-w-2 tw-fill-current"})})}),t]}));no.displayName=fe.RadioItem.displayName;const Kt=g.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(fe.Label,{ref:r,className:S("tw-px-2 tw-py-1.5 tw-text-sm tw-font-semibold",t&&"tw-pl-8",e),...n}));Kt.displayName=fe.Label.displayName;const Jt=g.forwardRef(({className:e,...t},n)=>s.jsx(fe.Separator,{ref:n,className:S("tw--mx-1 tw-my-1 tw-h-px tw-bg-muted",e),...t}));Jt.displayName=fe.Separator.displayName;function ma({className:e,...t}){return s.jsx("span",{className:S("tw-ml-auto tw-text-xs tw-tracking-widest tw-opacity-60",e),...t})}ma.displayName="DropdownMenuShortcut";const Il=g.forwardRef(({bookId:e,handleSelectBook:t,isSelected:n,handleHighlightBook:r,handleKeyDown:o,bookType:a,children:i},l)=>s.jsxs(jn,{ref:l,textValue:e,className:S("tw-mx-1 tw-px-1 tw-font-normal tw-text-foreground/80",{"tw-bg-amber-50 tw-text-yellow-900 data-[highlighted]:tw-bg-amber-100":n}),onSelect:c=>{c.preventDefault(),t()},onKeyDown:c=>{o(c)},onFocus:r,onMouseMove:r,children:[s.jsx("span",{className:S("tw-border-b-0 tw-border-l-2 tw-border-r-0 tw-border-t-0 tw-border-solid tw-px-2",{"tw-font-bold":n,"tw-border-l-red-200":a.toLowerCase()==="ot","tw-border-l-purple-200":a.toLowerCase()==="nt","tw-border-l-indigo-200":a.toLowerCase()==="dc"}),children:ie.bookIdToEnglishName(e)}),n&&s.jsx("div",{children:i})]},e));function $l({handleSelectChapter:e,endChapter:t,activeChapter:n,highlightedChapter:r,handleHighlightedChapter:o}){const a=Array.from({length:t},(l,c)=>c+1),i=g.useCallback(l=>{o(l)},[o]);return s.jsx("div",{className:S("tw-flex tw-flex-wrap tw-items-start tw-justify-start tw-self-stretch"),children:a.map(l=>s.jsx("div",{className:S("tw-box-content tw-flex tw-h-4 tw-w-4 tw-cursor-pointer tw-items-center tw-justify-end tw-rounded-md tw-p-2 tw-text-amber-800",{"tw-font-semibold tw-text-amber-900":l===n,"tw-bg-amber-200":l===r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),e(l)},role:"button",onKeyDown:c=>{c.key==="Enter"&&e(l)},tabIndex:0,onMouseMove:()=>i(l),children:l},l))})}function Ml({handleSort:e,handleLocationHistory:t,handleBookmarks:n}){return s.jsxs(Kt,{className:"tw-flex tw-justify-between",children:[s.jsx("p",{className:"tw-inline-block tw-align-middle",children:"Go To"}),s.jsxs("div",{className:"tw-flex tw-items-center",children:[s.jsx(H.ArrowDownWideNarrow,{onClick:e,className:"tw-m-2 tw-h-4 tw-w-4 tw-cursor-pointer tw-gap-2"}),s.jsx(H.Clock,{onClick:t,className:"tw-m-2 tw-h-4 tw-w-4 tw-cursor-pointer tw-gap-2"}),s.jsx(H.Bookmark,{onClick:n,className:"tw-m-2 tw-h-4 tw-w-4 tw-cursor-pointer tw-gap-2"})]})]})}const gn=ie.allBookIds,Dl={OT:"Old Testament",NT:"New Testament",DC:"Deuterocanon"},ls=["OT","NT","DC"],Al=32+32+32,Bl=[/^(\w+)$/i,/^(\w+)(?:\s(\d+))$/i,/^(\w+)(?:\s(\d+):(\d+))$/i],Vl=e=>({OT:gn.filter(n=>ie.isBookOT(n)),NT:gn.filter(n=>ie.isBookNT(n)),DC:gn.filter(n=>ie.isBookDC(n))})[e],ln=e=>Q.getChaptersForBook(ie.bookIdToNumber(e));function Ll(){return gn.map(t=>ie.bookIdToEnglishName(t))}function Fl(e){return Ll().includes(e)}function zl(e){const t=e.toLowerCase().replace(/^\w/,n=>n.toUpperCase());if(Fl(t))return gn.find(r=>ie.bookIdToEnglishName(r)===t)}function Gl({scrRef:e,handleSubmit:t}){const[n,r]=g.useState(""),[o,a]=g.useState(ie.bookNumberToId(e.bookNum)),[i,l]=g.useState(e.chapterNum??0),[c,d]=g.useState(ie.bookNumberToId(e.bookNum)),[u,h]=g.useState(!1),[w,v]=g.useState(u),x=g.useRef(void 0),f=g.useRef(void 0),m=g.useRef(void 0),N=g.useCallback(k=>Vl(k).filter(D=>{const M=ie.bookIdToEnglishName(D).toLowerCase(),ee=n.replace(/[^a-zA-Z]/g,"").toLowerCase();return M.includes(ee)||D.toLowerCase().includes(ee)}),[n]),$=k=>{r(k)},R=g.useRef(!1),E=g.useCallback(k=>{if(R.current){R.current=!1;return}h(k)},[]),b=g.useCallback((k,D,M,ee)=>{if(l(ie.bookNumberToId(e.bookNum)!==k?1:e.chapterNum),D||ln(k)===-1){t({bookNum:ie.bookIdToNumber(k),chapterNum:M||1,verseNum:ee||1}),h(!1),r("");return}a(o!==k?k:""),h(!D)},[t,e.bookNum,e.chapterNum,o]),I=k=>{k<=0||k>ln(o)||b(o,!0,k)},z=g.useCallback(()=>{Bl.forEach(k=>{const D=n.match(k);if(D){const[M,ee=void 0,J=void 0]=D.slice(1),q=zl(M);(ie.isBookIdValid(M)||q)&&b(q??M,!0,ee?parseInt(ee,10):1,J?parseInt(J,10):1)}})},[b,n]),Y=g.useCallback(k=>{u?(k.key==="ArrowDown"||k.key==="ArrowUp")&&(typeof m<"u"&&m.current!==null?m.current.focus():typeof f<"u"&&f.current!==null&&f.current.focus(),k.preventDefault()):h(!0)},[u]),C=k=>{const{key:D}=k;D==="ArrowRight"||D==="ArrowLeft"||D==="ArrowDown"||D==="ArrowUp"||D==="Enter"||(x.current.dispatchEvent(new KeyboardEvent("keydown",{key:D})),x.current.focus())},_=k=>{const{key:D}=k;if(c===o){if(D==="Enter"){k.preventDefault(),b(o,!0,i);return}let M=0;if(D==="ArrowRight")if(i1)M=-1;else{k.preventDefault();return}else D==="ArrowDown"?M=6:D==="ArrowUp"&&(M=-6);i+M<=0||i+M>ln(c)?l(0):M!==0&&(l(i+M),k.preventDefault())}};return g.useEffect(()=>{o===c?o===ie.bookNumberToId(e.bookNum)?l(e.chapterNum):l(1):l(0)},[c,e.bookNum,e.chapterNum,o]),g.useLayoutEffect(()=>{v(u)},[u]),g.useLayoutEffect(()=>{const k=setTimeout(()=>{if(w&&f.current&&m.current){const M=m.current.offsetTop-Al;f.current.scrollTo({top:M,behavior:"instant"})}},10);return()=>{clearTimeout(k)}},[w]),s.jsx("div",{className:"pr-twp tw-flex",children:s.jsxs(Lt,{modal:!1,open:u,onOpenChange:E,children:[s.jsx(En,{asChild:!0,children:s.jsx(gl,{ref:x,value:n,handleSearch:$,handleKeyDown:Y,handleOnClick:()=>{a(ie.bookNumberToId(e.bookNum)),d(ie.bookNumberToId(e.bookNum)),l(e.chapterNum>0?e.chapterNum:0),h(!0),x.current.focus()},onFocus:()=>{R.current=!0},handleSubmit:z,placeholder:`${ie.bookNumberToEnglishName(e.bookNum)} ${e.chapterNum}:${e.verseNum}`})}),s.jsxs(yt,{className:"tw-m-1 tw-overflow-y-auto tw-p-0 tw-font-normal tw-text-foreground/80",style:{width:"233px",maxHeight:"500px",zIndex:"250"},onKeyDown:C,align:"start",ref:f,children:[s.jsx(Ml,{handleSort:()=>console.log("sorting"),handleLocationHistory:()=>console.log("location history"),handleBookmarks:()=>console.log("bookmarks")}),ls.map((k,D)=>N(k).length>0&&s.jsxs("div",{children:[s.jsx(Kt,{className:"tw-font-semibold tw-text-foreground/80",children:Dl[k]}),N(k).map(M=>s.jsx("div",{children:s.jsx(Il,{bookId:M,handleSelectBook:()=>b(M,!1),isSelected:o===M,handleHighlightBook:()=>d(M),handleKeyDown:_,bookType:k,ref:ee=>{o===M&&(m.current=ee)},children:s.jsx($l,{handleSelectChapter:I,endChapter:ln(M),activeChapter:e.bookNum===ie.bookIdToNumber(M)?e.chapterNum:0,highlightedChapter:i,handleHighlightedChapter:ee=>{l(ee)}})})},M)),ls.length-1!==D?s.jsx(Jt,{}):void 0]},k))]})]})})}const ha=Rn.cva("pr-twp tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50",{variants:{variant:{default:"tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/90",destructive:"tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/90",outline:"tw-border tw-border-input tw-bg-background hover:tw-bg-accent hover:tw-text-accent-foreground",secondary:"tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80",ghost:"hover:tw-bg-accent hover:tw-text-accent-foreground",link:"tw-text-primary tw-underline-offset-4 hover:tw-underline"},size:{default:"tw-h-10 tw-px-4 tw-py-2",sm:"tw-h-9 tw-rounded-md tw-px-3",lg:"tw-h-11 tw-rounded-md tw-px-8",icon:"tw-h-10 tw-w-10"}},defaultVariants:{variant:"default",size:"default"}}),pe=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?tl.Slot:"button";return s.jsx(i,{className:S(ha({variant:t,size:n,className:e})),ref:a,...o})});pe.displayName="Button";const Ul=Rn.cva("tw-text-sm tw-font-medium tw-leading-none peer-disabled:tw-cursor-not-allowed peer-disabled:tw-opacity-70"),Te=g.forwardRef(({className:e,...t},n)=>s.jsx(ra.Root,{ref:n,className:S("pr-twp",Ul(),e),...t}));Te.displayName=ra.Root.displayName;const ro=g.forwardRef(({className:e,...t},n)=>s.jsx(Nn.Root,{className:S("pr-twp tw-grid tw-gap-2",e),...t,ref:n}));ro.displayName=Nn.Root.displayName;const Kn=g.forwardRef(({className:e,...t},n)=>s.jsx(Nn.Item,{ref:n,className:S("pr-twp tw-aspect-square tw-h-4 tw-w-4 tw-rounded-full tw-border tw-border-primary tw-text-primary tw-ring-offset-background focus:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50",e),...t,children:s.jsx(Nn.Indicator,{className:"tw-flex tw-items-center tw-justify-center",children:s.jsx(H.Circle,{className:"tw-h-2.5 tw-w-2.5 tw-fill-current tw-text-current"})})}));Kn.displayName=Nn.Item.displayName;const ga=kn.Root,ba=kn.Trigger,oo=g.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>s.jsx(kn.Portal,{children:s.jsx(kn.Content,{ref:o,align:t,sideOffset:n,className:S("pr-twp tw-z-50 tw-w-72 tw-rounded-md tw-border tw-bg-popover tw-p-4 tw-text-popover-foreground tw-shadow-md tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2",e),...r})}));oo.displayName=kn.Content.displayName;const ql=Ke.Portal,va=g.forwardRef(({className:e,...t},n)=>s.jsx(Ke.Overlay,{ref:n,className:S("tw-fixed tw-inset-0 tw-z-50 tw-bg-black/80 data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0",e),...t}));va.displayName=Ke.Overlay.displayName;const Hl=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(ql,{children:[s.jsx(va,{}),s.jsxs(Ke.Content,{ref:r,className:S("pr-twp tw-fixed tw-left-[50%] tw-top-[50%] tw-z-50 tw-grid tw-w-full tw-max-w-lg tw-translate-x-[-50%] tw-translate-y-[-50%] tw-gap-4 tw-border tw-bg-background tw-p-6 tw-shadow-lg tw-duration-200 data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[state=closed]:tw-slide-out-to-left-1/2 data-[state=closed]:tw-slide-out-to-top-[48%] data-[state=open]:tw-slide-in-from-left-1/2 data-[state=open]:tw-slide-in-from-top-[48%] sm:tw-rounded-lg",e),...n,children:[t,s.jsxs(Ke.Close,{className:"tw-absolute tw-right-4 tw-top-4 tw-rounded-sm tw-opacity-70 tw-ring-offset-background tw-transition-opacity hover:tw-opacity-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2 disabled:tw-pointer-events-none data-[state=open]:tw-bg-accent data-[state=open]:tw-text-muted-foreground",children:[s.jsx(H.X,{className:"tw-h-4 tw-w-4"}),s.jsx("span",{className:"tw-sr-only",children:"Close"})]})]})]}));Hl.displayName=Ke.Content.displayName;const Xl=g.forwardRef(({className:e,...t},n)=>s.jsx(Ke.Title,{ref:n,className:S("tw-text-lg tw-font-semibold tw-leading-none tw-tracking-tight",e),...t}));Xl.displayName=Ke.Title.displayName;const Yl=g.forwardRef(({className:e,...t},n)=>s.jsx(Ke.Description,{ref:n,className:S("tw-text-sm tw-text-muted-foreground",e),...t}));Yl.displayName=Ke.Description.displayName;const so=g.forwardRef(({className:e,...t},n)=>s.jsx(Re.Command,{ref:n,className:S("tw-flex tw-h-full tw-w-full tw-flex-col tw-overflow-hidden tw-rounded-md tw-bg-popover tw-text-popover-foreground",e),...t}));so.displayName=Re.Command.displayName;const ao=g.forwardRef(({className:e,...t},n)=>s.jsxs("div",{className:"tw-flex tw-items-center tw-border-b tw-px-3",children:[s.jsx(H.Search,{className:"tw-me-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50"}),s.jsx(Re.Command.Input,{ref:n,className:S("tw-flex tw-h-11 tw-w-full tw-rounded-md tw-bg-transparent tw-py-3 tw-text-sm tw-outline-none placeholder:tw-text-muted-foreground disabled:tw-cursor-not-allowed disabled:tw-opacity-50",e),...t})]}));ao.displayName=Re.Command.Input.displayName;const io=g.forwardRef(({className:e,...t},n)=>s.jsx(Re.Command.List,{ref:n,className:S("tw-max-h-[300px] tw-overflow-y-auto tw-overflow-x-hidden",e),...t}));io.displayName=Re.Command.List.displayName;const lo=g.forwardRef((e,t)=>s.jsx(Re.Command.Empty,{ref:t,className:"tw-py-6 tw-text-center tw-text-sm",...e}));lo.displayName=Re.Command.Empty.displayName;const xa=g.forwardRef(({className:e,...t},n)=>s.jsx(Re.Command.Group,{ref:n,className:S("tw-overflow-hidden tw-p-1 tw-text-foreground [&_[cmdk-group-heading]]:tw-px-2 [&_[cmdk-group-heading]]:tw-py-1.5 [&_[cmdk-group-heading]]:tw-text-xs [&_[cmdk-group-heading]]:tw-font-medium [&_[cmdk-group-heading]]:tw-text-muted-foreground",e),...t}));xa.displayName=Re.Command.Group.displayName;const Wl=g.forwardRef(({className:e,...t},n)=>s.jsx(Re.Command.Separator,{ref:n,className:S("tw--mx-1 tw-h-px tw-bg-border",e),...t}));Wl.displayName=Re.Command.Separator.displayName;const co=g.forwardRef(({className:e,...t},n)=>s.jsx(Re.Command.Item,{ref:n,className:S("tw-relative tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none data-[disabled=true]:tw-pointer-events-none data-[selected=true]:tw-bg-accent data-[selected=true]:tw-text-accent-foreground data-[disabled=true]:tw-opacity-50",e),...t}));co.displayName=Re.Command.Item.displayName;function Kl(e){return typeof e=="string"?e:typeof e=="number"?e.toString():e.label}function Jn({id:e,options:t=[],className:n,value:r,onChange:o=()=>{},getOptionLabel:a=Kl,icon:i=void 0,buttonPlaceholder:l="",textPlaceholder:c="",commandEmptyMessage:d="No option found",buttonVariant:u="outline",alignDropDown:h="start",dir:w="ltr",isDisabled:v=!1,...x}){const[f,m]=g.useState(!1);return s.jsxs(ga,{open:f,onOpenChange:m,...x,children:[s.jsx(ba,{asChild:!0,children:s.jsxs(pe,{variant:u,role:"combobox","aria-expanded":f,id:e,className:S("tw-flex tw-w-[200px] tw-items-center tw-justify-between tw-overflow-hidden",n),disabled:v,children:[s.jsxs("div",{className:"tw-flex tw-flex-1 tw-items-center tw-overflow-hidden",children:[i&&s.jsx("div",{className:"tw-pr-2",children:i}),s.jsx("span",{className:"tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap",children:r?a(r):l})]}),s.jsx(H.ChevronsUpDown,{className:"tw-ms-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50"})]})}),s.jsx(oo,{align:h,className:"tw-w-[200px] tw-p-0",dir:w,children:s.jsxs(so,{children:[s.jsx(ao,{dir:w,placeholder:c,className:"tw-text-inherit"}),s.jsx(lo,{children:d}),s.jsx(io,{children:t.map(N=>s.jsxs(co,{value:a(N),onSelect:()=>{o(N),m(!1)},children:[s.jsx(H.Check,{className:S("tw-me-2 tw-h-4 tw-w-4",{"tw-opacity-0":!r||a(r)!==a(N)})}),a(N)]},a(N)))})]})})]})}function ya({startChapter:e,endChapter:t,handleSelectStartChapter:n,handleSelectEndChapter:r,isDisabled:o=!1,chapterCount:a}){const i=g.useMemo(()=>Array.from({length:a},(d,u)=>u+1),[a]),l=d=>{n(d),d>t&&r(d)},c=d=>{r(d),dd.toString(),value:e},"start chapter"),s.jsx(Te,{htmlFor:"end-chapters-combobox",children:"to"}),s.jsx(Jn,{isDisabled:o,onChange:c,className:"tw-ml-2 tw-w-20",options:i,getOptionLabel:d=>d.toString(),value:t},"end chapter")]})}var Na=(e=>(e.CURRENT_BOOK="current book",e.CHOOSE_BOOKS="choose books",e))(Na||{});const Jl=Object.freeze(["%webView_bookSelector_currentBook%","%webView_bookSelector_choose%","%webView_bookSelector_chooseBooks%"]),Sr=(e,t)=>e[t]??t;function Zl({handleBookSelectionModeChange:e,currentBookName:t,onSelectBooks:n,selectedBookIds:r,chapterCount:o,endChapter:a,handleSelectEndChapter:i,startChapter:l,handleSelectStartChapter:c,localizedStrings:d}){const u=Sr(d,"%webView_bookSelector_currentBook%"),h=Sr(d,"%webView_bookSelector_choose%"),w=Sr(d,"%webView_bookSelector_chooseBooks%"),[v,x]=g.useState("current book"),f=m=>{x(m),e(m)};return s.jsx(ro,{className:"pr-twp tw-flex",value:v,onValueChange:m=>f(m),children:s.jsxs("div",{className:"tw-flex tw-w-full tw-flex-col tw-gap-4",children:[s.jsxs("div",{className:"tw-grid tw-grid-cols-[25%,25%,50%]",children:[s.jsxs("div",{className:"tw-flex tw-items-center",children:[s.jsx(Kn,{value:"current book"}),s.jsx(Te,{className:"tw-ml-1",children:u})]}),s.jsx(Te,{className:"tw-flex tw-items-center",children:t}),s.jsx("div",{className:"tw-flex tw-items-center tw-justify-end",children:s.jsx(ya,{isDisabled:v==="choose books",handleSelectStartChapter:c,handleSelectEndChapter:i,chapterCount:o,startChapter:l,endChapter:a})})]}),s.jsxs("div",{className:"tw-grid tw-grid-cols-[25%,50%,25%]",children:[s.jsxs("div",{className:"tw-flex tw-items-center",children:[s.jsx(Kn,{value:"choose books"}),s.jsx(Te,{className:"tw-ml-1",children:w})]}),s.jsx(Te,{className:"tw-flex tw-items-center",children:r.map(m=>ie.bookIdToEnglishName(m)).join(", ")}),s.jsx(pe,{disabled:v==="current book",onClick:()=>n(),children:h})]})]})})}function Ql({table:e}){return s.jsxs(Lt,{children:[s.jsx(ta.DropdownMenuTrigger,{asChild:!0,children:s.jsxs(pe,{variant:"outline",size:"sm",className:"tw-ml-auto tw-hidden tw-h-8 lg:tw-flex",children:[s.jsx(H.FilterIcon,{className:"tw-mr-2 tw-h-4 tw-w-4"}),"View"]})}),s.jsxs(yt,{align:"end",className:"tw-w-[150px]",children:[s.jsx(Kt,{children:"Toggle columns"}),s.jsx(Jt,{}),e.getAllColumns().filter(t=>t.getCanHide()).map(t=>s.jsx(_n,{className:"tw-capitalize",checked:t.getIsVisible(),onCheckedChange:n=>t.toggleVisibility(!!n),children:t.id},t.id))]})]})}const Ft=be.Root,ka=be.Group,zt=be.Value,Nt=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(be.Trigger,{ref:r,className:S("tw-flex tw-h-10 tw-w-full tw-items-center tw-justify-between tw-rounded-md tw-border tw-border-input tw-bg-background tw-px-3 tw-py-2 tw-text-sm tw-ring-offset-background placeholder:tw-text-muted-foreground focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50 [&>span]:tw-line-clamp-1",e),...n,children:[t,s.jsx(be.Icon,{asChild:!0,children:s.jsx(H.ChevronDown,{className:"tw-h-4 tw-w-4 tw-opacity-50"})})]}));Nt.displayName=be.Trigger.displayName;const uo=g.forwardRef(({className:e,...t},n)=>s.jsx(be.ScrollUpButton,{ref:n,className:S("tw-flex tw-cursor-default tw-items-center tw-justify-center tw-py-1",e),...t,children:s.jsx(H.ChevronUp,{className:"tw-h-4 tw-w-4"})}));uo.displayName=be.ScrollUpButton.displayName;const po=g.forwardRef(({className:e,...t},n)=>s.jsx(be.ScrollDownButton,{ref:n,className:S("tw-flex tw-cursor-default tw-items-center tw-justify-center tw-py-1",e),...t,children:s.jsx(H.ChevronDown,{className:"tw-h-4 tw-w-4"})}));po.displayName=be.ScrollDownButton.displayName;const kt=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>s.jsx(be.Portal,{children:s.jsxs(be.Content,{ref:o,className:S("pr-twp tw-relative tw-z-50 tw-max-h-96 tw-min-w-[8rem] tw-overflow-hidden tw-rounded-md tw-border tw-bg-popover tw-text-popover-foreground tw-shadow-md data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:tw-translate-y-1 data-[side=left]:tw--translate-x-1 data-[side=right]:tw-translate-x-1 data-[side=top]:tw--translate-y-1",e),position:n,...r,children:[s.jsx(uo,{}),s.jsx(be.Viewport,{className:S("tw-p-1",n==="popper"&&"tw-h-[var(--radix-select-trigger-height)] tw-w-full tw-min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(po,{})]})}));kt.displayName=be.Content.displayName;const Ea=g.forwardRef(({className:e,...t},n)=>s.jsx(be.Label,{ref:n,className:S("tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-font-semibold",e),...t}));Ea.displayName=be.Label.displayName;const Ve=g.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(be.Item,{ref:r,className:S("tw-relative tw-flex tw-w-full tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-outline-none focus:tw-bg-accent focus:tw-text-accent-foreground data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50",e),...n,children:[s.jsx("span",{className:"tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center",children:s.jsx(be.ItemIndicator,{children:s.jsx(H.Check,{className:"tw-h-4 tw-w-4"})})}),s.jsx(be.ItemText,{children:t})]}));Ve.displayName=be.Item.displayName;const ja=g.forwardRef(({className:e,...t},n)=>s.jsx(be.Separator,{ref:n,className:S("tw--mx-1 tw-my-1 tw-h-px tw-bg-muted",e),...t}));ja.displayName=be.Separator.displayName;function ec({table:e}){return s.jsx("div",{className:"tw-flex tw-items-center tw-justify-between tw-px-2 tw-pb-3 tw-pt-3",children:s.jsxs("div",{className:"tw-flex tw-items-center tw-space-x-6 lg:tw-space-x-8",children:[s.jsxs("div",{className:"tw-flex-1 tw-text-sm tw-text-muted-foreground",children:[e.getFilteredSelectedRowModel().rows.length," of"," ",e.getFilteredRowModel().rows.length," row(s) selected"]}),s.jsxs("div",{className:"tw-flex tw-items-center tw-space-x-2",children:[s.jsx("p",{className:"tw-text-nowrap tw-text-sm tw-font-medium",children:"Rows per page"}),s.jsxs(Ft,{value:`${e.getState().pagination.pageSize}`,onValueChange:t=>{e.setPageSize(Number(t))},children:[s.jsx(Nt,{className:"tw-h-8 tw-w-[70px]",children:s.jsx(zt,{placeholder:e.getState().pagination.pageSize})}),s.jsx(kt,{side:"top",children:[10,20,30,40,50].map(t=>s.jsx(Ve,{value:`${t}`,children:t},t))})]})]}),s.jsxs("div",{className:"tw-flex tw-w-[100px] tw-items-center tw-justify-center tw-text-sm tw-font-medium",children:["Page ",e.getState().pagination.pageIndex+1," of ",e.getPageCount()]}),s.jsxs("div",{className:"tw-flex tw-items-center tw-space-x-2",children:[s.jsxs(pe,{variant:"outline",size:"icon",className:"tw-hidden tw-h-8 tw-w-8 tw-p-0 lg:tw-flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[s.jsx("span",{className:"tw-sr-only",children:"Go to first page"}),s.jsx(H.ArrowLeftIcon,{className:"tw-h-4 tw-w-4"})]}),s.jsxs(pe,{variant:"outline",size:"icon",className:"tw-h-8 tw-w-8 tw-p-0",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[s.jsx("span",{className:"tw-sr-only",children:"Go to previous page"}),s.jsx(H.ChevronLeftIcon,{className:"tw-h-4 tw-w-4"})]}),s.jsxs(pe,{variant:"outline",size:"icon",className:"tw-h-8 tw-w-8 tw-p-0",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[s.jsx("span",{className:"tw-sr-only",children:"Go to next page"}),s.jsx(H.ChevronRightIcon,{className:"tw-h-4 tw-w-4"})]}),s.jsxs(pe,{variant:"outline",size:"icon",className:"tw-hidden tw-h-8 tw-w-8 tw-p-0 lg:tw-flex",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[s.jsx("span",{className:"tw-sr-only",children:"Go to last page"}),s.jsx(H.ArrowRightIcon,{className:"tw-h-4 tw-w-4"})]})]})]})})}const Zt=g.forwardRef(({className:e,stickyHeader:t,...n},r)=>s.jsx("div",{className:S("pr-twp tw-relative tw-w-full",{"tw-overflow-auto":!t}),children:s.jsx("table",{ref:r,className:S("tw-w-full tw-caption-bottom tw-text-sm",e),...n})}));Zt.displayName="Table";const Qt=g.forwardRef(({className:e,stickyHeader:t,...n},r)=>s.jsx("thead",{ref:r,className:S({"tw-sticky tw-top-[-1px] tw-bg-background tw-drop-shadow-sm":t},"[&_tr]:tw-border-b",e),...n}));Qt.displayName="TableHeader";const en=g.forwardRef(({className:e,...t},n)=>s.jsx("tbody",{ref:n,className:S("[&_tr:last-child]:tw-border-0",e),...t}));en.displayName="TableBody";const Sa=g.forwardRef(({className:e,...t},n)=>s.jsx("tfoot",{ref:n,className:S("tw-border-t tw-bg-muted/50 tw-font-medium [&>tr]:last:tw-border-b-0",e),...t}));Sa.displayName="TableFooter";const Xe=g.forwardRef(({className:e,...t},n)=>s.jsx("tr",{ref:n,className:S("tw-border-b tw-transition-colors hover:tw-bg-muted/50 data-[state=selected]:tw-bg-muted",e),...t}));Xe.displayName="TableRow";const $e=g.forwardRef(({className:e,...t},n)=>s.jsx("th",{ref:n,className:S("tw-h-12 tw-px-4 tw-text-start tw-align-middle tw-font-medium tw-text-muted-foreground [&:has([role=checkbox])]:tw-pe-0",e),...t}));$e.displayName="TableHead";const Se=g.forwardRef(({className:e,...t},n)=>s.jsx("td",{ref:n,className:S("tw-p-4 tw-align-middle [&:has([role=checkbox])]:tw-pe-0",e),...t}));Se.displayName="TableCell";const Ta=g.forwardRef(({className:e,...t},n)=>s.jsx("caption",{ref:n,className:S("tw-mt-4 tw-text-sm tw-text-muted-foreground",e),...t}));Ta.displayName="TableCaption";function Ca({columns:e,data:t,enablePagination:n=!1,showPaginationControls:r=!1,showColumnVisibilityControls:o=!1,stickyHeader:a=!1,onRowClickHandler:i=()=>{}}){var m;const[l,c]=g.useState([]),[d,u]=g.useState([]),[h,w]=g.useState({}),[v,x]=g.useState({}),f=Ne.useReactTable({data:t,columns:e,getCoreRowModel:Ne.getCoreRowModel(),...n&&{getPaginationRowModel:Ne.getPaginationRowModel()},onSortingChange:c,getSortedRowModel:Ne.getSortedRowModel(),onColumnFiltersChange:u,getFilteredRowModel:Ne.getFilteredRowModel(),onColumnVisibilityChange:w,onRowSelectionChange:x,state:{sorting:l,columnFilters:d,columnVisibility:h,rowSelection:v}});return s.jsxs("div",{className:"pr-twp",children:[o&&s.jsx(Ql,{table:f}),s.jsxs(Zt,{stickyHeader:a,children:[s.jsx(Qt,{stickyHeader:a,children:f.getHeaderGroups().map(N=>s.jsx(Xe,{children:N.headers.map($=>s.jsx($e,{children:$.isPlaceholder?void 0:Ne.flexRender($.column.columnDef.header,$.getContext())},$.id))},N.id))}),s.jsx(en,{children:(m=f.getRowModel().rows)!=null&&m.length?f.getRowModel().rows.map(N=>s.jsx(Xe,{onClick:()=>i(N,f),"data-state":N.getIsSelected()&&"selected",children:N.getVisibleCells().map($=>s.jsx(Se,{children:Ne.flexRender($.column.columnDef.cell,$.getContext())},$.id))},N.id)):s.jsx(Xe,{children:s.jsx(Se,{colSpan:e.length,className:"tw-h-24 tw-text-center",children:"No results."})})})]}),n&&s.jsxs("div",{className:"tw-flex tw-items-center tw-justify-end tw-space-x-2 tw-py-4",children:[s.jsx(pe,{variant:"outline",size:"sm",onClick:()=>f.previousPage(),disabled:!f.getCanPreviousPage(),children:"Previous"}),s.jsx(pe,{variant:"outline",size:"sm",onClick:()=>f.nextPage(),disabled:!f.getCanNextPage(),children:"Next"})]}),n&&r&&s.jsx(ec,{table:f})]})}function tc({occurrenceData:e,setScriptureReference:t,localizedStrings:n}){const r=n["%webView_inventory_occurrences_table_header_reference%"],o=n["%webView_inventory_occurrences_table_header_occurrence%"],a=g.useMemo(()=>{const i=[];return e.forEach(l=>{i.some(c=>Q.deepEqual(c,l))||i.push(l)}),i},[e]);return s.jsxs(Zt,{stickyHeader:!0,children:[s.jsx(Qt,{stickyHeader:!0,children:s.jsxs(Xe,{children:[s.jsx($e,{children:r}),s.jsx($e,{children:o})]})}),s.jsx(en,{children:a.length>0&&a.map(i=>s.jsxs(Xe,{onClick:()=>{t(i.reference)},children:[s.jsx(Se,{children:`${ie.bookNumberToEnglishName(i.reference.bookNum)} ${i.reference.chapterNum}:${i.reference.verseNum}`}),s.jsx(Se,{children:i.text})]},`${i.reference.bookNum} ${i.reference.chapterNum}:${i.reference.verseNum}-${i.text}`))})]})}const ar=g.forwardRef(({className:e,...t},n)=>s.jsx(Fr.Root,{ref:n,className:S("tw-peer pr-twp tw-h-4 tw-w-4 tw-shrink-0 tw-rounded-sm tw-border tw-border-primary tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50 data-[state=checked]:tw-bg-primary data-[state=checked]:tw-text-primary-foreground",e),...t,children:s.jsx(Fr.Indicator,{className:S("tw-flex tw-items-center tw-justify-center tw-text-current"),children:s.jsx(H.Check,{className:"tw-h-4 tw-w-4"})})}));ar.displayName=Fr.Root.displayName;const Oa=e=>e.split(/(?:\r?\n|\r)|(?=(?:\\(?:v|c|id)))/g),Gr=e=>{const t=/^\\[vc]\s+(\d+)/,n=e.match(t);if(n)return+n[1]},Ra=e=>{const t=e.match(/^\\id\s+([A-Za-z]+)/);return t?ie.bookIdToNumber(t[1]):0},_a=(e,t,n)=>n.includes(e)?"unapproved":t.includes(e)?"approved":"unknown",Pa=Rn.cva("pr-twp tw-inline-flex tw-items-center tw-justify-center tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors hover:tw-bg-muted hover:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=on]:tw-bg-accent data-[state=on]:tw-text-accent-foreground",{variants:{variant:{default:"tw-bg-transparent",outline:"tw-border tw-border-input tw-bg-transparent hover:tw-bg-accent hover:tw-text-accent-foreground"},size:{default:"tw-h-10 tw-px-3",sm:"tw-h-9 tw-px-2.5",lg:"tw-h-11 tw-px-5"}},defaultVariants:{variant:"default",size:"default"}}),nc=g.forwardRef(({className:e,variant:t,size:n,...r},o)=>s.jsx(oa.Root,{ref:o,className:S(Pa({variant:t,size:n,className:e})),...r}));nc.displayName=oa.Root.displayName;const Ia=g.createContext({size:"default",variant:"default"}),wo=g.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>s.jsx(sr.Root,{ref:a,className:S("pr-twp tw-flex tw-items-center tw-justify-center tw-gap-1",e),...o,children:s.jsx(Ia.Provider,{value:{variant:t,size:n},children:r})}));wo.displayName=sr.Root.displayName;const bn=g.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const i=g.useContext(Ia);return s.jsx(sr.Item,{ref:a,className:S(Pa({variant:i.variant||n,size:i.size||r}),e),...o,children:t})});bn.displayName=sr.Item.displayName;const ir=e=>e==="asc"?s.jsx(H.ArrowUpIcon,{className:"tw-ms-2 tw-h-4 tw-w-4"}):e==="desc"?s.jsx(H.ArrowDownIcon,{className:"tw-ms-2 tw-h-4 tw-w-4"}):s.jsx(H.ArrowUpDownIcon,{className:"tw-ms-2 tw-h-4 tw-w-4"}),rc=e=>({accessorKey:"item",accessorFn:t=>t.items[0],header:({column:t})=>s.jsxs(pe,{variant:"ghost",onClick:()=>t.toggleSorting(void 0),children:[e,ir(t.getIsSorted())]})}),oc=(e,t)=>({accessorKey:`item${t}`,accessorFn:n=>n.items[t],header:({column:n})=>s.jsxs(pe,{variant:"ghost",onClick:()=>n.toggleSorting(void 0),children:[e,ir(n.getIsSorted())]})}),sc=e=>({accessorKey:"count",header:({column:t})=>s.jsx("div",{className:"tw-flex tw-justify-end tw-tabular-nums",children:s.jsxs(pe,{variant:"ghost",onClick:()=>t.toggleSorting(void 0),children:[e,ir(t.getIsSorted())]})}),cell:({row:t})=>s.jsx("div",{className:"tw-flex tw-justify-end",children:t.getValue("count")})}),Tr=(e,t,n,r,o,a)=>{let i=[...n];e.forEach(c=>{t==="approved"?i.includes(c)||i.push(c):i=i.filter(d=>d!==c)}),r(i);let l=[...o];e.forEach(c=>{t==="unapproved"?l.includes(c)||l.push(c):l=l.filter(d=>d!==c)}),a(l)},ac=(e,t,n,r,o)=>({accessorKey:"status",header:({column:a})=>s.jsx("div",{className:"tw-flex tw-justify-center",children:s.jsxs(pe,{variant:"ghost",onClick:()=>a.toggleSorting(void 0),children:[e,ir(a.getIsSorted())]})}),cell:({row:a})=>{const i=a.getValue("status"),l=a.getValue("item");return s.jsxs(wo,{value:i,variant:"outline",type:"single",children:[s.jsx(bn,{onClick:()=>Tr([l],"approved",t,n,r,o),value:"approved",children:s.jsx(H.CircleCheckIcon,{})}),s.jsx(bn,{onClick:()=>Tr([l],"unapproved",t,n,r,o),value:"unapproved",children:s.jsx(H.CircleXIcon,{})}),s.jsx(bn,{onClick:()=>Tr([l],"unknown",t,n,r,o),value:"unknown",children:s.jsx(H.CircleHelpIcon,{})})]})}}),ic=Object.freeze(["%webView_inventory_all%","%webView_inventory_approved%","%webView_inventory_unapproved%","%webView_inventory_unknown%","%webView_inventory_scope_currentBook%","%webView_inventory_scope_chapter%","%webView_inventory_scope_verse%","%webView_inventory_filter_text%","%webView_inventory_show_additional_items%","%webView_inventory_occurrences_table_header_reference%","%webView_inventory_occurrences_table_header_occurrence%"]),lc=(e,t,n)=>{let r=e;return t!=="all"&&(r=r.filter(o=>t==="approved"&&o.status==="approved"||t==="unapproved"&&o.status==="unapproved"||t==="unknown"&&o.status==="unknown")),n!==""&&(r=r.filter(o=>o.items[0].includes(n))),r},cc=(e,t,n,r,o)=>{if(!e)return[];const a=[];let i=t.bookNum,l=t.chapterNum,c=t.verseNum;return Oa(e).forEach(u=>{u.startsWith("\\id")&&(i=Ra(u),l=0,c=0),u.startsWith("\\c")&&(l=Gr(u),c=0),u.startsWith("\\v")&&(c=Gr(u),l===0&&(l=t.chapterNum));let h=o.exec(u)??void 0;for(;h;){const w=[];h.forEach(m=>w.push(m));const v=h.index,x=a.find(m=>Q.deepEqual(m.items,w)),f={reference:{bookNum:i!==void 0?i:-1,chapterNum:l!==void 0?l:-1,verseNum:c!==void 0?c:-1},text:Q.substring(u,Math.max(0,v-25),Math.min(v+25,u.length))};if(x)x.count+=1,x.occurrences.push(f);else{const m={items:w,count:1,status:_a(w[0],n,r),occurrences:[f]};a.push(m)}h=o.exec(u)??void 0}}),a},et=(e,t)=>e[t]??t;function dc({scriptureReference:e,setScriptureReference:t,localizedStrings:n,extractItems:r,additionalItemsLabels:o,approvedItems:a,unapprovedItems:i,text:l,scope:c,onScopeChange:d,columns:u}){const h=et(n,"%webView_inventory_all%"),w=et(n,"%webView_inventory_approved%"),v=et(n,"%webView_inventory_unapproved%"),x=et(n,"%webView_inventory_unknown%"),f=et(n,"%webView_inventory_scope_currentBook%"),m=et(n,"%webView_inventory_scope_chapter%"),N=et(n,"%webView_inventory_scope_verse%"),$=et(n,"%webView_inventory_filter_text%"),R=et(n,"%webView_inventory_show_additional_items%"),[E,b]=g.useState(!1),[I,z]=g.useState("all"),[Y,C]=g.useState(""),[_,k]=g.useState([]),D=g.useMemo(()=>l?r instanceof RegExp?cc(l,e,a,i,r):r(l,e,a,i):[],[l,r,e,a,i]),M=g.useMemo(()=>{if(E)return D;const y=[];return D.forEach(O=>{const U=O.items[0],G=y.find(F=>F.items[0]===U);G?(G.count+=O.count,G.occurrences=G.occurrences.concat(O.occurrences)):y.push({items:[U],count:O.count,occurrences:O.occurrences,status:O.status})}),y},[E,D]),ee=g.useMemo(()=>lc(M,I,Y),[M,I,Y]),J=g.useMemo(()=>{var U,G;if(!E)return u;const y=(U=o==null?void 0:o.tableHeaders)==null?void 0:U.length;if(!y)return u;const O=[];for(let F=0;F{k([])},[ee]);const q=(y,O)=>{O.setRowSelection(()=>{const U={};return U[y.index]=!0,U}),k(y.original.items)},te=y=>{if(y==="book"||y==="chapter"||y==="verse")d(y);else throw new Error(`Invalid scope value: ${y}`)},oe=y=>{if(y==="all"||y==="approved"||y==="unapproved"||y==="unknown")z(y);else throw new Error(`Invalid status filter value: ${y}`)},se=g.useMemo(()=>{if(M.length===0||_.length===0)return[];const y=M.filter(O=>Q.deepEqual(E?O.items:[O.items[0]],_));if(y.length>1)throw new Error("Selected item is not unique");return y[0].occurrences},[_,E,M]);return s.jsxs("div",{className:"pr-twp tw-flex tw-h-full tw-flex-col",children:[s.jsxs("div",{className:"tw-flex tw-items-stretch",children:[s.jsxs(Ft,{onValueChange:y=>oe(y),defaultValue:I,children:[s.jsx(Nt,{className:"tw-m-1",children:s.jsx(zt,{placeholder:"Select filter"})}),s.jsxs(kt,{children:[s.jsx(Ve,{value:"all",children:h}),s.jsx(Ve,{value:"approved",children:w}),s.jsx(Ve,{value:"unapproved",children:v}),s.jsx(Ve,{value:"unknown",children:x})]})]}),s.jsxs(Ft,{onValueChange:y=>te(y),defaultValue:c,children:[s.jsx(Nt,{className:"tw-m-1",children:s.jsx(zt,{placeholder:"Select scope"})}),s.jsxs(kt,{children:[s.jsx(Ve,{value:"book",children:f}),s.jsx(Ve,{value:"chapter",children:m}),s.jsx(Ve,{value:"verse",children:N})]})]}),s.jsx(Tt,{className:"tw-m-1 tw-rounded-md tw-border",placeholder:$,value:Y,onChange:y=>{C(y.target.value)}}),o&&s.jsxs("div",{className:"tw-m-1 tw-flex tw-items-center tw-rounded-md tw-border",children:[s.jsx(ar,{className:"tw-m-1",checked:E,onCheckedChange:y=>{k([]),b(y)}}),s.jsx(Te,{className:"tw-m-1 tw-flex-shrink-0 tw-whitespace-nowrap",children:(o==null?void 0:o.checkboxText)??R})]})]}),s.jsx("div",{className:"tw-m-1 tw-flex-1 tw-overflow-auto tw-rounded-md tw-border",children:s.jsx(Ca,{columns:J,data:ee,onRowClickHandler:q,stickyHeader:!0})}),se.length>0&&s.jsx("div",{className:"tw-m-1 tw-flex-1 tw-overflow-auto tw-rounded-md tw-border",children:s.jsx(tc,{occurrenceData:se,setScriptureReference:t,localizedStrings:n})})]})}function uc({entries:e,getEntriesCount:t=void 0,selected:n,onChange:r,placeholder:o,commandEmptyMessage:a="No entries found",customSelectedText:i,sortSelected:l=!1,icon:c=void 0}){const[d,u]=g.useState(!1),h=g.useCallback(x=>{r(n.includes(x)?n.filter(f=>f!==x):[...n,x])},[n,r]),w=()=>{var x;return n.length===1?((x=e.find(f=>f.value===n[0]))==null?void 0:x.label)??o:i||o},v=g.useMemo(()=>{if(!l)return e;const x=e.filter(m=>m.starred).sort((m,N)=>m.label.localeCompare(N.label)),f=e.filter(m=>!m.starred).sort((m,N)=>{const $=n.includes(m.value),R=n.includes(N.value);return $&&!R?-1:!$&&R?1:m.label.localeCompare(N.label)});return[...x,...f]},[e,n,l]);return s.jsxs(ga,{open:d,onOpenChange:u,children:[s.jsx(ba,{asChild:!0,children:s.jsxs(pe,{variant:"outline",role:"combobox","aria-expanded":d,className:S("tw-w-full tw-justify-between",n.length>0&&n.length{const f=t?t(x):void 0;return s.jsxs(co,{value:x.value,onSelect:h,className:"tw-flex tw-items-center tw-gap-2",children:[s.jsx("div",{className:"w-4",children:s.jsx(H.Check,{className:S("tw-h-4 tw-w-4",n.includes(x.value)?"tw-opacity-100":"tw-opacity-0")})}),s.jsx("div",{className:"tw-w-4",children:x.starred&&s.jsx(H.Star,{className:"tw-h-4 tw-w-4"})}),s.jsx("div",{className:"tw-flex-grow",children:x.label}),t&&s.jsx("div",{className:"tw-w-10 tw-text-right tw-text-muted-foreground",children:f})]},x.value)})})]})]})})]})}function $a({onSearch:e,placeholder:t,isFullWidth:n,className:r}){const[o,a]=g.useState(""),i=l=>{a(l),e(l)};return s.jsxs("div",{className:"tw-relative",children:[s.jsx(H.Search,{className:"tw-absolute tw-left-3 tw-top-1/2 tw-h-4 tw-w-4 tw--translate-y-1/2 tw-transform tw-opacity-50"}),s.jsx(Tt,{className:S("tw-flex tw-h-10 tw-w-full tw-text-ellipsis tw-rounded-md tw-border tw-border-input tw-bg-background tw-py-2 tw-pe-3 tw-ps-9 tw-text-sm tw-ring-offset-background file:tw-border-0 file:tw-bg-transparent file:tw-text-sm file:tw-font-medium placeholder:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-[color:hsl(240,5%,64.9%)] focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50",{"tw-w-full":n},{"tw-pe-9":o},r),placeholder:t,value:o,onChange:l=>i(l.target.value)}),o&&s.jsxs(pe,{variant:"ghost",size:"icon",className:"tw-absolute tw-right-0 tw-top-1/2 tw-h-7 tw--translate-y-1/2 tw-transform hover:tw-bg-transparent",children:[s.jsx(H.X,{className:"tw-h-4 tw-w-4",onClick:()=>{i("")}}),s.jsx("span",{className:"tw-sr-only",children:"Clear"})]})]})}const fo=g.forwardRef(({className:e,...t},n)=>s.jsx(_e.Root,{orientation:"vertical",ref:n,className:S("tw-flex tw-gap-1 tw-rounded-md tw-text-muted-foreground",e),...t}));fo.displayName=_e.List.displayName;const mo=g.forwardRef(({className:e,...t},n)=>s.jsx(_e.List,{ref:n,className:S("tw-flex-fit tw-mlk-items-center tw-w-[124px] tw-justify-center tw-rounded-md tw-bg-muted tw-p-1 tw-text-muted-foreground",e),...t}));mo.displayName=_e.List.displayName;const Ma=g.forwardRef(({className:e,...t},n)=>s.jsx(_e.Trigger,{ref:n,...t,className:S("overflow-clip tw-inline-flex tw-w-[116px] tw-cursor-pointer tw-items-center tw-justify-center tw-break-words tw-rounded-sm tw-border-0 tw-bg-muted tw-px-3 tw-py-1.5 tw-text-sm tw-font-medium tw-text-inherit tw-ring-offset-background tw-transition-all hover:tw-text-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=active]:tw-bg-background data-[state=active]:tw-text-foreground data-[state=active]:tw-shadow-sm",e)})),ho=g.forwardRef(({className:e,...t},n)=>s.jsx(_e.Content,{ref:n,className:S("tw-ms-5 tw-flex-grow tw-text-foreground tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2",e),...t}));ho.displayName=_e.Content.displayName;function pc({tabList:e,onSearch:t,searchPlaceholder:n,headerTitle:r,isSearchBarFullWidth:o=!1,direction:a="ltr"}){return s.jsxs("div",{className:"pr-twp",children:[s.jsxs("div",{className:"tw-sticky tw-top-0 tw-space-y-2 tw-pb-2",children:[r?s.jsx("h1",{children:r}):"",s.jsx($a,{isFullWidth:o,onSearch:t,placeholder:n})]}),s.jsxs(fo,{dir:a,children:[s.jsx(mo,{children:e.map(i=>s.jsx(Ma,{value:i.value,children:i.value},i.key))}),e.map(i=>s.jsx(ho,{value:i.value,children:i.content},i.key))]})]})}const st="scrBook",wc="scrRef",mt="source",fc="details",mc="Scripture Reference",hc="Scripture Book",Da="Type",gc="Details";function bc(e,t){const n=t??!1;return[{accessorFn:r=>`${ie.bookNumberToId(r.start.bookNum)} ${r.start.chapterNum}:${r.start.verseNum}`,id:st,header:(e==null?void 0:e.scriptureReferenceColumnName)??mc,cell:r=>{const o=r.row.original;return r.row.getIsGrouped()?ie.bookNumberToEnglishName(o.start.bookNum):r.row.groupingColumnId===st?Q.formatScrRef(o.start):void 0},getGroupingValue:r=>r.start.bookNum,sortingFn:(r,o)=>Q.compareScrRefs(r.original.start,o.original.start),enableGrouping:!0},{accessorFn:r=>Q.formatScrRef(r.start),id:wc,header:void 0,cell:r=>{const o=r.row.original;return r.row.getIsGrouped()?void 0:Q.formatScrRef(o.start)},sortingFn:(r,o)=>Q.compareScrRefs(r.original.start,o.original.start),enableGrouping:!1},{accessorFn:r=>r.source.displayName,id:mt,header:n?(e==null?void 0:e.typeColumnName)??Da:void 0,cell:r=>n||r.row.getIsGrouped()?r.getValue():void 0,getGroupingValue:r=>r.source.id,sortingFn:(r,o)=>r.original.source.displayName.localeCompare(o.original.source.displayName),enableGrouping:!0},{accessorFn:r=>r.detail,id:fc,header:(e==null?void 0:e.detailsColumnName)??gc,cell:r=>r.getValue(),enableGrouping:!1}]}const vc=e=>{if(!("offset"in e.start))throw new Error("No offset available in range start");if(e.end&&!("offset"in e.end))throw new Error("No offset available in range end");const{offset:t}=e.start;let n=0;return e.end&&({offset:n}=e.end),!e.end||Q.compareScrRefs(e.start,e.end)===0?`${Q.scrRefToBBBCCCVVV(e.start)}+${t}`:`${Q.scrRefToBBBCCCVVV(e.start)}+${t}-${Q.scrRefToBBBCCCVVV(e.end)}+${n}`},cs=e=>`${vc({start:e.start,end:e.end})} ${e.source.displayName} ${e.detail}`;function xc({sources:e,showColumnHeaders:t=!1,showSourceColumn:n=!1,scriptureReferenceColumnName:r,scriptureBookGroupName:o,typeColumnName:a,detailsColumnName:i,onRowSelected:l,direction:c="ltr"}){const[d,u]=g.useState([]),[h,w]=g.useState([{id:st,desc:!1}]),[v,x]=g.useState({}),f=g.useMemo(()=>e.flatMap(C=>C.data.map(_=>({..._,source:C.source}))),[e]),m=g.useMemo(()=>bc({scriptureReferenceColumnName:r,typeColumnName:a,detailsColumnName:i},n),[r,a,i,n]);g.useEffect(()=>{d.includes(mt)?w([{id:mt,desc:!1},{id:st,desc:!1}]):w([{id:st,desc:!1}])},[d]);const N=Ne.useReactTable({data:f,columns:m,state:{grouping:d,sorting:h,rowSelection:v},onGroupingChange:u,onSortingChange:w,onRowSelectionChange:x,getExpandedRowModel:Ne.getExpandedRowModel(),getGroupedRowModel:Ne.getGroupedRowModel(),getCoreRowModel:Ne.getCoreRowModel(),getSortedRowModel:Ne.getSortedRowModel(),getRowId:cs,autoResetExpanded:!1,enableMultiRowSelection:!1,enableSubRowSelection:!1});g.useEffect(()=>{if(l){const C=N.getSelectedRowModel().rowsById,_=Object.keys(C);if(_.length===1){const k=f.find(D=>cs(D)===_[0])||void 0;k&&l(k)}}},[v,f,l,N]);const $=o??hc,R=a??Da,E=[{label:"No Grouping",value:[]},{label:`Group by ${$}`,value:[st]},{label:`Group by ${R}`,value:[mt]},{label:`Group by ${$} and ${R}`,value:[st,mt]},{label:`Group by ${R} and ${$}`,value:[mt,st]}],b=C=>{u(JSON.parse(C))},I=(C,_)=>{!C.getIsGrouped()&&!C.getIsSelected()&&C.getToggleSelectedHandler()(_)},z=(C,_)=>C.getIsGrouped()?"":S("banded-row",_%2===0?"even":"odd"),Y=(C,_,k)=>{if(!((C==null?void 0:C.length)===0||_.depth{b(C)},children:[s.jsx(Nt,{className:"tw-mb-1 tw-mt-2",children:s.jsx(zt,{})}),s.jsx(kt,{position:"item-aligned",children:s.jsx(ka,{children:E.map(C=>s.jsx(Ve,{value:JSON.stringify(C.value),children:C.label},C.label))})})]}),s.jsxs(Zt,{className:"tw-relative tw-flex tw-flex-col tw-overflow-y-auto tw-p-0",children:[t&&s.jsx(Qt,{children:N.getHeaderGroups().map(C=>s.jsx(Xe,{children:C.headers.filter(_=>_.column.columnDef.header).map(_=>s.jsx($e,{colSpan:_.colSpan,className:"top-0 tw-sticky",children:_.isPlaceholder?void 0:s.jsxs("div",{children:[_.column.getCanGroup()?s.jsx(pe,{variant:"ghost",title:`Toggle grouping by ${_.column.columnDef.header}`,onClick:_.column.getToggleGroupingHandler(),type:"button",children:_.column.getIsGrouped()?"🛑":"👊 "}):void 0," ",Ne.flexRender(_.column.columnDef.header,_.getContext())]})},_.id))},C.id))}),s.jsx(en,{children:N.getRowModel().rows.map((C,_)=>s.jsx(Xe,{"data-state":C.getIsSelected()?"selected":"",className:S(z(C,_)),onClick:k=>I(C,k),children:C.getVisibleCells().map(k=>{if(!(k.getIsPlaceholder()||k.column.columnDef.enableGrouping&&!k.getIsGrouped()&&(k.column.columnDef.id!==mt||!n)))return s.jsx(Se,{className:S(k.column.columnDef.id,"tw-p-[1px]",Y(d,C,k)),children:(()=>k.getIsGrouped()?s.jsxs(pe,{variant:"link",onClick:C.getToggleExpandedHandler(),type:"button",children:[C.getIsExpanded()&&s.jsx(H.ChevronDown,{}),!C.getIsExpanded()&&(c==="ltr"?s.jsx(H.ChevronRight,{}):s.jsx(H.ChevronLeft,{}))," ",Ne.flexRender(k.column.columnDef.cell,k.getContext())," (",C.subRows.length,")"]}):Ne.flexRender(k.column.columnDef.cell,k.getContext()))()},k.id)})},C.id))})]})]})}const Cr={[Q.getLocalizeKeyForScrollGroupId("undefined")]:"Ø",[Q.getLocalizeKeyForScrollGroupId(0)]:"A",[Q.getLocalizeKeyForScrollGroupId(1)]:"B",[Q.getLocalizeKeyForScrollGroupId(2)]:"C",[Q.getLocalizeKeyForScrollGroupId(3)]:"D",[Q.getLocalizeKeyForScrollGroupId(4)]:"E",[Q.getLocalizeKeyForScrollGroupId(5)]:"F",[Q.getLocalizeKeyForScrollGroupId(6)]:"G",[Q.getLocalizeKeyForScrollGroupId(7)]:"H",[Q.getLocalizeKeyForScrollGroupId(8)]:"I",[Q.getLocalizeKeyForScrollGroupId(9)]:"J",[Q.getLocalizeKeyForScrollGroupId(10)]:"K",[Q.getLocalizeKeyForScrollGroupId(11)]:"L",[Q.getLocalizeKeyForScrollGroupId(12)]:"M",[Q.getLocalizeKeyForScrollGroupId(13)]:"N",[Q.getLocalizeKeyForScrollGroupId(14)]:"O",[Q.getLocalizeKeyForScrollGroupId(15)]:"P",[Q.getLocalizeKeyForScrollGroupId(16)]:"Q",[Q.getLocalizeKeyForScrollGroupId(17)]:"R",[Q.getLocalizeKeyForScrollGroupId(18)]:"S",[Q.getLocalizeKeyForScrollGroupId(19)]:"T",[Q.getLocalizeKeyForScrollGroupId(20)]:"U",[Q.getLocalizeKeyForScrollGroupId(21)]:"V",[Q.getLocalizeKeyForScrollGroupId(22)]:"W",[Q.getLocalizeKeyForScrollGroupId(23)]:"X",[Q.getLocalizeKeyForScrollGroupId(24)]:"Y",[Q.getLocalizeKeyForScrollGroupId(25)]:"Z"};function yc({availableScrollGroupIds:e,scrollGroupId:t,onChangeScrollGroupId:n,localizedStrings:r={}}){const o={...Cr,...Object.fromEntries(Object.entries(r).map(([a,i])=>[a,a===i&&a in Cr?Cr[a]:i]))};return s.jsxs(Ft,{value:`${t}`,onValueChange:a=>n(a==="undefined"?void 0:parseInt(a,10)),children:[s.jsx(Nt,{className:"pr-twp tw-w-auto",children:s.jsx(zt,{placeholder:o[Q.getLocalizeKeyForScrollGroupId(t)]??t})}),s.jsx(kt,{style:{zIndex:250},children:e.map(a=>s.jsx(Ve,{value:`${a}`,children:o[Q.getLocalizeKeyForScrollGroupId(a)]},`${a}`))})]})}const go=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>s.jsx(sa.Root,{ref:o,decorative:n,orientation:t,className:S("pr-twp tw-shrink-0 tw-bg-border",t==="horizontal"?"tw-h-[1px] tw-w-full":"tw-h-full tw-w-[1px]",e),...r}));go.displayName=sa.Root.displayName;function Nc({children:e}){return s.jsx("div",{className:"pr-twp tw-grid",children:e})}function kc({primary:e,secondary:t,children:n,isLoading:r=!1,loadingMessage:o}){return s.jsxs("div",{className:"tw-flex tw-items-center tw-justify-between tw-space-x-4 tw-py-2",children:[s.jsxs("div",{children:[s.jsx("p",{className:"tw-text-sm tw-font-medium tw-leading-none",children:e}),s.jsx("p",{className:"tw-whitespace-normal tw-break-words tw-text-sm tw-text-muted-foreground",children:t})]}),r?s.jsx("p",{className:"tw-text-sm tw-text-muted-foreground",children:o}):s.jsx("div",{children:n})]})}function Ec({primary:e,secondary:t,includeSeparator:n=!1}){return s.jsxs("div",{className:"tw-space-y-4 tw-py-2",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"tw-text-lg tw-font-medium",children:e}),s.jsx("p",{className:"tw-text-sm tw-text-muted-foreground",children:t})]}),n?s.jsx(go,{}):""]})}function jc({id:e,className:t,listItems:n,selectedListItems:r,handleSelectListItem:o,createLabel:a}){return s.jsx("div",{id:e,className:t,children:n.map(i=>s.jsxs("div",{className:"tw-m-2 tw-flex tw-items-center",children:[s.jsx(ar,{className:"tw-mr-2 tw-align-middle",checked:r.includes(i),onCheckedChange:l=>o(i,l)}),s.jsx(Te,{children:a?a(i):i})]},i))})}function Sc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tc(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var bo={},Aa={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Aa);var Cc=Aa.exports,Or={};function vo(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[n]=Ba(e[n])}),t}function tt(e,t,n={clone:!0}){const r=n.clone?P({},e):e;return bt(e)&&bt(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(bt(t[o])&&o in e&&bt(e[o])?r[o]=tt(e[o],t[o],n):n.clone?r[o]=bt(t[o])?Ba(t[o]):t[o]:r[o]=t[o])}),r}var Ur={exports:{}},zn={exports:{}},le={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ss;function Cc(){if(ss)return ie;ss=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,w=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,I=e?Symbol.for("react.scope"):60119;function C(g){if(typeof g=="object"&&g!==null){var P=g.$$typeof;switch(P){case t:switch(g=g.type,g){case c:case d:case r:case s:case o:case h:return g;default:switch(g=g&&g.$$typeof,g){case l:case u:case v:case b:case i:return g;default:return P}}case n:return P}}}function E(g){return C(g)===d}return ie.AsyncMode=c,ie.ConcurrentMode=d,ie.ContextConsumer=l,ie.ContextProvider=i,ie.Element=t,ie.ForwardRef=u,ie.Fragment=r,ie.Lazy=v,ie.Memo=b,ie.Portal=n,ie.Profiler=s,ie.StrictMode=o,ie.Suspense=h,ie.isAsyncMode=function(g){return E(g)||C(g)===c},ie.isConcurrentMode=E,ie.isContextConsumer=function(g){return C(g)===l},ie.isContextProvider=function(g){return C(g)===i},ie.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},ie.isForwardRef=function(g){return C(g)===u},ie.isFragment=function(g){return C(g)===r},ie.isLazy=function(g){return C(g)===v},ie.isMemo=function(g){return C(g)===b},ie.isPortal=function(g){return C(g)===n},ie.isProfiler=function(g){return C(g)===s},ie.isStrictMode=function(g){return C(g)===o},ie.isSuspense=function(g){return C(g)===h},ie.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===d||g===s||g===o||g===h||g===w||typeof g=="object"&&g!==null&&(g.$$typeof===v||g.$$typeof===b||g.$$typeof===i||g.$$typeof===l||g.$$typeof===u||g.$$typeof===m||g.$$typeof===N||g.$$typeof===I||g.$$typeof===f)},ie.typeOf=C,ie}var le={};/** @license React v16.13.1 + */var ds;function Oc(){if(ds)return le;ds=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,w=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,$=e?Symbol.for("react.scope"):60119;function R(b){if(typeof b=="object"&&b!==null){var I=b.$$typeof;switch(I){case t:switch(b=b.type,b){case c:case d:case r:case a:case o:case h:return b;default:switch(b=b&&b.$$typeof,b){case l:case u:case x:case v:case i:return b;default:return I}}case n:return I}}}function E(b){return R(b)===d}return le.AsyncMode=c,le.ConcurrentMode=d,le.ContextConsumer=l,le.ContextProvider=i,le.Element=t,le.ForwardRef=u,le.Fragment=r,le.Lazy=x,le.Memo=v,le.Portal=n,le.Profiler=a,le.StrictMode=o,le.Suspense=h,le.isAsyncMode=function(b){return E(b)||R(b)===c},le.isConcurrentMode=E,le.isContextConsumer=function(b){return R(b)===l},le.isContextProvider=function(b){return R(b)===i},le.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},le.isForwardRef=function(b){return R(b)===u},le.isFragment=function(b){return R(b)===r},le.isLazy=function(b){return R(b)===x},le.isMemo=function(b){return R(b)===v},le.isPortal=function(b){return R(b)===n},le.isProfiler=function(b){return R(b)===a},le.isStrictMode=function(b){return R(b)===o},le.isSuspense=function(b){return R(b)===h},le.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===d||b===a||b===o||b===h||b===w||typeof b=="object"&&b!==null&&(b.$$typeof===x||b.$$typeof===v||b.$$typeof===i||b.$$typeof===l||b.$$typeof===u||b.$$typeof===m||b.$$typeof===N||b.$$typeof===$||b.$$typeof===f)},le.typeOf=R,le}var ce={};/** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var as;function Oc(){return as||(as=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,w=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,I=e?Symbol.for("react.scope"):60119;function C(_){return typeof _=="string"||typeof _=="function"||_===r||_===d||_===s||_===o||_===h||_===w||typeof _=="object"&&_!==null&&(_.$$typeof===v||_.$$typeof===b||_.$$typeof===i||_.$$typeof===l||_.$$typeof===u||_.$$typeof===m||_.$$typeof===N||_.$$typeof===I||_.$$typeof===f)}function E(_){if(typeof _=="object"&&_!==null){var ye=_.$$typeof;switch(ye){case t:var A=_.type;switch(A){case c:case d:case r:case s:case o:case h:return A;default:var ve=A&&A.$$typeof;switch(ve){case l:case u:case v:case b:case i:return ve;default:return ye}}case n:return ye}}}var g=c,P=d,V=l,U=i,j=t,R=u,k=r,D=v,$=b,Z=n,Y=s,z=o,te=h,ae=!1;function oe(_){return ae||(ae=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),x(_)||E(_)===c}function x(_){return E(_)===d}function T(_){return E(_)===l}function L(_){return E(_)===i}function F(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function B(_){return E(_)===u}function X(_){return E(_)===r}function q(_){return E(_)===v}function H(_){return E(_)===b}function G(_){return E(_)===n}function K(_){return E(_)===s}function Q(_){return E(_)===o}function ue(_){return E(_)===h}le.AsyncMode=g,le.ConcurrentMode=P,le.ContextConsumer=V,le.ContextProvider=U,le.Element=j,le.ForwardRef=R,le.Fragment=k,le.Lazy=D,le.Memo=$,le.Portal=Z,le.Profiler=Y,le.StrictMode=z,le.Suspense=te,le.isAsyncMode=oe,le.isConcurrentMode=x,le.isContextConsumer=T,le.isContextProvider=L,le.isElement=F,le.isForwardRef=B,le.isFragment=X,le.isLazy=q,le.isMemo=H,le.isPortal=G,le.isProfiler=K,le.isStrictMode=Q,le.isSuspense=ue,le.isValidElementType=C,le.typeOf=E}()),le}var is;function Ia(){return is||(is=1,process.env.NODE_ENV==="production"?Bn.exports=Cc():Bn.exports=Oc()),Bn.exports}/* + */var us;function Rc(){return us||(us=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,w=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,$=e?Symbol.for("react.scope"):60119;function R(j){return typeof j=="string"||typeof j=="function"||j===r||j===d||j===a||j===o||j===h||j===w||typeof j=="object"&&j!==null&&(j.$$typeof===x||j.$$typeof===v||j.$$typeof===i||j.$$typeof===l||j.$$typeof===u||j.$$typeof===m||j.$$typeof===N||j.$$typeof===$||j.$$typeof===f)}function E(j){if(typeof j=="object"&&j!==null){var we=j.$$typeof;switch(we){case t:var B=j.type;switch(B){case c:case d:case r:case a:case o:case h:return B;default:var xe=B&&B.$$typeof;switch(xe){case l:case u:case x:case v:case i:return xe;default:return we}}case n:return we}}}var b=c,I=d,z=l,Y=i,C=t,_=u,k=r,D=x,M=v,ee=n,J=a,q=o,te=h,oe=!1;function se(j){return oe||(oe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(j)||E(j)===c}function y(j){return E(j)===d}function O(j){return E(j)===l}function U(j){return E(j)===i}function G(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function F(j){return E(j)===u}function W(j){return E(j)===r}function V(j){return E(j)===x}function K(j){return E(j)===v}function X(j){return E(j)===n}function Z(j){return E(j)===a}function T(j){return E(j)===o}function L(j){return E(j)===h}ce.AsyncMode=b,ce.ConcurrentMode=I,ce.ContextConsumer=z,ce.ContextProvider=Y,ce.Element=C,ce.ForwardRef=_,ce.Fragment=k,ce.Lazy=D,ce.Memo=M,ce.Portal=ee,ce.Profiler=J,ce.StrictMode=q,ce.Suspense=te,ce.isAsyncMode=se,ce.isConcurrentMode=y,ce.isContextConsumer=O,ce.isContextProvider=U,ce.isElement=G,ce.isForwardRef=F,ce.isFragment=W,ce.isLazy=V,ce.isMemo=K,ce.isPortal=X,ce.isProfiler=Z,ce.isStrictMode=T,ce.isSuspense=L,ce.isValidElementType=R,ce.typeOf=E}()),ce}var ps;function Va(){return ps||(ps=1,process.env.NODE_ENV==="production"?zn.exports=Oc():zn.exports=Rc()),zn.exports}/* object-assign (c) Sindre Sorhus @license MIT -*/var Tr,ls;function Rc(){if(ls)return Tr;ls=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},l=0;l<10;l++)i["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(u){d[u]=u}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Tr=o()?Object.assign:function(s,i){for(var l,c=r(s),d,u=1;u1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function T(L,F,B,X,q){for(var H=L[F],G=0;G0?", expected one of type ["+K.join(", ")+"]":"";return new f("Invalid "+H+" `"+G+"` supplied to "+("`"+q+"`"+ye+"."))}return m(F)}function R(){function x(T,L,F,B,X){return Z(T[L])?null:new f("Invalid "+B+" `"+X+"` supplied to "+("`"+F+"`, expected a ReactNode."))}return m(x)}function k(x,T,L,F,B){return new f((x||"React class")+": "+T+" type `"+L+"."+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function D(x){function T(L,F,B,X,q){var H=L[F],G=z(H);if(G!=="object")return new f("Invalid "+X+" `"+q+"` of type `"+G+"` "+("supplied to `"+B+"`, expected `object`."));for(var K in x){var Q=x[K];if(typeof Q!="function")return k(B,X,q,K,te(Q));var ue=Q(H,K,B,X,q+"."+K,n);if(ue)return ue}return null}return m(T)}function $(x){function T(L,F,B,X,q){var H=L[F],G=z(H);if(G!=="object")return new f("Invalid "+X+" `"+q+"` of type `"+G+"` "+("supplied to `"+B+"`, expected `object`."));var K=t({},L[F],x);for(var Q in K){var ue=x[Q];if(r(x,Q)&&typeof ue!="function")return k(B,X,q,Q,te(ue));if(!ue)return new f("Invalid "+X+" `"+q+"` key `"+Q+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(L[F],null," ")+` -Valid keys: `+JSON.stringify(Object.keys(x),null," "));var _=ue(H,Q,B,X,q+"."+Q,n);if(_)return _}return null}return m(T)}function Z(x){switch(typeof x){case"number":case"string":case"undefined":return!0;case"boolean":return!x;case"object":if(Array.isArray(x))return x.every(Z);if(x===null||l(x))return!0;var T=h(x);if(T){var L=T.call(x),F;if(T!==x.entries){for(;!(F=L.next()).done;)if(!Z(F.value))return!1}else for(;!(F=L.next()).done;){var B=F.value;if(B&&!Z(B[1]))return!1}}else return!1;return!0;default:return!1}}function Y(x,T){return x==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function z(x){var T=typeof x;return Array.isArray(x)?"array":x instanceof RegExp?"object":Y(T,x)?"symbol":T}function te(x){if(typeof x>"u"||x===null)return""+x;var T=z(x);if(T==="object"){if(x instanceof Date)return"date";if(x instanceof RegExp)return"regexp"}return T}function ae(x){var T=te(x);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function oe(x){return!x.constructor||!x.constructor.name?w:x.constructor.name}return b.checkPropTypes=o,b.resetWarningCache=o.resetWarningCache,b.PropTypes=b,b},Pr}var _r,ws;function Ic(){if(ws)return _r;ws=1;var e=yo();function t(){}function n(){}return n.resetWarningCache=t,_r=function(){function r(i,l,c,d,u,h){if(h!==e){var w=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw w.name="Invariant Violation",w}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},_r}if(process.env.NODE_ENV!=="production"){var $c=Ia(),Mc=!0;zr.exports=_c()($c.isElement,Mc)}else zr.exports=Ic()();var Dc=zr.exports;const p=Sc(Dc);function Ac(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Ma(e,t,n,r,o){const s=e[t],i=o||t;if(s==null||typeof window>"u")return null;let l;const c=s.type;return typeof c=="function"&&!Ac(c)&&(l="Did you accidentally use a plain function component for an element instead?"),l!==void 0?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Da=vo(p.element,Ma);Da.isRequired=vo(p.element.isRequired,Ma);const Aa=Da,Bc="exact-prop: ​";function Vc(e){return process.env.NODE_ENV==="production"?e:O({},e,{[Bc]:t=>{const n=Object.keys(t).filter(r=>!e.hasOwnProperty(r));return n.length>0?new Error(`The following props are not supported: ${n.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}})}function Vt(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function O(U,G,F,W,V){for(var K=U[G],X=0;X0?", expected one of type ["+Z.join(", ")+"]":"";return new f("Invalid "+K+" `"+X+"` supplied to "+("`"+V+"`"+we+"."))}return m(G)}function _(){function y(O,U,G,F,W){return ee(O[U])?null:new f("Invalid "+F+" `"+W+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return m(y)}function k(y,O,U,G,F){return new f((y||"React class")+": "+O+" type `"+U+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function D(y){function O(U,G,F,W,V){var K=U[G],X=q(K);if(X!=="object")return new f("Invalid "+W+" `"+V+"` of type `"+X+"` "+("supplied to `"+F+"`, expected `object`."));for(var Z in y){var T=y[Z];if(typeof T!="function")return k(F,W,V,Z,te(T));var L=T(K,Z,F,W,V+"."+Z,n);if(L)return L}return null}return m(O)}function M(y){function O(U,G,F,W,V){var K=U[G],X=q(K);if(X!=="object")return new f("Invalid "+W+" `"+V+"` of type `"+X+"` "+("supplied to `"+F+"`, expected `object`."));var Z=t({},U[G],y);for(var T in Z){var L=y[T];if(r(y,T)&&typeof L!="function")return k(F,W,V,T,te(L));if(!L)return new f("Invalid "+W+" `"+V+"` key `"+T+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(U[G],null," ")+` +Valid keys: `+JSON.stringify(Object.keys(y),null," "));var j=L(K,T,F,W,V+"."+T,n);if(j)return j}return null}return m(O)}function ee(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(ee);if(y===null||l(y))return!0;var O=h(y);if(O){var U=O.call(y),G;if(O!==y.entries){for(;!(G=U.next()).done;)if(!ee(G.value))return!1}else for(;!(G=U.next()).done;){var F=G.value;if(F&&!ee(F[1]))return!1}}else return!1;return!0;default:return!1}}function J(y,O){return y==="symbol"?!0:O?O["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&O instanceof Symbol:!1}function q(y){var O=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":J(O,y)?"symbol":O}function te(y){if(typeof y>"u"||y===null)return""+y;var O=q(y);if(O==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return O}function oe(y){var O=te(y);switch(O){case"array":case"object":return"an "+O;case"boolean":case"date":case"regexp":return"a "+O;default:return O}}function se(y){return!y.constructor||!y.constructor.name?w:y.constructor.name}return v.checkPropTypes=o,v.resetWarningCache=o.resetWarningCache,v.PropTypes=v,v},$r}var Mr,bs;function $c(){if(bs)return Mr;bs=1;var e=xo();function t(){}function n(){}return n.resetWarningCache=t,Mr=function(){function r(i,l,c,d,u,h){if(h!==e){var w=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw w.name="Invariant Violation",w}}r.isRequired=r;function o(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Mr}if(process.env.NODE_ENV!=="production"){var Mc=Va(),Dc=!0;Ur.exports=Ic()(Mc.isElement,Dc)}else Ur.exports=$c()();var Ac=Ur.exports;const p=Sc(Ac);function Bc(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Fa(e,t,n,r,o){const a=e[t],i=o||t;if(a==null||typeof window>"u")return null;let l;const c=a.type;return typeof c=="function"&&!Bc(c)&&(l="Did you accidentally use a plain function component for an element instead?"),l!==void 0?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const za=vo(p.element,Fa);za.isRequired=vo(p.element.isRequired,Fa);const Ga=za,Vc="exact-prop: ​";function Lc(e){return process.env.NODE_ENV==="production"?e:P({},e,{[Vc]:t=>{const n=Object.keys(t).filter(r=>!e.hasOwnProperty(r));return n.length>0?new Error(`The following props are not supported: ${n.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}})}function Gt(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nn==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function Xc(e,t=166){let n;function r(...o){const s=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(s,t)}return r.clear=()=>{clearTimeout(n)},r}function Yc(e,t){return process.env.NODE_ENV==="production"?()=>null:(n,r,o,s,i)=>{const l=o||"<>",c=i||r;return typeof n[r]<"u"?new Error(`The ${s} \`${c}\` of \`${l}\` is deprecated. ${t}`):null}}function Wc(e,t){var n,r;return M.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Xn(e){return e&&e.ownerDocument||document}function Kc(e){return Xn(e).defaultView||window}function Jc(e,t){if(process.env.NODE_ENV==="production")return()=>null;const n=t?O({},t.propTypes):null;return o=>(s,i,l,c,d,...u)=>{const h=d||i,w=n==null?void 0:n[h];if(w){const b=w(s,i,l,c,d,...u);if(b)return b}return typeof s[i]<"u"&&!s[o]?new Error(`The prop \`${h}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}function Yn(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Zc=typeof window<"u"?M.useLayoutEffect:M.useEffect,Lt=Zc;let bs=0;function Qc(e){const[t,n]=M.useState(e),r=e||t;return M.useEffect(()=>{t==null&&(bs+=1,n(`mui-${bs}`))},[t]),r}const vs=M["useId".toString()];function La(e){if(vs!==void 0){const t=vs();return e??t}return Qc(e)}function ed(e,t,n,r,o){if(process.env.NODE_ENV==="production")return null;const s=o||t;return typeof e[t]<"u"?new Error(`The prop \`${s}\` is not supported. Please remove it.`):null}function Fa({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=M.useRef(e!==void 0),[s,i]=M.useState(t),l=o?e:s;if(process.env.NODE_ENV!=="production"){M.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(` -`))},[r,n,e]);const{current:d}=M.useRef(t);M.useEffect(()=>{!o&&d!==t&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(` -`))},[JSON.stringify(t)])}const c=M.useCallback(d=>{o||i(d)},[]);return[l,c]}function Ur(e){const t=M.useRef(e);return Lt(()=>{t.current=e}),M.useRef((...n)=>(0,t.current)(...n)).current}function xt(...e){return M.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Yn(n,t)})},e)}const ys={};function td(e,t){const n=M.useRef(ys);return n.current===ys&&(n.current=e(t)),n}const nd=[];function rd(e){M.useEffect(e,nd)}class Cn{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Cn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function ln(){const e=td(Cn.create).current;return rd(e.disposeEffect),e}let sr=!0,qr=!1;const od=new Cn,sd={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function ad(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&sd[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function id(e){e.metaKey||e.altKey||e.ctrlKey||(sr=!0)}function Ir(){sr=!1}function ld(){this.visibilityState==="hidden"&&qr&&(sr=!0)}function cd(e){e.addEventListener("keydown",id,!0),e.addEventListener("mousedown",Ir,!0),e.addEventListener("pointerdown",Ir,!0),e.addEventListener("touchstart",Ir,!0),e.addEventListener("visibilitychange",ld,!0)}function dd(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return sr||ad(t)}function za(){const e=M.useCallback(o=>{o!=null&&cd(o.ownerDocument)},[]),t=M.useRef(!1);function n(){return t.current?(qr=!0,od.start(100,()=>{qr=!1}),t.current=!1,!0):!1}function r(o){return dd(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Ga(e,t){const n=O({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=O({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},s=t[r];n[r]={},!s||!Object.keys(s)?n[r]=o:!o||!Object.keys(o)?n[r]=s:(n[r]=O({},s),Object.keys(o).forEach(i=>{n[r][i]=Ga(o[i],s[i])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function xo(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((s,i)=>{if(i){const l=t(i);l!==""&&s.push(l),n&&n[i]&&s.push(n[i])}return s},[]).join(" ")}),r}const xs=e=>e,ud=()=>{let e=xs;return{configure(t){e=t},generate(t){return e(t)},reset(){e=xs}}},pd=ud(),Ua=pd,qa={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ar(e,t,n="Mui"){const r=qa[t];return r?`${n}-${r}`:`${Ua.generate(e)}-${t}`}function Ha(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=ar(e,o,n)}),r}function wd(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function xe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s=0)&&(n[o]=e[o]);return n}const fd=["values","unit","step"],md=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>O({},n,{[r.key]:r.val}),{})};function hd(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=xe(e,fd),s=md(t),i=Object.keys(s);function l(w){return`@media (min-width:${typeof t[w]=="number"?t[w]:w}${n})`}function c(w){return`@media (max-width:${(typeof t[w]=="number"?t[w]:w)-r/100}${n})`}function d(w,b){const v=i.indexOf(b);return`@media (min-width:${typeof t[w]=="number"?t[w]:w}${n}) and (max-width:${(v!==-1&&typeof t[i[v]]=="number"?t[i[v]]:b)-r/100}${n})`}function u(w){return i.indexOf(w)+1`@media (min-width:${No[e]}px)`};function et(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||Ns;return t.reduce((i,l,c)=>(i[s.up(s.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const s=r.breakpoints||Ns;return Object.keys(t).reduce((i,l)=>{if(Object.keys(s.values||No).indexOf(l)!==-1){const c=s.up(l);i[c]=n(t[l],l)}else{const c=l;i[c]=t[c]}return i},{})}return n(t)}function yd(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const s=e.up(o);return r[s]={},r},{}))||{}}function xd(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function ir(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Wn(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=ir(e,n)||r,t&&(o=t(o,r,e)),o}function be(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=i=>{if(i[t]==null)return null;const l=i[t],c=i.theme,d=ir(c,r)||{};return et(i,l,h=>{let w=Wn(d,o,h);return h===w&&typeof h=="string"&&(w=Wn(d,o,`${t}${h==="default"?"":Ye(h)}`,h)),n===!1?w:{[n]:w}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:at}:{},s.filterProps=[t],s}function Nd(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const kd={m:"margin",p:"padding"},Ed={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ks={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Sd=Nd(e=>{if(e.length>2)if(ks[e])e=ks[e];else return[e];const[t,n]=e.split(""),r=kd[t],o=Ed[n]||"";return Array.isArray(o)?o.map(s=>r+s):[r+o]}),lr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],cr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],jd=[...lr,...cr];function On(e,t,n,r){var o;const s=(o=ir(e,t,!1))!=null?o:n;return typeof s=="number"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),s*i):Array.isArray(s)?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>s.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${i} > ${s.length-1}, you need to add the missing values.`].join(` + */var xs;function zc(){return xs||(xs=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),x=!1,f=!1,m=!1,N=!1,$=!1,R;R=Symbol.for("react.module.reference");function E(B){return!!(typeof B=="string"||typeof B=="function"||B===n||B===o||$||B===r||B===d||B===u||N||B===v||x||f||m||typeof B=="object"&&B!==null&&(B.$$typeof===w||B.$$typeof===h||B.$$typeof===a||B.$$typeof===i||B.$$typeof===c||B.$$typeof===R||B.getModuleId!==void 0))}function b(B){if(typeof B=="object"&&B!==null){var xe=B.$$typeof;switch(xe){case e:var qe=B.type;switch(qe){case n:case o:case r:case d:case u:return qe;default:var ut=qe&&qe.$$typeof;switch(ut){case l:case i:case c:case w:case h:case a:return ut;default:return xe}}case t:return xe}}}var I=i,z=a,Y=e,C=c,_=n,k=w,D=h,M=t,ee=o,J=r,q=d,te=u,oe=!1,se=!1;function y(B){return oe||(oe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function O(B){return se||(se=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(B){return b(B)===i}function G(B){return b(B)===a}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function W(B){return b(B)===c}function V(B){return b(B)===n}function K(B){return b(B)===w}function X(B){return b(B)===h}function Z(B){return b(B)===t}function T(B){return b(B)===o}function L(B){return b(B)===r}function j(B){return b(B)===d}function we(B){return b(B)===u}ue.ContextConsumer=I,ue.ContextProvider=z,ue.Element=Y,ue.ForwardRef=C,ue.Fragment=_,ue.Lazy=k,ue.Memo=D,ue.Portal=M,ue.Profiler=ee,ue.StrictMode=J,ue.Suspense=q,ue.SuspenseList=te,ue.isAsyncMode=y,ue.isConcurrentMode=O,ue.isContextConsumer=U,ue.isContextProvider=G,ue.isElement=F,ue.isForwardRef=W,ue.isFragment=V,ue.isLazy=K,ue.isMemo=X,ue.isPortal=Z,ue.isProfiler=T,ue.isStrictMode=L,ue.isSuspense=j,ue.isSuspenseList=we,ue.isValidElementType=E,ue.typeOf=b}()),ue}process.env.NODE_ENV==="production"?qr.exports=Fc():qr.exports=zc();var ys=qr.exports;const Gc=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Uc(e){const t=`${e}`.match(Gc);return t&&t[1]||""}function Ua(e,t=""){return e.displayName||e.name||Uc(e)||t}function Ns(e,t,n){const r=Ua(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function qc(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Ua(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ys.ForwardRef:return Ns(e,e.render,"ForwardRef");case ys.Memo:return Ns(e,e.type,"memo");default:return}}}function Sn(e,t,n,r,o){if(process.env.NODE_ENV==="production")return null;const a=e[t],i=o||t;return a==null?null:a&&a.nodeType!==1?new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}const Hc=p.oneOfType([p.func,p.object]),qa=Hc;function Je(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Gt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Xc(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function Yc(e,t=166){let n;function r(...o){const a=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(a,t)}return r.clear=()=>{clearTimeout(n)},r}function Wc(e,t){return process.env.NODE_ENV==="production"?()=>null:(n,r,o,a,i)=>{const l=o||"<>",c=i||r;return typeof n[r]<"u"?new Error(`The ${a} \`${c}\` of \`${l}\` is deprecated. ${t}`):null}}function Kc(e,t){var n,r;return A.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Zn(e){return e&&e.ownerDocument||document}function Jc(e){return Zn(e).defaultView||window}function Zc(e,t){if(process.env.NODE_ENV==="production")return()=>null;const n=t?P({},t.propTypes):null;return o=>(a,i,l,c,d,...u)=>{const h=d||i,w=n==null?void 0:n[h];if(w){const v=w(a,i,l,c,d,...u);if(v)return v}return typeof a[i]<"u"&&!a[o]?new Error(`The prop \`${h}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}function Qn(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Qc=typeof window<"u"?A.useLayoutEffect:A.useEffect,Ut=Qc;let ks=0;function ed(e){const[t,n]=A.useState(e),r=e||t;return A.useEffect(()=>{t==null&&(ks+=1,n(`mui-${ks}`))},[t]),r}const Es=A["useId".toString()];function Ha(e){if(Es!==void 0){const t=Es();return e??t}return ed(e)}function td(e,t,n,r,o){if(process.env.NODE_ENV==="production")return null;const a=o||t;return typeof e[t]<"u"?new Error(`The prop \`${a}\` is not supported. Please remove it.`):null}function Xa({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[a,i]=A.useState(t),l=o?e:a;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(` +`))},[r,n,e]);const{current:d}=A.useRef(t);A.useEffect(()=>{!o&&d!==t&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(` +`))},[JSON.stringify(t)])}const c=A.useCallback(d=>{o||i(d)},[]);return[l,c]}function Hr(e){const t=A.useRef(e);return Ut(()=>{t.current=e}),A.useRef((...n)=>(0,t.current)(...n)).current}function Et(...e){return A.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Qn(n,t)})},e)}const js={};function nd(e,t){const n=A.useRef(js);return n.current===js&&(n.current=e(t)),n}const rd=[];function od(e){A.useEffect(e,rd)}class Pn{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Pn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function fn(){const e=nd(Pn.create).current;return od(e.disposeEffect),e}let lr=!0,Xr=!1;const sd=new Pn,ad={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function id(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&ad[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function ld(e){e.metaKey||e.altKey||e.ctrlKey||(lr=!0)}function Dr(){lr=!1}function cd(){this.visibilityState==="hidden"&&Xr&&(lr=!0)}function dd(e){e.addEventListener("keydown",ld,!0),e.addEventListener("mousedown",Dr,!0),e.addEventListener("pointerdown",Dr,!0),e.addEventListener("touchstart",Dr,!0),e.addEventListener("visibilitychange",cd,!0)}function ud(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return lr||id(t)}function Ya(){const e=A.useCallback(o=>{o!=null&&dd(o.ownerDocument)},[]),t=A.useRef(!1);function n(){return t.current?(Xr=!0,sd.start(100,()=>{Xr=!1}),t.current=!1,!0):!1}function r(o){return ud(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function Wa(e,t){const n=P({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=P({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},a=t[r];n[r]={},!a||!Object.keys(a)?n[r]=o:!o||!Object.keys(o)?n[r]=a:(n[r]=P({},a),Object.keys(o).forEach(i=>{n[r][i]=Wa(o[i],a[i])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function yo(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((a,i)=>{if(i){const l=t(i);l!==""&&a.push(l),n&&n[i]&&a.push(n[i])}return a},[]).join(" ")}),r}const Ss=e=>e,pd=()=>{let e=Ss;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ss}}},wd=pd(),Ka=wd,Ja={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function cr(e,t,n="Mui"){const r=Ja[t];return r?`${n}-${r}`:`${Ka.generate(e)}-${t}`}function Za(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=cr(e,o,n)}),r}function fd(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function ye(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}const md=["values","unit","step"],hd=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>P({},n,{[r.key]:r.val}),{})};function gd(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=ye(e,md),a=hd(t),i=Object.keys(a);function l(w){return`@media (min-width:${typeof t[w]=="number"?t[w]:w}${n})`}function c(w){return`@media (max-width:${(typeof t[w]=="number"?t[w]:w)-r/100}${n})`}function d(w,v){const x=i.indexOf(v);return`@media (min-width:${typeof t[w]=="number"?t[w]:w}${n}) and (max-width:${(x!==-1&&typeof t[i[x]]=="number"?t[i[x]]:v)-r/100}${n})`}function u(w){return i.indexOf(w)+1`@media (min-width:${No[e]}px)`};function nt(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||Ts;return t.reduce((i,l,c)=>(i[a.up(a.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const a=r.breakpoints||Ts;return Object.keys(t).reduce((i,l)=>{if(Object.keys(a.values||No).indexOf(l)!==-1){const c=a.up(l);i[c]=n(t[l],l)}else{const c=l;i[c]=t[c]}return i},{})}return n(t)}function yd(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function Nd(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function dr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function er(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=dr(e,n)||r,t&&(o=t(o,r,e)),o}function ve(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=i=>{if(i[t]==null)return null;const l=i[t],c=i.theme,d=dr(c,r)||{};return nt(i,l,h=>{let w=er(d,o,h);return h===w&&typeof h=="string"&&(w=er(d,o,`${t}${h==="default"?"":Je(h)}`,h)),n===!1?w:{[n]:w}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:lt}:{},a.filterProps=[t],a}function kd(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Ed={m:"margin",p:"padding"},jd={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Cs={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Sd=kd(e=>{if(e.length>2)if(Cs[e])e=Cs[e];else return[e];const[t,n]=e.split(""),r=Ed[t],o=jd[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),ur=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],pr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Td=[...ur,...pr];function In(e,t,n,r){var o;const a=(o=dr(e,t,!1))!=null?o:n;return typeof a=="number"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),a*i):Array.isArray(a)?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join(` `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(` -`))),s[i]):typeof s=="function"?s:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${s}) is invalid.`,"It should be a number, an array or a function."].join(` -`)),()=>{})}function Xa(e){return On(e,"spacing",8,"spacing")}function Rn(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function Td(e,t){return n=>e.reduce((r,o)=>(r[o]=Rn(t,n),r),{})}function Cd(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=Sd(n),s=Td(o,r),i=e[n];return et(e,i,s)}function Ya(e,t){const n=Xa(e.theme);return Object.keys(e).map(r=>Cd(e,t,r,n)).reduce(wn,{})}function me(e){return Ya(e,lr)}me.propTypes=process.env.NODE_ENV!=="production"?lr.reduce((e,t)=>(e[t]=at,e),{}):{};me.filterProps=lr;function he(e){return Ya(e,cr)}he.propTypes=process.env.NODE_ENV!=="production"?cr.reduce((e,t)=>(e[t]=at,e),{}):{};he.filterProps=cr;process.env.NODE_ENV!=="production"&&jd.reduce((e,t)=>(e[t]=at,e),{});function Od(e=8){if(e.mui)return e;const t=Xa({spacing:e}),n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return n.mui=!0,n}function dr(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>Object.keys(r).reduce((o,s)=>t[s]?wn(o,t[s](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Ae(e){return typeof e!="number"?e:`${e}px solid`}function Fe(e,t){return be({prop:e,themeKey:"borders",transform:t})}const Rd=Fe("border",Ae),Pd=Fe("borderTop",Ae),_d=Fe("borderRight",Ae),Id=Fe("borderBottom",Ae),$d=Fe("borderLeft",Ae),Md=Fe("borderColor"),Dd=Fe("borderTopColor"),Ad=Fe("borderRightColor"),Bd=Fe("borderBottomColor"),Vd=Fe("borderLeftColor"),Ld=Fe("outline",Ae),Fd=Fe("outlineColor"),ur=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=On(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Rn(t,r)});return et(e,e.borderRadius,n)}return null};ur.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:at}:{};ur.filterProps=["borderRadius"];dr(Rd,Pd,_d,Id,$d,Md,Dd,Ad,Bd,Vd,ur,Ld,Fd);const pr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=On(e.theme,"spacing",8,"gap"),n=r=>({gap:Rn(t,r)});return et(e,e.gap,n)}return null};pr.propTypes=process.env.NODE_ENV!=="production"?{gap:at}:{};pr.filterProps=["gap"];const wr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=On(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Rn(t,r)});return et(e,e.columnGap,n)}return null};wr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:at}:{};wr.filterProps=["columnGap"];const fr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=On(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Rn(t,r)});return et(e,e.rowGap,n)}return null};fr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:at}:{};fr.filterProps=["rowGap"];const zd=be({prop:"gridColumn"}),Gd=be({prop:"gridRow"}),Ud=be({prop:"gridAutoFlow"}),qd=be({prop:"gridAutoColumns"}),Hd=be({prop:"gridAutoRows"}),Xd=be({prop:"gridTemplateColumns"}),Yd=be({prop:"gridTemplateRows"}),Wd=be({prop:"gridTemplateAreas"}),Kd=be({prop:"gridArea"});dr(pr,wr,fr,zd,Gd,Ud,qd,Hd,Xd,Yd,Wd,Kd);function Mt(e,t){return t==="grey"?t:e}const Jd=be({prop:"color",themeKey:"palette",transform:Mt}),Zd=be({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Mt}),Qd=be({prop:"backgroundColor",themeKey:"palette",transform:Mt});dr(Jd,Zd,Qd);function _e(e){return e<=1&&e!==0?`${e*100}%`:e}const eu=be({prop:"width",transform:_e}),ko=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const s=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||No[n];return s?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:_e(n)}};return et(e,e.maxWidth,t)}return null};ko.filterProps=["maxWidth"];const tu=be({prop:"minWidth",transform:_e}),nu=be({prop:"height",transform:_e}),ru=be({prop:"maxHeight",transform:_e}),ou=be({prop:"minHeight",transform:_e});be({prop:"size",cssProperty:"width",transform:_e});be({prop:"size",cssProperty:"height",transform:_e});const su=be({prop:"boxSizing"});dr(eu,ko,tu,nu,ru,ou,su);const au={border:{themeKey:"borders",transform:Ae},borderTop:{themeKey:"borders",transform:Ae},borderRight:{themeKey:"borders",transform:Ae},borderBottom:{themeKey:"borders",transform:Ae},borderLeft:{themeKey:"borders",transform:Ae},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ae},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ur},color:{themeKey:"palette",transform:Mt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Mt},backgroundColor:{themeKey:"palette",transform:Mt},p:{style:he},pt:{style:he},pr:{style:he},pb:{style:he},pl:{style:he},px:{style:he},py:{style:he},padding:{style:he},paddingTop:{style:he},paddingRight:{style:he},paddingBottom:{style:he},paddingLeft:{style:he},paddingX:{style:he},paddingY:{style:he},paddingInline:{style:he},paddingInlineStart:{style:he},paddingInlineEnd:{style:he},paddingBlock:{style:he},paddingBlockStart:{style:he},paddingBlockEnd:{style:he},m:{style:me},mt:{style:me},mr:{style:me},mb:{style:me},ml:{style:me},mx:{style:me},my:{style:me},margin:{style:me},marginTop:{style:me},marginRight:{style:me},marginBottom:{style:me},marginLeft:{style:me},marginX:{style:me},marginY:{style:me},marginInline:{style:me},marginInlineStart:{style:me},marginInlineEnd:{style:me},marginBlock:{style:me},marginBlockStart:{style:me},marginBlockEnd:{style:me},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:pr},rowGap:{style:fr},columnGap:{style:wr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:_e},maxWidth:{style:ko},minWidth:{transform:_e},height:{transform:_e},maxHeight:{transform:_e},minHeight:{transform:_e},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Eo=au;function iu(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function lu(e,t){return typeof e=="function"?e(t):e}function cu(){function e(n,r,o,s){const i={[n]:r,theme:o},l=s[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:d,transform:u,style:h}=l;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const w=ir(o,d)||{};return h?h(i):et(i,r,v=>{let f=Wn(w,u,v);return v===f&&typeof v=="string"&&(f=Wn(w,u,`${n}${v==="default"?"":Ye(v)}`,v)),c===!1?f:{[c]:f}})}function t(n){var r;const{sx:o,theme:s={}}=n||{};if(!o)return null;const i=(r=s.unstable_sxConfig)!=null?r:Eo;function l(c){let d=c;if(typeof c=="function")d=c(s);else if(typeof c!="object")return c;if(!d)return null;const u=yd(s.breakpoints),h=Object.keys(u);let w=u;return Object.keys(d).forEach(b=>{const v=lu(d[b],s);if(v!=null)if(typeof v=="object")if(i[b])w=wn(w,e(b,v,s,i));else{const f=et({theme:s},v,m=>({[b]:m}));iu(f,v)?w[b]=t({sx:v,theme:s}):w=wn(w,f)}else w=wn(w,e(b,v,s,i))}),xd(h,w)}return Array.isArray(o)?o.map(l):l(o)}return t}const Wa=cu();Wa.filterProps=["sx"];const So=Wa;function du(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const uu=["breakpoints","palette","spacing","shape"];function jo(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={}}=e,i=xe(e,uu),l=hd(n),c=Od(o);let d=Qe({breakpoints:l,direction:"ltr",components:{},palette:O({mode:"light"},r),spacing:c,shape:O({},bd,s)},i);return d.applyStyles=du,d=t.reduce((u,h)=>Qe(u,h),d),d.unstable_sxConfig=O({},Eo,i==null?void 0:i.unstable_sxConfig),d.unstable_sx=function(h){return So({sx:h,theme:this})},d}function pu(e){return Object.keys(e).length===0}function Ka(e=null){const t=M.useContext(Ar.ThemeContext);return!t||pu(t)?e:t}const wu=jo();function Ja(e=wu){return Ka(e)}const fu=["ownerState"],mu=["variants"],hu=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function gu(e){return Object.keys(e).length===0}function bu(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Gn(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const vu=jo(),Es=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Vn({defaultTheme:e,theme:t,themeId:n}){return gu(t)?e:t[n]||t}function yu(e){return e?(t,n)=>n[e]:null}function Un(e,t){let{ownerState:n}=t,r=xe(t,fu);const o=typeof e=="function"?e(O({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(s=>Un(s,O({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:s=[]}=o;let l=xe(o,mu);return s.forEach(c=>{let d=!0;typeof c.props=="function"?d=c.props(O({ownerState:n},r,n)):Object.keys(c.props).forEach(u=>{(n==null?void 0:n[u])!==c.props[u]&&r[u]!==c.props[u]&&(d=!1)}),d&&(Array.isArray(l)||(l=[l]),l.push(typeof c.style=="function"?c.style(O({ownerState:n},r,n)):c.style))}),l}return o}function xu(e={}){const{themeId:t,defaultTheme:n=vu,rootShouldForwardProp:r=Gn,slotShouldForwardProp:o=Gn}=e,s=i=>So(O({},i,{theme:Vn(O({},i,{defaultTheme:n,themeId:t}))}));return s.__mui_systemSx=!0,(i,l={})=>{Ar.internal_processStyles(i,g=>g.filter(P=>!(P!=null&&P.__mui_systemSx)));const{name:c,slot:d,skipVariantsResolver:u,skipSx:h,overridesResolver:w=yu(Es(d))}=l,b=xe(l,hu),v=u!==void 0?u:d&&d!=="Root"&&d!=="root"||!1,f=h||!1;let m;process.env.NODE_ENV!=="production"&&c&&(m=`${c}-${Es(d||"Root")}`);let N=Gn;d==="Root"||d==="root"?N=r:d?N=o:bu(i)&&(N=void 0);const I=Ar(i,O({shouldForwardProp:N,label:m},b)),C=g=>typeof g=="function"&&g.__emotion_real!==g||mt(g)?P=>Un(g,O({},P,{theme:Vn({theme:P.theme,defaultTheme:n,themeId:t})})):g,E=(g,...P)=>{let V=C(g);const U=P?P.map(C):[];c&&w&&U.push(k=>{const D=Vn(O({},k,{defaultTheme:n,themeId:t}));if(!D.components||!D.components[c]||!D.components[c].styleOverrides)return null;const $=D.components[c].styleOverrides,Z={};return Object.entries($).forEach(([Y,z])=>{Z[Y]=Un(z,O({},k,{theme:D}))}),w(k,Z)}),c&&!v&&U.push(k=>{var D;const $=Vn(O({},k,{defaultTheme:n,themeId:t})),Z=$==null||(D=$.components)==null||(D=D[c])==null?void 0:D.variants;return Un({variants:Z},O({},k,{theme:$}))}),f||U.push(s);const j=U.length-P.length;if(Array.isArray(g)&&j>0){const k=new Array(j).fill("");V=[...g,...k],V.raw=[...g.raw,...k]}const R=I(V,...U);if(process.env.NODE_ENV!=="production"){let k;c&&(k=`${c}${Ye(d||"")}`),k===void 0&&(k=`Styled(${Uc(i)})`),R.displayName=k}return i.muiName&&(R.muiName=i.muiName),R};return I.withConfig&&(E.withConfig=I.withConfig),E}}function Nu(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Ga(t.components[n].defaultProps,r)}function ku({props:e,name:t,defaultTheme:n,themeId:r}){let o=Ja(n);return r&&(o=o[r]||o),Nu({theme:o,name:t,props:e})}function To(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(en)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),wd(e,t,n)}function Eu(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Nt(e){if(e.type)return e;if(e.charAt(0)==="#")return Nt(Eu(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color. -The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Vt(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space. -The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Vt(10,o))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:o}}function mr(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,s)=>s<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Su(e){e=Nt(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,s=r*Math.min(o,1-o),i=(d,u=(d+n/30)%12)=>o-s*Math.max(Math.min(u-3,9-u,1),-1);let l="rgb";const c=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),mr({type:l,values:c})}function Ss(e){e=Nt(e);let t=e.type==="hsl"||e.type==="hsla"?Nt(Su(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function js(e,t){const n=Ss(e),r=Ss(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Za(e,t){return e=Nt(e),t=To(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,mr(e)}function ju(e,t){if(e=Nt(e),t=To(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return mr(e)}function Tu(e,t){if(e=Nt(e),t=To(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return mr(e)}function Cu(e,t){return O({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Ou={black:"#000",white:"#fff"},vn=Ou,Ru={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Pu=Ru,_u={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ct=_u,Iu={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ot=Iu,$u={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},nn=$u,Mu={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Rt=Mu,Du={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Pt=Du,Au={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},_t=Au,Bu=["mode","contrastThreshold","tonalOffset"],Ts={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:vn.white,default:vn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},$r={text:{primary:vn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:vn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Cs(e,t,n,r){const o=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Tu(e.main,o):t==="dark"&&(e.dark=ju(e.main,s)))}function Vu(e="light"){return e==="dark"?{main:Rt[200],light:Rt[50],dark:Rt[400]}:{main:Rt[700],light:Rt[400],dark:Rt[800]}}function Lu(e="light"){return e==="dark"?{main:Ct[200],light:Ct[50],dark:Ct[400]}:{main:Ct[500],light:Ct[300],dark:Ct[700]}}function Fu(e="light"){return e==="dark"?{main:Ot[500],light:Ot[300],dark:Ot[700]}:{main:Ot[700],light:Ot[400],dark:Ot[800]}}function zu(e="light"){return e==="dark"?{main:Pt[400],light:Pt[300],dark:Pt[700]}:{main:Pt[700],light:Pt[500],dark:Pt[900]}}function Gu(e="light"){return e==="dark"?{main:_t[400],light:_t[300],dark:_t[700]}:{main:_t[800],light:_t[500],dark:_t[900]}}function Uu(e="light"){return e==="dark"?{main:nn[400],light:nn[300],dark:nn[700]}:{main:"#ed6c02",light:nn[500],dark:nn[900]}}function qu(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=xe(e,Bu),s=e.primary||Vu(t),i=e.secondary||Lu(t),l=e.error||Fu(t),c=e.info||zu(t),d=e.success||Gu(t),u=e.warning||Uu(t);function h(f){const m=js(f,$r.text.primary)>=n?$r.text.primary:Ts.text.primary;if(process.env.NODE_ENV!=="production"){const N=js(f,m);N<3&&console.error([`MUI: The contrast ratio of ${N}:1 for ${m} on ${f}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(` -`))}return m}const w=({color:f,name:m,mainShade:N=500,lightShade:I=300,darkShade:C=700})=>{if(f=O({},f),!f.main&&f[N]&&(f.main=f[N]),!f.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${m?` (${m})`:""} provided to augmentColor(color) is invalid. -The color object needs to have a \`main\` property or a \`${N}\` property.`:Vt(11,m?` (${m})`:"",N));if(typeof f.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${m?` (${m})`:""} provided to augmentColor(color) is invalid. +`))),a[i]):typeof a=="function"?a:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join(` +`)),()=>{})}function Qa(e){return In(e,"spacing",8,"spacing")}function $n(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function Cd(e,t){return n=>e.reduce((r,o)=>(r[o]=$n(t,n),r),{})}function Od(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=Sd(n),a=Cd(o,r),i=e[n];return nt(e,i,a)}function ei(e,t){const n=Qa(e.theme);return Object.keys(e).map(r=>Od(e,t,r,n)).reduce(vn,{})}function he(e){return ei(e,ur)}he.propTypes=process.env.NODE_ENV!=="production"?ur.reduce((e,t)=>(e[t]=lt,e),{}):{};he.filterProps=ur;function ge(e){return ei(e,pr)}ge.propTypes=process.env.NODE_ENV!=="production"?pr.reduce((e,t)=>(e[t]=lt,e),{}):{};ge.filterProps=pr;process.env.NODE_ENV!=="production"&&Td.reduce((e,t)=>(e[t]=lt,e),{});function Rd(e=8){if(e.mui)return e;const t=Qa({spacing:e}),n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(a=>{const i=t(a);return typeof i=="number"?`${i}px`:i}).join(" "));return n.mui=!0,n}function wr(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?vn(o,t[a](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Le(e){return typeof e!="number"?e:`${e}px solid`}function Ue(e,t){return ve({prop:e,themeKey:"borders",transform:t})}const _d=Ue("border",Le),Pd=Ue("borderTop",Le),Id=Ue("borderRight",Le),$d=Ue("borderBottom",Le),Md=Ue("borderLeft",Le),Dd=Ue("borderColor"),Ad=Ue("borderTopColor"),Bd=Ue("borderRightColor"),Vd=Ue("borderBottomColor"),Ld=Ue("borderLeftColor"),Fd=Ue("outline",Le),zd=Ue("outlineColor"),fr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=In(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:$n(t,r)});return nt(e,e.borderRadius,n)}return null};fr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:lt}:{};fr.filterProps=["borderRadius"];wr(_d,Pd,Id,$d,Md,Dd,Ad,Bd,Vd,Ld,fr,Fd,zd);const mr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=In(e.theme,"spacing",8,"gap"),n=r=>({gap:$n(t,r)});return nt(e,e.gap,n)}return null};mr.propTypes=process.env.NODE_ENV!=="production"?{gap:lt}:{};mr.filterProps=["gap"];const hr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=In(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:$n(t,r)});return nt(e,e.columnGap,n)}return null};hr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:lt}:{};hr.filterProps=["columnGap"];const gr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=In(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:$n(t,r)});return nt(e,e.rowGap,n)}return null};gr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:lt}:{};gr.filterProps=["rowGap"];const Gd=ve({prop:"gridColumn"}),Ud=ve({prop:"gridRow"}),qd=ve({prop:"gridAutoFlow"}),Hd=ve({prop:"gridAutoColumns"}),Xd=ve({prop:"gridAutoRows"}),Yd=ve({prop:"gridTemplateColumns"}),Wd=ve({prop:"gridTemplateRows"}),Kd=ve({prop:"gridTemplateAreas"}),Jd=ve({prop:"gridArea"});wr(mr,hr,gr,Gd,Ud,qd,Hd,Xd,Yd,Wd,Kd,Jd);function Vt(e,t){return t==="grey"?t:e}const Zd=ve({prop:"color",themeKey:"palette",transform:Vt}),Qd=ve({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Vt}),eu=ve({prop:"backgroundColor",themeKey:"palette",transform:Vt});wr(Zd,Qd,eu);function Me(e){return e<=1&&e!==0?`${e*100}%`:e}const tu=ve({prop:"width",transform:Me}),ko=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o;const a=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||No[n];return a?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${a}${e.theme.breakpoints.unit}`}:{maxWidth:a}:{maxWidth:Me(n)}};return nt(e,e.maxWidth,t)}return null};ko.filterProps=["maxWidth"];const nu=ve({prop:"minWidth",transform:Me}),ru=ve({prop:"height",transform:Me}),ou=ve({prop:"maxHeight",transform:Me}),su=ve({prop:"minHeight",transform:Me});ve({prop:"size",cssProperty:"width",transform:Me});ve({prop:"size",cssProperty:"height",transform:Me});const au=ve({prop:"boxSizing"});wr(tu,ko,nu,ru,ou,su,au);const iu={border:{themeKey:"borders",transform:Le},borderTop:{themeKey:"borders",transform:Le},borderRight:{themeKey:"borders",transform:Le},borderBottom:{themeKey:"borders",transform:Le},borderLeft:{themeKey:"borders",transform:Le},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Le},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:fr},color:{themeKey:"palette",transform:Vt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Vt},backgroundColor:{themeKey:"palette",transform:Vt},p:{style:ge},pt:{style:ge},pr:{style:ge},pb:{style:ge},pl:{style:ge},px:{style:ge},py:{style:ge},padding:{style:ge},paddingTop:{style:ge},paddingRight:{style:ge},paddingBottom:{style:ge},paddingLeft:{style:ge},paddingX:{style:ge},paddingY:{style:ge},paddingInline:{style:ge},paddingInlineStart:{style:ge},paddingInlineEnd:{style:ge},paddingBlock:{style:ge},paddingBlockStart:{style:ge},paddingBlockEnd:{style:ge},m:{style:he},mt:{style:he},mr:{style:he},mb:{style:he},ml:{style:he},mx:{style:he},my:{style:he},margin:{style:he},marginTop:{style:he},marginRight:{style:he},marginBottom:{style:he},marginLeft:{style:he},marginX:{style:he},marginY:{style:he},marginInline:{style:he},marginInlineStart:{style:he},marginInlineEnd:{style:he},marginBlock:{style:he},marginBlockStart:{style:he},marginBlockEnd:{style:he},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:mr},rowGap:{style:gr},columnGap:{style:hr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Me},maxWidth:{style:ko},minWidth:{transform:Me},height:{transform:Me},maxHeight:{transform:Me},minHeight:{transform:Me},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Eo=iu;function lu(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function cu(e,t){return typeof e=="function"?e(t):e}function du(){function e(n,r,o,a){const i={[n]:r,theme:o},l=a[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:d,transform:u,style:h}=l;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const w=dr(o,d)||{};return h?h(i):nt(i,r,x=>{let f=er(w,u,x);return x===f&&typeof x=="string"&&(f=er(w,u,`${n}${x==="default"?"":Je(x)}`,x)),c===!1?f:{[c]:f}})}function t(n){var r;const{sx:o,theme:a={}}=n||{};if(!o)return null;const i=(r=a.unstable_sxConfig)!=null?r:Eo;function l(c){let d=c;if(typeof c=="function")d=c(a);else if(typeof c!="object")return c;if(!d)return null;const u=yd(a.breakpoints),h=Object.keys(u);let w=u;return Object.keys(d).forEach(v=>{const x=cu(d[v],a);if(x!=null)if(typeof x=="object")if(i[v])w=vn(w,e(v,x,a,i));else{const f=nt({theme:a},x,m=>({[v]:m}));lu(f,x)?w[v]=t({sx:x,theme:a}):w=vn(w,f)}else w=vn(w,e(v,x,a,i))}),Nd(h,w)}return Array.isArray(o)?o.map(l):l(o)}return t}const ti=du();ti.filterProps=["sx"];const jo=ti;function uu(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const pu=["breakpoints","palette","spacing","shape"];function So(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:a={}}=e,i=ye(e,pu),l=gd(n),c=Rd(o);let d=tt({breakpoints:l,direction:"ltr",components:{},palette:P({mode:"light"},r),spacing:c,shape:P({},vd,a)},i);return d.applyStyles=uu,d=t.reduce((u,h)=>tt(u,h),d),d.unstable_sxConfig=P({},Eo,i==null?void 0:i.unstable_sxConfig),d.unstable_sx=function(h){return jo({sx:h,theme:this})},d}function wu(e){return Object.keys(e).length===0}function ni(e=null){const t=A.useContext(Lr.ThemeContext);return!t||wu(t)?e:t}const fu=So();function ri(e=fu){return ni(e)}const mu=["ownerState"],hu=["variants"],gu=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function bu(e){return Object.keys(e).length===0}function vu(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Xn(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const xu=So(),Os=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Gn({defaultTheme:e,theme:t,themeId:n}){return bu(t)?e:t[n]||t}function yu(e){return e?(t,n)=>n[e]:null}function Yn(e,t){let{ownerState:n}=t,r=ye(t,mu);const o=typeof e=="function"?e(P({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(a=>Yn(a,P({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:a=[]}=o;let l=ye(o,hu);return a.forEach(c=>{let d=!0;typeof c.props=="function"?d=c.props(P({ownerState:n},r,n)):Object.keys(c.props).forEach(u=>{(n==null?void 0:n[u])!==c.props[u]&&r[u]!==c.props[u]&&(d=!1)}),d&&(Array.isArray(l)||(l=[l]),l.push(typeof c.style=="function"?c.style(P({ownerState:n},r,n)):c.style))}),l}return o}function Nu(e={}){const{themeId:t,defaultTheme:n=xu,rootShouldForwardProp:r=Xn,slotShouldForwardProp:o=Xn}=e,a=i=>jo(P({},i,{theme:Gn(P({},i,{defaultTheme:n,themeId:t}))}));return a.__mui_systemSx=!0,(i,l={})=>{Lr.internal_processStyles(i,b=>b.filter(I=>!(I!=null&&I.__mui_systemSx)));const{name:c,slot:d,skipVariantsResolver:u,skipSx:h,overridesResolver:w=yu(Os(d))}=l,v=ye(l,gu),x=u!==void 0?u:d&&d!=="Root"&&d!=="root"||!1,f=h||!1;let m;process.env.NODE_ENV!=="production"&&c&&(m=`${c}-${Os(d||"Root")}`);let N=Xn;d==="Root"||d==="root"?N=r:d?N=o:vu(i)&&(N=void 0);const $=Lr(i,P({shouldForwardProp:N,label:m},v)),R=b=>typeof b=="function"&&b.__emotion_real!==b||bt(b)?I=>Yn(b,P({},I,{theme:Gn({theme:I.theme,defaultTheme:n,themeId:t})})):b,E=(b,...I)=>{let z=R(b);const Y=I?I.map(R):[];c&&w&&Y.push(k=>{const D=Gn(P({},k,{defaultTheme:n,themeId:t}));if(!D.components||!D.components[c]||!D.components[c].styleOverrides)return null;const M=D.components[c].styleOverrides,ee={};return Object.entries(M).forEach(([J,q])=>{ee[J]=Yn(q,P({},k,{theme:D}))}),w(k,ee)}),c&&!x&&Y.push(k=>{var D;const M=Gn(P({},k,{defaultTheme:n,themeId:t})),ee=M==null||(D=M.components)==null||(D=D[c])==null?void 0:D.variants;return Yn({variants:ee},P({},k,{theme:M}))}),f||Y.push(a);const C=Y.length-I.length;if(Array.isArray(b)&&C>0){const k=new Array(C).fill("");z=[...b,...k],z.raw=[...b.raw,...k]}const _=$(z,...Y);if(process.env.NODE_ENV!=="production"){let k;c&&(k=`${c}${Je(d||"")}`),k===void 0&&(k=`Styled(${qc(i)})`),_.displayName=k}return i.muiName&&(_.muiName=i.muiName),_};return $.withConfig&&(E.withConfig=$.withConfig),E}}function ku(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Wa(t.components[n].defaultProps,r)}function Eu({props:e,name:t,defaultTheme:n,themeId:r}){let o=ri(n);return r&&(o=o[r]||o),ku({theme:o,name:t,props:e})}function To(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(en)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),fd(e,t,n)}function ju(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function jt(e){if(e.type)return e;if(e.charAt(0)==="#")return jt(ju(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color. +The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Gt(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space. +The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Gt(10,o))}else r=r.split(",");return r=r.map(a=>parseFloat(a)),{type:n,values:r,colorSpace:o}}function br(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,a)=>a<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Su(e){e=jt(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,a=r*Math.min(o,1-o),i=(d,u=(d+n/30)%12)=>o-a*Math.max(Math.min(u-3,9-u,1),-1);let l="rgb";const c=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),br({type:l,values:c})}function Rs(e){e=jt(e);let t=e.type==="hsl"||e.type==="hsla"?jt(Su(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function _s(e,t){const n=Rs(e),r=Rs(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function oi(e,t){return e=jt(e),t=To(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,br(e)}function Tu(e,t){if(e=jt(e),t=To(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return br(e)}function Cu(e,t){if(e=jt(e),t=To(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return br(e)}function Ou(e,t){return P({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Ru={black:"#000",white:"#fff"},Tn=Ru,_u={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Pu=_u,Iu={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Pt=Iu,$u={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},It=$u,Mu={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},cn=Mu,Du={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},$t=Du,Au={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Mt=Au,Bu={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Dt=Bu,Vu=["mode","contrastThreshold","tonalOffset"],Ps={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Tn.white,default:Tn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Ar={text:{primary:Tn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Tn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Is(e,t,n,r){const o=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Cu(e.main,o):t==="dark"&&(e.dark=Tu(e.main,a)))}function Lu(e="light"){return e==="dark"?{main:$t[200],light:$t[50],dark:$t[400]}:{main:$t[700],light:$t[400],dark:$t[800]}}function Fu(e="light"){return e==="dark"?{main:Pt[200],light:Pt[50],dark:Pt[400]}:{main:Pt[500],light:Pt[300],dark:Pt[700]}}function zu(e="light"){return e==="dark"?{main:It[500],light:It[300],dark:It[700]}:{main:It[700],light:It[400],dark:It[800]}}function Gu(e="light"){return e==="dark"?{main:Mt[400],light:Mt[300],dark:Mt[700]}:{main:Mt[700],light:Mt[500],dark:Mt[900]}}function Uu(e="light"){return e==="dark"?{main:Dt[400],light:Dt[300],dark:Dt[700]}:{main:Dt[800],light:Dt[500],dark:Dt[900]}}function qu(e="light"){return e==="dark"?{main:cn[400],light:cn[300],dark:cn[700]}:{main:"#ed6c02",light:cn[500],dark:cn[900]}}function Hu(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=ye(e,Vu),a=e.primary||Lu(t),i=e.secondary||Fu(t),l=e.error||zu(t),c=e.info||Gu(t),d=e.success||Uu(t),u=e.warning||qu(t);function h(f){const m=_s(f,Ar.text.primary)>=n?Ar.text.primary:Ps.text.primary;if(process.env.NODE_ENV!=="production"){const N=_s(f,m);N<3&&console.error([`MUI: The contrast ratio of ${N}:1 for ${m} on ${f}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(` +`))}return m}const w=({color:f,name:m,mainShade:N=500,lightShade:$=300,darkShade:R=700})=>{if(f=P({},f),!f.main&&f[N]&&(f.main=f[N]),!f.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${m?` (${m})`:""} provided to augmentColor(color) is invalid. +The color object needs to have a \`main\` property or a \`${N}\` property.`:Gt(11,m?` (${m})`:"",N));if(typeof f.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${m?` (${m})`:""} provided to augmentColor(color) is invalid. \`color.main\` should be a string, but \`${JSON.stringify(f.main)}\` was provided instead. Did you intend to use one of the following approaches? @@ -55,16 +55,16 @@ const theme1 = createTheme({ palette: { const theme2 = createTheme({ palette: { primary: { main: green[500] }, -} });`:Vt(12,m?` (${m})`:"",JSON.stringify(f.main)));return Cs(f,"light",I,r),Cs(f,"dark",C,r),f.contrastText||(f.contrastText=h(f.main)),f},b={dark:$r,light:Ts};return process.env.NODE_ENV!=="production"&&(b[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Qe(O({common:O({},vn),mode:t,primary:w({color:s,name:"primary"}),secondary:w({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:w({color:l,name:"error"}),warning:w({color:u,name:"warning"}),info:w({color:c,name:"info"}),success:w({color:d,name:"success"}),grey:Pu,contrastThreshold:n,getContrastText:h,augmentColor:w,tonalOffset:r},b[t]),o)}const Hu=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Xu(e){return Math.round(e*1e5)/1e5}const Os={textTransform:"uppercase"},Rs='"Roboto", "Helvetica", "Arial", sans-serif';function Yu(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=Rs,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:u,pxToRem:h}=n,w=xe(n,Hu);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof d!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const b=o/14,v=h||(N=>`${N/d*b}rem`),f=(N,I,C,E,g)=>O({fontFamily:r,fontWeight:N,fontSize:v(I),lineHeight:C},r===Rs?{letterSpacing:`${Xu(E/I)}em`}:{},g,u),m={h1:f(s,96,1.167,-1.5),h2:f(s,60,1.2,-.5),h3:f(i,48,1.167,0),h4:f(i,34,1.235,.25),h5:f(i,24,1.334,0),h6:f(l,20,1.6,.15),subtitle1:f(i,16,1.75,.15),subtitle2:f(l,14,1.57,.1),body1:f(i,16,1.5,.15),body2:f(i,14,1.43,.15),button:f(l,14,1.75,.4,Os),caption:f(i,12,1.66,.4),overline:f(i,12,2.66,1,Os),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Qe(O({htmlFontSize:d,pxToRem:v,fontFamily:r,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:l,fontWeightBold:c},m),w,{clone:!1})}const Wu=.2,Ku=.14,Ju=.12;function we(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Wu})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ku})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Ju})`].join(",")}const Zu=["none",we(0,2,1,-1,0,1,1,0,0,1,3,0),we(0,3,1,-2,0,2,2,0,0,1,5,0),we(0,3,3,-2,0,3,4,0,0,1,8,0),we(0,2,4,-1,0,4,5,0,0,1,10,0),we(0,3,5,-1,0,5,8,0,0,1,14,0),we(0,3,5,-1,0,6,10,0,0,1,18,0),we(0,4,5,-2,0,7,10,1,0,2,16,1),we(0,5,5,-3,0,8,10,1,0,3,14,2),we(0,5,6,-3,0,9,12,1,0,3,16,2),we(0,6,6,-3,0,10,14,1,0,4,18,3),we(0,6,7,-4,0,11,15,1,0,4,20,3),we(0,7,8,-4,0,12,17,2,0,5,22,4),we(0,7,8,-4,0,13,19,2,0,5,24,4),we(0,7,9,-4,0,14,21,2,0,5,26,4),we(0,8,9,-5,0,15,22,2,0,6,28,5),we(0,8,10,-5,0,16,24,2,0,6,30,5),we(0,8,11,-5,0,17,26,2,0,6,32,5),we(0,9,11,-5,0,18,28,2,0,7,34,6),we(0,9,12,-6,0,19,29,2,0,7,36,6),we(0,10,13,-6,0,20,31,3,0,8,38,7),we(0,10,13,-6,0,21,33,3,0,8,40,7),we(0,10,14,-6,0,22,35,3,0,8,42,7),we(0,11,14,-7,0,23,36,3,0,9,44,8),we(0,11,15,-7,0,24,38,3,0,9,46,8)],Qu=Zu,ep=["duration","easing","delay"],tp={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},np={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ps(e){return`${Math.round(e)}ms`}function rp(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function op(e){const t=O({},tp,e.easing),n=O({},np,e.duration);return O({getAutoHeightDuration:rp,create:(o=["all"],s={})=>{const{duration:i=n.standard,easing:l=t.easeInOut,delay:c=0}=s,d=xe(s,ep);if(process.env.NODE_ENV!=="production"){const u=w=>typeof w=="string",h=w=>!isNaN(parseFloat(w));!u(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(i)&&!u(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),u(l)||console.error('MUI: Argument "easing" must be a string.'),!h(c)&&!u(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(` -`)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof i=="string"?i:Ps(i)} ${l} ${typeof c=="string"?c:Ps(c)}`).join(",")}},e,{easing:t,duration:n})}const sp={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},ap=sp,ip=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function lp(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:s={}}=e,i=xe(e,ip);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Vt(18));const l=qu(r),c=jo(e);let d=Qe(c,{mixins:Cu(c.breakpoints,n),palette:l,shadows:Qu.slice(),typography:Yu(l,s),transitions:op(o),zIndex:O({},ap)});if(d=Qe(d,i),d=t.reduce((u,h)=>Qe(u,h),d),process.env.NODE_ENV!=="production"){const u=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(w,b)=>{let v;for(v in w){const f=w[v];if(u.indexOf(v)!==-1&&Object.keys(f).length>0){if(process.env.NODE_ENV!=="production"){const m=ar("",v);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(w,null,2),"",`Instead, you need to use the '&.${m}' syntax:`,JSON.stringify({root:{[`&.${m}`]:f}},null,2),"","https://mui.com/r/state-classes-guide"].join(` -`))}w[v]={}}}};Object.keys(d.components).forEach(w=>{const b=d.components[w].styleOverrides;b&&w.indexOf("Mui")===0&&h(b,w)})}return d.unstable_sxConfig=O({},Eo,i==null?void 0:i.unstable_sxConfig),d.unstable_sx=function(h){return So({sx:h,theme:this})},d}const cp=lp(),Co=cp,Oo="$$material";function Ro({props:e,name:t}){return ku({props:e,name:t,defaultTheme:Co,themeId:Oo})}const dp=e=>Gn(e)&&e!=="classes",up=xu({themeId:Oo,defaultTheme:Co,rootShouldForwardProp:dp}),Pn=up;function pp(e){return ar("MuiSvgIcon",e)}Ha("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const wp=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],fp=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Ye(t)}`,`fontSize${Ye(n)}`]};return xo(o,pp,r)},mp=Pn("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ye(n.color)}`],t[`fontSize${Ye(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,s,i,l,c,d,u,h,w,b,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(i=s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem",medium:((l=e.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem",large:((d=e.typography)==null||(u=d.pxToRem)==null?void 0:u.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(w=(e.vars||e).palette)==null||(w=w[t.color])==null?void 0:w.main)!=null?h:{action:(b=(e.vars||e).palette)==null||(b=b.action)==null?void 0:b.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),Po=M.forwardRef(function(t,n){const r=Ro({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:l="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:u=!1,titleAccess:h,viewBox:w="0 0 24 24"}=r,b=xe(r,wp),v=M.isValidElement(o)&&o.type==="svg",f=O({},r,{color:i,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:w,hasSvgAsChild:v}),m={};u||(m.viewBox=w);const N=fp(f);return a.jsxs(mp,O({as:l,className:ot(N.root,s),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},m,b,v&&o.props,{ownerState:f,children:[v?o.props.children:o,h?a.jsx("title",{children:h}):null]}))});process.env.NODE_ENV!=="production"&&(Po.propTypes={children:p.node,classes:p.object,className:p.string,color:p.oneOfType([p.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),p.string]),component:p.elementType,fontSize:p.oneOfType([p.oneOf(["inherit","large","medium","small"]),p.string]),htmlColor:p.string,inheritViewBox:p.bool,shapeRendering:p.string,sx:p.oneOfType([p.arrayOf(p.oneOfType([p.func,p.object,p.bool])),p.func,p.object]),titleAccess:p.string,viewBox:p.string});Po.muiName="SvgIcon";const _s=Po;function Qa(e,t){function n(r,o){return a.jsx(_s,O({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=_s.muiName,M.memo(M.forwardRef(n))}const hp={configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(` -`)),Ua.configure(e)}},gp=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Ye,createChainedFunction:Hc,createSvgIcon:Qa,debounce:Xc,deprecatedPropType:Yc,isMuiElement:Wc,ownerDocument:Xn,ownerWindow:Kc,requirePropFactory:Jc,setRef:Yn,unstable_ClassNameGenerator:hp,unstable_useEnhancedEffect:Lt,unstable_useId:La,unsupportedProp:ed,useControlled:Fa,useEventCallback:Ur,useForkRef:xt,useIsFocusVisible:za},Symbol.toStringTag,{value:"Module"})),bp=jc(gp);var Is;function vp(){return Is||(Is=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=bp}(jr)),jr}var yp=Tc;Object.defineProperty(bo,"__esModule",{value:!0});var ei=bo.default=void 0,xp=yp(vp()),Np=a;ei=bo.default=(0,xp.default)((0,Np.jsx)("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight");function kp(e){return typeof e=="string"}function cn(e,t,n){return e===void 0||kp(e)?t:O({},t,{ownerState:O({},t.ownerState,n)})}const Ep={disableDefaultClasses:!1},Sp=M.createContext(Ep);function jp(e){const{disableDefaultClasses:t}=M.useContext(Sp);return n=>t?"":e(n)}function Tp(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Cp(e,t,n){return typeof e=="function"?e(t,n):e}function $s(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Op(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=e;if(!t){const b=ot(n==null?void 0:n.className,s,o==null?void 0:o.className,r==null?void 0:r.className),v=O({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),f=O({},n,o,r);return b.length>0&&(f.className=b),Object.keys(v).length>0&&(f.style=v),{props:f,internalRef:void 0}}const i=Tp(O({},o,r)),l=$s(r),c=$s(o),d=t(i),u=ot(d==null?void 0:d.className,n==null?void 0:n.className,s,o==null?void 0:o.className,r==null?void 0:r.className),h=O({},d==null?void 0:d.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),w=O({},d,n,c,l);return u.length>0&&(w.className=u),Object.keys(h).length>0&&(w.style=h),{props:w,internalRef:d.ref}}const Rp=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Pp(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:s=!1}=e,i=xe(e,Rp),l=s?{}:Cp(r,o),{props:c,internalRef:d}=Op(O({},i,{externalSlotProps:l})),u=xt(d,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return cn(n,O({},c,{ref:u}),o)}const ti="base";function _p(e){return`${ti}--${e}`}function Ip(e,t){return`${ti}-${e}-${t}`}function ni(e,t){const n=qa[t];return n?_p(n):Ip(e,t)}function $p(e,t){const n={};return t.forEach(r=>{n[r]=ni(e,r)}),n}function Mp(e){return typeof e=="function"?e():e}const Kn=M.forwardRef(function(t,n){const{children:r,container:o,disablePortal:s=!1}=t,[i,l]=M.useState(null),c=xt(M.isValidElement(r)?r.ref:null,n);if(Lt(()=>{s||l(Mp(o)||document.body)},[o,s]),Lt(()=>{if(i&&!s)return Yn(n,i),()=>{Yn(n,null)}},[n,i,s]),s){if(M.isValidElement(r)){const d={ref:c};return M.cloneElement(r,d)}return a.jsx(M.Fragment,{children:r})}return a.jsx(M.Fragment,{children:i&&fl.createPortal(r,i)})});process.env.NODE_ENV!=="production"&&(Kn.propTypes={children:p.node,container:p.oneOfType([bn,p.func]),disablePortal:p.bool});process.env.NODE_ENV!=="production"&&(Kn["propTypes"]=Vc(Kn.propTypes));var je="top",Ve="bottom",Le="right",Te="left",_o="auto",_n=[je,Ve,Le,Te],Ft="start",yn="end",Dp="clippingParents",ri="viewport",rn="popper",Ap="reference",Ms=_n.reduce(function(e,t){return e.concat([t+"-"+Ft,t+"-"+yn])},[]),oi=[].concat(_n,[_o]).reduce(function(e,t){return e.concat([t,t+"-"+Ft,t+"-"+yn])},[]),Bp="beforeRead",Vp="read",Lp="afterRead",Fp="beforeMain",zp="main",Gp="afterMain",Up="beforeWrite",qp="write",Hp="afterWrite",Xp=[Bp,Vp,Lp,Fp,zp,Gp,Up,qp,Hp];function We(e){return e?(e.nodeName||"").toLowerCase():null}function $e(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function kt(e){var t=$e(e).Element;return e instanceof t||e instanceof Element}function Be(e){var t=$e(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Io(e){if(typeof ShadowRoot>"u")return!1;var t=$e(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Yp(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!Be(s)||!We(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(i){var l=o[i];l===!1?s.removeAttribute(i):s.setAttribute(i,l===!0?"":l)}))})}function Wp(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],s=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=i.reduce(function(c,d){return c[d]="",c},{});!Be(o)||!We(o)||(Object.assign(o.style,l),Object.keys(s).forEach(function(c){o.removeAttribute(c)}))})}}const Kp={name:"applyStyles",enabled:!0,phase:"write",fn:Yp,effect:Wp,requires:["computeStyles"]};function He(e){return e.split("-")[0]}var ht=Math.max,Jn=Math.min,zt=Math.round;function Hr(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function si(){return!/^((?!chrome|android).)*safari/i.test(Hr())}function Gt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&Be(e)&&(o=e.offsetWidth>0&&zt(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&zt(r.height)/e.offsetHeight||1);var i=kt(e)?$e(e):window,l=i.visualViewport,c=!si()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/o,u=(r.top+(c&&l?l.offsetTop:0))/s,h=r.width/o,w=r.height/s;return{width:h,height:w,top:u,right:d+h,bottom:u+w,left:d,x:d,y:u}}function $o(e){var t=Gt(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ai(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Io(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function tt(e){return $e(e).getComputedStyle(e)}function Jp(e){return["table","td","th"].indexOf(We(e))>=0}function it(e){return((kt(e)?e.ownerDocument:e.document)||window.document).documentElement}function hr(e){return We(e)==="html"?e:e.assignedSlot||e.parentNode||(Io(e)?e.host:null)||it(e)}function Ds(e){return!Be(e)||tt(e).position==="fixed"?null:e.offsetParent}function Zp(e){var t=/firefox/i.test(Hr()),n=/Trident/i.test(Hr());if(n&&Be(e)){var r=tt(e);if(r.position==="fixed")return null}var o=hr(e);for(Io(o)&&(o=o.host);Be(o)&&["html","body"].indexOf(We(o))<0;){var s=tt(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function In(e){for(var t=$e(e),n=Ds(e);n&&Jp(n)&&tt(n).position==="static";)n=Ds(n);return n&&(We(n)==="html"||We(n)==="body"&&tt(n).position==="static")?t:n||Zp(e)||t}function Mo(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fn(e,t,n){return ht(e,Jn(t,n))}function Qp(e,t,n){var r=fn(e,t,n);return r>n?n:r}function ii(){return{top:0,right:0,bottom:0,left:0}}function li(e){return Object.assign({},ii(),e)}function ci(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ew=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,li(typeof t!="number"?t:ci(t,_n))};function tw(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=He(n.placement),c=Mo(l),d=[Te,Le].indexOf(l)>=0,u=d?"height":"width";if(!(!s||!i)){var h=ew(o.padding,n),w=$o(s),b=c==="y"?je:Te,v=c==="y"?Ve:Le,f=n.rects.reference[u]+n.rects.reference[c]-i[c]-n.rects.popper[u],m=i[c]-n.rects.reference[c],N=In(s),I=N?c==="y"?N.clientHeight||0:N.clientWidth||0:0,C=f/2-m/2,E=h[b],g=I-w[u]-h[v],P=I/2-w[u]/2+C,V=fn(E,P,g),U=c;n.modifiersData[r]=(t={},t[U]=V,t.centerOffset=V-P,t)}}function nw(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||ai(t.elements.popper,o)&&(t.elements.arrow=o))}const rw={name:"arrow",enabled:!0,phase:"main",fn:tw,effect:nw,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ut(e){return e.split("-")[1]}var ow={top:"auto",right:"auto",bottom:"auto",left:"auto"};function sw(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:zt(n*o)/o||0,y:zt(r*o)/o||0}}function As(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,h=e.isFixed,w=i.x,b=w===void 0?0:w,v=i.y,f=v===void 0?0:v,m=typeof u=="function"?u({x:b,y:f}):{x:b,y:f};b=m.x,f=m.y;var N=i.hasOwnProperty("x"),I=i.hasOwnProperty("y"),C=Te,E=je,g=window;if(d){var P=In(n),V="clientHeight",U="clientWidth";if(P===$e(n)&&(P=it(n),tt(P).position!=="static"&&l==="absolute"&&(V="scrollHeight",U="scrollWidth")),P=P,o===je||(o===Te||o===Le)&&s===yn){E=Ve;var j=h&&P===g&&g.visualViewport?g.visualViewport.height:P[V];f-=j-r.height,f*=c?1:-1}if(o===Te||(o===je||o===Ve)&&s===yn){C=Le;var R=h&&P===g&&g.visualViewport?g.visualViewport.width:P[U];b-=R-r.width,b*=c?1:-1}}var k=Object.assign({position:l},d&&ow),D=u===!0?sw({x:b,y:f},$e(n)):{x:b,y:f};if(b=D.x,f=D.y,c){var $;return Object.assign({},k,($={},$[E]=I?"0":"",$[C]=N?"0":"",$.transform=(g.devicePixelRatio||1)<=1?"translate("+b+"px, "+f+"px)":"translate3d("+b+"px, "+f+"px, 0)",$))}return Object.assign({},k,(t={},t[E]=I?f+"px":"",t[C]=N?b+"px":"",t.transform="",t))}function aw(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:He(t.placement),variation:Ut(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,As(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,As(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const iw={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:aw,data:{}};var Ln={passive:!0};function lw(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,l=i===void 0?!0:i,c=$e(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&d.forEach(function(u){u.addEventListener("scroll",n.update,Ln)}),l&&c.addEventListener("resize",n.update,Ln),function(){s&&d.forEach(function(u){u.removeEventListener("scroll",n.update,Ln)}),l&&c.removeEventListener("resize",n.update,Ln)}}const cw={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:lw,data:{}};var dw={left:"right",right:"left",bottom:"top",top:"bottom"};function qn(e){return e.replace(/left|right|bottom|top/g,function(t){return dw[t]})}var uw={start:"end",end:"start"};function Bs(e){return e.replace(/start|end/g,function(t){return uw[t]})}function Do(e){var t=$e(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ao(e){return Gt(it(e)).left+Do(e).scrollLeft}function pw(e,t){var n=$e(e),r=it(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;var d=si();(d||!d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+Ao(e),y:c}}function ww(e){var t,n=it(e),r=Do(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=ht(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=ht(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Ao(e),c=-r.scrollTop;return tt(o||n).direction==="rtl"&&(l+=ht(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function Bo(e){var t=tt(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function di(e){return["html","body","#document"].indexOf(We(e))>=0?e.ownerDocument.body:Be(e)&&Bo(e)?e:di(hr(e))}function mn(e,t){var n;t===void 0&&(t=[]);var r=di(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=$e(r),i=o?[s].concat(s.visualViewport||[],Bo(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(mn(hr(i)))}function Xr(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fw(e,t){var n=Gt(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Vs(e,t,n){return t===ri?Xr(pw(e,n)):kt(t)?fw(t,n):Xr(ww(it(e)))}function mw(e){var t=mn(hr(e)),n=["absolute","fixed"].indexOf(tt(e).position)>=0,r=n&&Be(e)?In(e):e;return kt(r)?t.filter(function(o){return kt(o)&&ai(o,r)&&We(o)!=="body"}):[]}function hw(e,t,n,r){var o=t==="clippingParents"?mw(e):[].concat(t),s=[].concat(o,[n]),i=s[0],l=s.reduce(function(c,d){var u=Vs(e,d,r);return c.top=ht(u.top,c.top),c.right=Jn(u.right,c.right),c.bottom=Jn(u.bottom,c.bottom),c.left=ht(u.left,c.left),c},Vs(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function ui(e){var t=e.reference,n=e.element,r=e.placement,o=r?He(r):null,s=r?Ut(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case je:c={x:i,y:t.y-n.height};break;case Ve:c={x:i,y:t.y+t.height};break;case Le:c={x:t.x+t.width,y:l};break;case Te:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=o?Mo(o):null;if(d!=null){var u=d==="y"?"height":"width";switch(s){case Ft:c[d]=c[d]-(t[u]/2-n[u]/2);break;case yn:c[d]=c[d]+(t[u]/2-n[u]/2);break}}return c}function xn(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,l=n.boundary,c=l===void 0?Dp:l,d=n.rootBoundary,u=d===void 0?ri:d,h=n.elementContext,w=h===void 0?rn:h,b=n.altBoundary,v=b===void 0?!1:b,f=n.padding,m=f===void 0?0:f,N=li(typeof m!="number"?m:ci(m,_n)),I=w===rn?Ap:rn,C=e.rects.popper,E=e.elements[v?I:w],g=hw(kt(E)?E:E.contextElement||it(e.elements.popper),c,u,i),P=Gt(e.elements.reference),V=ui({reference:P,element:C,strategy:"absolute",placement:o}),U=Xr(Object.assign({},C,V)),j=w===rn?U:P,R={top:g.top-j.top+N.top,bottom:j.bottom-g.bottom+N.bottom,left:g.left-j.left+N.left,right:j.right-g.right+N.right},k=e.modifiersData.offset;if(w===rn&&k){var D=k[o];Object.keys(R).forEach(function($){var Z=[Le,Ve].indexOf($)>=0?1:-1,Y=[je,Ve].indexOf($)>=0?"y":"x";R[$]+=D[Y]*Z})}return R}function gw(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?oi:c,u=Ut(r),h=u?l?Ms:Ms.filter(function(v){return Ut(v)===u}):_n,w=h.filter(function(v){return d.indexOf(v)>=0});w.length===0&&(w=h);var b=w.reduce(function(v,f){return v[f]=xn(e,{placement:f,boundary:o,rootBoundary:s,padding:i})[He(f)],v},{});return Object.keys(b).sort(function(v,f){return b[v]-b[f]})}function bw(e){if(He(e)===_o)return[];var t=qn(e);return[Bs(e),t,Bs(t)]}function vw(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,d=n.padding,u=n.boundary,h=n.rootBoundary,w=n.altBoundary,b=n.flipVariations,v=b===void 0?!0:b,f=n.allowedAutoPlacements,m=t.options.placement,N=He(m),I=N===m,C=c||(I||!v?[qn(m)]:bw(m)),E=[m].concat(C).reduce(function(B,X){return B.concat(He(X)===_o?gw(t,{placement:X,boundary:u,rootBoundary:h,padding:d,flipVariations:v,allowedAutoPlacements:f}):X)},[]),g=t.rects.reference,P=t.rects.popper,V=new Map,U=!0,j=E[0],R=0;R=0,Y=Z?"width":"height",z=xn(t,{placement:k,boundary:u,rootBoundary:h,altBoundary:w,padding:d}),te=Z?$?Le:Te:$?Ve:je;g[Y]>P[Y]&&(te=qn(te));var ae=qn(te),oe=[];if(s&&oe.push(z[D]<=0),l&&oe.push(z[te]<=0,z[ae]<=0),oe.every(function(B){return B})){j=k,U=!1;break}V.set(k,oe)}if(U)for(var x=v?3:1,T=function(X){var q=E.find(function(H){var G=V.get(H);if(G)return G.slice(0,X).every(function(K){return K})});if(q)return j=q,"break"},L=x;L>0;L--){var F=T(L);if(F==="break")break}t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}}const yw={name:"flip",enabled:!0,phase:"main",fn:vw,requiresIfExists:["offset"],data:{_skip:!1}};function Ls(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Fs(e){return[je,Le,Ve,Te].some(function(t){return e[t]>=0})}function xw(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=xn(t,{elementContext:"reference"}),l=xn(t,{altBoundary:!0}),c=Ls(i,r),d=Ls(l,o,s),u=Fs(c),h=Fs(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}const Nw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xw};function kw(e,t,n){var r=He(e),o=[Te,je].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],l=s[1];return i=i||0,l=(l||0)*o,[Te,Le].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function Ew(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=oi.reduce(function(u,h){return u[h]=kw(h,t.rects,s),u},{}),l=i[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=i}const Sw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ew};function jw(e){var t=e.state,n=e.name;t.modifiersData[n]=ui({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Tw={name:"popperOffsets",enabled:!0,phase:"read",fn:jw,data:{}};function Cw(e){return e==="x"?"y":"x"}function Ow(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,d=n.rootBoundary,u=n.altBoundary,h=n.padding,w=n.tether,b=w===void 0?!0:w,v=n.tetherOffset,f=v===void 0?0:v,m=xn(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:u}),N=He(t.placement),I=Ut(t.placement),C=!I,E=Mo(N),g=Cw(E),P=t.modifiersData.popperOffsets,V=t.rects.reference,U=t.rects.popper,j=typeof f=="function"?f(Object.assign({},t.rects,{placement:t.placement})):f,R=typeof j=="number"?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(P){if(s){var $,Z=E==="y"?je:Te,Y=E==="y"?Ve:Le,z=E==="y"?"height":"width",te=P[E],ae=te+m[Z],oe=te-m[Y],x=b?-U[z]/2:0,T=I===Ft?V[z]:U[z],L=I===Ft?-U[z]:-V[z],F=t.elements.arrow,B=b&&F?$o(F):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ii(),q=X[Z],H=X[Y],G=fn(0,V[z],B[z]),K=C?V[z]/2-x-G-q-R.mainAxis:T-G-q-R.mainAxis,Q=C?-V[z]/2+x+G+H+R.mainAxis:L+G+H+R.mainAxis,ue=t.elements.arrow&&In(t.elements.arrow),_=ue?E==="y"?ue.clientTop||0:ue.clientLeft||0:0,ye=($=k==null?void 0:k[E])!=null?$:0,A=te+K-ye-_,ve=te+Q-ye,ze=fn(b?Jn(ae,A):ae,te,b?ht(oe,ve):oe);P[E]=ze,D[E]=ze-te}if(l){var lt,Ee=E==="x"?je:Te,$n=E==="x"?Ve:Le,Ge=P[g],Et=g==="y"?"height":"width",ct=Ge+m[Ee],St=Ge-m[$n],jt=[je,Te].indexOf(N)!==-1,Tt=(lt=k==null?void 0:k[g])!=null?lt:0,dt=jt?ct:Ge-V[Et]-U[Et]-Tt+R.altAxis,Wt=jt?Ge+V[Et]+U[Et]-Tt-R.altAxis:St,Mn=b&&jt?Qp(dt,Ge,Wt):fn(b?dt:ct,Ge,b?Wt:St);P[g]=Mn,D[g]=Mn-Ge}t.modifiersData[r]=D}}const Rw={name:"preventOverflow",enabled:!0,phase:"main",fn:Ow,requiresIfExists:["offset"]};function Pw(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function _w(e){return e===$e(e)||!Be(e)?Do(e):Pw(e)}function Iw(e){var t=e.getBoundingClientRect(),n=zt(t.width)/e.offsetWidth||1,r=zt(t.height)/e.offsetHeight||1;return n!==1||r!==1}function $w(e,t,n){n===void 0&&(n=!1);var r=Be(t),o=Be(t)&&Iw(t),s=it(t),i=Gt(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((We(t)!=="body"||Bo(s))&&(l=_w(t)),Be(t)?(c=Gt(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=Ao(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function Mw(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&o(c)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function Dw(e){var t=Mw(e);return Xp.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function Aw(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Bw(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var zs={placement:"bottom",modifiers:[],strategy:"absolute"};function Gs(){for(var e=arguments.length,t=new Array(e),n=0;nxo({root:["root"]},jp(zw)),Yw={},Ww=M.forwardRef(function(t,n){var r;const{anchorEl:o,children:s,direction:i,disablePortal:l,modifiers:c,open:d,placement:u,popperOptions:h,popperRef:w,slotProps:b={},slots:v={},TransitionProps:f}=t,m=xe(t,Gw),N=M.useRef(null),I=xt(N,n),C=M.useRef(null),E=xt(C,w),g=M.useRef(E);Lt(()=>{g.current=E},[E]),M.useImperativeHandle(w,()=>C.current,[]);const P=qw(u,i),[V,U]=M.useState(P),[j,R]=M.useState(Zn(o));M.useEffect(()=>{C.current&&C.current.forceUpdate()}),M.useEffect(()=>{o&&R(Zn(o))},[o]),Lt(()=>{if(!j||!d)return;const Y=ae=>{U(ae.placement)};if(process.env.NODE_ENV!=="production"&&j&&gr(j)&&j.nodeType===1){const ae=j.getBoundingClientRect();process.env.NODE_ENV!=="test"&&ae.top===0&&ae.left===0&&ae.right===0&&ae.bottom===0&&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(` -`))}let z=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:ae})=>{Y(ae)}}];c!=null&&(z=z.concat(c)),h&&h.modifiers!=null&&(z=z.concat(h.modifiers));const te=Fw(j,N.current,O({placement:P},h,{modifiers:z}));return g.current(te),()=>{te.destroy(),g.current(null)}},[j,l,c,d,h,P]);const k={placement:V};f!==null&&(k.TransitionProps=f);const D=Xw(),$=(r=v.root)!=null?r:"div",Z=Pp({elementType:$,externalSlotProps:b.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:I},ownerState:t,className:D.root});return a.jsx($,O({},Z,{children:typeof s=="function"?s(k):s}))}),wi=M.forwardRef(function(t,n){const{anchorEl:r,children:o,container:s,direction:i="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:d,open:u,placement:h="bottom",popperOptions:w=Yw,popperRef:b,style:v,transition:f=!1,slotProps:m={},slots:N={}}=t,I=xe(t,Uw),[C,E]=M.useState(!0),g=()=>{E(!1)},P=()=>{E(!0)};if(!c&&!u&&(!f||C))return null;let V;if(s)V=s;else if(r){const R=Zn(r);V=R&&gr(R)?Xn(R).body:Xn(null).body}const U=!u&&c&&(!f||C)?"none":void 0,j=f?{in:u,onEnter:g,onExited:P}:void 0;return a.jsx(Kn,{disablePortal:l,container:V,children:a.jsx(Ww,O({anchorEl:r,direction:i,disablePortal:l,modifiers:d,ref:n,open:f?!C:u,placement:h,popperOptions:w,popperRef:b,slotProps:m,slots:N},I,{style:O({position:"fixed",top:0,left:0,display:U},v),TransitionProps:j,children:o}))})});process.env.NODE_ENV!=="production"&&(wi.propTypes={anchorEl:vo(p.oneOfType([bn,p.object,p.func]),e=>{if(e.open){const t=Zn(e.anchorEl);if(t&&gr(t)&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)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(` -`))}else if(!t||typeof t.getBoundingClientRect!="function"||Hw(t)&&t.contextElement!=null&&t.contextElement.nodeType!==1)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(` -`))}return null}),children:p.oneOfType([p.node,p.func]),container:p.oneOfType([bn,p.func]),direction:p.oneOf(["ltr","rtl"]),disablePortal:p.bool,keepMounted:p.bool,modifiers:p.arrayOf(p.shape({data:p.object,effect:p.func,enabled:p.bool,fn:p.func,name:p.any,options:p.object,phase:p.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:p.arrayOf(p.string),requiresIfExists:p.arrayOf(p.string)})),open:p.bool.isRequired,placement:p.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"]),popperOptions:p.shape({modifiers:p.array,onFirstUpdate:p.func,placement:p.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"]),strategy:p.oneOf(["absolute","fixed"])}),popperRef:Va,slotProps:p.shape({root:p.oneOfType([p.func,p.object])}),slots:p.shape({root:p.elementType}),transition:p.bool});function fi(){const e=Ja(Co);return process.env.NODE_ENV!=="production"&&M.useDebugValue(e),e[Oo]||e}function Yr(e,t){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Yr(e,t)}function Kw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yr(e,t)}const Us={disabled:!1};var Jw=process.env.NODE_ENV!=="production"?p.oneOfType([p.number,p.shape({enter:p.number,exit:p.number,appear:p.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&p.oneOfType([p.string,p.shape({enter:p.string,exit:p.string,active:p.string}),p.shape({enter:p.string,enterDone:p.string,enterActive:p.string,exit:p.string,exitDone:p.string,exitActive:p.string})]);const mi=y.createContext(null);var Zw=function(t){return t.scrollTop},dn="unmounted",wt="exited",ft="entering",$t="entered",Wr="exiting",nt=function(e){Kw(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=wt,s.appearStatus=ft):c=$t:r.unmountOnExit||r.mountOnEnter?c=dn:c=wt,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===dn?{status:wt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==ft&&i!==$t&&(s=ft):(i===ft||i===$t)&&(s=Wr)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,l;return s=i=l=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===ft){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:sn.findDOMNode(this);i&&Zw(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===wt&&this.setState({status:dn})},n.performEnter=function(o){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[sn.findDOMNode(this),l],d=c[0],u=c[1],h=this.getTimeouts(),w=l?h.appear:h.enter;if(!o&&!i||Us.disabled){this.safeSetState({status:$t},function(){s.props.onEntered(d)});return}this.props.onEnter(d,u),this.safeSetState({status:ft},function(){s.props.onEntering(d,u),s.onTransitionEnd(w,function(){s.safeSetState({status:$t},function(){s.props.onEntered(d,u)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:sn.findDOMNode(this);if(!s||Us.disabled){this.safeSetState({status:wt},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Wr},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:wt},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:sn.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],d=c[0],u=c[1];this.props.addEndListener(d,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===dn)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=xe(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return y.createElement(mi.Provider,{value:null},typeof i=="function"?i(o,l):y.cloneElement(y.Children.only(i),l))},t}(y.Component);nt.contextType=mi;nt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:p.shape({current:typeof Element>"u"?p.any:function(e,t,n,r,o,s){var i=e[t];return p.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,s)}}),children:p.oneOfType([p.func.isRequired,p.element.isRequired]).isRequired,in:p.bool,mountOnEnter:p.bool,unmountOnExit:p.bool,appear:p.bool,enter:p.bool,exit:p.bool,timeout:function(t){var n=Jw;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;se.scrollTop;function qs(e,t){var n,r;const{timeout:o,easing:s,style:i={}}=e;return{duration:(n=i.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=i.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:i.transitionDelay}}const tf=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Kr(e){return`scale(${e}, ${e**2})`}const nf={entering:{opacity:1,transform:Kr(1)},entered:{opacity:1,transform:"none"}},Mr=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Vo=M.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:s,easing:i,in:l,onEnter:c,onEntered:d,onEntering:u,onExit:h,onExited:w,onExiting:b,style:v,timeout:f="auto",TransitionComponent:m=Qw}=t,N=xe(t,tf),I=ln(),C=M.useRef(),E=fi(),g=M.useRef(null),P=xt(g,s.ref,n),V=Y=>z=>{if(Y){const te=g.current;z===void 0?Y(te):Y(te,z)}},U=V(u),j=V((Y,z)=>{ef(Y);const{duration:te,delay:ae,easing:oe}=qs({style:v,timeout:f,easing:i},{mode:"enter"});let x;f==="auto"?(x=E.transitions.getAutoHeightDuration(Y.clientHeight),C.current=x):x=te,Y.style.transition=[E.transitions.create("opacity",{duration:x,delay:ae}),E.transitions.create("transform",{duration:Mr?x:x*.666,delay:ae,easing:oe})].join(","),c&&c(Y,z)}),R=V(d),k=V(b),D=V(Y=>{const{duration:z,delay:te,easing:ae}=qs({style:v,timeout:f,easing:i},{mode:"exit"});let oe;f==="auto"?(oe=E.transitions.getAutoHeightDuration(Y.clientHeight),C.current=oe):oe=z,Y.style.transition=[E.transitions.create("opacity",{duration:oe,delay:te}),E.transitions.create("transform",{duration:Mr?oe:oe*.666,delay:Mr?te:te||oe*.333,easing:ae})].join(","),Y.style.opacity=0,Y.style.transform=Kr(.75),h&&h(Y)}),$=V(w),Z=Y=>{f==="auto"&&I.start(C.current||0,Y),r&&r(g.current,Y)};return a.jsx(m,O({appear:o,in:l,nodeRef:g,onEnter:j,onEntered:R,onEntering:U,onExit:D,onExited:$,onExiting:k,addEndListener:Z,timeout:f==="auto"?null:f},N,{children:(Y,z)=>M.cloneElement(s,O({style:O({opacity:0,transform:Kr(.75),visibility:Y==="exited"&&!l?"hidden":void 0},nf[Y],v,s.props.style),ref:P},z))}))});process.env.NODE_ENV!=="production"&&(Vo.propTypes={addEndListener:p.func,appear:p.bool,children:Aa.isRequired,easing:p.oneOfType([p.shape({enter:p.string,exit:p.string}),p.string]),in:p.bool,onEnter:p.func,onEntered:p.func,onEntering:p.func,onExit:p.func,onExited:p.func,onExiting:p.func,style:p.object,timeout:p.oneOfType([p.oneOf(["auto"]),p.number,p.shape({appear:p.number,enter:p.number,exit:p.number})])});Vo.muiSupportAuto=!0;const Hs=Vo,rf=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],of=Pn(wi,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),hi=M.forwardRef(function(t,n){var r;const o=Ka(),s=Ro({props:t,name:"MuiPopper"}),{anchorEl:i,component:l,components:c,componentsProps:d,container:u,disablePortal:h,keepMounted:w,modifiers:b,open:v,placement:f,popperOptions:m,popperRef:N,transition:I,slots:C,slotProps:E}=s,g=xe(s,rf),P=(r=C==null?void 0:C.root)!=null?r:c==null?void 0:c.Root,V=O({anchorEl:i,container:u,disablePortal:h,keepMounted:w,modifiers:b,open:v,placement:f,popperOptions:m,popperRef:N,transition:I},g);return a.jsx(of,O({as:l,direction:o==null?void 0:o.direction,slots:{root:P},slotProps:E??d},V,{ref:n}))});process.env.NODE_ENV!=="production"&&(hi.propTypes={anchorEl:p.oneOfType([bn,p.object,p.func]),children:p.oneOfType([p.node,p.func]),component:p.elementType,components:p.shape({Root:p.elementType}),componentsProps:p.shape({root:p.oneOfType([p.func,p.object])}),container:p.oneOfType([bn,p.func]),disablePortal:p.bool,keepMounted:p.bool,modifiers:p.arrayOf(p.shape({data:p.object,effect:p.func,enabled:p.bool,fn:p.func,name:p.any,options:p.object,phase:p.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:p.arrayOf(p.string),requiresIfExists:p.arrayOf(p.string)})),open:p.bool.isRequired,placement:p.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"]),popperOptions:p.shape({modifiers:p.array,onFirstUpdate:p.func,placement:p.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"]),strategy:p.oneOf(["absolute","fixed"])}),popperRef:Va,slotProps:p.shape({root:p.oneOfType([p.func,p.object])}),slots:p.shape({root:p.elementType}),sx:p.oneOfType([p.arrayOf(p.oneOfType([p.func,p.object,p.bool])),p.func,p.object]),transition:p.bool});const gi=hi;function sf(e){return ar("MuiTooltip",e)}const af=Ha("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),st=af,lf=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function cf(e){return Math.round(e*1e5)/1e5}const df=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:s}=e,i={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ye(s.split("-")[0])}`],arrow:["arrow"]};return xo(i,sf,t)},uf=Pn(gi,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>O({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${st.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${st.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${st.arrow}`]:O({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${st.arrow}`]:O({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),pf=Pn("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ye(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>O({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Za(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${cf(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${st.popper}[data-popper-placement*="left"] &`]:O({transformOrigin:"right center"},t.isRtl?O({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):O({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${st.popper}[data-popper-placement*="right"] &`]:O({transformOrigin:"left center"},t.isRtl?O({marginRight:"14px"},t.touch&&{marginRight:"24px"}):O({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${st.popper}[data-popper-placement*="top"] &`]:O({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${st.popper}[data-popper-placement*="bottom"] &`]:O({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),wf=Pn("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Za(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Fn=!1;const Xs=new Cn;let on={x:0,y:0};function zn(e,t){return n=>{t&&t(n),e(n)}}const bi=M.forwardRef(function(t,n){var r,o,s,i,l,c,d,u,h,w,b,v,f,m,N,I,C,E,g;const P=Ro({props:t,name:"MuiTooltip"}),{arrow:V=!1,children:U,components:j={},componentsProps:R={},describeChild:k=!1,disableFocusListener:D=!1,disableHoverListener:$=!1,disableInteractive:Z=!1,disableTouchListener:Y=!1,enterDelay:z=100,enterNextDelay:te=0,enterTouchDelay:ae=700,followCursor:oe=!1,id:x,leaveDelay:T=0,leaveTouchDelay:L=1500,onClose:F,onOpen:B,open:X,placement:q="bottom",PopperComponent:H,PopperProps:G={},slotProps:K={},slots:Q={},title:ue,TransitionComponent:_=Hs,TransitionProps:ye}=P,A=xe(P,lf),ve=M.isValidElement(U)?U:a.jsx("span",{children:U}),ze=fi(),lt=ze.direction==="rtl",[Ee,$n]=M.useState(),[Ge,Et]=M.useState(null),ct=M.useRef(!1),St=Z||oe,jt=ln(),Tt=ln(),dt=ln(),Wt=ln(),[Mn,Fo]=Fa({controlled:X,default:!1,name:"Tooltip",state:"open"});let Ke=Mn;if(process.env.NODE_ENV!=="production"){const{current:ee}=M.useRef(X!==void 0);M.useEffect(()=>{Ee&&Ee.disabled&&!ee&&ue!==""&&Ee.tagName.toLowerCase()==="button"&&console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(` -`))},[ue,Ee,ee])}const br=La(x),Kt=M.useRef(),Dn=Ur(()=>{Kt.current!==void 0&&(document.body.style.WebkitUserSelect=Kt.current,Kt.current=void 0),Wt.clear()});M.useEffect(()=>Dn,[Dn]);const zo=ee=>{Xs.clear(),Fn=!0,Fo(!0),B&&!Ke&&B(ee)},An=Ur(ee=>{Xs.start(800+T,()=>{Fn=!1}),Fo(!1),F&&Ke&&F(ee),jt.start(ze.transitions.duration.shortest,()=>{ct.current=!1})}),vr=ee=>{ct.current&&ee.type!=="touchstart"||(Ee&&Ee.removeAttribute("title"),Tt.clear(),dt.clear(),z||Fn&&te?Tt.start(Fn?te:z,()=>{zo(ee)}):zo(ee))},Go=ee=>{Tt.clear(),dt.start(T,()=>{An(ee)})},{isFocusVisibleRef:Uo,onBlur:Fi,onFocus:zi,ref:Gi}=za(),[,qo]=M.useState(!1),Ho=ee=>{Fi(ee),Uo.current===!1&&(qo(!1),Go(ee))},Xo=ee=>{Ee||$n(ee.currentTarget),zi(ee),Uo.current===!0&&(qo(!0),vr(ee))},Yo=ee=>{ct.current=!0;const Re=ve.props;Re.onTouchStart&&Re.onTouchStart(ee)},Wo=vr,Ko=Go,Ui=ee=>{Yo(ee),dt.clear(),jt.clear(),Dn(),Kt.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Wt.start(ae,()=>{document.body.style.WebkitUserSelect=Kt.current,vr(ee)})},qi=ee=>{ve.props.onTouchEnd&&ve.props.onTouchEnd(ee),Dn(),dt.start(L,()=>{An(ee)})};M.useEffect(()=>{if(!Ke)return;function ee(Re){(Re.key==="Escape"||Re.key==="Esc")&&An(Re)}return document.addEventListener("keydown",ee),()=>{document.removeEventListener("keydown",ee)}},[An,Ke]);const Hi=xt(ve.ref,Gi,$n,n);!ue&&ue!==0&&(Ke=!1);const yr=M.useRef(),Xi=ee=>{const Re=ve.props;Re.onMouseMove&&Re.onMouseMove(ee),on={x:ee.clientX,y:ee.clientY},yr.current&&yr.current.update()},Jt={},xr=typeof ue=="string";k?(Jt.title=!Ke&&xr&&!$?ue:null,Jt["aria-describedby"]=Ke?br:null):(Jt["aria-label"]=xr?ue:null,Jt["aria-labelledby"]=Ke&&!xr?br:null);const Me=O({},Jt,A,ve.props,{className:ot(A.className,ve.props.className),onTouchStart:Yo,ref:Hi},oe?{onMouseMove:Xi}:{});process.env.NODE_ENV!=="production"&&(Me["data-mui-internal-clone-element"]=!0,M.useEffect(()=>{Ee&&!Ee.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(` -`))},[Ee]));const Zt={};Y||(Me.onTouchStart=Ui,Me.onTouchEnd=qi),$||(Me.onMouseOver=zn(Wo,Me.onMouseOver),Me.onMouseLeave=zn(Ko,Me.onMouseLeave),St||(Zt.onMouseOver=Wo,Zt.onMouseLeave=Ko)),D||(Me.onFocus=zn(Xo,Me.onFocus),Me.onBlur=zn(Ho,Me.onBlur),St||(Zt.onFocus=Xo,Zt.onBlur=Ho)),process.env.NODE_ENV!=="production"&&ve.props.title&&console.error(["MUI: You have provided a `title` prop to the child of .",`Remove this title prop \`${ve.props.title}\` or the Tooltip component.`].join(` -`));const Yi=M.useMemo(()=>{var ee;let Re=[{name:"arrow",enabled:!!Ge,options:{element:Ge,padding:4}}];return(ee=G.popperOptions)!=null&&ee.modifiers&&(Re=Re.concat(G.popperOptions.modifiers)),O({},G.popperOptions,{modifiers:Re})},[Ge,G]),Qt=O({},P,{isRtl:lt,arrow:V,disableInteractive:St,placement:q,PopperComponentProp:H,touch:ct.current}),Nr=df(Qt),Jo=(r=(o=Q.popper)!=null?o:j.Popper)!=null?r:uf,Zo=(s=(i=(l=Q.transition)!=null?l:j.Transition)!=null?i:_)!=null?s:Hs,Qo=(c=(d=Q.tooltip)!=null?d:j.Tooltip)!=null?c:pf,es=(u=(h=Q.arrow)!=null?h:j.Arrow)!=null?u:wf,Wi=cn(Jo,O({},G,(w=K.popper)!=null?w:R.popper,{className:ot(Nr.popper,G==null?void 0:G.className,(b=(v=K.popper)!=null?v:R.popper)==null?void 0:b.className)}),Qt),Ki=cn(Zo,O({},ye,(f=K.transition)!=null?f:R.transition),Qt),Ji=cn(Qo,O({},(m=K.tooltip)!=null?m:R.tooltip,{className:ot(Nr.tooltip,(N=(I=K.tooltip)!=null?I:R.tooltip)==null?void 0:N.className)}),Qt),Zi=cn(es,O({},(C=K.arrow)!=null?C:R.arrow,{className:ot(Nr.arrow,(E=(g=K.arrow)!=null?g:R.arrow)==null?void 0:E.className)}),Qt);return a.jsxs(M.Fragment,{children:[M.cloneElement(ve,Me),a.jsx(Jo,O({as:H??gi,placement:q,anchorEl:oe?{getBoundingClientRect:()=>({top:on.y,left:on.x,right:on.x,bottom:on.y,width:0,height:0})}:Ee,popperRef:yr,open:Ee?Ke:!1,id:br,transition:!0},Zt,Wi,{popperOptions:Yi,children:({TransitionProps:ee})=>a.jsx(Zo,O({timeout:ze.transitions.duration.shorter},ee,Ki,{children:a.jsxs(Qo,O({},Ji,{children:[ue,V?a.jsx(es,O({},Zi,{ref:Et})):null]}))}))}))]})});process.env.NODE_ENV!=="production"&&(bi.propTypes={arrow:p.bool,children:Aa.isRequired,classes:p.object,className:p.string,components:p.shape({Arrow:p.elementType,Popper:p.elementType,Tooltip:p.elementType,Transition:p.elementType}),componentsProps:p.shape({arrow:p.object,popper:p.object,tooltip:p.object,transition:p.object}),describeChild:p.bool,disableFocusListener:p.bool,disableHoverListener:p.bool,disableInteractive:p.bool,disableTouchListener:p.bool,enterDelay:p.number,enterNextDelay:p.number,enterTouchDelay:p.number,followCursor:p.bool,id:p.string,leaveDelay:p.number,leaveTouchDelay:p.number,onClose:p.func,onOpen:p.func,open:p.bool,placement:p.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:p.elementType,PopperProps:p.object,slotProps:p.shape({arrow:p.object,popper:p.object,tooltip:p.object,transition:p.object}),slots:p.shape({arrow:p.elementType,popper:p.elementType,tooltip:p.elementType,transition:p.elementType}),sx:p.oneOfType([p.arrayOf(p.oneOfType([p.func,p.object,p.bool])),p.func,p.object]),title:p.node,TransitionComponent:p.elementType,TransitionProps:p.object});const ff=bi;function Ys(e,t,n){return e?a.jsx(Ie.ListItemIcon,{className:`papi-menu-icon-${n?"leading":"trailing"}`,children:a.jsx("img",{src:e,alt:`${n?"Leading":"Trailing"} icon for ${t}`})}):void 0}function Lo(e){const{onClick:t,label:n,tooltip:r,allowForLeadingIcons:o=!0,iconPathBefore:s=void 0,iconPathAfter:i=void 0,hasAutoFocus:l=!1,className:c,isDisabled:d=!1,isDense:u=!0,isSubMenuParent:h=!1,hasDisabledGutters:w=!1,hasDivider:b=!1,focusVisibleClassName:v,id:f,children:m}=e,N=a.jsx(Ie.MenuItem,{sx:{lineHeight:.8},autoFocus:l,className:c,disabled:d,dense:u,disableGutters:w,divider:b,focusVisibleClassName:v,onClick:t,id:f,children:n?a.jsxs(a.Fragment,{children:[Ys(s,n,!0),a.jsx(Ie.ListItemText,{primary:n,inset:!s&&o}),h?a.jsx(Ie.ListItemIcon,{className:"papi-menu-icon-trailing",children:a.jsx(ei,{})}):Ys(i,n,!1)]}):m});return r?a.jsx(ff,{title:r,placement:"right",children:a.jsx("div",{children:N})}):N}function vi(e){return Object.entries(e.groups).map(([n,r])=>({id:n,group:r}))}function mf(e){const[t,n]=y.useState(void 0),{parentMenuItem:r,parentItemProps:o,menuDefinition:s}=e,i=d=>{n(d.currentTarget)},l=()=>{n(void 0)},c=()=>{let d=vi(s).filter(u=>"menuItem"in u.group);if(!(r!=null&&r.id))throw new Error("A valid parent menu item is required for submenus.");return d=d.filter(u=>"menuItem"in u.group&&u.group.menuItem===r.id),a.jsx(yi,{...e,includedGroups:d})};return a.jsxs(a.Fragment,{children:[a.jsx(Lo,{onClick:i,...o,isSubMenuParent:!0}),a.jsx(Ie.Menu,{anchorEl:t,open:!!t,onClose:l,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:c()},r.id)]})}const hf=(e,t)=>t.filter(o=>o.group===e).sort((o,s)=>(o.order||0)-(s.order||0));function yi(e){const{menuDefinition:t,onClick:n,commandHandler:r,includedGroups:o}=e,{items:s,allowForLeadingIcons:i}=y.useMemo(()=>{const u=o&&o.length>0?o:vi(t).filter(v=>!("menuItem"in v.group)),h=Object.values(u).sort((v,f)=>(v.group.order||0)-(f.group.order||0)),w=[];h.forEach(v=>{hf(v.id,t.items).forEach(f=>w.push({item:f,isLastItemInGroup:!1})),w.length>0&&(w[w.length-1].isLastItemInGroup=!0)}),w.length>0&&(w[w.length-1].isLastItemInGroup=!1);const b=w.some(v=>"iconPathBefore"in v.item&&v.item.iconPathBefore);return{items:w,allowForLeadingIcons:b}},[o,t]),l=({item:u,isLastItemInGroup:h})=>({className:"papi-menu-item",label:u.label,tooltip:u.tooltip,iconPathBefore:"iconPathBefore"in u?u.iconPathBefore:void 0,iconPathAfter:"iconPathAfter"in u?u.iconPathAfter:void 0,hasDivider:h,allowForLeadingIcons:i}),[c]=s;if(!c)return a.jsx("div",{});const d=c.item.group;return a.jsx("div",{role:"menu","aria-label":d,children:s.map((u,h)=>{const{item:w}=u,b=l(u);if("command"in w){const v=w.group+h;return a.jsx(Lo,{onClick:f=>{n==null||n(f),r(w)},...b},v)}return a.jsx(mf,{parentMenuItem:w,parentItemProps:b,...e},d+w.id)})},d)}function gf(e){const{menuDefinition:t,columnId:n}=e;let s=Object.entries(t.groups).map(([i,l])=>({id:i,group:l})).filter(i=>"column"in i.group);return n&&"columns"in t&&t.columns[n]&&(s=s.filter(i=>"column"in i.group&&i.group.column===n)),a.jsx(yi,{...e,includedGroups:s})}function bf({commandHandler:e,menuDefinition:t,id:n,metadata:r,onClick:o,className:s}){return a.jsxs(Ie.Grid,{id:n,item:!0,xs:"auto",role:"menu","aria-label":n,className:`papi-menu-column ${s??""}`,children:[a.jsx("h3",{"aria-label":r.label,className:`papi-menu-column-header ${s??""}`,children:r.label}),a.jsx(Ie.List,{id:n,dense:!0,className:s??"",children:a.jsx(gf,{commandHandler:e,menuDefinition:t,columnId:n,onClick:o})})]})}function xi({commandHandler:e,className:t,multiColumnMenu:n,id:r}){const{columns:o}=n,s=y.useMemo(()=>{const i=new Map;return Object.getOwnPropertyNames(o).forEach(l=>{if(l==="isExtensible")return;const c=l,d=o[c];typeof d=="object"&&typeof d.order=="number"&&!Number.isNaN(d.order)?i.set(d.order,{id:c,metadata:d}):console.warn(`Property ${l} (${typeof d}) on menu ${r} is not a valid column and is being ignored. This might indicate data corruption`)}),Array.from(i.values()).sort((l,c)=>(l.metadata.order||0)-(c.metadata.order||0))},[o,r]);return a.jsx(Ie.Grid,{container:!0,spacing:0,className:`papi-multi-column-menu ${t??""}`,columns:s.length,role:"menu","aria-label":"GridMenu",id:r,children:s.map((i,l)=>a.jsx(bf,{commandHandler:e,menuDefinition:n,...i,className:t},l))})}function vf(e){return{preserveValue:!0,...e}}const Qn=(e,t,n={})=>{const r=y.useRef(t);r.current=t;const o=y.useRef(n);o.current=vf(o.current);const[s,i]=y.useState(()=>r.current),[l,c]=y.useState(!0);return y.useEffect(()=>{let d=!0;return c(!!e),(async()=>{if(e){const u=await e();d&&(i(()=>u),c(!1))}})(),()=>{d=!1,o.current.preserveValue||i(()=>r.current)}},[e]),[s,l]},yf=Qa(a.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function Ni({menuProvider:e,normalMenu:t,fullMenu:n,commandHandler:r,containerRef:o,className:s,ariaLabelPrefix:i,children:l}){const[c,d]=y.useState(!1),[u,h]=y.useState(!1),w=y.useCallback(()=>{c&&d(!1),h(!1)},[c]),b=y.useCallback(E=>{E.stopPropagation(),d(g=>{const P=!g;return P&&E.shiftKey?h(!0):P||h(!1),P})},[]),v=y.useCallback(E=>(w(),r(E)),[r,w]),[f,m]=y.useState({top:1,left:1});y.useEffect(()=>{if(c){const E=o==null?void 0:o.current;if(E){const g=E.getBoundingClientRect(),P=window.scrollY,V=window.scrollX,U=g.top+P+E.clientHeight,j=g.left+V;m({top:U,left:j})}}},[c,o]);const[N]=Qn(y.useCallback(async()=>(e==null?void 0:e(!1))??t,[e,t,c]),t),[I]=Qn(y.useCallback(async()=>(e==null?void 0:e(!0))??n??N,[e,n,N,c]),n??N),C=u&&I?I:N;return a.jsxs(a.Fragment,{children:[a.jsx(Ie.IconButton,{sx:{paddingTop:0,paddingBottom:0},edge:"start",className:`papi-menuButton ${s??""}`,color:"inherit","aria-label":`${i??""} menu button`,onClick:b,children:l??a.jsx(yf,{})}),a.jsx(Ie.Drawer,{className:`papi-menu-drawer ${s??""}`,anchor:"left",variant:"temporary",open:c,onClose:w,PaperProps:{className:"papi-menu-drawer-paper",style:{top:f.top,left:f.left}},children:C?a.jsx(xi,{className:s,id:`${i??""} main menu`,commandHandler:v,multiColumnMenu:C}):void 0})]})}function xf({id:e,label:t,isDisabled:n=!1,tooltip:r,isTooltipSuppressed:o=!1,adjustMarginToAlignToEdge:s=!1,size:i="medium",className:l,onClick:c,children:d}){return a.jsx(Ie.IconButton,{id:e,disabled:n,edge:s,size:i,"aria-label":t,title:o?void 0:r??t,className:`papi-icon-button ${l??""}`,onClick:c,children:d})}const Yt=y.forwardRef(({className:e,...t},n)=>a.jsx(J.LoaderCircle,{size:35,className:S("tw-animate-spin",e),...t,ref:n}));Yt.displayName="Spinner";function Nf({id:e,isDisabled:t=!1,hasError:n=!1,isFullWidth:r=!1,helperText:o,label:s,placeholder:i,isRequired:l=!1,className:c,defaultValue:d,value:u,onChange:h,onFocus:w,onBlur:b}){return a.jsxs("div",{className:S("tw-inline-grid tw-items-center tw-gap-1.5",{"tw-w-full":r}),children:[a.jsx(Ue,{htmlFor:e,className:S({"tw-text-red-600":n,"tw-hidden":!s}),children:`${s}${l?"*":""}`}),a.jsx(qt,{id:e,disabled:t,placeholder:i,required:l,className:S(c,{"tw-border-red-600":n}),defaultValue:d,value:u,onChange:h,onFocus:w,onBlur:b}),a.jsx("p",{className:S({"tw-hidden":!o}),children:o})]})}function kf({menuProvider:e,commandHandler:t,className:n,id:r,children:o}){const s=y.useRef(void 0);return a.jsx("div",{ref:s,style:{position:"relative"},children:a.jsx(Ie.AppBar,{position:"static",id:r,children:a.jsxs(Ie.Toolbar,{className:S("tw-bg-muted tw-text-muted-foreground",n),variant:"dense",children:[e?a.jsx(Ni,{commandHandler:t,containerRef:s,menuProvider:e}):void 0,o?a.jsx("div",{className:"papi-toolbar-children",children:o}):void 0]})})})}const Ef=Nn.cva("tw-relative tw-w-full tw-rounded-lg tw-border tw-p-4 [&>svg~*]:tw-pl-7 [&>svg+div]:tw-translate-y-[-3px] [&>svg]:tw-absolute [&>svg]:tw-left-4 [&>svg]:tw-top-4 [&>svg]:tw-text-foreground",{variants:{variant:{default:"tw-bg-background tw-text-foreground",destructive:"tw-border-destructive/50 tw-text-destructive dark:tw-border-destructive [&>svg]:tw-text-destructive"}},defaultVariants:{variant:"default"}}),ki=y.forwardRef(({className:e,variant:t,...n},r)=>a.jsx("div",{ref:r,role:"alert",className:S(Ef({variant:t}),e),...n}));ki.displayName="Alert";const Ei=y.forwardRef(({className:e,...t},n)=>a.jsxs("h5",{ref:n,className:S("tw-mb-1 tw-font-medium tw-leading-none tw-tracking-tight",e),...t,children:[t.children," "]}));Ei.displayName="AlertTitle";const Si=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:S("tw-text-sm [&_p]:tw-leading-relaxed",e),...t}));Si.displayName="AlertDescription";const ji=Nn.cva("tw-inline-flex tw-items-center tw-rounded-full tw-border tw-px-2.5 tw-py-0.5 tw-text-xs tw-font-semibold tw-transition-colors focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2",{variants:{variant:{default:"tw-border-transparent tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/80",secondary:"tw-border-transparent tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80",muted:"tw-border-transparent tw-bg-muted tw-text-muted-foreground hover:tw-bg-muted/80",destructive:"tw-border-transparent tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/80",outline:"tw-text-foreground"}},defaultVariants:{variant:"default"}});function Sf({className:e,variant:t,...n}){return a.jsx("div",{className:S("pr-twp",ji({variant:t}),e),...n})}const Ti=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:S("pr-twp tw-rounded-lg tw-border tw-bg-card tw-text-card-foreground tw-shadow-sm",e),...t}));Ti.displayName="Card";const Ci=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:S("pr-twp tw-flex tw-flex-col tw-space-y-1.5 tw-p-6",e),...t}));Ci.displayName="CardHeader";const Oi=y.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:S("pr-twp tw-text-2xl tw-font-semibold tw-leading-none tw-tracking-tight",e),...t,children:t.children}));Oi.displayName="CardTitle";const Ri=y.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:S("pr-twp tw-text-sm tw-text-muted-foreground",e),...t}));Ri.displayName="CardDescription";const Pi=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:S("pr-twp tw-p-6 tw-pt-0",e),...t}));Pi.displayName="CardContent";const _i=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:S("pr-twp tw-flex tw-items-center tw-p-6 tw-pt-0",e),...t}));_i.displayName="CardFooter";function jf({...e}){return a.jsx(Ks.Toaster,{className:"tw-toaster tw-group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})}const Ii=y.forwardRef(({className:e,...t},n)=>a.jsxs(an.Root,{ref:n,className:S("pr-twp tw-relative tw-flex tw-w-full tw-touch-none tw-select-none tw-items-center",e),...t,children:[a.jsx(an.Track,{className:"tw-relative tw-h-2 tw-w-full tw-grow tw-overflow-hidden tw-rounded-full tw-bg-secondary",children:a.jsx(an.Range,{className:"tw-absolute tw-h-full tw-bg-primary"})}),a.jsx(an.Thumb,{className:"tw-block tw-h-5 tw-w-5 tw-rounded-full tw-border-2 tw-border-primary tw-bg-background tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50"})]}));Ii.displayName=an.Root.displayName;const $i=y.forwardRef(({className:e,...t},n)=>a.jsx(Vr.Root,{className:S("tw-peer pr-twp tw-inline-flex tw-h-6 tw-w-11 tw-shrink-0 tw-cursor-pointer tw-items-center tw-rounded-full tw-border-2 tw-border-transparent tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 focus-visible:tw-ring-offset-background disabled:tw-cursor-not-allowed disabled:tw-opacity-50 data-[state=checked]:tw-bg-primary data-[state=unchecked]:tw-bg-input",e),...t,ref:n,children:a.jsx(Vr.Thumb,{className:S("pr-twp tw-pointer-events-none tw-block tw-h-5 tw-w-5 tw-rounded-full tw-bg-background tw-shadow-lg tw-ring-0 tw-transition-transform data-[state=checked]:tw-translate-x-5 data-[state=unchecked]:tw-translate-x-0")})}));$i.displayName=Vr.Root.displayName;const Tf=Oe.Root,Mi=y.forwardRef(({className:e,...t},n)=>a.jsx(Oe.List,{ref:n,className:S("tw-inline-flex tw-h-10 tw-items-center tw-justify-center tw-rounded-md tw-bg-muted tw-p-1 tw-text-muted-foreground",e),...t}));Mi.displayName=Oe.List.displayName;const Di=y.forwardRef(({className:e,...t},n)=>a.jsx(Oe.Trigger,{ref:n,className:S("tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-sm tw-px-3 tw-py-1.5 tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-all hover:tw-text-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=active]:tw-bg-background data-[state=active]:tw-text-foreground data-[state=active]:tw-shadow-sm",e),...t}));Di.displayName=Oe.Trigger.displayName;const Ai=y.forwardRef(({className:e,...t},n)=>a.jsx(Oe.Content,{ref:n,className:S("tw-mt-2 tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2",e),...t}));Ai.displayName=Oe.Content.displayName;function Cf({isInstalling:e,handleClick:t,buttonText:n,className:r,...o}){return a.jsx(fe,{className:S("tw-h-8 tw-rounded-md tw-text-white tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-blue-700",{"tw-cursor-not-allowed tw-bg-blue-700":e,"tw-bg-blue-600":!e,"tw-bg-white tw-text-blue-600 hover:tw-text-white":!n,"tw-w-20":n},r),onClick:t,...o,children:e?a.jsx(Yt,{size:15}):a.jsxs(a.Fragment,{children:[a.jsx(J.Download,{size:25,className:S("tw-h-4 tw-w-4",{"tw-mr-1":n})}),n]})})}function Of({isEnabling:e,handleClick:t,className:n,...r}){return a.jsx(fe,{className:S("tw-h-8 tw-rounded-md tw-bg-blue-600 tw-px-4 tw-text-white tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-blue-700",{"tw-cursor-not-allowed tw-bg-blue-700":e},n),onClick:t,...r,children:e?a.jsxs(a.Fragment,{children:[a.jsx(Yt,{size:15,className:"tw-mr-1 tw-text-white"}),"Enabling..."]}):"Enable"})}function Rf({isDisabling:e,handleClick:t,className:n,...r}){return a.jsx(fe,{className:S("tw-h-8 tw-rounded-md tw-bg-gray-300 tw-text-black tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-gray-400",{"tw-cursor-not-allowed tw-bg-gray-400":e},n),onClick:t,...r,children:e?a.jsxs(a.Fragment,{children:[a.jsx(Yt,{size:15,className:"tw-mr-1 tw-text-black"}),"Disabling..."]}):"Disable"})}function Pf({isUpdating:e,handleClick:t,className:n,...r}){return a.jsx(fe,{className:S("tw-h-8 tw-rounded-md tw-bg-blue-600 tw-px-4 tw-text-white tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-blue-700 hover:tw-text-white",{"tw-cursor-not-allowed tw-bg-blue-700":e},n),onClick:t,...r,children:e?a.jsxs(a.Fragment,{children:[a.jsx(Yt,{size:15,className:"tw-mr-1 tw-text-white"}),"Updating..."]}):"Update"})}function _f({id:e,markdown:t,className:n,anchorTarget:r}){const o=y.useMemo(()=>({overrides:{a:{props:{target:r}}}}),[r]);return a.jsx("div",{id:e,className:S("pr-twp tw-prose",n),children:a.jsx(wl,{options:o,children:t})})}const Bi=y.forwardRef((e,t)=>a.jsxs(fe,{ref:t,className:"tw-rounded-md tw-border tw-border-dashed tw-border-gray-400 tw-bg-white tw-px-4 tw-py-2 tw-text-black tw-transition tw-duration-300 tw-ease-in-out hover:tw-border-blue-600 hover:tw-bg-white hover:tw-text-blue-600",...e,children:[a.jsx(J.Filter,{size:16,className:"tw-mr-2 tw-h-4 tw-w-4 tw-text-gray-700 hover:tw-text-blue-600"}),"Filter",a.jsx(J.ChevronDown,{size:16,className:"tw-ml-2 tw-h-4 tw-w-4 tw-text-gray-700 hover:tw-text-blue-600"})]}));var Vi=(e=>(e[e.Check=0]="Check",e[e.Radio=1]="Radio",e))(Vi||{});function If({id:e,groups:t}){return a.jsx("div",{id:e,children:a.jsxs(tr,{children:[a.jsx(eo,{asChild:!0,children:a.jsx(Bi,{})}),a.jsx(kn,{children:t.map(n=>a.jsxs("div",{children:[a.jsx(Xt,{children:n.label}),a.jsx(aa,{children:n.items.map(r=>a.jsx("div",{children:r.itemType===0?a.jsx(nr,{onClick:r.onClick,children:r.label}):a.jsx(no,{onClick:r.onClick,value:r.label,children:r.label})},r.label))}),a.jsx(En,{})]},n.label))})]})})}function $f({id:e,message:t}){return a.jsx("div",{id:e,className:"tw-mb-20 tw-mt-20 tw-flex tw-items-center tw-justify-center",children:a.jsx("div",{className:"tw-w-3/4 tw-rounded-lg tw-bg-gray-100 tw-p-8 tw-text-center",children:a.jsx("p",{className:"tw-text-lg tw-text-gray-800",children:t})})})}function Mf({id:e,category:t,downloads:n,languages:r,moreInfoUrl:o}){const s=new W.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(Object.values(n).reduce((l,c)=>l+c,0)),i=()=>{window.scrollTo(0,document.body.scrollHeight)};return a.jsxs("div",{id:e,className:"tw-flex tw-flex-wrap tw-items-start tw-space-x-4 tw-border-b tw-border-t tw-bg-white tw-pb-4 tw-pt-4",children:[a.jsxs("div",{className:"tw-flex tw-flex-col tw-items-center",children:[a.jsx("div",{className:"tw-flex tw-items-center tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1",children:a.jsx("span",{className:"tw-text-xs tw-font-semibold tw-text-gray-700",children:t})}),a.jsx("span",{className:"tw-text-xs tw-text-gray-500",children:"CATEGORY"})]}),a.jsx("div",{className:"tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300"}),a.jsxs("div",{className:"tw-flex tw-flex-col tw-items-center",children:[a.jsxs("div",{className:"tw-flex tw-items-center tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1",children:[a.jsx(J.User,{className:"tw-mr-1 tw-h-4 tw-w-4"}),a.jsx("span",{className:"tw-text-xs tw-font-semibold tw-text-gray-700",children:s})]}),a.jsx("span",{className:"tw-text-xs tw-text-gray-500",children:"USERS"})]}),a.jsx("div",{className:"tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300"}),a.jsxs("div",{className:"tw-flex tw-flex-col tw-items-center",children:[a.jsx("div",{className:"tw-flex tw-items-center",children:r.slice(0,3).map(l=>a.jsx("span",{className:"tw-ml-1 tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1 tw-text-xs tw-font-semibold tw-text-gray-700",children:l.toUpperCase()},l))}),r.length>3&&a.jsxs("button",{type:"button",onClick:()=>i(),className:"tw-text-xs tw-text-gray-500 tw-underline",children:["+",r.length-3," more languages"]})]}),a.jsx("div",{className:"tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300"}),a.jsxs("div",{className:"tw-ml-auto tw-flex tw-flex-col tw-space-y-2",children:[a.jsxs("a",{href:o,target:"_blank",rel:"noreferrer",className:"tw-flex tw-items-center tw-text-xs tw-font-semibold tw-text-gray-500 tw-underline",children:["Website",a.jsx(J.Link,{className:"tw-ml-1 tw-inline tw-h-4 tw-w-4"})]}),a.jsxs("a",{href:"https://example.com",target:"_blank",rel:"noreferrer",className:"tw-flex tw-items-center tw-text-xs tw-font-semibold tw-text-gray-500 tw-underline",children:["Support",a.jsx(J.CircleHelp,{className:"tw-ml-1 tw-inline tw-h-4 tw-w-4"})]})]})]})}function Li({id:e,versionHistory:t}){const[n,r]=y.useState(!1),o=new Date;function s(l){const c=new Date(l),d=new Date(o.getTime()-c.getTime()),u=d.getUTCFullYear()-1970,h=d.getUTCMonth(),w=d.getUTCDate()-1;let b="";return u>0?b=`${u.toString()} year${u===1?"":"s"} ago`:h>0?b=`${h.toString()} month${h===1?"":"s"} ago`:w===0?b="today":b=`${w.toString()} day${w===1?"":"s"} ago`,b}const i=Object.entries(t).sort((l,c)=>c[0].localeCompare(l[0]));return a.jsxs("div",{id:e,children:[a.jsx("h3",{className:"tw-text-md tw-font-semibold",children:"What`s New"}),a.jsx("ul",{className:"tw-list-disc tw-pl-5 tw-pr-4 tw-text-xs tw-text-gray-600",children:(n?i:i.slice(0,5)).map(l=>a.jsxs("div",{className:"tw-mt-3 tw-flex tw-justify-between",children:[a.jsx("div",{className:"tw-text-gray-600",children:a.jsx("li",{className:"tw-prose tw-text-xs",children:a.jsx("span",{children:l[1].description})})}),a.jsxs("div",{className:"tw-justify-end tw-text-right",children:[a.jsxs("div",{children:["Version ",l[0]]}),a.jsx("div",{children:s(l[1].date)})]})]},l[0]))}),i.length>5&&a.jsx("button",{type:"button",onClick:()=>r(!n),className:"tw-text-xs tw-text-gray-500 tw-underline",children:n?"Show Less Version History":"Show All Version History"})]})}function Df({id:e,publisherDisplayName:t,fileSize:n,locales:r,versionHistory:o}){const s=y.useMemo(()=>W.formatBytes(n),[n]),l=(c=>{const d=new Intl.DisplayNames(navigator.language,{type:"language"});return c.map(u=>d.of(u))})(r);return a.jsx("div",{id:e,className:"tw-border-t tw-pb-4 tw-pt-4",children:a.jsxs("div",{className:"tw-md:flex-row tw-md:space-x-8 tw-flex tw-flex-col tw-space-x-0",children:[a.jsx(Li,{versionHistory:o}),a.jsx("div",{className:"tw-md:border-t-0 tw-md:border-l tw-md-h-auto tw-md-ml-8 tw-mt-4 tw-border-t tw-border-gray-300"}),a.jsxs("div",{className:"tw-md:mt-0 tw-mt-4 tw-flex-1 tw-space-y-3",children:[a.jsx("h2",{className:"tw-text-md tw-font-semibold",children:"Information"}),a.jsxs("div",{className:"tw-flex tw-items-start tw-justify-between tw-pr-4 tw-text-xs tw-text-gray-600",children:[a.jsxs("p",{className:"tw-flex tw-flex-col tw-justify-start",children:[a.jsx("span",{className:"tw-mb-2",children:"Publisher"}),a.jsx("span",{className:"tw-font-semibold",children:t}),a.jsx("span",{className:"tw-mb-2 tw-mt-4",children:"Size"}),a.jsx("span",{className:"tw-font-semibold",children:s})]}),a.jsx("div",{className:"tw-flex tw-w-3/4 tw-items-center tw-justify-between tw-text-xs tw-text-gray-600",children:a.jsxs("p",{className:"tw-flex tw-flex-col tw-justify-start",children:[a.jsx("span",{className:"tw-mb-2",children:"Languages"}),a.jsx("span",{className:"tw-font-semibold",children:l.join(", ")})]})})]})]})]})})}const Af=(e,t)=>{y.useEffect(()=>{if(!e)return()=>{};const n=e(t);return()=>{n()}},[e,t])},Dr=()=>!1,Bf=(e,t)=>{const[n]=Qn(y.useCallback(async()=>{if(!e)return Dr;const r=await Promise.resolve(e(t));return async()=>r()},[t,e]),Dr,{preserveValue:!1});y.useEffect(()=>()=>{n!==Dr&&n()},[n])};Object.defineProperty(exports,"sonner",{enumerable:!0,get:()=>Ks.toast});exports.Alert=ki;exports.AlertDescription=Si;exports.AlertTitle=Ei;exports.BOOK_SELECTOR_STRING_KEYS=Kl;exports.Badge=Sf;exports.BookChapterControl=zl;exports.BookSelectionMode=ha;exports.BookSelector=Jl;exports.Button=fe;exports.Card=Ti;exports.CardContent=Pi;exports.CardDescription=Ri;exports.CardFooter=_i;exports.CardHeader=Ci;exports.CardTitle=Oi;exports.ChapterRangeSelector=ma;exports.Checkbox=rr;exports.Checklist=Ec;exports.ComboBox=Lr;exports.DataTable=Na;exports.DisableButton=Rf;exports.DropdownMenu=tr;exports.DropdownMenuCheckboxItem=nr;exports.DropdownMenuContent=kn;exports.DropdownMenuGroup=aa;exports.DropdownMenuItem=to;exports.DropdownMenuItemType=Vi;exports.DropdownMenuLabel=Xt;exports.DropdownMenuPortal=Ol;exports.DropdownMenuRadioGroup=Pl;exports.DropdownMenuRadioItem=no;exports.DropdownMenuSeparator=En;exports.DropdownMenuShortcut=ca;exports.DropdownMenuSub=Rl;exports.DropdownMenuSubContent=la;exports.DropdownMenuSubTrigger=ia;exports.DropdownMenuTrigger=eo;exports.EnableButton=Of;exports.FilterButton=Bi;exports.FilterDropdown=If;exports.Footer=Df;exports.GridMenu=xi;exports.HamburgerMenuButton=Ni;exports.INVENTORY_STRING_KEYS=ac;exports.IconButton=xf;exports.Input=qt;exports.InstallButton=Cf;exports.Inventory=cc;exports.Label=Ue;exports.MarkdownRenderer=_f;exports.MenuItem=Lo;exports.MoreInfo=Mf;exports.MultiSelectComboBox=dc;exports.NavigationContentSearch=uc;exports.NoExtensionsFound=$f;exports.RadioGroup=ro;exports.RadioGroupItem=Hn;exports.ScriptureResultsViewer=vc;exports.ScrollGroupSelector=yc;exports.SearchBar=Ca;exports.Select=Dt;exports.SelectContent=vt;exports.SelectGroup=ga;exports.SelectItem=De;exports.SelectLabel=ba;exports.SelectScrollDownButton=po;exports.SelectScrollUpButton=uo;exports.SelectSeparator=va;exports.SelectTrigger=bt;exports.SelectValue=At;exports.Separator=go;exports.SettingsList=xc;exports.SettingsListHeader=kc;exports.SettingsListItem=Nc;exports.Slider=Ii;exports.Sonner=jf;exports.Spinner=Yt;exports.Switch=$i;exports.Table=Sn;exports.TableBody=Tn;exports.TableCaption=xa;exports.TableCell=yt;exports.TableFooter=ya;exports.TableHead=Bt;exports.TableHeader=jn;exports.TableRow=Ze;exports.Tabs=Tf;exports.TabsContent=Ai;exports.TabsList=Mi;exports.TabsTrigger=Di;exports.TextField=Nf;exports.ToggleGroup=wo;exports.ToggleGroupItem=pn;exports.Toolbar=kf;exports.UpdateButton=Pf;exports.VersionHistory=Li;exports.VerticalTabs=fo;exports.VerticalTabsContent=ho;exports.VerticalTabsList=mo;exports.VerticalTabsTrigger=Oa;exports.badgeVariants=ji;exports.buttonVariants=da;exports.cn=S;exports.getBookNumFromId=Ea;exports.getLinesFromUSFM=ka;exports.getNumberFromUSFM=Fr;exports.getStatusForItem=Sa;exports.inventoryCountColumn=oc;exports.inventoryItemColumn=nc;exports.inventoryStatusColumn=sc;exports.useEvent=Af;exports.useEventAsync=Bf;exports.usePromise=Qn;function Vf(e,t="top"){if(!e||typeof document>"u")return;const n=document.head||document.querySelector("head"),r=n.querySelector(":first-child"),o=document.createElement("style");o.appendChild(document.createTextNode(e)),t==="top"&&r?n.insertBefore(o,r):n.appendChild(o)}Vf(`*, ::before, ::after { +} });`:Gt(12,m?` (${m})`:"",JSON.stringify(f.main)));return Is(f,"light",$,r),Is(f,"dark",R,r),f.contrastText||(f.contrastText=h(f.main)),f},v={dark:Ar,light:Ps};return process.env.NODE_ENV!=="production"&&(v[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),tt(P({common:P({},Tn),mode:t,primary:w({color:a,name:"primary"}),secondary:w({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:w({color:l,name:"error"}),warning:w({color:u,name:"warning"}),info:w({color:c,name:"info"}),success:w({color:d,name:"success"}),grey:Pu,contrastThreshold:n,getContrastText:h,augmentColor:w,tonalOffset:r},v[t]),o)}const Xu=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Yu(e){return Math.round(e*1e5)/1e5}const $s={textTransform:"uppercase"},Ms='"Roboto", "Helvetica", "Arial", sans-serif';function Wu(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=Ms,fontSize:o=14,fontWeightLight:a=300,fontWeightRegular:i=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:u,pxToRem:h}=n,w=ye(n,Xu);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof d!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const v=o/14,x=h||(N=>`${N/d*v}rem`),f=(N,$,R,E,b)=>P({fontFamily:r,fontWeight:N,fontSize:x($),lineHeight:R},r===Ms?{letterSpacing:`${Yu(E/$)}em`}:{},b,u),m={h1:f(a,96,1.167,-1.5),h2:f(a,60,1.2,-.5),h3:f(i,48,1.167,0),h4:f(i,34,1.235,.25),h5:f(i,24,1.334,0),h6:f(l,20,1.6,.15),subtitle1:f(i,16,1.75,.15),subtitle2:f(l,14,1.57,.1),body1:f(i,16,1.5,.15),body2:f(i,14,1.43,.15),button:f(l,14,1.75,.4,$s),caption:f(i,12,1.66,.4),overline:f(i,12,2.66,1,$s),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return tt(P({htmlFontSize:d,pxToRem:x,fontFamily:r,fontSize:o,fontWeightLight:a,fontWeightRegular:i,fontWeightMedium:l,fontWeightBold:c},m),w,{clone:!1})}const Ku=.2,Ju=.14,Zu=.12;function me(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ku})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ju})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Zu})`].join(",")}const Qu=["none",me(0,2,1,-1,0,1,1,0,0,1,3,0),me(0,3,1,-2,0,2,2,0,0,1,5,0),me(0,3,3,-2,0,3,4,0,0,1,8,0),me(0,2,4,-1,0,4,5,0,0,1,10,0),me(0,3,5,-1,0,5,8,0,0,1,14,0),me(0,3,5,-1,0,6,10,0,0,1,18,0),me(0,4,5,-2,0,7,10,1,0,2,16,1),me(0,5,5,-3,0,8,10,1,0,3,14,2),me(0,5,6,-3,0,9,12,1,0,3,16,2),me(0,6,6,-3,0,10,14,1,0,4,18,3),me(0,6,7,-4,0,11,15,1,0,4,20,3),me(0,7,8,-4,0,12,17,2,0,5,22,4),me(0,7,8,-4,0,13,19,2,0,5,24,4),me(0,7,9,-4,0,14,21,2,0,5,26,4),me(0,8,9,-5,0,15,22,2,0,6,28,5),me(0,8,10,-5,0,16,24,2,0,6,30,5),me(0,8,11,-5,0,17,26,2,0,6,32,5),me(0,9,11,-5,0,18,28,2,0,7,34,6),me(0,9,12,-6,0,19,29,2,0,7,36,6),me(0,10,13,-6,0,20,31,3,0,8,38,7),me(0,10,13,-6,0,21,33,3,0,8,40,7),me(0,10,14,-6,0,22,35,3,0,8,42,7),me(0,11,14,-7,0,23,36,3,0,9,44,8),me(0,11,15,-7,0,24,38,3,0,9,46,8)],ep=Qu,tp=["duration","easing","delay"],np={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},rp={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ds(e){return`${Math.round(e)}ms`}function op(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function sp(e){const t=P({},np,e.easing),n=P({},rp,e.duration);return P({getAutoHeightDuration:op,create:(o=["all"],a={})=>{const{duration:i=n.standard,easing:l=t.easeInOut,delay:c=0}=a,d=ye(a,tp);if(process.env.NODE_ENV!=="production"){const u=w=>typeof w=="string",h=w=>!isNaN(parseFloat(w));!u(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(i)&&!u(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),u(l)||console.error('MUI: Argument "easing" must be a string.'),!h(c)&&!u(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(` +`)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof i=="string"?i:Ds(i)} ${l} ${typeof c=="string"?c:Ds(c)}`).join(",")}},e,{easing:t,duration:n})}const ap={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},ip=ap,lp=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function cp(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:a={}}=e,i=ye(e,lp);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Gt(18));const l=Hu(r),c=So(e);let d=tt(c,{mixins:Ou(c.breakpoints,n),palette:l,shadows:ep.slice(),typography:Wu(l,a),transitions:sp(o),zIndex:P({},ip)});if(d=tt(d,i),d=t.reduce((u,h)=>tt(u,h),d),process.env.NODE_ENV!=="production"){const u=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(w,v)=>{let x;for(x in w){const f=w[x];if(u.indexOf(x)!==-1&&Object.keys(f).length>0){if(process.env.NODE_ENV!=="production"){const m=cr("",x);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${x}\` internal state.`,"You can not override it like this: ",JSON.stringify(w,null,2),"",`Instead, you need to use the '&.${m}' syntax:`,JSON.stringify({root:{[`&.${m}`]:f}},null,2),"","https://mui.com/r/state-classes-guide"].join(` +`))}w[x]={}}}};Object.keys(d.components).forEach(w=>{const v=d.components[w].styleOverrides;v&&w.indexOf("Mui")===0&&h(v,w)})}return d.unstable_sxConfig=P({},Eo,i==null?void 0:i.unstable_sxConfig),d.unstable_sx=function(h){return jo({sx:h,theme:this})},d}const dp=cp(),Co=dp,Oo="$$material";function Ro({props:e,name:t}){return Eu({props:e,name:t,defaultTheme:Co,themeId:Oo})}const up=e=>Xn(e)&&e!=="classes",pp=Nu({themeId:Oo,defaultTheme:Co,rootShouldForwardProp:up}),Mn=pp;function wp(e){return cr("MuiSvgIcon",e)}Za("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const fp=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],mp=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Je(t)}`,`fontSize${Je(n)}`]};return yo(o,wp,r)},hp=Mn("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Je(n.color)}`],t[`fontSize${Je(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,a,i,l,c,d,u,h,w,v,x;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((a=e.typography)==null||(i=a.pxToRem)==null?void 0:i.call(a,20))||"1.25rem",medium:((l=e.typography)==null||(c=l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem",large:((d=e.typography)==null||(u=d.pxToRem)==null?void 0:u.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(w=(e.vars||e).palette)==null||(w=w[t.color])==null?void 0:w.main)!=null?h:{action:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.active,disabled:(x=(e.vars||e).palette)==null||(x=x.action)==null?void 0:x.disabled,inherit:void 0}[t.color]}}),_o=A.forwardRef(function(t,n){const r=Ro({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:i="inherit",component:l="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:u=!1,titleAccess:h,viewBox:w="0 0 24 24"}=r,v=ye(r,fp),x=A.isValidElement(o)&&o.type==="svg",f=P({},r,{color:i,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:w,hasSvgAsChild:x}),m={};u||(m.viewBox=w);const N=mp(f);return s.jsxs(hp,P({as:l,className:at(N.root,a),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},m,v,x&&o.props,{ownerState:f,children:[x?o.props.children:o,h?s.jsx("title",{children:h}):null]}))});process.env.NODE_ENV!=="production"&&(_o.propTypes={children:p.node,classes:p.object,className:p.string,color:p.oneOfType([p.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),p.string]),component:p.elementType,fontSize:p.oneOfType([p.oneOf(["inherit","large","medium","small"]),p.string]),htmlColor:p.string,inheritViewBox:p.bool,shapeRendering:p.string,sx:p.oneOfType([p.arrayOf(p.oneOfType([p.func,p.object,p.bool])),p.func,p.object]),titleAccess:p.string,viewBox:p.string});_o.muiName="SvgIcon";const As=_o;function si(e,t){function n(r,o){return s.jsx(As,P({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=As.muiName,A.memo(A.forwardRef(n))}const gp={configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(` +`)),Ka.configure(e)}},bp=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Je,createChainedFunction:Xc,createSvgIcon:si,debounce:Yc,deprecatedPropType:Wc,isMuiElement:Kc,ownerDocument:Zn,ownerWindow:Jc,requirePropFactory:Zc,setRef:Qn,unstable_ClassNameGenerator:gp,unstable_useEnhancedEffect:Ut,unstable_useId:Ha,unsupportedProp:td,useControlled:Xa,useEventCallback:Hr,useForkRef:Et,useIsFocusVisible:Ya},Symbol.toStringTag,{value:"Module"})),vp=Tc(bp);var Bs;function xp(){return Bs||(Bs=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=vp}(Or)),Or}var yp=Cc;Object.defineProperty(bo,"__esModule",{value:!0});var ai=bo.default=void 0,Np=yp(xp()),kp=s;ai=bo.default=(0,Np.default)((0,kp.jsx)("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight");function Ep(e){return typeof e=="string"}function mn(e,t,n){return e===void 0||Ep(e)?t:P({},t,{ownerState:P({},t.ownerState,n)})}const jp={disableDefaultClasses:!1},Sp=A.createContext(jp);function Tp(e){const{disableDefaultClasses:t}=A.useContext(Sp);return n=>t?"":e(n)}function Cp(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Op(e,t,n){return typeof e=="function"?e(t,n):e}function Vs(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Rp(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:a}=e;if(!t){const v=at(n==null?void 0:n.className,a,o==null?void 0:o.className,r==null?void 0:r.className),x=P({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),f=P({},n,o,r);return v.length>0&&(f.className=v),Object.keys(x).length>0&&(f.style=x),{props:f,internalRef:void 0}}const i=Cp(P({},o,r)),l=Vs(r),c=Vs(o),d=t(i),u=at(d==null?void 0:d.className,n==null?void 0:n.className,a,o==null?void 0:o.className,r==null?void 0:r.className),h=P({},d==null?void 0:d.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),w=P({},d,n,c,l);return u.length>0&&(w.className=u),Object.keys(h).length>0&&(w.style=h),{props:w,internalRef:d.ref}}const _p=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Pp(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:a=!1}=e,i=ye(e,_p),l=a?{}:Op(r,o),{props:c,internalRef:d}=Rp(P({},i,{externalSlotProps:l})),u=Et(d,l==null?void 0:l.ref,(t=e.additionalProps)==null?void 0:t.ref);return mn(n,P({},c,{ref:u}),o)}const ii="base";function Ip(e){return`${ii}--${e}`}function $p(e,t){return`${ii}-${e}-${t}`}function li(e,t){const n=Ja[t];return n?Ip(n):$p(e,t)}function Mp(e,t){const n={};return t.forEach(r=>{n[r]=li(e,r)}),n}function Dp(e){return typeof e=="function"?e():e}const tr=A.forwardRef(function(t,n){const{children:r,container:o,disablePortal:a=!1}=t,[i,l]=A.useState(null),c=Et(A.isValidElement(r)?r.ref:null,n);if(Ut(()=>{a||l(Dp(o)||document.body)},[o,a]),Ut(()=>{if(i&&!a)return Qn(n,i),()=>{Qn(n,null)}},[n,i,a]),a){if(A.isValidElement(r)){const d={ref:c};return A.cloneElement(r,d)}return s.jsx(A.Fragment,{children:r})}return s.jsx(A.Fragment,{children:i&&ml.createPortal(r,i)})});process.env.NODE_ENV!=="production"&&(tr.propTypes={children:p.node,container:p.oneOfType([Sn,p.func]),disablePortal:p.bool});process.env.NODE_ENV!=="production"&&(tr["propTypes"]=Lc(tr.propTypes));var Ce="top",ze="bottom",Ge="right",Oe="left",Po="auto",Dn=[Ce,ze,Ge,Oe],qt="start",Cn="end",Ap="clippingParents",ci="viewport",dn="popper",Bp="reference",Ls=Dn.reduce(function(e,t){return e.concat([t+"-"+qt,t+"-"+Cn])},[]),di=[].concat(Dn,[Po]).reduce(function(e,t){return e.concat([t,t+"-"+qt,t+"-"+Cn])},[]),Vp="beforeRead",Lp="read",Fp="afterRead",zp="beforeMain",Gp="main",Up="afterMain",qp="beforeWrite",Hp="write",Xp="afterWrite",Yp=[Vp,Lp,Fp,zp,Gp,Up,qp,Hp,Xp];function Ze(e){return e?(e.nodeName||"").toLowerCase():null}function Ae(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function St(e){var t=Ae(e).Element;return e instanceof t||e instanceof Element}function Fe(e){var t=Ae(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Io(e){if(typeof ShadowRoot>"u")return!1;var t=Ae(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Wp(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},a=t.elements[n];!Fe(a)||!Ze(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(i){var l=o[i];l===!1?a.removeAttribute(i):a.setAttribute(i,l===!0?"":l)}))})}function Kp(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],a=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=i.reduce(function(c,d){return c[d]="",c},{});!Fe(o)||!Ze(o)||(Object.assign(o.style,l),Object.keys(a).forEach(function(c){o.removeAttribute(c)}))})}}const Jp={name:"applyStyles",enabled:!0,phase:"write",fn:Wp,effect:Kp,requires:["computeStyles"]};function We(e){return e.split("-")[0]}var vt=Math.max,nr=Math.min,Ht=Math.round;function Yr(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ui(){return!/^((?!chrome|android).)*safari/i.test(Yr())}function Xt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&Fe(e)&&(o=e.offsetWidth>0&&Ht(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Ht(r.height)/e.offsetHeight||1);var i=St(e)?Ae(e):window,l=i.visualViewport,c=!ui()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/o,u=(r.top+(c&&l?l.offsetTop:0))/a,h=r.width/o,w=r.height/a;return{width:h,height:w,top:u,right:d+h,bottom:u+w,left:d,x:d,y:u}}function $o(e){var t=Xt(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function pi(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Io(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function rt(e){return Ae(e).getComputedStyle(e)}function Zp(e){return["table","td","th"].indexOf(Ze(e))>=0}function ct(e){return((St(e)?e.ownerDocument:e.document)||window.document).documentElement}function vr(e){return Ze(e)==="html"?e:e.assignedSlot||e.parentNode||(Io(e)?e.host:null)||ct(e)}function Fs(e){return!Fe(e)||rt(e).position==="fixed"?null:e.offsetParent}function Qp(e){var t=/firefox/i.test(Yr()),n=/Trident/i.test(Yr());if(n&&Fe(e)){var r=rt(e);if(r.position==="fixed")return null}var o=vr(e);for(Io(o)&&(o=o.host);Fe(o)&&["html","body"].indexOf(Ze(o))<0;){var a=rt(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function An(e){for(var t=Ae(e),n=Fs(e);n&&Zp(n)&&rt(n).position==="static";)n=Fs(n);return n&&(Ze(n)==="html"||Ze(n)==="body"&&rt(n).position==="static")?t:n||Qp(e)||t}function Mo(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function xn(e,t,n){return vt(e,nr(t,n))}function ew(e,t,n){var r=xn(e,t,n);return r>n?n:r}function wi(){return{top:0,right:0,bottom:0,left:0}}function fi(e){return Object.assign({},wi(),e)}function mi(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var tw=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,fi(typeof t!="number"?t:mi(t,Dn))};function nw(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,l=We(n.placement),c=Mo(l),d=[Oe,Ge].indexOf(l)>=0,u=d?"height":"width";if(!(!a||!i)){var h=tw(o.padding,n),w=$o(a),v=c==="y"?Ce:Oe,x=c==="y"?ze:Ge,f=n.rects.reference[u]+n.rects.reference[c]-i[c]-n.rects.popper[u],m=i[c]-n.rects.reference[c],N=An(a),$=N?c==="y"?N.clientHeight||0:N.clientWidth||0:0,R=f/2-m/2,E=h[v],b=$-w[u]-h[x],I=$/2-w[u]/2+R,z=xn(E,I,b),Y=c;n.modifiersData[r]=(t={},t[Y]=z,t.centerOffset=z-I,t)}}function rw(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||pi(t.elements.popper,o)&&(t.elements.arrow=o))}const ow={name:"arrow",enabled:!0,phase:"main",fn:nw,effect:rw,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yt(e){return e.split("-")[1]}var sw={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aw(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ht(n*o)/o||0,y:Ht(r*o)/o||0}}function zs(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,h=e.isFixed,w=i.x,v=w===void 0?0:w,x=i.y,f=x===void 0?0:x,m=typeof u=="function"?u({x:v,y:f}):{x:v,y:f};v=m.x,f=m.y;var N=i.hasOwnProperty("x"),$=i.hasOwnProperty("y"),R=Oe,E=Ce,b=window;if(d){var I=An(n),z="clientHeight",Y="clientWidth";if(I===Ae(n)&&(I=ct(n),rt(I).position!=="static"&&l==="absolute"&&(z="scrollHeight",Y="scrollWidth")),I=I,o===Ce||(o===Oe||o===Ge)&&a===Cn){E=ze;var C=h&&I===b&&b.visualViewport?b.visualViewport.height:I[z];f-=C-r.height,f*=c?1:-1}if(o===Oe||(o===Ce||o===ze)&&a===Cn){R=Ge;var _=h&&I===b&&b.visualViewport?b.visualViewport.width:I[Y];v-=_-r.width,v*=c?1:-1}}var k=Object.assign({position:l},d&&sw),D=u===!0?aw({x:v,y:f},Ae(n)):{x:v,y:f};if(v=D.x,f=D.y,c){var M;return Object.assign({},k,(M={},M[E]=$?"0":"",M[R]=N?"0":"",M.transform=(b.devicePixelRatio||1)<=1?"translate("+v+"px, "+f+"px)":"translate3d("+v+"px, "+f+"px, 0)",M))}return Object.assign({},k,(t={},t[E]=$?f+"px":"",t[R]=N?v+"px":"",t.transform="",t))}function iw(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,i=a===void 0?!0:a,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:We(t.placement),variation:Yt(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,zs(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,zs(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const lw={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:iw,data:{}};var Un={passive:!0};function cw(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=o===void 0?!0:o,i=r.resize,l=i===void 0?!0:i,c=Ae(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&d.forEach(function(u){u.addEventListener("scroll",n.update,Un)}),l&&c.addEventListener("resize",n.update,Un),function(){a&&d.forEach(function(u){u.removeEventListener("scroll",n.update,Un)}),l&&c.removeEventListener("resize",n.update,Un)}}const dw={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:cw,data:{}};var uw={left:"right",right:"left",bottom:"top",top:"bottom"};function Wn(e){return e.replace(/left|right|bottom|top/g,function(t){return uw[t]})}var pw={start:"end",end:"start"};function Gs(e){return e.replace(/start|end/g,function(t){return pw[t]})}function Do(e){var t=Ae(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ao(e){return Xt(ct(e)).left+Do(e).scrollLeft}function ww(e,t){var n=Ae(e),r=ct(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){a=o.width,i=o.height;var d=ui();(d||!d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:l+Ao(e),y:c}}function fw(e){var t,n=ct(e),r=Do(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=vt(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=vt(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Ao(e),c=-r.scrollTop;return rt(o||n).direction==="rtl"&&(l+=vt(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:c}}function Bo(e){var t=rt(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function hi(e){return["html","body","#document"].indexOf(Ze(e))>=0?e.ownerDocument.body:Fe(e)&&Bo(e)?e:hi(vr(e))}function yn(e,t){var n;t===void 0&&(t=[]);var r=hi(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=Ae(r),i=o?[a].concat(a.visualViewport||[],Bo(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(yn(vr(i)))}function Wr(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mw(e,t){var n=Xt(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Us(e,t,n){return t===ci?Wr(ww(e,n)):St(t)?mw(t,n):Wr(fw(ct(e)))}function hw(e){var t=yn(vr(e)),n=["absolute","fixed"].indexOf(rt(e).position)>=0,r=n&&Fe(e)?An(e):e;return St(r)?t.filter(function(o){return St(o)&&pi(o,r)&&Ze(o)!=="body"}):[]}function gw(e,t,n,r){var o=t==="clippingParents"?hw(e):[].concat(t),a=[].concat(o,[n]),i=a[0],l=a.reduce(function(c,d){var u=Us(e,d,r);return c.top=vt(u.top,c.top),c.right=nr(u.right,c.right),c.bottom=nr(u.bottom,c.bottom),c.left=vt(u.left,c.left),c},Us(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function gi(e){var t=e.reference,n=e.element,r=e.placement,o=r?We(r):null,a=r?Yt(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case Ce:c={x:i,y:t.y-n.height};break;case ze:c={x:i,y:t.y+t.height};break;case Ge:c={x:t.x+t.width,y:l};break;case Oe:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=o?Mo(o):null;if(d!=null){var u=d==="y"?"height":"width";switch(a){case qt:c[d]=c[d]-(t[u]/2-n[u]/2);break;case Cn:c[d]=c[d]+(t[u]/2-n[u]/2);break}}return c}function On(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,a=n.strategy,i=a===void 0?e.strategy:a,l=n.boundary,c=l===void 0?Ap:l,d=n.rootBoundary,u=d===void 0?ci:d,h=n.elementContext,w=h===void 0?dn:h,v=n.altBoundary,x=v===void 0?!1:v,f=n.padding,m=f===void 0?0:f,N=fi(typeof m!="number"?m:mi(m,Dn)),$=w===dn?Bp:dn,R=e.rects.popper,E=e.elements[x?$:w],b=gw(St(E)?E:E.contextElement||ct(e.elements.popper),c,u,i),I=Xt(e.elements.reference),z=gi({reference:I,element:R,strategy:"absolute",placement:o}),Y=Wr(Object.assign({},R,z)),C=w===dn?Y:I,_={top:b.top-C.top+N.top,bottom:C.bottom-b.bottom+N.bottom,left:b.left-C.left+N.left,right:C.right-b.right+N.right},k=e.modifiersData.offset;if(w===dn&&k){var D=k[o];Object.keys(_).forEach(function(M){var ee=[Ge,ze].indexOf(M)>=0?1:-1,J=[Ce,ze].indexOf(M)>=0?"y":"x";_[M]+=D[J]*ee})}return _}function bw(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?di:c,u=Yt(r),h=u?l?Ls:Ls.filter(function(x){return Yt(x)===u}):Dn,w=h.filter(function(x){return d.indexOf(x)>=0});w.length===0&&(w=h);var v=w.reduce(function(x,f){return x[f]=On(e,{placement:f,boundary:o,rootBoundary:a,padding:i})[We(f)],x},{});return Object.keys(v).sort(function(x,f){return v[x]-v[f]})}function vw(e){if(We(e)===Po)return[];var t=Wn(e);return[Gs(e),t,Gs(t)]}function xw(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,d=n.padding,u=n.boundary,h=n.rootBoundary,w=n.altBoundary,v=n.flipVariations,x=v===void 0?!0:v,f=n.allowedAutoPlacements,m=t.options.placement,N=We(m),$=N===m,R=c||($||!x?[Wn(m)]:vw(m)),E=[m].concat(R).reduce(function(F,W){return F.concat(We(W)===Po?bw(t,{placement:W,boundary:u,rootBoundary:h,padding:d,flipVariations:x,allowedAutoPlacements:f}):W)},[]),b=t.rects.reference,I=t.rects.popper,z=new Map,Y=!0,C=E[0],_=0;_=0,J=ee?"width":"height",q=On(t,{placement:k,boundary:u,rootBoundary:h,altBoundary:w,padding:d}),te=ee?M?Ge:Oe:M?ze:Ce;b[J]>I[J]&&(te=Wn(te));var oe=Wn(te),se=[];if(a&&se.push(q[D]<=0),l&&se.push(q[te]<=0,q[oe]<=0),se.every(function(F){return F})){C=k,Y=!1;break}z.set(k,se)}if(Y)for(var y=x?3:1,O=function(W){var V=E.find(function(K){var X=z.get(K);if(X)return X.slice(0,W).every(function(Z){return Z})});if(V)return C=V,"break"},U=y;U>0;U--){var G=O(U);if(G==="break")break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}}const yw={name:"flip",enabled:!0,phase:"main",fn:xw,requiresIfExists:["offset"],data:{_skip:!1}};function qs(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Hs(e){return[Ce,Ge,ze,Oe].some(function(t){return e[t]>=0})}function Nw(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=On(t,{elementContext:"reference"}),l=On(t,{altBoundary:!0}),c=qs(i,r),d=qs(l,o,a),u=Hs(c),h=Hs(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}const kw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Nw};function Ew(e,t,n){var r=We(e),o=[Oe,Ce].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=a[0],l=a[1];return i=i||0,l=(l||0)*o,[Oe,Ge].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function jw(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=o===void 0?[0,0]:o,i=di.reduce(function(u,h){return u[h]=Ew(h,t.rects,a),u},{}),l=i[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=i}const Sw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jw};function Tw(e){var t=e.state,n=e.name;t.modifiersData[n]=gi({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Cw={name:"popperOffsets",enabled:!0,phase:"read",fn:Tw,data:{}};function Ow(e){return e==="x"?"y":"x"}function Rw(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,d=n.rootBoundary,u=n.altBoundary,h=n.padding,w=n.tether,v=w===void 0?!0:w,x=n.tetherOffset,f=x===void 0?0:x,m=On(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:u}),N=We(t.placement),$=Yt(t.placement),R=!$,E=Mo(N),b=Ow(E),I=t.modifiersData.popperOffsets,z=t.rects.reference,Y=t.rects.popper,C=typeof f=="function"?f(Object.assign({},t.rects,{placement:t.placement})):f,_=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(I){if(a){var M,ee=E==="y"?Ce:Oe,J=E==="y"?ze:Ge,q=E==="y"?"height":"width",te=I[E],oe=te+m[ee],se=te-m[J],y=v?-Y[q]/2:0,O=$===qt?z[q]:Y[q],U=$===qt?-Y[q]:-z[q],G=t.elements.arrow,F=v&&G?$o(G):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:wi(),V=W[ee],K=W[J],X=xn(0,z[q],F[q]),Z=R?z[q]/2-y-X-V-_.mainAxis:O-X-V-_.mainAxis,T=R?-z[q]/2+y+X+K+_.mainAxis:U+X+K+_.mainAxis,L=t.elements.arrow&&An(t.elements.arrow),j=L?E==="y"?L.clientTop||0:L.clientLeft||0:0,we=(M=k==null?void 0:k[E])!=null?M:0,B=te+Z-we-j,xe=te+T-we,qe=xn(v?nr(oe,B):oe,te,v?vt(se,xe):se);I[E]=qe,D[E]=qe-te}if(l){var ut,Ee=E==="x"?Ce:Oe,Bn=E==="x"?ze:Ge,He=I[b],Ct=b==="y"?"height":"width",pt=He+m[Ee],Ot=He-m[Bn],Rt=[Ce,Oe].indexOf(N)!==-1,_t=(ut=k==null?void 0:k[b])!=null?ut:0,wt=Rt?pt:He-z[Ct]-Y[Ct]-_t+_.altAxis,tn=Rt?He+z[Ct]+Y[Ct]-_t-_.altAxis:Ot,Vn=v&&Rt?ew(wt,He,tn):xn(v?wt:pt,He,v?tn:Ot);I[b]=Vn,D[b]=Vn-He}t.modifiersData[r]=D}}const _w={name:"preventOverflow",enabled:!0,phase:"main",fn:Rw,requiresIfExists:["offset"]};function Pw(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Iw(e){return e===Ae(e)||!Fe(e)?Do(e):Pw(e)}function $w(e){var t=e.getBoundingClientRect(),n=Ht(t.width)/e.offsetWidth||1,r=Ht(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Mw(e,t,n){n===void 0&&(n=!1);var r=Fe(t),o=Fe(t)&&$w(t),a=ct(t),i=Xt(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Ze(t)!=="body"||Bo(a))&&(l=Iw(t)),Fe(t)?(c=Xt(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Ao(a))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function Dw(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function o(a){n.add(a.name);var i=[].concat(a.requires||[],a.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&o(c)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||o(a)}),r}function Aw(e){var t=Dw(e);return Yp.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function Bw(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Vw(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Xs={placement:"bottom",modifiers:[],strategy:"absolute"};function Ys(){for(var e=arguments.length,t=new Array(e),n=0;nyo({root:["root"]},Tp(Gw)),Ww={},Kw=A.forwardRef(function(t,n){var r;const{anchorEl:o,children:a,direction:i,disablePortal:l,modifiers:c,open:d,placement:u,popperOptions:h,popperRef:w,slotProps:v={},slots:x={},TransitionProps:f}=t,m=ye(t,Uw),N=A.useRef(null),$=Et(N,n),R=A.useRef(null),E=Et(R,w),b=A.useRef(E);Ut(()=>{b.current=E},[E]),A.useImperativeHandle(w,()=>R.current,[]);const I=Hw(u,i),[z,Y]=A.useState(I),[C,_]=A.useState(rr(o));A.useEffect(()=>{R.current&&R.current.forceUpdate()}),A.useEffect(()=>{o&&_(rr(o))},[o]),Ut(()=>{if(!C||!d)return;const J=oe=>{Y(oe.placement)};if(process.env.NODE_ENV!=="production"&&C&&xr(C)&&C.nodeType===1){const oe=C.getBoundingClientRect();process.env.NODE_ENV!=="test"&&oe.top===0&&oe.left===0&&oe.right===0&&oe.bottom===0&&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(` +`))}let q=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:oe})=>{J(oe)}}];c!=null&&(q=q.concat(c)),h&&h.modifiers!=null&&(q=q.concat(h.modifiers));const te=zw(C,N.current,P({placement:I},h,{modifiers:q}));return b.current(te),()=>{te.destroy(),b.current(null)}},[C,l,c,d,h,I]);const k={placement:z};f!==null&&(k.TransitionProps=f);const D=Yw(),M=(r=x.root)!=null?r:"div",ee=Pp({elementType:M,externalSlotProps:v.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:$},ownerState:t,className:D.root});return s.jsx(M,P({},ee,{children:typeof a=="function"?a(k):a}))}),vi=A.forwardRef(function(t,n){const{anchorEl:r,children:o,container:a,direction:i="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:d,open:u,placement:h="bottom",popperOptions:w=Ww,popperRef:v,style:x,transition:f=!1,slotProps:m={},slots:N={}}=t,$=ye(t,qw),[R,E]=A.useState(!0),b=()=>{E(!1)},I=()=>{E(!0)};if(!c&&!u&&(!f||R))return null;let z;if(a)z=a;else if(r){const _=rr(r);z=_&&xr(_)?Zn(_).body:Zn(null).body}const Y=!u&&c&&(!f||R)?"none":void 0,C=f?{in:u,onEnter:b,onExited:I}:void 0;return s.jsx(tr,{disablePortal:l,container:z,children:s.jsx(Kw,P({anchorEl:r,direction:i,disablePortal:l,modifiers:d,ref:n,open:f?!R:u,placement:h,popperOptions:w,popperRef:v,slotProps:m,slots:N},$,{style:P({position:"fixed",top:0,left:0,display:Y},x),TransitionProps:C,children:o}))})});process.env.NODE_ENV!=="production"&&(vi.propTypes={anchorEl:vo(p.oneOfType([Sn,p.object,p.func]),e=>{if(e.open){const t=rr(e.anchorEl);if(t&&xr(t)&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)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(` +`))}else if(!t||typeof t.getBoundingClientRect!="function"||Xw(t)&&t.contextElement!=null&&t.contextElement.nodeType!==1)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(` +`))}return null}),children:p.oneOfType([p.node,p.func]),container:p.oneOfType([Sn,p.func]),direction:p.oneOf(["ltr","rtl"]),disablePortal:p.bool,keepMounted:p.bool,modifiers:p.arrayOf(p.shape({data:p.object,effect:p.func,enabled:p.bool,fn:p.func,name:p.any,options:p.object,phase:p.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:p.arrayOf(p.string),requiresIfExists:p.arrayOf(p.string)})),open:p.bool.isRequired,placement:p.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"]),popperOptions:p.shape({modifiers:p.array,onFirstUpdate:p.func,placement:p.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"]),strategy:p.oneOf(["absolute","fixed"])}),popperRef:qa,slotProps:p.shape({root:p.oneOfType([p.func,p.object])}),slots:p.shape({root:p.elementType}),transition:p.bool});function xi(){const e=ri(Co);return process.env.NODE_ENV!=="production"&&A.useDebugValue(e),e[Oo]||e}function Kr(e,t){return Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Kr(e,t)}function Jw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Kr(e,t)}const Ws={disabled:!1};var Zw=process.env.NODE_ENV!=="production"?p.oneOfType([p.number,p.shape({enter:p.number,exit:p.number,appear:p.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&p.oneOfType([p.string,p.shape({enter:p.string,exit:p.string,active:p.string}),p.shape({enter:p.string,enterDone:p.string,enterActive:p.string,exit:p.string,exitDone:p.string,exitActive:p.string})]);const yi=g.createContext(null);var Qw=function(t){return t.scrollTop},hn="unmounted",ht="exited",gt="entering",Bt="entered",Jr="exiting",ot=function(e){Jw(t,e);function t(r,o){var a;a=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return a.appearStatus=null,r.in?l?(c=ht,a.appearStatus=gt):c=Bt:r.unmountOnExit||r.mountOnEnter?c=hn:c=ht,a.state={status:c},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var i=o.in;return i&&a.status===hn?{status:ht}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var a=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==gt&&i!==Bt&&(a=gt):(i===gt||i===Bt)&&(a=Jr)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,a,i,l;return a=i=l=o,o!=null&&typeof o!="number"&&(a=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:a,enter:i,appear:l}},n.updateStatus=function(o,a){if(o===void 0&&(o=!1),a!==null)if(this.cancelNextCallback(),a===gt){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:pn.findDOMNode(this);i&&Qw(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ht&&this.setState({status:hn})},n.performEnter=function(o){var a=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[pn.findDOMNode(this),l],d=c[0],u=c[1],h=this.getTimeouts(),w=l?h.appear:h.enter;if(!o&&!i||Ws.disabled){this.safeSetState({status:Bt},function(){a.props.onEntered(d)});return}this.props.onEnter(d,u),this.safeSetState({status:gt},function(){a.props.onEntering(d,u),a.onTransitionEnd(w,function(){a.safeSetState({status:Bt},function(){a.props.onEntered(d,u)})})})},n.performExit=function(){var o=this,a=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:pn.findDOMNode(this);if(!a||Ws.disabled){this.safeSetState({status:ht},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Jr},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:ht},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,a){a=this.setNextCallback(a),this.setState(o,a)},n.setNextCallback=function(o){var a=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,a.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,a){this.setNextCallback(a);var i=this.props.nodeRef?this.props.nodeRef.current:pn.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],d=c[0],u=c[1];this.props.addEndListener(d,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===hn)return null;var a=this.props,i=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var l=ye(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return g.createElement(yi.Provider,{value:null},typeof i=="function"?i(o,l):g.cloneElement(g.Children.only(i),l))},t}(g.Component);ot.contextType=yi;ot.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:p.shape({current:typeof Element>"u"?p.any:function(e,t,n,r,o,a){var i=e[t];return p.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,a)}}),children:p.oneOfType([p.func.isRequired,p.element.isRequired]).isRequired,in:p.bool,mountOnEnter:p.bool,unmountOnExit:p.bool,appear:p.bool,enter:p.bool,exit:p.bool,timeout:function(t){var n=Zw;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;ae.scrollTop;function Ks(e,t){var n,r;const{timeout:o,easing:a,style:i={}}=e;return{duration:(n=i.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=i.transitionTimingFunction)!=null?r:typeof a=="object"?a[t.mode]:a,delay:i.transitionDelay}}const nf=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Zr(e){return`scale(${e}, ${e**2})`}const rf={entering:{opacity:1,transform:Zr(1)},entered:{opacity:1,transform:"none"}},Br=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Vo=A.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:a,easing:i,in:l,onEnter:c,onEntered:d,onEntering:u,onExit:h,onExited:w,onExiting:v,style:x,timeout:f="auto",TransitionComponent:m=ef}=t,N=ye(t,nf),$=fn(),R=A.useRef(),E=xi(),b=A.useRef(null),I=Et(b,a.ref,n),z=J=>q=>{if(J){const te=b.current;q===void 0?J(te):J(te,q)}},Y=z(u),C=z((J,q)=>{tf(J);const{duration:te,delay:oe,easing:se}=Ks({style:x,timeout:f,easing:i},{mode:"enter"});let y;f==="auto"?(y=E.transitions.getAutoHeightDuration(J.clientHeight),R.current=y):y=te,J.style.transition=[E.transitions.create("opacity",{duration:y,delay:oe}),E.transitions.create("transform",{duration:Br?y:y*.666,delay:oe,easing:se})].join(","),c&&c(J,q)}),_=z(d),k=z(v),D=z(J=>{const{duration:q,delay:te,easing:oe}=Ks({style:x,timeout:f,easing:i},{mode:"exit"});let se;f==="auto"?(se=E.transitions.getAutoHeightDuration(J.clientHeight),R.current=se):se=q,J.style.transition=[E.transitions.create("opacity",{duration:se,delay:te}),E.transitions.create("transform",{duration:Br?se:se*.666,delay:Br?te:te||se*.333,easing:oe})].join(","),J.style.opacity=0,J.style.transform=Zr(.75),h&&h(J)}),M=z(w),ee=J=>{f==="auto"&&$.start(R.current||0,J),r&&r(b.current,J)};return s.jsx(m,P({appear:o,in:l,nodeRef:b,onEnter:C,onEntered:_,onEntering:Y,onExit:D,onExited:M,onExiting:k,addEndListener:ee,timeout:f==="auto"?null:f},N,{children:(J,q)=>A.cloneElement(a,P({style:P({opacity:0,transform:Zr(.75),visibility:J==="exited"&&!l?"hidden":void 0},rf[J],x,a.props.style),ref:I},q))}))});process.env.NODE_ENV!=="production"&&(Vo.propTypes={addEndListener:p.func,appear:p.bool,children:Ga.isRequired,easing:p.oneOfType([p.shape({enter:p.string,exit:p.string}),p.string]),in:p.bool,onEnter:p.func,onEntered:p.func,onEntering:p.func,onExit:p.func,onExited:p.func,onExiting:p.func,style:p.object,timeout:p.oneOfType([p.oneOf(["auto"]),p.number,p.shape({appear:p.number,enter:p.number,exit:p.number})])});Vo.muiSupportAuto=!0;const Js=Vo,of=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],sf=Mn(vi,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ni=A.forwardRef(function(t,n){var r;const o=ni(),a=Ro({props:t,name:"MuiPopper"}),{anchorEl:i,component:l,components:c,componentsProps:d,container:u,disablePortal:h,keepMounted:w,modifiers:v,open:x,placement:f,popperOptions:m,popperRef:N,transition:$,slots:R,slotProps:E}=a,b=ye(a,of),I=(r=R==null?void 0:R.root)!=null?r:c==null?void 0:c.Root,z=P({anchorEl:i,container:u,disablePortal:h,keepMounted:w,modifiers:v,open:x,placement:f,popperOptions:m,popperRef:N,transition:$},b);return s.jsx(sf,P({as:l,direction:o==null?void 0:o.direction,slots:{root:I},slotProps:E??d},z,{ref:n}))});process.env.NODE_ENV!=="production"&&(Ni.propTypes={anchorEl:p.oneOfType([Sn,p.object,p.func]),children:p.oneOfType([p.node,p.func]),component:p.elementType,components:p.shape({Root:p.elementType}),componentsProps:p.shape({root:p.oneOfType([p.func,p.object])}),container:p.oneOfType([Sn,p.func]),disablePortal:p.bool,keepMounted:p.bool,modifiers:p.arrayOf(p.shape({data:p.object,effect:p.func,enabled:p.bool,fn:p.func,name:p.any,options:p.object,phase:p.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:p.arrayOf(p.string),requiresIfExists:p.arrayOf(p.string)})),open:p.bool.isRequired,placement:p.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"]),popperOptions:p.shape({modifiers:p.array,onFirstUpdate:p.func,placement:p.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"]),strategy:p.oneOf(["absolute","fixed"])}),popperRef:qa,slotProps:p.shape({root:p.oneOfType([p.func,p.object])}),slots:p.shape({root:p.elementType}),sx:p.oneOfType([p.arrayOf(p.oneOfType([p.func,p.object,p.bool])),p.func,p.object]),transition:p.bool});const ki=Ni;function af(e){return cr("MuiTooltip",e)}const lf=Za("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),it=lf,cf=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function df(e){return Math.round(e*1e5)/1e5}const uf=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:a}=e,i={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Je(a.split("-")[0])}`],arrow:["arrow"]};return yo(i,af,t)},pf=Mn(ki,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>P({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${it.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${it.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${it.arrow}`]:P({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${it.arrow}`]:P({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),wf=Mn("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Je(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>P({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:oi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${df(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${it.popper}[data-popper-placement*="left"] &`]:P({transformOrigin:"right center"},t.isRtl?P({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):P({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${it.popper}[data-popper-placement*="right"] &`]:P({transformOrigin:"left center"},t.isRtl?P({marginRight:"14px"},t.touch&&{marginRight:"24px"}):P({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${it.popper}[data-popper-placement*="top"] &`]:P({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${it.popper}[data-popper-placement*="bottom"] &`]:P({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),ff=Mn("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:oi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let qn=!1;const Zs=new Pn;let un={x:0,y:0};function Hn(e,t){return n=>{t&&t(n),e(n)}}const Ei=A.forwardRef(function(t,n){var r,o,a,i,l,c,d,u,h,w,v,x,f,m,N,$,R,E,b;const I=Ro({props:t,name:"MuiTooltip"}),{arrow:z=!1,children:Y,components:C={},componentsProps:_={},describeChild:k=!1,disableFocusListener:D=!1,disableHoverListener:M=!1,disableInteractive:ee=!1,disableTouchListener:J=!1,enterDelay:q=100,enterNextDelay:te=0,enterTouchDelay:oe=700,followCursor:se=!1,id:y,leaveDelay:O=0,leaveTouchDelay:U=1500,onClose:G,onOpen:F,open:W,placement:V="bottom",PopperComponent:K,PopperProps:X={},slotProps:Z={},slots:T={},title:L,TransitionComponent:j=Js,TransitionProps:we}=I,B=ye(I,cf),xe=A.isValidElement(Y)?Y:s.jsx("span",{children:Y}),qe=xi(),ut=qe.direction==="rtl",[Ee,Bn]=A.useState(),[He,Ct]=A.useState(null),pt=A.useRef(!1),Ot=ee||se,Rt=fn(),_t=fn(),wt=fn(),tn=fn(),[Vn,Ho]=Xa({controlled:W,default:!1,name:"Tooltip",state:"open"});let Qe=Vn;if(process.env.NODE_ENV!=="production"){const{current:ne}=A.useRef(W!==void 0);A.useEffect(()=>{Ee&&Ee.disabled&&!ne&&L!==""&&Ee.tagName.toLowerCase()==="button"&&console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(` +`))},[L,Ee,ne])}const yr=Ha(y),nn=A.useRef(),Ln=Hr(()=>{nn.current!==void 0&&(document.body.style.WebkitUserSelect=nn.current,nn.current=void 0),tn.clear()});A.useEffect(()=>Ln,[Ln]);const Xo=ne=>{Zs.clear(),qn=!0,Ho(!0),F&&!Qe&&F(ne)},Fn=Hr(ne=>{Zs.start(800+O,()=>{qn=!1}),Ho(!1),G&&Qe&&G(ne),Rt.start(qe.transitions.duration.shortest,()=>{pt.current=!1})}),Nr=ne=>{pt.current&&ne.type!=="touchstart"||(Ee&&Ee.removeAttribute("title"),_t.clear(),wt.clear(),q||qn&&te?_t.start(qn?te:q,()=>{Xo(ne)}):Xo(ne))},Yo=ne=>{_t.clear(),wt.start(O,()=>{Fn(ne)})},{isFocusVisibleRef:Wo,onBlur:zi,onFocus:Gi,ref:Ui}=Ya(),[,Ko]=A.useState(!1),Jo=ne=>{zi(ne),Wo.current===!1&&(Ko(!1),Yo(ne))},Zo=ne=>{Ee||Bn(ne.currentTarget),Gi(ne),Wo.current===!0&&(Ko(!0),Nr(ne))},Qo=ne=>{pt.current=!0;const Pe=xe.props;Pe.onTouchStart&&Pe.onTouchStart(ne)},es=Nr,ts=Yo,qi=ne=>{Qo(ne),wt.clear(),Rt.clear(),Ln(),nn.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",tn.start(oe,()=>{document.body.style.WebkitUserSelect=nn.current,Nr(ne)})},Hi=ne=>{xe.props.onTouchEnd&&xe.props.onTouchEnd(ne),Ln(),wt.start(U,()=>{Fn(ne)})};A.useEffect(()=>{if(!Qe)return;function ne(Pe){(Pe.key==="Escape"||Pe.key==="Esc")&&Fn(Pe)}return document.addEventListener("keydown",ne),()=>{document.removeEventListener("keydown",ne)}},[Fn,Qe]);const Xi=Et(xe.ref,Ui,Bn,n);!L&&L!==0&&(Qe=!1);const kr=A.useRef(),Yi=ne=>{const Pe=xe.props;Pe.onMouseMove&&Pe.onMouseMove(ne),un={x:ne.clientX,y:ne.clientY},kr.current&&kr.current.update()},rn={},Er=typeof L=="string";k?(rn.title=!Qe&&Er&&!M?L:null,rn["aria-describedby"]=Qe?yr:null):(rn["aria-label"]=Er?L:null,rn["aria-labelledby"]=Qe&&!Er?yr:null);const Be=P({},rn,B,xe.props,{className:at(B.className,xe.props.className),onTouchStart:Qo,ref:Xi},se?{onMouseMove:Yi}:{});process.env.NODE_ENV!=="production"&&(Be["data-mui-internal-clone-element"]=!0,A.useEffect(()=>{Ee&&!Ee.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(` +`))},[Ee]));const on={};J||(Be.onTouchStart=qi,Be.onTouchEnd=Hi),M||(Be.onMouseOver=Hn(es,Be.onMouseOver),Be.onMouseLeave=Hn(ts,Be.onMouseLeave),Ot||(on.onMouseOver=es,on.onMouseLeave=ts)),D||(Be.onFocus=Hn(Zo,Be.onFocus),Be.onBlur=Hn(Jo,Be.onBlur),Ot||(on.onFocus=Zo,on.onBlur=Jo)),process.env.NODE_ENV!=="production"&&xe.props.title&&console.error(["MUI: You have provided a `title` prop to the child of .",`Remove this title prop \`${xe.props.title}\` or the Tooltip component.`].join(` +`));const Wi=A.useMemo(()=>{var ne;let Pe=[{name:"arrow",enabled:!!He,options:{element:He,padding:4}}];return(ne=X.popperOptions)!=null&&ne.modifiers&&(Pe=Pe.concat(X.popperOptions.modifiers)),P({},X.popperOptions,{modifiers:Pe})},[He,X]),sn=P({},I,{isRtl:ut,arrow:z,disableInteractive:Ot,placement:V,PopperComponentProp:K,touch:pt.current}),jr=uf(sn),ns=(r=(o=T.popper)!=null?o:C.Popper)!=null?r:pf,rs=(a=(i=(l=T.transition)!=null?l:C.Transition)!=null?i:j)!=null?a:Js,os=(c=(d=T.tooltip)!=null?d:C.Tooltip)!=null?c:wf,ss=(u=(h=T.arrow)!=null?h:C.Arrow)!=null?u:ff,Ki=mn(ns,P({},X,(w=Z.popper)!=null?w:_.popper,{className:at(jr.popper,X==null?void 0:X.className,(v=(x=Z.popper)!=null?x:_.popper)==null?void 0:v.className)}),sn),Ji=mn(rs,P({},we,(f=Z.transition)!=null?f:_.transition),sn),Zi=mn(os,P({},(m=Z.tooltip)!=null?m:_.tooltip,{className:at(jr.tooltip,(N=($=Z.tooltip)!=null?$:_.tooltip)==null?void 0:N.className)}),sn),Qi=mn(ss,P({},(R=Z.arrow)!=null?R:_.arrow,{className:at(jr.arrow,(E=(b=Z.arrow)!=null?b:_.arrow)==null?void 0:E.className)}),sn);return s.jsxs(A.Fragment,{children:[A.cloneElement(xe,Be),s.jsx(ns,P({as:K??ki,placement:V,anchorEl:se?{getBoundingClientRect:()=>({top:un.y,left:un.x,right:un.x,bottom:un.y,width:0,height:0})}:Ee,popperRef:kr,open:Ee?Qe:!1,id:yr,transition:!0},on,Ki,{popperOptions:Wi,children:({TransitionProps:ne})=>s.jsx(rs,P({timeout:qe.transitions.duration.shorter},ne,Ji,{children:s.jsxs(os,P({},Zi,{children:[L,z?s.jsx(ss,P({},Qi,{ref:Ct})):null]}))}))}))]})});process.env.NODE_ENV!=="production"&&(Ei.propTypes={arrow:p.bool,children:Ga.isRequired,classes:p.object,className:p.string,components:p.shape({Arrow:p.elementType,Popper:p.elementType,Tooltip:p.elementType,Transition:p.elementType}),componentsProps:p.shape({arrow:p.object,popper:p.object,tooltip:p.object,transition:p.object}),describeChild:p.bool,disableFocusListener:p.bool,disableHoverListener:p.bool,disableInteractive:p.bool,disableTouchListener:p.bool,enterDelay:p.number,enterNextDelay:p.number,enterTouchDelay:p.number,followCursor:p.bool,id:p.string,leaveDelay:p.number,leaveTouchDelay:p.number,onClose:p.func,onOpen:p.func,open:p.bool,placement:p.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:p.elementType,PopperProps:p.object,slotProps:p.shape({arrow:p.object,popper:p.object,tooltip:p.object,transition:p.object}),slots:p.shape({arrow:p.elementType,popper:p.elementType,tooltip:p.elementType,transition:p.elementType}),sx:p.oneOfType([p.arrayOf(p.oneOfType([p.func,p.object,p.bool])),p.func,p.object]),title:p.node,TransitionComponent:p.elementType,TransitionProps:p.object});const mf=Ei;function Qs(e,t,n){return e?s.jsx(De.ListItemIcon,{className:`papi-menu-icon-${n?"leading":"trailing"}`,children:s.jsx("img",{src:e,alt:`${n?"Leading":"Trailing"} icon for ${t}`})}):void 0}function Lo(e){const{onClick:t,label:n,tooltip:r,allowForLeadingIcons:o=!0,iconPathBefore:a=void 0,iconPathAfter:i=void 0,hasAutoFocus:l=!1,className:c,isDisabled:d=!1,isDense:u=!0,isSubMenuParent:h=!1,hasDisabledGutters:w=!1,hasDivider:v=!1,focusVisibleClassName:x,id:f,children:m}=e,N=s.jsx(De.MenuItem,{sx:{lineHeight:.8},autoFocus:l,className:c,disabled:d,dense:u,disableGutters:w,divider:v,focusVisibleClassName:x,onClick:t,id:f,children:n?s.jsxs(s.Fragment,{children:[Qs(a,n,!0),s.jsx(De.ListItemText,{primary:n,inset:!a&&o}),h?s.jsx(De.ListItemIcon,{className:"papi-menu-icon-trailing",children:s.jsx(ai,{})}):Qs(i,n,!1)]}):m});return r?s.jsx(mf,{title:r,placement:"right",children:s.jsx("div",{children:N})}):N}function ji(e){return Object.entries(e.groups).map(([n,r])=>({id:n,group:r}))}function hf(e){const[t,n]=g.useState(void 0),{parentMenuItem:r,parentItemProps:o,menuDefinition:a}=e,i=d=>{n(d.currentTarget)},l=()=>{n(void 0)},c=()=>{let d=ji(a).filter(u=>"menuItem"in u.group);if(!(r!=null&&r.id))throw new Error("A valid parent menu item is required for submenus.");return d=d.filter(u=>"menuItem"in u.group&&u.group.menuItem===r.id),s.jsx(Si,{...e,includedGroups:d})};return s.jsxs(s.Fragment,{children:[s.jsx(Lo,{onClick:i,...o,isSubMenuParent:!0}),s.jsx(De.Menu,{anchorEl:t,open:!!t,onClose:l,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:c()},r.id)]})}const gf=(e,t)=>t.filter(o=>o.group===e).sort((o,a)=>(o.order||0)-(a.order||0));function Si(e){const{menuDefinition:t,onClick:n,commandHandler:r,includedGroups:o}=e,{items:a,allowForLeadingIcons:i}=g.useMemo(()=>{const u=o&&o.length>0?o:ji(t).filter(x=>!("menuItem"in x.group)),h=Object.values(u).sort((x,f)=>(x.group.order||0)-(f.group.order||0)),w=[];h.forEach(x=>{gf(x.id,t.items).forEach(f=>w.push({item:f,isLastItemInGroup:!1})),w.length>0&&(w[w.length-1].isLastItemInGroup=!0)}),w.length>0&&(w[w.length-1].isLastItemInGroup=!1);const v=w.some(x=>"iconPathBefore"in x.item&&x.item.iconPathBefore);return{items:w,allowForLeadingIcons:v}},[o,t]),l=({item:u,isLastItemInGroup:h})=>({className:"papi-menu-item",label:u.label,tooltip:u.tooltip,iconPathBefore:"iconPathBefore"in u?u.iconPathBefore:void 0,iconPathAfter:"iconPathAfter"in u?u.iconPathAfter:void 0,hasDivider:h,allowForLeadingIcons:i}),[c]=a;if(!c)return s.jsx("div",{});const d=c.item.group;return s.jsx("div",{role:"menu","aria-label":d,children:a.map((u,h)=>{const{item:w}=u,v=l(u);if("command"in w){const x=w.group+h;return s.jsx(Lo,{onClick:f=>{n==null||n(f),r(w)},...v},x)}return s.jsx(hf,{parentMenuItem:w,parentItemProps:v,...e},d+w.id)})},d)}function bf(e){const{menuDefinition:t,columnId:n}=e;let a=Object.entries(t.groups).map(([i,l])=>({id:i,group:l})).filter(i=>"column"in i.group);return n&&"columns"in t&&t.columns[n]&&(a=a.filter(i=>"column"in i.group&&i.group.column===n)),s.jsx(Si,{...e,includedGroups:a})}function vf({commandHandler:e,menuDefinition:t,id:n,metadata:r,onClick:o,className:a}){return s.jsxs(De.Grid,{id:n,item:!0,xs:"auto",role:"menu","aria-label":n,className:`papi-menu-column ${a??""}`,children:[s.jsx("h3",{"aria-label":r.label,className:`papi-menu-column-header ${a??""}`,children:r.label}),s.jsx(De.List,{id:n,dense:!0,className:a??"",children:s.jsx(bf,{commandHandler:e,menuDefinition:t,columnId:n,onClick:o})})]})}function Ti({commandHandler:e,className:t,multiColumnMenu:n,id:r}){const{columns:o}=n,a=g.useMemo(()=>{const i=new Map;return Object.getOwnPropertyNames(o).forEach(l=>{if(l==="isExtensible")return;const c=l,d=o[c];typeof d=="object"&&typeof d.order=="number"&&!Number.isNaN(d.order)?i.set(d.order,{id:c,metadata:d}):console.warn(`Property ${l} (${typeof d}) on menu ${r} is not a valid column and is being ignored. This might indicate data corruption`)}),Array.from(i.values()).sort((l,c)=>(l.metadata.order||0)-(c.metadata.order||0))},[o,r]);return s.jsx(De.Grid,{container:!0,spacing:0,className:`papi-multi-column-menu ${t??""}`,columns:a.length,role:"menu","aria-label":"GridMenu",id:r,children:a.map((i,l)=>s.jsx(vf,{commandHandler:e,menuDefinition:n,...i,className:t},l))})}function xf(e){return{preserveValue:!0,...e}}const or=(e,t,n={})=>{const r=g.useRef(t);r.current=t;const o=g.useRef(n);o.current=xf(o.current);const[a,i]=g.useState(()=>r.current),[l,c]=g.useState(!0);return g.useEffect(()=>{let d=!0;return c(!!e),(async()=>{if(e){const u=await e();d&&(i(()=>u),c(!1))}})(),()=>{d=!1,o.current.preserveValue||i(()=>r.current)}},[e]),[a,l]},yf=si(s.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function Ci({menuProvider:e,normalMenu:t,fullMenu:n,commandHandler:r,containerRef:o,className:a,ariaLabelPrefix:i,children:l}){const[c,d]=g.useState(!1),[u,h]=g.useState(!1),w=g.useCallback(()=>{c&&d(!1),h(!1)},[c]),v=g.useCallback(E=>{E.stopPropagation(),d(b=>{const I=!b;return I&&E.shiftKey?h(!0):I||h(!1),I})},[]),x=g.useCallback(E=>(w(),r(E)),[r,w]),[f,m]=g.useState({top:1,left:1});g.useEffect(()=>{if(c){const E=o==null?void 0:o.current;if(E){const b=E.getBoundingClientRect(),I=window.scrollY,z=window.scrollX,Y=b.top+I+E.clientHeight,C=b.left+z;m({top:Y,left:C})}}},[c,o]);const[N]=or(g.useCallback(async()=>(e==null?void 0:e(!1))??t,[e,t,c]),t),[$]=or(g.useCallback(async()=>(e==null?void 0:e(!0))??n??N,[e,n,N,c]),n??N),R=u&&$?$:N;return s.jsxs(s.Fragment,{children:[s.jsx(De.IconButton,{sx:{paddingTop:0,paddingBottom:0},edge:"start",className:`papi-menuButton ${a??""}`,color:"inherit","aria-label":`${i??""} menu button`,onClick:v,children:l??s.jsx(yf,{})}),s.jsx(De.Drawer,{className:`papi-menu-drawer ${a??""}`,anchor:"left",variant:"temporary",open:c,onClose:w,PaperProps:{className:"papi-menu-drawer-paper",style:{top:f.top,left:f.left}},children:R?s.jsx(Ti,{className:a,id:`${i??""} main menu`,commandHandler:x,multiColumnMenu:R}):void 0})]})}function Nf({id:e,label:t,isDisabled:n=!1,tooltip:r,isTooltipSuppressed:o=!1,adjustMarginToAlignToEdge:a=!1,size:i="medium",className:l,onClick:c,children:d}){return s.jsx(De.IconButton,{id:e,disabled:n,edge:a,size:i,"aria-label":t,title:o?void 0:r??t,className:`papi-icon-button ${l??""}`,onClick:c,children:d})}const dt=g.forwardRef(({className:e,...t},n)=>s.jsx(H.LoaderCircle,{size:35,className:S("tw-animate-spin",e),...t,ref:n}));dt.displayName="Spinner";function kf({id:e,isDisabled:t=!1,hasError:n=!1,isFullWidth:r=!1,helperText:o,label:a,placeholder:i,isRequired:l=!1,className:c,defaultValue:d,value:u,onChange:h,onFocus:w,onBlur:v}){return s.jsxs("div",{className:S("tw-inline-grid tw-items-center tw-gap-1.5",{"tw-w-full":r}),children:[s.jsx(Te,{htmlFor:e,className:S({"tw-text-red-600":n,"tw-hidden":!a}),children:`${a}${l?"*":""}`}),s.jsx(Tt,{id:e,disabled:t,placeholder:i,required:l,className:S(c,{"tw-border-red-600":n}),defaultValue:d,value:u,onChange:h,onFocus:w,onBlur:v}),s.jsx("p",{className:S({"tw-hidden":!o}),children:o})]})}function Ef({menuProvider:e,commandHandler:t,className:n,id:r,children:o}){const a=g.useRef(void 0);return s.jsx("div",{ref:a,style:{position:"relative"},children:s.jsx(De.AppBar,{position:"static",id:r,children:s.jsxs(De.Toolbar,{className:S("tw-bg-muted tw-text-muted-foreground",n),variant:"dense",children:[e?s.jsx(Ci,{commandHandler:t,containerRef:a,menuProvider:e}):void 0,o?s.jsx("div",{className:"papi-toolbar-children",children:o}):void 0]})})})}const jf=Rn.cva("tw-relative tw-w-full tw-rounded-lg tw-border tw-p-4 [&>svg~*]:tw-pl-7 [&>svg+div]:tw-translate-y-[-3px] [&>svg]:tw-absolute [&>svg]:tw-left-4 [&>svg]:tw-top-4 [&>svg]:tw-text-foreground",{variants:{variant:{default:"tw-bg-background tw-text-foreground",destructive:"tw-border-destructive/50 tw-text-destructive dark:tw-border-destructive [&>svg]:tw-text-destructive"}},defaultVariants:{variant:"default"}}),Oi=g.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:S(jf({variant:t}),e),...n}));Oi.displayName="Alert";const Ri=g.forwardRef(({className:e,...t},n)=>s.jsxs("h5",{ref:n,className:S("tw-mb-1 tw-font-medium tw-leading-none tw-tracking-tight",e),...t,children:[t.children," "]}));Ri.displayName="AlertTitle";const _i=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:S("tw-text-sm [&_p]:tw-leading-relaxed",e),...t}));_i.displayName="AlertDescription";const Pi=Rn.cva("tw-inline-flex tw-items-center tw-rounded-full tw-border tw-px-2.5 tw-py-0.5 tw-text-xs tw-font-semibold tw-transition-colors focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2",{variants:{variant:{default:"tw-border-transparent tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/80",secondary:"tw-border-transparent tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80",muted:"tw-border-transparent tw-bg-muted tw-text-muted-foreground hover:tw-bg-muted/80",destructive:"tw-border-transparent tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/80",outline:"tw-text-foreground"}},defaultVariants:{variant:"default"}});function Sf({className:e,variant:t,...n}){return s.jsx("div",{className:S("pr-twp",Pi({variant:t}),e),...n})}const Fo=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:S("pr-twp tw-rounded-lg tw-border tw-bg-card tw-text-card-foreground tw-shadow-sm",e),...t}));Fo.displayName="Card";const zo=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:S("pr-twp tw-flex tw-flex-col tw-space-y-1.5 tw-p-6",e),...t}));zo.displayName="CardHeader";const Go=g.forwardRef(({className:e,...t},n)=>s.jsx("h3",{ref:n,className:S("pr-twp tw-text-2xl tw-font-semibold tw-leading-none tw-tracking-tight",e),...t,children:t.children}));Go.displayName="CardTitle";const Uo=g.forwardRef(({className:e,...t},n)=>s.jsx("p",{ref:n,className:S("pr-twp tw-text-sm tw-text-muted-foreground",e),...t}));Uo.displayName="CardDescription";const qo=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:S("pr-twp tw-p-6 tw-pt-0",e),...t}));qo.displayName="CardContent";const Ii=g.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:S("pr-twp tw-flex tw-items-center tw-p-6 tw-pt-0",e),...t}));Ii.displayName="CardFooter";function Tf({...e}){return s.jsx(na.Toaster,{className:"tw-toaster tw-group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})}const $i=g.forwardRef(({className:e,...t},n)=>s.jsxs(wn.Root,{ref:n,className:S("pr-twp tw-relative tw-flex tw-w-full tw-touch-none tw-select-none tw-items-center",e),...t,children:[s.jsx(wn.Track,{className:"tw-relative tw-h-2 tw-w-full tw-grow tw-overflow-hidden tw-rounded-full tw-bg-secondary",children:s.jsx(wn.Range,{className:"tw-absolute tw-h-full tw-bg-primary"})}),s.jsx(wn.Thumb,{className:"tw-block tw-h-5 tw-w-5 tw-rounded-full tw-border-2 tw-border-primary tw-bg-background tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50"})]}));$i.displayName=wn.Root.displayName;const Mi=g.forwardRef(({className:e,...t},n)=>s.jsx(zr.Root,{className:S("tw-peer pr-twp tw-inline-flex tw-h-6 tw-w-11 tw-shrink-0 tw-cursor-pointer tw-items-center tw-rounded-full tw-border-2 tw-border-transparent tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 focus-visible:tw-ring-offset-background disabled:tw-cursor-not-allowed disabled:tw-opacity-50 data-[state=checked]:tw-bg-primary data-[state=unchecked]:tw-bg-input",e),...t,ref:n,children:s.jsx(zr.Thumb,{className:S("pr-twp tw-pointer-events-none tw-block tw-h-5 tw-w-5 tw-rounded-full tw-bg-background tw-shadow-lg tw-ring-0 tw-transition-transform data-[state=checked]:tw-translate-x-5 data-[state=unchecked]:tw-translate-x-0")})}));Mi.displayName=zr.Root.displayName;const Cf=_e.Root,Di=g.forwardRef(({className:e,...t},n)=>s.jsx(_e.List,{ref:n,className:S("tw-inline-flex tw-h-10 tw-items-center tw-justify-center tw-rounded-md tw-bg-muted tw-p-1 tw-text-muted-foreground",e),...t}));Di.displayName=_e.List.displayName;const Ai=g.forwardRef(({className:e,...t},n)=>s.jsx(_e.Trigger,{ref:n,className:S("tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-sm tw-px-3 tw-py-1.5 tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-all hover:tw-text-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=active]:tw-bg-background data-[state=active]:tw-text-foreground data-[state=active]:tw-shadow-sm",e),...t}));Ai.displayName=_e.Trigger.displayName;const Bi=g.forwardRef(({className:e,...t},n)=>s.jsx(_e.Content,{ref:n,className:S("tw-mt-2 tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2",e),...t}));Bi.displayName=_e.Content.displayName;function Of({isInstalling:e,handleClick:t,buttonText:n,className:r,...o}){return s.jsx(pe,{className:S("tw-h-8 tw-rounded-md tw-text-white tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-blue-700",{"tw-cursor-not-allowed tw-bg-blue-700":e,"tw-bg-blue-600":!e,"tw-bg-white tw-text-blue-600 hover:tw-text-white":!n,"tw-w-20":n},r),onClick:t,...o,children:e?s.jsx(dt,{size:15}):s.jsxs(s.Fragment,{children:[s.jsx(H.Download,{size:25,className:S("tw-h-4 tw-w-4",{"tw-mr-1":n})}),n]})})}function Rf({isEnabling:e,handleClick:t,className:n,...r}){return s.jsx(pe,{className:S("tw-h-8 tw-rounded-md tw-bg-blue-600 tw-px-4 tw-text-white tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-blue-700",{"tw-cursor-not-allowed tw-bg-blue-700":e},n),onClick:t,...r,children:e?s.jsxs(s.Fragment,{children:[s.jsx(dt,{size:15,className:"tw-mr-1 tw-text-white"}),"Enabling..."]}):"Enable"})}function _f({isDisabling:e,handleClick:t,className:n,...r}){return s.jsx(pe,{className:S("tw-h-8 tw-rounded-md tw-bg-gray-300 tw-text-black tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-gray-400",{"tw-cursor-not-allowed tw-bg-gray-400":e},n),onClick:t,...r,children:e?s.jsxs(s.Fragment,{children:[s.jsx(dt,{size:15,className:"tw-mr-1 tw-text-black"}),"Disabling..."]}):"Disable"})}function Pf({isUpdating:e,handleClick:t,className:n,...r}){return s.jsx(pe,{className:S("tw-h-8 tw-rounded-md tw-bg-blue-600 tw-px-4 tw-text-white tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-blue-700 hover:tw-text-white",{"tw-cursor-not-allowed tw-bg-blue-700":e},n),onClick:t,...r,children:e?s.jsxs(s.Fragment,{children:[s.jsx(dt,{size:15,className:"tw-mr-1 tw-text-white"}),"Updating..."]}):"Update"})}function If({id:e,markdown:t,className:n,anchorTarget:r}){const o=g.useMemo(()=>({overrides:{a:{props:{target:r}}}}),[r]);return s.jsx("div",{id:e,className:S("pr-twp tw-prose",n),children:s.jsx(fl,{options:o,children:t})})}const Vi=g.forwardRef((e,t)=>s.jsxs(pe,{ref:t,className:"tw-rounded-md tw-border tw-border-dashed tw-border-gray-400 tw-bg-white tw-px-4 tw-py-2 tw-text-black tw-transition tw-duration-300 tw-ease-in-out hover:tw-border-blue-600 hover:tw-bg-white hover:tw-text-blue-600",...e,children:[s.jsx(H.Filter,{size:16,className:"tw-mr-2 tw-h-4 tw-w-4 tw-text-gray-700 hover:tw-text-blue-600"}),"Filter",s.jsx(H.ChevronDown,{size:16,className:"tw-ml-2 tw-h-4 tw-w-4 tw-text-gray-700 hover:tw-text-blue-600"})]}));var Li=(e=>(e[e.Check=0]="Check",e[e.Radio=1]="Radio",e))(Li||{});function $f({id:e,groups:t}){return s.jsx("div",{id:e,children:s.jsxs(Lt,{children:[s.jsx(En,{asChild:!0,children:s.jsx(Vi,{})}),s.jsx(yt,{children:t.map(n=>s.jsxs("div",{children:[s.jsx(Kt,{children:n.label}),s.jsx(pa,{children:n.items.map(r=>s.jsx("div",{children:r.itemType===0?s.jsx(_n,{onClick:r.onClick,children:r.label}):s.jsx(no,{onClick:r.onClick,value:r.label,children:r.label})},r.label))}),s.jsx(Jt,{})]},n.label))})]})})}function Mf({id:e,message:t}){return s.jsx("div",{id:e,className:"tw-mb-20 tw-mt-20 tw-flex tw-items-center tw-justify-center",children:s.jsx("div",{className:"tw-w-3/4 tw-rounded-lg tw-bg-gray-100 tw-p-8 tw-text-center",children:s.jsx("p",{className:"tw-text-lg tw-text-gray-800",children:t})})})}function Df({id:e,category:t,downloads:n,languages:r,moreInfoUrl:o}){const a=new Q.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(Object.values(n).reduce((l,c)=>l+c,0)),i=()=>{window.scrollTo(0,document.body.scrollHeight)};return s.jsxs("div",{id:e,className:"tw-flex tw-flex-wrap tw-items-start tw-space-x-4 tw-border-b tw-border-t tw-bg-white tw-pb-4 tw-pt-4",children:[s.jsxs("div",{className:"tw-flex tw-flex-col tw-items-center",children:[s.jsx("div",{className:"tw-flex tw-items-center tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1",children:s.jsx("span",{className:"tw-text-xs tw-font-semibold tw-text-gray-700",children:t})}),s.jsx("span",{className:"tw-text-xs tw-text-gray-500",children:"CATEGORY"})]}),s.jsx("div",{className:"tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300"}),s.jsxs("div",{className:"tw-flex tw-flex-col tw-items-center",children:[s.jsxs("div",{className:"tw-flex tw-items-center tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1",children:[s.jsx(H.User,{className:"tw-mr-1 tw-h-4 tw-w-4"}),s.jsx("span",{className:"tw-text-xs tw-font-semibold tw-text-gray-700",children:a})]}),s.jsx("span",{className:"tw-text-xs tw-text-gray-500",children:"USERS"})]}),s.jsx("div",{className:"tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300"}),s.jsxs("div",{className:"tw-flex tw-flex-col tw-items-center",children:[s.jsx("div",{className:"tw-flex tw-items-center",children:r.slice(0,3).map(l=>s.jsx("span",{className:"tw-ml-1 tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1 tw-text-xs tw-font-semibold tw-text-gray-700",children:l.toUpperCase()},l))}),r.length>3&&s.jsxs("button",{type:"button",onClick:()=>i(),className:"tw-text-xs tw-text-gray-500 tw-underline",children:["+",r.length-3," more languages"]})]}),s.jsx("div",{className:"tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300"}),s.jsxs("div",{className:"tw-ml-auto tw-flex tw-flex-col tw-space-y-2",children:[s.jsxs("a",{href:o,target:"_blank",rel:"noreferrer",className:"tw-flex tw-items-center tw-text-xs tw-font-semibold tw-text-gray-500 tw-underline",children:["Website",s.jsx(H.Link,{className:"tw-ml-1 tw-inline tw-h-4 tw-w-4"})]}),s.jsxs("a",{href:"https://example.com",target:"_blank",rel:"noreferrer",className:"tw-flex tw-items-center tw-text-xs tw-font-semibold tw-text-gray-500 tw-underline",children:["Support",s.jsx(H.CircleHelp,{className:"tw-ml-1 tw-inline tw-h-4 tw-w-4"})]})]})]})}function Fi({id:e,versionHistory:t}){const[n,r]=g.useState(!1),o=new Date;function a(l){const c=new Date(l),d=new Date(o.getTime()-c.getTime()),u=d.getUTCFullYear()-1970,h=d.getUTCMonth(),w=d.getUTCDate()-1;let v="";return u>0?v=`${u.toString()} year${u===1?"":"s"} ago`:h>0?v=`${h.toString()} month${h===1?"":"s"} ago`:w===0?v="today":v=`${w.toString()} day${w===1?"":"s"} ago`,v}const i=Object.entries(t).sort((l,c)=>c[0].localeCompare(l[0]));return s.jsxs("div",{id:e,children:[s.jsx("h3",{className:"tw-text-md tw-font-semibold",children:"What`s New"}),s.jsx("ul",{className:"tw-list-disc tw-pl-5 tw-pr-4 tw-text-xs tw-text-gray-600",children:(n?i:i.slice(0,5)).map(l=>s.jsxs("div",{className:"tw-mt-3 tw-flex tw-justify-between",children:[s.jsx("div",{className:"tw-text-gray-600",children:s.jsx("li",{className:"tw-prose tw-text-xs",children:s.jsx("span",{children:l[1].description})})}),s.jsxs("div",{className:"tw-justify-end tw-text-right",children:[s.jsxs("div",{children:["Version ",l[0]]}),s.jsx("div",{children:a(l[1].date)})]})]},l[0]))}),i.length>5&&s.jsx("button",{type:"button",onClick:()=>r(!n),className:"tw-text-xs tw-text-gray-500 tw-underline",children:n?"Show Less Version History":"Show All Version History"})]})}function Af({id:e,publisherDisplayName:t,fileSize:n,locales:r,versionHistory:o}){const a=g.useMemo(()=>Q.formatBytes(n),[n]),l=(c=>{const d=new Intl.DisplayNames(navigator.language,{type:"language"});return c.map(u=>d.of(u))})(r);return s.jsx("div",{id:e,className:"tw-border-t tw-pb-4 tw-pt-4",children:s.jsxs("div",{className:"tw-md:flex-row tw-md:space-x-8 tw-flex tw-flex-col tw-space-x-0",children:[s.jsx(Fi,{versionHistory:o}),s.jsx("div",{className:"tw-md:border-t-0 tw-md:border-l tw-md-h-auto tw-md-ml-8 tw-mt-4 tw-border-t tw-border-gray-300"}),s.jsxs("div",{className:"tw-md:mt-0 tw-mt-4 tw-flex-1 tw-space-y-3",children:[s.jsx("h2",{className:"tw-text-md tw-font-semibold",children:"Information"}),s.jsxs("div",{className:"tw-flex tw-items-start tw-justify-between tw-pr-4 tw-text-xs tw-text-gray-600",children:[s.jsxs("p",{className:"tw-flex tw-flex-col tw-justify-start",children:[s.jsx("span",{className:"tw-mb-2",children:"Publisher"}),s.jsx("span",{className:"tw-font-semibold",children:t}),s.jsx("span",{className:"tw-mb-2 tw-mt-4",children:"Size"}),s.jsx("span",{className:"tw-font-semibold",children:a})]}),s.jsx("div",{className:"tw-flex tw-w-3/4 tw-items-center tw-justify-between tw-text-xs tw-text-gray-600",children:s.jsxs("p",{className:"tw-flex tw-flex-col tw-justify-start",children:[s.jsx("span",{className:"tw-mb-2",children:"Languages"}),s.jsx("span",{className:"tw-font-semibold",children:l.join(", ")})]})})]})]})]})})}const Bf=["%resources_action%","%resources_dialog_subtitle%","%resources_dialog_title%","%resources_filterInput%","%resources_fullName%","%resources_get%","%resources_installed%","%resources_language%","%resources_languageFilter%","%resources_loadingResources%","%resources_noResults%","%resources_open%","%resources_remove%","%resources_size%","%resources_type%","%resources_type_DBL%","%resources_type_ER%","%resources_type_SLR%","%resources_type_XR%","%resources_type_unknown%","%resources_update%"],Vf=(e,t)=>{const n=Array.from(new Set(e.map(o=>o.bestLanguageName))),r=new Set(t.concat(e.filter(o=>o.installed).map(o=>o.bestLanguageName)));return n.sort((o,a)=>{const i=r.has(o),l=r.has(a);return i&&l?o.localeCompare(a):i?-1:l?1:o.localeCompare(a)})},ea=(e,t,n)=>s.jsx(pe,{variant:"outline",onClick:()=>n(e.dblEntryUid,"install"),children:t}),Lf=(e,t,n,r,o,a)=>t.includes(e.dblEntryUid)?s.jsx(pe,{variant:"outline",children:s.jsx(dt,{className:"tw-h-5 tw-py-[1px]"})}):e.installed?e.updateAvailable?ea(e,r,a):s.jsx(Te,{className:"tw-my-2 tw-flex tw-h-6 tw-items-center",children:o}):ea(e,n,a);function Ff({localizedStrings:e,dblResources:t,isLoadingDblResources:n,typeFilter:r,setTypeFilter:o,languageFilter:a,setLanguageFilter:i,openResource:l,installResource:c,uninstallResource:d}){const u=e["%resources_action%"],h=e["%resources_dialog_subtitle%"],w=e["%resources_dialog_title%"],v=e["%resources_filterInput%"],x=e["%resources_fullName%"],f=e["%resources_get%"],m=e["%resources_installed%"],N=e["%resources_language%"],$=e["%resources_languageFilter%"],R=e["%resources_loadingResources%"],E=e["%resources_noResults%"],b=e["%resources_open%"],I=e["%resources_remove%"],z=e["%resources_size%"],Y=e["%resources_type%"],C=e["%resources_type_DBL%"],_=e["%resources_type_ER%"],k=e["%resources_type_SLR%"],D=e["%resources_type_XR%"],M=e["%resources_type_unknown%"],ee=e["%resources_update%"],[J,q]=g.useState([]),te=(T,L)=>{if(!c||!d)return;const j={dblEntryUid:T,action:L==="install"?"installing":"removing"};q(B=>[...B,j]),(L==="install"?c:d)(T).catch(B=>{console.debug(Q.getErrorMessage(B))})};g.useEffect(()=>{q(T=>T.filter(L=>{const j=t.find(we=>we.dblEntryUid===L.dblEntryUid);return j?!(L.action==="installing"&&j.installed||L.action==="removing"&&!j.installed):!0}))},[t]);const[oe,se]=g.useState(""),y=g.useMemo(()=>t.filter(T=>{const L=oe.toLowerCase();return T.displayName.toLowerCase().includes(L)||T.fullName.toLowerCase().includes(L)||T.bestLanguageName.toLowerCase().includes(L)}),[t,oe]),O=g.useMemo(()=>[{type:"DBLResource",localizedValue:C},{type:"EnhancedResource",localizedValue:_},{type:"SourceLanguageResource",localizedValue:k},{type:"XmlResource",localizedValue:D}],[C,_,k,D]),U=T=>{const L=[...r];let j=[];!L||L.length===0?j=[T]:j=L.includes(T)?L.filter(we=>we!==T):[...L,T],o(j)},G=g.useMemo(()=>y.filter(T=>r.includes(T.type)),[y,r]);g.useEffect(()=>{a.length===0&&i(t.filter(T=>T.installed===!0).map(T=>T.bestLanguageName))},[t,a.length,i]);const F=T=>{const L=[...a];let j=[];!L||L.length===0?j=[T]:j=L.includes(T)?L.filter(we=>we!==T):[...L,T],i(j)},W=g.useMemo(()=>G.filter(T=>a.includes(T.bestLanguageName)),[a,G]),[V,K]=g.useState({key:"bestLanguageName",direction:"ascending"}),X=g.useMemo(()=>[...W].sort((T,L)=>{const j=T[V.key],we=L[V.key];return jwe?V.direction==="ascending"?1:-1:0}),[V.direction,V.key,W]),Z=T=>{const L={key:T,direction:"ascending"};V.key===T&&V.direction==="ascending"&&(L.direction="descending"),K(L)};return s.jsxs(Fo,{className:"tw-rounded-none tw-border-0",children:[s.jsx(zo,{children:s.jsxs("div",{className:"tw-flex tw-items-center",children:[s.jsx(H.BookOpen,{size:36,className:"tw-mr-2"}),s.jsxs("div",{children:[s.jsx(Go,{children:w}),s.jsx(Uo,{className:"tw-mt-1",children:h})]})]})}),s.jsx(qo,{children:n||!t?s.jsxs("div",{className:"tw-flex tw-flex-col tw-items-center tw-gap-2",children:[s.jsx(Te,{children:R}),s.jsx(dt,{})]}):s.jsxs("div",{children:[s.jsxs("div",{className:"tw-mb-1 tw-flex tw-gap-1",children:[s.jsxs("div",{className:"tw-relative",children:[s.jsx(Tt,{type:"text",className:"tw-box-border tw-min-w-72 tw-gap-2.5 tw-rounded-lg tw-border tw-border-solid tw-bg-background tw-py-2 tw-pl-4 tw-pr-3 tw-shadow-none tw-outline-none",onChange:T=>se(T.target.value),value:oe,placeholder:v}),s.jsx(H.Search,{className:"tw-absolute tw-right-3 tw-top-1/2 tw-h-4 tw-w-4 tw--translate-y-1/2 tw-transform tw-text-muted-foreground"})]}),s.jsxs(Lt,{children:[s.jsx(En,{asChild:!0,children:s.jsxs(pe,{variant:"outline",children:[s.jsx(H.Loader,{className:"tw-mr-2 tw-w-4"}),Y]})}),s.jsx(yt,{align:"start",children:O.map(T=>s.jsx(_n,{checked:r.includes(T.type),onClick:L=>{L.preventDefault(),U(T.type)},children:s.jsx("span",{children:T.localizedValue})}))})]}),s.jsx(Jn,{className:"tw-w-auto tw-min-w-10 tw-flex-shrink",buttonPlaceholder:N,textPlaceholder:$,value:a[0],options:Vf(t,a),onChange:F})]}),X.length===0?s.jsx("div",{className:"tw-m-4 tw-flex tw-w-full tw-justify-center",children:s.jsx(Te,{children:E})}):s.jsxs(Zt,{stickyHeader:!0,children:[s.jsx(Qt,{className:"tw-bg-none",stickyHeader:!0,children:s.jsxs(Xe,{children:[s.jsx($e,{}),s.jsx($e,{}),s.jsx($e,{onClick:()=>Z("fullName"),children:s.jsxs("div",{className:"tw-flex tw-items-center",children:[x,V.key!=="fullName"&&s.jsx(H.ChevronsUpDown,{className:"tw-pl-1",size:16}),V.key==="fullName"&&(V.direction==="ascending"?s.jsx(H.ChevronUp,{className:"tw-pl-1",size:16}):s.jsx(H.ChevronDown,{className:"tw-pl-1",size:16}))]})}),s.jsx($e,{onClick:()=>Z("bestLanguageName"),children:s.jsxs("div",{className:"tw-flex tw-items-center",children:[N,V.key!=="bestLanguageName"&&s.jsx(H.ChevronsUpDown,{className:"tw-pl-1",size:16}),V.key==="bestLanguageName"&&(V.direction==="ascending"?s.jsx(H.ChevronUp,{className:"tw-pl-1",size:16}):s.jsx(H.ChevronDown,{className:"tw-pl-1",size:16}))]})}),s.jsx($e,{children:Y}),s.jsx($e,{children:z}),s.jsx($e,{children:u})]})}),s.jsx(en,{children:X.map(T=>{var L;return s.jsxs(Xe,{children:[s.jsx(Se,{children:s.jsx(H.BookOpen,{className:"tw-pr-0",size:18})}),s.jsx(Se,{children:T.displayName}),s.jsx(Se,{className:"tw-font-medium",children:T.fullName}),s.jsx(Se,{children:T.bestLanguageName}),s.jsx(Se,{children:((L=O.find(j=>j.type===T.type))==null?void 0:L.localizedValue)??M}),s.jsx(Se,{children:T.size}),s.jsx(Se,{children:s.jsxs("div",{className:"tw-flex tw-justify-between",children:[Lf(T,J.map(j=>j.dblEntryUid),f,ee,m,te),T.installed&&s.jsxs(Lt,{children:[s.jsx(En,{asChild:!0,children:s.jsx(pe,{variant:"ghost",children:s.jsx(H.Ellipsis,{className:"tw-w-4"})})}),s.jsxs(yt,{align:"start",children:[s.jsx(jn,{onClick:()=>l(T.projectId),children:s.jsx("span",{children:b})}),s.jsx(Jt,{}),s.jsx(jn,{onClick:()=>te(T.dblEntryUid,"remove"),children:s.jsx("span",{children:I})})]})]})]})})]},T.displayName+T.fullName)})})]})]})})]})}const zf=(e,t)=>{g.useEffect(()=>{if(!e)return()=>{};const n=e(t);return()=>{n()}},[e,t])},Vr=()=>!1,Gf=(e,t)=>{const[n]=or(g.useCallback(async()=>{if(!e)return Vr;const r=await Promise.resolve(e(t));return async()=>r()},[t,e]),Vr,{preserveValue:!1});g.useEffect(()=>()=>{n!==Vr&&n()},[n])};Object.defineProperty(exports,"sonner",{enumerable:!0,get:()=>na.toast});exports.Alert=Oi;exports.AlertDescription=_i;exports.AlertTitle=Ri;exports.BOOK_SELECTOR_STRING_KEYS=Jl;exports.Badge=Sf;exports.BookChapterControl=Gl;exports.BookSelectionMode=Na;exports.BookSelector=Zl;exports.Button=pe;exports.Card=Fo;exports.CardContent=qo;exports.CardDescription=Uo;exports.CardFooter=Ii;exports.CardHeader=zo;exports.CardTitle=Go;exports.ChapterRangeSelector=ya;exports.Checkbox=ar;exports.Checklist=jc;exports.ComboBox=Jn;exports.DataTable=Ca;exports.DisableButton=_f;exports.DropdownMenu=Lt;exports.DropdownMenuCheckboxItem=_n;exports.DropdownMenuContent=yt;exports.DropdownMenuGroup=pa;exports.DropdownMenuItem=jn;exports.DropdownMenuItemType=Li;exports.DropdownMenuLabel=Kt;exports.DropdownMenuPortal=Rl;exports.DropdownMenuRadioGroup=Pl;exports.DropdownMenuRadioItem=no;exports.DropdownMenuSeparator=Jt;exports.DropdownMenuShortcut=ma;exports.DropdownMenuSub=_l;exports.DropdownMenuSubContent=fa;exports.DropdownMenuSubTrigger=wa;exports.DropdownMenuTrigger=En;exports.EnableButton=Rf;exports.FILTERABLE_RESOURCE_LIST_STRING_KEYS=Bf;exports.FilterButton=Vi;exports.FilterDropdown=$f;exports.FilterableResourceList=Ff;exports.Footer=Af;exports.GridMenu=Ti;exports.HamburgerMenuButton=Ci;exports.INVENTORY_STRING_KEYS=ic;exports.IconButton=Nf;exports.Input=Tt;exports.InstallButton=Of;exports.Inventory=dc;exports.Label=Te;exports.MarkdownRenderer=If;exports.MenuItem=Lo;exports.MoreInfo=Df;exports.MultiSelectComboBox=uc;exports.NavigationContentSearch=pc;exports.NoExtensionsFound=Mf;exports.RadioGroup=ro;exports.RadioGroupItem=Kn;exports.ScriptureResultsViewer=xc;exports.ScrollGroupSelector=yc;exports.SearchBar=$a;exports.Select=Ft;exports.SelectContent=kt;exports.SelectGroup=ka;exports.SelectItem=Ve;exports.SelectLabel=Ea;exports.SelectScrollDownButton=po;exports.SelectScrollUpButton=uo;exports.SelectSeparator=ja;exports.SelectTrigger=Nt;exports.SelectValue=zt;exports.Separator=go;exports.SettingsList=Nc;exports.SettingsListHeader=Ec;exports.SettingsListItem=kc;exports.Slider=$i;exports.Sonner=Tf;exports.Spinner=dt;exports.Switch=Mi;exports.Table=Zt;exports.TableBody=en;exports.TableCaption=Ta;exports.TableCell=Se;exports.TableFooter=Sa;exports.TableHead=$e;exports.TableHeader=Qt;exports.TableRow=Xe;exports.Tabs=Cf;exports.TabsContent=Bi;exports.TabsList=Di;exports.TabsTrigger=Ai;exports.TextField=kf;exports.ToggleGroup=wo;exports.ToggleGroupItem=bn;exports.Toolbar=Ef;exports.UpdateButton=Pf;exports.VersionHistory=Fi;exports.VerticalTabs=fo;exports.VerticalTabsContent=ho;exports.VerticalTabsList=mo;exports.VerticalTabsTrigger=Ma;exports.badgeVariants=Pi;exports.buttonVariants=ha;exports.cn=S;exports.getBookNumFromId=Ra;exports.getLinesFromUSFM=Oa;exports.getNumberFromUSFM=Gr;exports.getStatusForItem=_a;exports.inventoryCountColumn=sc;exports.inventoryItemColumn=rc;exports.inventoryStatusColumn=ac;exports.useEvent=zf;exports.useEventAsync=Gf;exports.usePromise=or;function Uf(e,t="top"){if(!e||typeof document>"u")return;const n=document.head||document.querySelector("head"),r=n.querySelector(":first-child"),o=document.createElement("style");o.appendChild(document.createTextNode(e)),t==="top"&&r?n.insertBefore(o,r):n.appendChild(o)}Uf(`*, ::before, ::after { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; @@ -1204,6 +1204,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-m-2 { margin: 0.5rem; } +.tw-m-4 { + margin: 1rem; +} .tw--mx-1 { margin-left: -0.25rem; margin-right: -0.25rem; @@ -1502,6 +1505,12 @@ video:where(.pr-twp,.pr-twp *) { .tw-w-full { width: 100%; } +.tw-min-w-10 { + min-width: 2.5rem; +} +.tw-min-w-72 { + min-width: 18rem; +} .tw-min-w-\\[8rem\\] { min-width: 8rem; } @@ -1523,6 +1532,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-flex-1 { flex: 1 1 0%; } +.tw-flex-shrink { + flex-shrink: 1; +} .tw-flex-shrink-0 { flex-shrink: 0; } @@ -1773,6 +1785,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-rounded-md { border-radius: calc(var(--radius) - 2px); } +.tw-rounded-none { + border-radius: 0px; +} .tw-rounded-sm { border-radius: calc(var(--radius) - 4px); } @@ -1981,6 +1996,9 @@ video:where(.pr-twp,.pr-twp *) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); } +.tw-bg-none { + background-image: none; +} .tw-fill-current { fill: currentColor; } @@ -2072,6 +2090,10 @@ video:where(.pr-twp,.pr-twp *) { padding-top: 1.5rem; padding-bottom: 1.5rem; } +.tw-py-\\[1px\\] { + padding-top: 1px; + padding-bottom: 1px; +} .tw-pb-2 { padding-bottom: 0.5rem; } @@ -2090,6 +2112,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-pe-9 { padding-inline-end: 2.25rem; } +.tw-pl-1 { + padding-left: 0.25rem; +} .tw-pl-4 { padding-left: 1rem; } @@ -2099,6 +2124,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-pl-8 { padding-left: 2rem; } +.tw-pr-0 { + padding-right: 0px; +} .tw-pr-2 { padding-right: 0.5rem; } @@ -3175,6 +3203,19 @@ video:where(.pr-twp,.pr-twp *) { .\\[\\&_tr\\]\\:tw-border-b tr { border-bottom-width: 1px; } +.papi-menu-item { + background-color: transparent; +} + +.papi-menu-icon-trailing { + margin-left: 10px; + place-content: flex-end; +} + +.papi-menu-item img { + max-width: 24px; + max-height: 24px; +} .papi-icon-button { border: 0; border-radius: 3em; @@ -3235,18 +3276,12 @@ video:where(.pr-twp,.pr-twp *) { color: rgb(76, 106, 76); background-color: rgb(214, 255, 152); } -.papi-menu-item { - background-color: transparent; -} - -.papi-menu-icon-trailing { - margin-left: 10px; - place-content: flex-end; +.banded-row:hover { + cursor: pointer; } -.papi-menu-item img { - max-width: 24px; - max-height: 24px; +.banded-row[data-state='selected']:hover { + cursor: default; } .papi-menu-drawer-paper { height: fit-content !important; @@ -3258,12 +3293,5 @@ video:where(.pr-twp,.pr-twp *) { display: flex; gap: 8px; } -.banded-row:hover { - cursor: pointer; -} - -.banded-row[data-state='selected']:hover { - cursor: default; -} `,"top"); //# sourceMappingURL=index.cjs.map diff --git a/lib/platform-bible-react/dist/index.cjs.map b/lib/platform-bible-react/dist/index.cjs.map index 8934654fe3..2d4ceda70e 100644 --- a/lib/platform-bible-react/dist/index.cjs.map +++ b/lib/platform-bible-react/dist/index.cjs.map @@ -1 +1 @@ -{"version":3,"file":"index.cjs","sources":["../src/utils/shadcn-ui.util.ts","../src/components/shadcn-ui/input.tsx","../src/components/advanced/book-chapter-control/book-chapter-input.component.tsx","../../../node_modules/@sillsdev/scripture/dist/index.es.js","../src/components/shadcn-ui/dropdown-menu.tsx","../src/components/advanced/book-chapter-control/book-menu-item.component.tsx","../src/components/advanced/book-chapter-control/chapter-select.component.tsx","../src/components/advanced/book-chapter-control/go-to-menu-item.component.tsx","../src/components/advanced/book-chapter-control/book-chapter-control.component.tsx","../src/components/shadcn-ui/button.tsx","../src/components/shadcn-ui/label.tsx","../src/components/shadcn-ui/radio-group.tsx","../src/components/shadcn-ui/popover.tsx","../src/components/shadcn-ui/dialog.tsx","../src/components/shadcn-ui/command.tsx","../src/components/basics/combo-box.component.tsx","../src/components/basics/chapter-range-selector.component.tsx","../src/components/advanced/book-selector.component.tsx","../src/components/advanced/data-table/data-table-column-toggle.component.tsx","../src/components/shadcn-ui/select.tsx","../src/components/advanced/data-table/data-table-pagination.component.tsx","../src/components/shadcn-ui/table.tsx","../src/components/advanced/data-table/data-table.component.tsx","../src/components/advanced/inventory/occurrences-table.component.tsx","../src/components/shadcn-ui/checkbox.tsx","../src/components/advanced/inventory/inventory-utils.ts","../src/components/shadcn-ui/toggle.tsx","../src/components/shadcn-ui/toggle-group.tsx","../src/components/advanced/inventory/inventory-columns.tsx","../src/components/advanced/inventory/inventory.component.tsx","../src/components/advanced/multi-select-combo-box.tsx","../src/components/basics/search-bar.component.tsx","../src/components/basics/tabs-vertical.tsx","../src/components/advanced/navigation-content-search.component.tsx","../src/components/advanced/scripture-results-viewer/scripture-results-viewer.component.tsx","../src/components/advanced/scroll-group-selector.component.tsx","../src/components/shadcn-ui/separator.tsx","../src/components/advanced/settings-components/settings-list.component.tsx","../src/components/basics/checklist.component.tsx","../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/@mui/utils/chainPropTypes/chainPropTypes.js","../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../node_modules/@mui/utils/deepmerge/deepmerge.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../node_modules/prop-types/node_modules/react-is/index.js","../../../node_modules/object-assign/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/lib/has.js","../../../node_modules/prop-types/checkPropTypes.js","../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.js","../../../node_modules/@mui/utils/exactProp/exactProp.js","../../../node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/cjs/react-is.development.js","../../../node_modules/react-is/index.js","../../../node_modules/@mui/utils/getDisplayName/getDisplayName.js","../../../node_modules/@mui/utils/HTMLElementType/HTMLElementType.js","../../../node_modules/@mui/utils/refType/refType.js","../../../node_modules/@mui/utils/capitalize/capitalize.js","../../../node_modules/@mui/utils/createChainedFunction/createChainedFunction.js","../../../node_modules/@mui/utils/debounce/debounce.js","../../../node_modules/@mui/utils/deprecatedPropType/deprecatedPropType.js","../../../node_modules/@mui/utils/isMuiElement/isMuiElement.js","../../../node_modules/@mui/utils/ownerDocument/ownerDocument.js","../../../node_modules/@mui/utils/ownerWindow/ownerWindow.js","../../../node_modules/@mui/utils/requirePropFactory/requirePropFactory.js","../../../node_modules/@mui/utils/setRef/setRef.js","../../../node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.js","../../../node_modules/@mui/utils/useId/useId.js","../../../node_modules/@mui/utils/unsupportedProp/unsupportedProp.js","../../../node_modules/@mui/utils/useControlled/useControlled.js","../../../node_modules/@mui/utils/useEventCallback/useEventCallback.js","../../../node_modules/@mui/utils/useForkRef/useForkRef.js","../../../node_modules/@mui/utils/useLazyRef/useLazyRef.js","../../../node_modules/@mui/utils/useOnMount/useOnMount.js","../../../node_modules/@mui/utils/useTimeout/useTimeout.js","../../../node_modules/@mui/utils/useIsFocusVisible/useIsFocusVisible.js","../../../node_modules/@mui/utils/resolveProps/resolveProps.js","../../../node_modules/@mui/utils/composeClasses/composeClasses.js","../../../node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.js","../../../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js","../../../node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js","../../../node_modules/@mui/utils/clamp/clamp.js","../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../node_modules/@mui/system/esm/createTheme/createBreakpoints.js","../../../node_modules/@mui/system/esm/createTheme/shape.js","../../../node_modules/@mui/system/esm/responsivePropType.js","../../../node_modules/@mui/system/esm/merge.js","../../../node_modules/@mui/system/esm/breakpoints.js","../../../node_modules/@mui/system/esm/style.js","../../../node_modules/@mui/system/esm/memoize.js","../../../node_modules/@mui/system/esm/spacing.js","../../../node_modules/@mui/system/esm/createTheme/createSpacing.js","../../../node_modules/@mui/system/esm/compose.js","../../../node_modules/@mui/system/esm/borders.js","../../../node_modules/@mui/system/esm/cssGrid.js","../../../node_modules/@mui/system/esm/palette.js","../../../node_modules/@mui/system/esm/sizing.js","../../../node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","../../../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","../../../node_modules/@mui/system/esm/createTheme/applyStyles.js","../../../node_modules/@mui/system/esm/createTheme/createTheme.js","../../../node_modules/@mui/system/esm/useThemeWithoutDefault.js","../../../node_modules/@mui/system/esm/useTheme.js","../../../node_modules/@mui/system/esm/createStyled.js","../../../node_modules/@mui/system/esm/useThemeProps/getThemeProps.js","../../../node_modules/@mui/system/esm/useThemeProps/useThemeProps.js","../../../node_modules/@mui/system/esm/colorManipulator.js","../../../node_modules/@mui/material/styles/createMixins.js","../../../node_modules/@mui/material/colors/common.js","../../../node_modules/@mui/material/colors/grey.js","../../../node_modules/@mui/material/colors/purple.js","../../../node_modules/@mui/material/colors/red.js","../../../node_modules/@mui/material/colors/orange.js","../../../node_modules/@mui/material/colors/blue.js","../../../node_modules/@mui/material/colors/lightBlue.js","../../../node_modules/@mui/material/colors/green.js","../../../node_modules/@mui/material/styles/createPalette.js","../../../node_modules/@mui/material/styles/createTypography.js","../../../node_modules/@mui/material/styles/shadows.js","../../../node_modules/@mui/material/styles/createTransitions.js","../../../node_modules/@mui/material/styles/zIndex.js","../../../node_modules/@mui/material/styles/createTheme.js","../../../node_modules/@mui/material/styles/defaultTheme.js","../../../node_modules/@mui/material/styles/identifier.js","../../../node_modules/@mui/material/styles/useThemeProps.js","../../../node_modules/@mui/material/styles/styled.js","../../../node_modules/@mui/material/SvgIcon/svgIconClasses.js","../../../node_modules/@mui/material/SvgIcon/SvgIcon.js","../../../node_modules/@mui/material/utils/createSvgIcon.js","../../../node_modules/@mui/material/utils/index.js","../../../node_modules/@mui/icons-material/utils/createSvgIcon.js","../../../node_modules/@mui/icons-material/ArrowRight.js","../../../node_modules/@mui/base/utils/isHostComponent.js","../../../node_modules/@mui/base/utils/appendOwnerState.js","../../../node_modules/@mui/base/utils/ClassNameConfigurator.js","../../../node_modules/@mui/base/utils/extractEventHandlers.js","../../../node_modules/@mui/base/utils/resolveComponentProps.js","../../../node_modules/@mui/base/utils/omitEventHandlers.js","../../../node_modules/@mui/base/utils/mergeSlotProps.js","../../../node_modules/@mui/base/utils/useSlotProps.js","../../../node_modules/@mui/base/generateUtilityClass/index.js","../../../node_modules/@mui/base/generateUtilityClasses/index.js","../../../node_modules/@mui/base/Portal/Portal.js","../../../node_modules/@popperjs/core/lib/enums.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../node_modules/@popperjs/core/lib/utils/math.js","../../../node_modules/@popperjs/core/lib/utils/userAgent.js","../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../node_modules/@popperjs/core/lib/utils/within.js","../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../node_modules/@popperjs/core/lib/utils/debounce.js","../../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../node_modules/@popperjs/core/lib/createPopper.js","../../../node_modules/@popperjs/core/lib/popper.js","../../../node_modules/@mui/base/Popper/popperClasses.js","../../../node_modules/@mui/base/Popper/Popper.js","../../../node_modules/@mui/material/styles/useTheme.js","../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../node_modules/react-transition-group/esm/config.js","../../../node_modules/react-transition-group/esm/utils/PropTypes.js","../../../node_modules/react-transition-group/esm/TransitionGroupContext.js","../../../node_modules/react-transition-group/esm/utils/reflow.js","../../../node_modules/react-transition-group/esm/Transition.js","../../../node_modules/@mui/material/transitions/utils.js","../../../node_modules/@mui/material/Grow/Grow.js","../../../node_modules/@mui/material/Popper/Popper.js","../../../node_modules/@mui/material/Tooltip/tooltipClasses.js","../../../node_modules/@mui/material/Tooltip/Tooltip.js","../src/components/mui/menu-item.component.tsx","../src/components/mui/grouped-menu-item-list.component.tsx","../src/components/mui/top-level-menu.component.tsx","../src/components/mui/grid-menu.component.tsx","../src/hooks/use-promise.hook.ts","../../../node_modules/@mui/icons-material/esm/Menu.js","../src/components/mui/hamburger-menu-button.component.tsx","../src/components/mui/icon-button.component.tsx","../src/components/basics/spinner.component.tsx","../src/components/basics/text-field.component.tsx","../src/components/mui/toolbar.component.tsx","../src/components/shadcn-ui/alert.tsx","../src/components/shadcn-ui/badge.tsx","../src/components/shadcn-ui/card.tsx","../src/components/shadcn-ui/sonner.tsx","../src/components/shadcn-ui/slider.tsx","../src/components/shadcn-ui/switch.tsx","../src/components/shadcn-ui/tabs.tsx","../src/components/advanced/extension-marketplace/buttons/install-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/enable-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/disable-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/update-button.component.tsx","../src/components/advanced/extension-marketplace/markdown-renderer.component.tsx","../src/components/advanced/extension-marketplace/buttons/filter-button.component.tsx","../src/components/advanced/extension-marketplace/filter-dropdown.component.tsx","../src/components/advanced/extension-marketplace/no-extensions-found.component.tsx","../src/components/advanced/extension-marketplace/more-info.component.tsx","../src/components/advanced/extension-marketplace/version-history.component.tsx","../src/components/advanced/extension-marketplace/footer.component.tsx","../src/hooks/use-event.hook.ts","../src/hooks/use-event-async.hook.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst twMergeCustom = extendTailwindMerge({ prefix: 'tw-' });\n\n/**\n * Tailwind and CSS class application helper function. Uses\n * [`clsx`](https://www.npmjs.com/package/clsx) to make it easy to apply classes conditionally using\n * object syntax, and uses [`tailwind-merge`](https://www.npmjs.com/package/tailwind-merge) to make\n * it easy to merge/overwrite Tailwind classes in a programmer-logic-friendly way.\n *\n * Note: `tailwind-merge` is configured to use the prefix `tw-`, so you must use the same prefix\n * with any Tailwind classes you use with this function to successfully overwrite other Tailwind\n * classes. `platform-bible-react` is configured to use `tw-` as its Tailwind prefix, so any\n * Tailwind classes you pass into `platform-bible-react` components will be compared using the `tw-`\n * prefix.\n *\n * This function was popularized by\n * [shadcn/ui](https://ui.shadcn.com/docs/installation/manual#add-a-cn-helper). See [ByteGrad's\n * explanation video](https://www.youtube.com/watch?v=re2JFITR7TI) for more information.\n *\n * @example\n *\n * ```typescript\n * const borderShouldBeBlue = true;\n * const textShouldBeRed = true;\n * const heightShouldBe20 = false;\n * const classString = cn(\n * 'tw-bg-primary tw-h-10 tw-text-primary-foreground',\n * 'tw-bg-secondary',\n * {\n * 'tw-border-blue-500': borderShouldBeBlue,\n * 'tw-text-red-500': textShouldBeRed,\n * 'tw-h-20': heightShouldBe20,\n * },\n * 'some-class',\n * );\n * ```\n *\n * The resulting `classString` is `'tw-h-10 tw-bg-secondary tw-border-blue-500 tw-text-red-500\n * some-class'`\n *\n * - Notice that `'tw-bg-secondary'`, specified later, overwrote `'tw-bg-primary'`, specified earlier,\n * because they are Tailwind classes that affect the same css property\n * - Notice that `'tw-text-red-500'`, specified later, overwrote `'tw-text-primary-foreground'`,\n * specified earlier, because they are Tailwind classes that affect the same css property\n * - Notice that `'tw-h-20'`, specified later, did not overwrite `'tw-h-10'`, specified earlier,\n * because `'tw-h-20'` is part of a conditional class object and its value evaluated to `false`;\n * therefore it was not applied\n * - Notice that `'some-class'` was applied. This function is not limited only to Tailwind classes.\n *\n *\n * @param inputs Class strings or `clsx` conditional class objects to merge. Tailwind classes\n * specified later in the arguments overwrite similar Tailwind classes specified earlier in the\n * arguments\n * @returns Class string containing all applicable classes from the arguments based on the rules\n * described above\n */\n// shadcn/ui uses this export in its boilerplate code\n// eslint-disable-next-line import/prefer-default-export\nexport function cn(...inputs: ClassValue[]) {\n return twMergeCustom(clsx(inputs));\n}\n","import React from 'react';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport interface InputProps extends React.InputHTMLAttributes {}\n\nexport const Input = React.forwardRef(\n ({ className, type, ...props }, ref) => {\n return (\n \n );\n },\n);\nInput.displayName = 'Input';\n","import { FocusEventHandler, forwardRef, KeyboardEvent, MouseEventHandler } from 'react';\nimport { History } from 'lucide-react';\nimport { Input as ShadInput } from '@/components/shadcn-ui/input';\n\nexport type BookChapterInputProps = {\n handleSearch: (searchString: string) => void;\n handleKeyDown: (event: KeyboardEvent) => void;\n handleOnClick: MouseEventHandler;\n handleSubmit: () => void;\n onFocus?: FocusEventHandler;\n value: string;\n placeholder: string;\n};\n\n// Shadcn Input sets type to \"button\"- HAVE to prop spread before setting type\nconst BookChapterInput = forwardRef(\n (\n { handleSearch, handleKeyDown, handleOnClick, handleSubmit, ...props }: BookChapterInputProps,\n ref,\n ) => {\n return (\n
\n handleSearch(event.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n handleSubmit();\n }\n handleKeyDown(e);\n }}\n onClick={handleOnClick}\n ref={ref}\n />\n {\n // eslint-disable-next-line no-console\n console.log('back in history');\n }}\n />\n
\n );\n },\n);\n\nexport default BookChapterInput;\n","var P = Object.defineProperty;\nvar R = (t, e, s) => e in t ? P(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;\nvar n = (t, e, s) => R(t, typeof e != \"symbol\" ? e + \"\" : e, s);\nclass _ {\n constructor() {\n n(this, \"books\");\n n(this, \"firstSelectedBookNum\");\n n(this, \"lastSelectedBookNum\");\n n(this, \"count\");\n n(this, \"selectedBookNumbers\");\n n(this, \"selectedBookIds\");\n }\n}\nconst N = [\n \"GEN\",\n \"EXO\",\n \"LEV\",\n \"NUM\",\n \"DEU\",\n \"JOS\",\n \"JDG\",\n \"RUT\",\n \"1SA\",\n \"2SA\",\n // 10\n \"1KI\",\n \"2KI\",\n \"1CH\",\n \"2CH\",\n \"EZR\",\n \"NEH\",\n \"EST\",\n \"JOB\",\n \"PSA\",\n \"PRO\",\n // 20\n \"ECC\",\n \"SNG\",\n \"ISA\",\n \"JER\",\n \"LAM\",\n \"EZK\",\n \"DAN\",\n \"HOS\",\n \"JOL\",\n \"AMO\",\n // 30\n \"OBA\",\n \"JON\",\n \"MIC\",\n \"NAM\",\n \"HAB\",\n \"ZEP\",\n \"HAG\",\n \"ZEC\",\n \"MAL\",\n \"MAT\",\n // 40\n \"MRK\",\n \"LUK\",\n \"JHN\",\n \"ACT\",\n \"ROM\",\n \"1CO\",\n \"2CO\",\n \"GAL\",\n \"EPH\",\n \"PHP\",\n // 50\n \"COL\",\n \"1TH\",\n \"2TH\",\n \"1TI\",\n \"2TI\",\n \"TIT\",\n \"PHM\",\n \"HEB\",\n \"JAS\",\n \"1PE\",\n // 60\n \"2PE\",\n \"1JN\",\n \"2JN\",\n \"3JN\",\n \"JUD\",\n \"REV\",\n \"TOB\",\n \"JDT\",\n \"ESG\",\n \"WIS\",\n // 70\n \"SIR\",\n \"BAR\",\n \"LJE\",\n \"S3Y\",\n \"SUS\",\n \"BEL\",\n \"1MA\",\n \"2MA\",\n \"3MA\",\n \"4MA\",\n // 80\n \"1ES\",\n \"2ES\",\n \"MAN\",\n \"PS2\",\n \"ODA\",\n \"PSS\",\n \"JSA\",\n // actual variant text for JOS, now in LXA text\n \"JDB\",\n // actual variant text for JDG, now in LXA text\n \"TBS\",\n // actual variant text for TOB, now in LXA text\n \"SST\",\n // actual variant text for SUS, now in LXA text // 90\n \"DNT\",\n // actual variant text for DAN, now in LXA text\n \"BLT\",\n // actual variant text for BEL, now in LXA text\n \"XXA\",\n \"XXB\",\n \"XXC\",\n \"XXD\",\n \"XXE\",\n \"XXF\",\n \"XXG\",\n \"FRT\",\n // 100\n \"BAK\",\n \"OTH\",\n \"3ES\",\n // Used previously but really should be 2ES\n \"EZA\",\n // Used to be called 4ES, but not actually in any known project\n \"5EZ\",\n // Used to be called 5ES, but not actually in any known project\n \"6EZ\",\n // Used to be called 6ES, but not actually in any known project\n \"INT\",\n \"CNC\",\n \"GLO\",\n \"TDX\",\n // 110\n \"NDX\",\n \"DAG\",\n \"PS3\",\n \"2BA\",\n \"LBA\",\n \"JUB\",\n \"ENO\",\n \"1MQ\",\n \"2MQ\",\n \"3MQ\",\n // 120\n \"REP\",\n \"4BA\",\n \"LAO\"\n], B = [\n \"XXA\",\n \"XXB\",\n \"XXC\",\n \"XXD\",\n \"XXE\",\n \"XXF\",\n \"XXG\",\n \"FRT\",\n \"BAK\",\n \"OTH\",\n \"INT\",\n \"CNC\",\n \"GLO\",\n \"TDX\",\n \"NDX\"\n], O = [\n \"Genesis\",\n \"Exodus\",\n \"Leviticus\",\n \"Numbers\",\n \"Deuteronomy\",\n \"Joshua\",\n \"Judges\",\n \"Ruth\",\n \"1 Samuel\",\n \"2 Samuel\",\n \"1 Kings\",\n \"2 Kings\",\n \"1 Chronicles\",\n \"2 Chronicles\",\n \"Ezra\",\n \"Nehemiah\",\n \"Esther (Hebrew)\",\n \"Job\",\n \"Psalms\",\n \"Proverbs\",\n \"Ecclesiastes\",\n \"Song of Songs\",\n \"Isaiah\",\n \"Jeremiah\",\n \"Lamentations\",\n \"Ezekiel\",\n \"Daniel (Hebrew)\",\n \"Hosea\",\n \"Joel\",\n \"Amos\",\n \"Obadiah\",\n \"Jonah\",\n \"Micah\",\n \"Nahum\",\n \"Habakkuk\",\n \"Zephaniah\",\n \"Haggai\",\n \"Zechariah\",\n \"Malachi\",\n \"Matthew\",\n \"Mark\",\n \"Luke\",\n \"John\",\n \"Acts\",\n \"Romans\",\n \"1 Corinthians\",\n \"2 Corinthians\",\n \"Galatians\",\n \"Ephesians\",\n \"Philippians\",\n \"Colossians\",\n \"1 Thessalonians\",\n \"2 Thessalonians\",\n \"1 Timothy\",\n \"2 Timothy\",\n \"Titus\",\n \"Philemon\",\n \"Hebrews\",\n \"James\",\n \"1 Peter\",\n \"2 Peter\",\n \"1 John\",\n \"2 John\",\n \"3 John\",\n \"Jude\",\n \"Revelation\",\n \"Tobit\",\n \"Judith\",\n \"Esther Greek\",\n \"Wisdom of Solomon\",\n \"Sirach (Ecclesiasticus)\",\n \"Baruch\",\n \"Letter of Jeremiah\",\n \"Song of 3 Young Men\",\n \"Susanna\",\n \"Bel and the Dragon\",\n \"1 Maccabees\",\n \"2 Maccabees\",\n \"3 Maccabees\",\n \"4 Maccabees\",\n \"1 Esdras (Greek)\",\n \"2 Esdras (Latin)\",\n \"Prayer of Manasseh\",\n \"Psalm 151\",\n \"Odes\",\n \"Psalms of Solomon\",\n // WARNING, if you change the spelling of the *obsolete* tag be sure to update\n // IsObsolete routine\n \"Joshua A. *obsolete*\",\n \"Judges B. *obsolete*\",\n \"Tobit S. *obsolete*\",\n \"Susanna Th. *obsolete*\",\n \"Daniel Th. *obsolete*\",\n \"Bel Th. *obsolete*\",\n \"Extra A\",\n \"Extra B\",\n \"Extra C\",\n \"Extra D\",\n \"Extra E\",\n \"Extra F\",\n \"Extra G\",\n \"Front Matter\",\n \"Back Matter\",\n \"Other Matter\",\n \"3 Ezra *obsolete*\",\n \"Apocalypse of Ezra\",\n \"5 Ezra (Latin Prologue)\",\n \"6 Ezra (Latin Epilogue)\",\n \"Introduction\",\n \"Concordance \",\n \"Glossary \",\n \"Topical Index\",\n \"Names Index\",\n \"Daniel Greek\",\n \"Psalms 152-155\",\n \"2 Baruch (Apocalypse)\",\n \"Letter of Baruch\",\n \"Jubilees\",\n \"Enoch\",\n \"1 Meqabyan\",\n \"2 Meqabyan\",\n \"3 Meqabyan\",\n \"Reproof (Proverbs 25-31)\",\n \"4 Baruch (Rest of Baruch)\",\n \"Laodiceans\"\n], S = K();\nfunction g(t, e = !0) {\n return e && (t = t.toUpperCase()), t in S ? S[t] : 0;\n}\nfunction k(t) {\n return g(t) > 0;\n}\nfunction x(t) {\n const e = typeof t == \"string\" ? g(t) : t;\n return e >= 40 && e <= 66;\n}\nfunction T(t) {\n return (typeof t == \"string\" ? g(t) : t) <= 39;\n}\nfunction X(t) {\n return t <= 66;\n}\nfunction V(t) {\n const e = typeof t == \"string\" ? g(t) : t;\n return w(e) && !X(e);\n}\nfunction* L() {\n for (let t = 1; t <= N.length; t++) yield t;\n}\nconst G = 1, A = N.length;\nfunction H() {\n return [\"XXA\", \"XXB\", \"XXC\", \"XXD\", \"XXE\", \"XXF\", \"XXG\"];\n}\nfunction C(t, e = \"***\") {\n const s = t - 1;\n return s < 0 || s >= N.length ? e : N[s];\n}\nfunction I(t) {\n return t <= 0 || t > A ? \"******\" : O[t - 1];\n}\nfunction y(t) {\n return I(g(t));\n}\nfunction w(t) {\n const e = typeof t == \"number\" ? C(t) : t;\n return k(e) && !B.includes(e);\n}\nfunction q(t) {\n const e = typeof t == \"number\" ? C(t) : t;\n return k(e) && B.includes(e);\n}\nfunction U(t) {\n return O[t - 1].includes(\"*obsolete*\");\n}\nfunction K() {\n const t = {};\n for (let e = 0; e < N.length; e++)\n t[N[e]] = e + 1;\n return t;\n}\nconst m = {\n allBookIds: N,\n nonCanonicalIds: B,\n bookIdToNumber: g,\n isBookIdValid: k,\n isBookNT: x,\n isBookOT: T,\n isBookOTNT: X,\n isBookDC: V,\n allBookNumbers: L,\n firstBook: G,\n lastBook: A,\n extraBooks: H,\n bookNumberToId: C,\n bookNumberToEnglishName: I,\n bookIdToEnglishName: y,\n isCanonical: w,\n isExtraMaterial: q,\n isObsolete: U\n};\nvar l = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = \"Unknown\", t[t.Original = 1] = \"Original\", t[t.Septuagint = 2] = \"Septuagint\", t[t.Vulgate = 3] = \"Vulgate\", t[t.English = 4] = \"English\", t[t.RussianProtestant = 5] = \"RussianProtestant\", t[t.RussianOrthodox = 6] = \"RussianOrthodox\", t))(l || {});\nconst h = class h {\n // private versInfo: Versification;\n constructor(e) {\n n(this, \"name\");\n n(this, \"fullPath\");\n n(this, \"isPresent\");\n n(this, \"hasVerseSegments\");\n n(this, \"isCustomized\");\n n(this, \"baseVersification\");\n n(this, \"scriptureBooks\");\n n(this, \"_type\");\n if (e == null)\n throw new Error(\"Argument undefined\");\n typeof e == \"string\" ? (this.name = e, this._type = l[e]) : (this._type = e, this.name = l[e]);\n }\n get type() {\n return this._type;\n }\n equals(e) {\n return !e.type || !this.type ? !1 : e.type === this.type;\n }\n};\nn(h, \"Original\", new h(l.Original)), n(h, \"Septuagint\", new h(l.Septuagint)), n(h, \"Vulgate\", new h(l.Vulgate)), n(h, \"English\", new h(l.English)), n(h, \"RussianProtestant\", new h(l.RussianProtestant)), n(h, \"RussianOrthodox\", new h(l.RussianOrthodox));\nlet c = h;\nfunction E(t, e) {\n const s = e[0];\n for (let r = 1; r < e.length; r++)\n t = t.split(e[r]).join(s);\n return t.split(s);\n}\nvar D = /* @__PURE__ */ ((t) => (t[t.Valid = 0] = \"Valid\", t[t.UnknownVersification = 1] = \"UnknownVersification\", t[t.OutOfRange = 2] = \"OutOfRange\", t[t.VerseOutOfOrder = 3] = \"VerseOutOfOrder\", t[t.VerseRepeated = 4] = \"VerseRepeated\", t))(D || {});\nconst i = class i {\n constructor(e, s, r, a) {\n /** Not yet implemented. */\n n(this, \"firstChapter\");\n /** Not yet implemented. */\n n(this, \"lastChapter\");\n /** Not yet implemented. */\n n(this, \"lastVerse\");\n /** Not yet implemented. */\n n(this, \"hasSegmentsDefined\");\n /** Not yet implemented. */\n n(this, \"text\");\n /** Not yet implemented. */\n n(this, \"BBBCCCVVVS\");\n /** Not yet implemented. */\n n(this, \"longHashCode\");\n /** The versification of the reference. */\n n(this, \"versification\");\n n(this, \"rtlMark\", \"‏\");\n n(this, \"_bookNum\", 0);\n n(this, \"_chapterNum\", 0);\n n(this, \"_verseNum\", 0);\n n(this, \"_verse\");\n if (r == null && a == null)\n if (e != null && typeof e == \"string\") {\n const o = e, u = s != null && s instanceof c ? s : void 0;\n this.setEmpty(u), this.parse(o);\n } else if (e != null && typeof e == \"number\") {\n const o = s != null && s instanceof c ? s : void 0;\n this.setEmpty(o), this._verseNum = e % i.chapterDigitShifter, this._chapterNum = Math.floor(\n e % i.bookDigitShifter / i.chapterDigitShifter\n ), this._bookNum = Math.floor(e / i.bookDigitShifter);\n } else if (s == null)\n if (e != null && e instanceof i) {\n const o = e;\n this._bookNum = o.bookNum, this._chapterNum = o.chapterNum, this._verseNum = o.verseNum, this._verse = o.verse, this.versification = o.versification;\n } else {\n if (e == null) return;\n const o = e instanceof c ? e : i.defaultVersification;\n this.setEmpty(o);\n }\n else\n throw new Error(\"VerseRef constructor not supported.\");\n else if (e != null && s != null && r != null)\n if (typeof e == \"string\" && typeof s == \"string\" && typeof r == \"string\")\n this.setEmpty(a), this.updateInternal(e, s, r);\n else if (typeof e == \"number\" && typeof s == \"number\" && typeof r == \"number\")\n this._bookNum = e, this._chapterNum = s, this._verseNum = r, this.versification = a ?? i.defaultVersification;\n else\n throw new Error(\"VerseRef constructor not supported.\");\n else\n throw new Error(\"VerseRef constructor not supported.\");\n }\n /**\n * Determines if the verse string is in a valid format (does not consider versification).\n */\n static isVerseParseable(e) {\n return e.length > 0 && \"0123456789\".includes(e[0]) && !e.endsWith(this.verseRangeSeparator) && !e.endsWith(this.verseSequenceIndicator);\n }\n /**\n * Tries to parse the specified string into a verse reference.\n * @param str - The string to attempt to parse.\n * @returns success: `true` if the specified string was successfully parsed, `false` otherwise.\n * @returns verseRef: The result of the parse if successful, or empty VerseRef if it failed\n */\n static tryParse(e) {\n let s;\n try {\n return s = new i(e), { success: !0, verseRef: s };\n } catch (r) {\n if (r instanceof v)\n return s = new i(), { success: !1, verseRef: s };\n throw r;\n }\n }\n /**\n * Gets the reference as a comparable integer where the book, chapter, and verse each occupy 3\n * digits.\n * @param bookNum - Book number (this is 1-based, not an index).\n * @param chapterNum - Chapter number.\n * @param verseNum - Verse number.\n * @returns The reference as a comparable integer where the book, chapter, and verse each occupy 3\n * digits.\n */\n static getBBBCCCVVV(e, s, r) {\n return e % i.bcvMaxValue * i.bookDigitShifter + (s >= 0 ? s % i.bcvMaxValue * i.chapterDigitShifter : 0) + (r >= 0 ? r % i.bcvMaxValue : 0);\n }\n /**\n * Deserializes a serialized VerseRef.\n * @param serializedVerseRef - Serialized VerseRef to create from.\n * @returns the deserialized VerseRef.\n */\n static fromJSON(e) {\n const { book: s, chapterNum: r, verseNum: a, verse: o, versificationStr: u } = e, f = o || a.toString();\n let d;\n return u && (d = new c(u)), s ? new i(s, r.toString(), f, d) : new i();\n }\n /**\n * Parses a verse string and gets the leading numeric portion as a number.\n * @param verseStr - verse string to parse\n * @returns true if the entire string could be parsed as a single, simple verse number (1-999);\n * false if the verse string represented a verse bridge, contained segment letters, or was invalid\n */\n static tryGetVerseNum(e) {\n let s;\n if (!e)\n return s = -1, { success: !0, vNum: s };\n s = 0;\n let r;\n for (let a = 0; a < e.length; a++) {\n if (r = e[a], r < \"0\" || r > \"9\")\n return a === 0 && (s = -1), { success: !1, vNum: s };\n if (s = s * 10 + +r - 0, s > i.bcvMaxValue)\n return s = -1, { success: !1, vNum: s };\n }\n return { success: !0, vNum: s };\n }\n /**\n * Checks to see if a VerseRef hasn't been set - all values are the default.\n */\n get isDefault() {\n return this.bookNum === 0 && this.chapterNum === 0 && this.verseNum === 0 && this.versification == null;\n }\n /**\n * Gets whether the verse contains multiple verses.\n */\n get hasMultiple() {\n return this._verse != null && (this._verse.includes(i.verseRangeSeparator) || this._verse.includes(i.verseSequenceIndicator));\n }\n /**\n * Gets or sets the book of the reference. Book is the 3-letter abbreviation in capital letters,\n * e.g. `'MAT'`.\n */\n get book() {\n return m.bookNumberToId(this.bookNum, \"\");\n }\n set book(e) {\n this.bookNum = m.bookIdToNumber(e);\n }\n /**\n * Gets or sets the chapter of the reference,. e.g. `'3'`.\n */\n get chapter() {\n return this.isDefault || this._chapterNum < 0 ? \"\" : this._chapterNum.toString();\n }\n set chapter(e) {\n const s = +e;\n this._chapterNum = Number.isInteger(s) ? s : -1;\n }\n /**\n * Gets or sets the verse of the reference, including range, segments, and sequences, e.g. `'4'`,\n * or `'4b-5a, 7'`.\n */\n get verse() {\n return this._verse != null ? this._verse : this.isDefault || this._verseNum < 0 ? \"\" : this._verseNum.toString();\n }\n set verse(e) {\n const { success: s, vNum: r } = i.tryGetVerseNum(e);\n this._verse = s ? void 0 : e.replace(this.rtlMark, \"\"), this._verseNum = r, !(this._verseNum >= 0) && ({ vNum: this._verseNum } = i.tryGetVerseNum(this._verse));\n }\n /**\n * Get or set Book based on book number, e.g. `42`.\n */\n get bookNum() {\n return this._bookNum;\n }\n set bookNum(e) {\n if (e <= 0 || e > m.lastBook)\n throw new v(\n \"BookNum must be greater than zero and less than or equal to last book\"\n );\n this._bookNum = e;\n }\n /**\n * Gets or sets the chapter number, e.g. `3`. `-1` if not valid.\n */\n get chapterNum() {\n return this._chapterNum;\n }\n set chapterNum(e) {\n this.chapterNum = e;\n }\n /**\n * Gets or sets verse start number, e.g. `4`. `-1` if not valid.\n */\n get verseNum() {\n return this._verseNum;\n }\n set verseNum(e) {\n this._verseNum = e;\n }\n /**\n * String representing the versification (should ONLY be used for serialization/deserialization).\n *\n * @remarks This is for backwards compatibility when ScrVers was an enumeration.\n */\n get versificationStr() {\n var e;\n return (e = this.versification) == null ? void 0 : e.name;\n }\n set versificationStr(e) {\n this.versification = this.versification != null ? new c(e) : void 0;\n }\n /**\n * Determines if the reference is valid.\n */\n get valid() {\n return this.validStatus === 0;\n }\n /**\n * Get the valid status for this reference.\n */\n get validStatus() {\n return this.validateVerse(i.verseRangeSeparators, i.verseSequenceIndicators);\n }\n /**\n * Gets the reference as a comparable integer where the book,\n * chapter, and verse each occupy three digits and the verse is 0.\n */\n get BBBCCC() {\n return i.getBBBCCCVVV(this._bookNum, this._chapterNum, 0);\n }\n /**\n * Gets the reference as a comparable integer where the book,\n * chapter, and verse each occupy three digits. If verse is not null\n * (i.e., this reference represents a complex reference with verse\n * segments or bridge) this cannot be used for an exact comparison.\n */\n get BBBCCCVVV() {\n return i.getBBBCCCVVV(this._bookNum, this._chapterNum, this._verseNum);\n }\n /**\n * Gets whether the verse is defined as an excluded verse in the versification.\n * Does not handle verse ranges.\n */\n // eslint-disable-next-line @typescript-eslint/class-literal-property-style\n get isExcluded() {\n return !1;\n }\n /**\n * Parses the reference in the specified string.\n * Optionally versification can follow reference as in GEN 3:11/4\n * Throw an exception if\n * - invalid book name\n * - chapter number is missing or not a number\n * - verse number is missing or does not start with a number\n * - versification is invalid\n * @param verseStr - string to parse e.g. 'MAT 3:11'\n */\n parse(e) {\n if (e = e.replace(this.rtlMark, \"\"), e.includes(\"/\")) {\n const o = e.split(\"/\");\n if (e = o[0], o.length > 1)\n try {\n const u = +o[1].trim();\n this.versification = new c(l[u]);\n } catch {\n throw new v(\"Invalid reference : \" + e);\n }\n }\n const s = e.trim().split(\" \");\n if (s.length !== 2)\n throw new v(\"Invalid reference : \" + e);\n const r = s[1].split(\":\"), a = +r[0];\n if (r.length !== 2 || m.bookIdToNumber(s[0]) === 0 || !Number.isInteger(a) || a < 0 || !i.isVerseParseable(r[1]))\n throw new v(\"Invalid reference : \" + e);\n this.updateInternal(s[0], r[0], r[1]);\n }\n /**\n * Simplifies this verse ref so that it has no bridging of verses or\n * verse segments like `'1a'`.\n */\n simplify() {\n this._verse = void 0;\n }\n /**\n * Makes a clone of the reference.\n *\n * @returns The cloned VerseRef.\n */\n clone() {\n return new i(this);\n }\n toString() {\n const e = this.book;\n return e === \"\" ? \"\" : `${e} ${this.chapter}:${this.verse}`;\n }\n toJSON() {\n let e = this.verse;\n (e === \"\" || e === this.verseNum.toString()) && (e = void 0);\n const s = {\n book: this.book,\n chapterNum: this.chapterNum,\n verseNum: this.verseNum,\n verse: e,\n versificationStr: this.versificationStr\n };\n return e || delete s.verse, s;\n }\n /**\n * Compares this `VerseRef` with supplied one.\n * @param verseRef - object to compare this one to.\n * @returns `true` if this `VerseRef` is equal to the supplied one, `false` otherwise.\n */\n equals(e) {\n return e instanceof i ? e._bookNum === this._bookNum && e._chapterNum === this._chapterNum && e._verseNum === this._verseNum && e.verse === this.verse && (e.versification == null && this.versification == null || e.versification != null && this.versification != null && e.versification.equals(this.versification)) : !1;\n }\n /**\n * Enumerate all individual verses contained in a VerseRef.\n * Verse ranges are indicated by \"-\" and consecutive verses by \",\"s.\n * Examples:\n * GEN 1:2 returns GEN 1:2\n * GEN 1:1a-3b,5 returns GEN 1:1a, GEN 1:2, GEN 1:3b, GEN 1:5\n * GEN 1:2a-2c returns //! ??????\n *\n * @param specifiedVersesOnly - if set to true return only verses that are\n * explicitly specified only, not verses within a range. Defaults to `false`.\n * @param verseRangeSeparators - Verse range separators.\n * Defaults to `VerseRef.verseRangeSeparators`.\n * @param verseSequenceSeparators - Verse sequence separators.\n * Defaults to `VerseRef.verseSequenceIndicators`.\n * @returns An array of all single verse references in this VerseRef.\n */\n allVerses(e = !1, s = i.verseRangeSeparators, r = i.verseSequenceIndicators) {\n if (this._verse == null || this.chapterNum <= 0)\n return [this.clone()];\n const a = [], o = E(this._verse, r);\n for (const u of o.map((f) => E(f, s))) {\n const f = this.clone();\n f.verse = u[0];\n const d = f.verseNum;\n if (a.push(f), u.length > 1) {\n const b = this.clone();\n if (b.verse = u[1], !e)\n for (let p = d + 1; p < b.verseNum; p++) {\n const J = new i(\n this._bookNum,\n this._chapterNum,\n p,\n this.versification\n );\n this.isExcluded || a.push(J);\n }\n a.push(b);\n }\n }\n return a;\n }\n /**\n * Validates a verse number using the supplied separators rather than the defaults.\n */\n validateVerse(e, s) {\n if (!this.verse)\n return this.internalValid;\n let r = 0;\n for (const a of this.allVerses(!0, e, s)) {\n const o = a.internalValid;\n if (o !== 0)\n return o;\n const u = a.BBBCCCVVV;\n if (r > u)\n return 3;\n if (r === u)\n return 4;\n r = u;\n }\n return 0;\n }\n /**\n * Gets whether a single verse reference is valid.\n */\n get internalValid() {\n return this.versification == null ? 1 : this._bookNum <= 0 || this._bookNum > m.lastBook ? 2 : (m.isCanonical(this._bookNum), 0);\n }\n setEmpty(e = i.defaultVersification) {\n this._bookNum = 0, this._chapterNum = -1, this._verse = void 0, this.versification = e;\n }\n updateInternal(e, s, r) {\n this.bookNum = m.bookIdToNumber(e), this.chapter = s, this.verse = r;\n }\n};\nn(i, \"defaultVersification\", c.English), n(i, \"verseRangeSeparator\", \"-\"), n(i, \"verseSequenceIndicator\", \",\"), n(i, \"verseRangeSeparators\", [i.verseRangeSeparator]), n(i, \"verseSequenceIndicators\", [i.verseSequenceIndicator]), n(i, \"chapterDigitShifter\", 1e3), n(i, \"bookDigitShifter\", i.chapterDigitShifter * i.chapterDigitShifter), n(i, \"bcvMaxValue\", i.chapterDigitShifter - 1), /**\n * The valid status of the VerseRef.\n */\nn(i, \"ValidStatusType\", D);\nlet M = i;\nclass v extends Error {\n}\nexport {\n _ as BookSet,\n m as Canon,\n c as ScrVers,\n l as ScrVersType,\n M as VerseRef,\n v as VerseRefException\n};\n//# sourceMappingURL=index.es.js.map\n","import React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\n\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nexport type DropdownMenuSubTriggerProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.SubTrigger\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuSubContentProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.SubContent\n> & {\n className?: string;\n};\n\nexport type DropdownMenuContentProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Content\n> & {\n className?: string;\n sideOffset?: number;\n};\n\nexport type DropdownMenuItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Item\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.CheckboxItem\n> & {\n className?: string;\n checked?: boolean;\n};\n\nexport type DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.RadioItem\n> & {\n className?: string;\n};\n\nexport type DropdownMenuLabelProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Label\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Separator\n> & {\n className?: string;\n};\n\nexport type DropdownMenuShortcutProps = React.HTMLAttributes & {\n className?: string;\n};\n\nexport const DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef,\n DropdownMenuSubTriggerProps\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nexport const DropdownMenuSubContent = React.forwardRef<\n React.ElementRef,\n DropdownMenuSubContentProps\n>(({ className, ...props }, ref) => (\n \n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nexport const DropdownMenuContent = React.forwardRef<\n React.ElementRef,\n DropdownMenuContentProps\n>(({ className, sideOffset = 4, ...props }, ref) => (\n \n \n \n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/**\n * TODO: fix: direction is not automatically handled by this component, so that shortcuts are\n * display always to the right\n */\nexport const DropdownMenuItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuItemProps\n>(({ className, inset, ...props }, ref) => (\n \n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nexport const DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nexport const DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nexport const DropdownMenuLabel = React.forwardRef<\n React.ElementRef,\n DropdownMenuLabelProps\n>(({ className, inset, ...props }, ref) => (\n \n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ElementRef,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n \n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nexport function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return (\n \n );\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n","import { Canon } from '@sillsdev/scripture';\nimport { PropsWithChildren, KeyboardEvent, forwardRef } from 'react';\nimport { DropdownMenuItem as ShadDropdownMenuItem } from '@/components/shadcn-ui/dropdown-menu';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport type BookType = 'OT' | 'NT' | 'DC';\n\ntype BookMenuItemProps = PropsWithChildren<{\n /** String id of book */\n bookId: string;\n /** Callback to run when a book menu item is selected */\n handleSelectBook: () => void;\n /** Indicates if this menu item is currently selected */\n isSelected: boolean;\n /** Function that is called upon highlighting a book in the dropdown menu */\n handleHighlightBook: () => void;\n /**\n * Function that is called on pressing a key\n *\n * @param event Event that contains information about the key stroke\n */\n handleKeyDown: (event: KeyboardEvent) => void;\n /**\n * Type of book associated with this menu item, coordinates color labels ? Mock up has the labels\n * coordinated to genre\n */\n bookType: BookType;\n}>;\n\nconst BookMenuItem = forwardRef(\n (\n {\n bookId,\n handleSelectBook,\n isSelected,\n handleHighlightBook,\n handleKeyDown,\n bookType,\n children,\n }: BookMenuItemProps,\n ref,\n ) => {\n return (\n {\n // preventDefault() here prevents the entire dropdown menu from closing when selecting this item\n event.preventDefault();\n handleSelectBook();\n }}\n onKeyDown={(event: KeyboardEvent) => {\n handleKeyDown(event);\n }}\n onFocus={handleHighlightBook}\n onMouseMove={handleHighlightBook}\n >\n \n {Canon.bookIdToEnglishName(bookId)}\n \n {isSelected &&
{children}
}\n \n );\n },\n);\n\nexport default BookMenuItem;\n","import { cn } from '@/utils/shadcn-ui.util';\nimport { useCallback } from 'react';\n\nexport type ChapterSelectProps = {\n /**\n * Callback to run when a chapter div is selected\n *\n * @param chapterNumber Number of the chapter that has been selected\n */\n handleSelectChapter: (chapterNumber: number) => void;\n /** The highest chapter number in the book (of course equal to number of chapters in the book) */\n endChapter: number;\n /** The chapter number that is currently selected */\n activeChapter: number;\n /** The chapter number that is currently highlighted using keyboard or mouse navigation */\n highlightedChapter: number;\n /**\n * Callback to run when a chapter is highlighted by the user\n *\n * @param chapterNumber The chapter that is highlighted\n */\n handleHighlightedChapter: (chapterNumber: number) => void;\n};\n\nfunction ChapterSelect({\n handleSelectChapter,\n endChapter,\n activeChapter,\n highlightedChapter,\n handleHighlightedChapter,\n}: ChapterSelectProps) {\n const chapters = Array.from({ length: endChapter }, (_, i) => i + 1);\n\n const handleMouse = useCallback(\n (chapterNumber: number) => {\n handleHighlightedChapter(chapterNumber);\n },\n [handleHighlightedChapter],\n );\n\n return (\n
\n {chapters.map((chapter) => (\n {\n event.preventDefault();\n event.stopPropagation();\n handleSelectChapter(chapter);\n }}\n role=\"button\"\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n handleSelectChapter(chapter);\n }\n }}\n tabIndex={0}\n onMouseMove={() => handleMouse(chapter)}\n >\n {chapter}\n
\n ))}\n \n );\n}\n\nexport default ChapterSelect;\n","import { DropdownMenuLabel as ShadDropdownMenuLabel } from '@/components/shadcn-ui/dropdown-menu';\nimport { Bookmark, Clock, ArrowDownWideNarrow } from 'lucide-react';\n\nexport type GoToMenuItemProps = {\n handleSort: () => void;\n handleLocationHistory: () => void;\n handleBookmarks: () => void;\n};\n\nfunction GoToMenuItem({ handleSort, handleLocationHistory, handleBookmarks }: GoToMenuItemProps) {\n return (\n \n

Go To

\n
\n \n \n \n
\n
\n );\n}\n\nexport default GoToMenuItem;\n","import BookChapterInput from '@/components/advanced/book-chapter-control/book-chapter-input.component';\nimport BookMenuItem, {\n BookType,\n} from '@/components/advanced/book-chapter-control/book-menu-item.component';\nimport ChapterSelect from '@/components/advanced/book-chapter-control/chapter-select.component';\nimport GoToMenuItem from '@/components/advanced/book-chapter-control/go-to-menu-item.component';\nimport {\n DropdownMenu as ShadDropdownMenu,\n DropdownMenuContent as ShadDropdownMenuContent,\n DropdownMenuLabel as ShadDropdownMenuLabel,\n DropdownMenuSeparator as ShadDropdownMenuSeparator,\n DropdownMenuTrigger as ShadDropdownMenuTrigger,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport { Canon } from '@sillsdev/scripture';\nimport { ScriptureReference, getChaptersForBook } from 'platform-bible-utils';\nimport {\n KeyboardEvent as ReactKeyboardEvent,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\ntype BookTypeLabels = {\n [bookType in BookType]: string;\n};\ntype BookChapterControlProps = {\n scrRef: ScriptureReference;\n handleSubmit: (scrRef: ScriptureReference) => void;\n};\n\nconst ALL_BOOK_IDS = Canon.allBookIds;\nconst BOOK_TYPE_LABELS: BookTypeLabels = {\n OT: 'Old Testament',\n NT: 'New Testament',\n DC: 'Deuterocanon',\n};\nconst BOOK_TYPE_ARRAY: BookType[] = ['OT', 'NT', 'DC'];\n// This is the height of three menu items to offset scrolling to the selected menu item\n// If you use menuItemRef.clientHeight- includes height of chapter div which is too big\nconst SCROLL_OFFSET = 32 + 32 + 32;\nconst SEARCH_QUERY_FORMATS = [\n /^(\\w+)$/i, // Matches a single word (book name or id)\n /^(\\w+)(?:\\s(\\d+))$/i, // Matches a word followed by a chapter number\n /^(\\w+)(?:\\s(\\d+):(\\d+))$/i, // Matches a word followed by a chapter and verse number\n];\nconst fetchGroupedBooks = (bookType: BookType) => {\n const groupedBooks = {\n OT: ALL_BOOK_IDS.filter((bookId) => Canon.isBookOT(bookId)),\n NT: ALL_BOOK_IDS.filter((bookId) => Canon.isBookNT(bookId)),\n DC: ALL_BOOK_IDS.filter((bookId) => Canon.isBookDC(bookId)),\n };\n return groupedBooks[bookType];\n};\nconst fetchEndChapter = (bookId: string) => {\n // getChaptersForBook returns -1 if not found in scrBookData\n // scrBookData only includes OT and NT, so all DC will return -1\n return getChaptersForBook(Canon.bookIdToNumber(bookId));\n};\n\n/**\n * Gets all of the English names from book ids\n *\n * @returns String[]\n */\nfunction getAllEnglishNames(): string[] {\n const allEnglishNames = ALL_BOOK_IDS.map((bookId) => {\n return Canon.bookIdToEnglishName(bookId);\n });\n return allEnglishNames;\n}\n\n/**\n * Determines if bookName is in allEnglishNames\n *\n * @param bookName Book English name\n * @returns True if bookName is included, false otherwise\n */\nfunction isValidBookEnglishName(bookName: string): boolean {\n return getAllEnglishNames().includes(bookName);\n}\n\n/**\n * Gets a bookId from given English name\n *\n * @param bookName Book English name\n * @returns BookId of provided bookName, undefined otherwise\n */\nfunction getBookIdFromEnglishName(bookName: string): string | undefined {\n // Convert bookName to lowercase and then capitalize the first letter\n const formattedBookName = bookName.toLowerCase().replace(/^\\w/, (c) => c.toUpperCase());\n\n if (isValidBookEnglishName(formattedBookName)) {\n const matchingBookId = ALL_BOOK_IDS.find((bookId) => {\n return Canon.bookIdToEnglishName(bookId) === formattedBookName;\n });\n return matchingBookId;\n }\n\n return undefined;\n}\n\nfunction BookChapterControl({ scrRef, handleSubmit }: BookChapterControlProps) {\n const [searchQuery, setSearchQuery] = useState('');\n const [selectedBookId, setSelectedBookId] = useState(\n Canon.bookNumberToId(scrRef.bookNum),\n );\n const [highlightedChapter, setHighlightedChapter] = useState(scrRef.chapterNum ?? 0);\n const [highlightedBookId, setHighlightedBookId] = useState(\n Canon.bookNumberToId(scrRef.bookNum),\n );\n const [isContentOpen, setIsContentOpen] = useState(false);\n const [isContentOpenDelayed, setIsContentOpenDelayed] = useState(isContentOpen);\n\n // This ref will always be defined\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const inputRef = useRef(undefined!);\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const contentRef = useRef(undefined!);\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const menuItemRef = useRef(undefined!);\n\n const fetchFilteredBooks = useCallback(\n (bookType: BookType) => {\n return fetchGroupedBooks(bookType).filter((bookId: string) => {\n const englishNameLowerCase = Canon.bookIdToEnglishName(bookId).toLowerCase();\n const normalizedQuery = searchQuery.replace(/[^a-zA-Z]/g, '').toLowerCase();\n return (\n englishNameLowerCase.includes(normalizedQuery) || // Match book name\n bookId.toLowerCase().includes(normalizedQuery) // Match book ID\n );\n });\n },\n [searchQuery],\n );\n\n const handleSearchInput = (searchString: string) => {\n setSearchQuery(searchString);\n };\n\n /**\n * Whether to prevent radix's logic from closing the dropdown. This is important because radix\n * tries to close the dropdown when the input first focuses, and we don't want it to do that. But\n * we don't want to prevent the dropdown from closing when we click away from the input, so we\n * don't want to just keep it open if the input is focused\n */\n const shouldPreventAutoClosing = useRef(false);\n\n const controlMenuState = useCallback((open: boolean) => {\n if (shouldPreventAutoClosing.current) {\n shouldPreventAutoClosing.current = false;\n return;\n }\n setIsContentOpen(open);\n }, []);\n\n const updateReference = useCallback(\n (bookId: string, shouldClose: boolean, chapter?: number, verse?: number) => {\n setHighlightedChapter(\n Canon.bookNumberToId(scrRef.bookNum) !== bookId ? 1 : scrRef.chapterNum,\n );\n\n if (shouldClose || fetchEndChapter(bookId) === -1) {\n handleSubmit({\n bookNum: Canon.bookIdToNumber(bookId),\n chapterNum: chapter || 1,\n verseNum: verse || 1,\n });\n\n setIsContentOpen(false);\n setSearchQuery('');\n return;\n }\n\n setSelectedBookId(selectedBookId !== bookId ? bookId : '');\n setIsContentOpen(!shouldClose);\n },\n [handleSubmit, scrRef.bookNum, scrRef.chapterNum, selectedBookId],\n );\n\n const handleSelectChapter = (chapterNumber: number) => {\n if (chapterNumber <= 0 || chapterNumber > fetchEndChapter(selectedBookId)) {\n return;\n }\n updateReference(selectedBookId, true, chapterNumber);\n };\n\n const handleInputSubmit = useCallback(() => {\n SEARCH_QUERY_FORMATS.forEach((format) => {\n const matches = searchQuery.match(format);\n if (matches) {\n // Book should be a bookId or an english name\n const [book, chapter = undefined, verse = undefined] = matches.slice(1);\n const englishName = getBookIdFromEnglishName(book);\n\n if (Canon.isBookIdValid(book) || englishName) {\n updateReference(\n englishName ?? book,\n true,\n chapter ? parseInt(chapter, 10) : 1,\n verse ? parseInt(verse, 10) : 1,\n );\n }\n }\n });\n }, [updateReference, searchQuery]);\n\n const handleKeyDownInput = useCallback(\n (event: ReactKeyboardEvent) => {\n if (!isContentOpen) {\n setIsContentOpen(true);\n } else if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n if (\n typeof menuItemRef !== 'undefined' &&\n // Ref uses null\n // eslint-disable-next-line no-null/no-null\n menuItemRef.current !== null\n ) {\n menuItemRef.current.focus();\n } else if (\n typeof contentRef !== 'undefined' &&\n // Ref uses null\n // eslint-disable-next-line no-null/no-null\n contentRef.current !== null\n ) {\n contentRef.current.focus();\n }\n event.preventDefault();\n }\n },\n [isContentOpen],\n );\n\n const handleKeyDownContent = (event: ReactKeyboardEvent) => {\n // When the dropdown menu has focus, key strokes should give focus to the input component,\n // unless they're navigation keys (arrows and enter)\n const { key } = event;\n if (\n key === 'ArrowRight' ||\n key === 'ArrowLeft' ||\n key === 'ArrowDown' ||\n key === 'ArrowUp' ||\n key === 'Enter'\n ) {\n return;\n }\n\n inputRef.current.dispatchEvent(new KeyboardEvent('keydown', { key }));\n inputRef.current.focus();\n };\n\n const handleKeyDownMenuItem = (event: ReactKeyboardEvent) => {\n const { key } = event;\n if (highlightedBookId === selectedBookId) {\n if (key === 'Enter') {\n event.preventDefault();\n updateReference(selectedBookId, true, highlightedChapter);\n return;\n }\n\n let chapterOffSet = 0;\n if (key === 'ArrowRight') {\n if (highlightedChapter < fetchEndChapter(highlightedBookId)) {\n chapterOffSet = 1;\n } else {\n event.preventDefault();\n return;\n }\n } else if (key === 'ArrowLeft') {\n if (highlightedChapter > 1) {\n chapterOffSet = -1;\n } else {\n event.preventDefault();\n return;\n }\n } else if (key === 'ArrowDown') {\n chapterOffSet = 6;\n } else if (key === 'ArrowUp') {\n chapterOffSet = -6;\n }\n if (\n highlightedChapter + chapterOffSet <= 0 ||\n highlightedChapter + chapterOffSet > fetchEndChapter(highlightedBookId)\n ) {\n setHighlightedChapter(0);\n } else if (chapterOffSet !== 0) {\n setHighlightedChapter(highlightedChapter + chapterOffSet);\n event.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n if (selectedBookId === highlightedBookId) {\n if (selectedBookId === Canon.bookNumberToId(scrRef.bookNum)) {\n setHighlightedChapter(scrRef.chapterNum);\n } else {\n setHighlightedChapter(1);\n }\n } else {\n setHighlightedChapter(0);\n }\n }, [highlightedBookId, scrRef.bookNum, scrRef.chapterNum, selectedBookId]);\n\n // The purpose of these useLayoutEffects and timeout is to delay the scroll just\n // enough so that the refs are defined and available when they are used after the timeout\n useLayoutEffect(() => {\n setIsContentOpenDelayed(isContentOpen);\n }, [isContentOpen]);\n\n useLayoutEffect(() => {\n const scrollTimeout = setTimeout(() => {\n if (isContentOpenDelayed && contentRef.current && menuItemRef.current) {\n const menuItemOffsetTop = menuItemRef.current.offsetTop;\n const scrollPosition = menuItemOffsetTop - SCROLL_OFFSET;\n contentRef.current.scrollTo({ top: scrollPosition, behavior: 'instant' });\n }\n }, 10);\n return () => {\n clearTimeout(scrollTimeout);\n };\n }, [isContentOpenDelayed]);\n\n return (\n
\n \n \n {\n setSelectedBookId(Canon.bookNumberToId(scrRef.bookNum));\n setHighlightedBookId(Canon.bookNumberToId(scrRef.bookNum));\n setHighlightedChapter(scrRef.chapterNum > 0 ? scrRef.chapterNum : 0);\n setIsContentOpen(true);\n inputRef.current.focus();\n }}\n onFocus={() => {\n // Radix thinks we want to close because the input is being focused. Prevent that\n shouldPreventAutoClosing.current = true;\n }}\n handleSubmit={handleInputSubmit}\n placeholder={`${Canon.bookNumberToEnglishName(scrRef.bookNum)} ${scrRef.chapterNum}:${scrRef.verseNum}`}\n />\n \n \n console.log('sorting')}\n handleLocationHistory={() => console.log('location history')}\n handleBookmarks={() => console.log('bookmarks')}\n />\n {BOOK_TYPE_ARRAY.map(\n (bookType, bookTypeIndex) =>\n fetchFilteredBooks(bookType).length > 0 && (\n
\n \n {BOOK_TYPE_LABELS[bookType]}\n \n\n {fetchFilteredBooks(bookType).map((bookId) => (\n
\n updateReference(bookId, false)}\n isSelected={selectedBookId === bookId}\n handleHighlightBook={() => setHighlightedBookId(bookId)}\n handleKeyDown={handleKeyDownMenuItem}\n bookType={bookType}\n ref={(element: HTMLDivElement) => {\n if (selectedBookId === bookId) menuItemRef.current = element;\n }}\n >\n {\n setHighlightedChapter(chapterNumber);\n }}\n />\n \n
\n ))}\n {BOOK_TYPE_ARRAY.length - 1 !== bookTypeIndex ? (\n \n ) : undefined}\n
\n ),\n )}\n \n
\n
\n );\n}\n\nexport default BookChapterControl;\n","import React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const buttonVariants = cva(\n 'pr-twp tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50',\n {\n variants: {\n variant: {\n default: 'tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/90',\n destructive: 'tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/90',\n outline:\n 'tw-border tw-border-input tw-bg-background hover:tw-bg-accent hover:tw-text-accent-foreground',\n secondary: 'tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80',\n ghost: 'hover:tw-bg-accent hover:tw-text-accent-foreground',\n link: 'tw-text-primary tw-underline-offset-4 hover:tw-underline',\n },\n size: {\n default: 'tw-h-10 tw-px-4 tw-py-2',\n sm: 'tw-h-9 tw-rounded-md tw-px-3',\n lg: 'tw-h-11 tw-rounded-md tw-px-8',\n icon: 'tw-h-10 tw-w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes,\n VariantProps {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n \n );\n },\n);\nButton.displayName = 'Button';\n","import React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst labelVariants = cva(\n 'tw-text-sm tw-font-medium tw-leading-none peer-disabled:tw-cursor-not-allowed peer-disabled:tw-opacity-70',\n);\n\nexport const Label = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & VariantProps\n>(({ className, ...props }, ref) => (\n \n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n","import React from 'react';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n \n \n \n \n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n","import React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n \n \n \n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent };\n","import React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n {children}\n \n \n Close\n \n \n \n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nfunction DialogHeader({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nDialogHeader.displayName = 'DialogHeader';\n\nfunction DialogFooter({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n","import React from 'react';\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Dialog, DialogContent } from '@/components/shadcn-ui/dialog';\n\nconst Command = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nfunction CommandDialog({ children, ...props }: CommandDialogProps) {\n return (\n \n \n \n {children}\n \n \n \n );\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n
\n \n \n
\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>((props, ref) => (\n \n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nfunction CommandShortcut({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","import { ReactNode, useState } from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/shadcn-ui/popover';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/shadcn-ui/command';\nimport { PopoverProps } from '@radix-ui/react-popover';\n\nexport type ComboBoxLabelOption = { label: string };\nexport type ComboBoxOption = string | number | ComboBoxLabelOption;\n\nexport type ComboBoxProps = {\n /** Optional unique identifier */\n id?: string;\n /** Text label title for combobox */\n /** List of available options for the dropdown menu */\n options?: readonly T[];\n /** Additional css classes to help with unique styling of the combo box */\n className?: string;\n /**\n * The selected value that the combo box currently holds. Must be shallow equal to one of the\n * options entries.\n */\n value?: T;\n /** Triggers when content of textfield is changed */\n onChange?: (newValue: T) => void;\n /** Used to determine the string value for a given option. */\n getOptionLabel?: (option: ComboBoxOption) => string;\n /** Icon to be displayed on the trigger */\n icon?: ReactNode;\n /** Text displayed on button if `value` is undefined */\n buttonPlaceholder?: string;\n /** Placeholder text for text field */\n textPlaceholder?: string;\n /** Text to display when no options match input */\n commandEmptyMessage?: string;\n /** Variant of button */\n buttonVariant?: ButtonProps['variant'];\n /** Control how the popover menu should be aligned. Defaults to start */\n alignDropDown?: 'start' | 'center' | 'end';\n /** Text direction ltr or rtl */\n dir?: Direction;\n /** Optional boolean to set if trigger should be disabled */\n isDisabled?: boolean;\n} & PopoverProps;\n\ntype Direction = 'ltr' | 'rtl';\n\nfunction getOptionLabelDefault(option: ComboBoxOption): string {\n if (typeof option === 'string') {\n return option;\n }\n if (typeof option === 'number') {\n return option.toString();\n }\n return option.label;\n}\n\n/**\n * Autocomplete input and command palette with a list of suggestions.\n *\n * Thanks to Shadcn for heavy inspiration and documentation\n * https://ui.shadcn.com/docs/components/combobox\n */\nfunction ComboBox({\n id,\n options = [],\n className,\n value,\n onChange = () => {},\n getOptionLabel = getOptionLabelDefault,\n icon = undefined,\n buttonPlaceholder = '',\n textPlaceholder = '',\n commandEmptyMessage = 'No option found',\n buttonVariant = 'outline',\n alignDropDown = 'start',\n dir = 'ltr',\n isDisabled = false,\n ...props\n}: ComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n return (\n \n \n \n
\n {icon &&
{icon}
}\n \n {value ? getOptionLabel(value) : buttonPlaceholder}\n \n
\n\n \n \n
\n \n \n \n {commandEmptyMessage}\n \n {options.map((option) => (\n {\n onChange(option);\n setOpen(false);\n }}\n >\n \n {getOptionLabel(option)}\n \n ))}\n \n \n \n
\n );\n}\n\nexport default ComboBox;\n","import { useMemo } from 'react';\nimport ComboBox from '@/components/basics/combo-box.component';\nimport { Label } from '@/components/shadcn-ui/label';\n\nexport type ChapterRangeSelectorProps = {\n startChapter: number;\n endChapter: number;\n handleSelectStartChapter: (chapter: number) => void;\n handleSelectEndChapter: (chapter: number) => void;\n isDisabled?: boolean;\n chapterCount: number;\n};\n\nexport default function ChapterRangeSelector({\n startChapter,\n endChapter,\n handleSelectStartChapter,\n handleSelectEndChapter,\n isDisabled = false,\n chapterCount,\n}: ChapterRangeSelectorProps) {\n const chapterOptions = useMemo(\n () => Array.from({ length: chapterCount }, (_, index) => index + 1),\n [chapterCount],\n );\n\n const onChangeStartChapter = (value: number) => {\n handleSelectStartChapter(value);\n if (value > endChapter) {\n handleSelectEndChapter(value);\n }\n };\n\n const onChangeEndChapter = (value: number) => {\n handleSelectEndChapter(value);\n if (value < startChapter) {\n handleSelectStartChapter(value);\n }\n };\n\n return (\n <>\n \n option.toString()}\n value={startChapter}\n />\n\n \n option.toString()}\n value={endChapter}\n />\n \n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport { Label } from '@/components/shadcn-ui/label';\nimport { RadioGroup, RadioGroupItem } from '@/components/shadcn-ui/radio-group';\nimport { Canon } from '@sillsdev/scripture';\nimport { LocalizedStringValue } from 'platform-bible-utils';\nimport { useState } from 'react';\nimport ChapterRangeSelector, {\n ChapterRangeSelectorProps,\n} from '../basics/chapter-range-selector.component';\n\nexport enum BookSelectionMode {\n CURRENT_BOOK = 'current book',\n CHOOSE_BOOKS = 'choose books',\n}\n\n/**\n * Object containing all keys used for localization in this component. If you're using this\n * component in an extension, you can pass it into the useLocalizedStrings hook to easily obtain the\n * localized strings and pass them into the localizedStrings prop of this component\n */\nexport const BOOK_SELECTOR_STRING_KEYS = Object.freeze([\n '%webView_bookSelector_currentBook%',\n '%webView_bookSelector_choose%',\n '%webView_bookSelector_chooseBooks%',\n] as const);\n\nexport type BookSelectorLocalizedStrings = {\n [localizedInventoryKey in (typeof BOOK_SELECTOR_STRING_KEYS)[number]]?: LocalizedStringValue;\n};\n\n/**\n * Gets the localized value for the provided key\n *\n * @param strings Object containing localized string\n * @param key Key for a localized string\n * @returns The localized value for the provided key, if available. Returns the key if no localized\n * value is available\n */\nconst localizeString = (\n strings: BookSelectorLocalizedStrings,\n key: keyof BookSelectorLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\ntype BookSelectorProps = ChapterRangeSelectorProps & {\n handleBookSelectionModeChange: (newMode: BookSelectionMode) => void;\n currentBookName: string;\n onSelectBooks: () => void;\n selectedBookIds: string[];\n localizedStrings: BookSelectorLocalizedStrings;\n};\n\nexport default function BookSelector({\n handleBookSelectionModeChange,\n currentBookName,\n onSelectBooks,\n selectedBookIds,\n chapterCount,\n endChapter,\n handleSelectEndChapter,\n startChapter,\n handleSelectStartChapter,\n localizedStrings,\n}: BookSelectorProps) {\n const currentBookText = localizeString(localizedStrings, '%webView_bookSelector_currentBook%');\n const chooseText = localizeString(localizedStrings, '%webView_bookSelector_choose%');\n const chooseBooksText = localizeString(localizedStrings, '%webView_bookSelector_chooseBooks%');\n\n const [bookSelectionMode, setBookSelectionMode] = useState(\n BookSelectionMode.CURRENT_BOOK,\n );\n\n const onSelectionModeChange = (newMode: BookSelectionMode) => {\n setBookSelectionMode(newMode);\n handleBookSelectionModeChange(newMode);\n };\n\n return (\n onSelectionModeChange(value as BookSelectionMode)}\n >\n
\n
\n
\n \n \n
\n \n
\n \n
\n
\n
\n
\n \n \n
\n \n onSelectBooks()}\n >\n {chooseText}\n \n
\n
\n \n );\n}\n","import { DropdownMenuTrigger } from '@radix-ui/react-dropdown-menu';\nimport { FilterIcon } from 'lucide-react';\nimport { Table } from '@tanstack/react-table';\n\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n} from '@/components/shadcn-ui/dropdown-menu';\n\ninterface DataTableViewOptionsProps {\n table: Table;\n}\n\nfunction DataTableViewOptions({ table }: DataTableViewOptionsProps) {\n return (\n \n \n \n \n \n Toggle columns\n \n {table\n .getAllColumns()\n .filter((column) => column.getCanHide())\n .map((column) => {\n return (\n column.toggleVisibility(!!value)}\n >\n {column.id}\n \n );\n })}\n \n \n );\n}\n\nexport default DataTableViewOptions;\n","import React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Check, ChevronDown, ChevronUp } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n span]:tw-line-clamp-1',\n className,\n )}\n {...props}\n >\n {children}\n \n \n \n \n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, position = 'popper', ...props }, ref) => (\n \n \n \n \n {children}\n \n \n \n \n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n\n {children}\n \n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n","import { ChevronLeftIcon, ChevronRightIcon, ArrowLeftIcon, ArrowRightIcon } from 'lucide-react';\nimport { Table } from '@tanstack/react-table';\n\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\n\ninterface DataTablePaginationProps {\n table: Table;\n}\n\nfunction DataTablePagination({ table }: DataTablePaginationProps) {\n return (\n
\n
\n
\n {table.getFilteredSelectedRowModel().rows.length} of{' '}\n {table.getFilteredRowModel().rows.length} row(s) selected\n
\n
\n

Rows per page

\n {\n table.setPageSize(Number(value));\n }}\n >\n \n \n \n \n {[10, 20, 30, 40, 50].map((pageSize) => (\n \n {pageSize}\n \n ))}\n \n \n
\n
\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n
\n
\n table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n Go to first page\n \n \n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n Go to previous page\n \n \n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n Go to next page\n \n \n table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n Go to last page\n \n \n
\n
\n
\n );\n}\n\nexport default DataTablePagination;\n","import React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes & { stickyHeader?: boolean }\n>(({ className, stickyHeader, ...props }, ref) => (\n
\n \n
\n));\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes & { stickyHeader?: boolean }\n>(({ className, stickyHeader, ...props }, ref) => (\n \n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n tr]:last:tw-border-b-0', className)}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableCaption.displayName = 'TableCaption';\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n","import { useState } from 'react';\n\nimport {\n ColumnFiltersState,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n SortingState,\n ColumnDef as TSColumnDef,\n Row as TSRow,\n RowSelectionState as TSRowSelectionState,\n SortDirection as TSSortDirection,\n Table as TSTable,\n useReactTable,\n VisibilityState,\n} from '@tanstack/react-table';\n\nimport DataTableViewOptions from '@/components/advanced/data-table/data-table-column-toggle.component';\nimport DataTablePagination from '@/components/advanced/data-table/data-table-pagination.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\n\nexport type ColumnDef = TSColumnDef;\nexport type RowContents = TSRow;\nexport type TableContents = TSTable;\nexport type SortDirection = TSSortDirection;\nexport type RowSelectionState = TSRowSelectionState;\n\ninterface DataTableProps {\n columns: ColumnDef[];\n data: TData[];\n enablePagination?: boolean;\n showPaginationControls?: boolean;\n showColumnVisibilityControls?: boolean;\n stickyHeader?: boolean;\n onRowClickHandler?: (row: RowContents, table: TableContents) => void;\n}\n\n/**\n * Feature-rich table component that infuses our basic shadcn-based Table component with features\n * from TanStack's React Table library\n */\nfunction DataTable({\n columns,\n data,\n enablePagination = false,\n showPaginationControls = false,\n showColumnVisibilityControls = false,\n stickyHeader = false,\n onRowClickHandler = () => {},\n}: DataTableProps) {\n const [sorting, setSorting] = useState([]);\n const [columnFilters, setColumnFilters] = useState([]);\n const [columnVisibility, setColumnVisibility] = useState({});\n const [rowSelection, setRowSelection] = useState({});\n\n const table = useReactTable({\n data,\n columns,\n getCoreRowModel: getCoreRowModel(),\n ...(enablePagination && { getPaginationRowModel: getPaginationRowModel() }),\n onSortingChange: setSorting,\n getSortedRowModel: getSortedRowModel(),\n onColumnFiltersChange: setColumnFilters,\n getFilteredRowModel: getFilteredRowModel(),\n onColumnVisibilityChange: setColumnVisibility,\n onRowSelectionChange: setRowSelection,\n state: {\n sorting,\n columnFilters,\n columnVisibility,\n rowSelection,\n },\n });\n\n return (\n
\n {showColumnVisibilityControls && }\n \n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers.map((header) => {\n return (\n \n {header.isPlaceholder\n ? undefined\n : flexRender(header.column.columnDef.header, header.getContext())}\n \n );\n })}\n \n ))}\n \n \n {table.getRowModel().rows?.length ? (\n table.getRowModel().rows.map((row) => (\n onRowClickHandler(row, table)}\n key={row.id}\n data-state={row.getIsSelected() && 'selected'}\n >\n {row.getVisibleCells().map((cell) => (\n \n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n \n ))}\n \n ))\n ) : (\n \n \n No results.\n \n \n )}\n \n
\n {enablePagination && (\n
\n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n Previous\n \n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n Next\n \n
\n )}\n {enablePagination && showPaginationControls && }\n
\n );\n}\n\nexport default DataTable;\n","import {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport { Canon } from '@sillsdev/scripture';\nimport { deepEqual, LanguageStrings, ScriptureReference } from 'platform-bible-utils';\nimport { useMemo } from 'react';\nimport { InventoryItemOccurrence } from './inventory-utils';\n\n/** Props for the OccurrencesTable component */\ntype OccurrencesTableProps = {\n /** Data that contains scriptures references and snippets of scripture */\n occurrenceData: InventoryItemOccurrence[];\n /** Callback function that is executed when the scripture reference is changed */\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n /**\n * Object with all localized strings that the OccurrencesTable needs to work well across multiple\n * languages\n */\n localizedStrings: LanguageStrings;\n};\n\n/**\n * Table that shows occurrences of specified inventory item(s). The first column shows the related\n * scripture reference. The second column shows the snippet of scripture that contains the specified\n * inventory item\n */\nfunction OccurrencesTable({\n occurrenceData,\n setScriptureReference,\n localizedStrings,\n}: OccurrencesTableProps) {\n const referenceHeaderText =\n localizedStrings['%webView_inventory_occurrences_table_header_reference%'];\n const occurrenceHeaderText =\n localizedStrings['%webView_inventory_occurrences_table_header_occurrence%'];\n\n const occurrences: InventoryItemOccurrence[] = useMemo(() => {\n const uniqueOccurrences: InventoryItemOccurrence[] = [];\n\n occurrenceData.forEach((occurrence) => {\n if (!uniqueOccurrences.some((uniqueOccurrence) => deepEqual(uniqueOccurrence, occurrence))) {\n uniqueOccurrences.push(occurrence);\n }\n });\n\n return uniqueOccurrences;\n }, [occurrenceData]);\n\n return (\n \n \n \n {referenceHeaderText}\n {occurrenceHeaderText}\n \n \n \n {occurrences.length > 0 &&\n occurrences.map((occurrence) => (\n {\n setScriptureReference(occurrence.reference);\n }}\n >\n {`${Canon.bookNumberToEnglishName(occurrence.reference.bookNum)} ${occurrence.reference.chapterNum}:${occurrence.reference.verseNum}`}\n {occurrence.text}\n \n ))}\n \n
\n );\n}\n\nexport default OccurrencesTable;\n","import React from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Checkbox = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport default Checkbox;\n","import { Canon } from '@sillsdev/scripture';\nimport { ScriptureReference } from 'platform-bible-utils';\n\n/* #region Types */\n\n/**\n * Status of items that appear in inventories. 'approved' and 'unapproved' items are defined in the\n * project's `Settings.xml`. All other items are defined as 'unknown'\n */\nexport type Status = 'approved' | 'unapproved' | 'unknown';\n\n/** Occurrence of item in inventory. Primarily used by table that shows occurrences */\nexport type InventoryItemOccurrence = {\n /** Reference to scripture where the item appears */\n reference: ScriptureReference;\n /** Snippet of scripture that contains the occurrence */\n text: string;\n};\n\n/** Data structure that contains all information on an item that is shown in an inventory */\nexport type InventoryTableData = {\n /**\n * The item (e.g. a character in the characters inventory, a marker in the marker inventory) In\n * most cases the array will only have one element. In case of additional items (e.g. the\n * preceding marker in the markers check), the primary item should be stored in the first index.\n * To show additional items in the inventory, make sure to configure the `additionalItemsLabels`\n * prop for the Inventory component\n */\n items: string[];\n /** The number of times this item occurs in the selected scope */\n count: number;\n /** The status of this item (see documentation for `Status` type for more information) */\n status: Status;\n /** Occurrences of this item in the scripture text for the selected scope */\n occurrences: InventoryItemOccurrence[];\n};\n\n/* #endregion */\n\n/* #region Functions */\n\n/**\n * Splits USFM string into shorter line-like segments\n *\n * @param text A single (likely very large) USFM string\n * @returns An array containing the input text, split into shorter segments\n */\nexport const getLinesFromUSFM = (text: string) => {\n // Splits on (CR)LF, CR, \\v, \\c and \\id\n return text.split(/(?:\\r?\\n|\\r)|(?=(?:\\\\(?:v|c|id)))/g);\n};\n\n/**\n * Extracts chapter or verse number from USFM strings that start with a \\c or \\v marker\n *\n * @param text USFM string that is expected to start with \\c or \\v marker\n * @returns Chapter or verse number if one is found. Else returns 0.\n */\nexport const getNumberFromUSFM = (text: string): number | undefined => {\n // Captures all digits that follow \\v or \\c markers followed by whitespace located at the start of a string\n const regex = /^\\\\[vc]\\s+(\\d+)/;\n const match = text.match(regex);\n\n if (match) {\n return +match[1];\n }\n return undefined;\n};\n\n/**\n * Gets book ID from USFM string that starts with the \\id marker, and returns book number for it\n *\n * @param text USFM string that is expected to start with \\id marker\n * @returns Book number corresponding to the \\id marker in the input text. Returns 0 if no marker is\n * found or the marker is not valid\n */\nexport const getBookNumFromId = (text: string): number => {\n // Captures all digits that follow an \\id marker followed by whitespace located at the start of a string\n const match = text.match(/^\\\\id\\s+([A-Za-z]+)/);\n if (match) {\n return Canon.bookIdToNumber(match[1]);\n }\n return 0;\n};\n\n/**\n * Gets the status for an item, typically used in the Inventory component\n *\n * @param item The item for which the status is being requested\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @returns The status for the specified item\n */\nexport const getStatusForItem = (\n item: string,\n approvedItems: string[],\n unapprovedItems: string[],\n): Status => {\n if (unapprovedItems.includes(item)) return 'unapproved';\n if (approvedItems.includes(item)) return 'approved';\n return 'unknown';\n};\n\n/* #endregion */\n","import React from 'react';\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst toggleVariants = cva(\n 'pr-twp tw-inline-flex tw-items-center tw-justify-center tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors hover:tw-bg-muted hover:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=on]:tw-bg-accent data-[state=on]:tw-text-accent-foreground',\n {\n variants: {\n variant: {\n default: 'tw-bg-transparent',\n outline:\n 'tw-border tw-border-input tw-bg-transparent hover:tw-bg-accent hover:tw-text-accent-foreground',\n },\n size: {\n default: 'tw-h-10 tw-px-3',\n sm: 'tw-h-9 tw-px-2.5',\n lg: 'tw-h-11 tw-px-5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst Toggle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & VariantProps\n>(({ className, variant, size, ...props }, ref) => (\n \n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n","import React from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { toggleVariants } from '@/components/shadcn-ui/toggle';\n\nconst ToggleGroupContext = React.createContext>({\n size: 'default',\n variant: 'default',\n});\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, size, children, ...props }, ref) => (\n \n \n {children}\n \n \n));\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n \n {children}\n \n );\n});\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;\n\nexport { ToggleGroup, ToggleGroupItem };\n","import { ColumnDef, SortDirection } from '@/components/advanced/data-table/data-table.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport { ToggleGroup, ToggleGroupItem } from '@/components/shadcn-ui/toggle-group';\nimport {\n ArrowDownIcon,\n ArrowUpDownIcon,\n ArrowUpIcon,\n CircleCheckIcon,\n CircleHelpIcon,\n CircleXIcon,\n} from 'lucide-react';\nimport { ReactNode } from 'react';\nimport { InventoryTableData, Status } from './inventory-utils';\n\n/**\n * Gets an icon that indicates the current sorting direction based on the provided input\n *\n * @param sortDirection Sorting direction. Can be ascending ('asc'), descending ('desc') or false (\n * i.e. not sorted)\n * @returns The appropriate sorting icon for the provided sorting direction\n */\nconst getSortingIcon = (sortDirection: false | SortDirection): ReactNode => {\n if (sortDirection === 'asc') {\n return ;\n }\n if (sortDirection === 'desc') {\n return ;\n }\n return ;\n};\n\n/**\n * Function that creates the item column for inventories\n *\n * @param itemLabel Localized label for the item column (e.g. 'Character', 'Repeated Word', etc.)\n * @returns Column that shows the inventory items. Should be used with the DataTable component\n */\nexport const inventoryItemColumn = (itemLabel: string): ColumnDef => {\n return {\n accessorKey: 'item',\n accessorFn: (row: InventoryTableData) => row.items[0],\n header: ({ column }) => (\n \n ),\n };\n};\n\n/**\n * Function that creates the additional item columns for inventories\n *\n * @param additionalItemLabel Localized label for the additional item column (e.g. 'Preceding\n * Marker')\n * @param additionalItemIndex Index that locates the desired item in the items array of the\n * inventory\n * @returns Column that shows additional inventory items. Should be used with the DataTable\n * component\n */\nexport const inventoryAdditionalItemColumn = (\n additionalItemLabel: string,\n additionalItemIndex: number,\n): ColumnDef => {\n return {\n accessorKey: `item${additionalItemIndex}`,\n accessorFn: (row: InventoryTableData) => row.items[additionalItemIndex],\n header: ({ column }) => (\n \n ),\n };\n};\n\n/**\n * Function that creates the count column for inventories. Should be used with the DataTable\n * component.\n *\n * @param itemLabel Localized label for the count column\n * @returns Column that shows the number of occurrences of the related inventory items\n */\nexport const inventoryCountColumn = (countLabel: string): ColumnDef => {\n return {\n accessorKey: 'count',\n header: ({ column }) => (\n
\n \n
\n ),\n cell: ({ row }) =>
{row.getValue('count')}
,\n };\n};\n\n/**\n * Function that updates project settings when status for item(s) changes\n *\n * @param changedItems Array of items for which the status is being updated\n * @param newStatus The status that the items are being given\n * @param approvedItems Array of currently approved items\n * @param onApprovedItemsChange Callback function that stores the updated list of approved items\n * @param unapprovedItems Array of currently unapproved items\n * @param onUnapprovedItemsChange Callback function that stores the updated list of unapproved items\n */\nconst statusChangeHandler = (\n changedItems: string[],\n newStatus: Status,\n approvedItems: string[],\n onApprovedItemsChange: (items: string[]) => void,\n unapprovedItems: string[],\n onUnapprovedItemsChange: (items: string[]) => void,\n) => {\n let newApprovedItems: string[] = [...approvedItems];\n changedItems.forEach((item) => {\n if (newStatus === 'approved') {\n if (!newApprovedItems.includes(item)) {\n newApprovedItems.push(item);\n }\n } else {\n newApprovedItems = newApprovedItems.filter((validItem) => validItem !== item);\n }\n });\n onApprovedItemsChange(newApprovedItems);\n\n let newUnapprovedItems: string[] = [...unapprovedItems];\n changedItems.forEach((item) => {\n if (newStatus === 'unapproved') {\n if (!newUnapprovedItems.includes(item)) {\n newUnapprovedItems.push(item);\n }\n } else {\n newUnapprovedItems = newUnapprovedItems.filter((unapprovedItem) => unapprovedItem !== item);\n }\n });\n onUnapprovedItemsChange(newUnapprovedItems);\n};\n\n/**\n * Function that creates the status column for inventories. Should be used with the DataTable\n * component.\n *\n * @param statusLabel Localized label for the status column\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param onApprovedItemsChange Callback function that stores the updated list of approved items\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @param onUnapprovedItemsChange Callback function that stores the updated list of unapproved items\n * @returns Column that shows the status buttons for the related inventory item. The button for the\n * current status of the item is selected\n */\nexport const inventoryStatusColumn = (\n statusLabel: string,\n approvedItems: string[],\n onApprovedItemsChange: (items: string[]) => void,\n unapprovedItems: string[],\n onUnapprovedItemsChange: (items: string[]) => void,\n): ColumnDef => {\n return {\n accessorKey: 'status',\n header: ({ column }) => {\n return (\n
\n \n
\n );\n },\n cell: ({ row }) => {\n const status: Status = row.getValue('status');\n const item: string = row.getValue('item');\n return (\n \n \n statusChangeHandler(\n [item],\n 'approved',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"approved\"\n >\n \n \n \n statusChangeHandler(\n [item],\n 'unapproved',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"unapproved\"\n >\n \n \n \n statusChangeHandler(\n [item],\n 'unknown',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"unknown\"\n >\n \n \n \n );\n },\n };\n};\n","import DataTable, {\n ColumnDef,\n RowContents,\n RowSelectionState,\n TableContents,\n} from '@/components/advanced/data-table/data-table.component';\nimport OccurrencesTable from '@/components/advanced/inventory/occurrences-table.component';\nimport Checkbox from '@/components/shadcn-ui/checkbox';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { Label } from '@/components/shadcn-ui/label';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport {\n deepEqual,\n LocalizedStringValue,\n ScriptureReference,\n substring,\n} from 'platform-bible-utils';\nimport { useEffect, useMemo, useState } from 'react';\nimport {\n getBookNumFromId,\n getLinesFromUSFM,\n getNumberFromUSFM,\n getStatusForItem,\n InventoryItemOccurrence,\n InventoryTableData,\n Status,\n} from './inventory-utils';\nimport { inventoryAdditionalItemColumn } from './inventory-columns';\n\n/**\n * Object containing all keys used for localization in this component. If you're using this\n * component in an extension, you can pass it into the useLocalizedStrings hook to easily obtain the\n * localized strings and pass them into the localizedStrings prop of this component\n */\nexport const INVENTORY_STRING_KEYS = Object.freeze([\n '%webView_inventory_all%',\n '%webView_inventory_approved%',\n '%webView_inventory_unapproved%',\n '%webView_inventory_unknown%',\n '%webView_inventory_scope_currentBook%',\n '%webView_inventory_scope_chapter%',\n '%webView_inventory_scope_verse%',\n '%webView_inventory_filter_text%',\n '%webView_inventory_show_additional_items%',\n '%webView_inventory_occurrences_table_header_reference%',\n '%webView_inventory_occurrences_table_header_occurrence%',\n] as const);\n\nexport type InventoryLocalizedStrings = {\n [localizedInventoryKey in (typeof INVENTORY_STRING_KEYS)[number]]?: LocalizedStringValue;\n};\n\n/** Scope of scripture that the inventory can operate on */\nexport type Scope = 'book' | 'chapter' | 'verse';\n\n/** Status values that the status filter can select from */\ntype StatusFilter = Status | 'all';\n\n/** Text labels for the inventory columns and the control components of additional inventory items */\ntype AdditionalItemsLabels = {\n checkboxText?: string;\n tableHeaders?: string[];\n};\n\n/**\n * Filters data that is shown in the DataTable section of the Inventory\n *\n * @param itemData All inventory items and their related information\n * @param statusFilter Allows filtering by status (i.e. show all items, or only items that are\n * 'approved', 'unapproved' or 'unknown')\n * @param textFilter Allows filtering by text. All items that include the filter text will be\n * selected.\n * @returns Array of items and their related information that are matched by the specified filters\n */\nconst filterItemData = (\n itemData: InventoryTableData[],\n statusFilter: StatusFilter,\n textFilter: string,\n): InventoryTableData[] => {\n let filteredItemData: InventoryTableData[] = itemData;\n\n if (statusFilter !== 'all') {\n filteredItemData = filteredItemData.filter(\n (item) =>\n (statusFilter === 'approved' && item.status === 'approved') ||\n (statusFilter === 'unapproved' && item.status === 'unapproved') ||\n (statusFilter === 'unknown' && item.status === 'unknown'),\n );\n }\n\n if (textFilter !== '')\n filteredItemData = filteredItemData.filter((item) => item.items[0].includes(textFilter));\n\n return filteredItemData;\n};\n\n/**\n * Turns array of strings into array of inventory items, along with their count and status\n *\n * @param text The source scripture text that is searched for inventory items\n * @param scriptureRef The scripture reference that the application is currently set to\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @param itemRegex Regular expression that describes what items this Inventory should extract from\n * the provided scripture text\n * @returns Array of inventory items, along with their count and status\n */\nconst createTableData = (\n text: string | undefined,\n scriptureRef: ScriptureReference,\n approvedItems: string[],\n unapprovedItems: string[],\n itemRegex: RegExp,\n): InventoryTableData[] => {\n if (!text) return [];\n\n const tableData: InventoryTableData[] = [];\n\n let currentBook: number | undefined = scriptureRef.bookNum;\n let currentChapter: number | undefined = scriptureRef.chapterNum;\n let currentVerse: number | undefined = scriptureRef.verseNum;\n\n const lines = getLinesFromUSFM(text);\n\n lines.forEach((line: string) => {\n if (line.startsWith('\\\\id')) {\n currentBook = getBookNumFromId(line);\n currentChapter = 0;\n currentVerse = 0;\n }\n if (line.startsWith('\\\\c')) {\n currentChapter = getNumberFromUSFM(line);\n currentVerse = 0;\n }\n if (line.startsWith('\\\\v')) {\n currentVerse = getNumberFromUSFM(line);\n if (currentChapter === 0) {\n currentChapter = scriptureRef.chapterNum;\n }\n }\n\n let match: RegExpExecArray | undefined = itemRegex.exec(line) ?? undefined;\n while (match) {\n const items: string[] = [];\n match.forEach((item) => items.push(item));\n const itemIndex = match.index;\n const existingItem = tableData.find((tableEntry) => deepEqual(tableEntry.items, items));\n const newReference: InventoryItemOccurrence = {\n reference: {\n bookNum: currentBook !== undefined ? currentBook : -1,\n chapterNum: currentChapter !== undefined ? currentChapter : -1,\n verseNum: currentVerse !== undefined ? currentVerse : -1,\n },\n text: substring(line, Math.max(0, itemIndex - 25), Math.min(itemIndex + 25, line.length)),\n };\n if (existingItem) {\n existingItem.count += 1;\n existingItem.occurrences.push(newReference);\n } else {\n const newItem: InventoryTableData = {\n items,\n count: 1,\n status: getStatusForItem(items[0], approvedItems, unapprovedItems),\n occurrences: [newReference],\n };\n tableData.push(newItem);\n }\n\n match = itemRegex.exec(line) ?? undefined;\n }\n });\n\n return tableData;\n};\n\n/**\n * Gets the localized value for the provided key\n *\n * @param strings Object containing localized string\n * @param key Key for a localized string\n * @returns The localized value for the provided key, if available. Returns the key if no localized\n * value is available\n */\nconst localizeString = (\n strings: InventoryLocalizedStrings,\n key: keyof InventoryLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\n/** Props for the Inventory component */\ntype InventoryProps = {\n /** The scripture reference that the application is currently set to */\n scriptureReference: ScriptureReference;\n /** Callback function that is executed when the scripture reference is changed */\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n /**\n * Object with all localized strings that the Inventory needs to work well across multiple\n * languages. When using this component with Platform.Bible, you can import\n * `INVENTORY_STRING_KEYS` from this library, pass it in to the Platform's localization hook, and\n * pass the localized keys that are returned by the hook into this prop.\n */\n localizedStrings: InventoryLocalizedStrings;\n /**\n * The logic that finds the desired items in the source text. This can either be a Regular\n * expression that captures one or multiple items (preferred), or a custom function that builds\n * and return an InventoryDataTable[] manually. Note: In case the logic captures more than one\n * item (i.e. InventoryTableData.items has a length greater than 1), you must provide text labels\n * for the related columns and control elements to show by setting the `additionalItemsLabels`\n * prop\n */\n extractItems:\n | RegExp\n | ((\n text: string | undefined,\n scriptureRef: ScriptureReference,\n approvedItems: string[],\n unapprovedItems: string[],\n ) => InventoryTableData[]);\n /**\n * Text labels for control elements and additional column headers in case your Inventory has more\n * than one item to show (e.g. The 'Preceding Marker' in the Markers Inventory)\n */\n additionalItemsLabels?: AdditionalItemsLabels;\n /** Array of approved items, typically as defined in `Settings.xml` */\n approvedItems: string[];\n /** Array of unapproved items, typically as defined in `Settings.xml` */\n unapprovedItems: string[];\n /** The source scripture text that is searched for in inventory items */\n text: string | undefined;\n /** Scope of scripture that the inventory will operate on */\n scope: Scope;\n /** Callback function that is executed when the scope is changed from the Inventory */\n onScopeChange: (scope: Scope) => void;\n /**\n * Column definitions for the Inventory data table. The most commonly used column definitions are\n * pre-configured for your convenience and can be imported (e.g. inventoryItemColumn,\n * inventoryAdditionalItemColumn inventoryCountColumn, and inventoryStatusColumn). If you need any\n * other columns you can add these yourself\n */\n columns: ColumnDef[];\n};\n\n/** Inventory component that is used to view and control the status of provided project settings */\nexport default function Inventory({\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n extractItems,\n additionalItemsLabels,\n approvedItems,\n unapprovedItems,\n text,\n scope,\n onScopeChange,\n columns,\n}: InventoryProps) {\n const allItemsText = localizeString(localizedStrings, '%webView_inventory_all%');\n const approvedItemsText = localizeString(localizedStrings, '%webView_inventory_approved%');\n const unapprovedItemsText = localizeString(localizedStrings, '%webView_inventory_unapproved%');\n const unknownItemsText = localizeString(localizedStrings, '%webView_inventory_unknown%');\n const scopeBookText = localizeString(localizedStrings, '%webView_inventory_scope_currentBook%');\n const scopeChapterText = localizeString(localizedStrings, '%webView_inventory_scope_chapter%');\n const scopeVerseText = localizeString(localizedStrings, '%webView_inventory_scope_verse%');\n const filterText = localizeString(localizedStrings, '%webView_inventory_filter_text%');\n const showAdditionalItemsText = localizeString(\n localizedStrings,\n '%webView_inventory_show_additional_items%',\n );\n\n const [showAdditionalItems, setShowAdditionalItems] = useState(false);\n const [statusFilter, setStatusFilter] = useState('all');\n const [textFilter, setTextFilter] = useState('');\n const [selectedItem, setSelectedItem] = useState([]);\n\n const tableData: InventoryTableData[] = useMemo(() => {\n if (!text) return [];\n if (extractItems instanceof RegExp)\n return createTableData(\n text,\n scriptureReference,\n approvedItems,\n unapprovedItems,\n extractItems,\n );\n return extractItems(text, scriptureReference, approvedItems, unapprovedItems);\n }, [text, extractItems, scriptureReference, approvedItems, unapprovedItems]);\n\n const reducedTableData: InventoryTableData[] = useMemo(() => {\n if (showAdditionalItems) return tableData;\n\n const newTableData: InventoryTableData[] = [];\n\n tableData.forEach((tableEntry) => {\n const firstItem = tableEntry.items[0];\n\n const existingEntry = newTableData.find(\n (newTableEntry) => newTableEntry.items[0] === firstItem,\n );\n\n if (existingEntry) {\n existingEntry.count += tableEntry.count;\n existingEntry.occurrences = existingEntry.occurrences.concat(tableEntry.occurrences);\n } else {\n newTableData.push({\n items: [firstItem],\n count: tableEntry.count,\n occurrences: tableEntry.occurrences,\n status: tableEntry.status,\n });\n }\n });\n\n return newTableData;\n }, [showAdditionalItems, tableData]);\n\n const filteredTableData: InventoryTableData[] = useMemo(() => {\n return filterItemData(reducedTableData, statusFilter, textFilter);\n }, [reducedTableData, statusFilter, textFilter]);\n\n const allColumns: ColumnDef[] = useMemo(() => {\n if (!showAdditionalItems) return columns;\n\n const numberOfAdditionalItems = additionalItemsLabels?.tableHeaders?.length;\n if (!numberOfAdditionalItems) return columns;\n\n const additionalColumns: ColumnDef[] = [];\n\n for (let index = 0; index < numberOfAdditionalItems; index++) {\n additionalColumns.push(\n inventoryAdditionalItemColumn(\n additionalItemsLabels?.tableHeaders?.[index] || 'Additional Item',\n index + 1,\n ),\n );\n }\n\n return [...additionalColumns, ...columns];\n }, [additionalItemsLabels?.tableHeaders, columns, showAdditionalItems]);\n\n useEffect(() => {\n setSelectedItem([]);\n }, [filteredTableData]);\n\n const rowClickHandler = (\n row: RowContents,\n table: TableContents,\n ) => {\n table.setRowSelection(() => {\n const newSelection: RowSelectionState = {};\n newSelection[row.index] = true;\n return newSelection;\n });\n\n setSelectedItem(row.original.items);\n };\n\n const handleScopeChange = (value: string) => {\n if (value === 'book' || value === 'chapter' || value === 'verse') {\n onScopeChange(value);\n } else {\n throw new Error(`Invalid scope value: ${value}`);\n }\n };\n\n const handleStatusFilterChange = (value: string) => {\n if (value === 'all' || value === 'approved' || value === 'unapproved' || value === 'unknown') {\n setStatusFilter(value);\n } else {\n throw new Error(`Invalid status filter value: ${value}`);\n }\n };\n\n const occurrenceData: InventoryItemOccurrence[] = useMemo(() => {\n if (reducedTableData.length === 0 || selectedItem.length === 0) return [];\n const occurrence = reducedTableData.filter((tableEntry: InventoryTableData) => {\n return deepEqual(\n showAdditionalItems ? tableEntry.items : [tableEntry.items[0]],\n selectedItem,\n );\n });\n if (occurrence.length > 1) throw new Error('Selected item is not unique');\n return occurrence[0].occurrences;\n }, [selectedItem, showAdditionalItems, reducedTableData]);\n\n return (\n
\n
\n handleStatusFilterChange(value)}\n defaultValue={statusFilter}\n >\n \n \n \n \n {allItemsText}\n {approvedItemsText}\n {unapprovedItemsText}\n {unknownItemsText}\n \n \n \n {\n setTextFilter(event.target.value);\n }}\n />\n {additionalItemsLabels && (\n
\n {\n setSelectedItem([]);\n setShowAdditionalItems(checked);\n }}\n />\n \n
\n )}\n
\n
\n \n
\n {occurrenceData.length > 0 && (\n
\n \n
\n )}\n
\n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/shadcn-ui/command';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/shadcn-ui/popover';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Check, ChevronsUpDown, Star } from 'lucide-react';\nimport { ReactNode, useCallback, useMemo, useState } from 'react';\n\ntype MultiSelectComboBoxEntry = {\n value: string;\n label: string;\n starred?: boolean;\n};\n\ninterface MultiSelectComboBoxProps {\n entries: MultiSelectComboBoxEntry[];\n getEntriesCount?: (option: MultiSelectComboBoxEntry) => number;\n selected: string[];\n onChange: (values: string[]) => void;\n placeholder: string;\n commandEmptyMessage?: string;\n customSelectedText?: string;\n sortSelected?: boolean;\n icon?: ReactNode;\n}\n\nfunction MultiSelectComboBox({\n entries,\n getEntriesCount = undefined,\n selected,\n onChange,\n placeholder,\n commandEmptyMessage = 'No option found',\n customSelectedText,\n sortSelected = false,\n icon = undefined,\n}: MultiSelectComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n const handleSelect = useCallback(\n (value: string) => {\n onChange(\n selected.includes(value) ? selected.filter((item) => item !== value) : [...selected, value],\n );\n },\n [selected, onChange],\n );\n\n const getPlaceholderText = () => {\n if (selected.length === 1)\n return entries.find((option) => option.value === selected[0])?.label ?? placeholder;\n if (customSelectedText) return customSelectedText;\n return placeholder;\n };\n\n const sortedOptions = useMemo(() => {\n if (!sortSelected) return entries;\n\n const starredItems = entries\n .filter((opt) => opt.starred)\n .sort((a, b) => a.label.localeCompare(b.label));\n const nonStarredItems = entries\n .filter((opt) => !opt.starred)\n .sort((a, b) => {\n const aSelected = selected.includes(a.value);\n const bSelected = selected.includes(b.value);\n if (aSelected && !bSelected) return -1;\n if (!aSelected && bSelected) return 1;\n return a.label.localeCompare(b.label);\n });\n\n return [...starredItems, ...nonStarredItems];\n }, [entries, selected, sortSelected]);\n\n return (\n \n \n 0 && selected.length < entries.length && 'tw-border-primary',\n )}\n >\n
\n
\n \n {icon}\n \n
\n \n {getPlaceholderText()}\n
\n \n \n \n
\n \n \n \n \n {commandEmptyMessage}\n \n {sortedOptions.map((option) => {\n const count: number | undefined = getEntriesCount\n ? getEntriesCount(option)\n : undefined;\n return (\n \n
\n \n
\n
\n {option.starred && }\n
\n
{option.label}
\n {getEntriesCount && (\n
{count}
\n )}\n \n );\n })}\n
\n
\n
\n
\n
\n );\n}\n\nexport default MultiSelectComboBox;\n","import { Button } from '@/components/shadcn-ui/button';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Search, X } from 'lucide-react';\nimport { useState } from 'react';\n\nexport type SearchBarProps = {\n /**\n * Callback fired to handle the search query when button pressed\n *\n * @param searchQuery\n */\n onSearch: (searchQuery: string) => void;\n\n /** Optional string that appears in the search bar without a search string */\n placeholder?: string;\n\n /** Optional boolean to set the input base to full width */\n isFullWidth?: boolean;\n\n /** ClassName for the input */\n className?: string;\n};\n\nexport default function SearchBar({\n onSearch,\n placeholder,\n isFullWidth,\n className,\n}: SearchBarProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const handleInputChange = (searchString: string) => {\n setSearchQuery(searchString);\n onSearch(searchString);\n };\n\n return (\n
\n \n handleInputChange(e.target.value)}\n />\n {searchQuery && (\n \n {\n handleInputChange('');\n }}\n />\n Clear\n \n )}\n
\n );\n}\n","// adapted from: https://github.com/shadcn-ui/ui/discussions/752\n\n'use client';\n\nimport { TabsContentProps, TabsListProps, TabsTriggerProps } from '@/components/shadcn-ui/tabs';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\nimport React from 'react';\n\nexport type VerticalTabsProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type LeftTabsTriggerProps = TabsTriggerProps & {\n value: string;\n ref?: React.Ref;\n};\n\nexport const VerticalTabs = React.forwardRef<\n React.ElementRef,\n VerticalTabsProps\n>(({ className, ...props }, ref) => (\n \n));\n\nVerticalTabs.displayName = TabsPrimitive.List.displayName;\n\nexport const VerticalTabsList = React.forwardRef<\n React.ElementRef,\n TabsListProps\n>(({ className, ...props }, ref) => (\n \n));\nVerticalTabsList.displayName = TabsPrimitive.List.displayName;\n\nexport const VerticalTabsTrigger = React.forwardRef<\n React.ElementRef,\n LeftTabsTriggerProps\n>(({ className, ...props }, ref) => (\n \n));\n\nexport const VerticalTabsContent = React.forwardRef<\n React.ElementRef,\n TabsContentProps\n>(({ className, ...props }, ref) => (\n \n));\nVerticalTabsContent.displayName = TabsPrimitive.Content.displayName;\n","import SearchBar from '@/components/basics/search-bar.component';\nimport {\n VerticalTabs,\n VerticalTabsContent,\n VerticalTabsList,\n VerticalTabsTrigger,\n} from '@/components/basics/tabs-vertical';\nimport { ReactNode } from 'react';\n\nexport type TabKeyValueContent = {\n key: string;\n value: string;\n content: ReactNode;\n};\n\nexport type NavigationContentSearchProps = {\n /** List of values and keys for each tab this component should provide */\n tabList: TabKeyValueContent[];\n\n /** Handler to run when the value of the search bar changes */\n onSearch: (searchQuery: string) => void;\n\n /** Optional placeholder for the search bar */\n searchPlaceholder?: string;\n\n /** Optional title to include in the header */\n headerTitle?: string;\n\n /** Optional flag to make the search bar appear full width */\n isSearchBarFullWidth?: boolean;\n\n /** Text direction ltr or rtl */\n direction?: 'ltr' | 'rtl';\n};\n\nexport default function NavigationContentSearch({\n tabList,\n onSearch,\n searchPlaceholder,\n headerTitle,\n isSearchBarFullWidth = false,\n direction = 'ltr',\n}: NavigationContentSearchProps) {\n return (\n
\n
\n {headerTitle ?

{headerTitle}

: ''}\n \n
\n \n \n {tabList.map((tab) => (\n \n {tab.value}\n \n ))}\n \n {tabList.map((tab) => (\n \n {tab.content}\n \n ))}\n \n
\n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Canon } from '@sillsdev/scripture';\nimport {\n Cell,\n ColumnDef,\n flexRender,\n getCoreRowModel,\n getExpandedRowModel,\n getGroupedRowModel,\n getSortedRowModel,\n GroupingState,\n Row,\n RowSelectionState,\n SortingState,\n useReactTable,\n} from '@tanstack/react-table';\nimport '@/components/advanced/scripture-results-viewer/scripture-results-viewer.component.css';\nimport {\n compareScrRefs,\n formatScrRef,\n ScriptureSelection,\n scrRefToBBBCCCVVV,\n} from 'platform-bible-utils';\nimport { MouseEvent, useEffect, useMemo, useState } from 'react';\nimport { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\n\n/**\n * Information (e.g., a checking error or some other type of \"transient\" annotation) about something\n * noteworthy at a specific place in an instance of the Scriptures.\n */\nexport type ScriptureItemDetail = ScriptureSelection & {\n /**\n * Text of the error, note, etc. In the future, we might want to support something more than just\n * text so that a JSX element could be provided with a link or some other controls related to the\n * issue being reported.\n */\n detail: string;\n};\n\n/**\n * A uniquely identifiable source of results that can be displayed in the ScriptureResultsViewer.\n * Generally, the source will be a particular Scripture check, but there may be other types of\n * sources.\n */\nexport type ResultsSource = {\n /**\n * Uniquely identifies the source.\n *\n * @type {string}\n */\n id: string;\n\n /**\n * Name (potentially localized) of the source, suitable for display in the UI.\n *\n * @type {string}\n */\n displayName: string;\n};\n\nexport type ScriptureSrcItemDetail = ScriptureItemDetail & {\n /** Source/type of detail. Can be used for grouping. */\n source: ResultsSource;\n};\n\n/**\n * Represents a set of results keyed by Scripture reference. Generally, the source will be a\n * particular Scripture check, but this type also allows for other types of uniquely identifiable\n * sources.\n */\nexport type ResultsSet = {\n /**\n * The backing source associated with this set of results.\n *\n * @type {ResultsSource}\n */\n source: ResultsSource;\n\n /**\n * Array of Scripture item details (messages keyed by Scripture reference).\n *\n * @type {ScriptureItemDetail[]}\n */\n data: ScriptureItemDetail[];\n};\n\nconst scrBookColId = 'scrBook';\nconst scrRefColId = 'scrRef';\nconst typeColId = 'source';\nconst detailsColId = 'details';\n\nconst defaultScrRefColumnName = 'Scripture Reference';\nconst defaultScrBookGroupName = 'Scripture Book';\nconst defaultTypeColumnName = 'Type';\nconst defaultDetailsColumnName = 'Details';\n\nexport type ScriptureResultsViewerColumnInfo = {\n /** Optional header to display for the Reference column. Default value: 'Scripture Reference'. */\n scriptureReferenceColumnName?: string;\n\n /** Optional text to display to refer to the Scripture book group. Default value: 'Scripture Book'. */\n scriptureBookGroupName?: string;\n\n /** Optional header to display for the Type column. Default value: 'Type'. */\n typeColumnName?: string;\n\n /** Optional header to display for the Details column. Default value: 'Details' */\n detailsColumnName?: string;\n};\n\nexport type ScriptureResultsViewerProps = ScriptureResultsViewerColumnInfo & {\n /** Groups of ScriptureItemDetail objects from particular sources (e.g., Scripture checks) */\n sources: ResultsSet[];\n\n /** Flag indicating whether to display column headers. Default is false. */\n showColumnHeaders?: boolean;\n\n /** Flag indicating whether to display source column. Default is false. */\n showSourceColumn?: boolean;\n\n /** Callback function to notify when a row is selected */\n onRowSelected?: (selectedRow: ScriptureSrcItemDetail | undefined) => void;\n\n /** Text direction ltr or rtl */\n direction?: 'ltr' | 'rtl';\n};\n\nfunction getColumns(\n colInfo?: ScriptureResultsViewerColumnInfo,\n showSourceColumn?: boolean,\n): ColumnDef[] {\n const showSrcCol = showSourceColumn ?? false;\n return [\n {\n accessorFn: (row) =>\n `${Canon.bookNumberToId(row.start.bookNum)} ${row.start.chapterNum}:${row.start.verseNum}`,\n id: scrBookColId,\n header: colInfo?.scriptureReferenceColumnName ?? defaultScrRefColumnName,\n cell: (info) => {\n const row = info.row.original;\n if (info.row.getIsGrouped()) {\n return Canon.bookNumberToEnglishName(row.start.bookNum);\n }\n return info.row.groupingColumnId === scrBookColId ? formatScrRef(row.start) : undefined;\n },\n getGroupingValue: (row) => row.start.bookNum,\n sortingFn: (a, b) => {\n return compareScrRefs(a.original.start, b.original.start);\n },\n enableGrouping: true,\n },\n {\n accessorFn: (row) => formatScrRef(row.start),\n id: scrRefColId,\n header: undefined,\n cell: (info) => {\n const row = info.row.original;\n return info.row.getIsGrouped() ? undefined : formatScrRef(row.start);\n },\n sortingFn: (a, b) => {\n return compareScrRefs(a.original.start, b.original.start);\n },\n enableGrouping: false,\n },\n {\n accessorFn: (row) => row.source.displayName,\n id: typeColId,\n header: showSrcCol ? (colInfo?.typeColumnName ?? defaultTypeColumnName) : undefined,\n cell: (info) => (showSrcCol || info.row.getIsGrouped() ? info.getValue() : undefined),\n getGroupingValue: (row) => row.source.id,\n sortingFn: (a, b) =>\n a.original.source.displayName.localeCompare(b.original.source.displayName),\n enableGrouping: true,\n },\n {\n accessorFn: (row) => row.detail,\n id: detailsColId,\n header: colInfo?.detailsColumnName ?? defaultDetailsColumnName,\n cell: (info) => info.getValue(),\n enableGrouping: false,\n },\n ];\n}\n\nconst toRefOrRange = (scriptureSelection: ScriptureSelection) => {\n if (!('offset' in scriptureSelection.start))\n throw new Error('No offset available in range start');\n if (scriptureSelection.end && !('offset' in scriptureSelection.end))\n throw new Error('No offset available in range end');\n const { offset: offsetStart } = scriptureSelection.start;\n let offsetEnd: number = 0;\n if (scriptureSelection.end) ({ offset: offsetEnd } = scriptureSelection.end);\n if (\n !scriptureSelection.end ||\n compareScrRefs(scriptureSelection.start, scriptureSelection.end) === 0\n )\n return `${scrRefToBBBCCCVVV(scriptureSelection.start)}+${offsetStart}`;\n return `${scrRefToBBBCCCVVV(scriptureSelection.start)}+${offsetStart}-${scrRefToBBBCCCVVV(scriptureSelection.end)}+${offsetEnd}`;\n};\n\nconst getRowKey = (row: ScriptureSrcItemDetail) =>\n `${toRefOrRange({ start: row.start, end: row.end })} ${row.source.displayName} ${row.detail}`;\n\n/**\n * Component to display a combined list of detailed items from one or more sources, where the items\n * are keyed primarily by Scripture reference. This is particularly useful for displaying a list of\n * results from Scripture checks, but more generally could be used to display any \"results\" from any\n * source(s). The component allows for grouping by Scripture book, source, or both. By default, it\n * displays somewhat \"tree-like\" which allows it to be more horizontally compact and intuitive. But\n * it also has the option of displaying as a traditional table with column headings (with or without\n * the source column showing).\n */\nexport default function ScriptureResultsViewer({\n sources,\n showColumnHeaders = false,\n showSourceColumn = false,\n scriptureReferenceColumnName,\n scriptureBookGroupName,\n typeColumnName,\n detailsColumnName,\n onRowSelected,\n direction = 'ltr',\n}: ScriptureResultsViewerProps) {\n const [grouping, setGrouping] = useState([]);\n const [sorting, setSorting] = useState([{ id: scrBookColId, desc: false }]);\n const [rowSelection, setRowSelection] = useState({});\n\n const scriptureResults = useMemo(\n () =>\n sources.flatMap((source) => {\n return source.data.map((item) => ({\n ...item,\n source: source.source,\n }));\n }),\n [sources],\n );\n\n const columns = useMemo(\n () =>\n getColumns(\n {\n scriptureReferenceColumnName,\n typeColumnName,\n detailsColumnName,\n },\n showSourceColumn,\n ),\n [scriptureReferenceColumnName, typeColumnName, detailsColumnName, showSourceColumn],\n );\n\n useEffect(() => {\n // Ensure sorting is applied correctly when grouped by type\n if (grouping.includes(typeColId)) {\n setSorting([\n { id: typeColId, desc: false },\n { id: scrBookColId, desc: false },\n ]);\n } else {\n setSorting([{ id: scrBookColId, desc: false }]);\n }\n }, [grouping]);\n\n const table = useReactTable({\n data: scriptureResults,\n columns,\n state: {\n grouping,\n sorting,\n rowSelection,\n },\n onGroupingChange: setGrouping,\n onSortingChange: setSorting,\n onRowSelectionChange: setRowSelection,\n getExpandedRowModel: getExpandedRowModel(),\n getGroupedRowModel: getGroupedRowModel(),\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getRowId: getRowKey,\n autoResetExpanded: false,\n enableMultiRowSelection: false,\n enableSubRowSelection: false,\n });\n\n useEffect(() => {\n if (onRowSelected) {\n const selectedRows = table.getSelectedRowModel().rowsById;\n const keys = Object.keys(selectedRows);\n if (keys.length === 1) {\n const selectedRow = scriptureResults.find((row) => getRowKey(row) === keys[0]) || undefined;\n if (selectedRow) onRowSelected(selectedRow);\n }\n }\n }, [rowSelection, scriptureResults, onRowSelected, table]);\n\n // Define possible grouping options\n const scrBookGroupName = scriptureBookGroupName ?? defaultScrBookGroupName;\n const typeGroupName = typeColumnName ?? defaultTypeColumnName;\n\n const groupingOptions = [\n { label: 'No Grouping', value: [] },\n { label: `Group by ${scrBookGroupName}`, value: [scrBookColId] },\n { label: `Group by ${typeGroupName}`, value: [typeColId] },\n {\n label: `Group by ${scrBookGroupName} and ${typeGroupName}`,\n value: [scrBookColId, typeColId],\n },\n {\n label: `Group by ${typeGroupName} and ${scrBookGroupName}`,\n value: [typeColId, scrBookColId],\n },\n ];\n\n const handleSelectChange = (selectedGrouping: string) => {\n setGrouping(JSON.parse(selectedGrouping));\n };\n\n const handleRowClick = (row: Row, event: MouseEvent) => {\n if (!row.getIsGrouped() && !row.getIsSelected()) {\n row.getToggleSelectedHandler()(event);\n }\n };\n\n const getEvenOrOddBandingStyle = (row: Row, index: number) => {\n if (row.getIsGrouped()) return '';\n // UX has now said they don't think they want banding. I'm leaving in the code to\n // set even and odd styles, but there's nothing in the CSS to style them differently.\n // The \"even\" style used to also have tw-bg-neutral-300 (along with even) to create\n // a visual banding effect. That could be added back in if UX changes the decision.\n return cn('banded-row', index % 2 === 0 ? 'even' : 'odd');\n };\n\n const getIndent = (\n groupingState: GroupingState,\n row: Row,\n cell: Cell,\n ) => {\n if (groupingState?.length === 0 || row.depth < cell.column.getGroupedIndex()) return undefined;\n if (row.getIsGrouped()) {\n switch (row.depth) {\n case 1:\n return 'tw-ps-4';\n default:\n return undefined;\n }\n }\n switch (row.depth) {\n case 1:\n return 'tw-ps-8';\n case 2:\n return 'tw-ps-12';\n default:\n return undefined;\n }\n };\n\n return (\n
\n {!showColumnHeaders && (\n {\n handleSelectChange(value);\n }}\n >\n \n \n \n \n \n {groupingOptions.map((option) => (\n \n {option.label}\n \n ))}\n \n \n \n )}\n \n {showColumnHeaders && (\n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers\n .filter((h) => h.column.columnDef.header)\n .map((header) => (\n /* For sticky column headers to work, we probably need to change the default definition of the shadcn Table component. See https://github.com/shadcn-ui/ui/issues/1151 */\n \n {header.isPlaceholder ? undefined : (\n
\n {header.column.getCanGroup() ? (\n \n {header.column.getIsGrouped() ? `🛑` : `👊 `}\n \n ) : undefined}{' '}\n {flexRender(header.column.columnDef.header, header.getContext())}\n
\n )}\n
\n ))}\n
\n ))}\n
\n )}\n \n {table.getRowModel().rows.map((row, rowIndex) => {\n return (\n handleRowClick(row, event)}\n >\n {row.getVisibleCells().map((cell) => {\n if (\n cell.getIsPlaceholder() ||\n (cell.column.columnDef.enableGrouping &&\n !cell.getIsGrouped() &&\n (cell.column.columnDef.id !== typeColId || !showSourceColumn))\n )\n return undefined;\n return (\n \n {(() => {\n if (cell.getIsGrouped()) {\n return (\n \n {row.getIsExpanded() && }\n {!row.getIsExpanded() &&\n (direction === 'ltr' ? : )}{' '}\n {flexRender(cell.column.columnDef.cell, cell.getContext())} (\n {row.subRows.length})\n \n );\n }\n\n // if (cell.getIsAggregated()) {\n // flexRender(\n // cell.column.columnDef.aggregatedCell ?? cell.column.columnDef.cell,\n // cell.getContext(),\n // );\n // }\n\n return flexRender(cell.column.columnDef.cell, cell.getContext());\n })()}\n \n );\n })}\n \n );\n })}\n \n
\n
\n );\n}\n","import {\n getLocalizeKeyForScrollGroupId,\n LanguageStrings,\n ScrollGroupId,\n} from 'platform-bible-utils';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\n\nconst DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS = {\n [getLocalizeKeyForScrollGroupId('undefined')]: 'Ø',\n [getLocalizeKeyForScrollGroupId(0)]: 'A',\n [getLocalizeKeyForScrollGroupId(1)]: 'B',\n [getLocalizeKeyForScrollGroupId(2)]: 'C',\n [getLocalizeKeyForScrollGroupId(3)]: 'D',\n [getLocalizeKeyForScrollGroupId(4)]: 'E',\n [getLocalizeKeyForScrollGroupId(5)]: 'F',\n [getLocalizeKeyForScrollGroupId(6)]: 'G',\n [getLocalizeKeyForScrollGroupId(7)]: 'H',\n [getLocalizeKeyForScrollGroupId(8)]: 'I',\n [getLocalizeKeyForScrollGroupId(9)]: 'J',\n [getLocalizeKeyForScrollGroupId(10)]: 'K',\n [getLocalizeKeyForScrollGroupId(11)]: 'L',\n [getLocalizeKeyForScrollGroupId(12)]: 'M',\n [getLocalizeKeyForScrollGroupId(13)]: 'N',\n [getLocalizeKeyForScrollGroupId(14)]: 'O',\n [getLocalizeKeyForScrollGroupId(15)]: 'P',\n [getLocalizeKeyForScrollGroupId(16)]: 'Q',\n [getLocalizeKeyForScrollGroupId(17)]: 'R',\n [getLocalizeKeyForScrollGroupId(18)]: 'S',\n [getLocalizeKeyForScrollGroupId(19)]: 'T',\n [getLocalizeKeyForScrollGroupId(20)]: 'U',\n [getLocalizeKeyForScrollGroupId(21)]: 'V',\n [getLocalizeKeyForScrollGroupId(22)]: 'W',\n [getLocalizeKeyForScrollGroupId(23)]: 'X',\n [getLocalizeKeyForScrollGroupId(24)]: 'Y',\n [getLocalizeKeyForScrollGroupId(25)]: 'Z',\n};\n\nexport type ScrollGroupSelectorProps = {\n /**\n * List of scroll group ids to show to the user. Either a {@link ScrollGroupId} or `undefined` for\n * no scroll group\n */\n availableScrollGroupIds: (ScrollGroupId | undefined)[];\n /** Currently selected scroll group id. `undefined` for no scroll group */\n scrollGroupId: ScrollGroupId | undefined;\n /** Callback function run when the user tries to change the scroll group id */\n onChangeScrollGroupId: (newScrollGroupId: ScrollGroupId | undefined) => void;\n /**\n * Localized strings to use for displaying scroll group ids. Must be an object whose keys are\n * `getLocalizeKeyForScrollGroupId(scrollGroupId)` for all scroll group ids (and `undefined` if\n * included) in {@link ScrollGroupSelectorProps.availableScrollGroupIds} and whose values are the\n * localized strings to use for those scroll group ids.\n *\n * Defaults to English localizations of English alphabet for scroll groups 0-25 (e.g. 0 is A) and\n * Ø for `undefined`. Will fill in any that are not provided with these English localizations.\n * Also, if any values match the keys, the English localization will be used. This is useful in\n * case you want to pass in a temporary version of the localized strings while your localized\n * strings load.\n *\n * @example\n *\n * ```typescript\n * const myScrollGroupIdLocalizedStrings = {\n * [getLocalizeKeyForScrollGroupId('undefined')]: 'Ø',\n * [getLocalizeKeyForScrollGroupId(0)]: 'A',\n * [getLocalizeKeyForScrollGroupId(1)]: 'B',\n * [getLocalizeKeyForScrollGroupId(2)]: 'C',\n * [getLocalizeKeyForScrollGroupId(3)]: 'D',\n * [getLocalizeKeyForScrollGroupId(4)]: 'E',\n * };\n * ```\n *\n * @example\n *\n * ```tsx\n * const availableScrollGroupIds = [undefined, 0, 1, 2, 3, 4];\n *\n * const localizeKeys = getLocalizeKeysForScrollGroupIds();\n *\n * const [localizedStrings] = useLocalizedStrings(localizeKeys);\n *\n * ...\n *\n * \n * ```\n */\n localizedStrings?: LanguageStrings;\n};\n\n/** Selector component for choosing a scroll group */\nexport default function ScrollGroupSelector({\n availableScrollGroupIds,\n scrollGroupId,\n onChangeScrollGroupId,\n localizedStrings = {},\n}: ScrollGroupSelectorProps) {\n const localizedStringsDefaulted = {\n ...DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS,\n ...Object.fromEntries(\n Object.entries(localizedStrings).map(\n ([localizedStringKey, localizedStringValue]: [string, string]) => [\n localizedStringKey,\n localizedStringKey === localizedStringValue &&\n localizedStringKey in DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS\n ? DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS[localizedStringKey]\n : localizedStringValue,\n ],\n ),\n ),\n };\n return (\n \n onChangeScrollGroupId(\n newScrollGroupString === 'undefined' ? undefined : parseInt(newScrollGroupString, 10),\n )\n }\n >\n \n \n \n \n {availableScrollGroupIds.map((scrollGroupOptionId) => (\n \n {localizedStringsDefaulted[getLocalizeKeyForScrollGroupId(scrollGroupOptionId)]}\n \n ))}\n \n \n );\n}\n","import React from 'react';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Separator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n \n));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n","import { PropsWithChildren } from 'react';\nimport { Separator } from '@/components/shadcn-ui/separator';\n\n/** Props for the SettingsList component, currently just children */\ntype SettingsListProps = PropsWithChildren;\n\n/**\n * SettingsList component is a wrapper for list items. Rendered with a formatted div\n *\n * @param children To populate the list with\n * @returns Formatted div encompassing the children\n */\nexport function SettingsList({ children }: SettingsListProps) {\n return
{children}
;\n}\n\n/** Props for SettingsListItem component */\ntype SettingsListItemProps = PropsWithChildren & {\n /** Primary text of the list item */\n primary: string;\n\n /** Optional text of the list item */\n secondary?: string | undefined;\n\n /** Optional boolean to display a message if the children aren't loaded yet. Defaults to false */\n isLoading?: boolean;\n\n /** Optional message to display if isLoading */\n loadingMessage?: string;\n};\n\n/**\n * SettingsListItem component is a common list item. Rendered with a formatted div\n *\n * @param primary Primary text of the list item\n * @param secondary Optional secondary text of the list item\n * @param isLoading Optional, to display a message if the action component isn't generated yet,\n * defaults to false\n * @param children The action component(s) to provide for this item\n * @param loadingMessage Optional, message to display if isLoading\n * @returns Formatted div encompassing the list item content\n */\nexport function SettingsListItem({\n primary,\n secondary,\n children,\n isLoading = false,\n loadingMessage,\n}: SettingsListItemProps) {\n return (\n
\n
\n

{primary}

\n

\n {secondary}\n

\n
\n\n {isLoading ? (\n

{loadingMessage}

\n ) : (\n
{children}
\n )}\n
\n );\n}\n\n/** Props for SettingsListHeader component */\ntype SettingsListHeaderProps = {\n /** The primary text of the list header */\n primary: string;\n\n /** Optional secondary text of the list header */\n secondary?: string | undefined;\n\n /** Optional boolean to include a separator underneath the secondary text. Defaults to false */\n includeSeparator?: boolean;\n};\n\n/**\n * SettingsListHeader component displays text above the list\n *\n * @param primary The primary text of the list header\n * @param secondary Optional secondary text of the list header\n * @param includeSeparator Optional boolean to include a separator underneath the secondary text.\n * Defaults to false\n * @returns Formatted div with list header content\n */\nexport function SettingsListHeader({\n primary,\n secondary,\n includeSeparator = false,\n}: SettingsListHeaderProps) {\n return (\n
\n
\n

{primary}

\n

{secondary}

\n
\n {includeSeparator ? : ''}\n
\n );\n}\n","import Checkbox from '@/components/shadcn-ui/checkbox';\nimport { Label } from '@/components/shadcn-ui/label';\n\nexport type ChecklistProps = {\n /** Optional string representing the id attribute of the Checklist */\n id?: string;\n /** Optional string representing CSS class name(s) for styling */\n className?: string;\n /** Array of strings representing the checkable items */\n listItems: string[];\n /** Array of strings representing the checked items */\n selectedListItems: string[];\n /**\n * Function that is called when a checkbox item is selected or deselected\n *\n * @param item The string description for this item\n * @param selected True if selected, false if not selected\n */\n handleSelectListItem: (item: string, selected: boolean) => void;\n\n /**\n * Optional function creates a label for a provided checkable item\n *\n * @param item The item for which a label is to be created\n * @returns A string representing the label text for the checkbox associated with that item\n */\n createLabel?: (item: string) => string;\n};\n\n/** Renders a list of checkboxes. Each checkbox corresponds to an item from the `listItems` array. */\nexport default function Checklist({\n id,\n className,\n listItems,\n selectedListItems,\n handleSelectListItem,\n createLabel,\n}: ChecklistProps) {\n return (\n
\n {listItems.map((item) => (\n
\n handleSelectListItem(item, value)}\n />\n \n
\n ))}\n
\n );\n}\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function chainPropTypes(propType1, propType2) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return function validate(...args) {\n return propType1(...args) || propType2(...args);\n };\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (!isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? _extends({}, target) : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\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","/** @license React v16.13.1\n * react-is.development.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';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\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\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\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\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\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\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import PropTypes from 'prop-types';\nimport chainPropTypes from '../chainPropTypes';\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n const element = props[propName];\n const safePropName = propFullName || propName;\n if (element == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for Emotion compat.\n // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n const elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nconst elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n\nconst specialProperty = 'exact-prop: \\u200b';\nexport default function exactProp(propTypes) {\n if (process.env.NODE_ENV === 'production') {\n return propTypes;\n }\n return _extends({}, propTypes, {\n [specialProperty]: props => {\n const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));\n if (unsupportedProps.length > 0) {\n return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\\`${prop}\\``).join(', ')}. Please remove them.`);\n }\n return null;\n }\n });\n}","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe if we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","/**\n * @license React\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'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","/**\n * @license React\n * react-is.development.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';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_SERVER_CONTEXT_TYPE:\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\nfunction isSuspenseList(object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.SuspenseList = SuspenseList;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isSuspenseList = isSuspenseList;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","import { ForwardRef, Memo } from 'react-is';\n\n// Simplified polyfill for IE11 support\n// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3\nconst fnNameMatchRegex = /^\\s*function(?:\\s|\\s*\\/\\*.*\\*\\/\\s*)+([^(\\s/]*)\\s*/;\nexport function getFunctionName(fn) {\n const match = `${fn}`.match(fnNameMatchRegex);\n const name = match && match[1];\n return name || '';\n}\nfunction getFunctionComponentName(Component, fallback = '') {\n return Component.displayName || Component.name || getFunctionName(Component) || fallback;\n}\nfunction getWrappedName(outerType, innerType, wrapperName) {\n const functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);\n}\n\n/**\n * cherry-pick from\n * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName with added IE11 support\n */\nexport default function getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n if (typeof Component === 'string') {\n return Component;\n }\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`\n if (typeof Component === 'object') {\n switch (Component.$$typeof) {\n case ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n case Memo:\n return getWrappedName(Component, Component.type, 'memo');\n default:\n return undefined;\n }\n }\n return undefined;\n}","export default function HTMLElementType(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null) {\n return null;\n }\n if (propValue && propValue.nodeType !== 1) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an HTMLElement.`);\n }\n return null;\n}","import PropTypes from 'prop-types';\nconst refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);\nexport default refType;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","export default function deprecatedPropType(validator, reason) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return (props, propName, componentName, location, propFullName) => {\n const componentNameSafe = componentName || '<>';\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The ${location} \\`${propFullNameSafe}\\` of ` + `\\`${componentNameSafe}\\` is deprecated. ${reason}`);\n }\n return null;\n };\n}","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n var _muiName, _element$type;\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from '../ownerDocument';\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function requirePropFactory(componentNameInError, Component) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n\n // eslint-disable-next-line react/forbid-foreign-prop-types\n const prevPropTypes = Component ? _extends({}, Component.propTypes) : null;\n const requireProp = requiredProp => (props, propName, componentName, location, propFullName, ...args) => {\n const propFullNameSafe = propFullName || propName;\n const defaultTypeChecker = prevPropTypes == null ? void 0 : prevPropTypes[propFullNameSafe];\n if (defaultTypeChecker) {\n const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args);\n if (typeCheckerResult) {\n return typeCheckerResult;\n }\n }\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(`The prop \\`${propFullNameSafe}\\` of ` + `\\`${componentNameInError}\\` can only be used together with the \\`${requiredProp}\\` prop.`);\n }\n return null;\n };\n return requireProp;\n}","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseId = React['useId'.toString()];\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride != null ? idOverride : reactId;\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","export default function unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The prop \\`${propFullNameSafe}\\` is not supported. Please remove it.`);\n }\n return null;\n}","'use client';\n\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && defaultValue !== defaultProp) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '../useEnhancedEffect';\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nimport setRef from '../setRef';\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport useLazyRef from '../useLazyRef/useLazyRef';\nimport useOnMount from '../useOnMount/useOnMount';\nexport class Timeout {\n constructor() {\n this.currentId = null;\n this.clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n this.disposeEffect = () => {\n return this.clear;\n };\n }\n static create() {\n return new Timeout();\n }\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","'use client';\n\n// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nimport * as React from 'react';\nimport { Timeout } from '../useTimeout/useTimeout';\nlet hadKeyboardEvent = true;\nlet hadFocusVisibleRecently = false;\nconst hadFocusVisibleRecentlyTimeout = new Timeout();\nconst inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @returns {boolean}\n */\nfunction focusTriggersKeyboardModality(node) {\n const {\n type,\n tagName\n } = node;\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n if (node.isContentEditable) {\n return true;\n }\n return false;\n}\n\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n hadKeyboardEvent = true;\n}\n\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\nexport function teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\nfunction isFocusVisible(event) {\n const {\n target\n } = event;\n try {\n return target.matches(':focus-visible');\n } catch (error) {\n // Browsers not implementing :focus-visible will throw a SyntaxError.\n // We use our own heuristic for those browsers.\n // Rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n }\n\n // No need for validFocusTarget check. The user does that by attaching it to\n // focusable events only.\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\nexport default function useIsFocusVisible() {\n const ref = React.useCallback(node => {\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n const isFocusVisibleRef = React.useRef(false);\n\n /**\n * Should be called if a blur event is fired\n */\n function handleBlurVisible() {\n // checking against potential state variable does not suffice if we focus and blur synchronously.\n // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.\n // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.\n // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751\n // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).\n if (isFocusVisibleRef.current) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n hadFocusVisibleRecentlyTimeout.start(100, () => {\n hadFocusVisibleRecently = false;\n });\n isFocusVisibleRef.current = false;\n return true;\n }\n return false;\n }\n\n /**\n * Should be called if a blur event is fired\n */\n function handleFocusVisible(event) {\n if (isFocusVisible(event)) {\n isFocusVisibleRef.current = true;\n return true;\n }\n return false;\n }\n return {\n isFocusVisibleRef,\n onFocus: handleFocusVisible,\n onBlur: handleBlurVisible,\n ref\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param {object} defaultProps\n * @param {object} props\n * @returns {object} resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = _extends({}, props);\n Object.keys(defaultProps).forEach(propName => {\n if (propName.toString().match(/^(components|slots)$/)) {\n output[propName] = _extends({}, defaultProps[propName], output[propName]);\n } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {\n const defaultSlotProps = defaultProps[propName] || {};\n const slotProps = props[propName];\n output[propName] = {};\n if (!slotProps || !Object.keys(slotProps)) {\n // Reduce the iteration if the slot props is empty\n output[propName] = defaultSlotProps;\n } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {\n // Reduce the iteration if the default slot props is empty\n output[propName] = slotProps;\n } else {\n output[propName] = _extends({}, slotProps);\n Object.keys(defaultSlotProps).forEach(slotPropName => {\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n });\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n });\n return output;\n}","export default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n Object.keys(slots).forEach(\n // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n const utilityClass = getUtilityClass(key);\n if (utilityClass !== '') {\n acc.push(utilityClass);\n }\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n }\n return acc;\n }, []).join(' ');\n });\n return output;\n}","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from '../ClassNameGenerator';\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from '../generateUtilityClass';\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"values\", \"unit\", \"step\"];\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return _extends({}, acc, {\n [obj.key]: obj.val\n });\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5\n } = breakpoints,\n other = _objectWithoutPropertiesLoose(breakpoints, _excluded);\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return _extends({\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit\n }, other);\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import PropTypes from 'prop-types';\nconst responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};\nexport default responsivePropType;","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from './merge';\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme\n }, props[key]));\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nimport { getPath } from './style';\nimport merge from './merge';\nimport memoize from './memoize';\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n var _getPath;\n const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;\n if (typeof themeSpacing === 'number') {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);\n }\n }\n return themeSpacing * abs;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n return themeSpacing[abs];\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n const abs = Math.abs(propValue);\n const transformed = transformer(abs);\n if (propValue >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (keys.indexOf(prop) === -1) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","import { createUnarySpacing } from '../spacing';\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n\n // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n // Smaller components, such as icons, can align to a 4dp grid.\n // https://m2.material.io/design/layout/understanding-layout.html\n const transform = createUnarySpacing({\n spacing: spacingInput\n });\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","import merge from './merge';\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from './responsivePropType';\nimport style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nimport responsivePropType from './responsivePropType';\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from './style';\nimport compose from './compose';\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from './style';\nimport compose from './compose';\nimport { handleBreakpoints, values as breakpointsValues } from './breakpoints';\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n var _props$theme, _props$theme2;\n const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from '../spacing';\nimport { borderRadius, borderTransform } from '../borders';\nimport { gap, rowGap, columnGap } from '../cssGrid';\nimport { paletteTransform } from '../palette';\nimport { maxWidth, sizingTransform } from '../sizing';\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import capitalize from '@mui/utils/capitalize';\nimport merge from '../merge';\nimport { getPath, getStyleValue as getValue } from '../style';\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from '../breakpoints';\nimport defaultSxConfig from './defaultSxConfig';\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n var _theme$unstable_sxCon;\n const {\n sx,\n theme = {}\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n return removeUnusedBreakpoints(breakpointsKeys, css);\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n *\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars && typeof theme.getColorSchemeSelector === 'function') {\n // If CssVarsProvider is used as a provider,\n // returns '* :where([data-mui-color-scheme=\"light|dark\"]) &'\n const selector = theme.getColorSchemeSelector(key).replace(/(\\[[^\\]]+\\])/, '*:where($1)');\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"breakpoints\", \"palette\", \"spacing\", \"shape\"];\nimport deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from './createBreakpoints';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport styleFunctionSx from '../styleFunctionSx/styleFunctionSx';\nimport defaultSxConfig from '../styleFunctionSx/defaultSxConfig';\nimport applyStyles from './applyStyles';\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: _extends({\n mode: 'light'\n }, paletteInput),\n spacing,\n shape: _extends({}, shape, shapeInput)\n }, other);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nexport default createTheme;","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","'use client';\n\nimport createTheme from './createTheme';\nimport useThemeWithoutDefault from './useThemeWithoutDefault';\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ownerState\"],\n _excluded2 = [\"variants\"],\n _excluded3 = [\"name\", \"slot\", \"skipVariantsResolver\", \"skipSx\", \"overridesResolver\"];\n/* eslint-disable no-underscore-dangle */\nimport styledEngineStyled, { internal_processStyles as processStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from './createTheme';\nimport styleFunctionSx from './styleFunctionSx';\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport const systemDefaultTheme = createTheme();\nconst lowercaseFirstLetter = string => {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n};\nfunction resolveTheme({\n defaultTheme,\n theme,\n themeId\n}) {\n return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (props, styles) => styles[slot];\n}\nfunction processStyleArg(callableStyle, _ref) {\n let {\n ownerState\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n const resolvedStylesArg = typeof callableStyle === 'function' ? callableStyle(_extends({\n ownerState\n }, props)) : callableStyle;\n if (Array.isArray(resolvedStylesArg)) {\n return resolvedStylesArg.flatMap(resolvedStyle => processStyleArg(resolvedStyle, _extends({\n ownerState\n }, props)));\n }\n if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {\n const {\n variants = []\n } = resolvedStylesArg,\n otherStyles = _objectWithoutPropertiesLoose(resolvedStylesArg, _excluded2);\n let result = otherStyles;\n variants.forEach(variant => {\n let isMatch = true;\n if (typeof variant.props === 'function') {\n isMatch = variant.props(_extends({\n ownerState\n }, props, ownerState));\n } else {\n Object.keys(variant.props).forEach(key => {\n if ((ownerState == null ? void 0 : ownerState[key]) !== variant.props[key] && props[key] !== variant.props[key]) {\n isMatch = false;\n }\n });\n }\n if (isMatch) {\n if (!Array.isArray(result)) {\n result = [result];\n }\n result.push(typeof variant.style === 'function' ? variant.style(_extends({\n ownerState\n }, props, ownerState)) : variant.style);\n }\n });\n return result;\n }\n return resolvedStylesArg;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n const systemSx = props => {\n return styleFunctionSx(_extends({}, props, {\n theme: resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }))\n }));\n };\n systemSx.__mui_systemSx = true;\n return (tag, inputOptions = {}) => {\n // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.\n processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))\n } = inputOptions,\n options = _objectWithoutPropertiesLoose(inputOptions, _excluded3);\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, _extends({\n shouldForwardProp: shouldForwardPropOption,\n label\n }, options));\n const transformStyleArg = stylesArg => {\n // On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg || isPlainObject(stylesArg)) {\n return props => processStyleArg(stylesArg, _extends({}, props, {\n theme: resolveTheme({\n theme: props.theme,\n defaultTheme,\n themeId\n })\n }));\n }\n return stylesArg;\n };\n const muiStyledResolver = (styleArg, ...expressions) => {\n let transformedStyleArg = transformStyleArg(styleArg);\n const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];\n if (componentName && overridesResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {\n return null;\n }\n const styleOverrides = theme.components[componentName].styleOverrides;\n const resolvedStyleOverrides = {};\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {\n resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, _extends({}, props, {\n theme\n }));\n });\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsWithDefaultTheme.push(props => {\n var _theme$components;\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants;\n return processStyleArg({\n variants: themeVariants\n }, _extends({}, props, {\n theme\n }));\n });\n }\n if (!skipSx) {\n expressionsWithDefaultTheme.push(systemSx);\n }\n const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;\n if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {\n const placeholders = new Array(numOfCustomFnsApplied).fill('');\n // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.\n transformedStyleArg = [...styleArg, ...placeholders];\n transformedStyleArg.raw = [...styleArg.raw, ...placeholders];\n }\n const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n let displayName;\n if (componentName) {\n displayName = `${componentName}${capitalize(componentSlot || '')}`;\n }\n if (displayName === undefined) {\n displayName = `Styled(${getDisplayName(tag)})`;\n }\n Component.displayName = displayName;\n }\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n}","import resolveProps from '@mui/utils/resolveProps';\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n return resolveProps(theme.components[name].defaultProps, props);\n}","'use client';\n\nimport getThemeProps from './getThemeProps';\nimport useTheme from '../useTheme';\nexport default function useThemeProps({\n props,\n name,\n defaultTheme,\n themeId\n}) {\n let theme = useTheme(defaultTheme);\n if (themeId) {\n theme = theme[themeId] || theme;\n }\n const mergedProps = getThemeProps({\n theme,\n name,\n props\n });\n return mergedProps;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport clamp from '@mui/utils/clamp';\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return clamp(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nexport function hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : _formatMuiErrorMessage(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : _formatMuiErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nexport const colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexport const private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nexport function rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nexport function private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nexport function private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nexport function blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, mixins) {\n return _extends({\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n }\n }, mixins);\n}","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"mode\", \"contrastThreshold\", \"tonalOffset\"];\nimport { deepmerge } from '@mui/utils';\nimport { darken, getContrastRatio, lighten } from '@mui/system';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport purple from '../colors/purple';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport lightBlue from '../colors/lightBlue';\nimport green from '../colors/green';\nexport const light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport const dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2\n } = palette,\n other = _objectWithoutPropertiesLoose(palette, _excluded);\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = _extends({}, color);\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\nThe color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from \"@mui/material/colors\";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });` : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n const modes = {\n dark,\n light\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!modes[mode]) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: _extends({}, common),\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset\n }, modes[mode]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"];\nimport { deepmerge } from '@mui/utils';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const _ref = typeof typography === 'function' ? typography(palette) : typography,\n {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}, casing, allVariants);\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge(_extends({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"duration\", \"easing\", \"delay\"];\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = _extends({}, easing, inputTransitions.easing);\n const mergedDuration = _extends({}, duration, inputTransitions.duration);\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n // IE11 support, replace with Number.isNaN\n // eslint-disable-next-line no-restricted-globals\n const isNumber = value => !isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return _extends({\n getAutoHeightDuration,\n create\n }, inputTransitions, {\n easing: mergedEasing,\n duration: mergedDuration\n });\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"breakpoints\", \"mixins\", \"spacing\", \"palette\", \"transitions\", \"typography\", \"shape\"];\nimport { deepmerge } from '@mui/utils';\nimport { createTheme as systemCreateTheme, unstable_defaultSxConfig as defaultSxConfig, unstable_styleFunctionSx as styleFunctionSx } from '@mui/system';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport createTransitions from './createTransitions';\nimport zIndex from './zIndex';\nfunction createTheme(options = {}, ...args) {\n const {\n mixins: mixinsInput = {},\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (options.vars) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`vars\\` is a private field used for CSS variables support.\nPlease use another name.` : _formatMuiErrorMessage(18));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: _extends({}, zIndex)\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (key in node) {\n const child = node[key];\n if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.indexOf('Mui') === 0) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createTheme(...args);\n}\nexport default createTheme;","'use client';\n\nimport createTheme from './createTheme';\nconst defaultTheme = createTheme();\nexport default defaultTheme;","export default '$$material';","'use client';\n\nimport { useThemeProps as systemUseThemeProps } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport default function useThemeProps({\n props,\n name\n}) {\n return systemUseThemeProps({\n props,\n name,\n defaultTheme,\n themeId: THEME_ID\n });\n}","'use client';\n\nimport { createStyled, shouldForwardProp } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';\nexport const slotShouldForwardProp = shouldForwardProp;\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"inheritViewBox\", \"titleAccess\", \"viewBox\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport { getSvgIconUtilityClass } from './svgIconClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3;\n return {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n // the will define the property that has `currentColor`\n // e.g. heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',\n flexShrink: 0,\n transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {\n duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter\n }),\n fontSize: {\n inherit: 'inherit',\n small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',\n medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',\n large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'\n }[ownerState.fontSize],\n // TODO v5 deprecate, v6 remove for sx\n color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : {\n action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active,\n disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled,\n inherit: undefined\n }[ownerState.color]\n };\n});\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = _extends({}, props, {\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n });\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, more, other, hasSvgAsChild && children.props, {\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', '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 fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\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 * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport SvgIcon from '../SvgIcon';\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, _extends({\n \"data-testid\": `${displayName}Icon`,\n ref: ref\n }, props, {\n children: path\n }));\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));\n}","'use client';\n\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/base/ClassNameGenerator';\nexport { default as capitalize } from './capitalize';\nexport { default as createChainedFunction } from './createChainedFunction';\nexport { default as createSvgIcon } from './createSvgIcon';\nexport { default as debounce } from './debounce';\nexport { default as deprecatedPropType } from './deprecatedPropType';\nexport { default as isMuiElement } from './isMuiElement';\nexport { default as ownerDocument } from './ownerDocument';\nexport { default as ownerWindow } from './ownerWindow';\nexport { default as requirePropFactory } from './requirePropFactory';\nexport { default as setRef } from './setRef';\nexport { default as unstable_useEnhancedEffect } from './useEnhancedEffect';\nexport { default as unstable_useId } from './useId';\nexport { default as unsupportedProp } from './unsupportedProp';\nexport { default as useControlled } from './useControlled';\nexport { default as useEventCallback } from './useEventCallback';\nexport { default as useForkRef } from './useForkRef';\nexport { default as useIsFocusVisible } from './useIsFocusVisible';\n// TODO: remove this export once ClassNameGenerator is stable\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const unstable_ClassNameGenerator = {\n configure: generator => {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(['MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.', '', \"You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead\", '', 'The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401', '', 'The updated documentation: https://mui.com/guides/classname-generator/'].join('\\n'));\n }\n ClassNameGenerator.configure(generator);\n }\n};","\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\nvar _utils = require(\"@mui/material/utils\");","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m10 17 5-5-5-5z\"\n}), 'ArrowRight');","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nexport function isHostComponent(element) {\n return typeof element === 'string';\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { isHostComponent } from './isHostComponent';\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nexport function appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return _extends({}, otherProps, {\n ownerState: _extends({}, otherProps.ownerState, ownerState)\n });\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}","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nexport function extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nexport function resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nexport function omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport clsx from 'clsx';\nimport { extractEventHandlers } from './extractEventHandlers';\nimport { omitEventHandlers } from './omitEventHandlers';\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nexport function mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}","'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}","import { globalStateClasses } from '@mui/utils/generateUtilityClass';\nconst GLOBAL_CLASS_PREFIX = 'base';\nfunction buildStateClass(state) {\n return `${GLOBAL_CLASS_PREFIX}--${state}`;\n}\nfunction buildSlotClass(componentName, slot) {\n return `${GLOBAL_CLASS_PREFIX}-${componentName}-${slot}`;\n}\nexport function generateUtilityClass(componentName, slot) {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? buildStateClass(globalStateClass) : buildSlotClass(componentName, slot);\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import { generateUtilityClass } from '../generateUtilityClass';\nexport function generateUtilityClasses(componentName, slots) {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot);\n });\n return result;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://mui.com/base-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://mui.com/base-ui/react-portal/components-api/#portal)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n // @ts-expect-error TODO upstream fix\n const handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? children.ref : null, forwardedRef);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(forwardedRef, mountNode);\n return () => {\n setRef(forwardedRef, null);\n };\n }\n return undefined;\n }, [forwardedRef, mountNode, disablePortal]);\n if (disablePortal) {\n if ( /*#__PURE__*/React.isValidElement(children)) {\n const newProps = {\n ref: handleRef\n };\n return /*#__PURE__*/React.cloneElement(children, newProps);\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: children\n });\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport { Portal };","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];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","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 };","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 { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","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 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 { 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}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\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 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 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 default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\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}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\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};","export default function getVariation(placement) {\n return placement.split('-')[1];\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 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};","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 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}","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\";\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 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 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}","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 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 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 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 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 { 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 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};","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};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\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 getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\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}","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 { 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}","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 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 };","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 { generateUtilityClass } from '../generateUtilityClass';\nimport { generateUtilityClasses } from '../generateUtilityClasses';\nconst COMPONENT_NAME = 'Popper';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass(COMPONENT_NAME, slot);\n}\nexport const popperClasses = generateUtilityClasses(COMPONENT_NAME, ['root']);","'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 the TypeScript types and run `pnpm 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 * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 };","'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}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default {\n disabled: false\n};","import PropTypes from 'prop-types';\nexport var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number,\n appear: PropTypes.number\n}).isRequired]) : null;\nexport var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string,\n active: PropTypes.string\n}), PropTypes.shape({\n enter: PropTypes.string,\n enterDone: PropTypes.string,\n enterActive: PropTypes.string,\n exit: PropTypes.string,\n exitDone: PropTypes.string,\n exitActive: PropTypes.string\n})]) : null;","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n var _style$transitionDura, _style$transitionTimi;\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: (_style$transitionDura = style.transitionDuration) != null ? _style$transitionDura : typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,\n easing: (_style$transitionTimi = style.transitionTimingFunction) != null ? _style$transitionTimi : typeof easing === 'object' ? easing[options.mode] : easing,\n delay: style.transitionDelay\n };\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"addEndListener\", \"appear\", \"children\", \"easing\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { elementAcceptingRef, unstable_useTimeout as useTimeout } from '@mui/utils';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps, reflow } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n\n/*\n TODO v6: remove\n Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.\n */\nconst isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\\/)15(.|_)4/i.test(navigator.userAgent);\n\n/**\n * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and\n * [Popover](/material-ui/react-popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const timer = useTimeout();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, children.ref, ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay: isWebKit154 ? delay : delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = 0;\n node.style.transform = getScale(0.75);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTimeout.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n }\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"anchorEl\", \"component\", \"components\", \"componentsProps\", \"container\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"transition\", \"slots\", \"slotProps\"];\nimport { Popper as BasePopper } from '@mui/base/Popper';\nimport { useThemeWithoutDefault as useTheme } from '@mui/system';\nimport { HTMLElementType, refType } from '@mui/utils';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { styled, useThemeProps } from '../styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n name: 'MuiPopper',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://mui.com/material-ui/react-menu/)\n * - [Popper](https://mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n var _slots$root;\n const theme = useTheme();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPopper'\n });\n const {\n anchorEl,\n component,\n components,\n componentsProps,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;\n const otherProps = _extends({\n anchorEl,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition\n }, other);\n return /*#__PURE__*/_jsx(PopperRoot, _extends({\n as: component,\n direction: theme == null ? void 0 : theme.direction,\n slots: {\n root: RootComponent\n },\n slotProps: slotProps != null ? slotProps : componentsProps\n }, otherProps, {\n ref: ref\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 the TypeScript types and run `pnpm 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: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\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 components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 * 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 * 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 * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"arrow\", \"children\", \"classes\", \"components\", \"componentsProps\", \"describeChild\", \"disableFocusListener\", \"disableHoverListener\", \"disableInteractive\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"followCursor\", \"id\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"slotProps\", \"slots\", \"title\", \"TransitionComponent\", \"TransitionProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementAcceptingRef, unstable_useTimeout as useTimeout, unstable_Timeout as Timeout } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses, appendOwnerState } from '@mui/base';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport Grow from '../Grow';\nimport Popper from '../Popper';\nimport useEventCallback from '../utils/useEventCallback';\nimport useForkRef from '../utils/useForkRef';\nimport useId from '../utils/useId';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useControlled from '../utils/useControlled';\nimport tooltipClasses, { getTooltipUtilityClass } from './tooltipClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(({\n theme,\n ownerState,\n open\n}) => _extends({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none'\n}, !ownerState.disableInteractive && {\n pointerEvents: 'auto'\n}, !open && {\n pointerEvents: 'none'\n}, ownerState.arrow && {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {\n left: 0,\n marginLeft: '-0.71em'\n } : {\n right: 0,\n marginRight: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n }),\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {\n right: 0,\n marginRight: '-0.71em'\n } : {\n left: 0,\n marginLeft: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n })\n}));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.arrow && {\n position: 'relative',\n margin: 0\n}, ownerState.touch && {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n}, {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: _extends({\n transformOrigin: 'right center'\n }, !ownerState.isRtl ? _extends({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n }) : _extends({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n })),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: _extends({\n transformOrigin: 'left center'\n }, !ownerState.isRtl ? _extends({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n }) : _extends({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n })),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: _extends({\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n }, ownerState.touch && {\n marginBottom: '24px'\n }),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: _extends({\n transformOrigin: 'center top',\n marginTop: '14px'\n }, ownerState.touch && {\n marginTop: '24px'\n })\n}));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n}));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return event => {\n if (eventHandler) {\n eventHandler(event);\n }\n handler(event);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n var _ref, _slots$popper, _ref2, _ref3, _slots$transition, _ref4, _slots$tooltip, _ref5, _slots$arrow, _slotProps$popper, _ref6, _slotProps$popper2, _slotProps$transition, _slotProps$tooltip, _ref7, _slotProps$tooltip2, _slotProps$arrow, _ref8, _slotProps$arrow2;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp = Grow,\n TransitionProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleEnter = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = useIsFocusVisible();\n // We don't necessarily care about the focusVisible state (which is safe to access via ref anyway).\n // We just need to re-render the Tooltip if the focus-visible state changes.\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n handleBlurVisible(event);\n if (isFocusVisibleRef.current === false) {\n setChildIsFocusVisible(false);\n handleLeave(event);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n handleFocusVisible(event);\n if (isFocusVisibleRef.current === true) {\n setChildIsFocusVisible(true);\n handleEnter(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleMouseOver = handleEnter;\n const handleMouseLeave = handleLeave;\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleEnter(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Bink?) use 'Esc'\n if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = _extends({}, nameOrDescProps, other, children.props, {\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n }, followCursor ? {\n onMouseMove: handleMouseMove\n } : {});\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const popperOptions = React.useMemo(() => {\n var _PopperProps$popperOp;\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if ((_PopperProps$popperOp = PopperProps.popperOptions) != null && _PopperProps$popperOp.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n return _extends({}, PopperProps.popperOptions, {\n modifiers: tooltipModifiers\n });\n }, [arrowRef, PopperProps]);\n const ownerState = _extends({}, props, {\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n });\n const classes = useUtilityClasses(ownerState);\n const PopperComponent = (_ref = (_slots$popper = slots.popper) != null ? _slots$popper : components.Popper) != null ? _ref : TooltipPopper;\n const TransitionComponent = (_ref2 = (_ref3 = (_slots$transition = slots.transition) != null ? _slots$transition : components.Transition) != null ? _ref3 : TransitionComponentProp) != null ? _ref2 : Grow;\n const TooltipComponent = (_ref4 = (_slots$tooltip = slots.tooltip) != null ? _slots$tooltip : components.Tooltip) != null ? _ref4 : TooltipTooltip;\n const ArrowComponent = (_ref5 = (_slots$arrow = slots.arrow) != null ? _slots$arrow : components.Arrow) != null ? _ref5 : TooltipArrow;\n const popperProps = appendOwnerState(PopperComponent, _extends({}, PopperProps, (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper, {\n className: clsx(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_ref6 = (_slotProps$popper2 = slotProps.popper) != null ? _slotProps$popper2 : componentsProps.popper) == null ? void 0 : _ref6.className)\n }), ownerState);\n const transitionProps = appendOwnerState(TransitionComponent, _extends({}, TransitionProps, (_slotProps$transition = slotProps.transition) != null ? _slotProps$transition : componentsProps.transition), ownerState);\n const tooltipProps = appendOwnerState(TooltipComponent, _extends({}, (_slotProps$tooltip = slotProps.tooltip) != null ? _slotProps$tooltip : componentsProps.tooltip, {\n className: clsx(classes.tooltip, (_ref7 = (_slotProps$tooltip2 = slotProps.tooltip) != null ? _slotProps$tooltip2 : componentsProps.tooltip) == null ? void 0 : _ref7.className)\n }), ownerState);\n const tooltipArrowProps = appendOwnerState(ArrowComponent, _extends({}, (_slotProps$arrow = slotProps.arrow) != null ? _slotProps$arrow : componentsProps.arrow, {\n className: clsx(classes.arrow, (_ref8 = (_slotProps$arrow2 = slotProps.arrow) != null ? _slotProps$arrow2 : componentsProps.arrow) == null ? void 0 : _ref8.className)\n }), ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperComponent, _extends({\n as: PopperComponentProp != null ? PopperComponentProp : Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true\n }, interactiveWrapperListeners, popperProps, {\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionComponent, _extends({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, transitionProps, {\n children: /*#__PURE__*/_jsxs(TooltipComponent, _extends({}, tooltipProps, {\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowComponent, _extends({}, tooltipArrowProps, {\n ref: setArrowRef\n })) : null]\n }))\n }))\n }))]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `slots` prop.\n * It's recommended to use the `slots` prop instead.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `slotProps` prop.\n * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @default Popper\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](/material-ui/api/popper/) element.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: 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 * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","import '@/components/mui/menu-item.component.css';\nimport ArrowRightIcon from '@mui/icons-material/ArrowRight';\nimport {\n ListItemIcon as MuiListItemIcon,\n ListItemText as MuiListItemText,\n MenuItem as MuiMenuItem,\n} from '@mui/material';\nimport Tooltip from '@mui/material/Tooltip';\nimport { Localized, ReferencedItem, SingleColumnMenu } from 'platform-bible-utils';\nimport { MouseEvent, PropsWithChildren } from 'react';\n\ntype MenuItemInfoBase = {\n /** Text (displayable in the UI) as the name of the menu item */\n label: string;\n /** Text to display when the mouse hovers over the menu item */\n tooltip?: string;\n};\n\nexport type Command = MenuItemInfoBase & {\n /** Command to execute (string.string) */\n command: string;\n};\n\ntype SubMenu = MenuItemInfoBase & {\n /** Command to execute (string.string) */\n items: MenuItemInfo[];\n};\n\nexport interface CommandHandler {\n (command: Command): void;\n}\n\nexport type MenuPropsBase = {\n /*\n * The JSON defining the menu whose items are to be rendered. This will typically be one of the\n * menus in the \"defs\" in a Platform.Bible menu (see PlatformMenus). The schema for this is\n * menuDocumentSchema (at the end of menus.model.ts). Note that while this is a\n * \"SingleColumnMenu\", somewhat bizarrely, a MultiColumnMenu is a SingleColumnMenu, so it really\n * could be a MultiColumnMenu, in which case, column had better be defined so it can be used\n * to filter out the actual groups and items to display on the column.\n */\n menuDefinition: Localized;\n\n commandHandler: CommandHandler;\n\n /**\n * Additional action to perform when any menu item is clicked. Allows the caller to handle event\n * (e.g., to close the menu).\n */\n onClick?: (event: MouseEvent) => void;\n};\n\nexport type MenuItemListProps = MenuPropsBase & {\n /** Optional unique (column) identifier */\n columnId?: ReferencedItem;\n};\n\nexport type MenuItemProps = Omit &\n PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n\n onClick: (event: MouseEvent) => void;\n }>;\n\ntype MenuItemInfo = (Command | SubMenu) & {\n /**\n * If specified, menu item will be inset if it does not have a leading icon.\n *\n * @default true\n */\n allowForLeadingIcons?: boolean;\n /**\n * If specified, the path to the icon image to display on the leading side of the menu text.\n *\n * @default undefined (no leading icon will be shown)\n */\n iconPathBefore?: string;\n /**\n * If specified, the path to the icon image to display on the trailing side of the menu text.\n *\n * @default undefined (no trailing icon will be shown)\n */\n iconPathAfter?: string;\n /**\n * If true, list item is focused during the first mount\n *\n * @default false\n */\n hasAutoFocus?: boolean;\n\n /** Additional css classes to help with unique styling of the menu item */\n className?: string;\n\n /**\n * If true, the menu item will appear disabled and it will not respond to clicks or mouse hovers.\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * If true, compact vertical padding designed for keyboard and mouse input is used.\n *\n * @default true\n */\n isDense?: boolean;\n\n /**\n * If true, a right-arrow icon will be displayed (iconPathAfter, if specified, will be ignored).\n *\n * @default false\n */\n isSubMenuParent?: boolean;\n\n /**\n * If true, the left and right padding is removed\n *\n * @default false\n */\n hasDisabledGutters?: boolean;\n\n /**\n * If true, a 1px light border is added to bottom of menu item\n *\n * @default false\n */\n hasDivider?: boolean;\n\n /** Help identify which element has keyboard focus */\n focusVisibleClassName?: string;\n\n /** If it's a submenu, it should have the items property */\n items?: MenuItemInfo[];\n};\n\nfunction getIcon(icon: string | undefined, menuLabel: string, leading: boolean) {\n return icon ? (\n \n {`${leading\n \n ) : undefined;\n}\n\nexport default function MenuItem(props: MenuItemProps) {\n const {\n onClick,\n label,\n tooltip,\n allowForLeadingIcons = true,\n iconPathBefore = undefined,\n iconPathAfter = undefined,\n hasAutoFocus = false,\n className,\n isDisabled = false,\n isDense = true,\n isSubMenuParent = false,\n hasDisabledGutters = false,\n hasDivider = false,\n focusVisibleClassName,\n id,\n children,\n } = props;\n\n const menuItem = (\n \n {label ? (\n <>\n {getIcon(iconPathBefore, label, true)}\n \n {isSubMenuParent ? (\n \n \n \n ) : (\n getIcon(iconPathAfter, label, false)\n )}\n \n ) : (\n children\n )}\n \n );\n\n return tooltip ? (\n \n
{menuItem}
\n
\n ) : (\n menuItem\n );\n}\n","import MenuItem, {\n MenuItemListProps,\n MenuItemProps,\n MenuPropsBase,\n} from '@/components/mui/menu-item.component';\nimport { Menu } from '@mui/material';\nimport {\n Localized,\n MenuGroupDetailsInSubMenu,\n MenuItemContainingCommand,\n MenuItemContainingSubmenu,\n OrderedExtensibleContainer,\n ReferencedItem,\n SingleColumnMenu,\n} from 'platform-bible-utils';\nimport { MouseEvent, useMemo, useState } from 'react';\n\n/**\n * All the exported types in this file should be regarded as \"internal\" (i.e., they should not be\n * exposed via index.ts).\n */\n\nexport type GroupedMenuPropsBase = MenuPropsBase & {\n /** Optional unique (column) identifier */\n columnId?: ReferencedItem;\n};\n\nexport type GroupedMenuItemListProps = MenuItemListProps & {\n /**\n * If the menuDefinition includes \"top-level\" groups (i.e., those that belong to a column as\n * opposed to those that belong to a submenu) that should not be included in the list, then this\n * array specifies which groups to include. Likewise, for a submenu, this list indicates which\n * groups are pertinent for that submenu. So then for a context menu this property need not be\n * specified since it is a top-level menu based on a \"true\" SingleColumnMenu (i.e., one that is\n * not a MultiColumnMenu).\n */\n includedGroups?: {\n id: string;\n group: Localized;\n }[];\n};\n\ninterface ItemInfo {\n item: Localized;\n isLastItemInGroup: boolean;\n}\n\ntype SubMenuProps = MenuPropsBase & {\n parentMenuItem: Localized;\n parentItemProps: Omit, 'iconPathAfter'>;\n};\n\nfunction getAllGroups(menuDefinition: Localized) {\n const groupEntries = Object.entries(menuDefinition.groups);\n // Convert array of entries to array of objects with id and group properties\n return groupEntries.map(([key, value]) => ({ id: key, group: value }));\n}\n\nfunction SubMenu(props: SubMenuProps) {\n const [anchorEl, setAnchorEl] = useState(undefined);\n\n const { parentMenuItem, parentItemProps, menuDefinition } = props;\n\n const handleParentMenuItemClick = (event: MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(undefined);\n };\n\n const renderSubMenuItems = () => {\n let includedGroups = getAllGroups(menuDefinition).filter((g) => 'menuItem' in g.group);\n\n // Ensure valid parent menu was provided. (If not, submenu will contain all groups!)\n if (!parentMenuItem?.id) throw new Error('A valid parent menu item is required for submenus.');\n\n // When laying out a submenu, only include groups associated with the provided parent menu.\n // Note: without the (annoying) redundant check that the included groups\n // have the menuItem field, TS doesn't think it exists.\n includedGroups = includedGroups.filter(\n (group) => 'menuItem' in group.group && group.group.menuItem === parentMenuItem.id,\n );\n\n return ;\n };\n\n return (\n <>\n \n \n {renderSubMenuItems()}\n \n \n );\n}\n\nconst getOrderedGroupItems = (\n groupId: string,\n allItems: Localized[],\n) => {\n // Filter items that belong to the specified group\n const itemsForGroup = allItems.filter((item) => item.group === groupId);\n // Sort items based on order\n const sortedItems = itemsForGroup.sort((a, b) => (a.order || 0) - (b.order || 0));\n return sortedItems;\n};\n\n/**\n * This component is internal; it does not need to be exposed to the outside world since it is not\n * useful on its own. It is used to generate and lay out the MenuItems that appear either on a\n * top-level menu (in a GridMenu or ContextMenu) or in a submenu.\n */\nexport default function GroupedMenuItemList(menuProps: GroupedMenuItemListProps) {\n const { menuDefinition, onClick, commandHandler, includedGroups } = menuProps;\n\n const { items, allowForLeadingIcons } = useMemo(() => {\n const groupsToInclude =\n includedGroups && includedGroups.length > 0\n ? includedGroups\n : // We're apparently laying out a single-column menu (presumably a context menu). In this\n // case, all groups should be included except ones that belong to a submenu.\n getAllGroups(menuDefinition).filter((g) => !('menuItem' in g.group));\n\n const sortedGroups = Object.values(groupsToInclude).sort(\n (a, b) => (a.group.order || 0) - (b.group.order || 0),\n );\n\n const itemArray: ItemInfo[] = [];\n\n sortedGroups.forEach((group) => {\n getOrderedGroupItems(group.id, menuDefinition.items).forEach((item) =>\n itemArray.push({ item, isLastItemInGroup: false }),\n );\n if (itemArray.length > 0) itemArray[itemArray.length - 1].isLastItemInGroup = true;\n });\n\n // No divider after last item in final group.\n if (itemArray.length > 0) itemArray[itemArray.length - 1].isLastItemInGroup = false;\n\n const allowSpaceForLeadingIcons = itemArray.some(\n (i) => 'iconPathBefore' in i.item && i.item.iconPathBefore,\n );\n\n return { items: itemArray, allowForLeadingIcons: allowSpaceForLeadingIcons };\n }, [includedGroups, menuDefinition]);\n\n // Create props for MenuItem component including setting hasDivider for the last item in a group\n const createMenuItemProps = ({ item, isLastItemInGroup }: ItemInfo) => {\n const menuItemProps = {\n className: 'papi-menu-item',\n label: item.label,\n tooltip: item.tooltip,\n iconPathBefore: 'iconPathBefore' in item ? item.iconPathBefore : undefined,\n iconPathAfter: 'iconPathAfter' in item ? item.iconPathAfter : undefined,\n hasDivider: isLastItemInGroup, // Set hasDivider to true for the last item in a group\n allowForLeadingIcons,\n };\n\n return menuItemProps;\n };\n\n const [firstItem] = items;\n\n if (!firstItem) return
;\n\n const divKey = firstItem.item.group;\n\n return (\n
\n {items.map((itemInfo, index) => {\n const { item } = itemInfo;\n const menuItemProps = createMenuItemProps(itemInfo);\n if ('command' in item) {\n const key = item.group + index;\n return (\n ) => {\n onClick?.(event);\n commandHandler(item);\n }}\n {...menuItemProps}\n />\n );\n }\n return (\n \n );\n })}\n
\n );\n}\n","import GroupedMenuItemList from '@/components/mui/grouped-menu-item-list.component';\nimport { MenuItemListProps } from '@/components/mui/menu-item.component';\nimport { MultiColumnMenu } from 'platform-bible-utils';\n\n/**\n * This component is internal; it does not need to be exposed to the outside world since it is not\n * useful on its own. Use either GridMenu or ContextMenu.\n */\nexport default function TopLevelMenu(props: MenuItemListProps) {\n const { menuDefinition, columnId } = props;\n\n const groupEntries = Object.entries(menuDefinition.groups);\n // Convert array of entries to array of objects with id and group properties\n const groups = groupEntries.map(([key, value]) => ({ id: key, group: value }));\n let includedGroups = groups.filter((g) => 'column' in g.group);\n\n // Check if column is provided and menuDefinition is a MultiColumnMenu\n if (\n columnId &&\n 'columns' in menuDefinition &&\n // Without this type assertion, TS doesn't know what columns is.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n (menuDefinition as MultiColumnMenu).columns[columnId]\n ) {\n // When laying out a single column in a MultiColumnMenu, only include groups associated with\n // the provided column. Note: without the (annoying) redundant check that the included groups\n // have the colum field, TS doesn't think it exists.\n includedGroups = includedGroups.filter(\n (g) => 'column' in g.group && g.group.column === columnId,\n );\n }\n\n return ;\n}\n","import '@/components/mui/grid-menu.component.css';\nimport { GroupedMenuPropsBase } from '@/components/mui/grouped-menu-item-list.component';\nimport { CommandHandler } from '@/components/mui/menu-item.component';\nimport TopLevelMenu from '@/components/mui/top-level-menu.component';\nimport { Grid, List } from '@mui/material';\nimport {\n Localized,\n MenuColumnWithHeader,\n MultiColumnMenu,\n ReferencedItem,\n} from 'platform-bible-utils';\nimport { useMemo } from 'react';\n\ntype ColumnInfo = {\n /*\n * The ID (`${string}.${string}`) of a specific menu column.\n */\n id: ReferencedItem;\n\n /*\n * Metadata (label, order, etc.) for a specific menu column.\n */\n metadata: Localized;\n};\n\ntype MenuColumnProps = ColumnInfo &\n GroupedMenuPropsBase & {\n /** Additional css classes to help with unique styling of the menu column */\n className?: string;\n };\n\nexport type GridMenuInfo = {\n /** The menu object containing information about the columns, groups, and items to display. */\n multiColumnMenu: Localized;\n};\n\nexport type GridMenuProps = GridMenuInfo & {\n /** Optional unique identifier */\n id?: string;\n\n commandHandler: CommandHandler;\n\n /** Additional css classes to help with unique styling of the grid menu */\n className?: string;\n};\n\nfunction MenuColumn({\n commandHandler,\n menuDefinition,\n id,\n metadata,\n onClick,\n className,\n}: MenuColumnProps) {\n return (\n \n

\n {metadata.label}\n

\n {/* It would seem as though this List component were unnecessary, since it only contains one\n thing, but the \"dense\" property does affect the layout of the items (in a way I don't fully\n understand). There might be a better way. */}\n \n \n \n \n );\n}\n\nexport default function GridMenu({\n commandHandler,\n className,\n multiColumnMenu,\n id,\n}: GridMenuProps) {\n const { columns } = multiColumnMenu;\n\n const sortedColumns = useMemo(() => {\n const columnNumbers = new Map();\n Object.getOwnPropertyNames(columns).forEach((columnName: string) => {\n // We know for sure there is a (boolean) property 'isExtensible' that we are not interested in.\n if (columnName === 'isExtensible') return;\n // TS doesn't allow `columnName` above to be a ReferencedItem even though the type says it is\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const columnId = columnName as ReferencedItem;\n const column = columns[columnId];\n // As of right now (and hopefully forever after), all remaining properties of the\n // ColumnsWithHeaders object are columns whose property names are the IDs of the columns.\n // This is an additional (redundant) sanity check. Specifically we're interested in\n // MenuColumnWithHeader objects, which TypeScript now \"knows\" we have, but at runtime all we\n // can check for is that it's an object with a valid numeric order field. That's likely good\n // enough.\n if (\n typeof column === 'object' &&\n typeof column.order === 'number' &&\n !Number.isNaN(column.order)\n )\n columnNumbers.set(column.order, { id: columnId, metadata: column });\n else\n console.warn(\n `Property ${columnName} (${typeof column}) on menu ${id} is not a valid column and is being ignored. This might indicate data corruption`,\n );\n });\n\n // Extract values and sort them based on the 'order' property\n return Array.from(columnNumbers.values()).sort((a, b) => {\n return (a.metadata.order || 0) - (b.metadata.order || 0);\n });\n }, [columns, id]);\n\n // We might need something like this if we need to be able to prevent empty columns\n // sortedColumns.filter((c) => multiColumnMenu.groups.some((g) => 'column' in g && (g as .column)...\n\n return (\n \n {sortedColumns.map((col, index) => (\n \n ))}\n \n );\n}\n","import { useEffect, useRef, useState } from 'react';\n\nexport type UsePromiseOptions = {\n /**\n * Whether to leave the value as the most recent resolved promise value or set it back to\n * defaultValue while running the promise again. Defaults to true\n */\n preserveValue?: boolean;\n};\n\n/** Set up defaults for options for usePromise hook */\nfunction getUsePromiseOptionsDefaults(options: UsePromiseOptions): UsePromiseOptions {\n return {\n preserveValue: true,\n ...options,\n };\n}\n\n/**\n * Awaits a promise and returns a loading value while the promise is unresolved\n *\n * @param promiseFactoryCallback A function that returns the promise to await. If this callback is\n * undefined, the current value will be returned (defaultValue unless it was previously changed\n * and `options.preserveValue` is true), and there will be no loading.\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n * @param defaultValue The initial value to return while first awaiting the promise. If\n * `options.preserveValue` is false, this value is also shown while awaiting the promise on\n * subsequent calls.\n *\n * Note: this parameter is internally assigned to a `ref`, so changing it will not cause any hooks\n * to re-run with its new value. This means that, if the `promiseFactoryCallback` changes and\n * `options.preserveValue` is `false`, the returned value will be set to the current\n * `defaultValue`. However, the returned value will not be updated if`defaultValue` changes.\n * @param options Various options for adjusting how this hook runs the `promiseFactoryCallback`\n *\n * Note: this parameter is internally assigned to a `ref`, so changing it will not cause any hooks\n * to re-run with its new value. However, the latest `options.preserveValue` will always be used\n * appropriately to determine whether to preserve the returned value when changing the\n * `promiseFactoryCallback`\n * @returns `[value, isLoading]`\n *\n * - `value`: the current value for the promise, either the defaultValue or the resolved promise value\n * - `isLoading`: whether the promise is waiting to be resolved\n */\nconst usePromise = (\n promiseFactoryCallback: (() => Promise) | undefined,\n defaultValue: T,\n options: UsePromiseOptions = {},\n): [value: T, isLoading: boolean] => {\n // Use defaultValue as a ref so it doesn't update dependency arrays\n const defaultValueRef = useRef(defaultValue);\n defaultValueRef.current = defaultValue;\n // Use options as a ref so it doesn't update dependency arrays\n const optionsDefaultedRef = useRef(options);\n optionsDefaultedRef.current = getUsePromiseOptionsDefaults(optionsDefaultedRef.current);\n\n const [value, setValue] = useState(() => defaultValueRef.current);\n const [isLoading, setIsLoading] = useState(true);\n useEffect(() => {\n let promiseIsCurrent = true;\n // If a promiseFactoryCallback was provided, we are loading. Otherwise, there is no loading to do\n setIsLoading(!!promiseFactoryCallback);\n (async () => {\n // If there is a callback to run, run it\n if (promiseFactoryCallback) {\n const result = await promiseFactoryCallback();\n // If the promise was not already replaced, update the value\n if (promiseIsCurrent) {\n setValue(() => result);\n setIsLoading(false);\n }\n }\n })();\n\n return () => {\n // Mark this promise as old and not to be used\n promiseIsCurrent = false;\n if (!optionsDefaultedRef.current.preserveValue) setValue(() => defaultValueRef.current);\n };\n }, [promiseFactoryCallback]);\n\n return [value, isLoading];\n};\nexport default usePromise;\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: \"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z\"\n}), 'Menu');","import GridMenu from '@/components/mui/grid-menu.component';\nimport { Command, CommandHandler } from '@/components/mui/menu-item.component';\nimport usePromise from '@/hooks/use-promise.hook';\nimport { Menu as MenuIcon } from '@mui/icons-material';\nimport { Drawer, IconButton } from '@mui/material';\nimport { Localized, MultiColumnMenu } from 'platform-bible-utils';\nimport {\n MouseEvent,\n MutableRefObject,\n PropsWithChildren,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nexport interface MultiColumnMenuProvider {\n (isSupportAndDevelopment: boolean): Promise>;\n}\n\nexport type HamburgerMenuButtonProps = PropsWithChildren & {\n /** The handler to use for menu commands (and eventually toolbar commands). */\n commandHandler: CommandHandler;\n\n /**\n * Optional reference to the \"div\" container that determines the where the menu should appear. If\n * not defined, then (1,1) used.\n */\n containerRef?: MutableRefObject;\n\n /**\n * The delegate to use to get the menu data. If not specified or if it returns undefined, the data\n * in normalMenu or fullMenu property will be used.\n */\n menuProvider?: MultiColumnMenuProvider;\n\n /**\n * The menu data to show when the menu is opened if the menuProvider property is not defined.\n * (This allows for a default or test-only static menu to be used.)\n */\n normalMenu?: Localized;\n\n /**\n * The menu data to show for \"full\" menu (when opened with the SHIFT key pressed) if the\n * menuProvider property is not defined. (This allows for a default or test-only static menu to be\n * used.)\n */\n fullMenu?: Localized;\n\n /** Additional css class(es) to help with unique styling of the sub-components */\n className?: string;\n\n /** Value to use as prefix for ARIA labels on interactive sub-components */\n ariaLabelPrefix?: string;\n};\n\nexport default function HamburgerMenuButton({\n menuProvider,\n normalMenu,\n fullMenu,\n commandHandler,\n containerRef,\n className,\n ariaLabelPrefix,\n children,\n}: HamburgerMenuButtonProps) {\n const [isMenuOpen, setMenuOpen] = useState(false);\n const [showFullMenu, setShowFullMenu] = useState(false);\n\n const handleMenuItemClick = useCallback(() => {\n if (isMenuOpen) setMenuOpen(false);\n setShowFullMenu(false);\n }, [isMenuOpen]);\n\n const handleMenuButtonClick = useCallback((e: MouseEvent) => {\n e.stopPropagation();\n setMenuOpen((prevIsOpen) => {\n const isOpening = !prevIsOpen;\n if (isOpening && e.shiftKey) setShowFullMenu(true);\n else if (!isOpening) setShowFullMenu(false);\n return isOpening;\n });\n }, []);\n\n const menuCommandHandler = useCallback(\n (command: Command) => {\n handleMenuItemClick();\n return commandHandler(command);\n },\n [commandHandler, handleMenuItemClick],\n );\n\n const [offset, setOffset] = useState({ top: 1, left: 1 });\n\n useEffect(() => {\n if (isMenuOpen) {\n const node = containerRef?.current;\n if (node) {\n const rect = node.getBoundingClientRect();\n const scrollTop = window.scrollY;\n const scrollLeft = window.scrollX;\n const top = rect.top + scrollTop + node.clientHeight;\n const left = rect.left + scrollLeft;\n setOffset({ top, left });\n }\n }\n }, [isMenuOpen, containerRef]);\n\n const [normalMenuData] = usePromise(\n useCallback(async () => {\n return menuProvider?.(false) ?? normalMenu;\n // isMenuOpen needs to be included for the menu contents to reevaluate when reopened\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [menuProvider, normalMenu, isMenuOpen]),\n normalMenu,\n );\n\n const [fullMenuData] = usePromise(\n useCallback(async () => {\n return menuProvider?.(true) ?? fullMenu ?? normalMenuData;\n // isMenuOpen needs to be included for the menu contents to reevaluate when reopened\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [menuProvider, fullMenu, normalMenuData, isMenuOpen]),\n fullMenu ?? normalMenuData,\n );\n\n const menu = showFullMenu && fullMenuData ? fullMenuData : normalMenuData;\n\n return (\n <>\n \n {children ?? }\n \n \n {menu ? (\n \n ) : undefined}\n \n \n );\n}\n","import '@/components/mui/icon-button.component.css';\nimport { IconButton as MuiIconButton } from '@mui/material';\nimport { MouseEventHandler, PropsWithChildren } from 'react';\n\nexport type IconButtonProps = PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n /**\n * Required. Used as both the tooltip (aka, title) and the aria-label (used for accessibility,\n * testing, etc.), unless a distinct tooltip is supplied.\n */\n label: string;\n /**\n * Enabled status of button\n *\n * @default false\n */\n isDisabled?: boolean;\n /** Optional tooltip to display if different from the aria-label. */\n tooltip?: string;\n /** If true, no tooltip will be displayed. */\n isTooltipSuppressed?: boolean;\n /**\n * If given, uses a negative margin to counteract the padding on one side (this is often helpful\n * for aligning the left or right side of the icon with content above or below, without ruining\n * the border size and shape).\n *\n * @default false\n */\n adjustMarginToAlignToEdge?: 'end' | 'start' | false;\n /**\n * The size of the component. small is equivalent to the dense button styling.\n *\n * @default false\n */\n size: 'small' | 'medium' | 'large';\n /** Additional css classes to help with unique styling of the button */\n className?: string;\n /** Optional click handler */\n onClick?: MouseEventHandler;\n}>;\n\n/**\n * Iconic button a user can click to do something\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction IconButton({\n id,\n label,\n isDisabled = false,\n tooltip,\n isTooltipSuppressed = false,\n adjustMarginToAlignToEdge = false,\n size = 'medium',\n className,\n onClick,\n children,\n}: IconButtonProps) {\n return (\n \n {children /* the icon to display */}\n \n );\n}\n\nexport default IconButton;\n","import { cn } from '@/utils/shadcn-ui.util';\nimport { LoaderCircle, LucideProps } from 'lucide-react';\nimport { forwardRef } from 'react';\n\nexport type SpinnerProps = LucideProps;\n\nconst Spinner = forwardRef(({ className, ...props }, ref) => {\n return (\n \n );\n});\n\nSpinner.displayName = 'Spinner';\n\nexport default Spinner;\n","import { Input as ShadInput } from '@/components/shadcn-ui/input';\nimport { Label as ShadLabel } from '@/components/shadcn-ui/label';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { ChangeEventHandler, FocusEventHandler } from 'react';\n\nexport type TextFieldProps = {\n /** Optional unique identifier */\n id?: string;\n /**\n * If `true`, the component is disabled.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * If `true`, the label is displayed in an error state.\n *\n * @default false\n */\n hasError?: boolean;\n /**\n * If `true`, the input will take up the full width of its container.\n *\n * @default false\n */\n isFullWidth?: boolean;\n /** Text that gives the user instructions on what contents the TextField expects */\n helperText?: string;\n /** The title of the TextField */\n label?: string;\n /** The short hint displayed in the `input` before the user enters a value. */\n placeholder?: string;\n /**\n * If `true`, the label is displayed as required and the `input` element is required.\n *\n * @default false\n */\n isRequired?: boolean;\n /** Additional css classes to help with unique styling of the text field */\n className?: string;\n /** Starting value for the text field if it is not controlled */\n defaultValue?: string | number;\n /** Value of the text field if controlled */\n value?: string | number;\n /** Triggers when content of textfield is changed */\n onChange?: ChangeEventHandler;\n /** Triggers when textfield gets focus */\n onFocus?: FocusEventHandler;\n /** Triggers when textfield loses focus */\n onBlur?: FocusEventHandler;\n};\n\n/**\n * Text input field\n *\n * Thanks to Shadcn for heavy inspiration and documentation\n * https://ui.shadcn.com/docs/components/input#with-label\n */\nfunction TextField({\n id,\n isDisabled = false,\n hasError = false,\n isFullWidth = false,\n helperText,\n label,\n placeholder,\n isRequired = false,\n className,\n defaultValue,\n value,\n onChange,\n onFocus,\n onBlur,\n}: TextFieldProps) {\n return (\n
\n {`${label}${isRequired ? '*' : ''}`}\n \n

{helperText}

\n
\n );\n}\n\nexport default TextField;\n","import HamburgerMenuButton, {\n MultiColumnMenuProvider,\n} from '@/components/mui/hamburger-menu-button.component';\nimport { CommandHandler } from '@/components/mui/menu-item.component';\nimport '@/components/mui/toolbar.component.css';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { AppBar, Toolbar as MuiToolbar } from '@mui/material';\nimport { PropsWithChildren, useRef } from 'react';\n\nexport type ToolbarProps = PropsWithChildren<{\n /** The handler to use for menu commands (and eventually toolbar commands). */\n commandHandler: CommandHandler;\n\n /**\n * The optional delegate to use to get the menu data. If not specified, the \"hamburger\" menu will\n * not display.\n */\n menuProvider?: MultiColumnMenuProvider;\n\n /** Optional unique identifier */\n id?: string;\n\n /** Additional css classes to help with unique styling of the toolbar */\n className?: string;\n}>;\n\nexport default function Toolbar({\n menuProvider,\n commandHandler,\n className,\n id,\n children,\n}: ToolbarProps) {\n // This ref will always be defined\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const containerRef = useRef(undefined!);\n\n return (\n
\n \n \n {menuProvider ? (\n \n ) : undefined}\n {children ?
{children}
: undefined}\n \n
\n
\n );\n}\n","import React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst alertVariants = cva(\n 'tw-relative tw-w-full tw-rounded-lg tw-border tw-p-4 [&>svg~*]:tw-pl-7 [&>svg+div]:tw-translate-y-[-3px] [&>svg]:tw-absolute [&>svg]:tw-left-4 [&>svg]:tw-top-4 [&>svg]:tw-text-foreground',\n {\n variants: {\n variant: {\n default: 'tw-bg-background tw-text-foreground',\n destructive:\n 'tw-border-destructive/50 tw-text-destructive dark:tw-border-destructive [&>svg]:tw-text-destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes & VariantProps\n>(({ className, variant, ...props }, ref) => (\n
\n));\nAlert.displayName = 'Alert';\n\nconst AlertTitle = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n {/* added because of https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md */}\n {props.children}{' '}\n \n ),\n);\nAlertTitle.displayName = 'AlertTitle';\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n
\n));\nAlertDescription.displayName = 'AlertDescription';\n\nexport { Alert, AlertTitle, AlertDescription };\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst badgeVariants = cva(\n 'tw-inline-flex tw-items-center tw-rounded-full tw-border tw-px-2.5 tw-py-0.5 tw-text-xs tw-font-semibold tw-transition-colors focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2',\n {\n variants: {\n variant: {\n default:\n 'tw-border-transparent tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/80',\n secondary:\n 'tw-border-transparent tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80',\n muted: 'tw-border-transparent tw-bg-muted tw-text-muted-foreground hover:tw-bg-muted/80',\n destructive:\n 'tw-border-transparent tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/80',\n outline: 'tw-text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes,\n VariantProps {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return
;\n}\n\nexport { Badge, badgeVariants };\n","import React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Card = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n {/* added because of https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md */}\n {props.children}\n \n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n

\n));\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef>(\n ({ className, ...props }, ref) => (\n

\n ),\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n","import { ComponentProps } from 'react';\nimport { toast as sonner, Toaster } from 'sonner';\n\ntype SonnerProps = ComponentProps;\n\nfunction Sonner({ ...props }: SonnerProps) {\n return (\n \n );\n}\n\n// The re-export of the sonner function was added manually\nexport { Sonner, sonner };\n","import React from 'react';\nimport * as SliderPrimitive from '@radix-ui/react-slider';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Slider = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n \n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n","import React from 'react';\nimport * as SwitchPrimitives from '@radix-ui/react-switch';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Switch = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n","import React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport type TabsListProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type TabsContentProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport const TabsList = React.forwardRef<\n React.ElementRef,\n TabsListProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nexport const TabsTrigger = React.forwardRef<\n React.ElementRef,\n TabsTriggerProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nexport const TabsContent = React.forwardRef<\n React.ElementRef,\n TabsContentProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Download } from 'lucide-react';\n\ntype InstallButtonProps = {\n /** The installing boolean value determines the state of the button. */\n isInstalling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n /** Optional text for the button. */\n buttonText?: string;\n} & ButtonProps;\n\n/**\n * The InstallButton component is a button designed for initiating installs. It includes visuals for\n * active installing and idle states.\n *\n * @param isInstalling The installing boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @param buttonText Optional text for the button.\n * @returns A install button.\n */\nexport default function InstallButton({\n isInstalling,\n handleClick,\n buttonText,\n className,\n ...props\n}: InstallButtonProps) {\n return (\n \n {isInstalling ? (\n \n ) : (\n <>\n \n {buttonText}\n \n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype EnableButtonProps = {\n /** The enabling boolean value determines the state of the button. */\n isEnabling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The EnableButton component is a button designed for initiating enabling of downloads. It includes\n * visuals for active enabling and idle states.\n *\n * @param isEnabling The enabling boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to enable.\n */\nexport default function EnableButton({\n isEnabling,\n handleClick,\n className,\n ...props\n}: EnableButtonProps) {\n return (\n \n {isEnabling ? (\n <>\n \n Enabling...\n \n ) : (\n 'Enable'\n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype DisableButtonProps = {\n /** The disabling boolean value determines the state of the button. */\n isDisabling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The DisableButton component is a button designed for initiating disabling of downloads. It\n * includes visuals for active disabling and idle states.\n *\n * @param isDisabling The disabling boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to disable.\n */\nexport default function DisableButton({\n isDisabling,\n handleClick,\n className,\n ...props\n}: DisableButtonProps) {\n return (\n \n {isDisabling ? (\n <>\n \n Disabling...\n \n ) : (\n 'Disable'\n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype UpdateButtonProps = {\n /** The updating boolean value determines the state of the button. */\n isUpdating: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The UpdateButton component is a button designed for initiating updates for downloaded extensions.\n * It includes visuals for active updating and idle states.\n *\n * @param isUpdating The updating boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to update.\n */\nexport default function UpdateButton({\n isUpdating,\n handleClick,\n className,\n ...props\n}: UpdateButtonProps) {\n return (\n \n {isUpdating ? (\n <>\n \n Updating...\n \n ) : (\n 'Update'\n )}\n \n );\n}\n","import { cn } from '@/utils/shadcn-ui.util';\nimport Markdown, { MarkdownToJSX } from 'markdown-to-jsx';\nimport { useMemo } from 'react';\n\ninterface MarkdownRendererProps {\n /** Optional unique identifier */\n id?: string;\n /** The markdown string to render */\n markdown: string;\n className?: string;\n /**\n * The [`target` attribute for `a` html\n * tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target). Defaults to not\n * adding a `target` to `a` tags\n */\n anchorTarget?: string;\n}\n\n/**\n * This component renders markdown content given a markdown string. It uses typography styles from\n * the platform.\n *\n * @param markdown The markdown string to render.\n * @param id Optional unique identifier\n * @returns A div containing the rendered markdown content.\n */\nexport default function MarkdownRenderer({\n id,\n markdown,\n className,\n anchorTarget,\n}: MarkdownRendererProps) {\n const options: MarkdownToJSX.Options = useMemo(\n () => ({\n overrides: {\n a: {\n props: {\n target: anchorTarget,\n },\n },\n },\n }),\n [anchorTarget],\n );\n return (\n
\n {markdown}\n
\n );\n}\n","import { Filter, ChevronDown } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { Button } from '@/components/shadcn-ui/button';\n\n/**\n * The FilterButton component is a button designed for initiating filtering of data. It is designed\n * to be used with the dropdown menu. It uses forwardRef to pass the button to the dropdown trigger\n * asChild.\n *\n * @returns A button that can be used to filter.\n */\nconst FilterButton = forwardRef((props, ref) => {\n return (\n \n \n Filter\n \n \n );\n});\n\nexport default FilterButton;\n","import {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuGroup,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport FilterButton from './buttons/filter-button.component';\n\nexport enum DropdownMenuItemType {\n Check,\n Radio,\n}\n\nexport type DropdownItem = {\n /** The label is the text that will be displayed on the dropdown item. */\n label: string;\n /** The itemType determines the DropdownMenuItemType type as either Check or Radio. */\n itemType: DropdownMenuItemType;\n /** The onClick function is called when the item is clicked. */\n onClick: () => void;\n};\n\nexport type DropdownGroup = {\n /**\n * The label is the text that will be displayed on the dropdown group. It is used to categorize\n * the items in the group.\n */\n label: string;\n /** The items array contains the items that will be displayed in the dropdown group */\n items: DropdownItem[];\n};\n\nexport type FilterDropdownProps = {\n /** Object unique identifier */\n id?: string;\n /** The groups array contains the groups that will be displayed in the dropdown */\n groups: DropdownGroup[];\n}; // TODO: extend the props later\n\n/**\n * The FilterDropdown component is a dropdown designed for filtering content. It includes groups of\n * items that can be checkboxes or radio items.\n *\n * @param id Optional unique identifier\n * @param groups The groups array contains the groups that will be displayed in the dropdown\n * @returns A filter dropdown.\n */\nexport default function FilterDropdown({ id, groups }: FilterDropdownProps) {\n return (\n
\n {/* TODO: remove this once the DropDown Menu shadcn has an id prop */}\n \n \n \n \n \n {groups.map((group) => (\n
\n {group.label}\n \n {group.items.map((item) => (\n
\n {item.itemType === DropdownMenuItemType.Check ? (\n \n {item.label}\n \n ) : (\n \n {item.label}\n \n )}\n
\n ))}\n
\n \n
\n ))}\n
\n
\n
\n );\n}\n","interface NoExtensionsFoundProps {\n /** Optional unique identifier */\n id?: string;\n /** The message to display */\n message: string;\n}\n/**\n * This component displays a message to the user when no extensions are found in the marketplace.\n *\n * @param id Optional unique identifier\n * @param message The message to display.\n * @returns {JSX.Element} - Returns the message component that displays the message to the user.\n */\nexport default function NoExtensionsFound({ id, message }: NoExtensionsFoundProps) {\n return (\n
\n
\n

{message}

\n
\n
\n );\n}\n","import { CircleHelp, Link as LucideLink, User } from 'lucide-react';\nimport { NumberFormat } from 'platform-bible-utils';\n\n/** Interface that stores the parameters passed to the More Info component */\ninterface MoreInfoProps {\n /** Optional unique identifier */\n id?: string;\n /** The category of the extension */\n category: string;\n /** The number of downloads for the extension */\n downloads: Record;\n /** The languages supported by the extension */\n languages: string[];\n /** The URL to the more info page of the extension */\n moreInfoUrl: string;\n}\n/**\n * This component displays the more info section of the extension which includes the category,\n * number of downloads, languages, and links to the website and support\n *\n * @param id Optional unique identifier\n * @param category The category of the extension\n * @param downloads The number of downloads for the extension\n * @param languages The languages supported by the extension\n * @param moreInfoUrl The URL to the more info page of the extension\n * @returns {JSX.Element} - Returns the more info component that displays the category, number of\n * downloads, languages, and links to the website and support\n */\nexport default function MoreInfo({\n id,\n category,\n downloads,\n languages,\n moreInfoUrl,\n}: MoreInfoProps) {\n /**\n * This constant formats the number of downloads into a more readable format.\n *\n * @example 1000 -> 1K\n *\n * @example 1000000 -> 1M\n *\n * @returns The formatted number of downloads\n */\n const numberFormatted = new NumberFormat('en', {\n notation: 'compact',\n compactDisplay: 'short',\n }).format(Object.values(downloads).reduce((a: number, b: number) => a + b, 0));\n\n /** This function scrolls the window to the bottom of the page. */\n const handleScrollToBottom = () => {\n window.scrollTo(0, document.body.scrollHeight);\n };\n\n return (\n \n
\n
\n {category}\n
\n CATEGORY\n
\n
\n
\n
\n \n {numberFormatted}\n
\n USERS\n
\n
\n
\n
\n {languages.slice(0, 3).map((locale) => (\n \n {locale.toUpperCase()}\n \n ))}\n
\n {languages.length > 3 && (\n handleScrollToBottom()}\n className=\"tw-text-xs tw-text-gray-500 tw-underline\"\n >\n +{languages.length - 3} more languages\n \n )}\n
\n
\n
\n \n Website\n \n \n \n Support\n \n \n
\n
\n );\n}\n","import { useState } from 'react';\n\nexport type VersionInformation = {\n /** Date the version was published */\n date: string;\n /** Description of the changes in the version */\n description: string;\n};\n\n/** Type to store the version history information */\nexport type VersionHistoryType = Record;\n\n/** Interface that stores the parameters passed to the Version History component */\ninterface VersionHistoryProps {\n /** Optional unique identifier */\n id?: string;\n /** Object containing the versions mapped with their information */\n versionHistory: VersionHistoryType;\n}\n\n/**\n * Component to render the version history information shown in the footer component. Lists the 5\n * most recent versions, with the options to show all versions by pressing a button.\n *\n * @param versionHistory Object containing the versions mapped with their information\n * @param id Optional unique identifier\n * @returns Rendered version history for the Footer component\n */\nexport default function VersionHistory({ id, versionHistory }: VersionHistoryProps) {\n const [showAllVersions, setShowAllVersions] = useState(false);\n const currentDate = new Date();\n\n /**\n * Function to format the time string for the version history in the form of 'X year(s) ago'.\n *\n * @param dateString ISO Date string to determine the time string from\n * @returns Formatted time string\n */\n function formatTimeString(dateString: string) {\n const date = new Date(dateString);\n const dateDiff = new Date(currentDate.getTime() - date.getTime());\n const yearDiff = dateDiff.getUTCFullYear() - 1970;\n const monthDiff = dateDiff.getUTCMonth();\n const dayDiff = dateDiff.getUTCDate() - 1;\n\n // Determines how long ago the version was published\n let timeString = '';\n if (yearDiff > 0) {\n timeString = `${yearDiff.toString()} year${yearDiff === 1 ? '' : 's'} ago`;\n } else if (monthDiff > 0) {\n timeString = `${monthDiff.toString()} month${monthDiff === 1 ? '' : 's'} ago`;\n } else if (dayDiff === 0) {\n timeString = 'today';\n } else {\n timeString = `${dayDiff.toString()} day${dayDiff === 1 ? '' : 's'} ago`;\n }\n\n return timeString;\n }\n\n // Sorts the version history by version number\n const sortedEntries = Object.entries(versionHistory).sort((a, b) => b[0].localeCompare(a[0]));\n\n return (\n
\n

What`s New

\n
    \n {(showAllVersions ? sortedEntries : sortedEntries.slice(0, 5)).map((entry) => (\n
    \n
    \n
  • \n {entry[1].description}\n
  • \n
    \n
    \n
    Version {entry[0]}
    \n
    {formatTimeString(entry[1].date)}
    \n
    \n
    \n ))}\n
\n {sortedEntries.length > 5 && (\n setShowAllVersions(!showAllVersions)}\n className=\"tw-text-xs tw-text-gray-500 tw-underline\"\n >\n {showAllVersions ? 'Show Less Version History' : 'Show All Version History'}\n \n )}\n
\n );\n}\n","import { useMemo } from 'react';\nimport { formatBytes } from 'platform-bible-utils';\nimport VersionHistory, { VersionHistoryType } from './version-history.component';\n\n/** Interface to store the parameters passed to the Footer component */\ninterface FooterProps {\n /** Optional unique identifier */\n id?: string;\n /** Name of the publisher */\n publisherDisplayName: string;\n /** Size of the extension file in bytes */\n fileSize: number;\n /** List of language codes supported by the extension */\n locales: string[];\n /** Object containing the version history mapped with their information */\n versionHistory: VersionHistoryType;\n}\n\n/**\n * Component to render the footer for the extension details which contains information on the\n * publisher, version history, languages, and file size.\n *\n * @param id Optional unique identifier\n * @param publisherDisplayName Name of the publisher\n * @param fileSize Size of the extension file in bytes\n * @param locales List of language codes supported by the extension\n * @param versionHistory Object containing the version history mapped with their information\n * @returns The rendered Footer component\n */\nexport default function Footer({\n id,\n publisherDisplayName,\n fileSize,\n locales,\n versionHistory,\n}: FooterProps) {\n /** Formats the file size into a human-readable format */\n const formattedFileSize = useMemo(() => formatBytes(fileSize), [fileSize]);\n\n /**\n * This function gets the display names of the languages based on the language codes.\n *\n * @param codes The list of language codes\n * @returns The list of language names\n */\n const getLanguageNames = (codes: string[]) => {\n const displayNames = new Intl.DisplayNames(navigator.language, { type: 'language' });\n return codes.map((code) => displayNames.of(code));\n };\n\n const languageNames = getLanguageNames(locales);\n\n return (\n
\n
\n \n
\n
\n

Information

\n
\n

\n Publisher\n {publisherDisplayName}\n Size\n {formattedFileSize}\n

\n
\n

\n Languages\n {languageNames.join(', ')}\n

\n
\n
\n
\n
\n
\n );\n}\n","import { PlatformEvent, PlatformEventHandler } from 'platform-bible-utils';\nimport { useEffect } from 'react';\n\n/**\n * Adds an event handler to an event so the event handler runs when the event is emitted. Use\n * `papi.network.getNetworkEvent` to use a networked event with this hook.\n *\n * @param event The event to subscribe to.\n *\n * - If event is a `PlatformEvent`, that event will be used\n * - If event is undefined, the callback will not be subscribed. Useful if the event is not yet\n * available for example\n *\n * @param eventHandler The callback to run when the event is emitted\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n */\nconst useEvent = (\n event: PlatformEvent | undefined,\n eventHandler: PlatformEventHandler,\n) => {\n useEffect(() => {\n // Do nothing if the event is not provided (in case the event is not yet available, for example)\n if (!event) return () => {};\n\n const unsubscriber = event(eventHandler);\n return () => {\n unsubscriber();\n };\n }, [event, eventHandler]);\n};\nexport default useEvent;\n","import { useCallback, useEffect } from 'react';\nimport { PlatformEvent, PlatformEventAsync, PlatformEventHandler } from 'platform-bible-utils';\nimport usePromise from './use-promise.hook';\n\nconst noopUnsubscriber = () => false;\n\n/**\n * Adds an event handler to an asynchronously subscribing/unsubscribing event so the event handler\n * runs when the event is emitted. Use `papi.network.getNetworkEvent` to use a networked event with\n * this hook.\n *\n * @param event The asynchronously (un)subscribing event to subscribe to.\n *\n * - If event is a `PlatformEvent` or `PlatformEventAsync`, that event will be used\n * - If event is undefined, the callback will not be subscribed. Useful if the event is not yet\n * available for example\n *\n * @param eventHandler The callback to run when the event is emitted\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n */\nconst useEventAsync = (\n event: PlatformEvent | PlatformEventAsync | undefined,\n eventHandler: PlatformEventHandler,\n) => {\n // Subscribe to the event asynchronously\n const [unsubscribe] = usePromise(\n useCallback(async () => {\n // Do nothing if the event is not provided (in case the event is not yet available, for example)\n if (!event) return noopUnsubscriber;\n\n // Wrap subscribe and unsubscribe in promises to allow normal events to be used as well\n const unsub = await Promise.resolve(event(eventHandler));\n return async () => unsub();\n }, [eventHandler, event]),\n noopUnsubscriber,\n // We want the unsubscriber to return to default value immediately upon changing subscription\n // So the useEffect below will unsubscribe asap\n { preserveValue: false },\n );\n\n // Unsubscribe from the event asynchronously (but we aren't awaiting the unsub)\n useEffect(() => {\n return () => {\n if (unsubscribe !== noopUnsubscriber) {\n unsubscribe();\n }\n };\n }, [unsubscribe]);\n};\n\nexport default useEventAsync;\n"],"names":["twMergeCustom","extendTailwindMerge","cn","inputs","clsx","Input","React","className","type","props","ref","jsx","BookChapterInput","forwardRef","handleSearch","handleKeyDown","handleOnClick","handleSubmit","jsxs","ShadInput","event","e","History","P","R","t","s","n","N","B","O","S","K","g","k","x","T","X","V","w","L","G","A","H","C","I","y","q","U","m","l","h","c","E","D","i","a","o","u","v","f","d","b","p","J","DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","inset","children","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","BookMenuItem","bookId","handleSelectBook","isSelected","handleHighlightBook","bookType","ShadDropdownMenuItem","Canon","ChapterSelect","handleSelectChapter","endChapter","activeChapter","highlightedChapter","handleHighlightedChapter","chapters","_","handleMouse","useCallback","chapterNumber","chapter","GoToMenuItem","handleSort","handleLocationHistory","handleBookmarks","ShadDropdownMenuLabel","ArrowDownWideNarrow","Clock","Bookmark","ALL_BOOK_IDS","BOOK_TYPE_LABELS","BOOK_TYPE_ARRAY","SCROLL_OFFSET","SEARCH_QUERY_FORMATS","fetchGroupedBooks","fetchEndChapter","getChaptersForBook","getAllEnglishNames","isValidBookEnglishName","bookName","getBookIdFromEnglishName","formattedBookName","BookChapterControl","scrRef","searchQuery","setSearchQuery","useState","selectedBookId","setSelectedBookId","setHighlightedChapter","highlightedBookId","setHighlightedBookId","isContentOpen","setIsContentOpen","isContentOpenDelayed","setIsContentOpenDelayed","inputRef","useRef","contentRef","menuItemRef","fetchFilteredBooks","englishNameLowerCase","normalizedQuery","handleSearchInput","searchString","shouldPreventAutoClosing","controlMenuState","open","updateReference","shouldClose","verse","handleInputSubmit","format","matches","book","englishName","handleKeyDownInput","handleKeyDownContent","key","handleKeyDownMenuItem","chapterOffSet","useEffect","useLayoutEffect","scrollTimeout","scrollPosition","ShadDropdownMenu","ShadDropdownMenuTrigger","ShadDropdownMenuContent","bookTypeIndex","element","ShadDropdownMenuSeparator","buttonVariants","cva","Button","variant","size","asChild","Comp","Slot","labelVariants","Label","LabelPrimitive","RadioGroup","RadioGroupPrimitive","RadioGroupItem","Popover","PopoverPrimitive","PopoverTrigger","PopoverContent","align","DialogPortal","DialogPrimitive","DialogOverlay","DialogContent","DialogTitle","DialogDescription","Command","CommandPrimitive","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","getOptionLabelDefault","option","ComboBox","id","options","value","onChange","getOptionLabel","icon","buttonPlaceholder","textPlaceholder","commandEmptyMessage","buttonVariant","alignDropDown","dir","isDisabled","setOpen","ChevronsUpDown","ChapterRangeSelector","startChapter","handleSelectStartChapter","handleSelectEndChapter","chapterCount","chapterOptions","useMemo","index","onChangeStartChapter","onChangeEndChapter","Fragment","BookSelectionMode","BOOK_SELECTOR_STRING_KEYS","localizeString","strings","BookSelector","handleBookSelectionModeChange","currentBookName","onSelectBooks","selectedBookIds","localizedStrings","currentBookText","chooseText","chooseBooksText","bookSelectionMode","setBookSelectionMode","onSelectionModeChange","newMode","DataTableViewOptions","table","FilterIcon","column","Select","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","SelectSeparator","DataTablePagination","pageSize","ArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","ArrowRightIcon","Table","stickyHeader","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","DataTable","columns","data","enablePagination","showPaginationControls","showColumnVisibilityControls","onRowClickHandler","sorting","setSorting","columnFilters","setColumnFilters","columnVisibility","setColumnVisibility","rowSelection","setRowSelection","useReactTable","getCoreRowModel","getPaginationRowModel","getSortedRowModel","getFilteredRowModel","headerGroup","header","flexRender","_a","row","cell","OccurrencesTable","occurrenceData","setScriptureReference","referenceHeaderText","occurrenceHeaderText","occurrences","uniqueOccurrences","occurrence","uniqueOccurrence","deepEqual","Checkbox","CheckboxPrimitive","getLinesFromUSFM","text","getNumberFromUSFM","regex","match","getBookNumFromId","getStatusForItem","item","approvedItems","unapprovedItems","toggleVariants","Toggle","TogglePrimitive","ToggleGroupContext","ToggleGroup","ToggleGroupPrimitive","ToggleGroupItem","context","getSortingIcon","sortDirection","ArrowUpIcon","ArrowDownIcon","ArrowUpDownIcon","inventoryItemColumn","itemLabel","inventoryAdditionalItemColumn","additionalItemLabel","additionalItemIndex","inventoryCountColumn","countLabel","statusChangeHandler","changedItems","newStatus","onApprovedItemsChange","onUnapprovedItemsChange","newApprovedItems","validItem","newUnapprovedItems","unapprovedItem","inventoryStatusColumn","statusLabel","status","CircleCheckIcon","CircleXIcon","CircleHelpIcon","INVENTORY_STRING_KEYS","filterItemData","itemData","statusFilter","textFilter","filteredItemData","createTableData","scriptureRef","itemRegex","tableData","currentBook","currentChapter","currentVerse","line","items","itemIndex","existingItem","tableEntry","newReference","substring","newItem","Inventory","scriptureReference","extractItems","additionalItemsLabels","scope","onScopeChange","allItemsText","approvedItemsText","unapprovedItemsText","unknownItemsText","scopeBookText","scopeChapterText","scopeVerseText","filterText","showAdditionalItemsText","showAdditionalItems","setShowAdditionalItems","setStatusFilter","setTextFilter","selectedItem","setSelectedItem","reducedTableData","newTableData","firstItem","existingEntry","newTableEntry","filteredTableData","allColumns","numberOfAdditionalItems","additionalColumns","_b","rowClickHandler","newSelection","handleScopeChange","handleStatusFilterChange","MultiSelectComboBox","entries","getEntriesCount","selected","placeholder","customSelectedText","sortSelected","handleSelect","getPlaceholderText","sortedOptions","starredItems","opt","nonStarredItems","aSelected","bSelected","count","Star","SearchBar","onSearch","isFullWidth","handleInputChange","VerticalTabs","TabsPrimitive","VerticalTabsList","VerticalTabsTrigger","VerticalTabsContent","NavigationContentSearch","tabList","searchPlaceholder","headerTitle","isSearchBarFullWidth","direction","tab","scrBookColId","scrRefColId","typeColId","detailsColId","defaultScrRefColumnName","defaultScrBookGroupName","defaultTypeColumnName","defaultDetailsColumnName","getColumns","colInfo","showSourceColumn","showSrcCol","info","formatScrRef","compareScrRefs","toRefOrRange","scriptureSelection","offsetStart","offsetEnd","scrRefToBBBCCCVVV","getRowKey","ScriptureResultsViewer","sources","showColumnHeaders","scriptureReferenceColumnName","scriptureBookGroupName","typeColumnName","detailsColumnName","onRowSelected","grouping","setGrouping","scriptureResults","source","getExpandedRowModel","getGroupedRowModel","selectedRows","keys","selectedRow","scrBookGroupName","typeGroupName","groupingOptions","handleSelectChange","selectedGrouping","handleRowClick","getEvenOrOddBandingStyle","getIndent","groupingState","rowIndex","ChevronLeft","DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS","getLocalizeKeyForScrollGroupId","ScrollGroupSelector","availableScrollGroupIds","scrollGroupId","onChangeScrollGroupId","localizedStringsDefaulted","localizedStringKey","localizedStringValue","newScrollGroupString","scrollGroupOptionId","Separator","orientation","decorative","SeparatorPrimitive","SettingsList","SettingsListItem","primary","secondary","isLoading","loadingMessage","SettingsListHeader","includeSeparator","Checklist","listItems","selectedListItems","handleSelectListItem","createLabel","_interopRequireDefault","obj","module","chainPropTypes","propType1","propType2","args","_extends","target","isPlainObject","prototype","deepClone","output","deepmerge","r","z","reactIs_production_min","hasSymbol","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","isValidElementType","typeOf","object","$$typeof","$$typeofType","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","hasWarnedAboutDeprecatedIsAsyncMode","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","reactIs_development","reactIsModule","require$$0","require$$1","getOwnPropertySymbols","hasOwnProperty","propIsEnumerable","toObject","val","shouldUseNative","test1","test2","order2","test3","letter","objectAssign","from","to","symbols","ReactPropTypesSecret","ReactPropTypesSecret_1","has","printWarning","loggedTypeFailures","message","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","error","err","ex","stack","checkPropTypes_1","ReactIs","assign","require$$2","require$$3","require$$4","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","iteratorFn","ANONYMOUS","ReactPropTypes","createPrimitiveTypeChecker","createAnyTypeChecker","createArrayOfTypeChecker","createElementTypeChecker","createElementTypeTypeChecker","createInstanceTypeChecker","createNodeChecker","createObjectOfTypeChecker","createEnumTypeChecker","createUnionTypeChecker","createShapeTypeChecker","createStrictShapeTypeChecker","is","PropTypeError","createChainableTypeChecker","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","propName","propFullName","secret","cacheKey","chainedCheckType","expectedType","propValue","propType","getPropType","preciseType","getPreciseType","typeChecker","expectedClass","expectedClassName","actualClassName","getClassName","expectedValues","valuesString","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","expectedTypesMessage","isNode","invalidValidatorError","shapeTypes","allKeys","iterator","step","entry","isSymbol","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","isClassComponent","elementType","acceptingRef","safePropName","warningHint","elementAcceptingRef","PropTypes","elementAcceptingRef$1","specialProperty","exactProp","propTypes","unsupportedProps","prop","formatMuiErrorMessage","code","url","REACT_SERVER_CONTEXT_TYPE","REACT_OFFSCREEN_TYPE","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","SuspenseList","hasWarnedAboutDeprecatedIsConcurrentMode","isSuspenseList","fnNameMatchRegex","getFunctionName","fn","getFunctionComponentName","Component","fallback","getWrappedName","outerType","innerType","wrapperName","functionName","getDisplayName","HTMLElementType","refType","refType$1","capitalize","string","_formatMuiErrorMessage","createChainedFunction","funcs","acc","func","debounce","wait","timeout","debounced","later","deprecatedPropType","validator","reason","componentNameSafe","propFullNameSafe","isMuiElement","muiNames","_muiName","_element$type","ownerDocument","node","ownerWindow","requirePropFactory","componentNameInError","prevPropTypes","requiredProp","defaultTypeChecker","typeCheckerResult","setRef","useEnhancedEffect","useEnhancedEffect$1","globalId","useGlobalId","idOverride","defaultId","setDefaultId","maybeReactUseId","useId","reactId","unsupportedProp","useControlled","controlled","defaultProp","name","state","isControlled","valueState","setValue","defaultValue","setValueIfUncontrolled","newValue","useEventCallback","useForkRef","refs","instance","UNINITIALIZED","useLazyRef","init","initArg","EMPTY","useOnMount","Timeout","delay","useTimeout","hadKeyboardEvent","hadFocusVisibleRecently","hadFocusVisibleRecentlyTimeout","inputTypesWhitelist","focusTriggersKeyboardModality","tagName","handlePointerDown","handleVisibilityChange","prepare","doc","isFocusVisible","useIsFocusVisible","isFocusVisibleRef","handleBlurVisible","handleFocusVisible","resolveProps","defaultProps","defaultSlotProps","slotProps","slotPropName","composeClasses","slots","getUtilityClass","classes","slot","utilityClass","defaultGenerator","createClassNameGenerator","generate","generator","ClassNameGenerator","ClassNameGenerator$1","globalStateClasses","generateUtilityClass","globalStatePrefix","globalStateClass","generateUtilityClasses","result","clamp","min","max","_objectWithoutPropertiesLoose","excluded","sourceKeys","_excluded","sortBreakpointsValues","breakpointsAsArray","breakpoint1","breakpoint2","createBreakpoints","breakpoints","unit","other","sortedValues","up","down","between","start","end","endIndex","only","not","keyIndex","shape","shape$1","responsivePropType","responsivePropType$1","merge","defaultBreakpoints","handleBreakpoints","styleFromPropValue","theme","themeBreakpoints","breakpoint","mediaKey","cssKey","createEmptyBreakpointObject","breakpointsInput","_breakpointsInput$key","breakpointStyleKey","removeUnusedBreakpoints","breakpointKeys","style","breakpointOutput","getPath","path","checkVars","getStyleValue","themeMapping","transform","propValueFinal","userValue","cssProperty","themeKey","memoize","cache","arg","properties","directions","aliases","getCssProperties","property","marginKeys","paddingKeys","spacingKeys","createUnaryUnit","_getPath","themeSpacing","abs","createUnarySpacing","getValue","transformer","transformed","getStyleFromPropValue","cssProperties","resolveCssProperty","margin","padding","createSpacing","spacingInput","spacing","argsInput","argument","compose","styles","handlers","borderTransform","createBorderStyle","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outline","outlineColor","borderRadius","gap","columnGap","rowGap","gridColumn","gridRow","gridAutoFlow","gridAutoColumns","gridAutoRows","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridArea","paletteTransform","color","bgcolor","backgroundColor","sizingTransform","width","maxWidth","_props$theme","_props$theme2","breakpointsValues","minWidth","height","maxHeight","minHeight","boxSizing","defaultSxConfig","defaultSxConfig$1","objectsHaveSameKeys","objects","union","callIfFn","maybeFn","unstable_createStyleFunctionSx","getThemeValue","config","styleFunctionSx","_theme$unstable_sxCon","sx","traverse","sxInput","sxObject","emptyBreakpoints","breakpointsKeys","css","styleKey","styleFunctionSx$1","applyStyles","createTheme","paletteInput","shapeInput","muiTheme","isObjectEmpty","useTheme","defaultTheme","contextTheme","ThemeContext","systemDefaultTheme","useThemeWithoutDefault","_excluded2","_excluded3","isEmpty","isStringTag","tag","shouldForwardProp","lowercaseFirstLetter","resolveTheme","themeId","defaultOverridesResolver","processStyleArg","callableStyle","_ref","ownerState","resolvedStylesArg","resolvedStyle","variants","isMatch","createStyled","input","rootShouldForwardProp","slotShouldForwardProp","systemSx","inputOptions","processStyles","componentSlot","inputSkipVariantsResolver","inputSkipSx","overridesResolver","skipVariantsResolver","skipSx","label","shouldForwardPropOption","defaultStyledResolver","styledEngineStyled","transformStyleArg","stylesArg","muiStyledResolver","styleArg","expressions","transformedStyleArg","expressionsWithDefaultTheme","styleOverrides","resolvedStyleOverrides","slotKey","slotStyle","_theme$components","themeVariants","numOfCustomFnsApplied","placeholders","displayName","getThemeProps","params","useThemeProps","clampWrapper","hexToRgb","re","colors","decomposeColor","marker","colorSpace","recomposeColor","hslToRgb","rgb","getLuminance","getContrastRatio","foreground","background","lumA","lumB","alpha","darken","coefficient","lighten","createMixins","mixins","common","common$1","grey","grey$1","purple","purple$1","red","red$1","orange","orange$1","blue","blue$1","lightBlue","lightBlue$1","green","green$1","light","dark","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","getDefaultPrimary","mode","getDefaultSecondary","getDefaultError","getDefaultInfo","getDefaultSuccess","getDefaultWarning","createPalette","palette","contrastThreshold","success","warning","getContrastText","contrastText","contrast","augmentColor","mainShade","lightShade","darkShade","modes","round","caseAllCaps","defaultFontFamily","createTypography","typography","fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem2","coef","pxToRem","buildVariant","fontWeight","lineHeight","letterSpacing","casing","shadowKeyUmbraOpacity","shadowKeyPenumbraOpacity","shadowAmbientShadowOpacity","createShadow","px","shadows","shadows$1","easing","duration","formatMs","milliseconds","getAutoHeightDuration","constant","createTransitions","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","isString","isNumber","animatedProp","zIndex","zIndex$1","mixinsInput","transitionsInput","typographyInput","systemTheme","systemCreateTheme","stateClasses","component","child","stateClass","defaultTheme$1","THEME_ID","systemUseThemeProps","styled","styled$1","getSvgIconUtilityClass","useUtilityClasses","SvgIconRoot","_theme$transitions","_theme$transitions$cr","_theme$transitions2","_theme$typography","_theme$typography$pxT","_theme$typography2","_theme$typography2$px","_theme$typography3","_theme$typography3$px","_palette$ownerState$c","_palette","_palette2","_palette3","SvgIcon","inProps","htmlColor","inheritViewBox","titleAccess","viewBox","hasSvgAsChild","more","_jsxs","_jsx","SvgIcon$1","createSvgIcon","unstable_ClassNameGenerator","exports","_utils","ArrowRight","default_1","_createSvgIcon","_jsxRuntime","isHostComponent","appendOwnerState","otherProps","defaultContextValue","ClassNameConfiguratorContext","useClassNamesOverride","disableDefaultClasses","extractEventHandlers","excludeKeys","resolveComponentProps","componentProps","slotState","omitEventHandlers","mergeSlotProps","parameters","getSlotProps","additionalProps","externalSlotProps","externalForwardedProps","joinedClasses","mergedStyle","eventHandlers","componentsPropsWithoutEventHandlers","otherPropsWithoutEventHandlers","internalSlotProps","useSlotProps","_parameters$additiona","skipResolvingSlotProps","rest","resolvedComponentsProps","mergedProps","internalRef","GLOBAL_CLASS_PREFIX","buildStateClass","buildSlotClass","getContainer","container","forwardedRef","disablePortal","mountNode","setMountNode","handleRef","newProps","ReactDOM","top","bottom","right","left","auto","basePlacements","clippingParents","viewport","popper","reference","variationPlacements","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","getWindow","OwnElement","isHTMLElement","isShadowRoot","attributes","effect","_ref2","initialStyles","styleProperties","attribute","applyStyles$1","getBasePlacement","getUAString","uaData","isLayoutViewport","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","visualViewport","addVisualOffsets","getLayoutRect","contains","parent","rootNode","next","getComputedStyle","isTableElement","getDocumentElement","getParentNode","getTrueOffsetParent","getContainingBlock","isFirefox","isIE","elementCss","currentNode","getOffsetParent","window","offsetParent","getMainAxisFromPlacement","within","mathMax","mathMin","withinMaxClamp","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","arrow","_state$modifiersData$","arrowElement","popperOffsets","basePlacement","axis","isVertical","len","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","center","offset","axisProp","_options$element","arrow$1","getVariation","unsetSides","roundOffsetsByDPR","win","dpr","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","heightProp","widthProp","offsetY","offsetX","commonStyles","_ref4","_Object$assign","computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash","getOppositePlacement","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","scrollTop","getWindowScrollBarX","getViewportRect","strategy","html","layoutViewport","getDocumentRect","_element$ownerDocumen","winScroll","body","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","list","isBody","updatedList","rectToClientRect","rect","getInnerBoundingClientRect","getClientRectFromMixedType","clippingParent","getClippingParents","canEscapeClipping","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","allPlacements","allowedPlacements","overflows","getExpandedFallbackPlacements","oppositePlacement","flip","_options$mainAxis","checkMainAxis","_options$altAxis","checkAltAxis","specifiedFallbackPlacements","_options$flipVariatio","preferredPlacement","isBasePlacement","fallbackPlacements","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","check","numberOfChecks","_loop","_i","fittingPlacement","_ret","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","hide","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","rects","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","preventOverflow","_options$tether","tether","_options$tetherOffset","tetherOffset","altAxis","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","documentElement","order","modifiers","map","visited","modifier","sort","requires","dep","depModifier","orderModifiers","orderedModifiers","phase","pending","resolve","mergeByName","merged","current","existing","DEFAULT_OPTIONS","areValidElements","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptionsAction","cleanupModifierEffects","runModifierEffects","_state$elements","_state$orderedModifie","_state$orderedModifie2","_ref$options","cleanupFn","noopFn","createPopper","COMPONENT_NAME","getPopperUtilityClass","flipPlacement","resolveAnchorEl","anchorEl","isVirtualElement","defaultPopperOptions","PopperTooltip","_slots$root","initialPlacement","popperOptions","popperRefProp","TransitionProps","tooltipRef","ownRef","popperRef","handlePopperRef","handlePopperRefRef","rtlPlacement","setPlacement","resolvedAnchorElement","setResolvedAnchorElement","handlePopperUpdate","box","popperModifiers","childProps","Root","rootProps","Popper","containerProp","keepMounted","transition","exited","setExited","handleEnter","handleExited","resolvedAnchorEl","display","transitionProps","useThemeSystem","_setPrototypeOf","_inheritsLoose","subClass","superClass","setPrototypeOf","timeoutsShape","TransitionGroupContext","forceReflow","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","_this","parentGroup","appear","initialStatus","prevState","nextIn","_proto","prevProps","nextStatus","exit","enter","mounting","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","_this3","nextState","callback","_this4","active","handler","doesNotHaveTimeoutOrListener","maybeNextCallback","_this$props","pt","noop","Transition$1","reflow","getTransitionProps","_style$transitionDura","_style$transitionTimi","getScale","isWebKit154","Grow","addEndListener","inProp","onEnter","onEntered","onEntering","onExit","onExited","onExiting","TransitionComponent","timer","autoTimeout","nodeRef","normalizedTransitionCallback","maybeIsAppearing","handleEntering","isAppearing","transitionDuration","transitionTimingFunction","handleEntered","handleExiting","handleExit","handleAddEndListener","Grow$1","PopperRoot","BasePopper","components","componentsProps","RootComponent","Popper$1","getTooltipUtilityClass","tooltipClasses","tooltipClasses$1","disableInteractive","touch","TooltipPopper","TooltipTooltip","TooltipArrow","hystersisOpen","hystersisTimer","cursorPosition","composeEventHandler","eventHandler","Tooltip","_slots$popper","_slots$transition","_slots$tooltip","_slots$arrow","_slotProps$popper","_ref6","_slotProps$popper2","_slotProps$transition","_slotProps$tooltip","_ref7","_slotProps$tooltip2","_slotProps$arrow","_ref8","_slotProps$arrow2","childrenProp","describeChild","disableFocusListener","disableHoverListener","disableInteractiveProp","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","idProp","leaveDelay","leaveTouchDelay","onClose","onOpen","openProp","PopperComponentProp","PopperProps","title","TransitionComponentProp","isRtl","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","handleOpen","handleClose","handleLeave","focusVisibleRef","setChildIsFocusVisible","handleBlur","handleFocus","detectTouchStart","childrenProps","handleMouseOver","handleMouseLeave","handleTouchStart","handleTouchEnd","nativeEvent","handleMouseMove","nameOrDescProps","titleIsString","interactiveWrapperListeners","_PopperProps$popperOp","tooltipModifiers","PopperComponent","TooltipComponent","ArrowComponent","popperProps","tooltipProps","tooltipArrowProps","TransitionPropsInner","Tooltip$1","getIcon","menuLabel","leading","MuiListItemIcon","MenuItem","onClick","tooltip","allowForLeadingIcons","iconPathBefore","iconPathAfter","hasAutoFocus","isDense","isSubMenuParent","hasDisabledGutters","hasDivider","focusVisibleClassName","menuItem","MuiMenuItem","MuiListItemText","getAllGroups","menuDefinition","SubMenu","setAnchorEl","parentMenuItem","parentItemProps","handleParentMenuItemClick","renderSubMenuItems","includedGroups","group","GroupedMenuItemList","Menu","getOrderedGroupItems","groupId","allItems","menuProps","commandHandler","groupsToInclude","sortedGroups","itemArray","allowSpaceForLeadingIcons","createMenuItemProps","isLastItemInGroup","divKey","itemInfo","menuItemProps","TopLevelMenu","columnId","MenuColumn","metadata","Grid","List","GridMenu","multiColumnMenu","sortedColumns","columnNumbers","columnName","col","getUsePromiseOptionsDefaults","usePromise","promiseFactoryCallback","defaultValueRef","optionsDefaultedRef","setIsLoading","promiseIsCurrent","MenuIcon","HamburgerMenuButton","menuProvider","normalMenu","fullMenu","containerRef","ariaLabelPrefix","isMenuOpen","setMenuOpen","showFullMenu","setShowFullMenu","handleMenuItemClick","handleMenuButtonClick","prevIsOpen","isOpening","menuCommandHandler","command","setOffset","normalMenuData","fullMenuData","menu","IconButton","Drawer","isTooltipSuppressed","adjustMarginToAlignToEdge","MuiIconButton","Spinner","LoaderCircle","TextField","hasError","helperText","onFocus","onBlur","ShadLabel","Toolbar","AppBar","MuiToolbar","alertVariants","Alert","AlertTitle","AlertDescription","badgeVariants","Badge","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","Sonner","Toaster","Slider","SliderPrimitive","Switch","SwitchPrimitives","Tabs","TabsList","TabsTrigger","TabsContent","InstallButton","isInstalling","handleClick","buttonText","Download","EnableButton","isEnabling","DisableButton","isDisabling","UpdateButton","isUpdating","MarkdownRenderer","markdown","anchorTarget","Markdown","FilterButton","Filter","DropdownMenuItemType","DropdownMenuItemType2","FilterDropdown","groups","NoExtensionsFound","MoreInfo","category","downloads","languages","moreInfoUrl","numberFormatted","NumberFormat","handleScrollToBottom","User","locale","LucideLink","CircleHelp","VersionHistory","versionHistory","showAllVersions","setShowAllVersions","currentDate","formatTimeString","dateString","date","dateDiff","yearDiff","monthDiff","dayDiff","timeString","sortedEntries","Footer","publisherDisplayName","fileSize","locales","formattedFileSize","formatBytes","languageNames","codes","displayNames","useEvent","unsubscriber","noopUnsubscriber","useEventAsync","unsubscribe","unsub"],"mappings":"25CAGA,MAAMA,GAAgBC,GAAAA,oBAAoB,CAAE,OAAQ,KAAO,CAAA,EAyDpD,SAASC,KAAMC,EAAsB,CACnC,OAAAH,GAAcI,GAAAA,KAAKD,CAAM,CAAC,CACnC,CCzDO,MAAME,GAAQC,EAAM,WACzB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAA,EAASC,IAE5BC,EAAA,IAAC,QAAA,CACC,KAAAH,EACA,UAAWN,EACT,sbACAK,CACF,EACA,IAAAG,EAEC,GAAGD,CAAA,CAAA,CAIZ,EACAJ,GAAM,YAAc,QCNpB,MAAMO,GAAmBC,EAAA,WACvB,CACE,CAAE,aAAAC,EAAc,cAAAC,EAAe,cAAAC,EAAe,aAAAC,EAAc,GAAGR,CAAM,EACrEC,IAGEQ,EAAA,KAAC,MAAI,CAAA,UAAU,cACb,SAAA,CAAAP,EAAA,IAACQ,GAAA,CACE,GAAGV,EACJ,KAAK,OACL,UAAU,0JACV,SAAWW,GAAUN,EAAaM,EAAM,OAAO,KAAK,EACpD,UAAYC,GAAM,CACZA,EAAE,MAAQ,SACCJ,IAEfF,EAAcM,CAAC,CACjB,EACA,QAASL,EACT,IAAAN,CAAA,CACF,EACAC,EAAA,IAACW,EAAA,QAAA,CACC,UAAU,8HACV,QAAS,IAAM,CAEb,QAAQ,IAAI,iBAAiB,CAC/B,CAAA,CACF,CACF,CAAA,CAAA,CAGN,EC9CA,IAAIC,GAAI,OAAO,eACXC,GAAI,CAACC,EAAGJ,EAAGK,IAAML,KAAKI,EAAIF,GAAEE,EAAGJ,EAAG,CAAE,WAAY,GAAI,aAAc,GAAI,SAAU,GAAI,MAAOK,CAAC,CAAE,EAAID,EAAEJ,CAAC,EAAIK,EACzGC,GAAI,CAACF,EAAGJ,EAAGK,IAAMF,GAAEC,EAAG,OAAOJ,GAAK,SAAWA,EAAI,GAAKA,EAAGK,CAAC,EAW9D,MAAME,GAAI,CACR,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MAEA,MAEA,MAEA,MAEA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MAEA,MAEA,MAEA,MAEA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,KACF,EAAGC,GAAI,CACL,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACF,EAAGC,GAAI,CACL,UACA,SACA,YACA,UACA,cACA,SACA,SACA,OACA,WACA,WACA,UACA,UACA,eACA,eACA,OACA,WACA,kBACA,MACA,SACA,WACA,eACA,gBACA,SACA,WACA,eACA,UACA,kBACA,QACA,OACA,OACA,UACA,QACA,QACA,QACA,WACA,YACA,SACA,YACA,UACA,UACA,OACA,OACA,OACA,OACA,SACA,gBACA,gBACA,YACA,YACA,cACA,aACA,kBACA,kBACA,YACA,YACA,QACA,WACA,UACA,QACA,UACA,UACA,SACA,SACA,SACA,OACA,aACA,QACA,SACA,eACA,oBACA,0BACA,SACA,qBACA,sBACA,UACA,qBACA,cACA,cACA,cACA,cACA,mBACA,mBACA,qBACA,YACA,OACA,oBAGA,uBACA,uBACA,sBACA,yBACA,wBACA,qBACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,eACA,cACA,eACA,oBACA,qBACA,0BACA,0BACA,eACA,eACA,YACA,gBACA,cACA,eACA,iBACA,wBACA,mBACA,WACA,QACA,aACA,aACA,aACA,2BACA,4BACA,YACF,EAAGC,GAAIC,KACP,SAASC,GAAER,EAAGJ,EAAI,GAAI,CACpB,OAAOA,IAAMI,EAAIA,EAAE,YAAa,GAAGA,KAAKM,GAAIA,GAAEN,CAAC,EAAI,CACrD,CACA,SAASS,GAAET,EAAG,CACZ,OAAOQ,GAAER,CAAC,EAAI,CAChB,CACA,SAASU,GAAEV,EAAG,CACZ,MAAMJ,EAAI,OAAOI,GAAK,SAAWQ,GAAER,CAAC,EAAIA,EACxC,OAAOJ,GAAK,IAAMA,GAAK,EACzB,CACA,SAASe,GAAEX,EAAG,CACZ,OAAQ,OAAOA,GAAK,SAAWQ,GAAER,CAAC,EAAIA,IAAM,EAC9C,CACA,SAASY,GAAEZ,EAAG,CACZ,OAAOA,GAAK,EACd,CACA,SAASa,GAAEb,EAAG,CACZ,MAAMJ,EAAI,OAAOI,GAAK,SAAWQ,GAAER,CAAC,EAAIA,EACxC,OAAOc,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C,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,QAAS,CACP,MAAOA,EACR,EACD,WAAY,CACV,MAAOA,EACR,EACD,aAAc,CACZ,MAAOA,EACR,EACD,cAAe,CACb,MAAOA,EACR,EACD,YAAa,CACX,MAAOA,EACR,EACD,SAAU,CACR,MAAOA,EACR,EACD,SAAU,CACR,MAAOA,EACR,EACD,cAAe,CACb,MAAOA,EACR,EACD,mBAAoB,CAClB,MAAOA,EACR,EACD,iBAAkB,CAChB,MAAOA,EACR,EACD,aAAc,CACZ,MAAOA,EACR,EACD,kBAAmB,CACjB,MAAOA,EACR,EACD,gBAAiB,CACf,MAAOA,EACR,EACD,EAAG,CACD,MAAOD,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,OAAQ,CACN,MAAOA,EACR,EACD,UAAW,CACT,MAAOA,EACR,EACD,YAAa,CACX,MAAOA,EACR,EACD,aAAc,CACZ,MAAOA,EACR,EACD,WAAY,CACV,MAAOA,EACR,EACD,QAAS,CACP,MAAOA,EACR,EACD,QAAS,CACP,MAAOA,EACR,EACD,aAAc,CACZ,MAAOA,EACR,EACD,kBAAmB,CACjB,MAAOA,EACR,EACD,gBAAiB,CACf,MAAOA,EACR,EACD,YAAa,CACX,MAAOA,EACR,EACD,iBAAkB,CAChB,MAAOA,EACR,EACD,eAAgB,CACd,MAAOA,EACR,EAED,aAAc,CACZ,YAAa,GACb,UAAWrtB,IAAU,CACnB,eAAgB,CACd,QAASA,CACV,CACP,EACG,EACD,QAAS,CAAE,EACX,SAAU,CAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,222]} \ No newline at end of file +{"version":3,"file":"index.cjs","sources":["../src/utils/shadcn-ui.util.ts","../src/components/shadcn-ui/input.tsx","../src/components/advanced/book-chapter-control/book-chapter-input.component.tsx","../../../node_modules/@sillsdev/scripture/dist/index.es.js","../src/components/shadcn-ui/dropdown-menu.tsx","../src/components/advanced/book-chapter-control/book-menu-item.component.tsx","../src/components/advanced/book-chapter-control/chapter-select.component.tsx","../src/components/advanced/book-chapter-control/go-to-menu-item.component.tsx","../src/components/advanced/book-chapter-control/book-chapter-control.component.tsx","../src/components/shadcn-ui/button.tsx","../src/components/shadcn-ui/label.tsx","../src/components/shadcn-ui/radio-group.tsx","../src/components/shadcn-ui/popover.tsx","../src/components/shadcn-ui/dialog.tsx","../src/components/shadcn-ui/command.tsx","../src/components/basics/combo-box.component.tsx","../src/components/basics/chapter-range-selector.component.tsx","../src/components/advanced/book-selector.component.tsx","../src/components/advanced/data-table/data-table-column-toggle.component.tsx","../src/components/shadcn-ui/select.tsx","../src/components/advanced/data-table/data-table-pagination.component.tsx","../src/components/shadcn-ui/table.tsx","../src/components/advanced/data-table/data-table.component.tsx","../src/components/advanced/inventory/occurrences-table.component.tsx","../src/components/shadcn-ui/checkbox.tsx","../src/components/advanced/inventory/inventory-utils.ts","../src/components/shadcn-ui/toggle.tsx","../src/components/shadcn-ui/toggle-group.tsx","../src/components/advanced/inventory/inventory-columns.tsx","../src/components/advanced/inventory/inventory.component.tsx","../src/components/advanced/multi-select-combo-box.tsx","../src/components/basics/search-bar.component.tsx","../src/components/basics/tabs-vertical.tsx","../src/components/advanced/navigation-content-search.component.tsx","../src/components/advanced/scripture-results-viewer/scripture-results-viewer.component.tsx","../src/components/advanced/scroll-group-selector.component.tsx","../src/components/shadcn-ui/separator.tsx","../src/components/advanced/settings-components/settings-list.component.tsx","../src/components/basics/checklist.component.tsx","../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/@mui/utils/chainPropTypes/chainPropTypes.js","../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../node_modules/@mui/utils/deepmerge/deepmerge.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../node_modules/prop-types/node_modules/react-is/index.js","../../../node_modules/object-assign/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/lib/has.js","../../../node_modules/prop-types/checkPropTypes.js","../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.js","../../../node_modules/@mui/utils/exactProp/exactProp.js","../../../node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/cjs/react-is.development.js","../../../node_modules/react-is/index.js","../../../node_modules/@mui/utils/getDisplayName/getDisplayName.js","../../../node_modules/@mui/utils/HTMLElementType/HTMLElementType.js","../../../node_modules/@mui/utils/refType/refType.js","../../../node_modules/@mui/utils/capitalize/capitalize.js","../../../node_modules/@mui/utils/createChainedFunction/createChainedFunction.js","../../../node_modules/@mui/utils/debounce/debounce.js","../../../node_modules/@mui/utils/deprecatedPropType/deprecatedPropType.js","../../../node_modules/@mui/utils/isMuiElement/isMuiElement.js","../../../node_modules/@mui/utils/ownerDocument/ownerDocument.js","../../../node_modules/@mui/utils/ownerWindow/ownerWindow.js","../../../node_modules/@mui/utils/requirePropFactory/requirePropFactory.js","../../../node_modules/@mui/utils/setRef/setRef.js","../../../node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.js","../../../node_modules/@mui/utils/useId/useId.js","../../../node_modules/@mui/utils/unsupportedProp/unsupportedProp.js","../../../node_modules/@mui/utils/useControlled/useControlled.js","../../../node_modules/@mui/utils/useEventCallback/useEventCallback.js","../../../node_modules/@mui/utils/useForkRef/useForkRef.js","../../../node_modules/@mui/utils/useLazyRef/useLazyRef.js","../../../node_modules/@mui/utils/useOnMount/useOnMount.js","../../../node_modules/@mui/utils/useTimeout/useTimeout.js","../../../node_modules/@mui/utils/useIsFocusVisible/useIsFocusVisible.js","../../../node_modules/@mui/utils/resolveProps/resolveProps.js","../../../node_modules/@mui/utils/composeClasses/composeClasses.js","../../../node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.js","../../../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js","../../../node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js","../../../node_modules/@mui/utils/clamp/clamp.js","../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../node_modules/@mui/system/esm/createTheme/createBreakpoints.js","../../../node_modules/@mui/system/esm/createTheme/shape.js","../../../node_modules/@mui/system/esm/responsivePropType.js","../../../node_modules/@mui/system/esm/merge.js","../../../node_modules/@mui/system/esm/breakpoints.js","../../../node_modules/@mui/system/esm/style.js","../../../node_modules/@mui/system/esm/memoize.js","../../../node_modules/@mui/system/esm/spacing.js","../../../node_modules/@mui/system/esm/createTheme/createSpacing.js","../../../node_modules/@mui/system/esm/compose.js","../../../node_modules/@mui/system/esm/borders.js","../../../node_modules/@mui/system/esm/cssGrid.js","../../../node_modules/@mui/system/esm/palette.js","../../../node_modules/@mui/system/esm/sizing.js","../../../node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","../../../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","../../../node_modules/@mui/system/esm/createTheme/applyStyles.js","../../../node_modules/@mui/system/esm/createTheme/createTheme.js","../../../node_modules/@mui/system/esm/useThemeWithoutDefault.js","../../../node_modules/@mui/system/esm/useTheme.js","../../../node_modules/@mui/system/esm/createStyled.js","../../../node_modules/@mui/system/esm/useThemeProps/getThemeProps.js","../../../node_modules/@mui/system/esm/useThemeProps/useThemeProps.js","../../../node_modules/@mui/system/esm/colorManipulator.js","../../../node_modules/@mui/material/styles/createMixins.js","../../../node_modules/@mui/material/colors/common.js","../../../node_modules/@mui/material/colors/grey.js","../../../node_modules/@mui/material/colors/purple.js","../../../node_modules/@mui/material/colors/red.js","../../../node_modules/@mui/material/colors/orange.js","../../../node_modules/@mui/material/colors/blue.js","../../../node_modules/@mui/material/colors/lightBlue.js","../../../node_modules/@mui/material/colors/green.js","../../../node_modules/@mui/material/styles/createPalette.js","../../../node_modules/@mui/material/styles/createTypography.js","../../../node_modules/@mui/material/styles/shadows.js","../../../node_modules/@mui/material/styles/createTransitions.js","../../../node_modules/@mui/material/styles/zIndex.js","../../../node_modules/@mui/material/styles/createTheme.js","../../../node_modules/@mui/material/styles/defaultTheme.js","../../../node_modules/@mui/material/styles/identifier.js","../../../node_modules/@mui/material/styles/useThemeProps.js","../../../node_modules/@mui/material/styles/styled.js","../../../node_modules/@mui/material/SvgIcon/svgIconClasses.js","../../../node_modules/@mui/material/SvgIcon/SvgIcon.js","../../../node_modules/@mui/material/utils/createSvgIcon.js","../../../node_modules/@mui/material/utils/index.js","../../../node_modules/@mui/icons-material/utils/createSvgIcon.js","../../../node_modules/@mui/icons-material/ArrowRight.js","../../../node_modules/@mui/base/utils/isHostComponent.js","../../../node_modules/@mui/base/utils/appendOwnerState.js","../../../node_modules/@mui/base/utils/ClassNameConfigurator.js","../../../node_modules/@mui/base/utils/extractEventHandlers.js","../../../node_modules/@mui/base/utils/resolveComponentProps.js","../../../node_modules/@mui/base/utils/omitEventHandlers.js","../../../node_modules/@mui/base/utils/mergeSlotProps.js","../../../node_modules/@mui/base/utils/useSlotProps.js","../../../node_modules/@mui/base/generateUtilityClass/index.js","../../../node_modules/@mui/base/generateUtilityClasses/index.js","../../../node_modules/@mui/base/Portal/Portal.js","../../../node_modules/@popperjs/core/lib/enums.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../node_modules/@popperjs/core/lib/utils/math.js","../../../node_modules/@popperjs/core/lib/utils/userAgent.js","../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../node_modules/@popperjs/core/lib/utils/within.js","../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../node_modules/@popperjs/core/lib/utils/debounce.js","../../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../node_modules/@popperjs/core/lib/createPopper.js","../../../node_modules/@popperjs/core/lib/popper.js","../../../node_modules/@mui/base/Popper/popperClasses.js","../../../node_modules/@mui/base/Popper/Popper.js","../../../node_modules/@mui/material/styles/useTheme.js","../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../node_modules/react-transition-group/esm/config.js","../../../node_modules/react-transition-group/esm/utils/PropTypes.js","../../../node_modules/react-transition-group/esm/TransitionGroupContext.js","../../../node_modules/react-transition-group/esm/utils/reflow.js","../../../node_modules/react-transition-group/esm/Transition.js","../../../node_modules/@mui/material/transitions/utils.js","../../../node_modules/@mui/material/Grow/Grow.js","../../../node_modules/@mui/material/Popper/Popper.js","../../../node_modules/@mui/material/Tooltip/tooltipClasses.js","../../../node_modules/@mui/material/Tooltip/Tooltip.js","../src/components/mui/menu-item.component.tsx","../src/components/mui/grouped-menu-item-list.component.tsx","../src/components/mui/top-level-menu.component.tsx","../src/components/mui/grid-menu.component.tsx","../src/hooks/use-promise.hook.ts","../../../node_modules/@mui/icons-material/esm/Menu.js","../src/components/mui/hamburger-menu-button.component.tsx","../src/components/mui/icon-button.component.tsx","../src/components/basics/spinner.component.tsx","../src/components/basics/text-field.component.tsx","../src/components/mui/toolbar.component.tsx","../src/components/shadcn-ui/alert.tsx","../src/components/shadcn-ui/badge.tsx","../src/components/shadcn-ui/card.tsx","../src/components/shadcn-ui/sonner.tsx","../src/components/shadcn-ui/slider.tsx","../src/components/shadcn-ui/switch.tsx","../src/components/shadcn-ui/tabs.tsx","../src/components/advanced/extension-marketplace/buttons/install-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/enable-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/disable-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/update-button.component.tsx","../src/components/advanced/extension-marketplace/markdown-renderer.component.tsx","../src/components/advanced/extension-marketplace/buttons/filter-button.component.tsx","../src/components/advanced/extension-marketplace/filter-dropdown.component.tsx","../src/components/advanced/extension-marketplace/no-extensions-found.component.tsx","../src/components/advanced/extension-marketplace/more-info.component.tsx","../src/components/advanced/extension-marketplace/version-history.component.tsx","../src/components/advanced/extension-marketplace/footer.component.tsx","../src/components/advanced/filterable-resource-list/filterable-resource-list.component.tsx","../src/hooks/use-event.hook.ts","../src/hooks/use-event-async.hook.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst twMergeCustom = extendTailwindMerge({ prefix: 'tw-' });\n\n/**\n * Tailwind and CSS class application helper function. Uses\n * [`clsx`](https://www.npmjs.com/package/clsx) to make it easy to apply classes conditionally using\n * object syntax, and uses [`tailwind-merge`](https://www.npmjs.com/package/tailwind-merge) to make\n * it easy to merge/overwrite Tailwind classes in a programmer-logic-friendly way.\n *\n * Note: `tailwind-merge` is configured to use the prefix `tw-`, so you must use the same prefix\n * with any Tailwind classes you use with this function to successfully overwrite other Tailwind\n * classes. `platform-bible-react` is configured to use `tw-` as its Tailwind prefix, so any\n * Tailwind classes you pass into `platform-bible-react` components will be compared using the `tw-`\n * prefix.\n *\n * This function was popularized by\n * [shadcn/ui](https://ui.shadcn.com/docs/installation/manual#add-a-cn-helper). See [ByteGrad's\n * explanation video](https://www.youtube.com/watch?v=re2JFITR7TI) for more information.\n *\n * @example\n *\n * ```typescript\n * const borderShouldBeBlue = true;\n * const textShouldBeRed = true;\n * const heightShouldBe20 = false;\n * const classString = cn(\n * 'tw-bg-primary tw-h-10 tw-text-primary-foreground',\n * 'tw-bg-secondary',\n * {\n * 'tw-border-blue-500': borderShouldBeBlue,\n * 'tw-text-red-500': textShouldBeRed,\n * 'tw-h-20': heightShouldBe20,\n * },\n * 'some-class',\n * );\n * ```\n *\n * The resulting `classString` is `'tw-h-10 tw-bg-secondary tw-border-blue-500 tw-text-red-500\n * some-class'`\n *\n * - Notice that `'tw-bg-secondary'`, specified later, overwrote `'tw-bg-primary'`, specified earlier,\n * because they are Tailwind classes that affect the same css property\n * - Notice that `'tw-text-red-500'`, specified later, overwrote `'tw-text-primary-foreground'`,\n * specified earlier, because they are Tailwind classes that affect the same css property\n * - Notice that `'tw-h-20'`, specified later, did not overwrite `'tw-h-10'`, specified earlier,\n * because `'tw-h-20'` is part of a conditional class object and its value evaluated to `false`;\n * therefore it was not applied\n * - Notice that `'some-class'` was applied. This function is not limited only to Tailwind classes.\n *\n *\n * @param inputs Class strings or `clsx` conditional class objects to merge. Tailwind classes\n * specified later in the arguments overwrite similar Tailwind classes specified earlier in the\n * arguments\n * @returns Class string containing all applicable classes from the arguments based on the rules\n * described above\n */\n// shadcn/ui uses this export in its boilerplate code\n// eslint-disable-next-line import/prefer-default-export\nexport function cn(...inputs: ClassValue[]) {\n return twMergeCustom(clsx(inputs));\n}\n","import React from 'react';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport interface InputProps extends React.InputHTMLAttributes {}\n\nexport const Input = React.forwardRef(\n ({ className, type, ...props }, ref) => {\n return (\n \n );\n },\n);\nInput.displayName = 'Input';\n","import { FocusEventHandler, forwardRef, KeyboardEvent, MouseEventHandler } from 'react';\nimport { History } from 'lucide-react';\nimport { Input as ShadInput } from '@/components/shadcn-ui/input';\n\nexport type BookChapterInputProps = {\n handleSearch: (searchString: string) => void;\n handleKeyDown: (event: KeyboardEvent) => void;\n handleOnClick: MouseEventHandler;\n handleSubmit: () => void;\n onFocus?: FocusEventHandler;\n value: string;\n placeholder: string;\n};\n\n// Shadcn Input sets type to \"button\"- HAVE to prop spread before setting type\nconst BookChapterInput = forwardRef(\n (\n { handleSearch, handleKeyDown, handleOnClick, handleSubmit, ...props }: BookChapterInputProps,\n ref,\n ) => {\n return (\n
\n handleSearch(event.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n handleSubmit();\n }\n handleKeyDown(e);\n }}\n onClick={handleOnClick}\n ref={ref}\n />\n {\n // eslint-disable-next-line no-console\n console.log('back in history');\n }}\n />\n
\n );\n },\n);\n\nexport default BookChapterInput;\n","var P = Object.defineProperty;\nvar R = (t, e, s) => e in t ? P(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;\nvar n = (t, e, s) => R(t, typeof e != \"symbol\" ? e + \"\" : e, s);\nclass _ {\n constructor() {\n n(this, \"books\");\n n(this, \"firstSelectedBookNum\");\n n(this, \"lastSelectedBookNum\");\n n(this, \"count\");\n n(this, \"selectedBookNumbers\");\n n(this, \"selectedBookIds\");\n }\n}\nconst N = [\n \"GEN\",\n \"EXO\",\n \"LEV\",\n \"NUM\",\n \"DEU\",\n \"JOS\",\n \"JDG\",\n \"RUT\",\n \"1SA\",\n \"2SA\",\n // 10\n \"1KI\",\n \"2KI\",\n \"1CH\",\n \"2CH\",\n \"EZR\",\n \"NEH\",\n \"EST\",\n \"JOB\",\n \"PSA\",\n \"PRO\",\n // 20\n \"ECC\",\n \"SNG\",\n \"ISA\",\n \"JER\",\n \"LAM\",\n \"EZK\",\n \"DAN\",\n \"HOS\",\n \"JOL\",\n \"AMO\",\n // 30\n \"OBA\",\n \"JON\",\n \"MIC\",\n \"NAM\",\n \"HAB\",\n \"ZEP\",\n \"HAG\",\n \"ZEC\",\n \"MAL\",\n \"MAT\",\n // 40\n \"MRK\",\n \"LUK\",\n \"JHN\",\n \"ACT\",\n \"ROM\",\n \"1CO\",\n \"2CO\",\n \"GAL\",\n \"EPH\",\n \"PHP\",\n // 50\n \"COL\",\n \"1TH\",\n \"2TH\",\n \"1TI\",\n \"2TI\",\n \"TIT\",\n \"PHM\",\n \"HEB\",\n \"JAS\",\n \"1PE\",\n // 60\n \"2PE\",\n \"1JN\",\n \"2JN\",\n \"3JN\",\n \"JUD\",\n \"REV\",\n \"TOB\",\n \"JDT\",\n \"ESG\",\n \"WIS\",\n // 70\n \"SIR\",\n \"BAR\",\n \"LJE\",\n \"S3Y\",\n \"SUS\",\n \"BEL\",\n \"1MA\",\n \"2MA\",\n \"3MA\",\n \"4MA\",\n // 80\n \"1ES\",\n \"2ES\",\n \"MAN\",\n \"PS2\",\n \"ODA\",\n \"PSS\",\n \"JSA\",\n // actual variant text for JOS, now in LXA text\n \"JDB\",\n // actual variant text for JDG, now in LXA text\n \"TBS\",\n // actual variant text for TOB, now in LXA text\n \"SST\",\n // actual variant text for SUS, now in LXA text // 90\n \"DNT\",\n // actual variant text for DAN, now in LXA text\n \"BLT\",\n // actual variant text for BEL, now in LXA text\n \"XXA\",\n \"XXB\",\n \"XXC\",\n \"XXD\",\n \"XXE\",\n \"XXF\",\n \"XXG\",\n \"FRT\",\n // 100\n \"BAK\",\n \"OTH\",\n \"3ES\",\n // Used previously but really should be 2ES\n \"EZA\",\n // Used to be called 4ES, but not actually in any known project\n \"5EZ\",\n // Used to be called 5ES, but not actually in any known project\n \"6EZ\",\n // Used to be called 6ES, but not actually in any known project\n \"INT\",\n \"CNC\",\n \"GLO\",\n \"TDX\",\n // 110\n \"NDX\",\n \"DAG\",\n \"PS3\",\n \"2BA\",\n \"LBA\",\n \"JUB\",\n \"ENO\",\n \"1MQ\",\n \"2MQ\",\n \"3MQ\",\n // 120\n \"REP\",\n \"4BA\",\n \"LAO\"\n], B = [\n \"XXA\",\n \"XXB\",\n \"XXC\",\n \"XXD\",\n \"XXE\",\n \"XXF\",\n \"XXG\",\n \"FRT\",\n \"BAK\",\n \"OTH\",\n \"INT\",\n \"CNC\",\n \"GLO\",\n \"TDX\",\n \"NDX\"\n], O = [\n \"Genesis\",\n \"Exodus\",\n \"Leviticus\",\n \"Numbers\",\n \"Deuteronomy\",\n \"Joshua\",\n \"Judges\",\n \"Ruth\",\n \"1 Samuel\",\n \"2 Samuel\",\n \"1 Kings\",\n \"2 Kings\",\n \"1 Chronicles\",\n \"2 Chronicles\",\n \"Ezra\",\n \"Nehemiah\",\n \"Esther (Hebrew)\",\n \"Job\",\n \"Psalms\",\n \"Proverbs\",\n \"Ecclesiastes\",\n \"Song of Songs\",\n \"Isaiah\",\n \"Jeremiah\",\n \"Lamentations\",\n \"Ezekiel\",\n \"Daniel (Hebrew)\",\n \"Hosea\",\n \"Joel\",\n \"Amos\",\n \"Obadiah\",\n \"Jonah\",\n \"Micah\",\n \"Nahum\",\n \"Habakkuk\",\n \"Zephaniah\",\n \"Haggai\",\n \"Zechariah\",\n \"Malachi\",\n \"Matthew\",\n \"Mark\",\n \"Luke\",\n \"John\",\n \"Acts\",\n \"Romans\",\n \"1 Corinthians\",\n \"2 Corinthians\",\n \"Galatians\",\n \"Ephesians\",\n \"Philippians\",\n \"Colossians\",\n \"1 Thessalonians\",\n \"2 Thessalonians\",\n \"1 Timothy\",\n \"2 Timothy\",\n \"Titus\",\n \"Philemon\",\n \"Hebrews\",\n \"James\",\n \"1 Peter\",\n \"2 Peter\",\n \"1 John\",\n \"2 John\",\n \"3 John\",\n \"Jude\",\n \"Revelation\",\n \"Tobit\",\n \"Judith\",\n \"Esther Greek\",\n \"Wisdom of Solomon\",\n \"Sirach (Ecclesiasticus)\",\n \"Baruch\",\n \"Letter of Jeremiah\",\n \"Song of 3 Young Men\",\n \"Susanna\",\n \"Bel and the Dragon\",\n \"1 Maccabees\",\n \"2 Maccabees\",\n \"3 Maccabees\",\n \"4 Maccabees\",\n \"1 Esdras (Greek)\",\n \"2 Esdras (Latin)\",\n \"Prayer of Manasseh\",\n \"Psalm 151\",\n \"Odes\",\n \"Psalms of Solomon\",\n // WARNING, if you change the spelling of the *obsolete* tag be sure to update\n // IsObsolete routine\n \"Joshua A. *obsolete*\",\n \"Judges B. *obsolete*\",\n \"Tobit S. *obsolete*\",\n \"Susanna Th. *obsolete*\",\n \"Daniel Th. *obsolete*\",\n \"Bel Th. *obsolete*\",\n \"Extra A\",\n \"Extra B\",\n \"Extra C\",\n \"Extra D\",\n \"Extra E\",\n \"Extra F\",\n \"Extra G\",\n \"Front Matter\",\n \"Back Matter\",\n \"Other Matter\",\n \"3 Ezra *obsolete*\",\n \"Apocalypse of Ezra\",\n \"5 Ezra (Latin Prologue)\",\n \"6 Ezra (Latin Epilogue)\",\n \"Introduction\",\n \"Concordance \",\n \"Glossary \",\n \"Topical Index\",\n \"Names Index\",\n \"Daniel Greek\",\n \"Psalms 152-155\",\n \"2 Baruch (Apocalypse)\",\n \"Letter of Baruch\",\n \"Jubilees\",\n \"Enoch\",\n \"1 Meqabyan\",\n \"2 Meqabyan\",\n \"3 Meqabyan\",\n \"Reproof (Proverbs 25-31)\",\n \"4 Baruch (Rest of Baruch)\",\n \"Laodiceans\"\n], S = K();\nfunction g(t, e = !0) {\n return e && (t = t.toUpperCase()), t in S ? S[t] : 0;\n}\nfunction k(t) {\n return g(t) > 0;\n}\nfunction x(t) {\n const e = typeof t == \"string\" ? g(t) : t;\n return e >= 40 && e <= 66;\n}\nfunction T(t) {\n return (typeof t == \"string\" ? g(t) : t) <= 39;\n}\nfunction X(t) {\n return t <= 66;\n}\nfunction V(t) {\n const e = typeof t == \"string\" ? g(t) : t;\n return w(e) && !X(e);\n}\nfunction* L() {\n for (let t = 1; t <= N.length; t++) yield t;\n}\nconst G = 1, A = N.length;\nfunction H() {\n return [\"XXA\", \"XXB\", \"XXC\", \"XXD\", \"XXE\", \"XXF\", \"XXG\"];\n}\nfunction C(t, e = \"***\") {\n const s = t - 1;\n return s < 0 || s >= N.length ? e : N[s];\n}\nfunction I(t) {\n return t <= 0 || t > A ? \"******\" : O[t - 1];\n}\nfunction y(t) {\n return I(g(t));\n}\nfunction w(t) {\n const e = typeof t == \"number\" ? C(t) : t;\n return k(e) && !B.includes(e);\n}\nfunction q(t) {\n const e = typeof t == \"number\" ? C(t) : t;\n return k(e) && B.includes(e);\n}\nfunction U(t) {\n return O[t - 1].includes(\"*obsolete*\");\n}\nfunction K() {\n const t = {};\n for (let e = 0; e < N.length; e++)\n t[N[e]] = e + 1;\n return t;\n}\nconst m = {\n allBookIds: N,\n nonCanonicalIds: B,\n bookIdToNumber: g,\n isBookIdValid: k,\n isBookNT: x,\n isBookOT: T,\n isBookOTNT: X,\n isBookDC: V,\n allBookNumbers: L,\n firstBook: G,\n lastBook: A,\n extraBooks: H,\n bookNumberToId: C,\n bookNumberToEnglishName: I,\n bookIdToEnglishName: y,\n isCanonical: w,\n isExtraMaterial: q,\n isObsolete: U\n};\nvar l = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = \"Unknown\", t[t.Original = 1] = \"Original\", t[t.Septuagint = 2] = \"Septuagint\", t[t.Vulgate = 3] = \"Vulgate\", t[t.English = 4] = \"English\", t[t.RussianProtestant = 5] = \"RussianProtestant\", t[t.RussianOrthodox = 6] = \"RussianOrthodox\", t))(l || {});\nconst h = class h {\n // private versInfo: Versification;\n constructor(e) {\n n(this, \"name\");\n n(this, \"fullPath\");\n n(this, \"isPresent\");\n n(this, \"hasVerseSegments\");\n n(this, \"isCustomized\");\n n(this, \"baseVersification\");\n n(this, \"scriptureBooks\");\n n(this, \"_type\");\n if (e == null)\n throw new Error(\"Argument undefined\");\n typeof e == \"string\" ? (this.name = e, this._type = l[e]) : (this._type = e, this.name = l[e]);\n }\n get type() {\n return this._type;\n }\n equals(e) {\n return !e.type || !this.type ? !1 : e.type === this.type;\n }\n};\nn(h, \"Original\", new h(l.Original)), n(h, \"Septuagint\", new h(l.Septuagint)), n(h, \"Vulgate\", new h(l.Vulgate)), n(h, \"English\", new h(l.English)), n(h, \"RussianProtestant\", new h(l.RussianProtestant)), n(h, \"RussianOrthodox\", new h(l.RussianOrthodox));\nlet c = h;\nfunction E(t, e) {\n const s = e[0];\n for (let r = 1; r < e.length; r++)\n t = t.split(e[r]).join(s);\n return t.split(s);\n}\nvar D = /* @__PURE__ */ ((t) => (t[t.Valid = 0] = \"Valid\", t[t.UnknownVersification = 1] = \"UnknownVersification\", t[t.OutOfRange = 2] = \"OutOfRange\", t[t.VerseOutOfOrder = 3] = \"VerseOutOfOrder\", t[t.VerseRepeated = 4] = \"VerseRepeated\", t))(D || {});\nconst i = class i {\n constructor(e, s, r, a) {\n /** Not yet implemented. */\n n(this, \"firstChapter\");\n /** Not yet implemented. */\n n(this, \"lastChapter\");\n /** Not yet implemented. */\n n(this, \"lastVerse\");\n /** Not yet implemented. */\n n(this, \"hasSegmentsDefined\");\n /** Not yet implemented. */\n n(this, \"text\");\n /** Not yet implemented. */\n n(this, \"BBBCCCVVVS\");\n /** Not yet implemented. */\n n(this, \"longHashCode\");\n /** The versification of the reference. */\n n(this, \"versification\");\n n(this, \"rtlMark\", \"‏\");\n n(this, \"_bookNum\", 0);\n n(this, \"_chapterNum\", 0);\n n(this, \"_verseNum\", 0);\n n(this, \"_verse\");\n if (r == null && a == null)\n if (e != null && typeof e == \"string\") {\n const o = e, u = s != null && s instanceof c ? s : void 0;\n this.setEmpty(u), this.parse(o);\n } else if (e != null && typeof e == \"number\") {\n const o = s != null && s instanceof c ? s : void 0;\n this.setEmpty(o), this._verseNum = e % i.chapterDigitShifter, this._chapterNum = Math.floor(\n e % i.bookDigitShifter / i.chapterDigitShifter\n ), this._bookNum = Math.floor(e / i.bookDigitShifter);\n } else if (s == null)\n if (e != null && e instanceof i) {\n const o = e;\n this._bookNum = o.bookNum, this._chapterNum = o.chapterNum, this._verseNum = o.verseNum, this._verse = o.verse, this.versification = o.versification;\n } else {\n if (e == null) return;\n const o = e instanceof c ? e : i.defaultVersification;\n this.setEmpty(o);\n }\n else\n throw new Error(\"VerseRef constructor not supported.\");\n else if (e != null && s != null && r != null)\n if (typeof e == \"string\" && typeof s == \"string\" && typeof r == \"string\")\n this.setEmpty(a), this.updateInternal(e, s, r);\n else if (typeof e == \"number\" && typeof s == \"number\" && typeof r == \"number\")\n this._bookNum = e, this._chapterNum = s, this._verseNum = r, this.versification = a ?? i.defaultVersification;\n else\n throw new Error(\"VerseRef constructor not supported.\");\n else\n throw new Error(\"VerseRef constructor not supported.\");\n }\n /**\n * Determines if the verse string is in a valid format (does not consider versification).\n */\n static isVerseParseable(e) {\n return e.length > 0 && \"0123456789\".includes(e[0]) && !e.endsWith(this.verseRangeSeparator) && !e.endsWith(this.verseSequenceIndicator);\n }\n /**\n * Tries to parse the specified string into a verse reference.\n * @param str - The string to attempt to parse.\n * @returns success: `true` if the specified string was successfully parsed, `false` otherwise.\n * @returns verseRef: The result of the parse if successful, or empty VerseRef if it failed\n */\n static tryParse(e) {\n let s;\n try {\n return s = new i(e), { success: !0, verseRef: s };\n } catch (r) {\n if (r instanceof v)\n return s = new i(), { success: !1, verseRef: s };\n throw r;\n }\n }\n /**\n * Gets the reference as a comparable integer where the book, chapter, and verse each occupy 3\n * digits.\n * @param bookNum - Book number (this is 1-based, not an index).\n * @param chapterNum - Chapter number.\n * @param verseNum - Verse number.\n * @returns The reference as a comparable integer where the book, chapter, and verse each occupy 3\n * digits.\n */\n static getBBBCCCVVV(e, s, r) {\n return e % i.bcvMaxValue * i.bookDigitShifter + (s >= 0 ? s % i.bcvMaxValue * i.chapterDigitShifter : 0) + (r >= 0 ? r % i.bcvMaxValue : 0);\n }\n /**\n * Deserializes a serialized VerseRef.\n * @param serializedVerseRef - Serialized VerseRef to create from.\n * @returns the deserialized VerseRef.\n */\n static fromJSON(e) {\n const { book: s, chapterNum: r, verseNum: a, verse: o, versificationStr: u } = e, f = o || a.toString();\n let d;\n return u && (d = new c(u)), s ? new i(s, r.toString(), f, d) : new i();\n }\n /**\n * Parses a verse string and gets the leading numeric portion as a number.\n * @param verseStr - verse string to parse\n * @returns true if the entire string could be parsed as a single, simple verse number (1-999);\n * false if the verse string represented a verse bridge, contained segment letters, or was invalid\n */\n static tryGetVerseNum(e) {\n let s;\n if (!e)\n return s = -1, { success: !0, vNum: s };\n s = 0;\n let r;\n for (let a = 0; a < e.length; a++) {\n if (r = e[a], r < \"0\" || r > \"9\")\n return a === 0 && (s = -1), { success: !1, vNum: s };\n if (s = s * 10 + +r - 0, s > i.bcvMaxValue)\n return s = -1, { success: !1, vNum: s };\n }\n return { success: !0, vNum: s };\n }\n /**\n * Checks to see if a VerseRef hasn't been set - all values are the default.\n */\n get isDefault() {\n return this.bookNum === 0 && this.chapterNum === 0 && this.verseNum === 0 && this.versification == null;\n }\n /**\n * Gets whether the verse contains multiple verses.\n */\n get hasMultiple() {\n return this._verse != null && (this._verse.includes(i.verseRangeSeparator) || this._verse.includes(i.verseSequenceIndicator));\n }\n /**\n * Gets or sets the book of the reference. Book is the 3-letter abbreviation in capital letters,\n * e.g. `'MAT'`.\n */\n get book() {\n return m.bookNumberToId(this.bookNum, \"\");\n }\n set book(e) {\n this.bookNum = m.bookIdToNumber(e);\n }\n /**\n * Gets or sets the chapter of the reference,. e.g. `'3'`.\n */\n get chapter() {\n return this.isDefault || this._chapterNum < 0 ? \"\" : this._chapterNum.toString();\n }\n set chapter(e) {\n const s = +e;\n this._chapterNum = Number.isInteger(s) ? s : -1;\n }\n /**\n * Gets or sets the verse of the reference, including range, segments, and sequences, e.g. `'4'`,\n * or `'4b-5a, 7'`.\n */\n get verse() {\n return this._verse != null ? this._verse : this.isDefault || this._verseNum < 0 ? \"\" : this._verseNum.toString();\n }\n set verse(e) {\n const { success: s, vNum: r } = i.tryGetVerseNum(e);\n this._verse = s ? void 0 : e.replace(this.rtlMark, \"\"), this._verseNum = r, !(this._verseNum >= 0) && ({ vNum: this._verseNum } = i.tryGetVerseNum(this._verse));\n }\n /**\n * Get or set Book based on book number, e.g. `42`.\n */\n get bookNum() {\n return this._bookNum;\n }\n set bookNum(e) {\n if (e <= 0 || e > m.lastBook)\n throw new v(\n \"BookNum must be greater than zero and less than or equal to last book\"\n );\n this._bookNum = e;\n }\n /**\n * Gets or sets the chapter number, e.g. `3`. `-1` if not valid.\n */\n get chapterNum() {\n return this._chapterNum;\n }\n set chapterNum(e) {\n this.chapterNum = e;\n }\n /**\n * Gets or sets verse start number, e.g. `4`. `-1` if not valid.\n */\n get verseNum() {\n return this._verseNum;\n }\n set verseNum(e) {\n this._verseNum = e;\n }\n /**\n * String representing the versification (should ONLY be used for serialization/deserialization).\n *\n * @remarks This is for backwards compatibility when ScrVers was an enumeration.\n */\n get versificationStr() {\n var e;\n return (e = this.versification) == null ? void 0 : e.name;\n }\n set versificationStr(e) {\n this.versification = this.versification != null ? new c(e) : void 0;\n }\n /**\n * Determines if the reference is valid.\n */\n get valid() {\n return this.validStatus === 0;\n }\n /**\n * Get the valid status for this reference.\n */\n get validStatus() {\n return this.validateVerse(i.verseRangeSeparators, i.verseSequenceIndicators);\n }\n /**\n * Gets the reference as a comparable integer where the book,\n * chapter, and verse each occupy three digits and the verse is 0.\n */\n get BBBCCC() {\n return i.getBBBCCCVVV(this._bookNum, this._chapterNum, 0);\n }\n /**\n * Gets the reference as a comparable integer where the book,\n * chapter, and verse each occupy three digits. If verse is not null\n * (i.e., this reference represents a complex reference with verse\n * segments or bridge) this cannot be used for an exact comparison.\n */\n get BBBCCCVVV() {\n return i.getBBBCCCVVV(this._bookNum, this._chapterNum, this._verseNum);\n }\n /**\n * Gets whether the verse is defined as an excluded verse in the versification.\n * Does not handle verse ranges.\n */\n // eslint-disable-next-line @typescript-eslint/class-literal-property-style\n get isExcluded() {\n return !1;\n }\n /**\n * Parses the reference in the specified string.\n * Optionally versification can follow reference as in GEN 3:11/4\n * Throw an exception if\n * - invalid book name\n * - chapter number is missing or not a number\n * - verse number is missing or does not start with a number\n * - versification is invalid\n * @param verseStr - string to parse e.g. 'MAT 3:11'\n */\n parse(e) {\n if (e = e.replace(this.rtlMark, \"\"), e.includes(\"/\")) {\n const o = e.split(\"/\");\n if (e = o[0], o.length > 1)\n try {\n const u = +o[1].trim();\n this.versification = new c(l[u]);\n } catch {\n throw new v(\"Invalid reference : \" + e);\n }\n }\n const s = e.trim().split(\" \");\n if (s.length !== 2)\n throw new v(\"Invalid reference : \" + e);\n const r = s[1].split(\":\"), a = +r[0];\n if (r.length !== 2 || m.bookIdToNumber(s[0]) === 0 || !Number.isInteger(a) || a < 0 || !i.isVerseParseable(r[1]))\n throw new v(\"Invalid reference : \" + e);\n this.updateInternal(s[0], r[0], r[1]);\n }\n /**\n * Simplifies this verse ref so that it has no bridging of verses or\n * verse segments like `'1a'`.\n */\n simplify() {\n this._verse = void 0;\n }\n /**\n * Makes a clone of the reference.\n *\n * @returns The cloned VerseRef.\n */\n clone() {\n return new i(this);\n }\n toString() {\n const e = this.book;\n return e === \"\" ? \"\" : `${e} ${this.chapter}:${this.verse}`;\n }\n toJSON() {\n let e = this.verse;\n (e === \"\" || e === this.verseNum.toString()) && (e = void 0);\n const s = {\n book: this.book,\n chapterNum: this.chapterNum,\n verseNum: this.verseNum,\n verse: e,\n versificationStr: this.versificationStr\n };\n return e || delete s.verse, s;\n }\n /**\n * Compares this `VerseRef` with supplied one.\n * @param verseRef - object to compare this one to.\n * @returns `true` if this `VerseRef` is equal to the supplied one, `false` otherwise.\n */\n equals(e) {\n return e instanceof i ? e._bookNum === this._bookNum && e._chapterNum === this._chapterNum && e._verseNum === this._verseNum && e.verse === this.verse && (e.versification == null && this.versification == null || e.versification != null && this.versification != null && e.versification.equals(this.versification)) : !1;\n }\n /**\n * Enumerate all individual verses contained in a VerseRef.\n * Verse ranges are indicated by \"-\" and consecutive verses by \",\"s.\n * Examples:\n * GEN 1:2 returns GEN 1:2\n * GEN 1:1a-3b,5 returns GEN 1:1a, GEN 1:2, GEN 1:3b, GEN 1:5\n * GEN 1:2a-2c returns //! ??????\n *\n * @param specifiedVersesOnly - if set to true return only verses that are\n * explicitly specified only, not verses within a range. Defaults to `false`.\n * @param verseRangeSeparators - Verse range separators.\n * Defaults to `VerseRef.verseRangeSeparators`.\n * @param verseSequenceSeparators - Verse sequence separators.\n * Defaults to `VerseRef.verseSequenceIndicators`.\n * @returns An array of all single verse references in this VerseRef.\n */\n allVerses(e = !1, s = i.verseRangeSeparators, r = i.verseSequenceIndicators) {\n if (this._verse == null || this.chapterNum <= 0)\n return [this.clone()];\n const a = [], o = E(this._verse, r);\n for (const u of o.map((f) => E(f, s))) {\n const f = this.clone();\n f.verse = u[0];\n const d = f.verseNum;\n if (a.push(f), u.length > 1) {\n const b = this.clone();\n if (b.verse = u[1], !e)\n for (let p = d + 1; p < b.verseNum; p++) {\n const J = new i(\n this._bookNum,\n this._chapterNum,\n p,\n this.versification\n );\n this.isExcluded || a.push(J);\n }\n a.push(b);\n }\n }\n return a;\n }\n /**\n * Validates a verse number using the supplied separators rather than the defaults.\n */\n validateVerse(e, s) {\n if (!this.verse)\n return this.internalValid;\n let r = 0;\n for (const a of this.allVerses(!0, e, s)) {\n const o = a.internalValid;\n if (o !== 0)\n return o;\n const u = a.BBBCCCVVV;\n if (r > u)\n return 3;\n if (r === u)\n return 4;\n r = u;\n }\n return 0;\n }\n /**\n * Gets whether a single verse reference is valid.\n */\n get internalValid() {\n return this.versification == null ? 1 : this._bookNum <= 0 || this._bookNum > m.lastBook ? 2 : (m.isCanonical(this._bookNum), 0);\n }\n setEmpty(e = i.defaultVersification) {\n this._bookNum = 0, this._chapterNum = -1, this._verse = void 0, this.versification = e;\n }\n updateInternal(e, s, r) {\n this.bookNum = m.bookIdToNumber(e), this.chapter = s, this.verse = r;\n }\n};\nn(i, \"defaultVersification\", c.English), n(i, \"verseRangeSeparator\", \"-\"), n(i, \"verseSequenceIndicator\", \",\"), n(i, \"verseRangeSeparators\", [i.verseRangeSeparator]), n(i, \"verseSequenceIndicators\", [i.verseSequenceIndicator]), n(i, \"chapterDigitShifter\", 1e3), n(i, \"bookDigitShifter\", i.chapterDigitShifter * i.chapterDigitShifter), n(i, \"bcvMaxValue\", i.chapterDigitShifter - 1), /**\n * The valid status of the VerseRef.\n */\nn(i, \"ValidStatusType\", D);\nlet M = i;\nclass v extends Error {\n}\nexport {\n _ as BookSet,\n m as Canon,\n c as ScrVers,\n l as ScrVersType,\n M as VerseRef,\n v as VerseRefException\n};\n//# sourceMappingURL=index.es.js.map\n","import React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\n\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nexport type DropdownMenuSubTriggerProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.SubTrigger\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuSubContentProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.SubContent\n> & {\n className?: string;\n};\n\nexport type DropdownMenuContentProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Content\n> & {\n className?: string;\n sideOffset?: number;\n};\n\nexport type DropdownMenuItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Item\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.CheckboxItem\n> & {\n className?: string;\n checked?: boolean;\n};\n\nexport type DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.RadioItem\n> & {\n className?: string;\n};\n\nexport type DropdownMenuLabelProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Label\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Separator\n> & {\n className?: string;\n};\n\nexport type DropdownMenuShortcutProps = React.HTMLAttributes & {\n className?: string;\n};\n\nexport const DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef,\n DropdownMenuSubTriggerProps\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nexport const DropdownMenuSubContent = React.forwardRef<\n React.ElementRef,\n DropdownMenuSubContentProps\n>(({ className, ...props }, ref) => (\n \n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nexport const DropdownMenuContent = React.forwardRef<\n React.ElementRef,\n DropdownMenuContentProps\n>(({ className, sideOffset = 4, ...props }, ref) => (\n \n \n \n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/**\n * TODO: fix: direction is not automatically handled by this component, so that shortcuts are\n * display always to the right\n */\nexport const DropdownMenuItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuItemProps\n>(({ className, inset, ...props }, ref) => (\n \n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nexport const DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nexport const DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nexport const DropdownMenuLabel = React.forwardRef<\n React.ElementRef,\n DropdownMenuLabelProps\n>(({ className, inset, ...props }, ref) => (\n \n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ElementRef,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n \n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nexport function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return (\n \n );\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n","import { Canon } from '@sillsdev/scripture';\nimport { PropsWithChildren, KeyboardEvent, forwardRef } from 'react';\nimport { DropdownMenuItem as ShadDropdownMenuItem } from '@/components/shadcn-ui/dropdown-menu';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport type BookType = 'OT' | 'NT' | 'DC';\n\ntype BookMenuItemProps = PropsWithChildren<{\n /** String id of book */\n bookId: string;\n /** Callback to run when a book menu item is selected */\n handleSelectBook: () => void;\n /** Indicates if this menu item is currently selected */\n isSelected: boolean;\n /** Function that is called upon highlighting a book in the dropdown menu */\n handleHighlightBook: () => void;\n /**\n * Function that is called on pressing a key\n *\n * @param event Event that contains information about the key stroke\n */\n handleKeyDown: (event: KeyboardEvent) => void;\n /**\n * Type of book associated with this menu item, coordinates color labels ? Mock up has the labels\n * coordinated to genre\n */\n bookType: BookType;\n}>;\n\nconst BookMenuItem = forwardRef(\n (\n {\n bookId,\n handleSelectBook,\n isSelected,\n handleHighlightBook,\n handleKeyDown,\n bookType,\n children,\n }: BookMenuItemProps,\n ref,\n ) => {\n return (\n {\n // preventDefault() here prevents the entire dropdown menu from closing when selecting this item\n event.preventDefault();\n handleSelectBook();\n }}\n onKeyDown={(event: KeyboardEvent) => {\n handleKeyDown(event);\n }}\n onFocus={handleHighlightBook}\n onMouseMove={handleHighlightBook}\n >\n \n {Canon.bookIdToEnglishName(bookId)}\n \n {isSelected &&
{children}
}\n \n );\n },\n);\n\nexport default BookMenuItem;\n","import { cn } from '@/utils/shadcn-ui.util';\nimport { useCallback } from 'react';\n\nexport type ChapterSelectProps = {\n /**\n * Callback to run when a chapter div is selected\n *\n * @param chapterNumber Number of the chapter that has been selected\n */\n handleSelectChapter: (chapterNumber: number) => void;\n /** The highest chapter number in the book (of course equal to number of chapters in the book) */\n endChapter: number;\n /** The chapter number that is currently selected */\n activeChapter: number;\n /** The chapter number that is currently highlighted using keyboard or mouse navigation */\n highlightedChapter: number;\n /**\n * Callback to run when a chapter is highlighted by the user\n *\n * @param chapterNumber The chapter that is highlighted\n */\n handleHighlightedChapter: (chapterNumber: number) => void;\n};\n\nfunction ChapterSelect({\n handleSelectChapter,\n endChapter,\n activeChapter,\n highlightedChapter,\n handleHighlightedChapter,\n}: ChapterSelectProps) {\n const chapters = Array.from({ length: endChapter }, (_, i) => i + 1);\n\n const handleMouse = useCallback(\n (chapterNumber: number) => {\n handleHighlightedChapter(chapterNumber);\n },\n [handleHighlightedChapter],\n );\n\n return (\n
\n {chapters.map((chapter) => (\n {\n event.preventDefault();\n event.stopPropagation();\n handleSelectChapter(chapter);\n }}\n role=\"button\"\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n handleSelectChapter(chapter);\n }\n }}\n tabIndex={0}\n onMouseMove={() => handleMouse(chapter)}\n >\n {chapter}\n
\n ))}\n
\n );\n}\n\nexport default ChapterSelect;\n","import { DropdownMenuLabel as ShadDropdownMenuLabel } from '@/components/shadcn-ui/dropdown-menu';\nimport { Bookmark, Clock, ArrowDownWideNarrow } from 'lucide-react';\n\nexport type GoToMenuItemProps = {\n handleSort: () => void;\n handleLocationHistory: () => void;\n handleBookmarks: () => void;\n};\n\nfunction GoToMenuItem({ handleSort, handleLocationHistory, handleBookmarks }: GoToMenuItemProps) {\n return (\n \n

Go To

\n
\n \n \n \n
\n
\n );\n}\n\nexport default GoToMenuItem;\n","import BookChapterInput from '@/components/advanced/book-chapter-control/book-chapter-input.component';\nimport BookMenuItem, {\n BookType,\n} from '@/components/advanced/book-chapter-control/book-menu-item.component';\nimport ChapterSelect from '@/components/advanced/book-chapter-control/chapter-select.component';\nimport GoToMenuItem from '@/components/advanced/book-chapter-control/go-to-menu-item.component';\nimport {\n DropdownMenu as ShadDropdownMenu,\n DropdownMenuContent as ShadDropdownMenuContent,\n DropdownMenuLabel as ShadDropdownMenuLabel,\n DropdownMenuSeparator as ShadDropdownMenuSeparator,\n DropdownMenuTrigger as ShadDropdownMenuTrigger,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport { Canon } from '@sillsdev/scripture';\nimport { ScriptureReference, getChaptersForBook } from 'platform-bible-utils';\nimport {\n KeyboardEvent as ReactKeyboardEvent,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\ntype BookTypeLabels = {\n [bookType in BookType]: string;\n};\ntype BookChapterControlProps = {\n scrRef: ScriptureReference;\n handleSubmit: (scrRef: ScriptureReference) => void;\n};\n\nconst ALL_BOOK_IDS = Canon.allBookIds;\nconst BOOK_TYPE_LABELS: BookTypeLabels = {\n OT: 'Old Testament',\n NT: 'New Testament',\n DC: 'Deuterocanon',\n};\nconst BOOK_TYPE_ARRAY: BookType[] = ['OT', 'NT', 'DC'];\n// This is the height of three menu items to offset scrolling to the selected menu item\n// If you use menuItemRef.clientHeight- includes height of chapter div which is too big\nconst SCROLL_OFFSET = 32 + 32 + 32;\nconst SEARCH_QUERY_FORMATS = [\n /^(\\w+)$/i, // Matches a single word (book name or id)\n /^(\\w+)(?:\\s(\\d+))$/i, // Matches a word followed by a chapter number\n /^(\\w+)(?:\\s(\\d+):(\\d+))$/i, // Matches a word followed by a chapter and verse number\n];\nconst fetchGroupedBooks = (bookType: BookType) => {\n const groupedBooks = {\n OT: ALL_BOOK_IDS.filter((bookId) => Canon.isBookOT(bookId)),\n NT: ALL_BOOK_IDS.filter((bookId) => Canon.isBookNT(bookId)),\n DC: ALL_BOOK_IDS.filter((bookId) => Canon.isBookDC(bookId)),\n };\n return groupedBooks[bookType];\n};\nconst fetchEndChapter = (bookId: string) => {\n // getChaptersForBook returns -1 if not found in scrBookData\n // scrBookData only includes OT and NT, so all DC will return -1\n return getChaptersForBook(Canon.bookIdToNumber(bookId));\n};\n\n/**\n * Gets all of the English names from book ids\n *\n * @returns String[]\n */\nfunction getAllEnglishNames(): string[] {\n const allEnglishNames = ALL_BOOK_IDS.map((bookId) => {\n return Canon.bookIdToEnglishName(bookId);\n });\n return allEnglishNames;\n}\n\n/**\n * Determines if bookName is in allEnglishNames\n *\n * @param bookName Book English name\n * @returns True if bookName is included, false otherwise\n */\nfunction isValidBookEnglishName(bookName: string): boolean {\n return getAllEnglishNames().includes(bookName);\n}\n\n/**\n * Gets a bookId from given English name\n *\n * @param bookName Book English name\n * @returns BookId of provided bookName, undefined otherwise\n */\nfunction getBookIdFromEnglishName(bookName: string): string | undefined {\n // Convert bookName to lowercase and then capitalize the first letter\n const formattedBookName = bookName.toLowerCase().replace(/^\\w/, (c) => c.toUpperCase());\n\n if (isValidBookEnglishName(formattedBookName)) {\n const matchingBookId = ALL_BOOK_IDS.find((bookId) => {\n return Canon.bookIdToEnglishName(bookId) === formattedBookName;\n });\n return matchingBookId;\n }\n\n return undefined;\n}\n\nfunction BookChapterControl({ scrRef, handleSubmit }: BookChapterControlProps) {\n const [searchQuery, setSearchQuery] = useState('');\n const [selectedBookId, setSelectedBookId] = useState(\n Canon.bookNumberToId(scrRef.bookNum),\n );\n const [highlightedChapter, setHighlightedChapter] = useState(scrRef.chapterNum ?? 0);\n const [highlightedBookId, setHighlightedBookId] = useState(\n Canon.bookNumberToId(scrRef.bookNum),\n );\n const [isContentOpen, setIsContentOpen] = useState(false);\n const [isContentOpenDelayed, setIsContentOpenDelayed] = useState(isContentOpen);\n\n // This ref will always be defined\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const inputRef = useRef(undefined!);\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const contentRef = useRef(undefined!);\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const menuItemRef = useRef(undefined!);\n\n const fetchFilteredBooks = useCallback(\n (bookType: BookType) => {\n return fetchGroupedBooks(bookType).filter((bookId: string) => {\n const englishNameLowerCase = Canon.bookIdToEnglishName(bookId).toLowerCase();\n const normalizedQuery = searchQuery.replace(/[^a-zA-Z]/g, '').toLowerCase();\n return (\n englishNameLowerCase.includes(normalizedQuery) || // Match book name\n bookId.toLowerCase().includes(normalizedQuery) // Match book ID\n );\n });\n },\n [searchQuery],\n );\n\n const handleSearchInput = (searchString: string) => {\n setSearchQuery(searchString);\n };\n\n /**\n * Whether to prevent radix's logic from closing the dropdown. This is important because radix\n * tries to close the dropdown when the input first focuses, and we don't want it to do that. But\n * we don't want to prevent the dropdown from closing when we click away from the input, so we\n * don't want to just keep it open if the input is focused\n */\n const shouldPreventAutoClosing = useRef(false);\n\n const controlMenuState = useCallback((open: boolean) => {\n if (shouldPreventAutoClosing.current) {\n shouldPreventAutoClosing.current = false;\n return;\n }\n setIsContentOpen(open);\n }, []);\n\n const updateReference = useCallback(\n (bookId: string, shouldClose: boolean, chapter?: number, verse?: number) => {\n setHighlightedChapter(\n Canon.bookNumberToId(scrRef.bookNum) !== bookId ? 1 : scrRef.chapterNum,\n );\n\n if (shouldClose || fetchEndChapter(bookId) === -1) {\n handleSubmit({\n bookNum: Canon.bookIdToNumber(bookId),\n chapterNum: chapter || 1,\n verseNum: verse || 1,\n });\n\n setIsContentOpen(false);\n setSearchQuery('');\n return;\n }\n\n setSelectedBookId(selectedBookId !== bookId ? bookId : '');\n setIsContentOpen(!shouldClose);\n },\n [handleSubmit, scrRef.bookNum, scrRef.chapterNum, selectedBookId],\n );\n\n const handleSelectChapter = (chapterNumber: number) => {\n if (chapterNumber <= 0 || chapterNumber > fetchEndChapter(selectedBookId)) {\n return;\n }\n updateReference(selectedBookId, true, chapterNumber);\n };\n\n const handleInputSubmit = useCallback(() => {\n SEARCH_QUERY_FORMATS.forEach((format) => {\n const matches = searchQuery.match(format);\n if (matches) {\n // Book should be a bookId or an english name\n const [book, chapter = undefined, verse = undefined] = matches.slice(1);\n const englishName = getBookIdFromEnglishName(book);\n\n if (Canon.isBookIdValid(book) || englishName) {\n updateReference(\n englishName ?? book,\n true,\n chapter ? parseInt(chapter, 10) : 1,\n verse ? parseInt(verse, 10) : 1,\n );\n }\n }\n });\n }, [updateReference, searchQuery]);\n\n const handleKeyDownInput = useCallback(\n (event: ReactKeyboardEvent) => {\n if (!isContentOpen) {\n setIsContentOpen(true);\n } else if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n if (\n typeof menuItemRef !== 'undefined' &&\n // Ref uses null\n // eslint-disable-next-line no-null/no-null\n menuItemRef.current !== null\n ) {\n menuItemRef.current.focus();\n } else if (\n typeof contentRef !== 'undefined' &&\n // Ref uses null\n // eslint-disable-next-line no-null/no-null\n contentRef.current !== null\n ) {\n contentRef.current.focus();\n }\n event.preventDefault();\n }\n },\n [isContentOpen],\n );\n\n const handleKeyDownContent = (event: ReactKeyboardEvent) => {\n // When the dropdown menu has focus, key strokes should give focus to the input component,\n // unless they're navigation keys (arrows and enter)\n const { key } = event;\n if (\n key === 'ArrowRight' ||\n key === 'ArrowLeft' ||\n key === 'ArrowDown' ||\n key === 'ArrowUp' ||\n key === 'Enter'\n ) {\n return;\n }\n\n inputRef.current.dispatchEvent(new KeyboardEvent('keydown', { key }));\n inputRef.current.focus();\n };\n\n const handleKeyDownMenuItem = (event: ReactKeyboardEvent) => {\n const { key } = event;\n if (highlightedBookId === selectedBookId) {\n if (key === 'Enter') {\n event.preventDefault();\n updateReference(selectedBookId, true, highlightedChapter);\n return;\n }\n\n let chapterOffSet = 0;\n if (key === 'ArrowRight') {\n if (highlightedChapter < fetchEndChapter(highlightedBookId)) {\n chapterOffSet = 1;\n } else {\n event.preventDefault();\n return;\n }\n } else if (key === 'ArrowLeft') {\n if (highlightedChapter > 1) {\n chapterOffSet = -1;\n } else {\n event.preventDefault();\n return;\n }\n } else if (key === 'ArrowDown') {\n chapterOffSet = 6;\n } else if (key === 'ArrowUp') {\n chapterOffSet = -6;\n }\n if (\n highlightedChapter + chapterOffSet <= 0 ||\n highlightedChapter + chapterOffSet > fetchEndChapter(highlightedBookId)\n ) {\n setHighlightedChapter(0);\n } else if (chapterOffSet !== 0) {\n setHighlightedChapter(highlightedChapter + chapterOffSet);\n event.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n if (selectedBookId === highlightedBookId) {\n if (selectedBookId === Canon.bookNumberToId(scrRef.bookNum)) {\n setHighlightedChapter(scrRef.chapterNum);\n } else {\n setHighlightedChapter(1);\n }\n } else {\n setHighlightedChapter(0);\n }\n }, [highlightedBookId, scrRef.bookNum, scrRef.chapterNum, selectedBookId]);\n\n // The purpose of these useLayoutEffects and timeout is to delay the scroll just\n // enough so that the refs are defined and available when they are used after the timeout\n useLayoutEffect(() => {\n setIsContentOpenDelayed(isContentOpen);\n }, [isContentOpen]);\n\n useLayoutEffect(() => {\n const scrollTimeout = setTimeout(() => {\n if (isContentOpenDelayed && contentRef.current && menuItemRef.current) {\n const menuItemOffsetTop = menuItemRef.current.offsetTop;\n const scrollPosition = menuItemOffsetTop - SCROLL_OFFSET;\n contentRef.current.scrollTo({ top: scrollPosition, behavior: 'instant' });\n }\n }, 10);\n return () => {\n clearTimeout(scrollTimeout);\n };\n }, [isContentOpenDelayed]);\n\n return (\n
\n \n \n {\n setSelectedBookId(Canon.bookNumberToId(scrRef.bookNum));\n setHighlightedBookId(Canon.bookNumberToId(scrRef.bookNum));\n setHighlightedChapter(scrRef.chapterNum > 0 ? scrRef.chapterNum : 0);\n setIsContentOpen(true);\n inputRef.current.focus();\n }}\n onFocus={() => {\n // Radix thinks we want to close because the input is being focused. Prevent that\n shouldPreventAutoClosing.current = true;\n }}\n handleSubmit={handleInputSubmit}\n placeholder={`${Canon.bookNumberToEnglishName(scrRef.bookNum)} ${scrRef.chapterNum}:${scrRef.verseNum}`}\n />\n \n \n console.log('sorting')}\n handleLocationHistory={() => console.log('location history')}\n handleBookmarks={() => console.log('bookmarks')}\n />\n {BOOK_TYPE_ARRAY.map(\n (bookType, bookTypeIndex) =>\n fetchFilteredBooks(bookType).length > 0 && (\n
\n \n {BOOK_TYPE_LABELS[bookType]}\n \n\n {fetchFilteredBooks(bookType).map((bookId) => (\n
\n updateReference(bookId, false)}\n isSelected={selectedBookId === bookId}\n handleHighlightBook={() => setHighlightedBookId(bookId)}\n handleKeyDown={handleKeyDownMenuItem}\n bookType={bookType}\n ref={(element: HTMLDivElement) => {\n if (selectedBookId === bookId) menuItemRef.current = element;\n }}\n >\n {\n setHighlightedChapter(chapterNumber);\n }}\n />\n \n
\n ))}\n {BOOK_TYPE_ARRAY.length - 1 !== bookTypeIndex ? (\n \n ) : undefined}\n
\n ),\n )}\n \n
\n
\n );\n}\n\nexport default BookChapterControl;\n","import React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const buttonVariants = cva(\n 'pr-twp tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50',\n {\n variants: {\n variant: {\n default: 'tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/90',\n destructive: 'tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/90',\n outline:\n 'tw-border tw-border-input tw-bg-background hover:tw-bg-accent hover:tw-text-accent-foreground',\n secondary: 'tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80',\n ghost: 'hover:tw-bg-accent hover:tw-text-accent-foreground',\n link: 'tw-text-primary tw-underline-offset-4 hover:tw-underline',\n },\n size: {\n default: 'tw-h-10 tw-px-4 tw-py-2',\n sm: 'tw-h-9 tw-rounded-md tw-px-3',\n lg: 'tw-h-11 tw-rounded-md tw-px-8',\n icon: 'tw-h-10 tw-w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes,\n VariantProps {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n \n );\n },\n);\nButton.displayName = 'Button';\n","import React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst labelVariants = cva(\n 'tw-text-sm tw-font-medium tw-leading-none peer-disabled:tw-cursor-not-allowed peer-disabled:tw-opacity-70',\n);\n\nexport const Label = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & VariantProps\n>(({ className, ...props }, ref) => (\n \n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n","import React from 'react';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n \n \n \n \n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n","import React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n \n \n \n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent };\n","import React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n {children}\n \n \n Close\n \n \n \n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nfunction DialogHeader({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nDialogHeader.displayName = 'DialogHeader';\n\nfunction DialogFooter({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n","import React from 'react';\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Dialog, DialogContent } from '@/components/shadcn-ui/dialog';\n\nconst Command = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nfunction CommandDialog({ children, ...props }: CommandDialogProps) {\n return (\n \n \n \n {children}\n \n \n \n );\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n
\n \n \n
\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>((props, ref) => (\n \n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nfunction CommandShortcut({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","import { ReactNode, useState } from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/shadcn-ui/popover';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/shadcn-ui/command';\nimport { PopoverProps } from '@radix-ui/react-popover';\n\nexport type ComboBoxLabelOption = { label: string };\nexport type ComboBoxOption = string | number | ComboBoxLabelOption;\n\nexport type ComboBoxProps = {\n /** Optional unique identifier */\n id?: string;\n /** Text label title for combobox */\n /** List of available options for the dropdown menu */\n options?: readonly T[];\n /** Additional css classes to help with unique styling of the combo box */\n className?: string;\n /**\n * The selected value that the combo box currently holds. Must be shallow equal to one of the\n * options entries.\n */\n value?: T;\n /** Triggers when content of textfield is changed */\n onChange?: (newValue: T) => void;\n /** Used to determine the string value for a given option. */\n getOptionLabel?: (option: ComboBoxOption) => string;\n /** Icon to be displayed on the trigger */\n icon?: ReactNode;\n /** Text displayed on button if `value` is undefined */\n buttonPlaceholder?: string;\n /** Placeholder text for text field */\n textPlaceholder?: string;\n /** Text to display when no options match input */\n commandEmptyMessage?: string;\n /** Variant of button */\n buttonVariant?: ButtonProps['variant'];\n /** Control how the popover menu should be aligned. Defaults to start */\n alignDropDown?: 'start' | 'center' | 'end';\n /** Text direction ltr or rtl */\n dir?: Direction;\n /** Optional boolean to set if trigger should be disabled */\n isDisabled?: boolean;\n} & PopoverProps;\n\ntype Direction = 'ltr' | 'rtl';\n\nfunction getOptionLabelDefault(option: ComboBoxOption): string {\n if (typeof option === 'string') {\n return option;\n }\n if (typeof option === 'number') {\n return option.toString();\n }\n return option.label;\n}\n\n/**\n * Autocomplete input and command palette with a list of suggestions.\n *\n * Thanks to Shadcn for heavy inspiration and documentation\n * https://ui.shadcn.com/docs/components/combobox\n */\nfunction ComboBox({\n id,\n options = [],\n className,\n value,\n onChange = () => {},\n getOptionLabel = getOptionLabelDefault,\n icon = undefined,\n buttonPlaceholder = '',\n textPlaceholder = '',\n commandEmptyMessage = 'No option found',\n buttonVariant = 'outline',\n alignDropDown = 'start',\n dir = 'ltr',\n isDisabled = false,\n ...props\n}: ComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n return (\n \n \n \n
\n {icon &&
{icon}
}\n \n {value ? getOptionLabel(value) : buttonPlaceholder}\n \n
\n\n \n \n
\n \n \n \n {commandEmptyMessage}\n \n {options.map((option) => (\n {\n onChange(option);\n setOpen(false);\n }}\n >\n \n {getOptionLabel(option)}\n \n ))}\n \n \n \n
\n );\n}\n\nexport default ComboBox;\n","import { useMemo } from 'react';\nimport ComboBox from '@/components/basics/combo-box.component';\nimport { Label } from '@/components/shadcn-ui/label';\n\nexport type ChapterRangeSelectorProps = {\n startChapter: number;\n endChapter: number;\n handleSelectStartChapter: (chapter: number) => void;\n handleSelectEndChapter: (chapter: number) => void;\n isDisabled?: boolean;\n chapterCount: number;\n};\n\nexport default function ChapterRangeSelector({\n startChapter,\n endChapter,\n handleSelectStartChapter,\n handleSelectEndChapter,\n isDisabled = false,\n chapterCount,\n}: ChapterRangeSelectorProps) {\n const chapterOptions = useMemo(\n () => Array.from({ length: chapterCount }, (_, index) => index + 1),\n [chapterCount],\n );\n\n const onChangeStartChapter = (value: number) => {\n handleSelectStartChapter(value);\n if (value > endChapter) {\n handleSelectEndChapter(value);\n }\n };\n\n const onChangeEndChapter = (value: number) => {\n handleSelectEndChapter(value);\n if (value < startChapter) {\n handleSelectStartChapter(value);\n }\n };\n\n return (\n <>\n \n option.toString()}\n value={startChapter}\n />\n\n \n option.toString()}\n value={endChapter}\n />\n \n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport { Label } from '@/components/shadcn-ui/label';\nimport { RadioGroup, RadioGroupItem } from '@/components/shadcn-ui/radio-group';\nimport { Canon } from '@sillsdev/scripture';\nimport { LocalizedStringValue } from 'platform-bible-utils';\nimport { useState } from 'react';\nimport ChapterRangeSelector, {\n ChapterRangeSelectorProps,\n} from '../basics/chapter-range-selector.component';\n\nexport enum BookSelectionMode {\n CURRENT_BOOK = 'current book',\n CHOOSE_BOOKS = 'choose books',\n}\n\n/**\n * Object containing all keys used for localization in this component. If you're using this\n * component in an extension, you can pass it into the useLocalizedStrings hook to easily obtain the\n * localized strings and pass them into the localizedStrings prop of this component\n */\nexport const BOOK_SELECTOR_STRING_KEYS = Object.freeze([\n '%webView_bookSelector_currentBook%',\n '%webView_bookSelector_choose%',\n '%webView_bookSelector_chooseBooks%',\n] as const);\n\nexport type BookSelectorLocalizedStrings = {\n [localizedInventoryKey in (typeof BOOK_SELECTOR_STRING_KEYS)[number]]?: LocalizedStringValue;\n};\n\n/**\n * Gets the localized value for the provided key\n *\n * @param strings Object containing localized string\n * @param key Key for a localized string\n * @returns The localized value for the provided key, if available. Returns the key if no localized\n * value is available\n */\nconst localizeString = (\n strings: BookSelectorLocalizedStrings,\n key: keyof BookSelectorLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\ntype BookSelectorProps = ChapterRangeSelectorProps & {\n handleBookSelectionModeChange: (newMode: BookSelectionMode) => void;\n currentBookName: string;\n onSelectBooks: () => void;\n selectedBookIds: string[];\n localizedStrings: BookSelectorLocalizedStrings;\n};\n\nexport default function BookSelector({\n handleBookSelectionModeChange,\n currentBookName,\n onSelectBooks,\n selectedBookIds,\n chapterCount,\n endChapter,\n handleSelectEndChapter,\n startChapter,\n handleSelectStartChapter,\n localizedStrings,\n}: BookSelectorProps) {\n const currentBookText = localizeString(localizedStrings, '%webView_bookSelector_currentBook%');\n const chooseText = localizeString(localizedStrings, '%webView_bookSelector_choose%');\n const chooseBooksText = localizeString(localizedStrings, '%webView_bookSelector_chooseBooks%');\n\n const [bookSelectionMode, setBookSelectionMode] = useState(\n BookSelectionMode.CURRENT_BOOK,\n );\n\n const onSelectionModeChange = (newMode: BookSelectionMode) => {\n setBookSelectionMode(newMode);\n handleBookSelectionModeChange(newMode);\n };\n\n return (\n onSelectionModeChange(value as BookSelectionMode)}\n >\n
\n
\n
\n \n \n
\n \n
\n \n
\n
\n
\n
\n \n \n
\n \n onSelectBooks()}\n >\n {chooseText}\n \n
\n
\n \n );\n}\n","import { DropdownMenuTrigger } from '@radix-ui/react-dropdown-menu';\nimport { FilterIcon } from 'lucide-react';\nimport { Table } from '@tanstack/react-table';\n\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n} from '@/components/shadcn-ui/dropdown-menu';\n\ninterface DataTableViewOptionsProps {\n table: Table;\n}\n\nfunction DataTableViewOptions({ table }: DataTableViewOptionsProps) {\n return (\n \n \n \n \n \n Toggle columns\n \n {table\n .getAllColumns()\n .filter((column) => column.getCanHide())\n .map((column) => {\n return (\n column.toggleVisibility(!!value)}\n >\n {column.id}\n \n );\n })}\n \n \n );\n}\n\nexport default DataTableViewOptions;\n","import React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Check, ChevronDown, ChevronUp } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n span]:tw-line-clamp-1',\n className,\n )}\n {...props}\n >\n {children}\n \n \n \n \n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, position = 'popper', ...props }, ref) => (\n \n \n \n \n {children}\n \n \n \n \n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n\n {children}\n \n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n","import { ChevronLeftIcon, ChevronRightIcon, ArrowLeftIcon, ArrowRightIcon } from 'lucide-react';\nimport { Table } from '@tanstack/react-table';\n\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\n\ninterface DataTablePaginationProps {\n table: Table;\n}\n\nfunction DataTablePagination({ table }: DataTablePaginationProps) {\n return (\n
\n
\n
\n {table.getFilteredSelectedRowModel().rows.length} of{' '}\n {table.getFilteredRowModel().rows.length} row(s) selected\n
\n
\n

Rows per page

\n {\n table.setPageSize(Number(value));\n }}\n >\n \n \n \n \n {[10, 20, 30, 40, 50].map((pageSize) => (\n \n {pageSize}\n \n ))}\n \n \n
\n
\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n
\n
\n table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n Go to first page\n \n \n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n Go to previous page\n \n \n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n Go to next page\n \n \n table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n Go to last page\n \n \n
\n
\n
\n );\n}\n\nexport default DataTablePagination;\n","import React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes & { stickyHeader?: boolean }\n>(({ className, stickyHeader, ...props }, ref) => (\n
\n \n
\n));\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes & { stickyHeader?: boolean }\n>(({ className, stickyHeader, ...props }, ref) => (\n \n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n tr]:last:tw-border-b-0', className)}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableCaption.displayName = 'TableCaption';\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n","import { useState } from 'react';\n\nimport {\n ColumnFiltersState,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n SortingState,\n ColumnDef as TSColumnDef,\n Row as TSRow,\n RowSelectionState as TSRowSelectionState,\n SortDirection as TSSortDirection,\n Table as TSTable,\n useReactTable,\n VisibilityState,\n} from '@tanstack/react-table';\n\nimport DataTableViewOptions from '@/components/advanced/data-table/data-table-column-toggle.component';\nimport DataTablePagination from '@/components/advanced/data-table/data-table-pagination.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\n\nexport type ColumnDef = TSColumnDef;\nexport type RowContents = TSRow;\nexport type TableContents = TSTable;\nexport type SortDirection = TSSortDirection;\nexport type RowSelectionState = TSRowSelectionState;\n\ninterface DataTableProps {\n columns: ColumnDef[];\n data: TData[];\n enablePagination?: boolean;\n showPaginationControls?: boolean;\n showColumnVisibilityControls?: boolean;\n stickyHeader?: boolean;\n onRowClickHandler?: (row: RowContents, table: TableContents) => void;\n}\n\n/**\n * Feature-rich table component that infuses our basic shadcn-based Table component with features\n * from TanStack's React Table library\n */\nfunction DataTable({\n columns,\n data,\n enablePagination = false,\n showPaginationControls = false,\n showColumnVisibilityControls = false,\n stickyHeader = false,\n onRowClickHandler = () => {},\n}: DataTableProps) {\n const [sorting, setSorting] = useState([]);\n const [columnFilters, setColumnFilters] = useState([]);\n const [columnVisibility, setColumnVisibility] = useState({});\n const [rowSelection, setRowSelection] = useState({});\n\n const table = useReactTable({\n data,\n columns,\n getCoreRowModel: getCoreRowModel(),\n ...(enablePagination && { getPaginationRowModel: getPaginationRowModel() }),\n onSortingChange: setSorting,\n getSortedRowModel: getSortedRowModel(),\n onColumnFiltersChange: setColumnFilters,\n getFilteredRowModel: getFilteredRowModel(),\n onColumnVisibilityChange: setColumnVisibility,\n onRowSelectionChange: setRowSelection,\n state: {\n sorting,\n columnFilters,\n columnVisibility,\n rowSelection,\n },\n });\n\n return (\n
\n {showColumnVisibilityControls && }\n \n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers.map((header) => {\n return (\n \n {header.isPlaceholder\n ? undefined\n : flexRender(header.column.columnDef.header, header.getContext())}\n \n );\n })}\n \n ))}\n \n \n {table.getRowModel().rows?.length ? (\n table.getRowModel().rows.map((row) => (\n onRowClickHandler(row, table)}\n key={row.id}\n data-state={row.getIsSelected() && 'selected'}\n >\n {row.getVisibleCells().map((cell) => (\n \n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n \n ))}\n \n ))\n ) : (\n \n \n No results.\n \n \n )}\n \n
\n {enablePagination && (\n
\n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n Previous\n \n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n Next\n \n
\n )}\n {enablePagination && showPaginationControls && }\n
\n );\n}\n\nexport default DataTable;\n","import {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport { Canon } from '@sillsdev/scripture';\nimport { deepEqual, LanguageStrings, ScriptureReference } from 'platform-bible-utils';\nimport { useMemo } from 'react';\nimport { InventoryItemOccurrence } from './inventory-utils';\n\n/** Props for the OccurrencesTable component */\ntype OccurrencesTableProps = {\n /** Data that contains scriptures references and snippets of scripture */\n occurrenceData: InventoryItemOccurrence[];\n /** Callback function that is executed when the scripture reference is changed */\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n /**\n * Object with all localized strings that the OccurrencesTable needs to work well across multiple\n * languages\n */\n localizedStrings: LanguageStrings;\n};\n\n/**\n * Table that shows occurrences of specified inventory item(s). The first column shows the related\n * scripture reference. The second column shows the snippet of scripture that contains the specified\n * inventory item\n */\nfunction OccurrencesTable({\n occurrenceData,\n setScriptureReference,\n localizedStrings,\n}: OccurrencesTableProps) {\n const referenceHeaderText =\n localizedStrings['%webView_inventory_occurrences_table_header_reference%'];\n const occurrenceHeaderText =\n localizedStrings['%webView_inventory_occurrences_table_header_occurrence%'];\n\n const occurrences: InventoryItemOccurrence[] = useMemo(() => {\n const uniqueOccurrences: InventoryItemOccurrence[] = [];\n\n occurrenceData.forEach((occurrence) => {\n if (!uniqueOccurrences.some((uniqueOccurrence) => deepEqual(uniqueOccurrence, occurrence))) {\n uniqueOccurrences.push(occurrence);\n }\n });\n\n return uniqueOccurrences;\n }, [occurrenceData]);\n\n return (\n \n \n \n {referenceHeaderText}\n {occurrenceHeaderText}\n \n \n \n {occurrences.length > 0 &&\n occurrences.map((occurrence) => (\n {\n setScriptureReference(occurrence.reference);\n }}\n >\n {`${Canon.bookNumberToEnglishName(occurrence.reference.bookNum)} ${occurrence.reference.chapterNum}:${occurrence.reference.verseNum}`}\n {occurrence.text}\n \n ))}\n \n
\n );\n}\n\nexport default OccurrencesTable;\n","import React from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Checkbox = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport default Checkbox;\n","import { Canon } from '@sillsdev/scripture';\nimport { ScriptureReference } from 'platform-bible-utils';\n\n/* #region Types */\n\n/**\n * Status of items that appear in inventories. 'approved' and 'unapproved' items are defined in the\n * project's `Settings.xml`. All other items are defined as 'unknown'\n */\nexport type Status = 'approved' | 'unapproved' | 'unknown';\n\n/** Occurrence of item in inventory. Primarily used by table that shows occurrences */\nexport type InventoryItemOccurrence = {\n /** Reference to scripture where the item appears */\n reference: ScriptureReference;\n /** Snippet of scripture that contains the occurrence */\n text: string;\n};\n\n/** Data structure that contains all information on an item that is shown in an inventory */\nexport type InventoryTableData = {\n /**\n * The item (e.g. a character in the characters inventory, a marker in the marker inventory) In\n * most cases the array will only have one element. In case of additional items (e.g. the\n * preceding marker in the markers check), the primary item should be stored in the first index.\n * To show additional items in the inventory, make sure to configure the `additionalItemsLabels`\n * prop for the Inventory component\n */\n items: string[];\n /** The number of times this item occurs in the selected scope */\n count: number;\n /** The status of this item (see documentation for `Status` type for more information) */\n status: Status;\n /** Occurrences of this item in the scripture text for the selected scope */\n occurrences: InventoryItemOccurrence[];\n};\n\n/* #endregion */\n\n/* #region Functions */\n\n/**\n * Splits USFM string into shorter line-like segments\n *\n * @param text A single (likely very large) USFM string\n * @returns An array containing the input text, split into shorter segments\n */\nexport const getLinesFromUSFM = (text: string) => {\n // Splits on (CR)LF, CR, \\v, \\c and \\id\n return text.split(/(?:\\r?\\n|\\r)|(?=(?:\\\\(?:v|c|id)))/g);\n};\n\n/**\n * Extracts chapter or verse number from USFM strings that start with a \\c or \\v marker\n *\n * @param text USFM string that is expected to start with \\c or \\v marker\n * @returns Chapter or verse number if one is found. Else returns 0.\n */\nexport const getNumberFromUSFM = (text: string): number | undefined => {\n // Captures all digits that follow \\v or \\c markers followed by whitespace located at the start of a string\n const regex = /^\\\\[vc]\\s+(\\d+)/;\n const match = text.match(regex);\n\n if (match) {\n return +match[1];\n }\n return undefined;\n};\n\n/**\n * Gets book ID from USFM string that starts with the \\id marker, and returns book number for it\n *\n * @param text USFM string that is expected to start with \\id marker\n * @returns Book number corresponding to the \\id marker in the input text. Returns 0 if no marker is\n * found or the marker is not valid\n */\nexport const getBookNumFromId = (text: string): number => {\n // Captures all digits that follow an \\id marker followed by whitespace located at the start of a string\n const match = text.match(/^\\\\id\\s+([A-Za-z]+)/);\n if (match) {\n return Canon.bookIdToNumber(match[1]);\n }\n return 0;\n};\n\n/**\n * Gets the status for an item, typically used in the Inventory component\n *\n * @param item The item for which the status is being requested\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @returns The status for the specified item\n */\nexport const getStatusForItem = (\n item: string,\n approvedItems: string[],\n unapprovedItems: string[],\n): Status => {\n if (unapprovedItems.includes(item)) return 'unapproved';\n if (approvedItems.includes(item)) return 'approved';\n return 'unknown';\n};\n\n/* #endregion */\n","import React from 'react';\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst toggleVariants = cva(\n 'pr-twp tw-inline-flex tw-items-center tw-justify-center tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors hover:tw-bg-muted hover:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=on]:tw-bg-accent data-[state=on]:tw-text-accent-foreground',\n {\n variants: {\n variant: {\n default: 'tw-bg-transparent',\n outline:\n 'tw-border tw-border-input tw-bg-transparent hover:tw-bg-accent hover:tw-text-accent-foreground',\n },\n size: {\n default: 'tw-h-10 tw-px-3',\n sm: 'tw-h-9 tw-px-2.5',\n lg: 'tw-h-11 tw-px-5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst Toggle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & VariantProps\n>(({ className, variant, size, ...props }, ref) => (\n \n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n","import React from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { toggleVariants } from '@/components/shadcn-ui/toggle';\n\nconst ToggleGroupContext = React.createContext>({\n size: 'default',\n variant: 'default',\n});\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, size, children, ...props }, ref) => (\n \n \n {children}\n \n \n));\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n \n {children}\n \n );\n});\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;\n\nexport { ToggleGroup, ToggleGroupItem };\n","import { ColumnDef, SortDirection } from '@/components/advanced/data-table/data-table.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport { ToggleGroup, ToggleGroupItem } from '@/components/shadcn-ui/toggle-group';\nimport {\n ArrowDownIcon,\n ArrowUpDownIcon,\n ArrowUpIcon,\n CircleCheckIcon,\n CircleHelpIcon,\n CircleXIcon,\n} from 'lucide-react';\nimport { ReactNode } from 'react';\nimport { InventoryTableData, Status } from './inventory-utils';\n\n/**\n * Gets an icon that indicates the current sorting direction based on the provided input\n *\n * @param sortDirection Sorting direction. Can be ascending ('asc'), descending ('desc') or false (\n * i.e. not sorted)\n * @returns The appropriate sorting icon for the provided sorting direction\n */\nconst getSortingIcon = (sortDirection: false | SortDirection): ReactNode => {\n if (sortDirection === 'asc') {\n return ;\n }\n if (sortDirection === 'desc') {\n return ;\n }\n return ;\n};\n\n/**\n * Function that creates the item column for inventories\n *\n * @param itemLabel Localized label for the item column (e.g. 'Character', 'Repeated Word', etc.)\n * @returns Column that shows the inventory items. Should be used with the DataTable component\n */\nexport const inventoryItemColumn = (itemLabel: string): ColumnDef => {\n return {\n accessorKey: 'item',\n accessorFn: (row: InventoryTableData) => row.items[0],\n header: ({ column }) => (\n \n ),\n };\n};\n\n/**\n * Function that creates the additional item columns for inventories\n *\n * @param additionalItemLabel Localized label for the additional item column (e.g. 'Preceding\n * Marker')\n * @param additionalItemIndex Index that locates the desired item in the items array of the\n * inventory\n * @returns Column that shows additional inventory items. Should be used with the DataTable\n * component\n */\nexport const inventoryAdditionalItemColumn = (\n additionalItemLabel: string,\n additionalItemIndex: number,\n): ColumnDef => {\n return {\n accessorKey: `item${additionalItemIndex}`,\n accessorFn: (row: InventoryTableData) => row.items[additionalItemIndex],\n header: ({ column }) => (\n \n ),\n };\n};\n\n/**\n * Function that creates the count column for inventories. Should be used with the DataTable\n * component.\n *\n * @param itemLabel Localized label for the count column\n * @returns Column that shows the number of occurrences of the related inventory items\n */\nexport const inventoryCountColumn = (countLabel: string): ColumnDef => {\n return {\n accessorKey: 'count',\n header: ({ column }) => (\n
\n \n
\n ),\n cell: ({ row }) =>
{row.getValue('count')}
,\n };\n};\n\n/**\n * Function that updates project settings when status for item(s) changes\n *\n * @param changedItems Array of items for which the status is being updated\n * @param newStatus The status that the items are being given\n * @param approvedItems Array of currently approved items\n * @param onApprovedItemsChange Callback function that stores the updated list of approved items\n * @param unapprovedItems Array of currently unapproved items\n * @param onUnapprovedItemsChange Callback function that stores the updated list of unapproved items\n */\nconst statusChangeHandler = (\n changedItems: string[],\n newStatus: Status,\n approvedItems: string[],\n onApprovedItemsChange: (items: string[]) => void,\n unapprovedItems: string[],\n onUnapprovedItemsChange: (items: string[]) => void,\n) => {\n let newApprovedItems: string[] = [...approvedItems];\n changedItems.forEach((item) => {\n if (newStatus === 'approved') {\n if (!newApprovedItems.includes(item)) {\n newApprovedItems.push(item);\n }\n } else {\n newApprovedItems = newApprovedItems.filter((validItem) => validItem !== item);\n }\n });\n onApprovedItemsChange(newApprovedItems);\n\n let newUnapprovedItems: string[] = [...unapprovedItems];\n changedItems.forEach((item) => {\n if (newStatus === 'unapproved') {\n if (!newUnapprovedItems.includes(item)) {\n newUnapprovedItems.push(item);\n }\n } else {\n newUnapprovedItems = newUnapprovedItems.filter((unapprovedItem) => unapprovedItem !== item);\n }\n });\n onUnapprovedItemsChange(newUnapprovedItems);\n};\n\n/**\n * Function that creates the status column for inventories. Should be used with the DataTable\n * component.\n *\n * @param statusLabel Localized label for the status column\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param onApprovedItemsChange Callback function that stores the updated list of approved items\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @param onUnapprovedItemsChange Callback function that stores the updated list of unapproved items\n * @returns Column that shows the status buttons for the related inventory item. The button for the\n * current status of the item is selected\n */\nexport const inventoryStatusColumn = (\n statusLabel: string,\n approvedItems: string[],\n onApprovedItemsChange: (items: string[]) => void,\n unapprovedItems: string[],\n onUnapprovedItemsChange: (items: string[]) => void,\n): ColumnDef => {\n return {\n accessorKey: 'status',\n header: ({ column }) => {\n return (\n
\n \n
\n );\n },\n cell: ({ row }) => {\n const status: Status = row.getValue('status');\n const item: string = row.getValue('item');\n return (\n \n \n statusChangeHandler(\n [item],\n 'approved',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"approved\"\n >\n \n \n \n statusChangeHandler(\n [item],\n 'unapproved',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"unapproved\"\n >\n \n \n \n statusChangeHandler(\n [item],\n 'unknown',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"unknown\"\n >\n \n \n \n );\n },\n };\n};\n","import DataTable, {\n ColumnDef,\n RowContents,\n RowSelectionState,\n TableContents,\n} from '@/components/advanced/data-table/data-table.component';\nimport OccurrencesTable from '@/components/advanced/inventory/occurrences-table.component';\nimport Checkbox from '@/components/shadcn-ui/checkbox';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { Label } from '@/components/shadcn-ui/label';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport {\n deepEqual,\n LocalizedStringValue,\n ScriptureReference,\n substring,\n} from 'platform-bible-utils';\nimport { useEffect, useMemo, useState } from 'react';\nimport {\n getBookNumFromId,\n getLinesFromUSFM,\n getNumberFromUSFM,\n getStatusForItem,\n InventoryItemOccurrence,\n InventoryTableData,\n Status,\n} from './inventory-utils';\nimport { inventoryAdditionalItemColumn } from './inventory-columns';\n\n/**\n * Object containing all keys used for localization in this component. If you're using this\n * component in an extension, you can pass it into the useLocalizedStrings hook to easily obtain the\n * localized strings and pass them into the localizedStrings prop of this component\n */\nexport const INVENTORY_STRING_KEYS = Object.freeze([\n '%webView_inventory_all%',\n '%webView_inventory_approved%',\n '%webView_inventory_unapproved%',\n '%webView_inventory_unknown%',\n '%webView_inventory_scope_currentBook%',\n '%webView_inventory_scope_chapter%',\n '%webView_inventory_scope_verse%',\n '%webView_inventory_filter_text%',\n '%webView_inventory_show_additional_items%',\n '%webView_inventory_occurrences_table_header_reference%',\n '%webView_inventory_occurrences_table_header_occurrence%',\n] as const);\n\nexport type InventoryLocalizedStrings = {\n [localizedInventoryKey in (typeof INVENTORY_STRING_KEYS)[number]]?: LocalizedStringValue;\n};\n\n/** Scope of scripture that the inventory can operate on */\nexport type Scope = 'book' | 'chapter' | 'verse';\n\n/** Status values that the status filter can select from */\ntype StatusFilter = Status | 'all';\n\n/** Text labels for the inventory columns and the control components of additional inventory items */\ntype AdditionalItemsLabels = {\n checkboxText?: string;\n tableHeaders?: string[];\n};\n\n/**\n * Filters data that is shown in the DataTable section of the Inventory\n *\n * @param itemData All inventory items and their related information\n * @param statusFilter Allows filtering by status (i.e. show all items, or only items that are\n * 'approved', 'unapproved' or 'unknown')\n * @param textFilter Allows filtering by text. All items that include the filter text will be\n * selected.\n * @returns Array of items and their related information that are matched by the specified filters\n */\nconst filterItemData = (\n itemData: InventoryTableData[],\n statusFilter: StatusFilter,\n textFilter: string,\n): InventoryTableData[] => {\n let filteredItemData: InventoryTableData[] = itemData;\n\n if (statusFilter !== 'all') {\n filteredItemData = filteredItemData.filter(\n (item) =>\n (statusFilter === 'approved' && item.status === 'approved') ||\n (statusFilter === 'unapproved' && item.status === 'unapproved') ||\n (statusFilter === 'unknown' && item.status === 'unknown'),\n );\n }\n\n if (textFilter !== '')\n filteredItemData = filteredItemData.filter((item) => item.items[0].includes(textFilter));\n\n return filteredItemData;\n};\n\n/**\n * Turns array of strings into array of inventory items, along with their count and status\n *\n * @param text The source scripture text that is searched for inventory items\n * @param scriptureRef The scripture reference that the application is currently set to\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @param itemRegex Regular expression that describes what items this Inventory should extract from\n * the provided scripture text\n * @returns Array of inventory items, along with their count and status\n */\nconst createTableData = (\n text: string | undefined,\n scriptureRef: ScriptureReference,\n approvedItems: string[],\n unapprovedItems: string[],\n itemRegex: RegExp,\n): InventoryTableData[] => {\n if (!text) return [];\n\n const tableData: InventoryTableData[] = [];\n\n let currentBook: number | undefined = scriptureRef.bookNum;\n let currentChapter: number | undefined = scriptureRef.chapterNum;\n let currentVerse: number | undefined = scriptureRef.verseNum;\n\n const lines = getLinesFromUSFM(text);\n\n lines.forEach((line: string) => {\n if (line.startsWith('\\\\id')) {\n currentBook = getBookNumFromId(line);\n currentChapter = 0;\n currentVerse = 0;\n }\n if (line.startsWith('\\\\c')) {\n currentChapter = getNumberFromUSFM(line);\n currentVerse = 0;\n }\n if (line.startsWith('\\\\v')) {\n currentVerse = getNumberFromUSFM(line);\n if (currentChapter === 0) {\n currentChapter = scriptureRef.chapterNum;\n }\n }\n\n let match: RegExpExecArray | undefined = itemRegex.exec(line) ?? undefined;\n while (match) {\n const items: string[] = [];\n match.forEach((item) => items.push(item));\n const itemIndex = match.index;\n const existingItem = tableData.find((tableEntry) => deepEqual(tableEntry.items, items));\n const newReference: InventoryItemOccurrence = {\n reference: {\n bookNum: currentBook !== undefined ? currentBook : -1,\n chapterNum: currentChapter !== undefined ? currentChapter : -1,\n verseNum: currentVerse !== undefined ? currentVerse : -1,\n },\n text: substring(line, Math.max(0, itemIndex - 25), Math.min(itemIndex + 25, line.length)),\n };\n if (existingItem) {\n existingItem.count += 1;\n existingItem.occurrences.push(newReference);\n } else {\n const newItem: InventoryTableData = {\n items,\n count: 1,\n status: getStatusForItem(items[0], approvedItems, unapprovedItems),\n occurrences: [newReference],\n };\n tableData.push(newItem);\n }\n\n match = itemRegex.exec(line) ?? undefined;\n }\n });\n\n return tableData;\n};\n\n/**\n * Gets the localized value for the provided key\n *\n * @param strings Object containing localized string\n * @param key Key for a localized string\n * @returns The localized value for the provided key, if available. Returns the key if no localized\n * value is available\n */\nconst localizeString = (\n strings: InventoryLocalizedStrings,\n key: keyof InventoryLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\n/** Props for the Inventory component */\ntype InventoryProps = {\n /** The scripture reference that the application is currently set to */\n scriptureReference: ScriptureReference;\n /** Callback function that is executed when the scripture reference is changed */\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n /**\n * Object with all localized strings that the Inventory needs to work well across multiple\n * languages. When using this component with Platform.Bible, you can import\n * `INVENTORY_STRING_KEYS` from this library, pass it in to the Platform's localization hook, and\n * pass the localized keys that are returned by the hook into this prop.\n */\n localizedStrings: InventoryLocalizedStrings;\n /**\n * The logic that finds the desired items in the source text. This can either be a Regular\n * expression that captures one or multiple items (preferred), or a custom function that builds\n * and return an InventoryDataTable[] manually. Note: In case the logic captures more than one\n * item (i.e. InventoryTableData.items has a length greater than 1), you must provide text labels\n * for the related columns and control elements to show by setting the `additionalItemsLabels`\n * prop\n */\n extractItems:\n | RegExp\n | ((\n text: string | undefined,\n scriptureRef: ScriptureReference,\n approvedItems: string[],\n unapprovedItems: string[],\n ) => InventoryTableData[]);\n /**\n * Text labels for control elements and additional column headers in case your Inventory has more\n * than one item to show (e.g. The 'Preceding Marker' in the Markers Inventory)\n */\n additionalItemsLabels?: AdditionalItemsLabels;\n /** Array of approved items, typically as defined in `Settings.xml` */\n approvedItems: string[];\n /** Array of unapproved items, typically as defined in `Settings.xml` */\n unapprovedItems: string[];\n /** The source scripture text that is searched for in inventory items */\n text: string | undefined;\n /** Scope of scripture that the inventory will operate on */\n scope: Scope;\n /** Callback function that is executed when the scope is changed from the Inventory */\n onScopeChange: (scope: Scope) => void;\n /**\n * Column definitions for the Inventory data table. The most commonly used column definitions are\n * pre-configured for your convenience and can be imported (e.g. inventoryItemColumn,\n * inventoryAdditionalItemColumn inventoryCountColumn, and inventoryStatusColumn). If you need any\n * other columns you can add these yourself\n */\n columns: ColumnDef[];\n};\n\n/** Inventory component that is used to view and control the status of provided project settings */\nexport default function Inventory({\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n extractItems,\n additionalItemsLabels,\n approvedItems,\n unapprovedItems,\n text,\n scope,\n onScopeChange,\n columns,\n}: InventoryProps) {\n const allItemsText = localizeString(localizedStrings, '%webView_inventory_all%');\n const approvedItemsText = localizeString(localizedStrings, '%webView_inventory_approved%');\n const unapprovedItemsText = localizeString(localizedStrings, '%webView_inventory_unapproved%');\n const unknownItemsText = localizeString(localizedStrings, '%webView_inventory_unknown%');\n const scopeBookText = localizeString(localizedStrings, '%webView_inventory_scope_currentBook%');\n const scopeChapterText = localizeString(localizedStrings, '%webView_inventory_scope_chapter%');\n const scopeVerseText = localizeString(localizedStrings, '%webView_inventory_scope_verse%');\n const filterText = localizeString(localizedStrings, '%webView_inventory_filter_text%');\n const showAdditionalItemsText = localizeString(\n localizedStrings,\n '%webView_inventory_show_additional_items%',\n );\n\n const [showAdditionalItems, setShowAdditionalItems] = useState(false);\n const [statusFilter, setStatusFilter] = useState('all');\n const [textFilter, setTextFilter] = useState('');\n const [selectedItem, setSelectedItem] = useState([]);\n\n const tableData: InventoryTableData[] = useMemo(() => {\n if (!text) return [];\n if (extractItems instanceof RegExp)\n return createTableData(\n text,\n scriptureReference,\n approvedItems,\n unapprovedItems,\n extractItems,\n );\n return extractItems(text, scriptureReference, approvedItems, unapprovedItems);\n }, [text, extractItems, scriptureReference, approvedItems, unapprovedItems]);\n\n const reducedTableData: InventoryTableData[] = useMemo(() => {\n if (showAdditionalItems) return tableData;\n\n const newTableData: InventoryTableData[] = [];\n\n tableData.forEach((tableEntry) => {\n const firstItem = tableEntry.items[0];\n\n const existingEntry = newTableData.find(\n (newTableEntry) => newTableEntry.items[0] === firstItem,\n );\n\n if (existingEntry) {\n existingEntry.count += tableEntry.count;\n existingEntry.occurrences = existingEntry.occurrences.concat(tableEntry.occurrences);\n } else {\n newTableData.push({\n items: [firstItem],\n count: tableEntry.count,\n occurrences: tableEntry.occurrences,\n status: tableEntry.status,\n });\n }\n });\n\n return newTableData;\n }, [showAdditionalItems, tableData]);\n\n const filteredTableData: InventoryTableData[] = useMemo(() => {\n return filterItemData(reducedTableData, statusFilter, textFilter);\n }, [reducedTableData, statusFilter, textFilter]);\n\n const allColumns: ColumnDef[] = useMemo(() => {\n if (!showAdditionalItems) return columns;\n\n const numberOfAdditionalItems = additionalItemsLabels?.tableHeaders?.length;\n if (!numberOfAdditionalItems) return columns;\n\n const additionalColumns: ColumnDef[] = [];\n\n for (let index = 0; index < numberOfAdditionalItems; index++) {\n additionalColumns.push(\n inventoryAdditionalItemColumn(\n additionalItemsLabels?.tableHeaders?.[index] || 'Additional Item',\n index + 1,\n ),\n );\n }\n\n return [...additionalColumns, ...columns];\n }, [additionalItemsLabels?.tableHeaders, columns, showAdditionalItems]);\n\n useEffect(() => {\n setSelectedItem([]);\n }, [filteredTableData]);\n\n const rowClickHandler = (\n row: RowContents,\n table: TableContents,\n ) => {\n table.setRowSelection(() => {\n const newSelection: RowSelectionState = {};\n newSelection[row.index] = true;\n return newSelection;\n });\n\n setSelectedItem(row.original.items);\n };\n\n const handleScopeChange = (value: string) => {\n if (value === 'book' || value === 'chapter' || value === 'verse') {\n onScopeChange(value);\n } else {\n throw new Error(`Invalid scope value: ${value}`);\n }\n };\n\n const handleStatusFilterChange = (value: string) => {\n if (value === 'all' || value === 'approved' || value === 'unapproved' || value === 'unknown') {\n setStatusFilter(value);\n } else {\n throw new Error(`Invalid status filter value: ${value}`);\n }\n };\n\n const occurrenceData: InventoryItemOccurrence[] = useMemo(() => {\n if (reducedTableData.length === 0 || selectedItem.length === 0) return [];\n const occurrence = reducedTableData.filter((tableEntry: InventoryTableData) => {\n return deepEqual(\n showAdditionalItems ? tableEntry.items : [tableEntry.items[0]],\n selectedItem,\n );\n });\n if (occurrence.length > 1) throw new Error('Selected item is not unique');\n return occurrence[0].occurrences;\n }, [selectedItem, showAdditionalItems, reducedTableData]);\n\n return (\n
\n
\n handleStatusFilterChange(value)}\n defaultValue={statusFilter}\n >\n \n \n \n \n {allItemsText}\n {approvedItemsText}\n {unapprovedItemsText}\n {unknownItemsText}\n \n \n \n {\n setTextFilter(event.target.value);\n }}\n />\n {additionalItemsLabels && (\n
\n {\n setSelectedItem([]);\n setShowAdditionalItems(checked);\n }}\n />\n \n
\n )}\n
\n
\n \n
\n {occurrenceData.length > 0 && (\n
\n \n
\n )}\n
\n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/shadcn-ui/command';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/shadcn-ui/popover';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Check, ChevronsUpDown, Star } from 'lucide-react';\nimport { ReactNode, useCallback, useMemo, useState } from 'react';\n\ntype MultiSelectComboBoxEntry = {\n value: string;\n label: string;\n starred?: boolean;\n};\n\ninterface MultiSelectComboBoxProps {\n entries: MultiSelectComboBoxEntry[];\n getEntriesCount?: (option: MultiSelectComboBoxEntry) => number;\n selected: string[];\n onChange: (values: string[]) => void;\n placeholder: string;\n commandEmptyMessage?: string;\n customSelectedText?: string;\n sortSelected?: boolean;\n icon?: ReactNode;\n}\n\nfunction MultiSelectComboBox({\n entries,\n getEntriesCount = undefined,\n selected,\n onChange,\n placeholder,\n commandEmptyMessage = 'No entries found',\n customSelectedText,\n sortSelected = false,\n icon = undefined,\n}: MultiSelectComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n const handleSelect = useCallback(\n (value: string) => {\n onChange(\n selected.includes(value) ? selected.filter((item) => item !== value) : [...selected, value],\n );\n },\n [selected, onChange],\n );\n\n const getPlaceholderText = () => {\n if (selected.length === 1)\n return entries.find((option) => option.value === selected[0])?.label ?? placeholder;\n if (customSelectedText) return customSelectedText;\n return placeholder;\n };\n\n const sortedOptions = useMemo(() => {\n if (!sortSelected) return entries;\n\n const starredItems = entries\n .filter((opt) => opt.starred)\n .sort((a, b) => a.label.localeCompare(b.label));\n const nonStarredItems = entries\n .filter((opt) => !opt.starred)\n .sort((a, b) => {\n const aSelected = selected.includes(a.value);\n const bSelected = selected.includes(b.value);\n if (aSelected && !bSelected) return -1;\n if (!aSelected && bSelected) return 1;\n return a.label.localeCompare(b.label);\n });\n\n return [...starredItems, ...nonStarredItems];\n }, [entries, selected, sortSelected]);\n\n return (\n \n \n 0 && selected.length < entries.length && 'tw-border-primary',\n )}\n >\n
\n
\n \n {icon}\n \n
\n \n {getPlaceholderText()}\n
\n
\n \n \n \n \n \n \n \n {commandEmptyMessage}\n \n {sortedOptions.map((option) => {\n const count: number | undefined = getEntriesCount\n ? getEntriesCount(option)\n : undefined;\n return (\n \n
\n \n
\n
\n {option.starred && }\n
\n
{option.label}
\n {getEntriesCount && (\n
{count}
\n )}\n \n );\n })}\n
\n
\n
\n
\n \n );\n}\n\nexport default MultiSelectComboBox;\n","import { Button } from '@/components/shadcn-ui/button';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Search, X } from 'lucide-react';\nimport { useState } from 'react';\n\nexport type SearchBarProps = {\n /**\n * Callback fired to handle the search query when button pressed\n *\n * @param searchQuery\n */\n onSearch: (searchQuery: string) => void;\n\n /** Optional string that appears in the search bar without a search string */\n placeholder?: string;\n\n /** Optional boolean to set the input base to full width */\n isFullWidth?: boolean;\n\n /** ClassName for the input */\n className?: string;\n};\n\nexport default function SearchBar({\n onSearch,\n placeholder,\n isFullWidth,\n className,\n}: SearchBarProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const handleInputChange = (searchString: string) => {\n setSearchQuery(searchString);\n onSearch(searchString);\n };\n\n return (\n
\n \n handleInputChange(e.target.value)}\n />\n {searchQuery && (\n \n {\n handleInputChange('');\n }}\n />\n Clear\n \n )}\n
\n );\n}\n","// adapted from: https://github.com/shadcn-ui/ui/discussions/752\n\n'use client';\n\nimport { TabsContentProps, TabsListProps, TabsTriggerProps } from '@/components/shadcn-ui/tabs';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\nimport React from 'react';\n\nexport type VerticalTabsProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type LeftTabsTriggerProps = TabsTriggerProps & {\n value: string;\n ref?: React.Ref;\n};\n\nexport const VerticalTabs = React.forwardRef<\n React.ElementRef,\n VerticalTabsProps\n>(({ className, ...props }, ref) => (\n \n));\n\nVerticalTabs.displayName = TabsPrimitive.List.displayName;\n\nexport const VerticalTabsList = React.forwardRef<\n React.ElementRef,\n TabsListProps\n>(({ className, ...props }, ref) => (\n \n));\nVerticalTabsList.displayName = TabsPrimitive.List.displayName;\n\nexport const VerticalTabsTrigger = React.forwardRef<\n React.ElementRef,\n LeftTabsTriggerProps\n>(({ className, ...props }, ref) => (\n \n));\n\nexport const VerticalTabsContent = React.forwardRef<\n React.ElementRef,\n TabsContentProps\n>(({ className, ...props }, ref) => (\n \n));\nVerticalTabsContent.displayName = TabsPrimitive.Content.displayName;\n","import SearchBar from '@/components/basics/search-bar.component';\nimport {\n VerticalTabs,\n VerticalTabsContent,\n VerticalTabsList,\n VerticalTabsTrigger,\n} from '@/components/basics/tabs-vertical';\nimport { ReactNode } from 'react';\n\nexport type TabKeyValueContent = {\n key: string;\n value: string;\n content: ReactNode;\n};\n\nexport type NavigationContentSearchProps = {\n /** List of values and keys for each tab this component should provide */\n tabList: TabKeyValueContent[];\n\n /** Handler to run when the value of the search bar changes */\n onSearch: (searchQuery: string) => void;\n\n /** Optional placeholder for the search bar */\n searchPlaceholder?: string;\n\n /** Optional title to include in the header */\n headerTitle?: string;\n\n /** Optional flag to make the search bar appear full width */\n isSearchBarFullWidth?: boolean;\n\n /** Text direction ltr or rtl */\n direction?: 'ltr' | 'rtl';\n};\n\nexport default function NavigationContentSearch({\n tabList,\n onSearch,\n searchPlaceholder,\n headerTitle,\n isSearchBarFullWidth = false,\n direction = 'ltr',\n}: NavigationContentSearchProps) {\n return (\n
\n
\n {headerTitle ?

{headerTitle}

: ''}\n \n
\n \n \n {tabList.map((tab) => (\n \n {tab.value}\n \n ))}\n \n {tabList.map((tab) => (\n \n {tab.content}\n \n ))}\n \n
\n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Canon } from '@sillsdev/scripture';\nimport {\n Cell,\n ColumnDef,\n flexRender,\n getCoreRowModel,\n getExpandedRowModel,\n getGroupedRowModel,\n getSortedRowModel,\n GroupingState,\n Row,\n RowSelectionState,\n SortingState,\n useReactTable,\n} from '@tanstack/react-table';\nimport '@/components/advanced/scripture-results-viewer/scripture-results-viewer.component.css';\nimport {\n compareScrRefs,\n formatScrRef,\n ScriptureSelection,\n scrRefToBBBCCCVVV,\n} from 'platform-bible-utils';\nimport { MouseEvent, useEffect, useMemo, useState } from 'react';\nimport { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\n\n/**\n * Information (e.g., a checking error or some other type of \"transient\" annotation) about something\n * noteworthy at a specific place in an instance of the Scriptures.\n */\nexport type ScriptureItemDetail = ScriptureSelection & {\n /**\n * Text of the error, note, etc. In the future, we might want to support something more than just\n * text so that a JSX element could be provided with a link or some other controls related to the\n * issue being reported.\n */\n detail: string;\n};\n\n/**\n * A uniquely identifiable source of results that can be displayed in the ScriptureResultsViewer.\n * Generally, the source will be a particular Scripture check, but there may be other types of\n * sources.\n */\nexport type ResultsSource = {\n /**\n * Uniquely identifies the source.\n *\n * @type {string}\n */\n id: string;\n\n /**\n * Name (potentially localized) of the source, suitable for display in the UI.\n *\n * @type {string}\n */\n displayName: string;\n};\n\nexport type ScriptureSrcItemDetail = ScriptureItemDetail & {\n /** Source/type of detail. Can be used for grouping. */\n source: ResultsSource;\n};\n\n/**\n * Represents a set of results keyed by Scripture reference. Generally, the source will be a\n * particular Scripture check, but this type also allows for other types of uniquely identifiable\n * sources.\n */\nexport type ResultsSet = {\n /**\n * The backing source associated with this set of results.\n *\n * @type {ResultsSource}\n */\n source: ResultsSource;\n\n /**\n * Array of Scripture item details (messages keyed by Scripture reference).\n *\n * @type {ScriptureItemDetail[]}\n */\n data: ScriptureItemDetail[];\n};\n\nconst scrBookColId = 'scrBook';\nconst scrRefColId = 'scrRef';\nconst typeColId = 'source';\nconst detailsColId = 'details';\n\nconst defaultScrRefColumnName = 'Scripture Reference';\nconst defaultScrBookGroupName = 'Scripture Book';\nconst defaultTypeColumnName = 'Type';\nconst defaultDetailsColumnName = 'Details';\n\nexport type ScriptureResultsViewerColumnInfo = {\n /** Optional header to display for the Reference column. Default value: 'Scripture Reference'. */\n scriptureReferenceColumnName?: string;\n\n /** Optional text to display to refer to the Scripture book group. Default value: 'Scripture Book'. */\n scriptureBookGroupName?: string;\n\n /** Optional header to display for the Type column. Default value: 'Type'. */\n typeColumnName?: string;\n\n /** Optional header to display for the Details column. Default value: 'Details' */\n detailsColumnName?: string;\n};\n\nexport type ScriptureResultsViewerProps = ScriptureResultsViewerColumnInfo & {\n /** Groups of ScriptureItemDetail objects from particular sources (e.g., Scripture checks) */\n sources: ResultsSet[];\n\n /** Flag indicating whether to display column headers. Default is false. */\n showColumnHeaders?: boolean;\n\n /** Flag indicating whether to display source column. Default is false. */\n showSourceColumn?: boolean;\n\n /** Callback function to notify when a row is selected */\n onRowSelected?: (selectedRow: ScriptureSrcItemDetail | undefined) => void;\n\n /** Text direction ltr or rtl */\n direction?: 'ltr' | 'rtl';\n};\n\nfunction getColumns(\n colInfo?: ScriptureResultsViewerColumnInfo,\n showSourceColumn?: boolean,\n): ColumnDef[] {\n const showSrcCol = showSourceColumn ?? false;\n return [\n {\n accessorFn: (row) =>\n `${Canon.bookNumberToId(row.start.bookNum)} ${row.start.chapterNum}:${row.start.verseNum}`,\n id: scrBookColId,\n header: colInfo?.scriptureReferenceColumnName ?? defaultScrRefColumnName,\n cell: (info) => {\n const row = info.row.original;\n if (info.row.getIsGrouped()) {\n return Canon.bookNumberToEnglishName(row.start.bookNum);\n }\n return info.row.groupingColumnId === scrBookColId ? formatScrRef(row.start) : undefined;\n },\n getGroupingValue: (row) => row.start.bookNum,\n sortingFn: (a, b) => {\n return compareScrRefs(a.original.start, b.original.start);\n },\n enableGrouping: true,\n },\n {\n accessorFn: (row) => formatScrRef(row.start),\n id: scrRefColId,\n header: undefined,\n cell: (info) => {\n const row = info.row.original;\n return info.row.getIsGrouped() ? undefined : formatScrRef(row.start);\n },\n sortingFn: (a, b) => {\n return compareScrRefs(a.original.start, b.original.start);\n },\n enableGrouping: false,\n },\n {\n accessorFn: (row) => row.source.displayName,\n id: typeColId,\n header: showSrcCol ? (colInfo?.typeColumnName ?? defaultTypeColumnName) : undefined,\n cell: (info) => (showSrcCol || info.row.getIsGrouped() ? info.getValue() : undefined),\n getGroupingValue: (row) => row.source.id,\n sortingFn: (a, b) =>\n a.original.source.displayName.localeCompare(b.original.source.displayName),\n enableGrouping: true,\n },\n {\n accessorFn: (row) => row.detail,\n id: detailsColId,\n header: colInfo?.detailsColumnName ?? defaultDetailsColumnName,\n cell: (info) => info.getValue(),\n enableGrouping: false,\n },\n ];\n}\n\nconst toRefOrRange = (scriptureSelection: ScriptureSelection) => {\n if (!('offset' in scriptureSelection.start))\n throw new Error('No offset available in range start');\n if (scriptureSelection.end && !('offset' in scriptureSelection.end))\n throw new Error('No offset available in range end');\n const { offset: offsetStart } = scriptureSelection.start;\n let offsetEnd: number = 0;\n if (scriptureSelection.end) ({ offset: offsetEnd } = scriptureSelection.end);\n if (\n !scriptureSelection.end ||\n compareScrRefs(scriptureSelection.start, scriptureSelection.end) === 0\n )\n return `${scrRefToBBBCCCVVV(scriptureSelection.start)}+${offsetStart}`;\n return `${scrRefToBBBCCCVVV(scriptureSelection.start)}+${offsetStart}-${scrRefToBBBCCCVVV(scriptureSelection.end)}+${offsetEnd}`;\n};\n\nconst getRowKey = (row: ScriptureSrcItemDetail) =>\n `${toRefOrRange({ start: row.start, end: row.end })} ${row.source.displayName} ${row.detail}`;\n\n/**\n * Component to display a combined list of detailed items from one or more sources, where the items\n * are keyed primarily by Scripture reference. This is particularly useful for displaying a list of\n * results from Scripture checks, but more generally could be used to display any \"results\" from any\n * source(s). The component allows for grouping by Scripture book, source, or both. By default, it\n * displays somewhat \"tree-like\" which allows it to be more horizontally compact and intuitive. But\n * it also has the option of displaying as a traditional table with column headings (with or without\n * the source column showing).\n */\nexport default function ScriptureResultsViewer({\n sources,\n showColumnHeaders = false,\n showSourceColumn = false,\n scriptureReferenceColumnName,\n scriptureBookGroupName,\n typeColumnName,\n detailsColumnName,\n onRowSelected,\n direction = 'ltr',\n}: ScriptureResultsViewerProps) {\n const [grouping, setGrouping] = useState([]);\n const [sorting, setSorting] = useState([{ id: scrBookColId, desc: false }]);\n const [rowSelection, setRowSelection] = useState({});\n\n const scriptureResults = useMemo(\n () =>\n sources.flatMap((source) => {\n return source.data.map((item) => ({\n ...item,\n source: source.source,\n }));\n }),\n [sources],\n );\n\n const columns = useMemo(\n () =>\n getColumns(\n {\n scriptureReferenceColumnName,\n typeColumnName,\n detailsColumnName,\n },\n showSourceColumn,\n ),\n [scriptureReferenceColumnName, typeColumnName, detailsColumnName, showSourceColumn],\n );\n\n useEffect(() => {\n // Ensure sorting is applied correctly when grouped by type\n if (grouping.includes(typeColId)) {\n setSorting([\n { id: typeColId, desc: false },\n { id: scrBookColId, desc: false },\n ]);\n } else {\n setSorting([{ id: scrBookColId, desc: false }]);\n }\n }, [grouping]);\n\n const table = useReactTable({\n data: scriptureResults,\n columns,\n state: {\n grouping,\n sorting,\n rowSelection,\n },\n onGroupingChange: setGrouping,\n onSortingChange: setSorting,\n onRowSelectionChange: setRowSelection,\n getExpandedRowModel: getExpandedRowModel(),\n getGroupedRowModel: getGroupedRowModel(),\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getRowId: getRowKey,\n autoResetExpanded: false,\n enableMultiRowSelection: false,\n enableSubRowSelection: false,\n });\n\n useEffect(() => {\n if (onRowSelected) {\n const selectedRows = table.getSelectedRowModel().rowsById;\n const keys = Object.keys(selectedRows);\n if (keys.length === 1) {\n const selectedRow = scriptureResults.find((row) => getRowKey(row) === keys[0]) || undefined;\n if (selectedRow) onRowSelected(selectedRow);\n }\n }\n }, [rowSelection, scriptureResults, onRowSelected, table]);\n\n // Define possible grouping options\n const scrBookGroupName = scriptureBookGroupName ?? defaultScrBookGroupName;\n const typeGroupName = typeColumnName ?? defaultTypeColumnName;\n\n const groupingOptions = [\n { label: 'No Grouping', value: [] },\n { label: `Group by ${scrBookGroupName}`, value: [scrBookColId] },\n { label: `Group by ${typeGroupName}`, value: [typeColId] },\n {\n label: `Group by ${scrBookGroupName} and ${typeGroupName}`,\n value: [scrBookColId, typeColId],\n },\n {\n label: `Group by ${typeGroupName} and ${scrBookGroupName}`,\n value: [typeColId, scrBookColId],\n },\n ];\n\n const handleSelectChange = (selectedGrouping: string) => {\n setGrouping(JSON.parse(selectedGrouping));\n };\n\n const handleRowClick = (row: Row, event: MouseEvent) => {\n if (!row.getIsGrouped() && !row.getIsSelected()) {\n row.getToggleSelectedHandler()(event);\n }\n };\n\n const getEvenOrOddBandingStyle = (row: Row, index: number) => {\n if (row.getIsGrouped()) return '';\n // UX has now said they don't think they want banding. I'm leaving in the code to\n // set even and odd styles, but there's nothing in the CSS to style them differently.\n // The \"even\" style used to also have tw-bg-neutral-300 (along with even) to create\n // a visual banding effect. That could be added back in if UX changes the decision.\n return cn('banded-row', index % 2 === 0 ? 'even' : 'odd');\n };\n\n const getIndent = (\n groupingState: GroupingState,\n row: Row,\n cell: Cell,\n ) => {\n if (groupingState?.length === 0 || row.depth < cell.column.getGroupedIndex()) return undefined;\n if (row.getIsGrouped()) {\n switch (row.depth) {\n case 1:\n return 'tw-ps-4';\n default:\n return undefined;\n }\n }\n switch (row.depth) {\n case 1:\n return 'tw-ps-8';\n case 2:\n return 'tw-ps-12';\n default:\n return undefined;\n }\n };\n\n return (\n
\n {!showColumnHeaders && (\n {\n handleSelectChange(value);\n }}\n >\n \n \n \n \n \n {groupingOptions.map((option) => (\n \n {option.label}\n \n ))}\n \n \n \n )}\n \n {showColumnHeaders && (\n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers\n .filter((h) => h.column.columnDef.header)\n .map((header) => (\n /* For sticky column headers to work, we probably need to change the default definition of the shadcn Table component. See https://github.com/shadcn-ui/ui/issues/1151 */\n \n {header.isPlaceholder ? undefined : (\n
\n {header.column.getCanGroup() ? (\n \n {header.column.getIsGrouped() ? `🛑` : `👊 `}\n \n ) : undefined}{' '}\n {flexRender(header.column.columnDef.header, header.getContext())}\n
\n )}\n
\n ))}\n
\n ))}\n
\n )}\n \n {table.getRowModel().rows.map((row, rowIndex) => {\n return (\n handleRowClick(row, event)}\n >\n {row.getVisibleCells().map((cell) => {\n if (\n cell.getIsPlaceholder() ||\n (cell.column.columnDef.enableGrouping &&\n !cell.getIsGrouped() &&\n (cell.column.columnDef.id !== typeColId || !showSourceColumn))\n )\n return undefined;\n return (\n \n {(() => {\n if (cell.getIsGrouped()) {\n return (\n \n {row.getIsExpanded() && }\n {!row.getIsExpanded() &&\n (direction === 'ltr' ? : )}{' '}\n {flexRender(cell.column.columnDef.cell, cell.getContext())} (\n {row.subRows.length})\n \n );\n }\n\n // if (cell.getIsAggregated()) {\n // flexRender(\n // cell.column.columnDef.aggregatedCell ?? cell.column.columnDef.cell,\n // cell.getContext(),\n // );\n // }\n\n return flexRender(cell.column.columnDef.cell, cell.getContext());\n })()}\n \n );\n })}\n \n );\n })}\n \n
\n
\n );\n}\n","import {\n getLocalizeKeyForScrollGroupId,\n LanguageStrings,\n ScrollGroupId,\n} from 'platform-bible-utils';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\n\nconst DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS = {\n [getLocalizeKeyForScrollGroupId('undefined')]: 'Ø',\n [getLocalizeKeyForScrollGroupId(0)]: 'A',\n [getLocalizeKeyForScrollGroupId(1)]: 'B',\n [getLocalizeKeyForScrollGroupId(2)]: 'C',\n [getLocalizeKeyForScrollGroupId(3)]: 'D',\n [getLocalizeKeyForScrollGroupId(4)]: 'E',\n [getLocalizeKeyForScrollGroupId(5)]: 'F',\n [getLocalizeKeyForScrollGroupId(6)]: 'G',\n [getLocalizeKeyForScrollGroupId(7)]: 'H',\n [getLocalizeKeyForScrollGroupId(8)]: 'I',\n [getLocalizeKeyForScrollGroupId(9)]: 'J',\n [getLocalizeKeyForScrollGroupId(10)]: 'K',\n [getLocalizeKeyForScrollGroupId(11)]: 'L',\n [getLocalizeKeyForScrollGroupId(12)]: 'M',\n [getLocalizeKeyForScrollGroupId(13)]: 'N',\n [getLocalizeKeyForScrollGroupId(14)]: 'O',\n [getLocalizeKeyForScrollGroupId(15)]: 'P',\n [getLocalizeKeyForScrollGroupId(16)]: 'Q',\n [getLocalizeKeyForScrollGroupId(17)]: 'R',\n [getLocalizeKeyForScrollGroupId(18)]: 'S',\n [getLocalizeKeyForScrollGroupId(19)]: 'T',\n [getLocalizeKeyForScrollGroupId(20)]: 'U',\n [getLocalizeKeyForScrollGroupId(21)]: 'V',\n [getLocalizeKeyForScrollGroupId(22)]: 'W',\n [getLocalizeKeyForScrollGroupId(23)]: 'X',\n [getLocalizeKeyForScrollGroupId(24)]: 'Y',\n [getLocalizeKeyForScrollGroupId(25)]: 'Z',\n};\n\nexport type ScrollGroupSelectorProps = {\n /**\n * List of scroll group ids to show to the user. Either a {@link ScrollGroupId} or `undefined` for\n * no scroll group\n */\n availableScrollGroupIds: (ScrollGroupId | undefined)[];\n /** Currently selected scroll group id. `undefined` for no scroll group */\n scrollGroupId: ScrollGroupId | undefined;\n /** Callback function run when the user tries to change the scroll group id */\n onChangeScrollGroupId: (newScrollGroupId: ScrollGroupId | undefined) => void;\n /**\n * Localized strings to use for displaying scroll group ids. Must be an object whose keys are\n * `getLocalizeKeyForScrollGroupId(scrollGroupId)` for all scroll group ids (and `undefined` if\n * included) in {@link ScrollGroupSelectorProps.availableScrollGroupIds} and whose values are the\n * localized strings to use for those scroll group ids.\n *\n * Defaults to English localizations of English alphabet for scroll groups 0-25 (e.g. 0 is A) and\n * Ø for `undefined`. Will fill in any that are not provided with these English localizations.\n * Also, if any values match the keys, the English localization will be used. This is useful in\n * case you want to pass in a temporary version of the localized strings while your localized\n * strings load.\n *\n * @example\n *\n * ```typescript\n * const myScrollGroupIdLocalizedStrings = {\n * [getLocalizeKeyForScrollGroupId('undefined')]: 'Ø',\n * [getLocalizeKeyForScrollGroupId(0)]: 'A',\n * [getLocalizeKeyForScrollGroupId(1)]: 'B',\n * [getLocalizeKeyForScrollGroupId(2)]: 'C',\n * [getLocalizeKeyForScrollGroupId(3)]: 'D',\n * [getLocalizeKeyForScrollGroupId(4)]: 'E',\n * };\n * ```\n *\n * @example\n *\n * ```tsx\n * const availableScrollGroupIds = [undefined, 0, 1, 2, 3, 4];\n *\n * const localizeKeys = getLocalizeKeysForScrollGroupIds();\n *\n * const [localizedStrings] = useLocalizedStrings(localizeKeys);\n *\n * ...\n *\n * \n * ```\n */\n localizedStrings?: LanguageStrings;\n};\n\n/** Selector component for choosing a scroll group */\nexport default function ScrollGroupSelector({\n availableScrollGroupIds,\n scrollGroupId,\n onChangeScrollGroupId,\n localizedStrings = {},\n}: ScrollGroupSelectorProps) {\n const localizedStringsDefaulted = {\n ...DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS,\n ...Object.fromEntries(\n Object.entries(localizedStrings).map(\n ([localizedStringKey, localizedStringValue]: [string, string]) => [\n localizedStringKey,\n localizedStringKey === localizedStringValue &&\n localizedStringKey in DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS\n ? DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS[localizedStringKey]\n : localizedStringValue,\n ],\n ),\n ),\n };\n return (\n \n onChangeScrollGroupId(\n newScrollGroupString === 'undefined' ? undefined : parseInt(newScrollGroupString, 10),\n )\n }\n >\n \n \n \n \n {availableScrollGroupIds.map((scrollGroupOptionId) => (\n \n {localizedStringsDefaulted[getLocalizeKeyForScrollGroupId(scrollGroupOptionId)]}\n \n ))}\n \n \n );\n}\n","import React from 'react';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Separator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n \n));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n","import { PropsWithChildren } from 'react';\nimport { Separator } from '@/components/shadcn-ui/separator';\n\n/** Props for the SettingsList component, currently just children */\ntype SettingsListProps = PropsWithChildren;\n\n/**\n * SettingsList component is a wrapper for list items. Rendered with a formatted div\n *\n * @param children To populate the list with\n * @returns Formatted div encompassing the children\n */\nexport function SettingsList({ children }: SettingsListProps) {\n return
{children}
;\n}\n\n/** Props for SettingsListItem component */\ntype SettingsListItemProps = PropsWithChildren & {\n /** Primary text of the list item */\n primary: string;\n\n /** Optional text of the list item */\n secondary?: string | undefined;\n\n /** Optional boolean to display a message if the children aren't loaded yet. Defaults to false */\n isLoading?: boolean;\n\n /** Optional message to display if isLoading */\n loadingMessage?: string;\n};\n\n/**\n * SettingsListItem component is a common list item. Rendered with a formatted div\n *\n * @param primary Primary text of the list item\n * @param secondary Optional secondary text of the list item\n * @param isLoading Optional, to display a message if the action component isn't generated yet,\n * defaults to false\n * @param children The action component(s) to provide for this item\n * @param loadingMessage Optional, message to display if isLoading\n * @returns Formatted div encompassing the list item content\n */\nexport function SettingsListItem({\n primary,\n secondary,\n children,\n isLoading = false,\n loadingMessage,\n}: SettingsListItemProps) {\n return (\n
\n
\n

{primary}

\n

\n {secondary}\n

\n
\n\n {isLoading ? (\n

{loadingMessage}

\n ) : (\n
{children}
\n )}\n
\n );\n}\n\n/** Props for SettingsListHeader component */\ntype SettingsListHeaderProps = {\n /** The primary text of the list header */\n primary: string;\n\n /** Optional secondary text of the list header */\n secondary?: string | undefined;\n\n /** Optional boolean to include a separator underneath the secondary text. Defaults to false */\n includeSeparator?: boolean;\n};\n\n/**\n * SettingsListHeader component displays text above the list\n *\n * @param primary The primary text of the list header\n * @param secondary Optional secondary text of the list header\n * @param includeSeparator Optional boolean to include a separator underneath the secondary text.\n * Defaults to false\n * @returns Formatted div with list header content\n */\nexport function SettingsListHeader({\n primary,\n secondary,\n includeSeparator = false,\n}: SettingsListHeaderProps) {\n return (\n
\n
\n

{primary}

\n

{secondary}

\n
\n {includeSeparator ? : ''}\n
\n );\n}\n","import Checkbox from '@/components/shadcn-ui/checkbox';\nimport { Label } from '@/components/shadcn-ui/label';\n\nexport type ChecklistProps = {\n /** Optional string representing the id attribute of the Checklist */\n id?: string;\n /** Optional string representing CSS class name(s) for styling */\n className?: string;\n /** Array of strings representing the checkable items */\n listItems: string[];\n /** Array of strings representing the checked items */\n selectedListItems: string[];\n /**\n * Function that is called when a checkbox item is selected or deselected\n *\n * @param item The string description for this item\n * @param selected True if selected, false if not selected\n */\n handleSelectListItem: (item: string, selected: boolean) => void;\n\n /**\n * Optional function creates a label for a provided checkable item\n *\n * @param item The item for which a label is to be created\n * @returns A string representing the label text for the checkbox associated with that item\n */\n createLabel?: (item: string) => string;\n};\n\n/** Renders a list of checkboxes. Each checkbox corresponds to an item from the `listItems` array. */\nexport default function Checklist({\n id,\n className,\n listItems,\n selectedListItems,\n handleSelectListItem,\n createLabel,\n}: ChecklistProps) {\n return (\n
\n {listItems.map((item) => (\n
\n handleSelectListItem(item, value)}\n />\n \n
\n ))}\n
\n );\n}\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function chainPropTypes(propType1, propType2) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return function validate(...args) {\n return propType1(...args) || propType2(...args);\n };\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (!isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? _extends({}, target) : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\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","/** @license React v16.13.1\n * react-is.development.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';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\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\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\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\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\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\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import PropTypes from 'prop-types';\nimport chainPropTypes from '../chainPropTypes';\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n const element = props[propName];\n const safePropName = propFullName || propName;\n if (element == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for Emotion compat.\n // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n const elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nconst elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n\nconst specialProperty = 'exact-prop: \\u200b';\nexport default function exactProp(propTypes) {\n if (process.env.NODE_ENV === 'production') {\n return propTypes;\n }\n return _extends({}, propTypes, {\n [specialProperty]: props => {\n const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));\n if (unsupportedProps.length > 0) {\n return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\\`${prop}\\``).join(', ')}. Please remove them.`);\n }\n return null;\n }\n });\n}","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe if we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","/**\n * @license React\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'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","/**\n * @license React\n * react-is.development.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';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_SERVER_CONTEXT_TYPE:\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\nfunction isSuspenseList(object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.SuspenseList = SuspenseList;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isSuspenseList = isSuspenseList;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","import { ForwardRef, Memo } from 'react-is';\n\n// Simplified polyfill for IE11 support\n// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3\nconst fnNameMatchRegex = /^\\s*function(?:\\s|\\s*\\/\\*.*\\*\\/\\s*)+([^(\\s/]*)\\s*/;\nexport function getFunctionName(fn) {\n const match = `${fn}`.match(fnNameMatchRegex);\n const name = match && match[1];\n return name || '';\n}\nfunction getFunctionComponentName(Component, fallback = '') {\n return Component.displayName || Component.name || getFunctionName(Component) || fallback;\n}\nfunction getWrappedName(outerType, innerType, wrapperName) {\n const functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);\n}\n\n/**\n * cherry-pick from\n * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName with added IE11 support\n */\nexport default function getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n if (typeof Component === 'string') {\n return Component;\n }\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`\n if (typeof Component === 'object') {\n switch (Component.$$typeof) {\n case ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n case Memo:\n return getWrappedName(Component, Component.type, 'memo');\n default:\n return undefined;\n }\n }\n return undefined;\n}","export default function HTMLElementType(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null) {\n return null;\n }\n if (propValue && propValue.nodeType !== 1) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an HTMLElement.`);\n }\n return null;\n}","import PropTypes from 'prop-types';\nconst refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);\nexport default refType;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","export default function deprecatedPropType(validator, reason) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return (props, propName, componentName, location, propFullName) => {\n const componentNameSafe = componentName || '<>';\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The ${location} \\`${propFullNameSafe}\\` of ` + `\\`${componentNameSafe}\\` is deprecated. ${reason}`);\n }\n return null;\n };\n}","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n var _muiName, _element$type;\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from '../ownerDocument';\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function requirePropFactory(componentNameInError, Component) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n\n // eslint-disable-next-line react/forbid-foreign-prop-types\n const prevPropTypes = Component ? _extends({}, Component.propTypes) : null;\n const requireProp = requiredProp => (props, propName, componentName, location, propFullName, ...args) => {\n const propFullNameSafe = propFullName || propName;\n const defaultTypeChecker = prevPropTypes == null ? void 0 : prevPropTypes[propFullNameSafe];\n if (defaultTypeChecker) {\n const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args);\n if (typeCheckerResult) {\n return typeCheckerResult;\n }\n }\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(`The prop \\`${propFullNameSafe}\\` of ` + `\\`${componentNameInError}\\` can only be used together with the \\`${requiredProp}\\` prop.`);\n }\n return null;\n };\n return requireProp;\n}","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseId = React['useId'.toString()];\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride != null ? idOverride : reactId;\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","export default function unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The prop \\`${propFullNameSafe}\\` is not supported. Please remove it.`);\n }\n return null;\n}","'use client';\n\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && defaultValue !== defaultProp) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '../useEnhancedEffect';\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nimport setRef from '../setRef';\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport useLazyRef from '../useLazyRef/useLazyRef';\nimport useOnMount from '../useOnMount/useOnMount';\nexport class Timeout {\n constructor() {\n this.currentId = null;\n this.clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n this.disposeEffect = () => {\n return this.clear;\n };\n }\n static create() {\n return new Timeout();\n }\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","'use client';\n\n// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nimport * as React from 'react';\nimport { Timeout } from '../useTimeout/useTimeout';\nlet hadKeyboardEvent = true;\nlet hadFocusVisibleRecently = false;\nconst hadFocusVisibleRecentlyTimeout = new Timeout();\nconst inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @returns {boolean}\n */\nfunction focusTriggersKeyboardModality(node) {\n const {\n type,\n tagName\n } = node;\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n if (node.isContentEditable) {\n return true;\n }\n return false;\n}\n\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n hadKeyboardEvent = true;\n}\n\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\nexport function teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\nfunction isFocusVisible(event) {\n const {\n target\n } = event;\n try {\n return target.matches(':focus-visible');\n } catch (error) {\n // Browsers not implementing :focus-visible will throw a SyntaxError.\n // We use our own heuristic for those browsers.\n // Rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n }\n\n // No need for validFocusTarget check. The user does that by attaching it to\n // focusable events only.\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\nexport default function useIsFocusVisible() {\n const ref = React.useCallback(node => {\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n const isFocusVisibleRef = React.useRef(false);\n\n /**\n * Should be called if a blur event is fired\n */\n function handleBlurVisible() {\n // checking against potential state variable does not suffice if we focus and blur synchronously.\n // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.\n // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.\n // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751\n // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).\n if (isFocusVisibleRef.current) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n hadFocusVisibleRecentlyTimeout.start(100, () => {\n hadFocusVisibleRecently = false;\n });\n isFocusVisibleRef.current = false;\n return true;\n }\n return false;\n }\n\n /**\n * Should be called if a blur event is fired\n */\n function handleFocusVisible(event) {\n if (isFocusVisible(event)) {\n isFocusVisibleRef.current = true;\n return true;\n }\n return false;\n }\n return {\n isFocusVisibleRef,\n onFocus: handleFocusVisible,\n onBlur: handleBlurVisible,\n ref\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param {object} defaultProps\n * @param {object} props\n * @returns {object} resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = _extends({}, props);\n Object.keys(defaultProps).forEach(propName => {\n if (propName.toString().match(/^(components|slots)$/)) {\n output[propName] = _extends({}, defaultProps[propName], output[propName]);\n } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {\n const defaultSlotProps = defaultProps[propName] || {};\n const slotProps = props[propName];\n output[propName] = {};\n if (!slotProps || !Object.keys(slotProps)) {\n // Reduce the iteration if the slot props is empty\n output[propName] = defaultSlotProps;\n } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {\n // Reduce the iteration if the default slot props is empty\n output[propName] = slotProps;\n } else {\n output[propName] = _extends({}, slotProps);\n Object.keys(defaultSlotProps).forEach(slotPropName => {\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n });\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n });\n return output;\n}","export default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n Object.keys(slots).forEach(\n // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n const utilityClass = getUtilityClass(key);\n if (utilityClass !== '') {\n acc.push(utilityClass);\n }\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n }\n return acc;\n }, []).join(' ');\n });\n return output;\n}","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from '../ClassNameGenerator';\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from '../generateUtilityClass';\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"values\", \"unit\", \"step\"];\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return _extends({}, acc, {\n [obj.key]: obj.val\n });\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5\n } = breakpoints,\n other = _objectWithoutPropertiesLoose(breakpoints, _excluded);\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return _extends({\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit\n }, other);\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import PropTypes from 'prop-types';\nconst responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};\nexport default responsivePropType;","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from './merge';\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme\n }, props[key]));\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nimport { getPath } from './style';\nimport merge from './merge';\nimport memoize from './memoize';\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n var _getPath;\n const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;\n if (typeof themeSpacing === 'number') {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);\n }\n }\n return themeSpacing * abs;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n return themeSpacing[abs];\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n const abs = Math.abs(propValue);\n const transformed = transformer(abs);\n if (propValue >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (keys.indexOf(prop) === -1) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","import { createUnarySpacing } from '../spacing';\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n\n // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n // Smaller components, such as icons, can align to a 4dp grid.\n // https://m2.material.io/design/layout/understanding-layout.html\n const transform = createUnarySpacing({\n spacing: spacingInput\n });\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","import merge from './merge';\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from './responsivePropType';\nimport style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nimport responsivePropType from './responsivePropType';\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from './style';\nimport compose from './compose';\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from './style';\nimport compose from './compose';\nimport { handleBreakpoints, values as breakpointsValues } from './breakpoints';\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n var _props$theme, _props$theme2;\n const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from '../spacing';\nimport { borderRadius, borderTransform } from '../borders';\nimport { gap, rowGap, columnGap } from '../cssGrid';\nimport { paletteTransform } from '../palette';\nimport { maxWidth, sizingTransform } from '../sizing';\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import capitalize from '@mui/utils/capitalize';\nimport merge from '../merge';\nimport { getPath, getStyleValue as getValue } from '../style';\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from '../breakpoints';\nimport defaultSxConfig from './defaultSxConfig';\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n var _theme$unstable_sxCon;\n const {\n sx,\n theme = {}\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n return removeUnusedBreakpoints(breakpointsKeys, css);\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n *\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars && typeof theme.getColorSchemeSelector === 'function') {\n // If CssVarsProvider is used as a provider,\n // returns '* :where([data-mui-color-scheme=\"light|dark\"]) &'\n const selector = theme.getColorSchemeSelector(key).replace(/(\\[[^\\]]+\\])/, '*:where($1)');\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"breakpoints\", \"palette\", \"spacing\", \"shape\"];\nimport deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from './createBreakpoints';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport styleFunctionSx from '../styleFunctionSx/styleFunctionSx';\nimport defaultSxConfig from '../styleFunctionSx/defaultSxConfig';\nimport applyStyles from './applyStyles';\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: _extends({\n mode: 'light'\n }, paletteInput),\n spacing,\n shape: _extends({}, shape, shapeInput)\n }, other);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nexport default createTheme;","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","'use client';\n\nimport createTheme from './createTheme';\nimport useThemeWithoutDefault from './useThemeWithoutDefault';\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ownerState\"],\n _excluded2 = [\"variants\"],\n _excluded3 = [\"name\", \"slot\", \"skipVariantsResolver\", \"skipSx\", \"overridesResolver\"];\n/* eslint-disable no-underscore-dangle */\nimport styledEngineStyled, { internal_processStyles as processStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from './createTheme';\nimport styleFunctionSx from './styleFunctionSx';\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport const systemDefaultTheme = createTheme();\nconst lowercaseFirstLetter = string => {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n};\nfunction resolveTheme({\n defaultTheme,\n theme,\n themeId\n}) {\n return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (props, styles) => styles[slot];\n}\nfunction processStyleArg(callableStyle, _ref) {\n let {\n ownerState\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n const resolvedStylesArg = typeof callableStyle === 'function' ? callableStyle(_extends({\n ownerState\n }, props)) : callableStyle;\n if (Array.isArray(resolvedStylesArg)) {\n return resolvedStylesArg.flatMap(resolvedStyle => processStyleArg(resolvedStyle, _extends({\n ownerState\n }, props)));\n }\n if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {\n const {\n variants = []\n } = resolvedStylesArg,\n otherStyles = _objectWithoutPropertiesLoose(resolvedStylesArg, _excluded2);\n let result = otherStyles;\n variants.forEach(variant => {\n let isMatch = true;\n if (typeof variant.props === 'function') {\n isMatch = variant.props(_extends({\n ownerState\n }, props, ownerState));\n } else {\n Object.keys(variant.props).forEach(key => {\n if ((ownerState == null ? void 0 : ownerState[key]) !== variant.props[key] && props[key] !== variant.props[key]) {\n isMatch = false;\n }\n });\n }\n if (isMatch) {\n if (!Array.isArray(result)) {\n result = [result];\n }\n result.push(typeof variant.style === 'function' ? variant.style(_extends({\n ownerState\n }, props, ownerState)) : variant.style);\n }\n });\n return result;\n }\n return resolvedStylesArg;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n const systemSx = props => {\n return styleFunctionSx(_extends({}, props, {\n theme: resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }))\n }));\n };\n systemSx.__mui_systemSx = true;\n return (tag, inputOptions = {}) => {\n // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.\n processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))\n } = inputOptions,\n options = _objectWithoutPropertiesLoose(inputOptions, _excluded3);\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, _extends({\n shouldForwardProp: shouldForwardPropOption,\n label\n }, options));\n const transformStyleArg = stylesArg => {\n // On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg || isPlainObject(stylesArg)) {\n return props => processStyleArg(stylesArg, _extends({}, props, {\n theme: resolveTheme({\n theme: props.theme,\n defaultTheme,\n themeId\n })\n }));\n }\n return stylesArg;\n };\n const muiStyledResolver = (styleArg, ...expressions) => {\n let transformedStyleArg = transformStyleArg(styleArg);\n const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];\n if (componentName && overridesResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {\n return null;\n }\n const styleOverrides = theme.components[componentName].styleOverrides;\n const resolvedStyleOverrides = {};\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {\n resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, _extends({}, props, {\n theme\n }));\n });\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsWithDefaultTheme.push(props => {\n var _theme$components;\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants;\n return processStyleArg({\n variants: themeVariants\n }, _extends({}, props, {\n theme\n }));\n });\n }\n if (!skipSx) {\n expressionsWithDefaultTheme.push(systemSx);\n }\n const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;\n if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {\n const placeholders = new Array(numOfCustomFnsApplied).fill('');\n // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.\n transformedStyleArg = [...styleArg, ...placeholders];\n transformedStyleArg.raw = [...styleArg.raw, ...placeholders];\n }\n const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n let displayName;\n if (componentName) {\n displayName = `${componentName}${capitalize(componentSlot || '')}`;\n }\n if (displayName === undefined) {\n displayName = `Styled(${getDisplayName(tag)})`;\n }\n Component.displayName = displayName;\n }\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n}","import resolveProps from '@mui/utils/resolveProps';\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n return resolveProps(theme.components[name].defaultProps, props);\n}","'use client';\n\nimport getThemeProps from './getThemeProps';\nimport useTheme from '../useTheme';\nexport default function useThemeProps({\n props,\n name,\n defaultTheme,\n themeId\n}) {\n let theme = useTheme(defaultTheme);\n if (themeId) {\n theme = theme[themeId] || theme;\n }\n const mergedProps = getThemeProps({\n theme,\n name,\n props\n });\n return mergedProps;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport clamp from '@mui/utils/clamp';\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return clamp(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nexport function hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : _formatMuiErrorMessage(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : _formatMuiErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nexport const colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexport const private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nexport function rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nexport function private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nexport function private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nexport function blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, mixins) {\n return _extends({\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n }\n }, mixins);\n}","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"mode\", \"contrastThreshold\", \"tonalOffset\"];\nimport { deepmerge } from '@mui/utils';\nimport { darken, getContrastRatio, lighten } from '@mui/system';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport purple from '../colors/purple';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport lightBlue from '../colors/lightBlue';\nimport green from '../colors/green';\nexport const light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport const dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2\n } = palette,\n other = _objectWithoutPropertiesLoose(palette, _excluded);\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = _extends({}, color);\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\nThe color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from \"@mui/material/colors\";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });` : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n const modes = {\n dark,\n light\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!modes[mode]) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: _extends({}, common),\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset\n }, modes[mode]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"];\nimport { deepmerge } from '@mui/utils';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const _ref = typeof typography === 'function' ? typography(palette) : typography,\n {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}, casing, allVariants);\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge(_extends({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"duration\", \"easing\", \"delay\"];\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = _extends({}, easing, inputTransitions.easing);\n const mergedDuration = _extends({}, duration, inputTransitions.duration);\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n // IE11 support, replace with Number.isNaN\n // eslint-disable-next-line no-restricted-globals\n const isNumber = value => !isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return _extends({\n getAutoHeightDuration,\n create\n }, inputTransitions, {\n easing: mergedEasing,\n duration: mergedDuration\n });\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"breakpoints\", \"mixins\", \"spacing\", \"palette\", \"transitions\", \"typography\", \"shape\"];\nimport { deepmerge } from '@mui/utils';\nimport { createTheme as systemCreateTheme, unstable_defaultSxConfig as defaultSxConfig, unstable_styleFunctionSx as styleFunctionSx } from '@mui/system';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport createTransitions from './createTransitions';\nimport zIndex from './zIndex';\nfunction createTheme(options = {}, ...args) {\n const {\n mixins: mixinsInput = {},\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (options.vars) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`vars\\` is a private field used for CSS variables support.\nPlease use another name.` : _formatMuiErrorMessage(18));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: _extends({}, zIndex)\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (key in node) {\n const child = node[key];\n if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.indexOf('Mui') === 0) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createTheme(...args);\n}\nexport default createTheme;","'use client';\n\nimport createTheme from './createTheme';\nconst defaultTheme = createTheme();\nexport default defaultTheme;","export default '$$material';","'use client';\n\nimport { useThemeProps as systemUseThemeProps } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport default function useThemeProps({\n props,\n name\n}) {\n return systemUseThemeProps({\n props,\n name,\n defaultTheme,\n themeId: THEME_ID\n });\n}","'use client';\n\nimport { createStyled, shouldForwardProp } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';\nexport const slotShouldForwardProp = shouldForwardProp;\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"inheritViewBox\", \"titleAccess\", \"viewBox\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport { getSvgIconUtilityClass } from './svgIconClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3;\n return {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n // the will define the property that has `currentColor`\n // e.g. heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',\n flexShrink: 0,\n transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {\n duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter\n }),\n fontSize: {\n inherit: 'inherit',\n small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',\n medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',\n large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'\n }[ownerState.fontSize],\n // TODO v5 deprecate, v6 remove for sx\n color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : {\n action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active,\n disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled,\n inherit: undefined\n }[ownerState.color]\n };\n});\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = _extends({}, props, {\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n });\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, more, other, hasSvgAsChild && children.props, {\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', '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 fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\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 * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport SvgIcon from '../SvgIcon';\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, _extends({\n \"data-testid\": `${displayName}Icon`,\n ref: ref\n }, props, {\n children: path\n }));\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));\n}","'use client';\n\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/base/ClassNameGenerator';\nexport { default as capitalize } from './capitalize';\nexport { default as createChainedFunction } from './createChainedFunction';\nexport { default as createSvgIcon } from './createSvgIcon';\nexport { default as debounce } from './debounce';\nexport { default as deprecatedPropType } from './deprecatedPropType';\nexport { default as isMuiElement } from './isMuiElement';\nexport { default as ownerDocument } from './ownerDocument';\nexport { default as ownerWindow } from './ownerWindow';\nexport { default as requirePropFactory } from './requirePropFactory';\nexport { default as setRef } from './setRef';\nexport { default as unstable_useEnhancedEffect } from './useEnhancedEffect';\nexport { default as unstable_useId } from './useId';\nexport { default as unsupportedProp } from './unsupportedProp';\nexport { default as useControlled } from './useControlled';\nexport { default as useEventCallback } from './useEventCallback';\nexport { default as useForkRef } from './useForkRef';\nexport { default as useIsFocusVisible } from './useIsFocusVisible';\n// TODO: remove this export once ClassNameGenerator is stable\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const unstable_ClassNameGenerator = {\n configure: generator => {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(['MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.', '', \"You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead\", '', 'The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401', '', 'The updated documentation: https://mui.com/guides/classname-generator/'].join('\\n'));\n }\n ClassNameGenerator.configure(generator);\n }\n};","\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\nvar _utils = require(\"@mui/material/utils\");","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m10 17 5-5-5-5z\"\n}), 'ArrowRight');","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nexport function isHostComponent(element) {\n return typeof element === 'string';\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { isHostComponent } from './isHostComponent';\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nexport function appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return _extends({}, otherProps, {\n ownerState: _extends({}, otherProps.ownerState, ownerState)\n });\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}","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nexport function extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nexport function resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nexport function omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport clsx from 'clsx';\nimport { extractEventHandlers } from './extractEventHandlers';\nimport { omitEventHandlers } from './omitEventHandlers';\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nexport function mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}","'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}","import { globalStateClasses } from '@mui/utils/generateUtilityClass';\nconst GLOBAL_CLASS_PREFIX = 'base';\nfunction buildStateClass(state) {\n return `${GLOBAL_CLASS_PREFIX}--${state}`;\n}\nfunction buildSlotClass(componentName, slot) {\n return `${GLOBAL_CLASS_PREFIX}-${componentName}-${slot}`;\n}\nexport function generateUtilityClass(componentName, slot) {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? buildStateClass(globalStateClass) : buildSlotClass(componentName, slot);\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import { generateUtilityClass } from '../generateUtilityClass';\nexport function generateUtilityClasses(componentName, slots) {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot);\n });\n return result;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://mui.com/base-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://mui.com/base-ui/react-portal/components-api/#portal)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n // @ts-expect-error TODO upstream fix\n const handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? children.ref : null, forwardedRef);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(forwardedRef, mountNode);\n return () => {\n setRef(forwardedRef, null);\n };\n }\n return undefined;\n }, [forwardedRef, mountNode, disablePortal]);\n if (disablePortal) {\n if ( /*#__PURE__*/React.isValidElement(children)) {\n const newProps = {\n ref: handleRef\n };\n return /*#__PURE__*/React.cloneElement(children, newProps);\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: children\n });\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport { Portal };","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];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","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 };","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 { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","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 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 { 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}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\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 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 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 default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\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}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\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};","export default function getVariation(placement) {\n return placement.split('-')[1];\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 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};","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 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}","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\";\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 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 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}","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 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 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 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 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 { 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 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};","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};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\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 getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\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}","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 { 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}","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 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 };","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 { generateUtilityClass } from '../generateUtilityClass';\nimport { generateUtilityClasses } from '../generateUtilityClasses';\nconst COMPONENT_NAME = 'Popper';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass(COMPONENT_NAME, slot);\n}\nexport const popperClasses = generateUtilityClasses(COMPONENT_NAME, ['root']);","'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 the TypeScript types and run `pnpm 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 * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 };","'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}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default {\n disabled: false\n};","import PropTypes from 'prop-types';\nexport var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number,\n appear: PropTypes.number\n}).isRequired]) : null;\nexport var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string,\n active: PropTypes.string\n}), PropTypes.shape({\n enter: PropTypes.string,\n enterDone: PropTypes.string,\n enterActive: PropTypes.string,\n exit: PropTypes.string,\n exitDone: PropTypes.string,\n exitActive: PropTypes.string\n})]) : null;","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n var _style$transitionDura, _style$transitionTimi;\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: (_style$transitionDura = style.transitionDuration) != null ? _style$transitionDura : typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,\n easing: (_style$transitionTimi = style.transitionTimingFunction) != null ? _style$transitionTimi : typeof easing === 'object' ? easing[options.mode] : easing,\n delay: style.transitionDelay\n };\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"addEndListener\", \"appear\", \"children\", \"easing\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { elementAcceptingRef, unstable_useTimeout as useTimeout } from '@mui/utils';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps, reflow } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n\n/*\n TODO v6: remove\n Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.\n */\nconst isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\\/)15(.|_)4/i.test(navigator.userAgent);\n\n/**\n * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and\n * [Popover](/material-ui/react-popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const timer = useTimeout();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, children.ref, ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay: isWebKit154 ? delay : delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = 0;\n node.style.transform = getScale(0.75);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTimeout.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n }\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"anchorEl\", \"component\", \"components\", \"componentsProps\", \"container\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"transition\", \"slots\", \"slotProps\"];\nimport { Popper as BasePopper } from '@mui/base/Popper';\nimport { useThemeWithoutDefault as useTheme } from '@mui/system';\nimport { HTMLElementType, refType } from '@mui/utils';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { styled, useThemeProps } from '../styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n name: 'MuiPopper',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://mui.com/material-ui/react-menu/)\n * - [Popper](https://mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n var _slots$root;\n const theme = useTheme();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPopper'\n });\n const {\n anchorEl,\n component,\n components,\n componentsProps,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;\n const otherProps = _extends({\n anchorEl,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition\n }, other);\n return /*#__PURE__*/_jsx(PopperRoot, _extends({\n as: component,\n direction: theme == null ? void 0 : theme.direction,\n slots: {\n root: RootComponent\n },\n slotProps: slotProps != null ? slotProps : componentsProps\n }, otherProps, {\n ref: ref\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 the TypeScript types and run `pnpm 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: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\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 components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 * 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 * 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 * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"arrow\", \"children\", \"classes\", \"components\", \"componentsProps\", \"describeChild\", \"disableFocusListener\", \"disableHoverListener\", \"disableInteractive\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"followCursor\", \"id\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"slotProps\", \"slots\", \"title\", \"TransitionComponent\", \"TransitionProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementAcceptingRef, unstable_useTimeout as useTimeout, unstable_Timeout as Timeout } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses, appendOwnerState } from '@mui/base';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport Grow from '../Grow';\nimport Popper from '../Popper';\nimport useEventCallback from '../utils/useEventCallback';\nimport useForkRef from '../utils/useForkRef';\nimport useId from '../utils/useId';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useControlled from '../utils/useControlled';\nimport tooltipClasses, { getTooltipUtilityClass } from './tooltipClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(({\n theme,\n ownerState,\n open\n}) => _extends({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none'\n}, !ownerState.disableInteractive && {\n pointerEvents: 'auto'\n}, !open && {\n pointerEvents: 'none'\n}, ownerState.arrow && {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {\n left: 0,\n marginLeft: '-0.71em'\n } : {\n right: 0,\n marginRight: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n }),\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {\n right: 0,\n marginRight: '-0.71em'\n } : {\n left: 0,\n marginLeft: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n })\n}));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.arrow && {\n position: 'relative',\n margin: 0\n}, ownerState.touch && {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n}, {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: _extends({\n transformOrigin: 'right center'\n }, !ownerState.isRtl ? _extends({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n }) : _extends({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n })),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: _extends({\n transformOrigin: 'left center'\n }, !ownerState.isRtl ? _extends({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n }) : _extends({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n })),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: _extends({\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n }, ownerState.touch && {\n marginBottom: '24px'\n }),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: _extends({\n transformOrigin: 'center top',\n marginTop: '14px'\n }, ownerState.touch && {\n marginTop: '24px'\n })\n}));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n}));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return event => {\n if (eventHandler) {\n eventHandler(event);\n }\n handler(event);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n var _ref, _slots$popper, _ref2, _ref3, _slots$transition, _ref4, _slots$tooltip, _ref5, _slots$arrow, _slotProps$popper, _ref6, _slotProps$popper2, _slotProps$transition, _slotProps$tooltip, _ref7, _slotProps$tooltip2, _slotProps$arrow, _ref8, _slotProps$arrow2;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp = Grow,\n TransitionProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleEnter = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = useIsFocusVisible();\n // We don't necessarily care about the focusVisible state (which is safe to access via ref anyway).\n // We just need to re-render the Tooltip if the focus-visible state changes.\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n handleBlurVisible(event);\n if (isFocusVisibleRef.current === false) {\n setChildIsFocusVisible(false);\n handleLeave(event);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n handleFocusVisible(event);\n if (isFocusVisibleRef.current === true) {\n setChildIsFocusVisible(true);\n handleEnter(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleMouseOver = handleEnter;\n const handleMouseLeave = handleLeave;\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleEnter(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Bink?) use 'Esc'\n if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = _extends({}, nameOrDescProps, other, children.props, {\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n }, followCursor ? {\n onMouseMove: handleMouseMove\n } : {});\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const popperOptions = React.useMemo(() => {\n var _PopperProps$popperOp;\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if ((_PopperProps$popperOp = PopperProps.popperOptions) != null && _PopperProps$popperOp.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n return _extends({}, PopperProps.popperOptions, {\n modifiers: tooltipModifiers\n });\n }, [arrowRef, PopperProps]);\n const ownerState = _extends({}, props, {\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n });\n const classes = useUtilityClasses(ownerState);\n const PopperComponent = (_ref = (_slots$popper = slots.popper) != null ? _slots$popper : components.Popper) != null ? _ref : TooltipPopper;\n const TransitionComponent = (_ref2 = (_ref3 = (_slots$transition = slots.transition) != null ? _slots$transition : components.Transition) != null ? _ref3 : TransitionComponentProp) != null ? _ref2 : Grow;\n const TooltipComponent = (_ref4 = (_slots$tooltip = slots.tooltip) != null ? _slots$tooltip : components.Tooltip) != null ? _ref4 : TooltipTooltip;\n const ArrowComponent = (_ref5 = (_slots$arrow = slots.arrow) != null ? _slots$arrow : components.Arrow) != null ? _ref5 : TooltipArrow;\n const popperProps = appendOwnerState(PopperComponent, _extends({}, PopperProps, (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper, {\n className: clsx(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_ref6 = (_slotProps$popper2 = slotProps.popper) != null ? _slotProps$popper2 : componentsProps.popper) == null ? void 0 : _ref6.className)\n }), ownerState);\n const transitionProps = appendOwnerState(TransitionComponent, _extends({}, TransitionProps, (_slotProps$transition = slotProps.transition) != null ? _slotProps$transition : componentsProps.transition), ownerState);\n const tooltipProps = appendOwnerState(TooltipComponent, _extends({}, (_slotProps$tooltip = slotProps.tooltip) != null ? _slotProps$tooltip : componentsProps.tooltip, {\n className: clsx(classes.tooltip, (_ref7 = (_slotProps$tooltip2 = slotProps.tooltip) != null ? _slotProps$tooltip2 : componentsProps.tooltip) == null ? void 0 : _ref7.className)\n }), ownerState);\n const tooltipArrowProps = appendOwnerState(ArrowComponent, _extends({}, (_slotProps$arrow = slotProps.arrow) != null ? _slotProps$arrow : componentsProps.arrow, {\n className: clsx(classes.arrow, (_ref8 = (_slotProps$arrow2 = slotProps.arrow) != null ? _slotProps$arrow2 : componentsProps.arrow) == null ? void 0 : _ref8.className)\n }), ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperComponent, _extends({\n as: PopperComponentProp != null ? PopperComponentProp : Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true\n }, interactiveWrapperListeners, popperProps, {\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionComponent, _extends({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, transitionProps, {\n children: /*#__PURE__*/_jsxs(TooltipComponent, _extends({}, tooltipProps, {\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowComponent, _extends({}, tooltipArrowProps, {\n ref: setArrowRef\n })) : null]\n }))\n }))\n }))]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `slots` prop.\n * It's recommended to use the `slots` prop instead.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `slotProps` prop.\n * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @default Popper\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](/material-ui/api/popper/) element.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: 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 * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","import '@/components/mui/menu-item.component.css';\nimport ArrowRightIcon from '@mui/icons-material/ArrowRight';\nimport {\n ListItemIcon as MuiListItemIcon,\n ListItemText as MuiListItemText,\n MenuItem as MuiMenuItem,\n} from '@mui/material';\nimport Tooltip from '@mui/material/Tooltip';\nimport { Localized, ReferencedItem, SingleColumnMenu } from 'platform-bible-utils';\nimport { MouseEvent, PropsWithChildren } from 'react';\n\ntype MenuItemInfoBase = {\n /** Text (displayable in the UI) as the name of the menu item */\n label: string;\n /** Text to display when the mouse hovers over the menu item */\n tooltip?: string;\n};\n\nexport type Command = MenuItemInfoBase & {\n /** Command to execute (string.string) */\n command: string;\n};\n\ntype SubMenu = MenuItemInfoBase & {\n /** Command to execute (string.string) */\n items: MenuItemInfo[];\n};\n\nexport interface CommandHandler {\n (command: Command): void;\n}\n\nexport type MenuPropsBase = {\n /*\n * The JSON defining the menu whose items are to be rendered. This will typically be one of the\n * menus in the \"defs\" in a Platform.Bible menu (see PlatformMenus). The schema for this is\n * menuDocumentSchema (at the end of menus.model.ts). Note that while this is a\n * \"SingleColumnMenu\", somewhat bizarrely, a MultiColumnMenu is a SingleColumnMenu, so it really\n * could be a MultiColumnMenu, in which case, column had better be defined so it can be used\n * to filter out the actual groups and items to display on the column.\n */\n menuDefinition: Localized;\n\n commandHandler: CommandHandler;\n\n /**\n * Additional action to perform when any menu item is clicked. Allows the caller to handle event\n * (e.g., to close the menu).\n */\n onClick?: (event: MouseEvent) => void;\n};\n\nexport type MenuItemListProps = MenuPropsBase & {\n /** Optional unique (column) identifier */\n columnId?: ReferencedItem;\n};\n\nexport type MenuItemProps = Omit &\n PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n\n onClick: (event: MouseEvent) => void;\n }>;\n\ntype MenuItemInfo = (Command | SubMenu) & {\n /**\n * If specified, menu item will be inset if it does not have a leading icon.\n *\n * @default true\n */\n allowForLeadingIcons?: boolean;\n /**\n * If specified, the path to the icon image to display on the leading side of the menu text.\n *\n * @default undefined (no leading icon will be shown)\n */\n iconPathBefore?: string;\n /**\n * If specified, the path to the icon image to display on the trailing side of the menu text.\n *\n * @default undefined (no trailing icon will be shown)\n */\n iconPathAfter?: string;\n /**\n * If true, list item is focused during the first mount\n *\n * @default false\n */\n hasAutoFocus?: boolean;\n\n /** Additional css classes to help with unique styling of the menu item */\n className?: string;\n\n /**\n * If true, the menu item will appear disabled and it will not respond to clicks or mouse hovers.\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * If true, compact vertical padding designed for keyboard and mouse input is used.\n *\n * @default true\n */\n isDense?: boolean;\n\n /**\n * If true, a right-arrow icon will be displayed (iconPathAfter, if specified, will be ignored).\n *\n * @default false\n */\n isSubMenuParent?: boolean;\n\n /**\n * If true, the left and right padding is removed\n *\n * @default false\n */\n hasDisabledGutters?: boolean;\n\n /**\n * If true, a 1px light border is added to bottom of menu item\n *\n * @default false\n */\n hasDivider?: boolean;\n\n /** Help identify which element has keyboard focus */\n focusVisibleClassName?: string;\n\n /** If it's a submenu, it should have the items property */\n items?: MenuItemInfo[];\n};\n\nfunction getIcon(icon: string | undefined, menuLabel: string, leading: boolean) {\n return icon ? (\n \n {`${leading\n \n ) : undefined;\n}\n\nexport default function MenuItem(props: MenuItemProps) {\n const {\n onClick,\n label,\n tooltip,\n allowForLeadingIcons = true,\n iconPathBefore = undefined,\n iconPathAfter = undefined,\n hasAutoFocus = false,\n className,\n isDisabled = false,\n isDense = true,\n isSubMenuParent = false,\n hasDisabledGutters = false,\n hasDivider = false,\n focusVisibleClassName,\n id,\n children,\n } = props;\n\n const menuItem = (\n \n {label ? (\n <>\n {getIcon(iconPathBefore, label, true)}\n \n {isSubMenuParent ? (\n \n \n \n ) : (\n getIcon(iconPathAfter, label, false)\n )}\n \n ) : (\n children\n )}\n \n );\n\n return tooltip ? (\n \n
{menuItem}
\n
\n ) : (\n menuItem\n );\n}\n","import MenuItem, {\n MenuItemListProps,\n MenuItemProps,\n MenuPropsBase,\n} from '@/components/mui/menu-item.component';\nimport { Menu } from '@mui/material';\nimport {\n Localized,\n MenuGroupDetailsInSubMenu,\n MenuItemContainingCommand,\n MenuItemContainingSubmenu,\n OrderedExtensibleContainer,\n ReferencedItem,\n SingleColumnMenu,\n} from 'platform-bible-utils';\nimport { MouseEvent, useMemo, useState } from 'react';\n\n/**\n * All the exported types in this file should be regarded as \"internal\" (i.e., they should not be\n * exposed via index.ts).\n */\n\nexport type GroupedMenuPropsBase = MenuPropsBase & {\n /** Optional unique (column) identifier */\n columnId?: ReferencedItem;\n};\n\nexport type GroupedMenuItemListProps = MenuItemListProps & {\n /**\n * If the menuDefinition includes \"top-level\" groups (i.e., those that belong to a column as\n * opposed to those that belong to a submenu) that should not be included in the list, then this\n * array specifies which groups to include. Likewise, for a submenu, this list indicates which\n * groups are pertinent for that submenu. So then for a context menu this property need not be\n * specified since it is a top-level menu based on a \"true\" SingleColumnMenu (i.e., one that is\n * not a MultiColumnMenu).\n */\n includedGroups?: {\n id: string;\n group: Localized;\n }[];\n};\n\ninterface ItemInfo {\n item: Localized;\n isLastItemInGroup: boolean;\n}\n\ntype SubMenuProps = MenuPropsBase & {\n parentMenuItem: Localized;\n parentItemProps: Omit, 'iconPathAfter'>;\n};\n\nfunction getAllGroups(menuDefinition: Localized) {\n const groupEntries = Object.entries(menuDefinition.groups);\n // Convert array of entries to array of objects with id and group properties\n return groupEntries.map(([key, value]) => ({ id: key, group: value }));\n}\n\nfunction SubMenu(props: SubMenuProps) {\n const [anchorEl, setAnchorEl] = useState(undefined);\n\n const { parentMenuItem, parentItemProps, menuDefinition } = props;\n\n const handleParentMenuItemClick = (event: MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(undefined);\n };\n\n const renderSubMenuItems = () => {\n let includedGroups = getAllGroups(menuDefinition).filter((g) => 'menuItem' in g.group);\n\n // Ensure valid parent menu was provided. (If not, submenu will contain all groups!)\n if (!parentMenuItem?.id) throw new Error('A valid parent menu item is required for submenus.');\n\n // When laying out a submenu, only include groups associated with the provided parent menu.\n // Note: without the (annoying) redundant check that the included groups\n // have the menuItem field, TS doesn't think it exists.\n includedGroups = includedGroups.filter(\n (group) => 'menuItem' in group.group && group.group.menuItem === parentMenuItem.id,\n );\n\n return ;\n };\n\n return (\n <>\n \n \n {renderSubMenuItems()}\n \n \n );\n}\n\nconst getOrderedGroupItems = (\n groupId: string,\n allItems: Localized[],\n) => {\n // Filter items that belong to the specified group\n const itemsForGroup = allItems.filter((item) => item.group === groupId);\n // Sort items based on order\n const sortedItems = itemsForGroup.sort((a, b) => (a.order || 0) - (b.order || 0));\n return sortedItems;\n};\n\n/**\n * This component is internal; it does not need to be exposed to the outside world since it is not\n * useful on its own. It is used to generate and lay out the MenuItems that appear either on a\n * top-level menu (in a GridMenu or ContextMenu) or in a submenu.\n */\nexport default function GroupedMenuItemList(menuProps: GroupedMenuItemListProps) {\n const { menuDefinition, onClick, commandHandler, includedGroups } = menuProps;\n\n const { items, allowForLeadingIcons } = useMemo(() => {\n const groupsToInclude =\n includedGroups && includedGroups.length > 0\n ? includedGroups\n : // We're apparently laying out a single-column menu (presumably a context menu). In this\n // case, all groups should be included except ones that belong to a submenu.\n getAllGroups(menuDefinition).filter((g) => !('menuItem' in g.group));\n\n const sortedGroups = Object.values(groupsToInclude).sort(\n (a, b) => (a.group.order || 0) - (b.group.order || 0),\n );\n\n const itemArray: ItemInfo[] = [];\n\n sortedGroups.forEach((group) => {\n getOrderedGroupItems(group.id, menuDefinition.items).forEach((item) =>\n itemArray.push({ item, isLastItemInGroup: false }),\n );\n if (itemArray.length > 0) itemArray[itemArray.length - 1].isLastItemInGroup = true;\n });\n\n // No divider after last item in final group.\n if (itemArray.length > 0) itemArray[itemArray.length - 1].isLastItemInGroup = false;\n\n const allowSpaceForLeadingIcons = itemArray.some(\n (i) => 'iconPathBefore' in i.item && i.item.iconPathBefore,\n );\n\n return { items: itemArray, allowForLeadingIcons: allowSpaceForLeadingIcons };\n }, [includedGroups, menuDefinition]);\n\n // Create props for MenuItem component including setting hasDivider for the last item in a group\n const createMenuItemProps = ({ item, isLastItemInGroup }: ItemInfo) => {\n const menuItemProps = {\n className: 'papi-menu-item',\n label: item.label,\n tooltip: item.tooltip,\n iconPathBefore: 'iconPathBefore' in item ? item.iconPathBefore : undefined,\n iconPathAfter: 'iconPathAfter' in item ? item.iconPathAfter : undefined,\n hasDivider: isLastItemInGroup, // Set hasDivider to true for the last item in a group\n allowForLeadingIcons,\n };\n\n return menuItemProps;\n };\n\n const [firstItem] = items;\n\n if (!firstItem) return
;\n\n const divKey = firstItem.item.group;\n\n return (\n
\n {items.map((itemInfo, index) => {\n const { item } = itemInfo;\n const menuItemProps = createMenuItemProps(itemInfo);\n if ('command' in item) {\n const key = item.group + index;\n return (\n ) => {\n onClick?.(event);\n commandHandler(item);\n }}\n {...menuItemProps}\n />\n );\n }\n return (\n \n );\n })}\n
\n );\n}\n","import GroupedMenuItemList from '@/components/mui/grouped-menu-item-list.component';\nimport { MenuItemListProps } from '@/components/mui/menu-item.component';\nimport { MultiColumnMenu } from 'platform-bible-utils';\n\n/**\n * This component is internal; it does not need to be exposed to the outside world since it is not\n * useful on its own. Use either GridMenu or ContextMenu.\n */\nexport default function TopLevelMenu(props: MenuItemListProps) {\n const { menuDefinition, columnId } = props;\n\n const groupEntries = Object.entries(menuDefinition.groups);\n // Convert array of entries to array of objects with id and group properties\n const groups = groupEntries.map(([key, value]) => ({ id: key, group: value }));\n let includedGroups = groups.filter((g) => 'column' in g.group);\n\n // Check if column is provided and menuDefinition is a MultiColumnMenu\n if (\n columnId &&\n 'columns' in menuDefinition &&\n // Without this type assertion, TS doesn't know what columns is.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n (menuDefinition as MultiColumnMenu).columns[columnId]\n ) {\n // When laying out a single column in a MultiColumnMenu, only include groups associated with\n // the provided column. Note: without the (annoying) redundant check that the included groups\n // have the colum field, TS doesn't think it exists.\n includedGroups = includedGroups.filter(\n (g) => 'column' in g.group && g.group.column === columnId,\n );\n }\n\n return ;\n}\n","import '@/components/mui/grid-menu.component.css';\nimport { GroupedMenuPropsBase } from '@/components/mui/grouped-menu-item-list.component';\nimport { CommandHandler } from '@/components/mui/menu-item.component';\nimport TopLevelMenu from '@/components/mui/top-level-menu.component';\nimport { Grid, List } from '@mui/material';\nimport {\n Localized,\n MenuColumnWithHeader,\n MultiColumnMenu,\n ReferencedItem,\n} from 'platform-bible-utils';\nimport { useMemo } from 'react';\n\ntype ColumnInfo = {\n /*\n * The ID (`${string}.${string}`) of a specific menu column.\n */\n id: ReferencedItem;\n\n /*\n * Metadata (label, order, etc.) for a specific menu column.\n */\n metadata: Localized;\n};\n\ntype MenuColumnProps = ColumnInfo &\n GroupedMenuPropsBase & {\n /** Additional css classes to help with unique styling of the menu column */\n className?: string;\n };\n\nexport type GridMenuInfo = {\n /** The menu object containing information about the columns, groups, and items to display. */\n multiColumnMenu: Localized;\n};\n\nexport type GridMenuProps = GridMenuInfo & {\n /** Optional unique identifier */\n id?: string;\n\n commandHandler: CommandHandler;\n\n /** Additional css classes to help with unique styling of the grid menu */\n className?: string;\n};\n\nfunction MenuColumn({\n commandHandler,\n menuDefinition,\n id,\n metadata,\n onClick,\n className,\n}: MenuColumnProps) {\n return (\n \n

\n {metadata.label}\n

\n {/* It would seem as though this List component were unnecessary, since it only contains one\n thing, but the \"dense\" property does affect the layout of the items (in a way I don't fully\n understand). There might be a better way. */}\n \n \n \n \n );\n}\n\nexport default function GridMenu({\n commandHandler,\n className,\n multiColumnMenu,\n id,\n}: GridMenuProps) {\n const { columns } = multiColumnMenu;\n\n const sortedColumns = useMemo(() => {\n const columnNumbers = new Map();\n Object.getOwnPropertyNames(columns).forEach((columnName: string) => {\n // We know for sure there is a (boolean) property 'isExtensible' that we are not interested in.\n if (columnName === 'isExtensible') return;\n // TS doesn't allow `columnName` above to be a ReferencedItem even though the type says it is\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const columnId = columnName as ReferencedItem;\n const column = columns[columnId];\n // As of right now (and hopefully forever after), all remaining properties of the\n // ColumnsWithHeaders object are columns whose property names are the IDs of the columns.\n // This is an additional (redundant) sanity check. Specifically we're interested in\n // MenuColumnWithHeader objects, which TypeScript now \"knows\" we have, but at runtime all we\n // can check for is that it's an object with a valid numeric order field. That's likely good\n // enough.\n if (\n typeof column === 'object' &&\n typeof column.order === 'number' &&\n !Number.isNaN(column.order)\n )\n columnNumbers.set(column.order, { id: columnId, metadata: column });\n else\n console.warn(\n `Property ${columnName} (${typeof column}) on menu ${id} is not a valid column and is being ignored. This might indicate data corruption`,\n );\n });\n\n // Extract values and sort them based on the 'order' property\n return Array.from(columnNumbers.values()).sort((a, b) => {\n return (a.metadata.order || 0) - (b.metadata.order || 0);\n });\n }, [columns, id]);\n\n // We might need something like this if we need to be able to prevent empty columns\n // sortedColumns.filter((c) => multiColumnMenu.groups.some((g) => 'column' in g && (g as .column)...\n\n return (\n \n {sortedColumns.map((col, index) => (\n \n ))}\n \n );\n}\n","import { useEffect, useRef, useState } from 'react';\n\nexport type UsePromiseOptions = {\n /**\n * Whether to leave the value as the most recent resolved promise value or set it back to\n * defaultValue while running the promise again. Defaults to true\n */\n preserveValue?: boolean;\n};\n\n/** Set up defaults for options for usePromise hook */\nfunction getUsePromiseOptionsDefaults(options: UsePromiseOptions): UsePromiseOptions {\n return {\n preserveValue: true,\n ...options,\n };\n}\n\n/**\n * Awaits a promise and returns a loading value while the promise is unresolved\n *\n * @param promiseFactoryCallback A function that returns the promise to await. If this callback is\n * undefined, the current value will be returned (defaultValue unless it was previously changed\n * and `options.preserveValue` is true), and there will be no loading.\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n * @param defaultValue The initial value to return while first awaiting the promise. If\n * `options.preserveValue` is false, this value is also shown while awaiting the promise on\n * subsequent calls.\n *\n * Note: this parameter is internally assigned to a `ref`, so changing it will not cause any hooks\n * to re-run with its new value. This means that, if the `promiseFactoryCallback` changes and\n * `options.preserveValue` is `false`, the returned value will be set to the current\n * `defaultValue`. However, the returned value will not be updated if`defaultValue` changes.\n * @param options Various options for adjusting how this hook runs the `promiseFactoryCallback`\n *\n * Note: this parameter is internally assigned to a `ref`, so changing it will not cause any hooks\n * to re-run with its new value. However, the latest `options.preserveValue` will always be used\n * appropriately to determine whether to preserve the returned value when changing the\n * `promiseFactoryCallback`\n * @returns `[value, isLoading]`\n *\n * - `value`: the current value for the promise, either the defaultValue or the resolved promise value\n * - `isLoading`: whether the promise is waiting to be resolved\n */\nconst usePromise = (\n promiseFactoryCallback: (() => Promise) | undefined,\n defaultValue: T,\n options: UsePromiseOptions = {},\n): [value: T, isLoading: boolean] => {\n // Use defaultValue as a ref so it doesn't update dependency arrays\n const defaultValueRef = useRef(defaultValue);\n defaultValueRef.current = defaultValue;\n // Use options as a ref so it doesn't update dependency arrays\n const optionsDefaultedRef = useRef(options);\n optionsDefaultedRef.current = getUsePromiseOptionsDefaults(optionsDefaultedRef.current);\n\n const [value, setValue] = useState(() => defaultValueRef.current);\n const [isLoading, setIsLoading] = useState(true);\n useEffect(() => {\n let promiseIsCurrent = true;\n // If a promiseFactoryCallback was provided, we are loading. Otherwise, there is no loading to do\n setIsLoading(!!promiseFactoryCallback);\n (async () => {\n // If there is a callback to run, run it\n if (promiseFactoryCallback) {\n const result = await promiseFactoryCallback();\n // If the promise was not already replaced, update the value\n if (promiseIsCurrent) {\n setValue(() => result);\n setIsLoading(false);\n }\n }\n })();\n\n return () => {\n // Mark this promise as old and not to be used\n promiseIsCurrent = false;\n if (!optionsDefaultedRef.current.preserveValue) setValue(() => defaultValueRef.current);\n };\n }, [promiseFactoryCallback]);\n\n return [value, isLoading];\n};\nexport default usePromise;\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: \"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z\"\n}), 'Menu');","import GridMenu from '@/components/mui/grid-menu.component';\nimport { Command, CommandHandler } from '@/components/mui/menu-item.component';\nimport usePromise from '@/hooks/use-promise.hook';\nimport { Menu as MenuIcon } from '@mui/icons-material';\nimport { Drawer, IconButton } from '@mui/material';\nimport { Localized, MultiColumnMenu } from 'platform-bible-utils';\nimport {\n MouseEvent,\n MutableRefObject,\n PropsWithChildren,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nexport interface MultiColumnMenuProvider {\n (isSupportAndDevelopment: boolean): Promise>;\n}\n\nexport type HamburgerMenuButtonProps = PropsWithChildren & {\n /** The handler to use for menu commands (and eventually toolbar commands). */\n commandHandler: CommandHandler;\n\n /**\n * Optional reference to the \"div\" container that determines the where the menu should appear. If\n * not defined, then (1,1) used.\n */\n containerRef?: MutableRefObject;\n\n /**\n * The delegate to use to get the menu data. If not specified or if it returns undefined, the data\n * in normalMenu or fullMenu property will be used.\n */\n menuProvider?: MultiColumnMenuProvider;\n\n /**\n * The menu data to show when the menu is opened if the menuProvider property is not defined.\n * (This allows for a default or test-only static menu to be used.)\n */\n normalMenu?: Localized;\n\n /**\n * The menu data to show for \"full\" menu (when opened with the SHIFT key pressed) if the\n * menuProvider property is not defined. (This allows for a default or test-only static menu to be\n * used.)\n */\n fullMenu?: Localized;\n\n /** Additional css class(es) to help with unique styling of the sub-components */\n className?: string;\n\n /** Value to use as prefix for ARIA labels on interactive sub-components */\n ariaLabelPrefix?: string;\n};\n\nexport default function HamburgerMenuButton({\n menuProvider,\n normalMenu,\n fullMenu,\n commandHandler,\n containerRef,\n className,\n ariaLabelPrefix,\n children,\n}: HamburgerMenuButtonProps) {\n const [isMenuOpen, setMenuOpen] = useState(false);\n const [showFullMenu, setShowFullMenu] = useState(false);\n\n const handleMenuItemClick = useCallback(() => {\n if (isMenuOpen) setMenuOpen(false);\n setShowFullMenu(false);\n }, [isMenuOpen]);\n\n const handleMenuButtonClick = useCallback((e: MouseEvent) => {\n e.stopPropagation();\n setMenuOpen((prevIsOpen) => {\n const isOpening = !prevIsOpen;\n if (isOpening && e.shiftKey) setShowFullMenu(true);\n else if (!isOpening) setShowFullMenu(false);\n return isOpening;\n });\n }, []);\n\n const menuCommandHandler = useCallback(\n (command: Command) => {\n handleMenuItemClick();\n return commandHandler(command);\n },\n [commandHandler, handleMenuItemClick],\n );\n\n const [offset, setOffset] = useState({ top: 1, left: 1 });\n\n useEffect(() => {\n if (isMenuOpen) {\n const node = containerRef?.current;\n if (node) {\n const rect = node.getBoundingClientRect();\n const scrollTop = window.scrollY;\n const scrollLeft = window.scrollX;\n const top = rect.top + scrollTop + node.clientHeight;\n const left = rect.left + scrollLeft;\n setOffset({ top, left });\n }\n }\n }, [isMenuOpen, containerRef]);\n\n const [normalMenuData] = usePromise(\n useCallback(async () => {\n return menuProvider?.(false) ?? normalMenu;\n // isMenuOpen needs to be included for the menu contents to reevaluate when reopened\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [menuProvider, normalMenu, isMenuOpen]),\n normalMenu,\n );\n\n const [fullMenuData] = usePromise(\n useCallback(async () => {\n return menuProvider?.(true) ?? fullMenu ?? normalMenuData;\n // isMenuOpen needs to be included for the menu contents to reevaluate when reopened\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [menuProvider, fullMenu, normalMenuData, isMenuOpen]),\n fullMenu ?? normalMenuData,\n );\n\n const menu = showFullMenu && fullMenuData ? fullMenuData : normalMenuData;\n\n return (\n <>\n \n {children ?? }\n \n \n {menu ? (\n \n ) : undefined}\n \n \n );\n}\n","import '@/components/mui/icon-button.component.css';\nimport { IconButton as MuiIconButton } from '@mui/material';\nimport { MouseEventHandler, PropsWithChildren } from 'react';\n\nexport type IconButtonProps = PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n /**\n * Required. Used as both the tooltip (aka, title) and the aria-label (used for accessibility,\n * testing, etc.), unless a distinct tooltip is supplied.\n */\n label: string;\n /**\n * Enabled status of button\n *\n * @default false\n */\n isDisabled?: boolean;\n /** Optional tooltip to display if different from the aria-label. */\n tooltip?: string;\n /** If true, no tooltip will be displayed. */\n isTooltipSuppressed?: boolean;\n /**\n * If given, uses a negative margin to counteract the padding on one side (this is often helpful\n * for aligning the left or right side of the icon with content above or below, without ruining\n * the border size and shape).\n *\n * @default false\n */\n adjustMarginToAlignToEdge?: 'end' | 'start' | false;\n /**\n * The size of the component. small is equivalent to the dense button styling.\n *\n * @default false\n */\n size: 'small' | 'medium' | 'large';\n /** Additional css classes to help with unique styling of the button */\n className?: string;\n /** Optional click handler */\n onClick?: MouseEventHandler;\n}>;\n\n/**\n * Iconic button a user can click to do something\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction IconButton({\n id,\n label,\n isDisabled = false,\n tooltip,\n isTooltipSuppressed = false,\n adjustMarginToAlignToEdge = false,\n size = 'medium',\n className,\n onClick,\n children,\n}: IconButtonProps) {\n return (\n \n {children /* the icon to display */}\n \n );\n}\n\nexport default IconButton;\n","import { cn } from '@/utils/shadcn-ui.util';\nimport { LoaderCircle, LucideProps } from 'lucide-react';\nimport { forwardRef } from 'react';\n\nexport type SpinnerProps = LucideProps;\n\nconst Spinner = forwardRef(({ className, ...props }, ref) => {\n return (\n \n );\n});\n\nSpinner.displayName = 'Spinner';\n\nexport default Spinner;\n","import { Input as ShadInput } from '@/components/shadcn-ui/input';\nimport { Label as ShadLabel } from '@/components/shadcn-ui/label';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { ChangeEventHandler, FocusEventHandler } from 'react';\n\nexport type TextFieldProps = {\n /** Optional unique identifier */\n id?: string;\n /**\n * If `true`, the component is disabled.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * If `true`, the label is displayed in an error state.\n *\n * @default false\n */\n hasError?: boolean;\n /**\n * If `true`, the input will take up the full width of its container.\n *\n * @default false\n */\n isFullWidth?: boolean;\n /** Text that gives the user instructions on what contents the TextField expects */\n helperText?: string;\n /** The title of the TextField */\n label?: string;\n /** The short hint displayed in the `input` before the user enters a value. */\n placeholder?: string;\n /**\n * If `true`, the label is displayed as required and the `input` element is required.\n *\n * @default false\n */\n isRequired?: boolean;\n /** Additional css classes to help with unique styling of the text field */\n className?: string;\n /** Starting value for the text field if it is not controlled */\n defaultValue?: string | number;\n /** Value of the text field if controlled */\n value?: string | number;\n /** Triggers when content of textfield is changed */\n onChange?: ChangeEventHandler;\n /** Triggers when textfield gets focus */\n onFocus?: FocusEventHandler;\n /** Triggers when textfield loses focus */\n onBlur?: FocusEventHandler;\n};\n\n/**\n * Text input field\n *\n * Thanks to Shadcn for heavy inspiration and documentation\n * https://ui.shadcn.com/docs/components/input#with-label\n */\nfunction TextField({\n id,\n isDisabled = false,\n hasError = false,\n isFullWidth = false,\n helperText,\n label,\n placeholder,\n isRequired = false,\n className,\n defaultValue,\n value,\n onChange,\n onFocus,\n onBlur,\n}: TextFieldProps) {\n return (\n
\n {`${label}${isRequired ? '*' : ''}`}\n \n

{helperText}

\n
\n );\n}\n\nexport default TextField;\n","import HamburgerMenuButton, {\n MultiColumnMenuProvider,\n} from '@/components/mui/hamburger-menu-button.component';\nimport { CommandHandler } from '@/components/mui/menu-item.component';\nimport '@/components/mui/toolbar.component.css';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { AppBar, Toolbar as MuiToolbar } from '@mui/material';\nimport { PropsWithChildren, useRef } from 'react';\n\nexport type ToolbarProps = PropsWithChildren<{\n /** The handler to use for menu commands (and eventually toolbar commands). */\n commandHandler: CommandHandler;\n\n /**\n * The optional delegate to use to get the menu data. If not specified, the \"hamburger\" menu will\n * not display.\n */\n menuProvider?: MultiColumnMenuProvider;\n\n /** Optional unique identifier */\n id?: string;\n\n /** Additional css classes to help with unique styling of the toolbar */\n className?: string;\n}>;\n\nexport default function Toolbar({\n menuProvider,\n commandHandler,\n className,\n id,\n children,\n}: ToolbarProps) {\n // This ref will always be defined\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const containerRef = useRef(undefined!);\n\n return (\n
\n \n \n {menuProvider ? (\n \n ) : undefined}\n {children ?
{children}
: undefined}\n \n
\n
\n );\n}\n","import React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst alertVariants = cva(\n 'tw-relative tw-w-full tw-rounded-lg tw-border tw-p-4 [&>svg~*]:tw-pl-7 [&>svg+div]:tw-translate-y-[-3px] [&>svg]:tw-absolute [&>svg]:tw-left-4 [&>svg]:tw-top-4 [&>svg]:tw-text-foreground',\n {\n variants: {\n variant: {\n default: 'tw-bg-background tw-text-foreground',\n destructive:\n 'tw-border-destructive/50 tw-text-destructive dark:tw-border-destructive [&>svg]:tw-text-destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes & VariantProps\n>(({ className, variant, ...props }, ref) => (\n
\n));\nAlert.displayName = 'Alert';\n\nconst AlertTitle = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n {/* added because of https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md */}\n {props.children}{' '}\n \n ),\n);\nAlertTitle.displayName = 'AlertTitle';\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n
\n));\nAlertDescription.displayName = 'AlertDescription';\n\nexport { Alert, AlertTitle, AlertDescription };\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst badgeVariants = cva(\n 'tw-inline-flex tw-items-center tw-rounded-full tw-border tw-px-2.5 tw-py-0.5 tw-text-xs tw-font-semibold tw-transition-colors focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2',\n {\n variants: {\n variant: {\n default:\n 'tw-border-transparent tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/80',\n secondary:\n 'tw-border-transparent tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80',\n muted: 'tw-border-transparent tw-bg-muted tw-text-muted-foreground hover:tw-bg-muted/80',\n destructive:\n 'tw-border-transparent tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/80',\n outline: 'tw-text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes,\n VariantProps {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return
;\n}\n\nexport { Badge, badgeVariants };\n","import React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Card = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n {/* added because of https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md */}\n {props.children}\n \n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n

\n));\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef>(\n ({ className, ...props }, ref) => (\n

\n ),\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n","import { ComponentProps } from 'react';\nimport { toast as sonner, Toaster } from 'sonner';\n\ntype SonnerProps = ComponentProps;\n\nfunction Sonner({ ...props }: SonnerProps) {\n return (\n \n );\n}\n\n// The re-export of the sonner function was added manually\nexport { Sonner, sonner };\n","import React from 'react';\nimport * as SliderPrimitive from '@radix-ui/react-slider';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Slider = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n \n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n","import React from 'react';\nimport * as SwitchPrimitives from '@radix-ui/react-switch';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Switch = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n","import React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport type TabsListProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type TabsContentProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport const TabsList = React.forwardRef<\n React.ElementRef,\n TabsListProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nexport const TabsTrigger = React.forwardRef<\n React.ElementRef,\n TabsTriggerProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nexport const TabsContent = React.forwardRef<\n React.ElementRef,\n TabsContentProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Download } from 'lucide-react';\n\ntype InstallButtonProps = {\n /** The installing boolean value determines the state of the button. */\n isInstalling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n /** Optional text for the button. */\n buttonText?: string;\n} & ButtonProps;\n\n/**\n * The InstallButton component is a button designed for initiating installs. It includes visuals for\n * active installing and idle states.\n *\n * @param isInstalling The installing boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @param buttonText Optional text for the button.\n * @returns A install button.\n */\nexport default function InstallButton({\n isInstalling,\n handleClick,\n buttonText,\n className,\n ...props\n}: InstallButtonProps) {\n return (\n \n {isInstalling ? (\n \n ) : (\n <>\n \n {buttonText}\n \n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype EnableButtonProps = {\n /** The enabling boolean value determines the state of the button. */\n isEnabling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The EnableButton component is a button designed for initiating enabling of downloads. It includes\n * visuals for active enabling and idle states.\n *\n * @param isEnabling The enabling boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to enable.\n */\nexport default function EnableButton({\n isEnabling,\n handleClick,\n className,\n ...props\n}: EnableButtonProps) {\n return (\n \n {isEnabling ? (\n <>\n \n Enabling...\n \n ) : (\n 'Enable'\n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype DisableButtonProps = {\n /** The disabling boolean value determines the state of the button. */\n isDisabling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The DisableButton component is a button designed for initiating disabling of downloads. It\n * includes visuals for active disabling and idle states.\n *\n * @param isDisabling The disabling boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to disable.\n */\nexport default function DisableButton({\n isDisabling,\n handleClick,\n className,\n ...props\n}: DisableButtonProps) {\n return (\n \n {isDisabling ? (\n <>\n \n Disabling...\n \n ) : (\n 'Disable'\n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype UpdateButtonProps = {\n /** The updating boolean value determines the state of the button. */\n isUpdating: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The UpdateButton component is a button designed for initiating updates for downloaded extensions.\n * It includes visuals for active updating and idle states.\n *\n * @param isUpdating The updating boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to update.\n */\nexport default function UpdateButton({\n isUpdating,\n handleClick,\n className,\n ...props\n}: UpdateButtonProps) {\n return (\n \n {isUpdating ? (\n <>\n \n Updating...\n \n ) : (\n 'Update'\n )}\n \n );\n}\n","import { cn } from '@/utils/shadcn-ui.util';\nimport Markdown, { MarkdownToJSX } from 'markdown-to-jsx';\nimport { useMemo } from 'react';\n\ninterface MarkdownRendererProps {\n /** Optional unique identifier */\n id?: string;\n /** The markdown string to render */\n markdown: string;\n className?: string;\n /**\n * The [`target` attribute for `a` html\n * tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target). Defaults to not\n * adding a `target` to `a` tags\n */\n anchorTarget?: string;\n}\n\n/**\n * This component renders markdown content given a markdown string. It uses typography styles from\n * the platform.\n *\n * @param markdown The markdown string to render.\n * @param id Optional unique identifier\n * @returns A div containing the rendered markdown content.\n */\nexport default function MarkdownRenderer({\n id,\n markdown,\n className,\n anchorTarget,\n}: MarkdownRendererProps) {\n const options: MarkdownToJSX.Options = useMemo(\n () => ({\n overrides: {\n a: {\n props: {\n target: anchorTarget,\n },\n },\n },\n }),\n [anchorTarget],\n );\n return (\n
\n {markdown}\n
\n );\n}\n","import { Filter, ChevronDown } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { Button } from '@/components/shadcn-ui/button';\n\n/**\n * The FilterButton component is a button designed for initiating filtering of data. It is designed\n * to be used with the dropdown menu. It uses forwardRef to pass the button to the dropdown trigger\n * asChild.\n *\n * @returns A button that can be used to filter.\n */\nconst FilterButton = forwardRef((props, ref) => {\n return (\n \n \n Filter\n \n \n );\n});\n\nexport default FilterButton;\n","import {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuGroup,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport FilterButton from './buttons/filter-button.component';\n\nexport enum DropdownMenuItemType {\n Check,\n Radio,\n}\n\nexport type DropdownItem = {\n /** The label is the text that will be displayed on the dropdown item. */\n label: string;\n /** The itemType determines the DropdownMenuItemType type as either Check or Radio. */\n itemType: DropdownMenuItemType;\n /** The onClick function is called when the item is clicked. */\n onClick: () => void;\n};\n\nexport type DropdownGroup = {\n /**\n * The label is the text that will be displayed on the dropdown group. It is used to categorize\n * the items in the group.\n */\n label: string;\n /** The items array contains the items that will be displayed in the dropdown group */\n items: DropdownItem[];\n};\n\nexport type FilterDropdownProps = {\n /** Object unique identifier */\n id?: string;\n /** The groups array contains the groups that will be displayed in the dropdown */\n groups: DropdownGroup[];\n}; // TODO: extend the props later\n\n/**\n * The FilterDropdown component is a dropdown designed for filtering content. It includes groups of\n * items that can be checkboxes or radio items.\n *\n * @param id Optional unique identifier\n * @param groups The groups array contains the groups that will be displayed in the dropdown\n * @returns A filter dropdown.\n */\nexport default function FilterDropdown({ id, groups }: FilterDropdownProps) {\n return (\n
\n {/* TODO: remove this once the DropDown Menu shadcn has an id prop */}\n \n \n \n \n \n {groups.map((group) => (\n
\n {group.label}\n \n {group.items.map((item) => (\n
\n {item.itemType === DropdownMenuItemType.Check ? (\n \n {item.label}\n \n ) : (\n \n {item.label}\n \n )}\n
\n ))}\n
\n \n
\n ))}\n
\n
\n
\n );\n}\n","interface NoExtensionsFoundProps {\n /** Optional unique identifier */\n id?: string;\n /** The message to display */\n message: string;\n}\n/**\n * This component displays a message to the user when no extensions are found in the marketplace.\n *\n * @param id Optional unique identifier\n * @param message The message to display.\n * @returns {JSX.Element} - Returns the message component that displays the message to the user.\n */\nexport default function NoExtensionsFound({ id, message }: NoExtensionsFoundProps) {\n return (\n
\n
\n

{message}

\n
\n
\n );\n}\n","import { CircleHelp, Link as LucideLink, User } from 'lucide-react';\nimport { NumberFormat } from 'platform-bible-utils';\n\n/** Interface that stores the parameters passed to the More Info component */\ninterface MoreInfoProps {\n /** Optional unique identifier */\n id?: string;\n /** The category of the extension */\n category: string;\n /** The number of downloads for the extension */\n downloads: Record;\n /** The languages supported by the extension */\n languages: string[];\n /** The URL to the more info page of the extension */\n moreInfoUrl: string;\n}\n/**\n * This component displays the more info section of the extension which includes the category,\n * number of downloads, languages, and links to the website and support\n *\n * @param id Optional unique identifier\n * @param category The category of the extension\n * @param downloads The number of downloads for the extension\n * @param languages The languages supported by the extension\n * @param moreInfoUrl The URL to the more info page of the extension\n * @returns {JSX.Element} - Returns the more info component that displays the category, number of\n * downloads, languages, and links to the website and support\n */\nexport default function MoreInfo({\n id,\n category,\n downloads,\n languages,\n moreInfoUrl,\n}: MoreInfoProps) {\n /**\n * This constant formats the number of downloads into a more readable format.\n *\n * @example 1000 -> 1K\n *\n * @example 1000000 -> 1M\n *\n * @returns The formatted number of downloads\n */\n const numberFormatted = new NumberFormat('en', {\n notation: 'compact',\n compactDisplay: 'short',\n }).format(Object.values(downloads).reduce((a: number, b: number) => a + b, 0));\n\n /** This function scrolls the window to the bottom of the page. */\n const handleScrollToBottom = () => {\n window.scrollTo(0, document.body.scrollHeight);\n };\n\n return (\n \n
\n
\n {category}\n
\n CATEGORY\n
\n
\n
\n
\n \n {numberFormatted}\n
\n USERS\n
\n
\n
\n
\n {languages.slice(0, 3).map((locale) => (\n \n {locale.toUpperCase()}\n \n ))}\n
\n {languages.length > 3 && (\n handleScrollToBottom()}\n className=\"tw-text-xs tw-text-gray-500 tw-underline\"\n >\n +{languages.length - 3} more languages\n \n )}\n
\n
\n
\n \n Website\n \n \n \n Support\n \n \n
\n
\n );\n}\n","import { useState } from 'react';\n\nexport type VersionInformation = {\n /** Date the version was published */\n date: string;\n /** Description of the changes in the version */\n description: string;\n};\n\n/** Type to store the version history information */\nexport type VersionHistoryType = Record;\n\n/** Interface that stores the parameters passed to the Version History component */\ninterface VersionHistoryProps {\n /** Optional unique identifier */\n id?: string;\n /** Object containing the versions mapped with their information */\n versionHistory: VersionHistoryType;\n}\n\n/**\n * Component to render the version history information shown in the footer component. Lists the 5\n * most recent versions, with the options to show all versions by pressing a button.\n *\n * @param versionHistory Object containing the versions mapped with their information\n * @param id Optional unique identifier\n * @returns Rendered version history for the Footer component\n */\nexport default function VersionHistory({ id, versionHistory }: VersionHistoryProps) {\n const [showAllVersions, setShowAllVersions] = useState(false);\n const currentDate = new Date();\n\n /**\n * Function to format the time string for the version history in the form of 'X year(s) ago'.\n *\n * @param dateString ISO Date string to determine the time string from\n * @returns Formatted time string\n */\n function formatTimeString(dateString: string) {\n const date = new Date(dateString);\n const dateDiff = new Date(currentDate.getTime() - date.getTime());\n const yearDiff = dateDiff.getUTCFullYear() - 1970;\n const monthDiff = dateDiff.getUTCMonth();\n const dayDiff = dateDiff.getUTCDate() - 1;\n\n // Determines how long ago the version was published\n let timeString = '';\n if (yearDiff > 0) {\n timeString = `${yearDiff.toString()} year${yearDiff === 1 ? '' : 's'} ago`;\n } else if (monthDiff > 0) {\n timeString = `${monthDiff.toString()} month${monthDiff === 1 ? '' : 's'} ago`;\n } else if (dayDiff === 0) {\n timeString = 'today';\n } else {\n timeString = `${dayDiff.toString()} day${dayDiff === 1 ? '' : 's'} ago`;\n }\n\n return timeString;\n }\n\n // Sorts the version history by version number\n const sortedEntries = Object.entries(versionHistory).sort((a, b) => b[0].localeCompare(a[0]));\n\n return (\n
\n

What`s New

\n
    \n {(showAllVersions ? sortedEntries : sortedEntries.slice(0, 5)).map((entry) => (\n
    \n
    \n
  • \n {entry[1].description}\n
  • \n
    \n
    \n
    Version {entry[0]}
    \n
    {formatTimeString(entry[1].date)}
    \n
    \n
    \n ))}\n
\n {sortedEntries.length > 5 && (\n setShowAllVersions(!showAllVersions)}\n className=\"tw-text-xs tw-text-gray-500 tw-underline\"\n >\n {showAllVersions ? 'Show Less Version History' : 'Show All Version History'}\n \n )}\n
\n );\n}\n","import { useMemo } from 'react';\nimport { formatBytes } from 'platform-bible-utils';\nimport VersionHistory, { VersionHistoryType } from './version-history.component';\n\n/** Interface to store the parameters passed to the Footer component */\ninterface FooterProps {\n /** Optional unique identifier */\n id?: string;\n /** Name of the publisher */\n publisherDisplayName: string;\n /** Size of the extension file in bytes */\n fileSize: number;\n /** List of language codes supported by the extension */\n locales: string[];\n /** Object containing the version history mapped with their information */\n versionHistory: VersionHistoryType;\n}\n\n/**\n * Component to render the footer for the extension details which contains information on the\n * publisher, version history, languages, and file size.\n *\n * @param id Optional unique identifier\n * @param publisherDisplayName Name of the publisher\n * @param fileSize Size of the extension file in bytes\n * @param locales List of language codes supported by the extension\n * @param versionHistory Object containing the version history mapped with their information\n * @returns The rendered Footer component\n */\nexport default function Footer({\n id,\n publisherDisplayName,\n fileSize,\n locales,\n versionHistory,\n}: FooterProps) {\n /** Formats the file size into a human-readable format */\n const formattedFileSize = useMemo(() => formatBytes(fileSize), [fileSize]);\n\n /**\n * This function gets the display names of the languages based on the language codes.\n *\n * @param codes The list of language codes\n * @returns The list of language names\n */\n const getLanguageNames = (codes: string[]) => {\n const displayNames = new Intl.DisplayNames(navigator.language, { type: 'language' });\n return codes.map((code) => displayNames.of(code));\n };\n\n const languageNames = getLanguageNames(locales);\n\n return (\n
\n
\n \n
\n
\n

Information

\n
\n

\n Publisher\n {publisherDisplayName}\n Size\n {formattedFileSize}\n

\n
\n

\n Languages\n {languageNames.join(', ')}\n

\n
\n
\n
\n
\n
\n );\n}\n","import ComboBox from '@/components/basics/combo-box.component';\nimport Spinner from '@/components/basics/spinner.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@/components/shadcn-ui/card';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { Label } from '@/components/shadcn-ui/label';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport {\n BookOpen,\n ChevronDown,\n ChevronsUpDown,\n ChevronUp,\n Ellipsis,\n Loader,\n Search,\n} from 'lucide-react';\n\nimport {\n DblResourceData,\n getErrorMessage,\n LanguageStrings,\n LocalizeKey,\n ResourceType,\n} from 'platform-bible-utils';\nimport { useEffect, useMemo, useState } from 'react';\n\nexport const FILTERABLE_RESOURCE_LIST_STRING_KEYS: LocalizeKey[] = [\n '%resources_action%',\n '%resources_dialog_subtitle%',\n '%resources_dialog_title%',\n '%resources_filterInput%',\n '%resources_fullName%',\n '%resources_get%',\n '%resources_installed%',\n '%resources_language%',\n '%resources_languageFilter%',\n '%resources_loadingResources%',\n '%resources_noResults%',\n '%resources_open%',\n '%resources_remove%',\n '%resources_size%',\n '%resources_type%',\n '%resources_type_DBL%',\n '%resources_type_ER%',\n '%resources_type_SLR%',\n '%resources_type_XR%',\n '%resources_type_unknown%',\n '%resources_update%',\n];\n\ntype InstallInfo = {\n dblEntryUid: string;\n action: 'installing' | 'removing';\n};\n\ntype SortConfig = {\n key: 'fullName' | 'bestLanguageName';\n direction: 'ascending' | 'descending';\n};\n\ntype TypeOptions = {\n type: ResourceType;\n localizedValue: string;\n};\n\nconst getLanguageOptions = (\n dblResources: DblResourceData[],\n languageFilter: string[],\n): string[] => {\n const sortedLanguages = Array.from(\n new Set(dblResources.map((resource) => resource.bestLanguageName)),\n );\n\n const prioritizedLanguages = new Set(\n languageFilter.concat(\n dblResources\n .filter((resource) => resource.installed)\n .map((resource) => resource.bestLanguageName),\n ),\n );\n\n return sortedLanguages.sort((a, b) => {\n const aIsPrioritized = prioritizedLanguages.has(a);\n const bIsPrioritized = prioritizedLanguages.has(b);\n\n if (aIsPrioritized && bIsPrioritized) {\n return a.localeCompare(b);\n }\n if (aIsPrioritized) return -1;\n if (bIsPrioritized) return 1;\n\n return a.localeCompare(b);\n });\n};\n\nconst getActionButtonContent = (\n resource: DblResourceData,\n buttonText: string,\n installResource: (dblEntryUid: string, action: 'install' | 'remove') => void,\n) => {\n return (\n \n );\n};\n\nconst getActionContent = (\n resource: DblResourceData,\n idsBeingHandled: string[],\n getText: string,\n updateText: string,\n installedText: string,\n installResource: (dblEntryUid: string, action: 'install' | 'remove') => void,\n) => {\n const isBeingHandled = idsBeingHandled.includes(resource.dblEntryUid);\n if (isBeingHandled) {\n return (\n \n );\n }\n if (!resource.installed) {\n return getActionButtonContent(resource, getText, installResource);\n }\n if (resource.updateAvailable) {\n return getActionButtonContent(resource, updateText, installResource);\n }\n return ;\n};\n\ntype FilterableResourceListProps = {\n localizedStrings: LanguageStrings;\n dblResources: DblResourceData[];\n isLoadingDblResources: boolean;\n typeFilter: ResourceType[];\n setTypeFilter: (stateValue: ResourceType[]) => void;\n languageFilter: string[];\n setLanguageFilter: (stateValue: string[]) => void;\n openResource: (projectId: string) => void;\n installResource: ((uid: string) => Promise) | undefined;\n uninstallResource: ((uid: string) => Promise) | undefined;\n};\n\nfunction FilterableResourceList({\n localizedStrings,\n dblResources,\n isLoadingDblResources,\n typeFilter,\n setTypeFilter,\n languageFilter,\n setLanguageFilter,\n openResource,\n installResource,\n uninstallResource,\n}: FilterableResourceListProps) {\n const actionText: string = localizedStrings['%resources_action%'];\n const dialogSubtitleText: string = localizedStrings['%resources_dialog_subtitle%'];\n const dialogTitleText: string = localizedStrings['%resources_dialog_title%'];\n const filterInputText: string = localizedStrings['%resources_filterInput%'];\n const fullNameText: string = localizedStrings['%resources_fullName%'];\n const getText: string = localizedStrings['%resources_get%'];\n const installedText: string = localizedStrings['%resources_installed%'];\n const languageText: string = localizedStrings['%resources_language%'];\n const languageFilterText: string = localizedStrings['%resources_languageFilter%'];\n const loadingResourcesText: string = localizedStrings['%resources_loadingResources%'];\n const noResultsText: string = localizedStrings['%resources_noResults%'];\n const openText: string = localizedStrings['%resources_open%'];\n const removeText: string = localizedStrings['%resources_remove%'];\n const sizeText: string = localizedStrings['%resources_size%'];\n const typeText: string = localizedStrings['%resources_type%'];\n const typeDblText: string = localizedStrings['%resources_type_DBL%'];\n const typeErText: string = localizedStrings['%resources_type_ER%'];\n const typeSlrText: string = localizedStrings['%resources_type_SLR%'];\n const typeXrText: string = localizedStrings['%resources_type_XR%'];\n const typeUnknownText: string = localizedStrings['%resources_type_unknown%'];\n const updateText: string = localizedStrings['%resources_update%'];\n\n const [installInfo, setInstallInfo] = useState([]);\n\n const installOrRemoveResource = (dblEntryUid: string, action: 'install' | 'remove'): void => {\n if (!installResource || !uninstallResource) return;\n const newInstallInfo: InstallInfo = {\n dblEntryUid,\n action: action === 'install' ? 'installing' : 'removing',\n };\n\n setInstallInfo((prevInfo) => [...prevInfo, newInstallInfo]);\n\n const actionFunction = action === 'install' ? installResource : uninstallResource;\n\n actionFunction(dblEntryUid).catch((error) => {\n console.debug(getErrorMessage(error));\n });\n };\n\n /** Removes resources from array of resources that are currently being handled */\n useEffect(() => {\n setInstallInfo((currentInstallInfo) =>\n currentInstallInfo.filter((info) => {\n const resource = dblResources.find((res) => res.dblEntryUid === info.dblEntryUid);\n\n if (!resource) return true;\n\n if (info.action === 'installing' && resource.installed) return false;\n if (info.action === 'removing' && !resource.installed) return false;\n\n return true;\n }),\n );\n }, [dblResources]);\n\n const [textFilter, setTextFilter] = useState('');\n\n const textFilteredResources = useMemo(() => {\n return dblResources.filter((resource) => {\n const filter = textFilter.toLowerCase();\n return (\n resource.displayName.toLowerCase().includes(filter) ||\n resource.fullName.toLowerCase().includes(filter) ||\n resource.bestLanguageName.toLowerCase().includes(filter)\n );\n });\n }, [dblResources, textFilter]);\n\n const typeOptions: TypeOptions[] = useMemo(() => {\n return [\n { type: 'DBLResource', localizedValue: typeDblText },\n { type: 'EnhancedResource', localizedValue: typeErText },\n { type: 'SourceLanguageResource', localizedValue: typeSlrText },\n { type: 'XmlResource', localizedValue: typeXrText },\n ];\n }, [typeDblText, typeErText, typeSlrText, typeXrText]);\n\n const typeFilterChangeHandler = (newType: ResourceType): void => {\n const prevTypeFilter: ResourceType[] = [...typeFilter];\n let newTypeFilter: ResourceType[] = [];\n\n if (!prevTypeFilter || prevTypeFilter.length === 0) {\n newTypeFilter = [newType];\n } else {\n newTypeFilter = prevTypeFilter.includes(newType)\n ? prevTypeFilter.filter((value) => value !== newType)\n : [...prevTypeFilter, newType];\n }\n setTypeFilter(newTypeFilter);\n };\n\n const textAndTypeFilteredResources = useMemo(() => {\n return textFilteredResources.filter((resource) => {\n return typeFilter.includes(resource.type);\n });\n }, [textFilteredResources, typeFilter]);\n\n useEffect(() => {\n if (languageFilter.length === 0) {\n setLanguageFilter(\n dblResources\n .filter((resource) => resource.installed === true)\n .map((resource) => resource.bestLanguageName),\n );\n }\n }, [dblResources, languageFilter.length, setLanguageFilter]);\n\n const languageFilterChangeHandler = (newLanguage: string): void => {\n const prevLanguageFilter: string[] = [...languageFilter];\n let newLanguageFilter: string[] = [];\n\n if (!prevLanguageFilter || prevLanguageFilter.length === 0) {\n newLanguageFilter = [newLanguage];\n } else {\n newLanguageFilter = prevLanguageFilter.includes(newLanguage)\n ? prevLanguageFilter.filter((value) => value !== newLanguage)\n : [...prevLanguageFilter, newLanguage];\n }\n setLanguageFilter(newLanguageFilter);\n };\n\n const textAndTypeAndLanguageFilteredResources = useMemo(() => {\n return textAndTypeFilteredResources.filter((resource) => {\n return languageFilter.includes(resource.bestLanguageName);\n });\n }, [languageFilter, textAndTypeFilteredResources]);\n\n const [sortConfig, setSortConfig] = useState({\n key: 'bestLanguageName',\n direction: 'ascending',\n });\n\n const sortedResources = useMemo(() => {\n return [...textAndTypeAndLanguageFilteredResources].sort((a, b) => {\n const aValue = a[sortConfig.key];\n const bValue = b[sortConfig.key];\n\n if (aValue < bValue) {\n return sortConfig.direction === 'ascending' ? -1 : 1;\n }\n if (aValue > bValue) {\n return sortConfig.direction === 'ascending' ? 1 : -1;\n }\n return 0;\n });\n }, [sortConfig.direction, sortConfig.key, textAndTypeAndLanguageFilteredResources]);\n\n const handleSort = (key: SortConfig['key']) => {\n const newSortConfig: SortConfig = { key, direction: 'ascending' };\n if (sortConfig.key === key && sortConfig.direction === 'ascending') {\n newSortConfig.direction = 'descending';\n }\n setSortConfig(newSortConfig);\n };\n\n return (\n \n \n
\n \n
\n {dialogTitleText}\n {dialogSubtitleText}\n
\n
\n
\n \n {isLoadingDblResources || !dblResources ? (\n
\n \n \n
\n ) : (\n
\n
\n
\n setTextFilter(event.target.value)}\n value={textFilter}\n placeholder={filterInputText}\n />\n \n
\n \n \n \n \n \n {typeOptions.map((option) => (\n {\n e.preventDefault();\n typeFilterChangeHandler(option.type);\n }}\n >\n {option.localizedValue}\n \n ))}\n \n \n \n
\n\n {sortedResources.length === 0 ? (\n
\n \n
\n ) : (\n \n \n \n \n \n handleSort('fullName')}>\n
\n {fullNameText}\n {sortConfig.key !== 'fullName' && (\n \n )}\n {sortConfig.key === 'fullName' &&\n (sortConfig.direction === 'ascending' ? (\n \n ) : (\n \n ))}\n
\n
\n handleSort('bestLanguageName')}>\n
\n {languageText}\n {sortConfig.key !== 'bestLanguageName' && (\n \n )}\n {sortConfig.key === 'bestLanguageName' &&\n (sortConfig.direction === 'ascending' ? (\n \n ) : (\n \n ))}\n
\n
\n {typeText}\n {sizeText}\n {actionText}\n
\n
\n \n {sortedResources.map((resource) => (\n \n \n \n \n {resource.displayName}\n {resource.fullName}\n {resource.bestLanguageName}\n \n {typeOptions.find((type) => type.type === resource.type)?.localizedValue ??\n typeUnknownText}\n \n {resource.size}\n \n
\n {getActionContent(\n resource,\n installInfo.map((info) => info.dblEntryUid),\n getText,\n updateText,\n installedText,\n installOrRemoveResource,\n )}\n {resource.installed && (\n \n \n \n \n \n openResource(resource.projectId)}>\n {openText}\n \n\n \n \n installOrRemoveResource(resource.dblEntryUid, 'remove')\n }\n >\n {removeText}\n \n \n \n )}\n
\n
\n
\n ))}\n
\n
\n )}\n
\n )}\n
\n
\n );\n}\n\nexport default FilterableResourceList;\n","import { PlatformEvent, PlatformEventHandler } from 'platform-bible-utils';\nimport { useEffect } from 'react';\n\n/**\n * Adds an event handler to an event so the event handler runs when the event is emitted. Use\n * `papi.network.getNetworkEvent` to use a networked event with this hook.\n *\n * @param event The event to subscribe to.\n *\n * - If event is a `PlatformEvent`, that event will be used\n * - If event is undefined, the callback will not be subscribed. Useful if the event is not yet\n * available for example\n *\n * @param eventHandler The callback to run when the event is emitted\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n */\nconst useEvent = (\n event: PlatformEvent | undefined,\n eventHandler: PlatformEventHandler,\n) => {\n useEffect(() => {\n // Do nothing if the event is not provided (in case the event is not yet available, for example)\n if (!event) return () => {};\n\n const unsubscriber = event(eventHandler);\n return () => {\n unsubscriber();\n };\n }, [event, eventHandler]);\n};\nexport default useEvent;\n","import { useCallback, useEffect } from 'react';\nimport { PlatformEvent, PlatformEventAsync, PlatformEventHandler } from 'platform-bible-utils';\nimport usePromise from './use-promise.hook';\n\nconst noopUnsubscriber = () => false;\n\n/**\n * Adds an event handler to an asynchronously subscribing/unsubscribing event so the event handler\n * runs when the event is emitted. Use `papi.network.getNetworkEvent` to use a networked event with\n * this hook.\n *\n * @param event The asynchronously (un)subscribing event to subscribe to.\n *\n * - If event is a `PlatformEvent` or `PlatformEventAsync`, that event will be used\n * - If event is undefined, the callback will not be subscribed. Useful if the event is not yet\n * available for example\n *\n * @param eventHandler The callback to run when the event is emitted\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n */\nconst useEventAsync = (\n event: PlatformEvent | PlatformEventAsync | undefined,\n eventHandler: PlatformEventHandler,\n) => {\n // Subscribe to the event asynchronously\n const [unsubscribe] = usePromise(\n useCallback(async () => {\n // Do nothing if the event is not provided (in case the event is not yet available, for example)\n if (!event) return noopUnsubscriber;\n\n // Wrap subscribe and unsubscribe in promises to allow normal events to be used as well\n const unsub = await Promise.resolve(event(eventHandler));\n return async () => unsub();\n }, [eventHandler, event]),\n noopUnsubscriber,\n // We want the unsubscriber to return to default value immediately upon changing subscription\n // So the useEffect below will unsubscribe asap\n { preserveValue: false },\n );\n\n // Unsubscribe from the event asynchronously (but we aren't awaiting the unsub)\n useEffect(() => {\n return () => {\n if (unsubscribe !== noopUnsubscriber) {\n unsubscribe();\n }\n };\n }, [unsubscribe]);\n};\n\nexport default useEventAsync;\n"],"names":["twMergeCustom","extendTailwindMerge","cn","inputs","clsx","Input","React","className","type","props","ref","jsx","BookChapterInput","forwardRef","handleSearch","handleKeyDown","handleOnClick","handleSubmit","jsxs","ShadInput","event","e","History","P","R","t","s","n","N","B","O","S","K","g","k","x","T","X","V","w","L","G","A","H","C","I","y","q","U","m","l","h","c","E","D","i","a","o","u","v","f","d","b","p","J","DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","inset","children","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","BookMenuItem","bookId","handleSelectBook","isSelected","handleHighlightBook","bookType","ShadDropdownMenuItem","Canon","ChapterSelect","handleSelectChapter","endChapter","activeChapter","highlightedChapter","handleHighlightedChapter","chapters","_","handleMouse","useCallback","chapterNumber","chapter","GoToMenuItem","handleSort","handleLocationHistory","handleBookmarks","ShadDropdownMenuLabel","ArrowDownWideNarrow","Clock","Bookmark","ALL_BOOK_IDS","BOOK_TYPE_LABELS","BOOK_TYPE_ARRAY","SCROLL_OFFSET","SEARCH_QUERY_FORMATS","fetchGroupedBooks","fetchEndChapter","getChaptersForBook","getAllEnglishNames","isValidBookEnglishName","bookName","getBookIdFromEnglishName","formattedBookName","BookChapterControl","scrRef","searchQuery","setSearchQuery","useState","selectedBookId","setSelectedBookId","setHighlightedChapter","highlightedBookId","setHighlightedBookId","isContentOpen","setIsContentOpen","isContentOpenDelayed","setIsContentOpenDelayed","inputRef","useRef","contentRef","menuItemRef","fetchFilteredBooks","englishNameLowerCase","normalizedQuery","handleSearchInput","searchString","shouldPreventAutoClosing","controlMenuState","open","updateReference","shouldClose","verse","handleInputSubmit","format","matches","book","englishName","handleKeyDownInput","handleKeyDownContent","key","handleKeyDownMenuItem","chapterOffSet","useEffect","useLayoutEffect","scrollTimeout","scrollPosition","ShadDropdownMenu","ShadDropdownMenuTrigger","ShadDropdownMenuContent","bookTypeIndex","element","ShadDropdownMenuSeparator","buttonVariants","cva","Button","variant","size","asChild","Comp","Slot","labelVariants","Label","LabelPrimitive","RadioGroup","RadioGroupPrimitive","RadioGroupItem","Popover","PopoverPrimitive","PopoverTrigger","PopoverContent","align","DialogPortal","DialogPrimitive","DialogOverlay","DialogContent","DialogTitle","DialogDescription","Command","CommandPrimitive","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","getOptionLabelDefault","option","ComboBox","id","options","value","onChange","getOptionLabel","icon","buttonPlaceholder","textPlaceholder","commandEmptyMessage","buttonVariant","alignDropDown","dir","isDisabled","setOpen","ChevronsUpDown","ChapterRangeSelector","startChapter","handleSelectStartChapter","handleSelectEndChapter","chapterCount","chapterOptions","useMemo","index","onChangeStartChapter","onChangeEndChapter","Fragment","BookSelectionMode","BOOK_SELECTOR_STRING_KEYS","localizeString","strings","BookSelector","handleBookSelectionModeChange","currentBookName","onSelectBooks","selectedBookIds","localizedStrings","currentBookText","chooseText","chooseBooksText","bookSelectionMode","setBookSelectionMode","onSelectionModeChange","newMode","DataTableViewOptions","table","FilterIcon","column","Select","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","SelectSeparator","DataTablePagination","pageSize","ArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","ArrowRightIcon","Table","stickyHeader","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","DataTable","columns","data","enablePagination","showPaginationControls","showColumnVisibilityControls","onRowClickHandler","sorting","setSorting","columnFilters","setColumnFilters","columnVisibility","setColumnVisibility","rowSelection","setRowSelection","useReactTable","getCoreRowModel","getPaginationRowModel","getSortedRowModel","getFilteredRowModel","headerGroup","header","flexRender","_a","row","cell","OccurrencesTable","occurrenceData","setScriptureReference","referenceHeaderText","occurrenceHeaderText","occurrences","uniqueOccurrences","occurrence","uniqueOccurrence","deepEqual","Checkbox","CheckboxPrimitive","getLinesFromUSFM","text","getNumberFromUSFM","regex","match","getBookNumFromId","getStatusForItem","item","approvedItems","unapprovedItems","toggleVariants","Toggle","TogglePrimitive","ToggleGroupContext","ToggleGroup","ToggleGroupPrimitive","ToggleGroupItem","context","getSortingIcon","sortDirection","ArrowUpIcon","ArrowDownIcon","ArrowUpDownIcon","inventoryItemColumn","itemLabel","inventoryAdditionalItemColumn","additionalItemLabel","additionalItemIndex","inventoryCountColumn","countLabel","statusChangeHandler","changedItems","newStatus","onApprovedItemsChange","onUnapprovedItemsChange","newApprovedItems","validItem","newUnapprovedItems","unapprovedItem","inventoryStatusColumn","statusLabel","status","CircleCheckIcon","CircleXIcon","CircleHelpIcon","INVENTORY_STRING_KEYS","filterItemData","itemData","statusFilter","textFilter","filteredItemData","createTableData","scriptureRef","itemRegex","tableData","currentBook","currentChapter","currentVerse","line","items","itemIndex","existingItem","tableEntry","newReference","substring","newItem","Inventory","scriptureReference","extractItems","additionalItemsLabels","scope","onScopeChange","allItemsText","approvedItemsText","unapprovedItemsText","unknownItemsText","scopeBookText","scopeChapterText","scopeVerseText","filterText","showAdditionalItemsText","showAdditionalItems","setShowAdditionalItems","setStatusFilter","setTextFilter","selectedItem","setSelectedItem","reducedTableData","newTableData","firstItem","existingEntry","newTableEntry","filteredTableData","allColumns","numberOfAdditionalItems","additionalColumns","_b","rowClickHandler","newSelection","handleScopeChange","handleStatusFilterChange","MultiSelectComboBox","entries","getEntriesCount","selected","placeholder","customSelectedText","sortSelected","handleSelect","getPlaceholderText","sortedOptions","starredItems","opt","nonStarredItems","aSelected","bSelected","count","Star","SearchBar","onSearch","isFullWidth","handleInputChange","VerticalTabs","TabsPrimitive","VerticalTabsList","VerticalTabsTrigger","VerticalTabsContent","NavigationContentSearch","tabList","searchPlaceholder","headerTitle","isSearchBarFullWidth","direction","tab","scrBookColId","scrRefColId","typeColId","detailsColId","defaultScrRefColumnName","defaultScrBookGroupName","defaultTypeColumnName","defaultDetailsColumnName","getColumns","colInfo","showSourceColumn","showSrcCol","info","formatScrRef","compareScrRefs","toRefOrRange","scriptureSelection","offsetStart","offsetEnd","scrRefToBBBCCCVVV","getRowKey","ScriptureResultsViewer","sources","showColumnHeaders","scriptureReferenceColumnName","scriptureBookGroupName","typeColumnName","detailsColumnName","onRowSelected","grouping","setGrouping","scriptureResults","source","getExpandedRowModel","getGroupedRowModel","selectedRows","keys","selectedRow","scrBookGroupName","typeGroupName","groupingOptions","handleSelectChange","selectedGrouping","handleRowClick","getEvenOrOddBandingStyle","getIndent","groupingState","rowIndex","ChevronLeft","DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS","getLocalizeKeyForScrollGroupId","ScrollGroupSelector","availableScrollGroupIds","scrollGroupId","onChangeScrollGroupId","localizedStringsDefaulted","localizedStringKey","localizedStringValue","newScrollGroupString","scrollGroupOptionId","Separator","orientation","decorative","SeparatorPrimitive","SettingsList","SettingsListItem","primary","secondary","isLoading","loadingMessage","SettingsListHeader","includeSeparator","Checklist","listItems","selectedListItems","handleSelectListItem","createLabel","_interopRequireDefault","obj","module","chainPropTypes","propType1","propType2","args","_extends","target","isPlainObject","prototype","deepClone","output","deepmerge","r","z","reactIs_production_min","hasSymbol","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","isValidElementType","typeOf","object","$$typeof","$$typeofType","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","hasWarnedAboutDeprecatedIsAsyncMode","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","reactIs_development","reactIsModule","require$$0","require$$1","getOwnPropertySymbols","hasOwnProperty","propIsEnumerable","toObject","val","shouldUseNative","test1","test2","order2","test3","letter","objectAssign","from","to","symbols","ReactPropTypesSecret","ReactPropTypesSecret_1","has","printWarning","loggedTypeFailures","message","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","error","err","ex","stack","checkPropTypes_1","ReactIs","assign","require$$2","require$$3","require$$4","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","iteratorFn","ANONYMOUS","ReactPropTypes","createPrimitiveTypeChecker","createAnyTypeChecker","createArrayOfTypeChecker","createElementTypeChecker","createElementTypeTypeChecker","createInstanceTypeChecker","createNodeChecker","createObjectOfTypeChecker","createEnumTypeChecker","createUnionTypeChecker","createShapeTypeChecker","createStrictShapeTypeChecker","is","PropTypeError","createChainableTypeChecker","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","propName","propFullName","secret","cacheKey","chainedCheckType","expectedType","propValue","propType","getPropType","preciseType","getPreciseType","typeChecker","expectedClass","expectedClassName","actualClassName","getClassName","expectedValues","valuesString","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","expectedTypesMessage","isNode","invalidValidatorError","shapeTypes","allKeys","iterator","step","entry","isSymbol","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","isClassComponent","elementType","acceptingRef","safePropName","warningHint","elementAcceptingRef","PropTypes","elementAcceptingRef$1","specialProperty","exactProp","propTypes","unsupportedProps","prop","formatMuiErrorMessage","code","url","REACT_SERVER_CONTEXT_TYPE","REACT_OFFSCREEN_TYPE","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","SuspenseList","hasWarnedAboutDeprecatedIsConcurrentMode","isSuspenseList","fnNameMatchRegex","getFunctionName","fn","getFunctionComponentName","Component","fallback","getWrappedName","outerType","innerType","wrapperName","functionName","getDisplayName","HTMLElementType","refType","refType$1","capitalize","string","_formatMuiErrorMessage","createChainedFunction","funcs","acc","func","debounce","wait","timeout","debounced","later","deprecatedPropType","validator","reason","componentNameSafe","propFullNameSafe","isMuiElement","muiNames","_muiName","_element$type","ownerDocument","node","ownerWindow","requirePropFactory","componentNameInError","prevPropTypes","requiredProp","defaultTypeChecker","typeCheckerResult","setRef","useEnhancedEffect","useEnhancedEffect$1","globalId","useGlobalId","idOverride","defaultId","setDefaultId","maybeReactUseId","useId","reactId","unsupportedProp","useControlled","controlled","defaultProp","name","state","isControlled","valueState","setValue","defaultValue","setValueIfUncontrolled","newValue","useEventCallback","useForkRef","refs","instance","UNINITIALIZED","useLazyRef","init","initArg","EMPTY","useOnMount","Timeout","delay","useTimeout","hadKeyboardEvent","hadFocusVisibleRecently","hadFocusVisibleRecentlyTimeout","inputTypesWhitelist","focusTriggersKeyboardModality","tagName","handlePointerDown","handleVisibilityChange","prepare","doc","isFocusVisible","useIsFocusVisible","isFocusVisibleRef","handleBlurVisible","handleFocusVisible","resolveProps","defaultProps","defaultSlotProps","slotProps","slotPropName","composeClasses","slots","getUtilityClass","classes","slot","utilityClass","defaultGenerator","createClassNameGenerator","generate","generator","ClassNameGenerator","ClassNameGenerator$1","globalStateClasses","generateUtilityClass","globalStatePrefix","globalStateClass","generateUtilityClasses","result","clamp","min","max","_objectWithoutPropertiesLoose","excluded","sourceKeys","_excluded","sortBreakpointsValues","breakpointsAsArray","breakpoint1","breakpoint2","createBreakpoints","breakpoints","unit","other","sortedValues","up","down","between","start","end","endIndex","only","not","keyIndex","shape","shape$1","responsivePropType","responsivePropType$1","merge","defaultBreakpoints","handleBreakpoints","styleFromPropValue","theme","themeBreakpoints","breakpoint","mediaKey","cssKey","createEmptyBreakpointObject","breakpointsInput","_breakpointsInput$key","breakpointStyleKey","removeUnusedBreakpoints","breakpointKeys","style","breakpointOutput","getPath","path","checkVars","getStyleValue","themeMapping","transform","propValueFinal","userValue","cssProperty","themeKey","memoize","cache","arg","properties","directions","aliases","getCssProperties","property","marginKeys","paddingKeys","spacingKeys","createUnaryUnit","_getPath","themeSpacing","abs","createUnarySpacing","getValue","transformer","transformed","getStyleFromPropValue","cssProperties","resolveCssProperty","margin","padding","createSpacing","spacingInput","spacing","argsInput","argument","compose","styles","handlers","borderTransform","createBorderStyle","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outline","outlineColor","borderRadius","gap","columnGap","rowGap","gridColumn","gridRow","gridAutoFlow","gridAutoColumns","gridAutoRows","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridArea","paletteTransform","color","bgcolor","backgroundColor","sizingTransform","width","maxWidth","_props$theme","_props$theme2","breakpointsValues","minWidth","height","maxHeight","minHeight","boxSizing","defaultSxConfig","defaultSxConfig$1","objectsHaveSameKeys","objects","union","callIfFn","maybeFn","unstable_createStyleFunctionSx","getThemeValue","config","styleFunctionSx","_theme$unstable_sxCon","sx","traverse","sxInput","sxObject","emptyBreakpoints","breakpointsKeys","css","styleKey","styleFunctionSx$1","applyStyles","createTheme","paletteInput","shapeInput","muiTheme","isObjectEmpty","useTheme","defaultTheme","contextTheme","ThemeContext","systemDefaultTheme","useThemeWithoutDefault","_excluded2","_excluded3","isEmpty","isStringTag","tag","shouldForwardProp","lowercaseFirstLetter","resolveTheme","themeId","defaultOverridesResolver","processStyleArg","callableStyle","_ref","ownerState","resolvedStylesArg","resolvedStyle","variants","isMatch","createStyled","input","rootShouldForwardProp","slotShouldForwardProp","systemSx","inputOptions","processStyles","componentSlot","inputSkipVariantsResolver","inputSkipSx","overridesResolver","skipVariantsResolver","skipSx","label","shouldForwardPropOption","defaultStyledResolver","styledEngineStyled","transformStyleArg","stylesArg","muiStyledResolver","styleArg","expressions","transformedStyleArg","expressionsWithDefaultTheme","styleOverrides","resolvedStyleOverrides","slotKey","slotStyle","_theme$components","themeVariants","numOfCustomFnsApplied","placeholders","displayName","getThemeProps","params","useThemeProps","clampWrapper","hexToRgb","re","colors","decomposeColor","marker","colorSpace","recomposeColor","hslToRgb","rgb","getLuminance","getContrastRatio","foreground","background","lumA","lumB","alpha","darken","coefficient","lighten","createMixins","mixins","common","common$1","grey","grey$1","purple","purple$1","red","red$1","orange","orange$1","blue","blue$1","lightBlue","lightBlue$1","green","green$1","light","dark","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","getDefaultPrimary","mode","getDefaultSecondary","getDefaultError","getDefaultInfo","getDefaultSuccess","getDefaultWarning","createPalette","palette","contrastThreshold","success","warning","getContrastText","contrastText","contrast","augmentColor","mainShade","lightShade","darkShade","modes","round","caseAllCaps","defaultFontFamily","createTypography","typography","fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem2","coef","pxToRem","buildVariant","fontWeight","lineHeight","letterSpacing","casing","shadowKeyUmbraOpacity","shadowKeyPenumbraOpacity","shadowAmbientShadowOpacity","createShadow","px","shadows","shadows$1","easing","duration","formatMs","milliseconds","getAutoHeightDuration","constant","createTransitions","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","isString","isNumber","animatedProp","zIndex","zIndex$1","mixinsInput","transitionsInput","typographyInput","systemTheme","systemCreateTheme","stateClasses","component","child","stateClass","defaultTheme$1","THEME_ID","systemUseThemeProps","styled","styled$1","getSvgIconUtilityClass","useUtilityClasses","SvgIconRoot","_theme$transitions","_theme$transitions$cr","_theme$transitions2","_theme$typography","_theme$typography$pxT","_theme$typography2","_theme$typography2$px","_theme$typography3","_theme$typography3$px","_palette$ownerState$c","_palette","_palette2","_palette3","SvgIcon","inProps","htmlColor","inheritViewBox","titleAccess","viewBox","hasSvgAsChild","more","_jsxs","_jsx","SvgIcon$1","createSvgIcon","unstable_ClassNameGenerator","exports","_utils","ArrowRight","default_1","_createSvgIcon","_jsxRuntime","isHostComponent","appendOwnerState","otherProps","defaultContextValue","ClassNameConfiguratorContext","useClassNamesOverride","disableDefaultClasses","extractEventHandlers","excludeKeys","resolveComponentProps","componentProps","slotState","omitEventHandlers","mergeSlotProps","parameters","getSlotProps","additionalProps","externalSlotProps","externalForwardedProps","joinedClasses","mergedStyle","eventHandlers","componentsPropsWithoutEventHandlers","otherPropsWithoutEventHandlers","internalSlotProps","useSlotProps","_parameters$additiona","skipResolvingSlotProps","rest","resolvedComponentsProps","mergedProps","internalRef","GLOBAL_CLASS_PREFIX","buildStateClass","buildSlotClass","getContainer","container","forwardedRef","disablePortal","mountNode","setMountNode","handleRef","newProps","ReactDOM","top","bottom","right","left","auto","basePlacements","clippingParents","viewport","popper","reference","variationPlacements","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","getWindow","OwnElement","isHTMLElement","isShadowRoot","attributes","effect","_ref2","initialStyles","styleProperties","attribute","applyStyles$1","getBasePlacement","getUAString","uaData","isLayoutViewport","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","visualViewport","addVisualOffsets","getLayoutRect","contains","parent","rootNode","next","getComputedStyle","isTableElement","getDocumentElement","getParentNode","getTrueOffsetParent","getContainingBlock","isFirefox","isIE","elementCss","currentNode","getOffsetParent","window","offsetParent","getMainAxisFromPlacement","within","mathMax","mathMin","withinMaxClamp","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","arrow","_state$modifiersData$","arrowElement","popperOffsets","basePlacement","axis","isVertical","len","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","center","offset","axisProp","_options$element","arrow$1","getVariation","unsetSides","roundOffsetsByDPR","win","dpr","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","heightProp","widthProp","offsetY","offsetX","commonStyles","_ref4","_Object$assign","computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash","getOppositePlacement","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","scrollTop","getWindowScrollBarX","getViewportRect","strategy","html","layoutViewport","getDocumentRect","_element$ownerDocumen","winScroll","body","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","list","isBody","updatedList","rectToClientRect","rect","getInnerBoundingClientRect","getClientRectFromMixedType","clippingParent","getClippingParents","canEscapeClipping","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","allPlacements","allowedPlacements","overflows","getExpandedFallbackPlacements","oppositePlacement","flip","_options$mainAxis","checkMainAxis","_options$altAxis","checkAltAxis","specifiedFallbackPlacements","_options$flipVariatio","preferredPlacement","isBasePlacement","fallbackPlacements","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","check","numberOfChecks","_loop","_i","fittingPlacement","_ret","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","hide","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","rects","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","preventOverflow","_options$tether","tether","_options$tetherOffset","tetherOffset","altAxis","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","documentElement","order","modifiers","map","visited","modifier","sort","requires","dep","depModifier","orderModifiers","orderedModifiers","phase","pending","resolve","mergeByName","merged","current","existing","DEFAULT_OPTIONS","areValidElements","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptionsAction","cleanupModifierEffects","runModifierEffects","_state$elements","_state$orderedModifie","_state$orderedModifie2","_ref$options","cleanupFn","noopFn","createPopper","COMPONENT_NAME","getPopperUtilityClass","flipPlacement","resolveAnchorEl","anchorEl","isVirtualElement","defaultPopperOptions","PopperTooltip","_slots$root","initialPlacement","popperOptions","popperRefProp","TransitionProps","tooltipRef","ownRef","popperRef","handlePopperRef","handlePopperRefRef","rtlPlacement","setPlacement","resolvedAnchorElement","setResolvedAnchorElement","handlePopperUpdate","box","popperModifiers","childProps","Root","rootProps","Popper","containerProp","keepMounted","transition","exited","setExited","handleEnter","handleExited","resolvedAnchorEl","display","transitionProps","useThemeSystem","_setPrototypeOf","_inheritsLoose","subClass","superClass","setPrototypeOf","timeoutsShape","TransitionGroupContext","forceReflow","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","_this","parentGroup","appear","initialStatus","prevState","nextIn","_proto","prevProps","nextStatus","exit","enter","mounting","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","_this3","nextState","callback","_this4","active","handler","doesNotHaveTimeoutOrListener","maybeNextCallback","_this$props","pt","noop","Transition$1","reflow","getTransitionProps","_style$transitionDura","_style$transitionTimi","getScale","isWebKit154","Grow","addEndListener","inProp","onEnter","onEntered","onEntering","onExit","onExited","onExiting","TransitionComponent","timer","autoTimeout","nodeRef","normalizedTransitionCallback","maybeIsAppearing","handleEntering","isAppearing","transitionDuration","transitionTimingFunction","handleEntered","handleExiting","handleExit","handleAddEndListener","Grow$1","PopperRoot","BasePopper","components","componentsProps","RootComponent","Popper$1","getTooltipUtilityClass","tooltipClasses","tooltipClasses$1","disableInteractive","touch","TooltipPopper","TooltipTooltip","TooltipArrow","hystersisOpen","hystersisTimer","cursorPosition","composeEventHandler","eventHandler","Tooltip","_slots$popper","_slots$transition","_slots$tooltip","_slots$arrow","_slotProps$popper","_ref6","_slotProps$popper2","_slotProps$transition","_slotProps$tooltip","_ref7","_slotProps$tooltip2","_slotProps$arrow","_ref8","_slotProps$arrow2","childrenProp","describeChild","disableFocusListener","disableHoverListener","disableInteractiveProp","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","idProp","leaveDelay","leaveTouchDelay","onClose","onOpen","openProp","PopperComponentProp","PopperProps","title","TransitionComponentProp","isRtl","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","handleOpen","handleClose","handleLeave","focusVisibleRef","setChildIsFocusVisible","handleBlur","handleFocus","detectTouchStart","childrenProps","handleMouseOver","handleMouseLeave","handleTouchStart","handleTouchEnd","nativeEvent","handleMouseMove","nameOrDescProps","titleIsString","interactiveWrapperListeners","_PopperProps$popperOp","tooltipModifiers","PopperComponent","TooltipComponent","ArrowComponent","popperProps","tooltipProps","tooltipArrowProps","TransitionPropsInner","Tooltip$1","getIcon","menuLabel","leading","MuiListItemIcon","MenuItem","onClick","tooltip","allowForLeadingIcons","iconPathBefore","iconPathAfter","hasAutoFocus","isDense","isSubMenuParent","hasDisabledGutters","hasDivider","focusVisibleClassName","menuItem","MuiMenuItem","MuiListItemText","getAllGroups","menuDefinition","SubMenu","setAnchorEl","parentMenuItem","parentItemProps","handleParentMenuItemClick","renderSubMenuItems","includedGroups","group","GroupedMenuItemList","Menu","getOrderedGroupItems","groupId","allItems","menuProps","commandHandler","groupsToInclude","sortedGroups","itemArray","allowSpaceForLeadingIcons","createMenuItemProps","isLastItemInGroup","divKey","itemInfo","menuItemProps","TopLevelMenu","columnId","MenuColumn","metadata","Grid","List","GridMenu","multiColumnMenu","sortedColumns","columnNumbers","columnName","col","getUsePromiseOptionsDefaults","usePromise","promiseFactoryCallback","defaultValueRef","optionsDefaultedRef","setIsLoading","promiseIsCurrent","MenuIcon","HamburgerMenuButton","menuProvider","normalMenu","fullMenu","containerRef","ariaLabelPrefix","isMenuOpen","setMenuOpen","showFullMenu","setShowFullMenu","handleMenuItemClick","handleMenuButtonClick","prevIsOpen","isOpening","menuCommandHandler","command","setOffset","normalMenuData","fullMenuData","menu","IconButton","Drawer","isTooltipSuppressed","adjustMarginToAlignToEdge","MuiIconButton","Spinner","LoaderCircle","TextField","hasError","helperText","onFocus","onBlur","ShadLabel","Toolbar","AppBar","MuiToolbar","alertVariants","Alert","AlertTitle","AlertDescription","badgeVariants","Badge","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","Sonner","Toaster","Slider","SliderPrimitive","Switch","SwitchPrimitives","Tabs","TabsList","TabsTrigger","TabsContent","InstallButton","isInstalling","handleClick","buttonText","Download","EnableButton","isEnabling","DisableButton","isDisabling","UpdateButton","isUpdating","MarkdownRenderer","markdown","anchorTarget","Markdown","FilterButton","Filter","DropdownMenuItemType","DropdownMenuItemType2","FilterDropdown","groups","NoExtensionsFound","MoreInfo","category","downloads","languages","moreInfoUrl","numberFormatted","NumberFormat","handleScrollToBottom","User","locale","LucideLink","CircleHelp","VersionHistory","versionHistory","showAllVersions","setShowAllVersions","currentDate","formatTimeString","dateString","date","dateDiff","yearDiff","monthDiff","dayDiff","timeString","sortedEntries","Footer","publisherDisplayName","fileSize","locales","formattedFileSize","formatBytes","languageNames","codes","displayNames","FILTERABLE_RESOURCE_LIST_STRING_KEYS","getLanguageOptions","dblResources","languageFilter","sortedLanguages","resource","prioritizedLanguages","aIsPrioritized","bIsPrioritized","getActionButtonContent","installResource","getActionContent","idsBeingHandled","getText","updateText","installedText","FilterableResourceList","isLoadingDblResources","typeFilter","setTypeFilter","setLanguageFilter","openResource","uninstallResource","actionText","dialogSubtitleText","dialogTitleText","filterInputText","fullNameText","languageText","languageFilterText","loadingResourcesText","noResultsText","openText","removeText","sizeText","typeText","typeDblText","typeErText","typeSlrText","typeXrText","typeUnknownText","installInfo","setInstallInfo","installOrRemoveResource","dblEntryUid","action","newInstallInfo","prevInfo","getErrorMessage","currentInstallInfo","res","textFilteredResources","filter","typeOptions","typeFilterChangeHandler","newType","prevTypeFilter","newTypeFilter","textAndTypeFilteredResources","languageFilterChangeHandler","newLanguage","prevLanguageFilter","newLanguageFilter","textAndTypeAndLanguageFilteredResources","sortConfig","setSortConfig","sortedResources","aValue","bValue","newSortConfig","BookOpen","Loader","Ellipsis","useEvent","unsubscriber","noopUnsubscriber","useEventAsync","unsubscribe","unsub"],"mappings":"25CAGA,MAAMA,GAAgBC,GAAAA,oBAAoB,CAAE,OAAQ,KAAO,CAAA,EAyDpD,SAASC,KAAMC,EAAsB,CACnC,OAAAH,GAAcI,GAAAA,KAAKD,CAAM,CAAC,CACnC,CCzDO,MAAME,GAAQC,EAAM,WACzB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAA,EAASC,IAE5BC,EAAA,IAAC,QAAA,CACC,KAAAH,EACA,UAAWN,EACT,sbACAK,CACF,EACA,IAAAG,EAEC,GAAGD,CAAA,CAAA,CAIZ,EACAJ,GAAM,YAAc,QCNpB,MAAMO,GAAmBC,EAAA,WACvB,CACE,CAAE,aAAAC,EAAc,cAAAC,EAAe,cAAAC,EAAe,aAAAC,EAAc,GAAGR,CAAM,EACrEC,IAGEQ,EAAA,KAAC,MAAI,CAAA,UAAU,cACb,SAAA,CAAAP,EAAA,IAACQ,GAAA,CACE,GAAGV,EACJ,KAAK,OACL,UAAU,0JACV,SAAWW,GAAUN,EAAaM,EAAM,OAAO,KAAK,EACpD,UAAYC,GAAM,CACZA,EAAE,MAAQ,SACCJ,IAEfF,EAAcM,CAAC,CACjB,EACA,QAASL,EACT,IAAAN,CAAA,CACF,EACAC,EAAA,IAACW,EAAA,QAAA,CACC,UAAU,8HACV,QAAS,IAAM,CAEb,QAAQ,IAAI,iBAAiB,CAC/B,CAAA,CACF,CACF,CAAA,CAAA,CAGN,EC9CA,IAAIC,GAAI,OAAO,eACXC,GAAI,CAACC,EAAGJ,EAAGK,IAAML,KAAKI,EAAIF,GAAEE,EAAGJ,EAAG,CAAE,WAAY,GAAI,aAAc,GAAI,SAAU,GAAI,MAAOK,CAAC,CAAE,EAAID,EAAEJ,CAAC,EAAIK,EACzGC,GAAI,CAACF,EAAGJ,EAAGK,IAAMF,GAAEC,EAAG,OAAOJ,GAAK,SAAWA,EAAI,GAAKA,EAAGK,CAAC,EAW9D,MAAME,GAAI,CACR,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MAEA,MAEA,MAEA,MAEA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,MAEA,MAEA,MAEA,MAEA,MACA,MACA,MACA,MAEA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MAEA,MACA,MACA,KACF,EAAGC,GAAI,CACL,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACF,EAAGC,GAAI,CACL,UACA,SACA,YACA,UACA,cACA,SACA,SACA,OACA,WACA,WACA,UACA,UACA,eACA,eACA,OACA,WACA,kBACA,MACA,SACA,WACA,eACA,gBACA,SACA,WACA,eACA,UACA,kBACA,QACA,OACA,OACA,UACA,QACA,QACA,QACA,WACA,YACA,SACA,YACA,UACA,UACA,OACA,OACA,OACA,OACA,SACA,gBACA,gBACA,YACA,YACA,cACA,aACA,kBACA,kBACA,YACA,YACA,QACA,WACA,UACA,QACA,UACA,UACA,SACA,SACA,SACA,OACA,aACA,QACA,SACA,eACA,oBACA,0BACA,SACA,qBACA,sBACA,UACA,qBACA,cACA,cACA,cACA,cACA,mBACA,mBACA,qBACA,YACA,OACA,oBAGA,uBACA,uBACA,sBACA,yBACA,wBACA,qBACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,eACA,cACA,eACA,oBACA,qBACA,0BACA,0BACA,eACA,eACA,YACA,gBACA,cACA,eACA,iBACA,wBACA,mBACA,WACA,QACA,aACA,aACA,aACA,2BACA,4BACA,YACF,EAAGC,GAAIC,KACP,SAASC,GAAER,EAAGJ,EAAI,GAAI,CACpB,OAAOA,IAAMI,EAAIA,EAAE,YAAa,GAAGA,KAAKM,GAAIA,GAAEN,CAAC,EAAI,CACrD,CACA,SAASS,GAAET,EAAG,CACZ,OAAOQ,GAAER,CAAC,EAAI,CAChB,CACA,SAASU,GAAEV,EAAG,CACZ,MAAMJ,EAAI,OAAOI,GAAK,SAAWQ,GAAER,CAAC,EAAIA,EACxC,OAAOJ,GAAK,IAAMA,GAAK,EACzB,CACA,SAASe,GAAEX,EAAG,CACZ,OAAQ,OAAOA,GAAK,SAAWQ,GAAER,CAAC,EAAIA,IAAM,EAC9C,CACA,SAASY,GAAEZ,EAAG,CACZ,OAAOA,GAAK,EACd,CACA,SAASa,GAAEb,EAAG,CACZ,MAAMJ,EAAI,OAAOI,GAAK,SAAWQ,GAAER,CAAC,EAAIA,EACxC,OAAOc,GAAElB,CAAC,GAAK,CAACgB,GAAEhB,CAAC,C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EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,QAAS,CACP,MAAOA,EACR,EACD,WAAY,CACV,MAAOA,EACR,EACD,aAAc,CACZ,MAAOA,EACR,EACD,cAAe,CACb,MAAOA,EACR,EACD,YAAa,CACX,MAAOA,EACR,EACD,SAAU,CACR,MAAOA,EACR,EACD,SAAU,CACR,MAAOA,EACR,EACD,cAAe,CACb,MAAOA,EACR,EACD,mBAAoB,CAClB,MAAOA,EACR,EACD,iBAAkB,CAChB,MAAOA,EACR,EACD,aAAc,CACZ,MAAOA,EACR,EACD,kBAAmB,CACjB,MAAOA,EACR,EACD,gBAAiB,CACf,MAAOA,EACR,EACD,EAAG,CACD,MAAOD,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,GAAI,CACF,MAAOA,EACR,EACD,OAAQ,CACN,MAAOA,EACR,EACD,UAAW,CACT,MAAOA,EACR,EACD,YAAa,CACX,MAAOA,EACR,EACD,aAAc,CACZ,MAAOA,EACR,EACD,WAAY,CACV,MAAOA,EACR,EACD,QAAS,CACP,MAAOA,EACR,EACD,QAAS,CACP,MAAOA,EACR,EACD,aAAc,CACZ,MAAOA,EACR,EACD,kBAAmB,CACjB,MAAOA,EACR,EACD,gBAAiB,CACf,MAAOA,EACR,EACD,YAAa,CACX,MAAOA,EACR,EACD,iBAAkB,CAChB,MAAOA,EACR,EACD,eAAgB,CACd,MAAOA,EACR,EAED,aAAc,CACZ,YAAa,GACb,UAAWrtB,IAAU,CACnB,eAAgB,CACd,QAASA,CACV,CACP,EACG,EACD,QAAS,CAAE,EACX,SAAU,CAAE,EACZ,aAAc,CAAE,EAChB,WAAY,CAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,222]} \ No newline at end of file diff --git a/lib/platform-bible-react/dist/index.d.ts b/lib/platform-bible-react/dist/index.d.ts index 44980362d9..24f1bb5de1 100644 --- a/lib/platform-bible-react/dist/index.d.ts +++ b/lib/platform-bible-react/dist/index.d.ts @@ -192,6 +192,18 @@ export type LocalizedStringValue = string; export interface LanguageStrings { [k: LocalizeKey]: LocalizedStringValue; } +export type ResourceType = "DBLResource" | "EnhancedResource" | "XmlResource" | "SourceLanguageResource"; +export type DblResourceData = { + dblEntryUid: string; + displayName: string; + fullName: string; + bestLanguageName: string; + type: ResourceType; + size: number; + installed: boolean; + updateAvailable: boolean; + projectId: string; +}; export type BookChapterControlProps = { scrRef: ScriptureReference; handleSubmit: (scrRef: ScriptureReference) => void; @@ -1369,6 +1381,20 @@ export interface FooterProps { * @returns The rendered Footer component */ export function Footer({ id, publisherDisplayName, fileSize, locales, versionHistory, }: FooterProps): import("react/jsx-runtime").JSX.Element; +export declare const FILTERABLE_RESOURCE_LIST_STRING_KEYS: LocalizeKey[]; +export type FilterableResourceListProps = { + localizedStrings: LanguageStrings; + dblResources: DblResourceData[]; + isLoadingDblResources: boolean; + typeFilter: ResourceType[]; + setTypeFilter: (stateValue: ResourceType[]) => void; + languageFilter: string[]; + setLanguageFilter: (stateValue: string[]) => void; + openResource: (projectId: string) => void; + installResource: ((uid: string) => Promise) | undefined; + uninstallResource: ((uid: string) => Promise) | undefined; +}; +export declare function FilterableResourceList({ localizedStrings, dblResources, isLoadingDblResources, typeFilter, setTypeFilter, languageFilter, setLanguageFilter, openResource, installResource, uninstallResource, }: FilterableResourceListProps): import("react/jsx-runtime").JSX.Element; /** * Adds an event handler to an event so the event handler runs when the event is emitted. Use * `papi.network.getNetworkEvent` to use a networked event with this hook. diff --git a/lib/platform-bible-react/dist/index.js b/lib/platform-bible-react/dist/index.js index f414b7d674..c11007853d 100644 --- a/lib/platform-bible-react/dist/index.js +++ b/lib/platform-bible-react/dist/index.js @@ -1,45 +1,45 @@ -import Ds, { jsx as s, jsxs as x, Fragment as it } from "react/jsx-runtime"; -import * as M from "react"; -import A, { forwardRef as Zn, useCallback as $e, useState as ue, useRef as gt, useEffect as at, useLayoutEffect as Jo, useMemo as Te } from "react"; -import { History as Ms, ChevronRight as Wa, Check as xn, Circle as qa, ArrowDownWideNarrow as Bs, Clock as js, Bookmark as Vs, X as Ka, Search as Ja, ChevronsUpDown as Za, FilterIcon as Ls, ChevronDown as Qn, ChevronUp as zs, ArrowLeftIcon as Fs, ChevronLeftIcon as Us, ChevronRightIcon as Gs, ArrowRightIcon as Hs, CircleCheckIcon as Xs, CircleXIcon as Ys, CircleHelpIcon as Ws, ArrowUpIcon as qs, ArrowDownIcon as Ks, ArrowUpDownIcon as Js, Star as Zs, ChevronLeft as Qs, LoaderCircle as el, Download as tl, Filter as nl, User as rl, Link as ol, CircleHelp as al } from "lucide-react"; -import bt, { clsx as il } from "clsx"; -import { extendTailwindMerge as sl } from "tailwind-merge"; -import * as we from "@radix-ui/react-dropdown-menu"; -import { DropdownMenuTrigger as ll } from "@radix-ui/react-dropdown-menu"; -import { getChaptersForBook as cl, deepEqual as to, substring as dl, formatScrRef as Tr, compareScrRefs as zr, scrRefToBBBCCCVVV as Cr, getLocalizeKeyForScrollGroupId as pe, NumberFormat as pl, formatBytes as ul } from "platform-bible-utils"; -import { Slot as wl } from "@radix-ui/react-slot"; -import { cva as Nn } from "class-variance-authority"; -import * as Qa from "@radix-ui/react-label"; -import * as un from "@radix-ui/react-radio-group"; -import * as wn from "@radix-ui/react-popover"; +import Ui, { jsx as i, jsxs as x, Fragment as lt } from "react/jsx-runtime"; +import * as j from "react"; +import M, { forwardRef as lr, useCallback as Ie, useState as ie, useRef as vt, useEffect as Ke, useLayoutEffect as ra, useMemo as Ne } from "react"; +import { History as Gi, ChevronRight as ts, Check as Cn, Circle as ns, ArrowDownWideNarrow as Hi, Clock as Xi, Bookmark as Yi, X as rs, Search as lo, ChevronsUpDown as Qn, FilterIcon as Wi, ChevronDown as Vt, ChevronUp as Xr, ArrowLeftIcon as qi, ChevronLeftIcon as Ki, ChevronRightIcon as Ji, ArrowRightIcon as Zi, CircleCheckIcon as Qi, CircleXIcon as el, CircleHelpIcon as tl, ArrowUpIcon as nl, ArrowDownIcon as rl, ArrowUpDownIcon as ol, Star as al, ChevronLeft as sl, LoaderCircle as il, Download as ll, Filter as cl, User as dl, Link as ul, CircleHelp as pl, BookOpen as oa, Loader as wl, Ellipsis as fl } from "lucide-react"; +import yt, { clsx as ml } from "clsx"; +import { extendTailwindMerge as hl } from "tailwind-merge"; +import * as me from "@radix-ui/react-dropdown-menu"; +import { DropdownMenuTrigger as gl } from "@radix-ui/react-dropdown-menu"; +import { getChaptersForBook as bl, deepEqual as co, substring as vl, formatScrRef as _r, compareScrRefs as Yr, scrRefToBBBCCCVVV as Pr, getLocalizeKeyForScrollGroupId as pe, NumberFormat as yl, formatBytes as xl, getErrorMessage as Nl } from "platform-bible-utils"; +import { Slot as kl } from "@radix-ui/react-slot"; +import { cva as Sn } from "class-variance-authority"; +import * as os from "@radix-ui/react-label"; +import * as gn from "@radix-ui/react-radio-group"; +import * as bn from "@radix-ui/react-popover"; import { Command as Oe } from "cmdk"; -import * as Ye from "@radix-ui/react-dialog"; -import { useReactTable as ei, getCoreRowModel as ti, getPaginationRowModel as fl, getSortedRowModel as ni, getFilteredRowModel as ml, flexRender as sn, getExpandedRowModel as hl, getGroupedRowModel as gl } from "@tanstack/react-table"; -import * as be from "@radix-ui/react-select"; -import * as Fr from "@radix-ui/react-checkbox"; -import * as er from "@radix-ui/react-toggle-group"; -import * as ri from "@radix-ui/react-toggle"; +import * as Je from "@radix-ui/react-dialog"; +import { useReactTable as as, getCoreRowModel as ss, getPaginationRowModel as El, getSortedRowModel as is, getFilteredRowModel as Tl, flexRender as pn, getExpandedRowModel as Cl, getGroupedRowModel as Sl } from "@tanstack/react-table"; +import * as ve from "@radix-ui/react-select"; +import * as Wr from "@radix-ui/react-checkbox"; +import * as cr from "@radix-ui/react-toggle-group"; +import * as ls from "@radix-ui/react-toggle"; import * as Re from "@radix-ui/react-tabs"; -import * as oi from "@radix-ui/react-separator"; -import bl, { ThemeContext as vl, internal_processStyles as yl } from "@mui/styled-engine"; -import { MenuItem as xl, ListItemText as Nl, ListItemIcon as ai, Menu as kl, Grid as ii, List as El, IconButton as si, Drawer as Tl, AppBar as Cl, Toolbar as Sl } from "@mui/material"; -import * as Ol from "react-dom"; -import Mn from "react-dom"; -import { Toaster as Rl } from "sonner"; -import { toast as ah } from "sonner"; -import * as nn from "@radix-ui/react-slider"; -import * as Ur from "@radix-ui/react-switch"; -import Pl from "markdown-to-jsx"; -const _l = sl({ prefix: "tw-" }); -function T(...e) { - return _l(il(e)); -} -const kn = A.forwardRef( - ({ className: e, type: t, ...n }, r) => /* @__PURE__ */ s( +import * as cs from "@radix-ui/react-separator"; +import Ol, { ThemeContext as Rl, internal_processStyles as _l } from "@mui/styled-engine"; +import { MenuItem as Pl, ListItemText as $l, ListItemIcon as ds, Menu as Il, Grid as us, List as Al, IconButton as ps, Drawer as Dl, AppBar as Ml, Toolbar as Bl } from "@mui/material"; +import * as jl from "react-dom"; +import Un from "react-dom"; +import { Toaster as Vl } from "sonner"; +import { toast as fh } from "sonner"; +import * as ln from "@radix-ui/react-slider"; +import * as qr from "@radix-ui/react-switch"; +import Ll from "markdown-to-jsx"; +const Fl = hl({ prefix: "tw-" }); +function C(...e) { + return Fl(ml(e)); +} +const qt = M.forwardRef( + ({ className: e, type: t, ...n }, r) => /* @__PURE__ */ i( "input", { type: t, - className: T( + className: C( "pr-twp tw-flex tw-h-10 tw-rounded-md tw-border tw-border-input tw-bg-background tw-px-3 tw-py-2 tw-text-sm tw-ring-offset-background file:tw-border-0 file:tw-bg-transparent file:tw-text-sm file:tw-font-medium file:tw-text-foreground placeholder:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50", e ), @@ -48,25 +48,25 @@ const kn = A.forwardRef( } ) ); -kn.displayName = "Input"; -const $l = Zn( +qt.displayName = "Input"; +const zl = lr( ({ handleSearch: e, handleKeyDown: t, handleOnClick: n, handleSubmit: r, ...o }, a) => /* @__PURE__ */ x("div", { className: "tw-relative", children: [ - /* @__PURE__ */ s( - kn, + /* @__PURE__ */ i( + qt, { ...o, type: "text", className: "tw-box-border tw-gap-2.5 tw-rounded-lg tw-border tw-border-solid tw-bg-background tw-py-2 tw-pl-4 tw-pr-3 tw-font-medium tw-shadow-none tw-outline-none", - onChange: (i) => e(i.target.value), - onKeyDown: (i) => { - i.key === "Enter" && r(), t(i); + onChange: (s) => e(s.target.value), + onKeyDown: (s) => { + s.key === "Enter" && r(), t(s); }, onClick: n, ref: a } ), - /* @__PURE__ */ s( - Ms, + /* @__PURE__ */ i( + Gi, { className: "tw-absolute tw-right-3 tw-top-1/2 tw-h-4 tw-w-4 tw--translate-y-1/2 tw-transform tw-cursor-pointer tw-text-muted-foreground", onClick: () => { @@ -76,8 +76,8 @@ const $l = Zn( ) ] }) ); -var Il = Object.defineProperty, Al = (e, t, n) => t in e ? Il(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, te = (e, t, n) => Al(e, typeof t != "symbol" ? t + "" : t, n); -const yt = [ +var Ul = Object.defineProperty, Gl = (e, t, n) => t in e ? Ul(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ne = (e, t, n) => Gl(e, typeof t != "symbol" ? t + "" : t, n); +const Nt = [ "GEN", "EXO", "LEV", @@ -222,7 +222,7 @@ const yt = [ "REP", "4BA", "LAO" -], no = [ +], uo = [ "XXA", "XXB", "XXC", @@ -238,7 +238,7 @@ const yt = [ "GLO", "TDX", "NDX" -], li = [ +], ws = [ "Genesis", "Exodus", "Leviticus", @@ -364,89 +364,89 @@ const yt = [ "Reproof (Proverbs 25-31)", "4 Baruch (Rest of Baruch)", "Laodiceans" -], Zo = Gl(); -function Ht(e, t = !0) { - return t && (e = e.toUpperCase()), e in Zo ? Zo[e] : 0; +], aa = ec(); +function Kt(e, t = !0) { + return t && (e = e.toUpperCase()), e in aa ? aa[e] : 0; } -function ro(e) { - return Ht(e) > 0; +function po(e) { + return Kt(e) > 0; } -function Dl(e) { - const t = typeof e == "string" ? Ht(e) : e; +function Hl(e) { + const t = typeof e == "string" ? Kt(e) : e; return t >= 40 && t <= 66; } -function Ml(e) { - return (typeof e == "string" ? Ht(e) : e) <= 39; +function Xl(e) { + return (typeof e == "string" ? Kt(e) : e) <= 39; } -function ci(e) { +function fs(e) { return e <= 66; } -function Bl(e) { - const t = typeof e == "string" ? Ht(e) : e; - return ui(t) && !ci(t); +function Yl(e) { + const t = typeof e == "string" ? Kt(e) : e; + return gs(t) && !fs(t); } -function* jl() { - for (let e = 1; e <= yt.length; e++) +function* Wl() { + for (let e = 1; e <= Nt.length; e++) yield e; } -const Vl = 1, di = yt.length; -function Ll() { +const ql = 1, ms = Nt.length; +function Kl() { return ["XXA", "XXB", "XXC", "XXD", "XXE", "XXF", "XXG"]; } -function oo(e, t = "***") { +function wo(e, t = "***") { const n = e - 1; - return n < 0 || n >= yt.length ? t : yt[n]; + return n < 0 || n >= Nt.length ? t : Nt[n]; } -function pi(e) { - return e <= 0 || e > di ? "******" : li[e - 1]; +function hs(e) { + return e <= 0 || e > ms ? "******" : ws[e - 1]; } -function zl(e) { - return pi(Ht(e)); +function Jl(e) { + return hs(Kt(e)); } -function ui(e) { - const t = typeof e == "number" ? oo(e) : e; - return ro(t) && !no.includes(t); +function gs(e) { + const t = typeof e == "number" ? wo(e) : e; + return po(t) && !uo.includes(t); } -function Fl(e) { - const t = typeof e == "number" ? oo(e) : e; - return ro(t) && no.includes(t); +function Zl(e) { + const t = typeof e == "number" ? wo(e) : e; + return po(t) && uo.includes(t); } -function Ul(e) { - return li[e - 1].includes("*obsolete*"); +function Ql(e) { + return ws[e - 1].includes("*obsolete*"); } -function Gl() { +function ec() { const e = {}; - for (let t = 0; t < yt.length; t++) - e[yt[t]] = t + 1; + for (let t = 0; t < Nt.length; t++) + e[Nt[t]] = t + 1; return e; } -const oe = { - allBookIds: yt, - nonCanonicalIds: no, - bookIdToNumber: Ht, - isBookIdValid: ro, - isBookNT: Dl, - isBookOT: Ml, - isBookOTNT: ci, - isBookDC: Bl, - allBookNumbers: jl, - firstBook: Vl, - lastBook: di, - extraBooks: Ll, - bookNumberToId: oo, - bookNumberToEnglishName: pi, - bookIdToEnglishName: zl, - isCanonical: ui, - isExtraMaterial: Fl, - isObsolete: Ul +const se = { + allBookIds: Nt, + nonCanonicalIds: uo, + bookIdToNumber: Kt, + isBookIdValid: po, + isBookNT: Hl, + isBookOT: Xl, + isBookOTNT: fs, + isBookDC: Yl, + allBookNumbers: Wl, + firstBook: ql, + lastBook: ms, + extraBooks: Kl, + bookNumberToId: wo, + bookNumberToEnglishName: hs, + bookIdToEnglishName: Jl, + isCanonical: gs, + isExtraMaterial: Zl, + isObsolete: Ql }; -var Ge = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Original = 1] = "Original", e[e.Septuagint = 2] = "Septuagint", e[e.Vulgate = 3] = "Vulgate", e[e.English = 4] = "English", e[e.RussianProtestant = 5] = "RussianProtestant", e[e.RussianOrthodox = 6] = "RussianOrthodox", e))(Ge || {}); -const _e = class { +var Ye = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Original = 1] = "Original", e[e.Septuagint = 2] = "Septuagint", e[e.Vulgate = 3] = "Vulgate", e[e.English = 4] = "English", e[e.RussianProtestant = 5] = "RussianProtestant", e[e.RussianOrthodox = 6] = "RussianOrthodox", e))(Ye || {}); +const Pe = class { // private versInfo: Versification; constructor(t) { - if (te(this, "name"), te(this, "fullPath"), te(this, "isPresent"), te(this, "hasVerseSegments"), te(this, "isCustomized"), te(this, "baseVersification"), te(this, "scriptureBooks"), te(this, "_type"), t == null) + if (ne(this, "name"), ne(this, "fullPath"), ne(this, "isPresent"), ne(this, "hasVerseSegments"), ne(this, "isCustomized"), ne(this, "baseVersification"), ne(this, "scriptureBooks"), ne(this, "_type"), t == null) throw new Error("Argument undefined"); - typeof t == "string" ? (this.name = t, this._type = Ge[t]) : (this._type = t, this.name = Ge[t]); + typeof t == "string" ? (this.name = t, this._type = Ye[t]) : (this._type = t, this.name = Ye[t]); } get type() { return this._type; @@ -455,34 +455,34 @@ const _e = class { return !t.type || !this.type ? !1 : t.type === this.type; } }; -te(_e, "Original", new _e(Ge.Original)), te(_e, "Septuagint", new _e(Ge.Septuagint)), te(_e, "Vulgate", new _e(Ge.Vulgate)), te(_e, "English", new _e(Ge.English)), te(_e, "RussianProtestant", new _e(Ge.RussianProtestant)), te(_e, "RussianOrthodox", new _e(Ge.RussianOrthodox)); -let ut = _e; -function Qo(e, t) { +ne(Pe, "Original", new Pe(Ye.Original)), ne(Pe, "Septuagint", new Pe(Ye.Septuagint)), ne(Pe, "Vulgate", new Pe(Ye.Vulgate)), ne(Pe, "English", new Pe(Ye.English)), ne(Pe, "RussianProtestant", new Pe(Ye.RussianProtestant)), ne(Pe, "RussianOrthodox", new Pe(Ye.RussianOrthodox)); +let ft = Pe; +function sa(e, t) { const n = t[0]; for (let r = 1; r < t.length; r++) e = e.split(t[r]).join(n); return e.split(n); } -var wi = /* @__PURE__ */ ((e) => (e[e.Valid = 0] = "Valid", e[e.UnknownVersification = 1] = "UnknownVersification", e[e.OutOfRange = 2] = "OutOfRange", e[e.VerseOutOfOrder = 3] = "VerseOutOfOrder", e[e.VerseRepeated = 4] = "VerseRepeated", e))(wi || {}); -const Ee = class ne { +var bs = /* @__PURE__ */ ((e) => (e[e.Valid = 0] = "Valid", e[e.UnknownVersification = 1] = "UnknownVersification", e[e.OutOfRange = 2] = "OutOfRange", e[e.VerseOutOfOrder = 3] = "VerseOutOfOrder", e[e.VerseRepeated = 4] = "VerseRepeated", e))(bs || {}); +const Te = class ae { constructor(t, n, r, o) { - if (te(this, "firstChapter"), te(this, "lastChapter"), te(this, "lastVerse"), te(this, "hasSegmentsDefined"), te(this, "text"), te(this, "BBBCCCVVVS"), te(this, "longHashCode"), te(this, "versification"), te(this, "rtlMark", "‏"), te(this, "_bookNum", 0), te(this, "_chapterNum", 0), te(this, "_verseNum", 0), te(this, "_verse"), r == null && o == null) + if (ne(this, "firstChapter"), ne(this, "lastChapter"), ne(this, "lastVerse"), ne(this, "hasSegmentsDefined"), ne(this, "text"), ne(this, "BBBCCCVVVS"), ne(this, "longHashCode"), ne(this, "versification"), ne(this, "rtlMark", "‏"), ne(this, "_bookNum", 0), ne(this, "_chapterNum", 0), ne(this, "_verseNum", 0), ne(this, "_verse"), r == null && o == null) if (t != null && typeof t == "string") { - const a = t, i = n != null && n instanceof ut ? n : void 0; - this.setEmpty(i), this.parse(a); + const a = t, s = n != null && n instanceof ft ? n : void 0; + this.setEmpty(s), this.parse(a); } else if (t != null && typeof t == "number") { - const a = n != null && n instanceof ut ? n : void 0; - this.setEmpty(a), this._verseNum = t % ne.chapterDigitShifter, this._chapterNum = Math.floor( - t % ne.bookDigitShifter / ne.chapterDigitShifter - ), this._bookNum = Math.floor(t / ne.bookDigitShifter); + const a = n != null && n instanceof ft ? n : void 0; + this.setEmpty(a), this._verseNum = t % ae.chapterDigitShifter, this._chapterNum = Math.floor( + t % ae.bookDigitShifter / ae.chapterDigitShifter + ), this._bookNum = Math.floor(t / ae.bookDigitShifter); } else if (n == null) - if (t != null && t instanceof ne) { + if (t != null && t instanceof ae) { const a = t; this._bookNum = a.bookNum, this._chapterNum = a.chapterNum, this._verseNum = a.verseNum, this._verse = a.verse, this.versification = a.versification; } else { if (t == null) return; - const a = t instanceof ut ? t : ne.defaultVersification; + const a = t instanceof ft ? t : ae.defaultVersification; this.setEmpty(a); } else @@ -491,7 +491,7 @@ const Ee = class ne { if (typeof t == "string" && typeof n == "string" && typeof r == "string") this.setEmpty(o), this.updateInternal(t, n, r); else if (typeof t == "number" && typeof n == "number" && typeof r == "number") - this._bookNum = t, this._chapterNum = n, this._verseNum = r, this.versification = o ?? ne.defaultVersification; + this._bookNum = t, this._chapterNum = n, this._verseNum = r, this.versification = o ?? ae.defaultVersification; else throw new Error("VerseRef constructor not supported."); else @@ -512,10 +512,10 @@ const Ee = class ne { static tryParse(t) { let n; try { - return n = new ne(t), { success: !0, verseRef: n }; + return n = new ae(t), { success: !0, verseRef: n }; } catch (r) { - if (r instanceof Jt) - return n = new ne(), { success: !1, verseRef: n }; + if (r instanceof nn) + return n = new ae(), { success: !1, verseRef: n }; throw r; } } @@ -529,7 +529,7 @@ const Ee = class ne { * digits. */ static getBBBCCCVVV(t, n, r) { - return t % ne.bcvMaxValue * ne.bookDigitShifter + (n >= 0 ? n % ne.bcvMaxValue * ne.chapterDigitShifter : 0) + (r >= 0 ? r % ne.bcvMaxValue : 0); + return t % ae.bcvMaxValue * ae.bookDigitShifter + (n >= 0 ? n % ae.bcvMaxValue * ae.chapterDigitShifter : 0) + (r >= 0 ? r % ae.bcvMaxValue : 0); } /** * Deserializes a serialized VerseRef. @@ -537,9 +537,9 @@ const Ee = class ne { * @returns the deserialized VerseRef. */ static fromJSON(t) { - const { book: n, chapterNum: r, verseNum: o, verse: a, versificationStr: i } = t, l = a || o.toString(); + const { book: n, chapterNum: r, verseNum: o, verse: a, versificationStr: s } = t, l = a || o.toString(); let c; - return i && (c = new ut(i)), n ? new ne(n, r.toString(), l, c) : new ne(); + return s && (c = new ft(s)), n ? new ae(n, r.toString(), l, c) : new ae(); } /** * Parses a verse string and gets the leading numeric portion as a number. @@ -556,7 +556,7 @@ const Ee = class ne { for (let o = 0; o < t.length; o++) { if (r = t[o], r < "0" || r > "9") return o === 0 && (n = -1), { success: !1, vNum: n }; - if (n = n * 10 + +r - 0, n > ne.bcvMaxValue) + if (n = n * 10 + +r - 0, n > ae.bcvMaxValue) return n = -1, { success: !1, vNum: n }; } return { success: !0, vNum: n }; @@ -571,17 +571,17 @@ const Ee = class ne { * Gets whether the verse contains multiple verses. */ get hasMultiple() { - return this._verse != null && (this._verse.includes(ne.verseRangeSeparator) || this._verse.includes(ne.verseSequenceIndicator)); + return this._verse != null && (this._verse.includes(ae.verseRangeSeparator) || this._verse.includes(ae.verseSequenceIndicator)); } /** * Gets or sets the book of the reference. Book is the 3-letter abbreviation in capital letters, * e.g. `'MAT'`. */ get book() { - return oe.bookNumberToId(this.bookNum, ""); + return se.bookNumberToId(this.bookNum, ""); } set book(t) { - this.bookNum = oe.bookIdToNumber(t); + this.bookNum = se.bookIdToNumber(t); } /** * Gets or sets the chapter of the reference,. e.g. `'3'`. @@ -601,8 +601,8 @@ const Ee = class ne { return this._verse != null ? this._verse : this.isDefault || this._verseNum < 0 ? "" : this._verseNum.toString(); } set verse(t) { - const { success: n, vNum: r } = ne.tryGetVerseNum(t); - this._verse = n ? void 0 : t.replace(this.rtlMark, ""), this._verseNum = r, !(this._verseNum >= 0) && ({ vNum: this._verseNum } = ne.tryGetVerseNum(this._verse)); + const { success: n, vNum: r } = ae.tryGetVerseNum(t); + this._verse = n ? void 0 : t.replace(this.rtlMark, ""), this._verseNum = r, !(this._verseNum >= 0) && ({ vNum: this._verseNum } = ae.tryGetVerseNum(this._verse)); } /** * Get or set Book based on book number, e.g. `42`. @@ -611,8 +611,8 @@ const Ee = class ne { return this._bookNum; } set bookNum(t) { - if (t <= 0 || t > oe.lastBook) - throw new Jt( + if (t <= 0 || t > se.lastBook) + throw new nn( "BookNum must be greater than zero and less than or equal to last book" ); this._bookNum = t; @@ -645,7 +645,7 @@ const Ee = class ne { return (t = this.versification) == null ? void 0 : t.name; } set versificationStr(t) { - this.versification = this.versification != null ? new ut(t) : void 0; + this.versification = this.versification != null ? new ft(t) : void 0; } /** * Determines if the reference is valid. @@ -657,14 +657,14 @@ const Ee = class ne { * Get the valid status for this reference. */ get validStatus() { - return this.validateVerse(ne.verseRangeSeparators, ne.verseSequenceIndicators); + return this.validateVerse(ae.verseRangeSeparators, ae.verseSequenceIndicators); } /** * Gets the reference as a comparable integer where the book, * chapter, and verse each occupy three digits and the verse is 0. */ get BBBCCC() { - return ne.getBBBCCCVVV(this._bookNum, this._chapterNum, 0); + return ae.getBBBCCCVVV(this._bookNum, this._chapterNum, 0); } /** * Gets the reference as a comparable integer where the book, @@ -673,7 +673,7 @@ const Ee = class ne { * segments or bridge) this cannot be used for an exact comparison. */ get BBBCCCVVV() { - return ne.getBBBCCCVVV(this._bookNum, this._chapterNum, this._verseNum); + return ae.getBBBCCCVVV(this._bookNum, this._chapterNum, this._verseNum); } /** * Gets whether the verse is defined as an excluded verse in the versification. @@ -698,18 +698,18 @@ const Ee = class ne { const a = t.split("/"); if (t = a[0], a.length > 1) try { - const i = +a[1].trim(); - this.versification = new ut(Ge[i]); + const s = +a[1].trim(); + this.versification = new ft(Ye[s]); } catch { - throw new Jt("Invalid reference : " + t); + throw new nn("Invalid reference : " + t); } } const n = t.trim().split(" "); if (n.length !== 2) - throw new Jt("Invalid reference : " + t); + throw new nn("Invalid reference : " + t); const r = n[1].split(":"), o = +r[0]; - if (r.length !== 2 || oe.bookIdToNumber(n[0]) === 0 || !Number.isInteger(o) || o < 0 || !ne.isVerseParseable(r[1])) - throw new Jt("Invalid reference : " + t); + if (r.length !== 2 || se.bookIdToNumber(n[0]) === 0 || !Number.isInteger(o) || o < 0 || !ae.isVerseParseable(r[1])) + throw new nn("Invalid reference : " + t); this.updateInternal(n[0], r[0], r[1]); } /** @@ -725,7 +725,7 @@ const Ee = class ne { * @returns The cloned VerseRef. */ clone() { - return new ne(this); + return new ae(this); } toString() { const t = this.book; @@ -749,7 +749,7 @@ const Ee = class ne { * @returns `true` if this `VerseRef` is equal to the supplied one, `false` otherwise. */ equals(t) { - return t instanceof ne ? t._bookNum === this._bookNum && t._chapterNum === this._chapterNum && t._verseNum === this._verseNum && t.verse === this.verse && (t.versification == null && this.versification == null || t.versification != null && this.versification != null && t.versification.equals(this.versification)) : !1; + return t instanceof ae ? t._bookNum === this._bookNum && t._chapterNum === this._chapterNum && t._verseNum === this._verseNum && t.verse === this.verse && (t.versification == null && this.versification == null || t.versification != null && this.versification != null && t.versification.equals(this.versification)) : !1; } /** * Enumerate all individual verses contained in a VerseRef. @@ -767,22 +767,22 @@ const Ee = class ne { * Defaults to `VerseRef.verseSequenceIndicators`. * @returns An array of all single verse references in this VerseRef. */ - allVerses(t = !1, n = ne.verseRangeSeparators, r = ne.verseSequenceIndicators) { + allVerses(t = !1, n = ae.verseRangeSeparators, r = ae.verseSequenceIndicators) { if (this._verse == null || this.chapterNum <= 0) return [this.clone()]; - const o = [], a = Qo(this._verse, r); - for (const i of a.map((l) => Qo(l, n))) { + const o = [], a = sa(this._verse, r); + for (const s of a.map((l) => sa(l, n))) { const l = this.clone(); - l.verse = i[0]; + l.verse = s[0]; const c = l.verseNum; - if (o.push(l), i.length > 1) { + if (o.push(l), s.length > 1) { const d = this.clone(); - if (d.verse = i[1], !t) - for (let p = c + 1; p < d.verseNum; p++) { - const h = new ne( + if (d.verse = s[1], !t) + for (let u = c + 1; u < d.verseNum; u++) { + const h = new ae( this._bookNum, this._chapterNum, - p, + u, this.versification ); this.isExcluded || o.push(h); @@ -803,12 +803,12 @@ const Ee = class ne { const a = o.internalValid; if (a !== 0) return a; - const i = o.BBBCCCVVV; - if (r > i) + const s = o.BBBCCCVVV; + if (r > s) return 3; - if (r === i) + if (r === s) return 4; - r = i; + r = s; } return 0; } @@ -816,26 +816,26 @@ const Ee = class ne { * Gets whether a single verse reference is valid. */ get internalValid() { - return this.versification == null ? 1 : this._bookNum <= 0 || this._bookNum > oe.lastBook ? 2 : (oe.isCanonical(this._bookNum), 0); + return this.versification == null ? 1 : this._bookNum <= 0 || this._bookNum > se.lastBook ? 2 : (se.isCanonical(this._bookNum), 0); } - setEmpty(t = ne.defaultVersification) { + setEmpty(t = ae.defaultVersification) { this._bookNum = 0, this._chapterNum = -1, this._verse = void 0, this.versification = t; } updateInternal(t, n, r) { - this.bookNum = oe.bookIdToNumber(t), this.chapter = n, this.verse = r; + this.bookNum = se.bookIdToNumber(t), this.chapter = n, this.verse = r; } }; -te(Ee, "defaultVersification", ut.English), te(Ee, "verseRangeSeparator", "-"), te(Ee, "verseSequenceIndicator", ","), te(Ee, "verseRangeSeparators", [Ee.verseRangeSeparator]), te(Ee, "verseSequenceIndicators", [Ee.verseSequenceIndicator]), te(Ee, "chapterDigitShifter", 1e3), te(Ee, "bookDigitShifter", Ee.chapterDigitShifter * Ee.chapterDigitShifter), te(Ee, "bcvMaxValue", Ee.chapterDigitShifter - 1), /** +ne(Te, "defaultVersification", ft.English), ne(Te, "verseRangeSeparator", "-"), ne(Te, "verseSequenceIndicator", ","), ne(Te, "verseRangeSeparators", [Te.verseRangeSeparator]), ne(Te, "verseSequenceIndicators", [Te.verseSequenceIndicator]), ne(Te, "chapterDigitShifter", 1e3), ne(Te, "bookDigitShifter", Te.chapterDigitShifter * Te.chapterDigitShifter), ne(Te, "bcvMaxValue", Te.chapterDigitShifter - 1), /** * The valid status of the VerseRef. */ -te(Ee, "ValidStatusType", wi); -class Jt extends Error { +ne(Te, "ValidStatusType", bs); +class nn extends Error { } -const ao = we.Root, fi = we.Trigger, Hl = we.Group, xm = we.Portal, Nm = we.Sub, km = we.RadioGroup, Xl = A.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ x( - we.SubTrigger, +const vn = me.Root, er = me.Trigger, tc = me.Group, Om = me.Portal, Rm = me.Sub, _m = me.RadioGroup, nc = M.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ x( + me.SubTrigger, { ref: o, - className: T( + className: C( "tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none focus:tw-bg-accent data-[state=open]:tw-bg-accent", t && "tw-pl-8", e @@ -843,29 +843,29 @@ const ao = we.Root, fi = we.Trigger, Hl = we.Group, xm = we.Portal, Nm = we.Sub, ...r, children: [ n, - /* @__PURE__ */ s(Wa, { className: "tw-ml-auto tw-h-4 tw-w-4" }) + /* @__PURE__ */ i(ts, { className: "tw-ml-auto tw-h-4 tw-w-4" }) ] } )); -Xl.displayName = we.SubTrigger.displayName; -const Yl = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - we.SubContent, +nc.displayName = me.SubTrigger.displayName; +const rc = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + me.SubContent, { ref: n, - className: T( + className: C( "tw-z-50 tw-min-w-[8rem] tw-overflow-hidden tw-rounded-md tw-border tw-bg-popover tw-p-1 tw-text-popover-foreground tw-shadow-lg data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2", e ), ...t } )); -Yl.displayName = we.SubContent.displayName; -const tr = A.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ s(we.Portal, { children: /* @__PURE__ */ s( - we.Content, +rc.displayName = me.SubContent.displayName; +const Lt = M.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ i(me.Portal, { children: /* @__PURE__ */ i( + me.Content, { ref: r, sideOffset: t, - className: T( + className: C( /* adding pr-twp because the dropdown content is added to the dom as a sibling to the app root */ "pr-twp tw-z-50 tw-min-w-[8rem] tw-overflow-hidden tw-rounded-md tw-border tw-bg-popover tw-p-1 tw-text-popover-foreground tw-shadow-md data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2", e @@ -873,12 +873,12 @@ const tr = A.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__ ...n } ) })); -tr.displayName = we.Content.displayName; -const mi = A.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ s( - we.Item, +Lt.displayName = me.Content.displayName; +const tr = M.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ i( + me.Item, { ref: r, - className: T( + className: C( // removed: tw-relative tw-flex focus:tw-text-accent-foreground "tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none tw-transition-colors focus:tw-bg-accent data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50", t && "tw-pl-8", @@ -887,69 +887,69 @@ const mi = A.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ ...n } )); -mi.displayName = we.Item.displayName; -const io = A.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ x( - we.CheckboxItem, +tr.displayName = me.Item.displayName; +const dr = M.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ x( + me.CheckboxItem, { ref: o, - className: T( + className: C( "tw-relative tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-outline-none tw-transition-colors focus:tw-bg-accent focus:tw-text-accent-foreground data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50", e ), checked: n, ...r, children: [ - /* @__PURE__ */ s("span", { className: "tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center", children: /* @__PURE__ */ s(we.ItemIndicator, { children: /* @__PURE__ */ s(xn, { className: "tw-h-4 tw-w-4" }) }) }), + /* @__PURE__ */ i("span", { className: "tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center", children: /* @__PURE__ */ i(me.ItemIndicator, { children: /* @__PURE__ */ i(Cn, { className: "tw-h-4 tw-w-4" }) }) }), t ] } )); -io.displayName = we.CheckboxItem.displayName; -const hi = A.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ x( - we.RadioItem, +dr.displayName = me.CheckboxItem.displayName; +const vs = M.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ x( + me.RadioItem, { ref: r, - className: T( + className: C( "tw-relative tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-outline-none tw-transition-colors focus:tw-bg-accent focus:tw-text-accent-foreground data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50", e ), ...n, children: [ - /* @__PURE__ */ s("span", { className: "tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center", children: /* @__PURE__ */ s(we.ItemIndicator, { children: /* @__PURE__ */ s(qa, { className: "tw-h-2 tw-w-2 tw-fill-current" }) }) }), + /* @__PURE__ */ i("span", { className: "tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center", children: /* @__PURE__ */ i(me.ItemIndicator, { children: /* @__PURE__ */ i(ns, { className: "tw-h-2 tw-w-2 tw-fill-current" }) }) }), t ] } )); -hi.displayName = we.RadioItem.displayName; -const En = A.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ s( - we.Label, +vs.displayName = me.RadioItem.displayName; +const On = M.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ i( + me.Label, { ref: r, - className: T("tw-px-2 tw-py-1.5 tw-text-sm tw-font-semibold", t && "tw-pl-8", e), + className: C("tw-px-2 tw-py-1.5 tw-text-sm tw-font-semibold", t && "tw-pl-8", e), ...n } )); -En.displayName = we.Label.displayName; -const nr = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - we.Separator, +On.displayName = me.Label.displayName; +const Rn = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + me.Separator, { ref: n, - className: T("tw--mx-1 tw-my-1 tw-h-px tw-bg-muted", e), + className: C("tw--mx-1 tw-my-1 tw-h-px tw-bg-muted", e), ...t } )); -nr.displayName = we.Separator.displayName; -function Wl({ className: e, ...t }) { - return /* @__PURE__ */ s( +Rn.displayName = me.Separator.displayName; +function oc({ className: e, ...t }) { + return /* @__PURE__ */ i( "span", { - className: T("tw-ml-auto tw-text-xs tw-tracking-widest tw-opacity-60", e), + className: C("tw-ml-auto tw-text-xs tw-tracking-widest tw-opacity-60", e), ...t } ); } -Wl.displayName = "DropdownMenuShortcut"; -const ql = Zn( +oc.displayName = "DropdownMenuShortcut"; +const ac = lr( ({ bookId: e, handleSelectBook: t, @@ -957,13 +957,13 @@ const ql = Zn( handleHighlightBook: r, handleKeyDown: o, bookType: a, - children: i + children: s }, l) => /* @__PURE__ */ x( - mi, + tr, { ref: l, textValue: e, - className: T("tw-mx-1 tw-px-1 tw-font-normal tw-text-foreground/80", { + className: C("tw-mx-1 tw-px-1 tw-font-normal tw-text-foreground/80", { // Overriding `data-[highlighted]` changes the default gray background that is normally shown on hover "tw-bg-amber-50 tw-text-yellow-900 data-[highlighted]:tw-bg-amber-100": n }), @@ -976,10 +976,10 @@ const ql = Zn( onFocus: r, onMouseMove: r, children: [ - /* @__PURE__ */ s( + /* @__PURE__ */ i( "span", { - className: T( + className: C( "tw-border-b-0 tw-border-l-2 tw-border-r-0 tw-border-t-0 tw-border-solid tw-px-2", { "tw-font-bold": n, @@ -988,32 +988,32 @@ const ql = Zn( "tw-border-l-indigo-200": a.toLowerCase() === "dc" } ), - children: oe.bookIdToEnglishName(e) + children: se.bookIdToEnglishName(e) } ), - n && /* @__PURE__ */ s("div", { children: i }) + n && /* @__PURE__ */ i("div", { children: s }) ] }, e ) ); -function Kl({ +function sc({ handleSelectChapter: e, endChapter: t, activeChapter: n, highlightedChapter: r, handleHighlightedChapter: o }) { - const a = Array.from({ length: t }, (l, c) => c + 1), i = $e( + const a = Array.from({ length: t }, (l, c) => c + 1), s = Ie( (l) => { o(l); }, [o] ); - return /* @__PURE__ */ s("div", { className: T("tw-flex tw-flex-wrap tw-items-start tw-justify-start tw-self-stretch"), children: a.map((l) => /* @__PURE__ */ s( + return /* @__PURE__ */ i("div", { className: C("tw-flex tw-flex-wrap tw-items-start tw-justify-start tw-self-stretch"), children: a.map((l) => /* @__PURE__ */ i( "div", { - className: T( + className: C( "tw-box-content tw-flex tw-h-4 tw-w-4 tw-cursor-pointer tw-items-center tw-justify-end tw-rounded-md tw-p-2 tw-text-amber-800", { "tw-font-semibold tw-text-amber-900": l === n, @@ -1028,32 +1028,32 @@ function Kl({ c.key === "Enter" && e(l); }, tabIndex: 0, - onMouseMove: () => i(l), + onMouseMove: () => s(l), children: l }, l )) }); } -function Jl({ handleSort: e, handleLocationHistory: t, handleBookmarks: n }) { - return /* @__PURE__ */ x(En, { className: "tw-flex tw-justify-between", children: [ - /* @__PURE__ */ s("p", { className: "tw-inline-block tw-align-middle", children: "Go To" }), +function ic({ handleSort: e, handleLocationHistory: t, handleBookmarks: n }) { + return /* @__PURE__ */ x(On, { className: "tw-flex tw-justify-between", children: [ + /* @__PURE__ */ i("p", { className: "tw-inline-block tw-align-middle", children: "Go To" }), /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center", children: [ - /* @__PURE__ */ s( - Bs, + /* @__PURE__ */ i( + Hi, { onClick: e, className: "tw-m-2 tw-h-4 tw-w-4 tw-cursor-pointer tw-gap-2" } ), - /* @__PURE__ */ s( - js, + /* @__PURE__ */ i( + Xi, { onClick: t, className: "tw-m-2 tw-h-4 tw-w-4 tw-cursor-pointer tw-gap-2" } ), - /* @__PURE__ */ s( - Vs, + /* @__PURE__ */ i( + Yi, { onClick: n, className: "tw-m-2 tw-h-4 tw-w-4 tw-cursor-pointer tw-gap-2" @@ -1062,112 +1062,112 @@ function Jl({ handleSort: e, handleLocationHistory: t, handleBookmarks: n }) { ] }) ] }); } -const ln = oe.allBookIds, Zl = { +const wn = se.allBookIds, lc = { OT: "Old Testament", NT: "New Testament", DC: "Deuterocanon" -}, ea = ["OT", "NT", "DC"], Ql = 32 + 32 + 32, ec = [ +}, ia = ["OT", "NT", "DC"], cc = 32 + 32 + 32, dc = [ /^(\w+)$/i, // Matches a single word (book name or id) /^(\w+)(?:\s(\d+))$/i, // Matches a word followed by a chapter number /^(\w+)(?:\s(\d+):(\d+))$/i // Matches a word followed by a chapter and verse number -], tc = (e) => ({ - OT: ln.filter((n) => oe.isBookOT(n)), - NT: ln.filter((n) => oe.isBookNT(n)), - DC: ln.filter((n) => oe.isBookDC(n)) -})[e], Zt = (e) => cl(oe.bookIdToNumber(e)); -function nc() { - return ln.map((t) => oe.bookIdToEnglishName(t)); -} -function rc(e) { - return nc().includes(e); -} -function oc(e) { +], uc = (e) => ({ + OT: wn.filter((n) => se.isBookOT(n)), + NT: wn.filter((n) => se.isBookNT(n)), + DC: wn.filter((n) => se.isBookDC(n)) +})[e], rn = (e) => bl(se.bookIdToNumber(e)); +function pc() { + return wn.map((t) => se.bookIdToEnglishName(t)); +} +function wc(e) { + return pc().includes(e); +} +function fc(e) { const t = e.toLowerCase().replace(/^\w/, (n) => n.toUpperCase()); - if (rc(t)) - return ln.find((r) => oe.bookIdToEnglishName(r) === t); -} -function Em({ scrRef: e, handleSubmit: t }) { - const [n, r] = ue(""), [o, a] = ue( - oe.bookNumberToId(e.bookNum) - ), [i, l] = ue(e.chapterNum ?? 0), [c, d] = ue( - oe.bookNumberToId(e.bookNum) - ), [p, h] = ue(!1), [w, b] = ue(p), v = gt(void 0), f = gt(void 0), m = gt(void 0), N = $e( - (k) => tc(k).filter((B) => { - const D = oe.bookIdToEnglishName(B).toLowerCase(), J = n.replace(/[^a-zA-Z]/g, "").toLowerCase(); - return D.includes(J) || // Match book name - B.toLowerCase().includes(J); + if (wc(t)) + return wn.find((r) => se.bookIdToEnglishName(r) === t); +} +function Pm({ scrRef: e, handleSubmit: t }) { + const [n, r] = ie(""), [o, a] = ie( + se.bookNumberToId(e.bookNum) + ), [s, l] = ie(e.chapterNum ?? 0), [c, d] = ie( + se.bookNumberToId(e.bookNum) + ), [u, h] = ie(!1), [w, b] = ie(u), v = vt(void 0), f = vt(void 0), m = vt(void 0), N = Ie( + (k) => uc(k).filter((B) => { + const D = se.bookIdToEnglishName(B).toLowerCase(), Q = n.replace(/[^a-zA-Z]/g, "").toLowerCase(); + return D.includes(Q) || // Match book name + B.toLowerCase().includes(Q); }), [n] - ), I = (k) => { + ), A = (k) => { r(k); - }, O = gt(!1), E = $e((k) => { - if (O.current) { - O.current = !1; + }, _ = vt(!1), E = Ie((k) => { + if (_.current) { + _.current = !1; return; } h(k); - }, []), g = $e( - (k, B, D, J) => { + }, []), g = Ie( + (k, B, D, Q) => { if (l( - oe.bookNumberToId(e.bookNum) !== k ? 1 : e.chapterNum - ), B || Zt(k) === -1) { + se.bookNumberToId(e.bookNum) !== k ? 1 : e.chapterNum + ), B || rn(k) === -1) { t({ - bookNum: oe.bookIdToNumber(k), + bookNum: se.bookIdToNumber(k), chapterNum: D || 1, - verseNum: J || 1 + verseNum: Q || 1 }), h(!1), r(""); return; } a(o !== k ? k : ""), h(!B); }, [t, e.bookNum, e.chapterNum, o] - ), _ = (k) => { - k <= 0 || k > Zt(o) || g(o, !0, k); - }, L = $e(() => { - ec.forEach((k) => { + ), I = (k) => { + k <= 0 || k > rn(o) || g(o, !0, k); + }, U = Ie(() => { + dc.forEach((k) => { const B = n.match(k); if (B) { - const [D, J = void 0, q = void 0] = B.slice(1), U = oc(D); - (oe.isBookIdValid(D) || U) && g( - U ?? D, + const [D, Q = void 0, J = void 0] = B.slice(1), X = fc(D); + (se.isBookIdValid(D) || X) && g( + X ?? D, !0, - J ? parseInt(J, 10) : 1, - q ? parseInt(q, 10) : 1 + Q ? parseInt(Q, 10) : 1, + J ? parseInt(J, 10) : 1 ); } }); - }, [g, n]), H = $e( + }, [g, n]), W = Ie( (k) => { - p ? (k.key === "ArrowDown" || k.key === "ArrowUp") && (typeof m < "u" && // Ref uses null + u ? (k.key === "ArrowDown" || k.key === "ArrowUp") && (typeof m < "u" && // Ref uses null // eslint-disable-next-line no-null/no-null m.current !== null ? m.current.focus() : typeof f < "u" && // Ref uses null // eslint-disable-next-line no-null/no-null f.current !== null && f.current.focus(), k.preventDefault()) : h(!0); }, - [p] - ), C = (k) => { + [u] + ), O = (k) => { const { key: B } = k; B === "ArrowRight" || B === "ArrowLeft" || B === "ArrowDown" || B === "ArrowUp" || B === "Enter" || (v.current.dispatchEvent(new KeyboardEvent("keydown", { key: B })), v.current.focus()); }, P = (k) => { const { key: B } = k; if (c === o) { if (B === "Enter") { - k.preventDefault(), g(o, !0, i); + k.preventDefault(), g(o, !0, s); return; } let D = 0; if (B === "ArrowRight") - if (i < Zt(c)) + if (s < rn(c)) D = 1; else { k.preventDefault(); return; } else if (B === "ArrowLeft") - if (i > 1) + if (s > 1) D = -1; else { k.preventDefault(); @@ -1175,63 +1175,63 @@ function Em({ scrRef: e, handleSubmit: t }) { } else B === "ArrowDown" ? D = 6 : B === "ArrowUp" && (D = -6); - i + D <= 0 || i + D > Zt(c) ? l(0) : D !== 0 && (l(i + D), k.preventDefault()); + s + D <= 0 || s + D > rn(c) ? l(0) : D !== 0 && (l(s + D), k.preventDefault()); } }; - return at(() => { - o === c ? o === oe.bookNumberToId(e.bookNum) ? l(e.chapterNum) : l(1) : l(0); - }, [c, e.bookNum, e.chapterNum, o]), Jo(() => { - b(p); - }, [p]), Jo(() => { + return Ke(() => { + o === c ? o === se.bookNumberToId(e.bookNum) ? l(e.chapterNum) : l(1) : l(0); + }, [c, e.bookNum, e.chapterNum, o]), ra(() => { + b(u); + }, [u]), ra(() => { const k = setTimeout(() => { if (w && f.current && m.current) { - const D = m.current.offsetTop - Ql; + const D = m.current.offsetTop - cc; f.current.scrollTo({ top: D, behavior: "instant" }); } }, 10); return () => { clearTimeout(k); }; - }, [w]), /* @__PURE__ */ s("div", { className: "pr-twp tw-flex", children: /* @__PURE__ */ x(ao, { modal: !1, open: p, onOpenChange: E, children: [ - /* @__PURE__ */ s(fi, { asChild: !0, children: /* @__PURE__ */ s( - $l, + }, [w]), /* @__PURE__ */ i("div", { className: "pr-twp tw-flex", children: /* @__PURE__ */ x(vn, { modal: !1, open: u, onOpenChange: E, children: [ + /* @__PURE__ */ i(er, { asChild: !0, children: /* @__PURE__ */ i( + zl, { ref: v, value: n, - handleSearch: I, - handleKeyDown: H, + handleSearch: A, + handleKeyDown: W, handleOnClick: () => { - a(oe.bookNumberToId(e.bookNum)), d(oe.bookNumberToId(e.bookNum)), l(e.chapterNum > 0 ? e.chapterNum : 0), h(!0), v.current.focus(); + a(se.bookNumberToId(e.bookNum)), d(se.bookNumberToId(e.bookNum)), l(e.chapterNum > 0 ? e.chapterNum : 0), h(!0), v.current.focus(); }, onFocus: () => { - O.current = !0; + _.current = !0; }, - handleSubmit: L, - placeholder: `${oe.bookNumberToEnglishName(e.bookNum)} ${e.chapterNum}:${e.verseNum}` + handleSubmit: U, + placeholder: `${se.bookNumberToEnglishName(e.bookNum)} ${e.chapterNum}:${e.verseNum}` } ) }), /* @__PURE__ */ x( - tr, + Lt, { className: "tw-m-1 tw-overflow-y-auto tw-p-0 tw-font-normal tw-text-foreground/80", style: { width: "233px", maxHeight: "500px", zIndex: "250" }, - onKeyDown: C, + onKeyDown: O, align: "start", ref: f, children: [ - /* @__PURE__ */ s( - Jl, + /* @__PURE__ */ i( + ic, { handleSort: () => console.log("sorting"), handleLocationHistory: () => console.log("location history"), handleBookmarks: () => console.log("bookmarks") } ), - ea.map( + ia.map( (k, B) => N(k).length > 0 && /* @__PURE__ */ x("div", { children: [ - /* @__PURE__ */ s(En, { className: "tw-font-semibold tw-text-foreground/80", children: Zl[k] }), - N(k).map((D) => /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s( - ql, + /* @__PURE__ */ i(On, { className: "tw-font-semibold tw-text-foreground/80", children: lc[k] }), + N(k).map((D) => /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i( + ac, { bookId: D, handleSelectBook: () => g(D, !1), @@ -1239,24 +1239,24 @@ function Em({ scrRef: e, handleSubmit: t }) { handleHighlightBook: () => d(D), handleKeyDown: P, bookType: k, - ref: (J) => { - o === D && (m.current = J); + ref: (Q) => { + o === D && (m.current = Q); }, - children: /* @__PURE__ */ s( - Kl, + children: /* @__PURE__ */ i( + sc, { - handleSelectChapter: _, - endChapter: Zt(D), - activeChapter: e.bookNum === oe.bookIdToNumber(D) ? e.chapterNum : 0, - highlightedChapter: i, - handleHighlightedChapter: (J) => { - l(J); + handleSelectChapter: I, + endChapter: rn(D), + activeChapter: e.bookNum === se.bookIdToNumber(D) ? e.chapterNum : 0, + highlightedChapter: s, + handleHighlightedChapter: (Q) => { + l(Q); } } ) } ) }, D)), - ea.length - 1 !== B ? /* @__PURE__ */ s(nr, {}) : void 0 + ia.length - 1 !== B ? /* @__PURE__ */ i(Rn, {}) : void 0 ] }, k) ) ] @@ -1264,7 +1264,7 @@ function Em({ scrRef: e, handleSubmit: t }) { ) ] }) }); } -const ac = Nn( +const mc = Sn( "pr-twp tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50", { variants: { @@ -1288,121 +1288,121 @@ const ac = Nn( size: "default" } } -), me = A.forwardRef( - ({ className: e, variant: t, size: n, asChild: r = !1, ...o }, a) => /* @__PURE__ */ s(r ? wl : "button", { className: T(ac({ variant: t, size: n, className: e })), ref: a, ...o }) +), fe = M.forwardRef( + ({ className: e, variant: t, size: n, asChild: r = !1, ...o }, a) => /* @__PURE__ */ i(r ? kl : "button", { className: C(mc({ variant: t, size: n, className: e })), ref: a, ...o }) ); -me.displayName = "Button"; -const ic = Nn( +fe.displayName = "Button"; +const hc = Sn( "tw-text-sm tw-font-medium tw-leading-none peer-disabled:tw-cursor-not-allowed peer-disabled:tw-opacity-70" -), He = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s(Qa.Root, { ref: n, className: T("pr-twp", ic(), e), ...t })); -He.displayName = Qa.Root.displayName; -const gi = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - un.Root, +), De = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i(os.Root, { ref: n, className: C("pr-twp", hc(), e), ...t })); +De.displayName = os.Root.displayName; +const ys = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + gn.Root, { - className: T("pr-twp tw-grid tw-gap-2", e), + className: C("pr-twp tw-grid tw-gap-2", e), ...t, ref: n } )); -gi.displayName = un.Root.displayName; -const Gr = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - un.Item, +ys.displayName = gn.Root.displayName; +const Kr = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + gn.Item, { ref: n, - className: T( + className: C( "pr-twp tw-aspect-square tw-h-4 tw-w-4 tw-rounded-full tw-border tw-border-primary tw-text-primary tw-ring-offset-background focus:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50", e ), ...t, - children: /* @__PURE__ */ s(un.Indicator, { className: "tw-flex tw-items-center tw-justify-center", children: /* @__PURE__ */ s(qa, { className: "tw-h-2.5 tw-w-2.5 tw-fill-current tw-text-current" }) }) + children: /* @__PURE__ */ i(gn.Indicator, { className: "tw-flex tw-items-center tw-justify-center", children: /* @__PURE__ */ i(ns, { className: "tw-h-2.5 tw-w-2.5 tw-fill-current tw-text-current" }) }) } )); -Gr.displayName = un.Item.displayName; -const bi = wn.Root, vi = wn.Trigger, so = A.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ s(wn.Portal, { children: /* @__PURE__ */ s( - wn.Content, +Kr.displayName = gn.Item.displayName; +const xs = bn.Root, Ns = bn.Trigger, fo = M.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ i(bn.Portal, { children: /* @__PURE__ */ i( + bn.Content, { ref: o, align: t, sideOffset: n, - className: T( + className: C( "pr-twp tw-z-50 tw-w-72 tw-rounded-md tw-border tw-bg-popover tw-p-4 tw-text-popover-foreground tw-shadow-md tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2", e ), ...r } ) })); -so.displayName = wn.Content.displayName; -const sc = Ye.Portal, yi = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - Ye.Overlay, +fo.displayName = bn.Content.displayName; +const gc = Je.Portal, ks = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + Je.Overlay, { ref: n, - className: T( + className: C( "tw-fixed tw-inset-0 tw-z-50 tw-bg-black/80 data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0", e ), ...t } )); -yi.displayName = Ye.Overlay.displayName; -const lc = A.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ x(sc, { children: [ - /* @__PURE__ */ s(yi, {}), +ks.displayName = Je.Overlay.displayName; +const bc = M.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ x(gc, { children: [ + /* @__PURE__ */ i(ks, {}), /* @__PURE__ */ x( - Ye.Content, + Je.Content, { ref: r, - className: T( + className: C( "pr-twp tw-fixed tw-left-[50%] tw-top-[50%] tw-z-50 tw-grid tw-w-full tw-max-w-lg tw-translate-x-[-50%] tw-translate-y-[-50%] tw-gap-4 tw-border tw-bg-background tw-p-6 tw-shadow-lg tw-duration-200 data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[state=closed]:tw-slide-out-to-left-1/2 data-[state=closed]:tw-slide-out-to-top-[48%] data-[state=open]:tw-slide-in-from-left-1/2 data-[state=open]:tw-slide-in-from-top-[48%] sm:tw-rounded-lg", e ), ...n, children: [ t, - /* @__PURE__ */ x(Ye.Close, { className: "tw-absolute tw-right-4 tw-top-4 tw-rounded-sm tw-opacity-70 tw-ring-offset-background tw-transition-opacity hover:tw-opacity-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2 disabled:tw-pointer-events-none data-[state=open]:tw-bg-accent data-[state=open]:tw-text-muted-foreground", children: [ - /* @__PURE__ */ s(Ka, { className: "tw-h-4 tw-w-4" }), - /* @__PURE__ */ s("span", { className: "tw-sr-only", children: "Close" }) + /* @__PURE__ */ x(Je.Close, { className: "tw-absolute tw-right-4 tw-top-4 tw-rounded-sm tw-opacity-70 tw-ring-offset-background tw-transition-opacity hover:tw-opacity-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2 disabled:tw-pointer-events-none data-[state=open]:tw-bg-accent data-[state=open]:tw-text-muted-foreground", children: [ + /* @__PURE__ */ i(rs, { className: "tw-h-4 tw-w-4" }), + /* @__PURE__ */ i("span", { className: "tw-sr-only", children: "Close" }) ] }) ] } ) ] })); -lc.displayName = Ye.Content.displayName; -const cc = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - Ye.Title, +bc.displayName = Je.Content.displayName; +const vc = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + Je.Title, { ref: n, - className: T("tw-text-lg tw-font-semibold tw-leading-none tw-tracking-tight", e), + className: C("tw-text-lg tw-font-semibold tw-leading-none tw-tracking-tight", e), ...t } )); -cc.displayName = Ye.Title.displayName; -const dc = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - Ye.Description, +vc.displayName = Je.Title.displayName; +const yc = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + Je.Description, { ref: n, - className: T("tw-text-sm tw-text-muted-foreground", e), + className: C("tw-text-sm tw-text-muted-foreground", e), ...t } )); -dc.displayName = Ye.Description.displayName; -const lo = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +yc.displayName = Je.Description.displayName; +const mo = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Oe, { ref: n, - className: T( + className: C( "tw-flex tw-h-full tw-w-full tw-flex-col tw-overflow-hidden tw-rounded-md tw-bg-popover tw-text-popover-foreground", e ), ...t } )); -lo.displayName = Oe.displayName; -const co = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-border-b tw-px-3", children: [ - /* @__PURE__ */ s(Ja, { className: "tw-me-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50" }), - /* @__PURE__ */ s( +mo.displayName = Oe.displayName; +const ho = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-border-b tw-px-3", children: [ + /* @__PURE__ */ i(lo, { className: "tw-me-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50" }), + /* @__PURE__ */ i( Oe.Input, { ref: n, - className: T( + className: C( "tw-flex tw-h-11 tw-w-full tw-rounded-md tw-bg-transparent tw-py-3 tw-text-sm tw-outline-none placeholder:tw-text-muted-foreground disabled:tw-cursor-not-allowed disabled:tw-opacity-50", e ), @@ -1410,110 +1410,110 @@ const co = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ x("div", } ) ] })); -co.displayName = Oe.Input.displayName; -const po = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +ho.displayName = Oe.Input.displayName; +const go = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Oe.List, { ref: n, - className: T("tw-max-h-[300px] tw-overflow-y-auto tw-overflow-x-hidden", e), + className: C("tw-max-h-[300px] tw-overflow-y-auto tw-overflow-x-hidden", e), ...t } )); -po.displayName = Oe.List.displayName; -const uo = A.forwardRef((e, t) => /* @__PURE__ */ s(Oe.Empty, { ref: t, className: "tw-py-6 tw-text-center tw-text-sm", ...e })); -uo.displayName = Oe.Empty.displayName; -const xi = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +go.displayName = Oe.List.displayName; +const bo = M.forwardRef((e, t) => /* @__PURE__ */ i(Oe.Empty, { ref: t, className: "tw-py-6 tw-text-center tw-text-sm", ...e })); +bo.displayName = Oe.Empty.displayName; +const Es = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Oe.Group, { ref: n, - className: T( + className: C( "tw-overflow-hidden tw-p-1 tw-text-foreground [&_[cmdk-group-heading]]:tw-px-2 [&_[cmdk-group-heading]]:tw-py-1.5 [&_[cmdk-group-heading]]:tw-text-xs [&_[cmdk-group-heading]]:tw-font-medium [&_[cmdk-group-heading]]:tw-text-muted-foreground", e ), ...t } )); -xi.displayName = Oe.Group.displayName; -const pc = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +Es.displayName = Oe.Group.displayName; +const xc = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Oe.Separator, { ref: n, - className: T("tw--mx-1 tw-h-px tw-bg-border", e), + className: C("tw--mx-1 tw-h-px tw-bg-border", e), ...t } )); -pc.displayName = Oe.Separator.displayName; -const wo = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +xc.displayName = Oe.Separator.displayName; +const vo = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Oe.Item, { ref: n, - className: T( + className: C( "tw-relative tw-flex tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-px-2 tw-py-1.5 tw-text-sm tw-outline-none data-[disabled=true]:tw-pointer-events-none data-[selected=true]:tw-bg-accent data-[selected=true]:tw-text-accent-foreground data-[disabled=true]:tw-opacity-50", e ), ...t } )); -wo.displayName = Oe.Item.displayName; -function uc(e) { +vo.displayName = Oe.Item.displayName; +function Nc(e) { return typeof e == "string" ? e : typeof e == "number" ? e.toString() : e.label; } -function ta({ +function Jr({ id: e, options: t = [], className: n, value: r, onChange: o = () => { }, - getOptionLabel: a = uc, - icon: i = void 0, + getOptionLabel: a = Nc, + icon: s = void 0, buttonPlaceholder: l = "", textPlaceholder: c = "", commandEmptyMessage: d = "No option found", - buttonVariant: p = "outline", + buttonVariant: u = "outline", alignDropDown: h = "start", dir: w = "ltr", isDisabled: b = !1, ...v }) { - const [f, m] = ue(!1); - return /* @__PURE__ */ x(bi, { open: f, onOpenChange: m, ...v, children: [ - /* @__PURE__ */ s(vi, { asChild: !0, children: /* @__PURE__ */ x( - me, + const [f, m] = ie(!1); + return /* @__PURE__ */ x(xs, { open: f, onOpenChange: m, ...v, children: [ + /* @__PURE__ */ i(Ns, { asChild: !0, children: /* @__PURE__ */ x( + fe, { - variant: p, + variant: u, role: "combobox", "aria-expanded": f, id: e, - className: T( + className: C( "tw-flex tw-w-[200px] tw-items-center tw-justify-between tw-overflow-hidden", n ), disabled: b, children: [ /* @__PURE__ */ x("div", { className: "tw-flex tw-flex-1 tw-items-center tw-overflow-hidden", children: [ - i && /* @__PURE__ */ s("div", { className: "tw-pr-2", children: i }), - /* @__PURE__ */ s("span", { className: "tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap", children: r ? a(r) : l }) + s && /* @__PURE__ */ i("div", { className: "tw-pr-2", children: s }), + /* @__PURE__ */ i("span", { className: "tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap", children: r ? a(r) : l }) ] }), - /* @__PURE__ */ s(Za, { className: "tw-ms-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50" }) + /* @__PURE__ */ i(Qn, { className: "tw-ms-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50" }) ] } ) }), - /* @__PURE__ */ s(so, { align: h, className: "tw-w-[200px] tw-p-0", dir: w, children: /* @__PURE__ */ x(lo, { children: [ - /* @__PURE__ */ s(co, { dir: w, placeholder: c, className: "tw-text-inherit" }), - /* @__PURE__ */ s(uo, { children: d }), - /* @__PURE__ */ s(po, { children: t.map((N) => /* @__PURE__ */ x( - wo, + /* @__PURE__ */ i(fo, { align: h, className: "tw-w-[200px] tw-p-0", dir: w, children: /* @__PURE__ */ x(mo, { children: [ + /* @__PURE__ */ i(ho, { dir: w, placeholder: c, className: "tw-text-inherit" }), + /* @__PURE__ */ i(bo, { children: d }), + /* @__PURE__ */ i(go, { children: t.map((N) => /* @__PURE__ */ x( + vo, { value: a(N), onSelect: () => { o(N), m(!1); }, children: [ - /* @__PURE__ */ s( - xn, + /* @__PURE__ */ i( + Cn, { - className: T("tw-me-2 tw-h-4 tw-w-4", { + className: C("tw-me-2 tw-h-4 tw-w-4", { "tw-opacity-0": !r || a(r) !== a(N) }) } @@ -1526,7 +1526,7 @@ function ta({ ] }) }) ] }); } -function wc({ +function kc({ startChapter: e, endChapter: t, handleSelectStartChapter: n, @@ -1534,36 +1534,36 @@ function wc({ isDisabled: o = !1, chapterCount: a }) { - const i = Te( - () => Array.from({ length: a }, (d, p) => p + 1), + const s = Ne( + () => Array.from({ length: a }, (d, u) => u + 1), [a] ); - return /* @__PURE__ */ x(it, { children: [ - /* @__PURE__ */ s(He, { htmlFor: "start-chapters-combobox", children: "Chapters" }), - /* @__PURE__ */ s( - ta, + return /* @__PURE__ */ x(lt, { children: [ + /* @__PURE__ */ i(De, { htmlFor: "start-chapters-combobox", children: "Chapters" }), + /* @__PURE__ */ i( + Jr, { isDisabled: o, onChange: (d) => { n(d), d > t && r(d); }, className: "tw-ml-2 tw-mr-2 tw-w-20", - options: i, + options: s, getOptionLabel: (d) => d.toString(), value: e }, "start chapter" ), - /* @__PURE__ */ s(He, { htmlFor: "end-chapters-combobox", children: "to" }), - /* @__PURE__ */ s( - ta, + /* @__PURE__ */ i(De, { htmlFor: "end-chapters-combobox", children: "to" }), + /* @__PURE__ */ i( + Jr, { isDisabled: o, onChange: (d) => { r(d), d < e && n(d); }, className: "tw-ml-2 tw-w-20", - options: i, + options: s, getOptionLabel: (d) => d.toString(), value: t }, @@ -1571,32 +1571,32 @@ function wc({ ) ] }); } -var fc = /* @__PURE__ */ ((e) => (e.CURRENT_BOOK = "current book", e.CHOOSE_BOOKS = "choose books", e))(fc || {}); -const Tm = Object.freeze([ +var Ec = /* @__PURE__ */ ((e) => (e.CURRENT_BOOK = "current book", e.CHOOSE_BOOKS = "choose books", e))(Ec || {}); +const $m = Object.freeze([ "%webView_bookSelector_currentBook%", "%webView_bookSelector_choose%", "%webView_bookSelector_chooseBooks%" -]), Sr = (e, t) => e[t] ?? t; -function Cm({ +]), $r = (e, t) => e[t] ?? t; +function Im({ handleBookSelectionModeChange: e, currentBookName: t, onSelectBooks: n, selectedBookIds: r, chapterCount: o, endChapter: a, - handleSelectEndChapter: i, + handleSelectEndChapter: s, startChapter: l, handleSelectStartChapter: c, localizedStrings: d }) { - const p = Sr(d, "%webView_bookSelector_currentBook%"), h = Sr(d, "%webView_bookSelector_choose%"), w = Sr(d, "%webView_bookSelector_chooseBooks%"), [b, v] = ue( + const u = $r(d, "%webView_bookSelector_currentBook%"), h = $r(d, "%webView_bookSelector_choose%"), w = $r(d, "%webView_bookSelector_chooseBooks%"), [b, v] = ie( "current book" /* CURRENT_BOOK */ ), f = (m) => { v(m), e(m); }; - return /* @__PURE__ */ s( - gi, + return /* @__PURE__ */ i( + ys, { className: "pr-twp tw-flex", value: b, @@ -1604,19 +1604,19 @@ function Cm({ children: /* @__PURE__ */ x("div", { className: "tw-flex tw-w-full tw-flex-col tw-gap-4", children: [ /* @__PURE__ */ x("div", { className: "tw-grid tw-grid-cols-[25%,25%,50%]", children: [ /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center", children: [ - /* @__PURE__ */ s(Gr, { + /* @__PURE__ */ i(Kr, { value: "current book" /* CURRENT_BOOK */ }), - /* @__PURE__ */ s(He, { className: "tw-ml-1", children: p }) + /* @__PURE__ */ i(De, { className: "tw-ml-1", children: u }) ] }), - /* @__PURE__ */ s(He, { className: "tw-flex tw-items-center", children: t }), - /* @__PURE__ */ s("div", { className: "tw-flex tw-items-center tw-justify-end", children: /* @__PURE__ */ s( - wc, + /* @__PURE__ */ i(De, { className: "tw-flex tw-items-center", children: t }), + /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-justify-end", children: /* @__PURE__ */ i( + kc, { isDisabled: b === "choose books", handleSelectStartChapter: c, - handleSelectEndChapter: i, + handleSelectEndChapter: s, chapterCount: o, startChapter: l, endChapter: a @@ -1625,15 +1625,15 @@ function Cm({ ] }), /* @__PURE__ */ x("div", { className: "tw-grid tw-grid-cols-[25%,50%,25%]", children: [ /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center", children: [ - /* @__PURE__ */ s(Gr, { + /* @__PURE__ */ i(Kr, { value: "choose books" /* CHOOSE_BOOKS */ }), - /* @__PURE__ */ s(He, { className: "tw-ml-1", children: w }) + /* @__PURE__ */ i(De, { className: "tw-ml-1", children: w }) ] }), - /* @__PURE__ */ s(He, { className: "tw-flex tw-items-center", children: r.map((m) => oe.bookIdToEnglishName(m)).join(", ") }), - /* @__PURE__ */ s( - me, + /* @__PURE__ */ i(De, { className: "tw-flex tw-items-center", children: r.map((m) => se.bookIdToEnglishName(m)).join(", ") }), + /* @__PURE__ */ i( + fe, { disabled: b === "current book", onClick: () => n(), @@ -1645,17 +1645,17 @@ function Cm({ } ); } -function mc({ table: e }) { - return /* @__PURE__ */ x(ao, { children: [ - /* @__PURE__ */ s(ll, { asChild: !0, children: /* @__PURE__ */ x(me, { variant: "outline", size: "sm", className: "tw-ml-auto tw-hidden tw-h-8 lg:tw-flex", children: [ - /* @__PURE__ */ s(Ls, { className: "tw-mr-2 tw-h-4 tw-w-4" }), +function Tc({ table: e }) { + return /* @__PURE__ */ x(vn, { children: [ + /* @__PURE__ */ i(gl, { asChild: !0, children: /* @__PURE__ */ x(fe, { variant: "outline", size: "sm", className: "tw-ml-auto tw-hidden tw-h-8 lg:tw-flex", children: [ + /* @__PURE__ */ i(Wi, { className: "tw-mr-2 tw-h-4 tw-w-4" }), "View" ] }) }), - /* @__PURE__ */ x(tr, { align: "end", className: "tw-w-[150px]", children: [ - /* @__PURE__ */ s(En, { children: "Toggle columns" }), - /* @__PURE__ */ s(nr, {}), - e.getAllColumns().filter((t) => t.getCanHide()).map((t) => /* @__PURE__ */ s( - io, + /* @__PURE__ */ x(Lt, { align: "end", className: "tw-w-[150px]", children: [ + /* @__PURE__ */ i(On, { children: "Toggle columns" }), + /* @__PURE__ */ i(Rn, {}), + e.getAllColumns().filter((t) => t.getCanHide()).map((t) => /* @__PURE__ */ i( + dr, { className: "tw-capitalize", checked: t.getIsVisible(), @@ -1667,47 +1667,47 @@ function mc({ table: e }) { ] }) ] }); } -const fn = be.Root, hc = be.Group, mn = be.Value, Mt = A.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ x( - be.Trigger, +const yn = ve.Root, Cc = ve.Group, xn = ve.Value, Ft = M.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ x( + ve.Trigger, { ref: r, - className: T( + className: C( "tw-flex tw-h-10 tw-w-full tw-items-center tw-justify-between tw-rounded-md tw-border tw-border-input tw-bg-background tw-px-3 tw-py-2 tw-text-sm tw-ring-offset-background placeholder:tw-text-muted-foreground focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50 [&>span]:tw-line-clamp-1", e ), ...n, children: [ t, - /* @__PURE__ */ s(be.Icon, { asChild: !0, children: /* @__PURE__ */ s(Qn, { className: "tw-h-4 tw-w-4 tw-opacity-50" }) }) + /* @__PURE__ */ i(ve.Icon, { asChild: !0, children: /* @__PURE__ */ i(Vt, { className: "tw-h-4 tw-w-4 tw-opacity-50" }) }) ] } )); -Mt.displayName = be.Trigger.displayName; -const Ni = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - be.ScrollUpButton, +Ft.displayName = ve.Trigger.displayName; +const Ts = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + ve.ScrollUpButton, { ref: n, - className: T("tw-flex tw-cursor-default tw-items-center tw-justify-center tw-py-1", e), + className: C("tw-flex tw-cursor-default tw-items-center tw-justify-center tw-py-1", e), ...t, - children: /* @__PURE__ */ s(zs, { className: "tw-h-4 tw-w-4" }) + children: /* @__PURE__ */ i(Xr, { className: "tw-h-4 tw-w-4" }) } )); -Ni.displayName = be.ScrollUpButton.displayName; -const ki = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - be.ScrollDownButton, +Ts.displayName = ve.ScrollUpButton.displayName; +const Cs = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + ve.ScrollDownButton, { ref: n, - className: T("tw-flex tw-cursor-default tw-items-center tw-justify-center tw-py-1", e), + className: C("tw-flex tw-cursor-default tw-items-center tw-justify-center tw-py-1", e), ...t, - children: /* @__PURE__ */ s(Qn, { className: "tw-h-4 tw-w-4" }) + children: /* @__PURE__ */ i(Vt, { className: "tw-h-4 tw-w-4" }) } )); -ki.displayName = be.ScrollDownButton.displayName; -const Bt = A.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ s(be.Portal, { children: /* @__PURE__ */ x( - be.Content, +Cs.displayName = ve.ScrollDownButton.displayName; +const zt = M.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ i(ve.Portal, { children: /* @__PURE__ */ x( + ve.Content, { ref: o, - className: T( + className: C( "pr-twp tw-relative tw-z-50 tw-max-h-96 tw-min-w-[8rem] tw-overflow-hidden tw-rounded-md tw-border tw-bg-popover tw-text-popover-foreground tw-shadow-md data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2", n === "popper" && "data-[side=bottom]:tw-translate-y-1 data-[side=left]:tw--translate-x-1 data-[side=right]:tw-translate-x-1 data-[side=top]:tw--translate-y-1", e @@ -1715,58 +1715,58 @@ const Bt = A.forwardRef(({ className: e, children: t, position: n = "popper", .. position: n, ...r, children: [ - /* @__PURE__ */ s(Ni, {}), - /* @__PURE__ */ s( - be.Viewport, + /* @__PURE__ */ i(Ts, {}), + /* @__PURE__ */ i( + ve.Viewport, { - className: T( + className: C( "tw-p-1", n === "popper" && "tw-h-[var(--radix-select-trigger-height)] tw-w-full tw-min-w-[var(--radix-select-trigger-width)]" ), children: t } ), - /* @__PURE__ */ s(ki, {}) + /* @__PURE__ */ i(Cs, {}) ] } ) })); -Bt.displayName = be.Content.displayName; -const gc = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - be.Label, +zt.displayName = ve.Content.displayName; +const Sc = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + ve.Label, { ref: n, - className: T("tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-font-semibold", e), + className: C("tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-font-semibold", e), ...t } )); -gc.displayName = be.Label.displayName; -const Ue = A.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ x( - be.Item, +Sc.displayName = ve.Label.displayName; +const Xe = M.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ x( + ve.Item, { ref: r, - className: T( + className: C( "tw-relative tw-flex tw-w-full tw-cursor-default tw-select-none tw-items-center tw-rounded-sm tw-py-1.5 tw-pl-8 tw-pr-2 tw-text-sm tw-outline-none focus:tw-bg-accent focus:tw-text-accent-foreground data-[disabled]:tw-pointer-events-none data-[disabled]:tw-opacity-50", e ), ...n, children: [ - /* @__PURE__ */ s("span", { className: "tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center", children: /* @__PURE__ */ s(be.ItemIndicator, { children: /* @__PURE__ */ s(xn, { className: "tw-h-4 tw-w-4" }) }) }), - /* @__PURE__ */ s(be.ItemText, { children: t }) + /* @__PURE__ */ i("span", { className: "tw-absolute tw-left-2 tw-flex tw-h-3.5 tw-w-3.5 tw-items-center tw-justify-center", children: /* @__PURE__ */ i(ve.ItemIndicator, { children: /* @__PURE__ */ i(Cn, { className: "tw-h-4 tw-w-4" }) }) }), + /* @__PURE__ */ i(ve.ItemText, { children: t }) ] } )); -Ue.displayName = be.Item.displayName; -const bc = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - be.Separator, +Xe.displayName = ve.Item.displayName; +const Oc = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + ve.Separator, { ref: n, - className: T("tw--mx-1 tw-my-1 tw-h-px tw-bg-muted", e), + className: C("tw--mx-1 tw-my-1 tw-h-px tw-bg-muted", e), ...t } )); -bc.displayName = be.Separator.displayName; -function vc({ table: e }) { - return /* @__PURE__ */ s("div", { className: "tw-flex tw-items-center tw-justify-between tw-px-2 tw-pb-3 tw-pt-3", children: /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-space-x-6 lg:tw-space-x-8", children: [ +Oc.displayName = ve.Separator.displayName; +function Rc({ table: e }) { + return /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-justify-between tw-px-2 tw-pb-3 tw-pt-3", children: /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-space-x-6 lg:tw-space-x-8", children: [ /* @__PURE__ */ x("div", { className: "tw-flex-1 tw-text-sm tw-text-muted-foreground", children: [ e.getFilteredSelectedRowModel().rows.length, " of", @@ -1775,17 +1775,17 @@ function vc({ table: e }) { " row(s) selected" ] }), /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-space-x-2", children: [ - /* @__PURE__ */ s("p", { className: "tw-text-nowrap tw-text-sm tw-font-medium", children: "Rows per page" }), + /* @__PURE__ */ i("p", { className: "tw-text-nowrap tw-text-sm tw-font-medium", children: "Rows per page" }), /* @__PURE__ */ x( - fn, + yn, { value: `${e.getState().pagination.pageSize}`, onValueChange: (t) => { e.setPageSize(Number(t)); }, children: [ - /* @__PURE__ */ s(Mt, { className: "tw-h-8 tw-w-[70px]", children: /* @__PURE__ */ s(mn, { placeholder: e.getState().pagination.pageSize }) }), - /* @__PURE__ */ s(Bt, { side: "top", children: [10, 20, 30, 40, 50].map((t) => /* @__PURE__ */ s(Ue, { value: `${t}`, children: t }, t)) }) + /* @__PURE__ */ i(Ft, { className: "tw-h-8 tw-w-[70px]", children: /* @__PURE__ */ i(xn, { placeholder: e.getState().pagination.pageSize }) }), + /* @__PURE__ */ i(zt, { side: "top", children: [10, 20, 30, 40, 50].map((t) => /* @__PURE__ */ i(Xe, { value: `${t}`, children: t }, t)) }) ] } ) @@ -1798,7 +1798,7 @@ function vc({ table: e }) { ] }), /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-space-x-2", children: [ /* @__PURE__ */ x( - me, + fe, { variant: "outline", size: "icon", @@ -1806,13 +1806,13 @@ function vc({ table: e }) { onClick: () => e.setPageIndex(0), disabled: !e.getCanPreviousPage(), children: [ - /* @__PURE__ */ s("span", { className: "tw-sr-only", children: "Go to first page" }), - /* @__PURE__ */ s(Fs, { className: "tw-h-4 tw-w-4" }) + /* @__PURE__ */ i("span", { className: "tw-sr-only", children: "Go to first page" }), + /* @__PURE__ */ i(qi, { className: "tw-h-4 tw-w-4" }) ] } ), /* @__PURE__ */ x( - me, + fe, { variant: "outline", size: "icon", @@ -1820,13 +1820,13 @@ function vc({ table: e }) { onClick: () => e.previousPage(), disabled: !e.getCanPreviousPage(), children: [ - /* @__PURE__ */ s("span", { className: "tw-sr-only", children: "Go to previous page" }), - /* @__PURE__ */ s(Us, { className: "tw-h-4 tw-w-4" }) + /* @__PURE__ */ i("span", { className: "tw-sr-only", children: "Go to previous page" }), + /* @__PURE__ */ i(Ki, { className: "tw-h-4 tw-w-4" }) ] } ), /* @__PURE__ */ x( - me, + fe, { variant: "outline", size: "icon", @@ -1834,13 +1834,13 @@ function vc({ table: e }) { onClick: () => e.nextPage(), disabled: !e.getCanNextPage(), children: [ - /* @__PURE__ */ s("span", { className: "tw-sr-only", children: "Go to next page" }), - /* @__PURE__ */ s(Gs, { className: "tw-h-4 tw-w-4" }) + /* @__PURE__ */ i("span", { className: "tw-sr-only", children: "Go to next page" }), + /* @__PURE__ */ i(Ji, { className: "tw-h-4 tw-w-4" }) ] } ), /* @__PURE__ */ x( - me, + fe, { variant: "outline", size: "icon", @@ -1848,28 +1848,28 @@ function vc({ table: e }) { onClick: () => e.setPageIndex(e.getPageCount() - 1), disabled: !e.getCanNextPage(), children: [ - /* @__PURE__ */ s("span", { className: "tw-sr-only", children: "Go to last page" }), - /* @__PURE__ */ s(Hs, { className: "tw-h-4 tw-w-4" }) + /* @__PURE__ */ i("span", { className: "tw-sr-only", children: "Go to last page" }), + /* @__PURE__ */ i(Zi, { className: "tw-h-4 tw-w-4" }) ] } ) ] }) ] }) }); } -const rr = A.forwardRef(({ className: e, stickyHeader: t, ...n }, r) => /* @__PURE__ */ s("div", { className: T("pr-twp tw-relative tw-w-full", { "tw-overflow-auto": !t }), children: /* @__PURE__ */ s( +const _n = M.forwardRef(({ className: e, stickyHeader: t, ...n }, r) => /* @__PURE__ */ i("div", { className: C("pr-twp tw-relative tw-w-full", { "tw-overflow-auto": !t }), children: /* @__PURE__ */ i( "table", { ref: r, - className: T("tw-w-full tw-caption-bottom tw-text-sm", e), + className: C("tw-w-full tw-caption-bottom tw-text-sm", e), ...n } ) })); -rr.displayName = "Table"; -const or = A.forwardRef(({ className: e, stickyHeader: t, ...n }, r) => /* @__PURE__ */ s( +_n.displayName = "Table"; +const Pn = M.forwardRef(({ className: e, stickyHeader: t, ...n }, r) => /* @__PURE__ */ i( "thead", { ref: r, - className: T( + className: C( { "tw-sticky tw-top-[-1px] tw-bg-background tw-drop-shadow-sm": t }, "[&_tr]:tw-border-b", e @@ -1877,24 +1877,24 @@ const or = A.forwardRef(({ className: e, stickyHeader: t, ...n }, r) => /* @__PU ...n } )); -or.displayName = "TableHeader"; -const ar = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s("tbody", { ref: n, className: T("[&_tr:last-child]:tw-border-0", e), ...t })); -ar.displayName = "TableBody"; -const yc = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +Pn.displayName = "TableHeader"; +const $n = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i("tbody", { ref: n, className: C("[&_tr:last-child]:tw-border-0", e), ...t })); +$n.displayName = "TableBody"; +const _c = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( "tfoot", { ref: n, - className: T("tw-border-t tw-bg-muted/50 tw-font-medium [&>tr]:last:tw-border-b-0", e), + className: C("tw-border-t tw-bg-muted/50 tw-font-medium [&>tr]:last:tw-border-b-0", e), ...t } )); -yc.displayName = "TableFooter"; -const ot = A.forwardRef( - ({ className: e, ...t }, n) => /* @__PURE__ */ s( +_c.displayName = "TableFooter"; +const We = M.forwardRef( + ({ className: e, ...t }, n) => /* @__PURE__ */ i( "tr", { ref: n, - className: T( + className: C( "tw-border-b tw-transition-colors hover:tw-bg-muted/50 data-[state=selected]:tw-bg-muted", e ), @@ -1902,57 +1902,57 @@ const ot = A.forwardRef( } ) ); -ot.displayName = "TableRow"; -const hn = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +We.displayName = "TableRow"; +const je = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( "th", { ref: n, - className: T( + className: C( "tw-h-12 tw-px-4 tw-text-start tw-align-middle tw-font-medium tw-text-muted-foreground [&:has([role=checkbox])]:tw-pe-0", e ), ...t } )); -hn.displayName = "TableHead"; -const jt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +je.displayName = "TableHead"; +const $e = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( "td", { ref: n, - className: T("tw-p-4 tw-align-middle [&:has([role=checkbox])]:tw-pe-0", e), + className: C("tw-p-4 tw-align-middle [&:has([role=checkbox])]:tw-pe-0", e), ...t } )); -jt.displayName = "TableCell"; -const xc = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +$e.displayName = "TableCell"; +const Pc = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( "caption", { ref: n, - className: T("tw-mt-4 tw-text-sm tw-text-muted-foreground", e), + className: C("tw-mt-4 tw-text-sm tw-text-muted-foreground", e), ...t } )); -xc.displayName = "TableCaption"; -function Nc({ +Pc.displayName = "TableCaption"; +function $c({ columns: e, data: t, enablePagination: n = !1, showPaginationControls: r = !1, showColumnVisibilityControls: o = !1, stickyHeader: a = !1, - onRowClickHandler: i = () => { + onRowClickHandler: s = () => { } }) { var m; - const [l, c] = ue([]), [d, p] = ue([]), [h, w] = ue({}), [b, v] = ue({}), f = ei({ + const [l, c] = ie([]), [d, u] = ie([]), [h, w] = ie({}), [b, v] = ie({}), f = as({ data: t, columns: e, - getCoreRowModel: ti(), - ...n && { getPaginationRowModel: fl() }, + getCoreRowModel: ss(), + ...n && { getPaginationRowModel: El() }, onSortingChange: c, - getSortedRowModel: ni(), - onColumnFiltersChange: p, - getFilteredRowModel: ml(), + getSortedRowModel: is(), + onColumnFiltersChange: u, + getFilteredRowModel: Tl(), onColumnVisibilityChange: w, onRowSelectionChange: v, state: { @@ -1963,22 +1963,22 @@ function Nc({ } }); return /* @__PURE__ */ x("div", { className: "pr-twp", children: [ - o && /* @__PURE__ */ s(mc, { table: f }), - /* @__PURE__ */ x(rr, { stickyHeader: a, children: [ - /* @__PURE__ */ s(or, { stickyHeader: a, children: f.getHeaderGroups().map((N) => /* @__PURE__ */ s(ot, { children: N.headers.map((I) => /* @__PURE__ */ s(hn, { children: I.isPlaceholder ? void 0 : sn(I.column.columnDef.header, I.getContext()) }, I.id)) }, N.id)) }), - /* @__PURE__ */ s(ar, { children: (m = f.getRowModel().rows) != null && m.length ? f.getRowModel().rows.map((N) => /* @__PURE__ */ s( - ot, + o && /* @__PURE__ */ i(Tc, { table: f }), + /* @__PURE__ */ x(_n, { stickyHeader: a, children: [ + /* @__PURE__ */ i(Pn, { stickyHeader: a, children: f.getHeaderGroups().map((N) => /* @__PURE__ */ i(We, { children: N.headers.map((A) => /* @__PURE__ */ i(je, { children: A.isPlaceholder ? void 0 : pn(A.column.columnDef.header, A.getContext()) }, A.id)) }, N.id)) }), + /* @__PURE__ */ i($n, { children: (m = f.getRowModel().rows) != null && m.length ? f.getRowModel().rows.map((N) => /* @__PURE__ */ i( + We, { - onClick: () => i(N, f), + onClick: () => s(N, f), "data-state": N.getIsSelected() && "selected", - children: N.getVisibleCells().map((I) => /* @__PURE__ */ s(jt, { children: sn(I.column.columnDef.cell, I.getContext()) }, I.id)) + children: N.getVisibleCells().map((A) => /* @__PURE__ */ i($e, { children: pn(A.column.columnDef.cell, A.getContext()) }, A.id)) }, N.id - )) : /* @__PURE__ */ s(ot, { children: /* @__PURE__ */ s(jt, { colSpan: e.length, className: "tw-h-24 tw-text-center", children: "No results." }) }) }) + )) : /* @__PURE__ */ i(We, { children: /* @__PURE__ */ i($e, { colSpan: e.length, className: "tw-h-24 tw-text-center", children: "No results." }) }) }) ] }), n && /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-justify-end tw-space-x-2 tw-py-4", children: [ - /* @__PURE__ */ s( - me, + /* @__PURE__ */ i( + fe, { variant: "outline", size: "sm", @@ -1987,8 +1987,8 @@ function Nc({ children: "Previous" } ), - /* @__PURE__ */ s( - me, + /* @__PURE__ */ i( + fe, { variant: "outline", size: "sm", @@ -1998,67 +1998,67 @@ function Nc({ } ) ] }), - n && r && /* @__PURE__ */ s(vc, { table: f }) + n && r && /* @__PURE__ */ i(Rc, { table: f }) ] }); } -function kc({ +function Ic({ occurrenceData: e, setScriptureReference: t, localizedStrings: n }) { - const r = n["%webView_inventory_occurrences_table_header_reference%"], o = n["%webView_inventory_occurrences_table_header_occurrence%"], a = Te(() => { - const i = []; + const r = n["%webView_inventory_occurrences_table_header_reference%"], o = n["%webView_inventory_occurrences_table_header_occurrence%"], a = Ne(() => { + const s = []; return e.forEach((l) => { - i.some((c) => to(c, l)) || i.push(l); - }), i; + s.some((c) => co(c, l)) || s.push(l); + }), s; }, [e]); - return /* @__PURE__ */ x(rr, { stickyHeader: !0, children: [ - /* @__PURE__ */ s(or, { stickyHeader: !0, children: /* @__PURE__ */ x(ot, { children: [ - /* @__PURE__ */ s(hn, { children: r }), - /* @__PURE__ */ s(hn, { children: o }) + return /* @__PURE__ */ x(_n, { stickyHeader: !0, children: [ + /* @__PURE__ */ i(Pn, { stickyHeader: !0, children: /* @__PURE__ */ x(We, { children: [ + /* @__PURE__ */ i(je, { children: r }), + /* @__PURE__ */ i(je, { children: o }) ] }) }), - /* @__PURE__ */ s(ar, { children: a.length > 0 && a.map((i) => /* @__PURE__ */ x( - ot, + /* @__PURE__ */ i($n, { children: a.length > 0 && a.map((s) => /* @__PURE__ */ x( + We, { onClick: () => { - t(i.reference); + t(s.reference); }, children: [ - /* @__PURE__ */ s(jt, { children: `${oe.bookNumberToEnglishName(i.reference.bookNum)} ${i.reference.chapterNum}:${i.reference.verseNum}` }), - /* @__PURE__ */ s(jt, { children: i.text }) + /* @__PURE__ */ i($e, { children: `${se.bookNumberToEnglishName(s.reference.bookNum)} ${s.reference.chapterNum}:${s.reference.verseNum}` }), + /* @__PURE__ */ i($e, { children: s.text }) ] }, - `${i.reference.bookNum} ${i.reference.chapterNum}:${i.reference.verseNum}-${i.text}` + `${s.reference.bookNum} ${s.reference.chapterNum}:${s.reference.verseNum}-${s.text}` )) }) ] }); } -const fo = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - Fr.Root, +const yo = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + Wr.Root, { ref: n, - className: T( + className: C( "tw-peer pr-twp tw-h-4 tw-w-4 tw-shrink-0 tw-rounded-sm tw-border tw-border-primary tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50 data-[state=checked]:tw-bg-primary data-[state=checked]:tw-text-primary-foreground", e ), ...t, - children: /* @__PURE__ */ s( - Fr.Indicator, + children: /* @__PURE__ */ i( + Wr.Indicator, { - className: T("tw-flex tw-items-center tw-justify-center tw-text-current"), - children: /* @__PURE__ */ s(xn, { className: "tw-h-4 tw-w-4" }) + className: C("tw-flex tw-items-center tw-justify-center tw-text-current"), + children: /* @__PURE__ */ i(Cn, { className: "tw-h-4 tw-w-4" }) } ) } )); -fo.displayName = Fr.Root.displayName; -const Ec = (e) => e.split(/(?:\r?\n|\r)|(?=(?:\\(?:v|c|id)))/g), na = (e) => { +yo.displayName = Wr.Root.displayName; +const Ac = (e) => e.split(/(?:\r?\n|\r)|(?=(?:\\(?:v|c|id)))/g), la = (e) => { const t = /^\\[vc]\s+(\d+)/, n = e.match(t); if (n) return +n[1]; -}, Tc = (e) => { +}, Dc = (e) => { const t = e.match(/^\\id\s+([A-Za-z]+)/); - return t ? oe.bookIdToNumber(t[1]) : 0; -}, Cc = (e, t, n) => n.includes(e) ? "unapproved" : t.includes(e) ? "approved" : "unknown", Ei = Nn( + return t ? se.bookIdToNumber(t[1]) : 0; +}, Mc = (e, t, n) => n.includes(e) ? "unapproved" : t.includes(e) ? "approved" : "unknown", Ss = Sn( "pr-twp tw-inline-flex tw-items-center tw-justify-center tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors hover:tw-bg-muted hover:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=on]:tw-bg-accent data-[state=on]:tw-text-accent-foreground", { variants: { @@ -2077,26 +2077,26 @@ const Ec = (e) => e.split(/(?:\r?\n|\r)|(?=(?:\\(?:v|c|id)))/g), na = (e) => { size: "default" } } -), Sc = A.forwardRef(({ className: e, variant: t, size: n, ...r }, o) => /* @__PURE__ */ s( - ri.Root, +), Bc = M.forwardRef(({ className: e, variant: t, size: n, ...r }, o) => /* @__PURE__ */ i( + ls.Root, { ref: o, - className: T(Ei({ variant: t, size: n, className: e })), + className: C(Ss({ variant: t, size: n, className: e })), ...r } )); -Sc.displayName = ri.Root.displayName; -const Ti = A.createContext({ +Bc.displayName = ls.Root.displayName; +const Os = M.createContext({ size: "default", variant: "default" -}), Ci = A.forwardRef(({ className: e, variant: t, size: n, children: r, ...o }, a) => /* @__PURE__ */ s( - er.Root, +}), Rs = M.forwardRef(({ className: e, variant: t, size: n, children: r, ...o }, a) => /* @__PURE__ */ i( + cr.Root, { ref: a, - className: T("pr-twp tw-flex tw-items-center tw-justify-center tw-gap-1", e), + className: C("pr-twp tw-flex tw-items-center tw-justify-center tw-gap-1", e), ...o, - children: /* @__PURE__ */ s( - Ti.Provider, + children: /* @__PURE__ */ i( + Os.Provider, { value: { variant: t, size: n }, children: r @@ -2104,17 +2104,17 @@ const Ti = A.createContext({ ) } )); -Ci.displayName = er.Root.displayName; -const Fn = A.forwardRef(({ className: e, children: t, variant: n, size: r, ...o }, a) => { - const i = A.useContext(Ti); - return /* @__PURE__ */ s( - er.Item, +Rs.displayName = cr.Root.displayName; +const qn = M.forwardRef(({ className: e, children: t, variant: n, size: r, ...o }, a) => { + const s = M.useContext(Os); + return /* @__PURE__ */ i( + cr.Item, { ref: a, - className: T( - Ei({ - variant: i.variant || n, - size: i.size || r + className: C( + Ss({ + variant: s.variant || n, + size: s.size || r }), e ), @@ -2123,50 +2123,50 @@ const Fn = A.forwardRef(({ className: e, children: t, variant: n, size: r, ...o } ); }); -Fn.displayName = er.Item.displayName; -const ir = (e) => e === "asc" ? /* @__PURE__ */ s(qs, { className: "tw-ms-2 tw-h-4 tw-w-4" }) : e === "desc" ? /* @__PURE__ */ s(Ks, { className: "tw-ms-2 tw-h-4 tw-w-4" }) : /* @__PURE__ */ s(Js, { className: "tw-ms-2 tw-h-4 tw-w-4" }), Sm = (e) => ({ +qn.displayName = cr.Item.displayName; +const ur = (e) => e === "asc" ? /* @__PURE__ */ i(nl, { className: "tw-ms-2 tw-h-4 tw-w-4" }) : e === "desc" ? /* @__PURE__ */ i(rl, { className: "tw-ms-2 tw-h-4 tw-w-4" }) : /* @__PURE__ */ i(ol, { className: "tw-ms-2 tw-h-4 tw-w-4" }), Am = (e) => ({ accessorKey: "item", accessorFn: (t) => t.items[0], - header: ({ column: t }) => /* @__PURE__ */ x(me, { variant: "ghost", onClick: () => t.toggleSorting(void 0), children: [ + header: ({ column: t }) => /* @__PURE__ */ x(fe, { variant: "ghost", onClick: () => t.toggleSorting(void 0), children: [ e, - ir(t.getIsSorted()) + ur(t.getIsSorted()) ] }) -}), Oc = (e, t) => ({ +}), jc = (e, t) => ({ accessorKey: `item${t}`, accessorFn: (n) => n.items[t], - header: ({ column: n }) => /* @__PURE__ */ x(me, { variant: "ghost", onClick: () => n.toggleSorting(void 0), children: [ + header: ({ column: n }) => /* @__PURE__ */ x(fe, { variant: "ghost", onClick: () => n.toggleSorting(void 0), children: [ e, - ir(n.getIsSorted()) + ur(n.getIsSorted()) ] }) -}), Om = (e) => ({ +}), Dm = (e) => ({ accessorKey: "count", - header: ({ column: t }) => /* @__PURE__ */ s("div", { className: "tw-flex tw-justify-end tw-tabular-nums", children: /* @__PURE__ */ x(me, { variant: "ghost", onClick: () => t.toggleSorting(void 0), children: [ + header: ({ column: t }) => /* @__PURE__ */ i("div", { className: "tw-flex tw-justify-end tw-tabular-nums", children: /* @__PURE__ */ x(fe, { variant: "ghost", onClick: () => t.toggleSorting(void 0), children: [ e, - ir(t.getIsSorted()) + ur(t.getIsSorted()) ] }) }), - cell: ({ row: t }) => /* @__PURE__ */ s("div", { className: "tw-flex tw-justify-end", children: t.getValue("count") }) -}), Or = (e, t, n, r, o, a) => { - let i = [...n]; + cell: ({ row: t }) => /* @__PURE__ */ i("div", { className: "tw-flex tw-justify-end", children: t.getValue("count") }) +}), Ir = (e, t, n, r, o, a) => { + let s = [...n]; e.forEach((c) => { - t === "approved" ? i.includes(c) || i.push(c) : i = i.filter((d) => d !== c); - }), r(i); + t === "approved" ? s.includes(c) || s.push(c) : s = s.filter((d) => d !== c); + }), r(s); let l = [...o]; e.forEach((c) => { t === "unapproved" ? l.includes(c) || l.push(c) : l = l.filter((d) => d !== c); }), a(l); -}, Rm = (e, t, n, r, o) => ({ +}, Mm = (e, t, n, r, o) => ({ accessorKey: "status", - header: ({ column: a }) => /* @__PURE__ */ s("div", { className: "tw-flex tw-justify-center", children: /* @__PURE__ */ x(me, { variant: "ghost", onClick: () => a.toggleSorting(void 0), children: [ + header: ({ column: a }) => /* @__PURE__ */ i("div", { className: "tw-flex tw-justify-center", children: /* @__PURE__ */ x(fe, { variant: "ghost", onClick: () => a.toggleSorting(void 0), children: [ e, - ir(a.getIsSorted()) + ur(a.getIsSorted()) ] }) }), cell: ({ row: a }) => { - const i = a.getValue("status"), l = a.getValue("item"); - return /* @__PURE__ */ x(Ci, { value: i, variant: "outline", type: "single", children: [ - /* @__PURE__ */ s( - Fn, + const s = a.getValue("status"), l = a.getValue("item"); + return /* @__PURE__ */ x(Rs, { value: s, variant: "outline", type: "single", children: [ + /* @__PURE__ */ i( + qn, { - onClick: () => Or( + onClick: () => Ir( [l], "approved", t, @@ -2175,13 +2175,13 @@ const ir = (e) => e === "asc" ? /* @__PURE__ */ s(qs, { className: "tw-ms-2 tw-h o ), value: "approved", - children: /* @__PURE__ */ s(Xs, {}) + children: /* @__PURE__ */ i(Qi, {}) } ), - /* @__PURE__ */ s( - Fn, + /* @__PURE__ */ i( + qn, { - onClick: () => Or( + onClick: () => Ir( [l], "unapproved", t, @@ -2190,13 +2190,13 @@ const ir = (e) => e === "asc" ? /* @__PURE__ */ s(qs, { className: "tw-ms-2 tw-h o ), value: "unapproved", - children: /* @__PURE__ */ s(Ys, {}) + children: /* @__PURE__ */ i(el, {}) } ), - /* @__PURE__ */ s( - Fn, + /* @__PURE__ */ i( + qn, { - onClick: () => Or( + onClick: () => Ir( [l], "unknown", t, @@ -2205,12 +2205,12 @@ const ir = (e) => e === "asc" ? /* @__PURE__ */ s(qs, { className: "tw-ms-2 tw-h o ), value: "unknown", - children: /* @__PURE__ */ s(Ws, {}) + children: /* @__PURE__ */ i(tl, {}) } ) ] }); } -}), Pm = Object.freeze([ +}), Bm = Object.freeze([ "%webView_inventory_all%", "%webView_inventory_approved%", "%webView_inventory_unapproved%", @@ -2222,29 +2222,29 @@ const ir = (e) => e === "asc" ? /* @__PURE__ */ s(qs, { className: "tw-ms-2 tw-h "%webView_inventory_show_additional_items%", "%webView_inventory_occurrences_table_header_reference%", "%webView_inventory_occurrences_table_header_occurrence%" -]), Rc = (e, t, n) => { +]), Vc = (e, t, n) => { let r = e; return t !== "all" && (r = r.filter( (o) => t === "approved" && o.status === "approved" || t === "unapproved" && o.status === "unapproved" || t === "unknown" && o.status === "unknown" )), n !== "" && (r = r.filter((o) => o.items[0].includes(n))), r; -}, Pc = (e, t, n, r, o) => { +}, Lc = (e, t, n, r, o) => { if (!e) return []; const a = []; - let i = t.bookNum, l = t.chapterNum, c = t.verseNum; - return Ec(e).forEach((p) => { - p.startsWith("\\id") && (i = Tc(p), l = 0, c = 0), p.startsWith("\\c") && (l = na(p), c = 0), p.startsWith("\\v") && (c = na(p), l === 0 && (l = t.chapterNum)); - let h = o.exec(p) ?? void 0; + let s = t.bookNum, l = t.chapterNum, c = t.verseNum; + return Ac(e).forEach((u) => { + u.startsWith("\\id") && (s = Dc(u), l = 0, c = 0), u.startsWith("\\c") && (l = la(u), c = 0), u.startsWith("\\v") && (c = la(u), l === 0 && (l = t.chapterNum)); + let h = o.exec(u) ?? void 0; for (; h; ) { const w = []; h.forEach((m) => w.push(m)); - const b = h.index, v = a.find((m) => to(m.items, w)), f = { + const b = h.index, v = a.find((m) => co(m.items, w)), f = { reference: { - bookNum: i !== void 0 ? i : -1, + bookNum: s !== void 0 ? s : -1, chapterNum: l !== void 0 ? l : -1, verseNum: c !== void 0 ? c : -1 }, - text: dl(p, Math.max(0, b - 25), Math.min(b + 25, p.length)) + text: vl(u, Math.max(0, b - 25), Math.min(b + 25, u.length)) }; if (v) v.count += 1, v.occurrences.push(f); @@ -2252,92 +2252,92 @@ const ir = (e) => e === "asc" ? /* @__PURE__ */ s(qs, { className: "tw-ms-2 tw-h const m = { items: w, count: 1, - status: Cc(w[0], n, r), + status: Mc(w[0], n, r), occurrences: [f] }; a.push(m); } - h = o.exec(p) ?? void 0; + h = o.exec(u) ?? void 0; } }), a; -}, Je = (e, t) => e[t] ?? t; -function _m({ +}, tt = (e, t) => e[t] ?? t; +function jm({ scriptureReference: e, setScriptureReference: t, localizedStrings: n, extractItems: r, additionalItemsLabels: o, approvedItems: a, - unapprovedItems: i, + unapprovedItems: s, text: l, scope: c, onScopeChange: d, - columns: p + columns: u }) { - const h = Je(n, "%webView_inventory_all%"), w = Je(n, "%webView_inventory_approved%"), b = Je(n, "%webView_inventory_unapproved%"), v = Je(n, "%webView_inventory_unknown%"), f = Je(n, "%webView_inventory_scope_currentBook%"), m = Je(n, "%webView_inventory_scope_chapter%"), N = Je(n, "%webView_inventory_scope_verse%"), I = Je(n, "%webView_inventory_filter_text%"), O = Je( + const h = tt(n, "%webView_inventory_all%"), w = tt(n, "%webView_inventory_approved%"), b = tt(n, "%webView_inventory_unapproved%"), v = tt(n, "%webView_inventory_unknown%"), f = tt(n, "%webView_inventory_scope_currentBook%"), m = tt(n, "%webView_inventory_scope_chapter%"), N = tt(n, "%webView_inventory_scope_verse%"), A = tt(n, "%webView_inventory_filter_text%"), _ = tt( n, "%webView_inventory_show_additional_items%" - ), [E, g] = ue(!1), [_, L] = ue("all"), [H, C] = ue(""), [P, k] = ue([]), B = Te(() => l ? r instanceof RegExp ? Pc( + ), [E, g] = ie(!1), [I, U] = ie("all"), [W, O] = ie(""), [P, k] = ie([]), B = Ne(() => l ? r instanceof RegExp ? Lc( l, e, a, - i, + s, r - ) : r(l, e, a, i) : [], [l, r, e, a, i]), D = Te(() => { + ) : r(l, e, a, s) : [], [l, r, e, a, s]), D = Ne(() => { if (E) return B; const y = []; - return B.forEach((S) => { - const z = S.items[0], F = y.find( - (V) => V.items[0] === z + return B.forEach((R) => { + const H = R.items[0], G = y.find( + (z) => z.items[0] === H ); - F ? (F.count += S.count, F.occurrences = F.occurrences.concat(S.occurrences)) : y.push({ - items: [z], - count: S.count, - occurrences: S.occurrences, - status: S.status + G ? (G.count += R.count, G.occurrences = G.occurrences.concat(R.occurrences)) : y.push({ + items: [H], + count: R.count, + occurrences: R.occurrences, + status: R.status }); }), y; - }, [E, B]), J = Te(() => Rc(D, _, H), [D, _, H]), q = Te(() => { - var z, F; + }, [E, B]), Q = Ne(() => Vc(D, I, W), [D, I, W]), J = Ne(() => { + var H, G; if (!E) - return p; - const y = (z = o == null ? void 0 : o.tableHeaders) == null ? void 0 : z.length; + return u; + const y = (H = o == null ? void 0 : o.tableHeaders) == null ? void 0 : H.length; if (!y) - return p; - const S = []; - for (let V = 0; V < y; V++) - S.push( - Oc( - ((F = o == null ? void 0 : o.tableHeaders) == null ? void 0 : F[V]) || "Additional Item", - V + 1 + return u; + const R = []; + for (let z = 0; z < y; z++) + R.push( + jc( + ((G = o == null ? void 0 : o.tableHeaders) == null ? void 0 : G[z]) || "Additional Item", + z + 1 ) ); - return [...S, ...p]; - }, [o == null ? void 0 : o.tableHeaders, p, E]); - at(() => { + return [...R, ...u]; + }, [o == null ? void 0 : o.tableHeaders, u, E]); + Ke(() => { k([]); - }, [J]); - const U = (y, S) => { - S.setRowSelection(() => { - const z = {}; - return z[y.index] = !0, z; + }, [Q]); + const X = (y, R) => { + R.setRowSelection(() => { + const H = {}; + return H[y.index] = !0, H; }), k(y.original.items); }, ee = (y) => { if (y === "book" || y === "chapter" || y === "verse") d(y); else throw new Error(`Invalid scope value: ${y}`); - }, ae = (y) => { + }, re = (y) => { if (y === "all" || y === "approved" || y === "unapproved" || y === "unknown") - L(y); + U(y); else throw new Error(`Invalid status filter value: ${y}`); - }, re = Te(() => { + }, oe = Ne(() => { if (D.length === 0 || P.length === 0) return []; - const y = D.filter((S) => to( - E ? S.items : [S.items[0]], + const y = D.filter((R) => co( + E ? R.items : [R.items[0]], P )); if (y.length > 1) @@ -2347,43 +2347,43 @@ function _m({ return /* @__PURE__ */ x("div", { className: "pr-twp tw-flex tw-h-full tw-flex-col", children: [ /* @__PURE__ */ x("div", { className: "tw-flex tw-items-stretch", children: [ /* @__PURE__ */ x( - fn, + yn, { - onValueChange: (y) => ae(y), - defaultValue: _, + onValueChange: (y) => re(y), + defaultValue: I, children: [ - /* @__PURE__ */ s(Mt, { className: "tw-m-1", children: /* @__PURE__ */ s(mn, { placeholder: "Select filter" }) }), - /* @__PURE__ */ x(Bt, { children: [ - /* @__PURE__ */ s(Ue, { value: "all", children: h }), - /* @__PURE__ */ s(Ue, { value: "approved", children: w }), - /* @__PURE__ */ s(Ue, { value: "unapproved", children: b }), - /* @__PURE__ */ s(Ue, { value: "unknown", children: v }) + /* @__PURE__ */ i(Ft, { className: "tw-m-1", children: /* @__PURE__ */ i(xn, { placeholder: "Select filter" }) }), + /* @__PURE__ */ x(zt, { children: [ + /* @__PURE__ */ i(Xe, { value: "all", children: h }), + /* @__PURE__ */ i(Xe, { value: "approved", children: w }), + /* @__PURE__ */ i(Xe, { value: "unapproved", children: b }), + /* @__PURE__ */ i(Xe, { value: "unknown", children: v }) ] }) ] } ), - /* @__PURE__ */ x(fn, { onValueChange: (y) => ee(y), defaultValue: c, children: [ - /* @__PURE__ */ s(Mt, { className: "tw-m-1", children: /* @__PURE__ */ s(mn, { placeholder: "Select scope" }) }), - /* @__PURE__ */ x(Bt, { children: [ - /* @__PURE__ */ s(Ue, { value: "book", children: f }), - /* @__PURE__ */ s(Ue, { value: "chapter", children: m }), - /* @__PURE__ */ s(Ue, { value: "verse", children: N }) + /* @__PURE__ */ x(yn, { onValueChange: (y) => ee(y), defaultValue: c, children: [ + /* @__PURE__ */ i(Ft, { className: "tw-m-1", children: /* @__PURE__ */ i(xn, { placeholder: "Select scope" }) }), + /* @__PURE__ */ x(zt, { children: [ + /* @__PURE__ */ i(Xe, { value: "book", children: f }), + /* @__PURE__ */ i(Xe, { value: "chapter", children: m }), + /* @__PURE__ */ i(Xe, { value: "verse", children: N }) ] }) ] }), - /* @__PURE__ */ s( - kn, + /* @__PURE__ */ i( + qt, { className: "tw-m-1 tw-rounded-md tw-border", - placeholder: I, - value: H, + placeholder: A, + value: W, onChange: (y) => { - C(y.target.value); + O(y.target.value); } } ), o && /* @__PURE__ */ x("div", { className: "tw-m-1 tw-flex tw-items-center tw-rounded-md tw-border", children: [ - /* @__PURE__ */ s( - fo, + /* @__PURE__ */ i( + yo, { className: "tw-m-1", checked: E, @@ -2392,40 +2392,40 @@ function _m({ } } ), - /* @__PURE__ */ s(He, { className: "tw-m-1 tw-flex-shrink-0 tw-whitespace-nowrap", children: (o == null ? void 0 : o.checkboxText) ?? O }) + /* @__PURE__ */ i(De, { className: "tw-m-1 tw-flex-shrink-0 tw-whitespace-nowrap", children: (o == null ? void 0 : o.checkboxText) ?? _ }) ] }) ] }), - /* @__PURE__ */ s("div", { className: "tw-m-1 tw-flex-1 tw-overflow-auto tw-rounded-md tw-border", children: /* @__PURE__ */ s( - Nc, + /* @__PURE__ */ i("div", { className: "tw-m-1 tw-flex-1 tw-overflow-auto tw-rounded-md tw-border", children: /* @__PURE__ */ i( + $c, { - columns: q, - data: J, - onRowClickHandler: U, + columns: J, + data: Q, + onRowClickHandler: X, stickyHeader: !0 } ) }), - re.length > 0 && /* @__PURE__ */ s("div", { className: "tw-m-1 tw-flex-1 tw-overflow-auto tw-rounded-md tw-border", children: /* @__PURE__ */ s( - kc, + oe.length > 0 && /* @__PURE__ */ i("div", { className: "tw-m-1 tw-flex-1 tw-overflow-auto tw-rounded-md tw-border", children: /* @__PURE__ */ i( + Ic, { - occurrenceData: re, + occurrenceData: oe, setScriptureReference: t, localizedStrings: n } ) }) ] }); } -function $m({ +function Vm({ entries: e, getEntriesCount: t = void 0, selected: n, onChange: r, placeholder: o, - commandEmptyMessage: a = "No option found", - customSelectedText: i, + commandEmptyMessage: a = "No entries found", + customSelectedText: s, sortSelected: l = !1, icon: c = void 0 }) { - const [d, p] = ue(!1), h = $e( + const [d, u] = ie(!1), h = Ie( (v) => { r( n.includes(v) ? n.filter((f) => f !== v) : [...n, v] @@ -2434,69 +2434,69 @@ function $m({ [n, r] ), w = () => { var v; - return n.length === 1 ? ((v = e.find((f) => f.value === n[0])) == null ? void 0 : v.label) ?? o : i || o; - }, b = Te(() => { + return n.length === 1 ? ((v = e.find((f) => f.value === n[0])) == null ? void 0 : v.label) ?? o : s || o; + }, b = Ne(() => { if (!l) return e; const v = e.filter((m) => m.starred).sort((m, N) => m.label.localeCompare(N.label)), f = e.filter((m) => !m.starred).sort((m, N) => { - const I = n.includes(m.value), O = n.includes(N.value); - return I && !O ? -1 : !I && O ? 1 : m.label.localeCompare(N.label); + const A = n.includes(m.value), _ = n.includes(N.value); + return A && !_ ? -1 : !A && _ ? 1 : m.label.localeCompare(N.label); }); return [...v, ...f]; }, [e, n, l]); - return /* @__PURE__ */ x(bi, { open: d, onOpenChange: p, children: [ - /* @__PURE__ */ s(vi, { asChild: !0, children: /* @__PURE__ */ x( - me, + return /* @__PURE__ */ x(xs, { open: d, onOpenChange: u, children: [ + /* @__PURE__ */ i(Ns, { asChild: !0, children: /* @__PURE__ */ x( + fe, { variant: "outline", role: "combobox", "aria-expanded": d, - className: T( + className: C( "tw-w-full tw-justify-between", n.length > 0 && n.length < e.length && "tw-border-primary" ), children: [ /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-gap-2", children: [ - /* @__PURE__ */ s("div", { className: "tw-ml-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50", children: /* @__PURE__ */ s("span", { className: "tw-flex tw-h-full tw-w-full tw-items-center tw-justify-center", children: c }) }), - /* @__PURE__ */ s( + /* @__PURE__ */ i("div", { className: "tw-ml-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50", children: /* @__PURE__ */ i("span", { className: "tw-flex tw-h-full tw-w-full tw-items-center tw-justify-center", children: c }) }), + /* @__PURE__ */ i( "div", { - className: T( + className: C( (n.length === 0 || n.length === e.length) && "tw-text-muted" ), children: w() } ) ] }), - /* @__PURE__ */ s(Za, { className: "tw-ml-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50" }) + /* @__PURE__ */ i(Qn, { className: "tw-ml-2 tw-h-4 tw-w-4 tw-shrink-0 tw-opacity-50" }) ] } ) }), - /* @__PURE__ */ s(so, { align: "start", className: "tw-w-full tw-p-0", children: /* @__PURE__ */ x(lo, { children: [ - /* @__PURE__ */ s(co, { placeholder: `Search ${o.toLowerCase()}...` }), - /* @__PURE__ */ x(po, { children: [ - /* @__PURE__ */ s(uo, { children: a }), - /* @__PURE__ */ s(xi, { children: b.map((v) => { + /* @__PURE__ */ i(fo, { align: "start", className: "tw-w-full tw-p-0", children: /* @__PURE__ */ x(mo, { children: [ + /* @__PURE__ */ i(ho, { placeholder: `Search ${o.toLowerCase()}...` }), + /* @__PURE__ */ x(go, { children: [ + /* @__PURE__ */ i(bo, { children: a }), + /* @__PURE__ */ i(Es, { children: b.map((v) => { const f = t ? t(v) : void 0; return /* @__PURE__ */ x( - wo, + vo, { value: v.value, onSelect: h, className: "tw-flex tw-items-center tw-gap-2", children: [ - /* @__PURE__ */ s("div", { className: "w-4", children: /* @__PURE__ */ s( - xn, + /* @__PURE__ */ i("div", { className: "w-4", children: /* @__PURE__ */ i( + Cn, { - className: T( + className: C( "tw-h-4 tw-w-4", n.includes(v.value) ? "tw-opacity-100" : "tw-opacity-0" ) } ) }), - /* @__PURE__ */ s("div", { className: "tw-w-4", children: v.starred && /* @__PURE__ */ s(Zs, { className: "tw-h-4 tw-w-4" }) }), - /* @__PURE__ */ s("div", { className: "tw-flex-grow", children: v.label }), - t && /* @__PURE__ */ s("div", { className: "tw-w-10 tw-text-right tw-text-muted-foreground", children: f }) + /* @__PURE__ */ i("div", { className: "tw-w-4", children: v.starred && /* @__PURE__ */ i(al, { className: "tw-h-4 tw-w-4" }) }), + /* @__PURE__ */ i("div", { className: "tw-flex-grow", children: v.label }), + t && /* @__PURE__ */ i("div", { className: "tw-w-10 tw-text-right tw-text-muted-foreground", children: f }) ] }, v.value @@ -2506,21 +2506,21 @@ function $m({ ] }) }) ] }); } -function _c({ +function Fc({ onSearch: e, placeholder: t, isFullWidth: n, className: r }) { - const [o, a] = ue(""), i = (l) => { + const [o, a] = ie(""), s = (l) => { a(l), e(l); }; return /* @__PURE__ */ x("div", { className: "tw-relative", children: [ - /* @__PURE__ */ s(Ja, { className: "tw-absolute tw-left-3 tw-top-1/2 tw-h-4 tw-w-4 tw--translate-y-1/2 tw-transform tw-opacity-50" }), - /* @__PURE__ */ s( - kn, + /* @__PURE__ */ i(lo, { className: "tw-absolute tw-left-3 tw-top-1/2 tw-h-4 tw-w-4 tw--translate-y-1/2 tw-transform tw-opacity-50" }), + /* @__PURE__ */ i( + qt, { - className: T( + className: C( "tw-flex tw-h-10 tw-w-full tw-text-ellipsis tw-rounded-md tw-border tw-border-input tw-bg-background tw-py-2 tw-pe-3 tw-ps-9 tw-text-sm tw-ring-offset-background file:tw-border-0 file:tw-bg-transparent file:tw-text-sm file:tw-font-medium placeholder:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-[color:hsl(240,5%,64.9%)] focus-visible:tw-ring-offset-2 disabled:tw-cursor-not-allowed disabled:tw-opacity-50", { "tw-w-full": n }, { "tw-pe-9": o }, @@ -2528,68 +2528,68 @@ function _c({ ), placeholder: t, value: o, - onChange: (l) => i(l.target.value) + onChange: (l) => s(l.target.value) } ), o && /* @__PURE__ */ x( - me, + fe, { variant: "ghost", size: "icon", className: "tw-absolute tw-right-0 tw-top-1/2 tw-h-7 tw--translate-y-1/2 tw-transform hover:tw-bg-transparent", children: [ - /* @__PURE__ */ s( - Ka, + /* @__PURE__ */ i( + rs, { className: "tw-h-4 tw-w-4", onClick: () => { - i(""); + s(""); } } ), - /* @__PURE__ */ s("span", { className: "tw-sr-only", children: "Clear" }) + /* @__PURE__ */ i("span", { className: "tw-sr-only", children: "Clear" }) ] } ) ] }); } -const Si = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +const _s = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Re.Root, { orientation: "vertical", ref: n, - className: T("tw-flex tw-gap-1 tw-rounded-md tw-text-muted-foreground", e), + className: C("tw-flex tw-gap-1 tw-rounded-md tw-text-muted-foreground", e), ...t } )); -Si.displayName = Re.List.displayName; -const Oi = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +_s.displayName = Re.List.displayName; +const Ps = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Re.List, { ref: n, - className: T( + className: C( "tw-flex-fit tw-mlk-items-center tw-w-[124px] tw-justify-center tw-rounded-md tw-bg-muted tw-p-1 tw-text-muted-foreground", e ), ...t } )); -Oi.displayName = Re.List.displayName; -const $c = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +Ps.displayName = Re.List.displayName; +const zc = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Re.Trigger, { ref: n, ...t, - className: T( + className: C( "overflow-clip tw-inline-flex tw-w-[116px] tw-cursor-pointer tw-items-center tw-justify-center tw-break-words tw-rounded-sm tw-border-0 tw-bg-muted tw-px-3 tw-py-1.5 tw-text-sm tw-font-medium tw-text-inherit tw-ring-offset-background tw-transition-all hover:tw-text-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=active]:tw-bg-background data-[state=active]:tw-text-foreground data-[state=active]:tw-shadow-sm", e ) } -)), Ri = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +)), $s = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Re.Content, { ref: n, - className: T( + className: C( // Removed tw-mt-2 because Sebastian said so "tw-ms-5 tw-flex-grow tw-text-foreground tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2", e @@ -2597,8 +2597,8 @@ const $c = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( ...t } )); -Ri.displayName = Re.Content.displayName; -function Im({ +$s.displayName = Re.Content.displayName; +function Lm({ tabList: e, onSearch: t, searchPlaceholder: n, @@ -2608,9 +2608,9 @@ function Im({ }) { return /* @__PURE__ */ x("div", { className: "pr-twp", children: [ /* @__PURE__ */ x("div", { className: "tw-sticky tw-top-0 tw-space-y-2 tw-pb-2", children: [ - r ? /* @__PURE__ */ s("h1", { children: r }) : "", - /* @__PURE__ */ s( - _c, + r ? /* @__PURE__ */ i("h1", { children: r }) : "", + /* @__PURE__ */ i( + Fc, { isFullWidth: o, onSearch: t, @@ -2618,43 +2618,43 @@ function Im({ } ) ] }), - /* @__PURE__ */ x(Si, { dir: a, children: [ - /* @__PURE__ */ s(Oi, { children: e.map((i) => /* @__PURE__ */ s($c, { value: i.value, children: i.value }, i.key)) }), - e.map((i) => /* @__PURE__ */ s(Ri, { value: i.value, children: i.content }, i.key)) + /* @__PURE__ */ x(_s, { dir: a, children: [ + /* @__PURE__ */ i(Ps, { children: e.map((s) => /* @__PURE__ */ i(zc, { value: s.value, children: s.value }, s.key)) }), + e.map((s) => /* @__PURE__ */ i($s, { value: s.value, children: s.content }, s.key)) ] }) ] }); } -const nt = "scrBook", Ic = "scrRef", wt = "source", Ac = "details", Dc = "Scripture Reference", Mc = "Scripture Book", Pi = "Type", Bc = "Details"; -function jc(e, t) { +const st = "scrBook", Uc = "scrRef", mt = "source", Gc = "details", Hc = "Scripture Reference", Xc = "Scripture Book", Is = "Type", Yc = "Details"; +function Wc(e, t) { const n = t ?? !1; return [ { - accessorFn: (r) => `${oe.bookNumberToId(r.start.bookNum)} ${r.start.chapterNum}:${r.start.verseNum}`, - id: nt, - header: (e == null ? void 0 : e.scriptureReferenceColumnName) ?? Dc, + accessorFn: (r) => `${se.bookNumberToId(r.start.bookNum)} ${r.start.chapterNum}:${r.start.verseNum}`, + id: st, + header: (e == null ? void 0 : e.scriptureReferenceColumnName) ?? Hc, cell: (r) => { const o = r.row.original; - return r.row.getIsGrouped() ? oe.bookNumberToEnglishName(o.start.bookNum) : r.row.groupingColumnId === nt ? Tr(o.start) : void 0; + return r.row.getIsGrouped() ? se.bookNumberToEnglishName(o.start.bookNum) : r.row.groupingColumnId === st ? _r(o.start) : void 0; }, getGroupingValue: (r) => r.start.bookNum, - sortingFn: (r, o) => zr(r.original.start, o.original.start), + sortingFn: (r, o) => Yr(r.original.start, o.original.start), enableGrouping: !0 }, { - accessorFn: (r) => Tr(r.start), - id: Ic, + accessorFn: (r) => _r(r.start), + id: Uc, header: void 0, cell: (r) => { const o = r.row.original; - return r.row.getIsGrouped() ? void 0 : Tr(o.start); + return r.row.getIsGrouped() ? void 0 : _r(o.start); }, - sortingFn: (r, o) => zr(r.original.start, o.original.start), + sortingFn: (r, o) => Yr(r.original.start, o.original.start), enableGrouping: !1 }, { accessorFn: (r) => r.source.displayName, - id: wt, - header: n ? (e == null ? void 0 : e.typeColumnName) ?? Pi : void 0, + id: mt, + header: n ? (e == null ? void 0 : e.typeColumnName) ?? Is : void 0, cell: (r) => n || r.row.getIsGrouped() ? r.getValue() : void 0, getGroupingValue: (r) => r.source.id, sortingFn: (r, o) => r.original.source.displayName.localeCompare(o.original.source.displayName), @@ -2662,57 +2662,57 @@ function jc(e, t) { }, { accessorFn: (r) => r.detail, - id: Ac, - header: (e == null ? void 0 : e.detailsColumnName) ?? Bc, + id: Gc, + header: (e == null ? void 0 : e.detailsColumnName) ?? Yc, cell: (r) => r.getValue(), enableGrouping: !1 } ]; } -const Vc = (e) => { +const qc = (e) => { if (!("offset" in e.start)) throw new Error("No offset available in range start"); if (e.end && !("offset" in e.end)) throw new Error("No offset available in range end"); const { offset: t } = e.start; let n = 0; - return e.end && ({ offset: n } = e.end), !e.end || zr(e.start, e.end) === 0 ? `${Cr(e.start)}+${t}` : `${Cr(e.start)}+${t}-${Cr(e.end)}+${n}`; -}, ra = (e) => `${Vc({ start: e.start, end: e.end })} ${e.source.displayName} ${e.detail}`; -function Am({ + return e.end && ({ offset: n } = e.end), !e.end || Yr(e.start, e.end) === 0 ? `${Pr(e.start)}+${t}` : `${Pr(e.start)}+${t}-${Pr(e.end)}+${n}`; +}, ca = (e) => `${qc({ start: e.start, end: e.end })} ${e.source.displayName} ${e.detail}`; +function Fm({ sources: e, showColumnHeaders: t = !1, showSourceColumn: n = !1, scriptureReferenceColumnName: r, scriptureBookGroupName: o, typeColumnName: a, - detailsColumnName: i, + detailsColumnName: s, onRowSelected: l, direction: c = "ltr" }) { - const [d, p] = ue([]), [h, w] = ue([{ id: nt, desc: !1 }]), [b, v] = ue({}), f = Te( - () => e.flatMap((C) => C.data.map((P) => ({ + const [d, u] = ie([]), [h, w] = ie([{ id: st, desc: !1 }]), [b, v] = ie({}), f = Ne( + () => e.flatMap((O) => O.data.map((P) => ({ ...P, - source: C.source + source: O.source }))), [e] - ), m = Te( - () => jc( + ), m = Ne( + () => Wc( { scriptureReferenceColumnName: r, typeColumnName: a, - detailsColumnName: i + detailsColumnName: s }, n ), - [r, a, i, n] + [r, a, s, n] ); - at(() => { - d.includes(wt) ? w([ - { id: wt, desc: !1 }, - { id: nt, desc: !1 } - ]) : w([{ id: nt, desc: !1 }]); + Ke(() => { + d.includes(mt) ? w([ + { id: mt, desc: !1 }, + { id: st, desc: !1 } + ]) : w([{ id: st, desc: !1 }]); }, [d]); - const N = ei({ + const N = as({ data: f, columns: m, state: { @@ -2720,45 +2720,45 @@ function Am({ sorting: h, rowSelection: b }, - onGroupingChange: p, + onGroupingChange: u, onSortingChange: w, onRowSelectionChange: v, - getExpandedRowModel: hl(), - getGroupedRowModel: gl(), - getCoreRowModel: ti(), - getSortedRowModel: ni(), - getRowId: ra, + getExpandedRowModel: Cl(), + getGroupedRowModel: Sl(), + getCoreRowModel: ss(), + getSortedRowModel: is(), + getRowId: ca, autoResetExpanded: !1, enableMultiRowSelection: !1, enableSubRowSelection: !1 }); - at(() => { + Ke(() => { if (l) { - const C = N.getSelectedRowModel().rowsById, P = Object.keys(C); + const O = N.getSelectedRowModel().rowsById, P = Object.keys(O); if (P.length === 1) { - const k = f.find((B) => ra(B) === P[0]) || void 0; + const k = f.find((B) => ca(B) === P[0]) || void 0; k && l(k); } } }, [b, f, l, N]); - const I = o ?? Mc, O = a ?? Pi, E = [ + const A = o ?? Xc, _ = a ?? Is, E = [ { label: "No Grouping", value: [] }, - { label: `Group by ${I}`, value: [nt] }, - { label: `Group by ${O}`, value: [wt] }, + { label: `Group by ${A}`, value: [st] }, + { label: `Group by ${_}`, value: [mt] }, { - label: `Group by ${I} and ${O}`, - value: [nt, wt] + label: `Group by ${A} and ${_}`, + value: [st, mt] }, { - label: `Group by ${O} and ${I}`, - value: [wt, nt] - } - ], g = (C) => { - p(JSON.parse(C)); - }, _ = (C, P) => { - !C.getIsGrouped() && !C.getIsSelected() && C.getToggleSelectedHandler()(P); - }, L = (C, P) => C.getIsGrouped() ? "" : T("banded-row", P % 2 === 0 ? "even" : "odd"), H = (C, P, k) => { - if (!((C == null ? void 0 : C.length) === 0 || P.depth < k.column.getGroupedIndex())) { + label: `Group by ${_} and ${A}`, + value: [mt, st] + } + ], g = (O) => { + u(JSON.parse(O)); + }, I = (O, P) => { + !O.getIsGrouped() && !O.getIsSelected() && O.getToggleSelectedHandler()(P); + }, U = (O, P) => O.getIsGrouped() ? "" : C("banded-row", P % 2 === 0 ? "even" : "odd"), W = (O, P, k) => { + if (!((O == null ? void 0 : O.length) === 0 || P.depth < k.column.getGroupedIndex())) { if (P.getIsGrouped()) switch (P.depth) { case 1: @@ -2778,24 +2778,24 @@ function Am({ }; return /* @__PURE__ */ x("div", { className: "pr-twp tw-flex tw-h-full tw-w-full tw-flex-col", children: [ !t && /* @__PURE__ */ x( - fn, + yn, { value: JSON.stringify(d), - onValueChange: (C) => { - g(C); + onValueChange: (O) => { + g(O); }, children: [ - /* @__PURE__ */ s(Mt, { className: "tw-mb-1 tw-mt-2", children: /* @__PURE__ */ s(mn, {}) }), - /* @__PURE__ */ s(Bt, { position: "item-aligned", children: /* @__PURE__ */ s(hc, { children: E.map((C) => /* @__PURE__ */ s(Ue, { value: JSON.stringify(C.value), children: C.label }, C.label)) }) }) + /* @__PURE__ */ i(Ft, { className: "tw-mb-1 tw-mt-2", children: /* @__PURE__ */ i(xn, {}) }), + /* @__PURE__ */ i(zt, { position: "item-aligned", children: /* @__PURE__ */ i(Cc, { children: E.map((O) => /* @__PURE__ */ i(Xe, { value: JSON.stringify(O.value), children: O.label }, O.label)) }) }) ] } ), - /* @__PURE__ */ x(rr, { className: "tw-relative tw-flex tw-flex-col tw-overflow-y-auto tw-p-0", children: [ - t && /* @__PURE__ */ s(or, { children: N.getHeaderGroups().map((C) => /* @__PURE__ */ s(ot, { children: C.headers.filter((P) => P.column.columnDef.header).map((P) => ( + /* @__PURE__ */ x(_n, { className: "tw-relative tw-flex tw-flex-col tw-overflow-y-auto tw-p-0", children: [ + t && /* @__PURE__ */ i(Pn, { children: N.getHeaderGroups().map((O) => /* @__PURE__ */ i(We, { children: O.headers.filter((P) => P.column.columnDef.header).map((P) => ( /* For sticky column headers to work, we probably need to change the default definition of the shadcn Table component. See https://github.com/shadcn-ui/ui/issues/1151 */ - /* @__PURE__ */ s(hn, { colSpan: P.colSpan, className: "top-0 tw-sticky", children: P.isPlaceholder ? void 0 : /* @__PURE__ */ x("div", { children: [ - P.column.getCanGroup() ? /* @__PURE__ */ s( - me, + /* @__PURE__ */ i(je, { colSpan: P.colSpan, className: "top-0 tw-sticky", children: P.isPlaceholder ? void 0 : /* @__PURE__ */ x("div", { children: [ + P.column.getCanGroup() ? /* @__PURE__ */ i( + fe, { variant: "ghost", title: `Toggle grouping by ${P.column.columnDef.header}`, @@ -2805,53 +2805,53 @@ function Am({ } ) : void 0, " ", - sn(P.column.columnDef.header, P.getContext()) + pn(P.column.columnDef.header, P.getContext()) ] }) }, P.id) - )) }, C.id)) }), - /* @__PURE__ */ s(ar, { children: N.getRowModel().rows.map((C, P) => /* @__PURE__ */ s( - ot, + )) }, O.id)) }), + /* @__PURE__ */ i($n, { children: N.getRowModel().rows.map((O, P) => /* @__PURE__ */ i( + We, { - "data-state": C.getIsSelected() ? "selected" : "", - className: T(L(C, P)), - onClick: (k) => _(C, k), - children: C.getVisibleCells().map((k) => { - if (!(k.getIsPlaceholder() || k.column.columnDef.enableGrouping && !k.getIsGrouped() && (k.column.columnDef.id !== wt || !n))) - return /* @__PURE__ */ s( - jt, + "data-state": O.getIsSelected() ? "selected" : "", + className: C(U(O, P)), + onClick: (k) => I(O, k), + children: O.getVisibleCells().map((k) => { + if (!(k.getIsPlaceholder() || k.column.columnDef.enableGrouping && !k.getIsGrouped() && (k.column.columnDef.id !== mt || !n))) + return /* @__PURE__ */ i( + $e, { - className: T( + className: C( k.column.columnDef.id, "tw-p-[1px]", - H(d, C, k) + W(d, O, k) ), children: (() => k.getIsGrouped() ? /* @__PURE__ */ x( - me, + fe, { variant: "link", - onClick: C.getToggleExpandedHandler(), + onClick: O.getToggleExpandedHandler(), type: "button", children: [ - C.getIsExpanded() && /* @__PURE__ */ s(Qn, {}), - !C.getIsExpanded() && (c === "ltr" ? /* @__PURE__ */ s(Wa, {}) : /* @__PURE__ */ s(Qs, {})), + O.getIsExpanded() && /* @__PURE__ */ i(Vt, {}), + !O.getIsExpanded() && (c === "ltr" ? /* @__PURE__ */ i(ts, {}) : /* @__PURE__ */ i(sl, {})), " ", - sn(k.column.columnDef.cell, k.getContext()), + pn(k.column.columnDef.cell, k.getContext()), " (", - C.subRows.length, + O.subRows.length, ")" ] } - ) : sn(k.column.columnDef.cell, k.getContext()))() + ) : pn(k.column.columnDef.cell, k.getContext()))() }, k.id ); }) }, - C.id + O.id )) }) ] }) ] }); } -const Rr = { +const Ar = { [pe("undefined")]: "Ø", [pe(0)]: "A", [pe(1)]: "B", @@ -2880,55 +2880,55 @@ const Rr = { [pe(24)]: "Y", [pe(25)]: "Z" }; -function Dm({ +function zm({ availableScrollGroupIds: e, scrollGroupId: t, onChangeScrollGroupId: n, localizedStrings: r = {} }) { const o = { - ...Rr, + ...Ar, ...Object.fromEntries( Object.entries(r).map( - ([a, i]) => [ + ([a, s]) => [ a, - a === i && a in Rr ? Rr[a] : i + a === s && a in Ar ? Ar[a] : s ] ) ) }; return /* @__PURE__ */ x( - fn, + yn, { value: `${t}`, onValueChange: (a) => n( a === "undefined" ? void 0 : parseInt(a, 10) ), children: [ - /* @__PURE__ */ s(Mt, { className: "pr-twp tw-w-auto", children: /* @__PURE__ */ s( - mn, + /* @__PURE__ */ i(Ft, { className: "pr-twp tw-w-auto", children: /* @__PURE__ */ i( + xn, { placeholder: o[pe(t)] ?? t } ) }), - /* @__PURE__ */ s( - Bt, + /* @__PURE__ */ i( + zt, { style: { zIndex: 250 }, - children: e.map((a) => /* @__PURE__ */ s(Ue, { value: `${a}`, children: o[pe(a)] }, `${a}`)) + children: e.map((a) => /* @__PURE__ */ i(Xe, { value: `${a}`, children: o[pe(a)] }, `${a}`)) } ) ] } ); } -const _i = A.forwardRef(({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }, o) => /* @__PURE__ */ s( - oi.Root, +const As = M.forwardRef(({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }, o) => /* @__PURE__ */ i( + cs.Root, { ref: o, decorative: n, orientation: t, - className: T( + className: C( "pr-twp tw-shrink-0 tw-bg-border", t === "horizontal" ? "tw-h-[1px] tw-w-full" : "tw-h-full tw-w-[1px]", e @@ -2936,11 +2936,11 @@ const _i = A.forwardRef(({ className: e, orientation: t = "horizontal", decorati ...r } )); -_i.displayName = oi.Root.displayName; -function Mm({ children: e }) { - return /* @__PURE__ */ s("div", { className: "pr-twp tw-grid", children: e }); +As.displayName = cs.Root.displayName; +function Um({ children: e }) { + return /* @__PURE__ */ i("div", { className: "pr-twp tw-grid", children: e }); } -function Bm({ +function Gm({ primary: e, secondary: t, children: n, @@ -2949,26 +2949,26 @@ function Bm({ }) { return /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-justify-between tw-space-x-4 tw-py-2", children: [ /* @__PURE__ */ x("div", { children: [ - /* @__PURE__ */ s("p", { className: "tw-text-sm tw-font-medium tw-leading-none", children: e }), - /* @__PURE__ */ s("p", { className: "tw-whitespace-normal tw-break-words tw-text-sm tw-text-muted-foreground", children: t }) + /* @__PURE__ */ i("p", { className: "tw-text-sm tw-font-medium tw-leading-none", children: e }), + /* @__PURE__ */ i("p", { className: "tw-whitespace-normal tw-break-words tw-text-sm tw-text-muted-foreground", children: t }) ] }), - r ? /* @__PURE__ */ s("p", { className: "tw-text-sm tw-text-muted-foreground", children: o }) : /* @__PURE__ */ s("div", { children: n }) + r ? /* @__PURE__ */ i("p", { className: "tw-text-sm tw-text-muted-foreground", children: o }) : /* @__PURE__ */ i("div", { children: n }) ] }); } -function jm({ +function Hm({ primary: e, secondary: t, includeSeparator: n = !1 }) { return /* @__PURE__ */ x("div", { className: "tw-space-y-4 tw-py-2", children: [ /* @__PURE__ */ x("div", { children: [ - /* @__PURE__ */ s("h3", { className: "tw-text-lg tw-font-medium", children: e }), - /* @__PURE__ */ s("p", { className: "tw-text-sm tw-text-muted-foreground", children: t }) + /* @__PURE__ */ i("h3", { className: "tw-text-lg tw-font-medium", children: e }), + /* @__PURE__ */ i("p", { className: "tw-text-sm tw-text-muted-foreground", children: t }) ] }), - n ? /* @__PURE__ */ s(_i, {}) : "" + n ? /* @__PURE__ */ i(As, {}) : "" ] }); } -function Vm({ +function Xm({ id: e, className: t, listItems: n, @@ -2976,22 +2976,22 @@ function Vm({ handleSelectListItem: o, createLabel: a }) { - return /* @__PURE__ */ s("div", { id: e, className: t, children: n.map((i) => /* @__PURE__ */ x("div", { className: "tw-m-2 tw-flex tw-items-center", children: [ - /* @__PURE__ */ s( - fo, + return /* @__PURE__ */ i("div", { id: e, className: t, children: n.map((s) => /* @__PURE__ */ x("div", { className: "tw-m-2 tw-flex tw-items-center", children: [ + /* @__PURE__ */ i( + yo, { className: "tw-mr-2 tw-align-middle", - checked: r.includes(i), - onCheckedChange: (l) => o(i, l) + checked: r.includes(s), + onCheckedChange: (l) => o(s, l) } ), - /* @__PURE__ */ s(He, { children: a ? a(i) : i }) - ] }, i)) }); + /* @__PURE__ */ i(De, { children: a ? a(s) : s }) + ] }, s)) }); } -function Lc(e) { +function Kc(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } -function zc(e) { +function Jc(e) { if (e.__esModule) return e; var t = e.default; @@ -3012,7 +3012,7 @@ function zc(e) { }); }), n; } -var mo = {}, $i = { exports: {} }; +var xo = {}, Ds = { exports: {} }; (function(e) { function t(n) { return n && n.__esModule ? n : { @@ -3020,46 +3020,46 @@ var mo = {}, $i = { exports: {} }; }; } e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports; -})($i); -var Fc = $i.exports, Pr = {}; -function ho(e, t) { +})(Ds); +var Zc = Ds.exports, Dr = {}; +function No(e, t) { return process.env.NODE_ENV === "production" ? () => null : function(...r) { return e(...r) || t(...r); }; } -function R() { - return R = Object.assign ? Object.assign.bind() : function(e) { +function $() { + return $ = Object.assign ? Object.assign.bind() : function(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]); } return e; - }, R.apply(this, arguments); + }, $.apply(this, arguments); } -function ht(e) { +function bt(e) { if (typeof e != "object" || e === null) return !1; const t = Object.getPrototypeOf(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); } -function Ii(e) { - if (!ht(e)) +function Ms(e) { + if (!bt(e)) return e; const t = {}; return Object.keys(e).forEach((n) => { - t[n] = Ii(e[n]); + t[n] = Ms(e[n]); }), t; } -function Ze(e, t, n = { +function nt(e, t, n = { clone: !0 }) { - const r = n.clone ? R({}, e) : e; - return ht(e) && ht(t) && Object.keys(t).forEach((o) => { - o !== "__proto__" && (ht(t[o]) && o in e && ht(e[o]) ? r[o] = Ze(e[o], t[o], n) : n.clone ? r[o] = ht(t[o]) ? Ii(t[o]) : t[o] : r[o] = t[o]); + const r = n.clone ? $({}, e) : e; + return bt(e) && bt(t) && Object.keys(t).forEach((o) => { + o !== "__proto__" && (bt(t[o]) && o in e && bt(e[o]) ? r[o] = nt(e[o], t[o], n) : n.clone ? r[o] = bt(t[o]) ? Ms(t[o]) : t[o] : r[o] = t[o]); }), r; } -var Hr = { exports: {} }, Bn = { exports: {} }, ie = {}; +var Zr = { exports: {} }, Gn = { exports: {} }, le = {}; /** @license React v16.13.1 * react-is.production.min.js * @@ -3068,16 +3068,16 @@ var Hr = { exports: {} }, Bn = { exports: {} }, ie = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var oa; -function Uc() { - if (oa) - return ie; - oa = 1; - var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, m = e ? Symbol.for("react.fundamental") : 60117, N = e ? Symbol.for("react.responder") : 60118, I = e ? Symbol.for("react.scope") : 60119; - function O(g) { +var da; +function Qc() { + if (da) + return le; + da = 1; + var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, m = e ? Symbol.for("react.fundamental") : 60117, N = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119; + function _(g) { if (typeof g == "object" && g !== null) { - var _ = g.$$typeof; - switch (_) { + var I = g.$$typeof; + switch (I) { case t: switch (g = g.type, g) { case c: @@ -3090,52 +3090,52 @@ function Uc() { default: switch (g = g && g.$$typeof, g) { case l: - case p: + case u: case v: case b: - case i: + case s: return g; default: - return _; + return I; } } case n: - return _; + return I; } } } function E(g) { - return O(g) === d; - } - return ie.AsyncMode = c, ie.ConcurrentMode = d, ie.ContextConsumer = l, ie.ContextProvider = i, ie.Element = t, ie.ForwardRef = p, ie.Fragment = r, ie.Lazy = v, ie.Memo = b, ie.Portal = n, ie.Profiler = a, ie.StrictMode = o, ie.Suspense = h, ie.isAsyncMode = function(g) { - return E(g) || O(g) === c; - }, ie.isConcurrentMode = E, ie.isContextConsumer = function(g) { - return O(g) === l; - }, ie.isContextProvider = function(g) { - return O(g) === i; - }, ie.isElement = function(g) { + return _(g) === d; + } + return le.AsyncMode = c, le.ConcurrentMode = d, le.ContextConsumer = l, le.ContextProvider = s, le.Element = t, le.ForwardRef = u, le.Fragment = r, le.Lazy = v, le.Memo = b, le.Portal = n, le.Profiler = a, le.StrictMode = o, le.Suspense = h, le.isAsyncMode = function(g) { + return E(g) || _(g) === c; + }, le.isConcurrentMode = E, le.isContextConsumer = function(g) { + return _(g) === l; + }, le.isContextProvider = function(g) { + return _(g) === s; + }, le.isElement = function(g) { return typeof g == "object" && g !== null && g.$$typeof === t; - }, ie.isForwardRef = function(g) { - return O(g) === p; - }, ie.isFragment = function(g) { - return O(g) === r; - }, ie.isLazy = function(g) { - return O(g) === v; - }, ie.isMemo = function(g) { - return O(g) === b; - }, ie.isPortal = function(g) { - return O(g) === n; - }, ie.isProfiler = function(g) { - return O(g) === a; - }, ie.isStrictMode = function(g) { - return O(g) === o; - }, ie.isSuspense = function(g) { - return O(g) === h; - }, ie.isValidElementType = function(g) { - return typeof g == "string" || typeof g == "function" || g === r || g === d || g === a || g === o || g === h || g === w || typeof g == "object" && g !== null && (g.$$typeof === v || g.$$typeof === b || g.$$typeof === i || g.$$typeof === l || g.$$typeof === p || g.$$typeof === m || g.$$typeof === N || g.$$typeof === I || g.$$typeof === f); - }, ie.typeOf = O, ie; -} -var se = {}; + }, le.isForwardRef = function(g) { + return _(g) === u; + }, le.isFragment = function(g) { + return _(g) === r; + }, le.isLazy = function(g) { + return _(g) === v; + }, le.isMemo = function(g) { + return _(g) === b; + }, le.isPortal = function(g) { + return _(g) === n; + }, le.isProfiler = function(g) { + return _(g) === a; + }, le.isStrictMode = function(g) { + return _(g) === o; + }, le.isSuspense = function(g) { + return _(g) === h; + }, le.isValidElementType = function(g) { + return typeof g == "string" || typeof g == "function" || g === r || g === d || g === a || g === o || g === h || g === w || typeof g == "object" && g !== null && (g.$$typeof === v || g.$$typeof === b || g.$$typeof === s || g.$$typeof === l || g.$$typeof === u || g.$$typeof === m || g.$$typeof === N || g.$$typeof === A || g.$$typeof === f); + }, le.typeOf = _, le; +} +var ce = {}; /** @license React v16.13.1 * react-is.development.js * @@ -3144,103 +3144,103 @@ var se = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var aa; -function Gc() { - return aa || (aa = 1, process.env.NODE_ENV !== "production" && function() { - var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, m = e ? Symbol.for("react.fundamental") : 60117, N = e ? Symbol.for("react.responder") : 60118, I = e ? Symbol.for("react.scope") : 60119; - function O($) { - return typeof $ == "string" || typeof $ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - $ === r || $ === d || $ === a || $ === o || $ === h || $ === w || typeof $ == "object" && $ !== null && ($.$$typeof === v || $.$$typeof === b || $.$$typeof === i || $.$$typeof === l || $.$$typeof === p || $.$$typeof === m || $.$$typeof === N || $.$$typeof === I || $.$$typeof === f); - } - function E($) { - if (typeof $ == "object" && $ !== null) { - var xe = $.$$typeof; - switch (xe) { +var ua; +function ed() { + return ua || (ua = 1, process.env.NODE_ENV !== "production" && function() { + var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, m = e ? Symbol.for("react.fundamental") : 60117, N = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119; + function _(T) { + return typeof T == "string" || typeof T == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + T === r || T === d || T === a || T === o || T === h || T === w || typeof T == "object" && T !== null && (T.$$typeof === v || T.$$typeof === b || T.$$typeof === s || T.$$typeof === l || T.$$typeof === u || T.$$typeof === m || T.$$typeof === N || T.$$typeof === A || T.$$typeof === f); + } + function E(T) { + if (typeof T == "object" && T !== null) { + var we = T.$$typeof; + switch (we) { case t: - var j = $.type; - switch (j) { + var V = T.type; + switch (V) { case c: case d: case r: case a: case o: case h: - return j; + return V; default: - var ye = j && j.$$typeof; - switch (ye) { + var xe = V && V.$$typeof; + switch (xe) { case l: - case p: + case u: case v: case b: - case i: - return ye; - default: + case s: return xe; + default: + return we; } } case n: - return xe; + return we; } } } - var g = c, _ = d, L = l, H = i, C = t, P = p, k = r, B = v, D = b, J = n, q = a, U = o, ee = h, ae = !1; - function re($) { - return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), y($) || E($) === c; + var g = c, I = d, U = l, W = s, O = t, P = u, k = r, B = v, D = b, Q = n, J = a, X = o, ee = h, re = !1; + function oe(T) { + return re || (re = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), y(T) || E(T) === c; } - function y($) { - return E($) === d; + function y(T) { + return E(T) === d; } - function S($) { - return E($) === l; + function R(T) { + return E(T) === l; } - function z($) { - return E($) === i; + function H(T) { + return E(T) === s; } - function F($) { - return typeof $ == "object" && $ !== null && $.$$typeof === t; + function G(T) { + return typeof T == "object" && T !== null && T.$$typeof === t; } - function V($) { - return E($) === p; + function z(T) { + return E(T) === u; } - function W($) { - return E($) === r; + function q(T) { + return E(T) === r; } - function X($) { - return E($) === v; + function L(T) { + return E(T) === v; } - function Y($) { - return E($) === b; + function K(T) { + return E(T) === b; } - function G($) { - return E($) === n; + function Y(T) { + return E(T) === n; } - function K($) { - return E($) === a; + function Z(T) { + return E(T) === a; } - function Z($) { - return E($) === o; + function S(T) { + return E(T) === o; } - function de($) { - return E($) === h; + function F(T) { + return E(T) === h; } - se.AsyncMode = g, se.ConcurrentMode = _, se.ContextConsumer = L, se.ContextProvider = H, se.Element = C, se.ForwardRef = P, se.Fragment = k, se.Lazy = B, se.Memo = D, se.Portal = J, se.Profiler = q, se.StrictMode = U, se.Suspense = ee, se.isAsyncMode = re, se.isConcurrentMode = y, se.isContextConsumer = S, se.isContextProvider = z, se.isElement = F, se.isForwardRef = V, se.isFragment = W, se.isLazy = X, se.isMemo = Y, se.isPortal = G, se.isProfiler = K, se.isStrictMode = Z, se.isSuspense = de, se.isValidElementType = O, se.typeOf = E; - }()), se; + ce.AsyncMode = g, ce.ConcurrentMode = I, ce.ContextConsumer = U, ce.ContextProvider = W, ce.Element = O, ce.ForwardRef = P, ce.Fragment = k, ce.Lazy = B, ce.Memo = D, ce.Portal = Q, ce.Profiler = J, ce.StrictMode = X, ce.Suspense = ee, ce.isAsyncMode = oe, ce.isConcurrentMode = y, ce.isContextConsumer = R, ce.isContextProvider = H, ce.isElement = G, ce.isForwardRef = z, ce.isFragment = q, ce.isLazy = L, ce.isMemo = K, ce.isPortal = Y, ce.isProfiler = Z, ce.isStrictMode = S, ce.isSuspense = F, ce.isValidElementType = _, ce.typeOf = E; + }()), ce; } -var ia; -function Ai() { - return ia || (ia = 1, process.env.NODE_ENV === "production" ? Bn.exports = Uc() : Bn.exports = Gc()), Bn.exports; +var pa; +function Bs() { + return pa || (pa = 1, process.env.NODE_ENV === "production" ? Gn.exports = Qc() : Gn.exports = ed()), Gn.exports; } /* object-assign (c) Sindre Sorhus @license MIT */ -var _r, sa; -function Hc() { - if (sa) - return _r; - sa = 1; +var Mr, wa; +function td() { + if (wa) + return Mr; + wa = 1; var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable; function r(a) { if (a == null) @@ -3254,24 +3254,24 @@ function Hc() { var a = new String("abc"); if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5") return !1; - for (var i = {}, l = 0; l < 10; l++) - i["_" + String.fromCharCode(l)] = l; - var c = Object.getOwnPropertyNames(i).map(function(p) { - return i[p]; + for (var s = {}, l = 0; l < 10; l++) + s["_" + String.fromCharCode(l)] = l; + var c = Object.getOwnPropertyNames(s).map(function(u) { + return s[u]; }); if (c.join("") !== "0123456789") return !1; var d = {}; - return "abcdefghijklmnopqrst".split("").forEach(function(p) { - d[p] = p; + return "abcdefghijklmnopqrst".split("").forEach(function(u) { + d[u] = u; }), Object.keys(Object.assign({}, d)).join("") === "abcdefghijklmnopqrst"; } catch { return !1; } } - return _r = o() ? Object.assign : function(a, i) { - for (var l, c = r(a), d, p = 1; p < arguments.length; p++) { - l = Object(arguments[p]); + return Mr = o() ? Object.assign : function(a, s) { + for (var l, c = r(a), d, u = 1; u < arguments.length; u++) { + l = Object(arguments[u]); for (var h in l) t.call(l, h) && (c[h] = l[h]); if (e) { @@ -3281,56 +3281,56 @@ function Hc() { } } return c; - }, _r; + }, Mr; } -var $r, la; -function go() { - if (la) - return $r; - la = 1; +var Br, fa; +function ko() { + if (fa) + return Br; + fa = 1; var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; - return $r = e, $r; + return Br = e, Br; } -var Ir, ca; -function Di() { - return ca || (ca = 1, Ir = Function.call.bind(Object.prototype.hasOwnProperty)), Ir; +var jr, ma; +function js() { + return ma || (ma = 1, jr = Function.call.bind(Object.prototype.hasOwnProperty)), jr; } -var Ar, da; -function Xc() { - if (da) - return Ar; - da = 1; +var Vr, ha; +function nd() { + if (ha) + return Vr; + ha = 1; var e = function() { }; if (process.env.NODE_ENV !== "production") { - var t = go(), n = {}, r = Di(); + var t = ko(), n = {}, r = js(); e = function(a) { - var i = "Warning: " + a; - typeof console < "u" && console.error(i); + var s = "Warning: " + a; + typeof console < "u" && console.error(s); try { - throw new Error(i); + throw new Error(s); } catch { } }; } - function o(a, i, l, c, d) { + function o(a, s, l, c, d) { if (process.env.NODE_ENV !== "production") { - for (var p in a) - if (r(a, p)) { + for (var u in a) + if (r(a, u)) { var h; try { - if (typeof a[p] != "function") { + if (typeof a[u] != "function") { var w = Error( - (c || "React class") + ": " + l + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." + (c || "React class") + ": " + l + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); throw w.name = "Invariant Violation", w; } - h = a[p](i, p, c, l, null, t); + h = a[u](s, u, c, l, null, t); } catch (v) { h = v; } if (h && !(h instanceof Error) && e( - (c || "React class") + ": type specification of " + l + " `" + p + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." + (c || "React class") + ": type specification of " + l + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." ), h instanceof Error && !(h.message in n)) { n[h.message] = !0; var b = d ? d() : ""; @@ -3343,14 +3343,14 @@ function Xc() { } return o.resetWarningCache = function() { process.env.NODE_ENV !== "production" && (n = {}); - }, Ar = o, Ar; -} -var Dr, pa; -function Yc() { - if (pa) - return Dr; - pa = 1; - var e = Ai(), t = Hc(), n = go(), r = Di(), o = Xc(), a = function() { + }, Vr = o, Vr; +} +var Lr, ga; +function rd() { + if (ga) + return Lr; + ga = 1; + var e = Bs(), t = td(), n = ko(), r = js(), o = nd(), a = function() { }; process.env.NODE_ENV !== "production" && (a = function(l) { var c = "Warning: " + l; @@ -3360,15 +3360,15 @@ function Yc() { } catch { } }); - function i() { + function s() { return null; } - return Dr = function(l, c) { - var d = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator"; + return Lr = function(l, c) { + var d = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator"; function h(y) { - var S = y && (d && y[d] || y[p]); - if (typeof S == "function") - return S; + var R = y && (d && y[d] || y[u]); + if (typeof R == "function") + return R; } var w = "<>", b = { array: N("array"), @@ -3379,223 +3379,223 @@ function Yc() { object: N("object"), string: N("string"), symbol: N("symbol"), - any: I(), - arrayOf: O, + any: A(), + arrayOf: _, element: E(), elementType: g(), - instanceOf: _, + instanceOf: I, node: P(), - objectOf: H, - oneOf: L, - oneOfType: C, + objectOf: W, + oneOf: U, + oneOfType: O, shape: B, exact: D }; - function v(y, S) { - return y === S ? y !== 0 || 1 / y === 1 / S : y !== y && S !== S; + function v(y, R) { + return y === R ? y !== 0 || 1 / y === 1 / R : y !== y && R !== R; } - function f(y, S) { - this.message = y, this.data = S && typeof S == "object" ? S : {}, this.stack = ""; + function f(y, R) { + this.message = y, this.data = R && typeof R == "object" ? R : {}, this.stack = ""; } f.prototype = Error.prototype; function m(y) { if (process.env.NODE_ENV !== "production") - var S = {}, z = 0; - function F(W, X, Y, G, K, Z, de) { - if (G = G || w, Z = Z || Y, de !== n) { + var R = {}, H = 0; + function G(q, L, K, Y, Z, S, F) { + if (Y = Y || w, S = S || K, F !== n) { if (c) { - var $ = new Error( + var T = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types" ); - throw $.name = "Invariant Violation", $; + throw T.name = "Invariant Violation", T; } else if (process.env.NODE_ENV !== "production" && typeof console < "u") { - var xe = G + ":" + Y; - !S[xe] && // Avoid spamming the console because they are often not actionable except for lib authors - z < 3 && (a( - "You are manually calling a React.PropTypes validation function for the `" + Z + "` prop on `" + G + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details." - ), S[xe] = !0, z++); + var we = Y + ":" + K; + !R[we] && // Avoid spamming the console because they are often not actionable except for lib authors + H < 3 && (a( + "You are manually calling a React.PropTypes validation function for the `" + S + "` prop on `" + Y + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details." + ), R[we] = !0, H++); } } - return X[Y] == null ? W ? X[Y] === null ? new f("The " + K + " `" + Z + "` is marked as required " + ("in `" + G + "`, but its value is `null`.")) : new f("The " + K + " `" + Z + "` is marked as required in " + ("`" + G + "`, but its value is `undefined`.")) : null : y(X, Y, G, K, Z); + return L[K] == null ? q ? L[K] === null ? new f("The " + Z + " `" + S + "` is marked as required " + ("in `" + Y + "`, but its value is `null`.")) : new f("The " + Z + " `" + S + "` is marked as required in " + ("`" + Y + "`, but its value is `undefined`.")) : null : y(L, K, Y, Z, S); } - var V = F.bind(null, !1); - return V.isRequired = F.bind(null, !0), V; + var z = G.bind(null, !1); + return z.isRequired = G.bind(null, !0), z; } function N(y) { - function S(z, F, V, W, X, Y) { - var G = z[F], K = U(G); - if (K !== y) { - var Z = ee(G); + function R(H, G, z, q, L, K) { + var Y = H[G], Z = X(Y); + if (Z !== y) { + var S = ee(Y); return new f( - "Invalid " + W + " `" + X + "` of type " + ("`" + Z + "` supplied to `" + V + "`, expected ") + ("`" + y + "`."), + "Invalid " + q + " `" + L + "` of type " + ("`" + S + "` supplied to `" + z + "`, expected ") + ("`" + y + "`."), { expectedType: y } ); } return null; } - return m(S); + return m(R); } - function I() { - return m(i); + function A() { + return m(s); } - function O(y) { - function S(z, F, V, W, X) { + function _(y) { + function R(H, G, z, q, L) { if (typeof y != "function") - return new f("Property `" + X + "` of component `" + V + "` has invalid PropType notation inside arrayOf."); - var Y = z[F]; - if (!Array.isArray(Y)) { - var G = U(Y); - return new f("Invalid " + W + " `" + X + "` of type " + ("`" + G + "` supplied to `" + V + "`, expected an array.")); + return new f("Property `" + L + "` of component `" + z + "` has invalid PropType notation inside arrayOf."); + var K = H[G]; + if (!Array.isArray(K)) { + var Y = X(K); + return new f("Invalid " + q + " `" + L + "` of type " + ("`" + Y + "` supplied to `" + z + "`, expected an array.")); } - for (var K = 0; K < Y.length; K++) { - var Z = y(Y, K, V, W, X + "[" + K + "]", n); - if (Z instanceof Error) - return Z; + for (var Z = 0; Z < K.length; Z++) { + var S = y(K, Z, z, q, L + "[" + Z + "]", n); + if (S instanceof Error) + return S; } return null; } - return m(S); + return m(R); } function E() { - function y(S, z, F, V, W) { - var X = S[z]; - if (!l(X)) { - var Y = U(X); - return new f("Invalid " + V + " `" + W + "` of type " + ("`" + Y + "` supplied to `" + F + "`, expected a single ReactElement.")); + function y(R, H, G, z, q) { + var L = R[H]; + if (!l(L)) { + var K = X(L); + return new f("Invalid " + z + " `" + q + "` of type " + ("`" + K + "` supplied to `" + G + "`, expected a single ReactElement.")); } return null; } return m(y); } function g() { - function y(S, z, F, V, W) { - var X = S[z]; - if (!e.isValidElementType(X)) { - var Y = U(X); - return new f("Invalid " + V + " `" + W + "` of type " + ("`" + Y + "` supplied to `" + F + "`, expected a single ReactElement type.")); + function y(R, H, G, z, q) { + var L = R[H]; + if (!e.isValidElementType(L)) { + var K = X(L); + return new f("Invalid " + z + " `" + q + "` of type " + ("`" + K + "` supplied to `" + G + "`, expected a single ReactElement type.")); } return null; } return m(y); } - function _(y) { - function S(z, F, V, W, X) { - if (!(z[F] instanceof y)) { - var Y = y.name || w, G = re(z[F]); - return new f("Invalid " + W + " `" + X + "` of type " + ("`" + G + "` supplied to `" + V + "`, expected ") + ("instance of `" + Y + "`.")); + function I(y) { + function R(H, G, z, q, L) { + if (!(H[G] instanceof y)) { + var K = y.name || w, Y = oe(H[G]); + return new f("Invalid " + q + " `" + L + "` of type " + ("`" + Y + "` supplied to `" + z + "`, expected ") + ("instance of `" + K + "`.")); } return null; } - return m(S); + return m(R); } - function L(y) { + function U(y) { if (!Array.isArray(y)) return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a( "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])." - ) : a("Invalid argument supplied to oneOf, expected an array.")), i; - function S(z, F, V, W, X) { - for (var Y = z[F], G = 0; G < y.length; G++) - if (v(Y, y[G])) + ) : a("Invalid argument supplied to oneOf, expected an array.")), s; + function R(H, G, z, q, L) { + for (var K = H[G], Y = 0; Y < y.length; Y++) + if (v(K, y[Y])) return null; - var K = JSON.stringify(y, function(de, $) { - var xe = ee($); - return xe === "symbol" ? String($) : $; + var Z = JSON.stringify(y, function(F, T) { + var we = ee(T); + return we === "symbol" ? String(T) : T; }); - return new f("Invalid " + W + " `" + X + "` of value `" + String(Y) + "` " + ("supplied to `" + V + "`, expected one of " + K + ".")); + return new f("Invalid " + q + " `" + L + "` of value `" + String(K) + "` " + ("supplied to `" + z + "`, expected one of " + Z + ".")); } - return m(S); + return m(R); } - function H(y) { - function S(z, F, V, W, X) { + function W(y) { + function R(H, G, z, q, L) { if (typeof y != "function") - return new f("Property `" + X + "` of component `" + V + "` has invalid PropType notation inside objectOf."); - var Y = z[F], G = U(Y); - if (G !== "object") - return new f("Invalid " + W + " `" + X + "` of type " + ("`" + G + "` supplied to `" + V + "`, expected an object.")); - for (var K in Y) - if (r(Y, K)) { - var Z = y(Y, K, V, W, X + "." + K, n); - if (Z instanceof Error) - return Z; + return new f("Property `" + L + "` of component `" + z + "` has invalid PropType notation inside objectOf."); + var K = H[G], Y = X(K); + if (Y !== "object") + return new f("Invalid " + q + " `" + L + "` of type " + ("`" + Y + "` supplied to `" + z + "`, expected an object.")); + for (var Z in K) + if (r(K, Z)) { + var S = y(K, Z, z, q, L + "." + Z, n); + if (S instanceof Error) + return S; } return null; } - return m(S); + return m(R); } - function C(y) { + function O(y) { if (!Array.isArray(y)) - return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), i; - for (var S = 0; S < y.length; S++) { - var z = y[S]; - if (typeof z != "function") + return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), s; + for (var R = 0; R < y.length; R++) { + var H = y[R]; + if (typeof H != "function") return a( - "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(z) + " at index " + S + "." - ), i; + "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + re(H) + " at index " + R + "." + ), s; } - function F(V, W, X, Y, G) { - for (var K = [], Z = 0; Z < y.length; Z++) { - var de = y[Z], $ = de(V, W, X, Y, G, n); - if ($ == null) + function G(z, q, L, K, Y) { + for (var Z = [], S = 0; S < y.length; S++) { + var F = y[S], T = F(z, q, L, K, Y, n); + if (T == null) return null; - $.data && r($.data, "expectedType") && K.push($.data.expectedType); + T.data && r(T.data, "expectedType") && Z.push(T.data.expectedType); } - var xe = K.length > 0 ? ", expected one of type [" + K.join(", ") + "]" : ""; - return new f("Invalid " + Y + " `" + G + "` supplied to " + ("`" + X + "`" + xe + ".")); + var we = Z.length > 0 ? ", expected one of type [" + Z.join(", ") + "]" : ""; + return new f("Invalid " + K + " `" + Y + "` supplied to " + ("`" + L + "`" + we + ".")); } - return m(F); + return m(G); } function P() { - function y(S, z, F, V, W) { - return J(S[z]) ? null : new f("Invalid " + V + " `" + W + "` supplied to " + ("`" + F + "`, expected a ReactNode.")); + function y(R, H, G, z, q) { + return Q(R[H]) ? null : new f("Invalid " + z + " `" + q + "` supplied to " + ("`" + G + "`, expected a ReactNode.")); } return m(y); } - function k(y, S, z, F, V) { + function k(y, R, H, G, z) { return new f( - (y || "React class") + ": " + S + " type `" + z + "." + F + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + V + "`." + (y || "React class") + ": " + R + " type `" + H + "." + G + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + z + "`." ); } function B(y) { - function S(z, F, V, W, X) { - var Y = z[F], G = U(Y); - if (G !== "object") - return new f("Invalid " + W + " `" + X + "` of type `" + G + "` " + ("supplied to `" + V + "`, expected `object`.")); - for (var K in y) { - var Z = y[K]; - if (typeof Z != "function") - return k(V, W, X, K, ee(Z)); - var de = Z(Y, K, V, W, X + "." + K, n); - if (de) - return de; + function R(H, G, z, q, L) { + var K = H[G], Y = X(K); + if (Y !== "object") + return new f("Invalid " + q + " `" + L + "` of type `" + Y + "` " + ("supplied to `" + z + "`, expected `object`.")); + for (var Z in y) { + var S = y[Z]; + if (typeof S != "function") + return k(z, q, L, Z, ee(S)); + var F = S(K, Z, z, q, L + "." + Z, n); + if (F) + return F; } return null; } - return m(S); + return m(R); } function D(y) { - function S(z, F, V, W, X) { - var Y = z[F], G = U(Y); - if (G !== "object") - return new f("Invalid " + W + " `" + X + "` of type `" + G + "` " + ("supplied to `" + V + "`, expected `object`.")); - var K = t({}, z[F], y); - for (var Z in K) { - var de = y[Z]; - if (r(y, Z) && typeof de != "function") - return k(V, W, X, Z, ee(de)); - if (!de) + function R(H, G, z, q, L) { + var K = H[G], Y = X(K); + if (Y !== "object") + return new f("Invalid " + q + " `" + L + "` of type `" + Y + "` " + ("supplied to `" + z + "`, expected `object`.")); + var Z = t({}, H[G], y); + for (var S in Z) { + var F = y[S]; + if (r(y, S) && typeof F != "function") + return k(z, q, L, S, ee(F)); + if (!F) return new f( - "Invalid " + W + " `" + X + "` key `" + Z + "` supplied to `" + V + "`.\nBad object: " + JSON.stringify(z[F], null, " ") + ` + "Invalid " + q + " `" + L + "` key `" + S + "` supplied to `" + z + "`.\nBad object: " + JSON.stringify(H[G], null, " ") + ` Valid keys: ` + JSON.stringify(Object.keys(y), null, " ") ); - var $ = de(Y, Z, V, W, X + "." + Z, n); - if ($) - return $; + var T = F(K, S, z, q, L + "." + S, n); + if (T) + return T; } return null; } - return m(S); + return m(R); } - function J(y) { + function Q(y) { switch (typeof y) { case "number": case "string": @@ -3605,20 +3605,20 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ") return !y; case "object": if (Array.isArray(y)) - return y.every(J); + return y.every(Q); if (y === null || l(y)) return !0; - var S = h(y); - if (S) { - var z = S.call(y), F; - if (S !== y.entries) { - for (; !(F = z.next()).done; ) - if (!J(F.value)) + var R = h(y); + if (R) { + var H = R.call(y), G; + if (R !== y.entries) { + for (; !(G = H.next()).done; ) + if (!Q(G.value)) return !1; } else - for (; !(F = z.next()).done; ) { - var V = F.value; - if (V && !J(V[1])) + for (; !(G = H.next()).done; ) { + var z = G.value; + if (z && !Q(z[1])) return !1; } } else @@ -3628,57 +3628,57 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ") return !1; } } - function q(y, S) { - return y === "symbol" ? !0 : S ? S["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && S instanceof Symbol : !1; + function J(y, R) { + return y === "symbol" ? !0 : R ? R["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && R instanceof Symbol : !1; } - function U(y) { - var S = typeof y; - return Array.isArray(y) ? "array" : y instanceof RegExp ? "object" : q(S, y) ? "symbol" : S; + function X(y) { + var R = typeof y; + return Array.isArray(y) ? "array" : y instanceof RegExp ? "object" : J(R, y) ? "symbol" : R; } function ee(y) { if (typeof y > "u" || y === null) return "" + y; - var S = U(y); - if (S === "object") { + var R = X(y); + if (R === "object") { if (y instanceof Date) return "date"; if (y instanceof RegExp) return "regexp"; } - return S; + return R; } - function ae(y) { - var S = ee(y); - switch (S) { + function re(y) { + var R = ee(y); + switch (R) { case "array": case "object": - return "an " + S; + return "an " + R; case "boolean": case "date": case "regexp": - return "a " + S; + return "a " + R; default: - return S; + return R; } } - function re(y) { + function oe(y) { return !y.constructor || !y.constructor.name ? w : y.constructor.name; } return b.checkPropTypes = o, b.resetWarningCache = o.resetWarningCache, b.PropTypes = b, b; - }, Dr; -} -var Mr, ua; -function Wc() { - if (ua) - return Mr; - ua = 1; - var e = go(); + }, Lr; +} +var Fr, ba; +function od() { + if (ba) + return Fr; + ba = 1; + var e = ko(); function t() { } function n() { } - return n.resetWarningCache = t, Mr = function() { - function r(i, l, c, d, p, h) { + return n.resetWarningCache = t, Fr = function() { + function r(s, l, c, d, u, h) { if (h !== e) { var w = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" @@ -3714,23 +3714,23 @@ function Wc() { resetWarningCache: t }; return a.PropTypes = a, a; - }, Mr; + }, Fr; } if (process.env.NODE_ENV !== "production") { - var qc = Ai(), Kc = !0; - Hr.exports = Yc()(qc.isElement, Kc); + var ad = Bs(), sd = !0; + Zr.exports = rd()(ad.isElement, sd); } else - Hr.exports = Wc()(); -var Jc = Hr.exports; -const u = /* @__PURE__ */ Lc(Jc); -function Zc(e) { + Zr.exports = od()(); +var id = Zr.exports; +const p = /* @__PURE__ */ Kc(id); +function ld(e) { const { prototype: t = {} } = e; return !!t.isReactComponent; } -function Mi(e, t, n, r, o) { - const a = e[t], i = o || t; +function Vs(e, t, n, r, o) { + const a = e[t], s = o || t; if (a == null || // When server-side rendering React doesn't warn either. // This is not an accurate check for SSR. // This is only in place for Emotion compat. @@ -3739,26 +3739,26 @@ function Mi(e, t, n, r, o) { return null; let l; const c = a.type; - return typeof c == "function" && !Zc(c) && (l = "Did you accidentally use a plain function component for an element instead?"), l !== void 0 ? new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null; -} -const Bi = ho(u.element, Mi); -Bi.isRequired = ho(u.element.isRequired, Mi); -const ji = Bi, Qc = "exact-prop: ​"; -function ed(e) { - return process.env.NODE_ENV === "production" ? e : R({}, e, { - [Qc]: (t) => { + return typeof c == "function" && !ld(c) && (l = "Did you accidentally use a plain function component for an element instead?"), l !== void 0 ? new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null; +} +const Ls = No(p.element, Vs); +Ls.isRequired = No(p.element.isRequired, Vs); +const Fs = Ls, cd = "exact-prop: ​"; +function dd(e) { + return process.env.NODE_ENV === "production" ? e : $({}, e, { + [cd]: (t) => { const n = Object.keys(t).filter((r) => !e.hasOwnProperty(r)); return n.length > 0 ? new Error(`The following props are not supported: ${n.map((r) => `\`${r}\``).join(", ")}. Please remove them.`) : null; } }); } -function Vt(e) { +function Ut(e) { let t = "https://mui.com/production-error/?code=" + e; for (let n = 1; n < arguments.length; n += 1) t += "&args[]=" + encodeURIComponent(arguments[n]); return "Minified MUI error #" + e + "; visit " + t + " for the full message."; } -var Xr = { exports: {} }, le = {}; +var Qr = { exports: {} }, de = {}; /** * @license React * react-is.production.min.js @@ -3768,12 +3768,12 @@ var Xr = { exports: {} }, le = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var wa; -function td() { - if (wa) - return le; - wa = 1; - var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), v; +var va; +function ud() { + if (va) + return de; + va = 1; + var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), v; v = Symbol.for("react.module.reference"); function f(m) { if (typeof m == "object" && m !== null) { @@ -3785,12 +3785,12 @@ function td() { case o: case r: case d: - case p: + case u: return m; default: switch (m = m && m.$$typeof, m) { case l: - case i: + case s: case c: case w: case h: @@ -3805,39 +3805,39 @@ function td() { } } } - return le.ContextConsumer = i, le.ContextProvider = a, le.Element = e, le.ForwardRef = c, le.Fragment = n, le.Lazy = w, le.Memo = h, le.Portal = t, le.Profiler = o, le.StrictMode = r, le.Suspense = d, le.SuspenseList = p, le.isAsyncMode = function() { + return de.ContextConsumer = s, de.ContextProvider = a, de.Element = e, de.ForwardRef = c, de.Fragment = n, de.Lazy = w, de.Memo = h, de.Portal = t, de.Profiler = o, de.StrictMode = r, de.Suspense = d, de.SuspenseList = u, de.isAsyncMode = function() { return !1; - }, le.isConcurrentMode = function() { + }, de.isConcurrentMode = function() { return !1; - }, le.isContextConsumer = function(m) { - return f(m) === i; - }, le.isContextProvider = function(m) { + }, de.isContextConsumer = function(m) { + return f(m) === s; + }, de.isContextProvider = function(m) { return f(m) === a; - }, le.isElement = function(m) { + }, de.isElement = function(m) { return typeof m == "object" && m !== null && m.$$typeof === e; - }, le.isForwardRef = function(m) { + }, de.isForwardRef = function(m) { return f(m) === c; - }, le.isFragment = function(m) { + }, de.isFragment = function(m) { return f(m) === n; - }, le.isLazy = function(m) { + }, de.isLazy = function(m) { return f(m) === w; - }, le.isMemo = function(m) { + }, de.isMemo = function(m) { return f(m) === h; - }, le.isPortal = function(m) { + }, de.isPortal = function(m) { return f(m) === t; - }, le.isProfiler = function(m) { + }, de.isProfiler = function(m) { return f(m) === o; - }, le.isStrictMode = function(m) { + }, de.isStrictMode = function(m) { return f(m) === r; - }, le.isSuspense = function(m) { + }, de.isSuspense = function(m) { return f(m) === d; - }, le.isSuspenseList = function(m) { - return f(m) === p; - }, le.isValidElementType = function(m) { - return typeof m == "string" || typeof m == "function" || m === n || m === o || m === r || m === d || m === p || m === b || typeof m == "object" && m !== null && (m.$$typeof === w || m.$$typeof === h || m.$$typeof === a || m.$$typeof === i || m.$$typeof === c || m.$$typeof === v || m.getModuleId !== void 0); - }, le.typeOf = f, le; + }, de.isSuspenseList = function(m) { + return f(m) === u; + }, de.isValidElementType = function(m) { + return typeof m == "string" || typeof m == "function" || m === n || m === o || m === r || m === d || m === u || m === b || typeof m == "object" && m !== null && (m.$$typeof === w || m.$$typeof === h || m.$$typeof === a || m.$$typeof === s || m.$$typeof === c || m.$$typeof === v || m.getModuleId !== void 0); + }, de.typeOf = f, de; } -var ce = {}; +var ue = {}; /** * @license React * react-is.development.js @@ -3847,146 +3847,146 @@ var ce = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var fa; -function nd() { - return fa || (fa = 1, process.env.NODE_ENV !== "production" && function() { - var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), v = !1, f = !1, m = !1, N = !1, I = !1, O; - O = Symbol.for("react.module.reference"); - function E(j) { - return !!(typeof j == "string" || typeof j == "function" || j === n || j === o || I || j === r || j === d || j === p || N || j === b || v || f || m || typeof j == "object" && j !== null && (j.$$typeof === w || j.$$typeof === h || j.$$typeof === a || j.$$typeof === i || j.$$typeof === c || // This needs to include all possible module reference object +var ya; +function pd() { + return ya || (ya = 1, process.env.NODE_ENV !== "production" && function() { + var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.server_context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), v = !1, f = !1, m = !1, N = !1, A = !1, _; + _ = Symbol.for("react.module.reference"); + function E(V) { + return !!(typeof V == "string" || typeof V == "function" || V === n || V === o || A || V === r || V === d || V === u || N || V === b || v || f || m || typeof V == "object" && V !== null && (V.$$typeof === w || V.$$typeof === h || V.$$typeof === a || V.$$typeof === s || V.$$typeof === c || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. - j.$$typeof === O || j.getModuleId !== void 0)); + V.$$typeof === _ || V.getModuleId !== void 0)); } - function g(j) { - if (typeof j == "object" && j !== null) { - var ye = j.$$typeof; - switch (ye) { + function g(V) { + if (typeof V == "object" && V !== null) { + var xe = V.$$typeof; + switch (xe) { case e: - var ze = j.type; - switch (ze) { + var Ge = V.type; + switch (Ge) { case n: case o: case r: case d: - case p: - return ze; + case u: + return Ge; default: - var ct = ze && ze.$$typeof; - switch (ct) { + var ut = Ge && Ge.$$typeof; + switch (ut) { case l: - case i: + case s: case c: case w: case h: case a: - return ct; + return ut; default: - return ye; + return xe; } } case t: - return ye; + return xe; } } } - var _ = i, L = a, H = e, C = c, P = n, k = w, B = h, D = t, J = o, q = r, U = d, ee = p, ae = !1, re = !1; - function y(j) { - return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1; + var I = s, U = a, W = e, O = c, P = n, k = w, B = h, D = t, Q = o, J = r, X = d, ee = u, re = !1, oe = !1; + function y(V) { + return re || (re = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1; } - function S(j) { - return re || (re = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1; + function R(V) { + return oe || (oe = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1; } - function z(j) { - return g(j) === i; + function H(V) { + return g(V) === s; } - function F(j) { - return g(j) === a; + function G(V) { + return g(V) === a; } - function V(j) { - return typeof j == "object" && j !== null && j.$$typeof === e; + function z(V) { + return typeof V == "object" && V !== null && V.$$typeof === e; } - function W(j) { - return g(j) === c; + function q(V) { + return g(V) === c; } - function X(j) { - return g(j) === n; + function L(V) { + return g(V) === n; } - function Y(j) { - return g(j) === w; + function K(V) { + return g(V) === w; } - function G(j) { - return g(j) === h; + function Y(V) { + return g(V) === h; } - function K(j) { - return g(j) === t; + function Z(V) { + return g(V) === t; } - function Z(j) { - return g(j) === o; + function S(V) { + return g(V) === o; } - function de(j) { - return g(j) === r; + function F(V) { + return g(V) === r; } - function $(j) { - return g(j) === d; + function T(V) { + return g(V) === d; } - function xe(j) { - return g(j) === p; + function we(V) { + return g(V) === u; } - ce.ContextConsumer = _, ce.ContextProvider = L, ce.Element = H, ce.ForwardRef = C, ce.Fragment = P, ce.Lazy = k, ce.Memo = B, ce.Portal = D, ce.Profiler = J, ce.StrictMode = q, ce.Suspense = U, ce.SuspenseList = ee, ce.isAsyncMode = y, ce.isConcurrentMode = S, ce.isContextConsumer = z, ce.isContextProvider = F, ce.isElement = V, ce.isForwardRef = W, ce.isFragment = X, ce.isLazy = Y, ce.isMemo = G, ce.isPortal = K, ce.isProfiler = Z, ce.isStrictMode = de, ce.isSuspense = $, ce.isSuspenseList = xe, ce.isValidElementType = E, ce.typeOf = g; - }()), ce; + ue.ContextConsumer = I, ue.ContextProvider = U, ue.Element = W, ue.ForwardRef = O, ue.Fragment = P, ue.Lazy = k, ue.Memo = B, ue.Portal = D, ue.Profiler = Q, ue.StrictMode = J, ue.Suspense = X, ue.SuspenseList = ee, ue.isAsyncMode = y, ue.isConcurrentMode = R, ue.isContextConsumer = H, ue.isContextProvider = G, ue.isElement = z, ue.isForwardRef = q, ue.isFragment = L, ue.isLazy = K, ue.isMemo = Y, ue.isPortal = Z, ue.isProfiler = S, ue.isStrictMode = F, ue.isSuspense = T, ue.isSuspenseList = we, ue.isValidElementType = E, ue.typeOf = g; + }()), ue; } -process.env.NODE_ENV === "production" ? Xr.exports = td() : Xr.exports = nd(); -var ma = Xr.exports; -const rd = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/; -function od(e) { - const t = `${e}`.match(rd); +process.env.NODE_ENV === "production" ? Qr.exports = ud() : Qr.exports = pd(); +var xa = Qr.exports; +const wd = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/; +function fd(e) { + const t = `${e}`.match(wd); return t && t[1] || ""; } -function Vi(e, t = "") { - return e.displayName || e.name || od(e) || t; +function zs(e, t = "") { + return e.displayName || e.name || fd(e) || t; } -function ha(e, t, n) { - const r = Vi(t); +function Na(e, t, n) { + const r = zs(t); return e.displayName || (r !== "" ? `${n}(${r})` : n); } -function ad(e) { +function md(e) { if (e != null) { if (typeof e == "string") return e; if (typeof e == "function") - return Vi(e, "Component"); + return zs(e, "Component"); if (typeof e == "object") switch (e.$$typeof) { - case ma.ForwardRef: - return ha(e, e.render, "ForwardRef"); - case ma.Memo: - return ha(e, e.type, "memo"); + case xa.ForwardRef: + return Na(e, e.render, "ForwardRef"); + case xa.Memo: + return Na(e, e.type, "memo"); default: return; } } } -function gn(e, t, n, r, o) { +function Nn(e, t, n, r, o) { if (process.env.NODE_ENV === "production") return null; - const a = e[t], i = o || t; - return a == null ? null : a && a.nodeType !== 1 ? new Error(`Invalid ${r} \`${i}\` supplied to \`${n}\`. Expected an HTMLElement.`) : null; + const a = e[t], s = o || t; + return a == null ? null : a && a.nodeType !== 1 ? new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an HTMLElement.`) : null; } -const id = u.oneOfType([u.func, u.object]), Li = id; -function We(e) { +const hd = p.oneOfType([p.func, p.object]), Us = hd; +function Ze(e) { if (typeof e != "string") - throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : Vt(7)); + throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : Ut(7)); return e.charAt(0).toUpperCase() + e.slice(1); } -function sd(...e) { +function gd(...e) { return e.reduce((t, n) => n == null ? t : function(...o) { t.apply(this, o), n.apply(this, o); }, () => { }); } -function ld(e, t = 166) { +function bd(e, t = 166) { let n; function r(...o) { const a = () => { @@ -3998,67 +3998,67 @@ function ld(e, t = 166) { clearTimeout(n); }, r; } -function cd(e, t) { - return process.env.NODE_ENV === "production" ? () => null : (n, r, o, a, i) => { - const l = o || "<>", c = i || r; +function vd(e, t) { + return process.env.NODE_ENV === "production" ? () => null : (n, r, o, a, s) => { + const l = o || "<>", c = s || r; return typeof n[r] < "u" ? new Error(`The ${a} \`${c}\` of \`${l}\` is deprecated. ${t}`) : null; }; } -function dd(e, t) { +function yd(e, t) { var n, r; - return /* @__PURE__ */ M.isValidElement(e) && t.indexOf( + return /* @__PURE__ */ j.isValidElement(e) && t.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45 // eslint-disable-next-line no-underscore-dangle (n = e.type.muiName) != null ? n : (r = e.type) == null || (r = r._payload) == null || (r = r.value) == null ? void 0 : r.muiName ) !== -1; } -function Xn(e) { +function nr(e) { return e && e.ownerDocument || document; } -function pd(e) { - return Xn(e).defaultView || window; +function xd(e) { + return nr(e).defaultView || window; } -function ud(e, t) { +function Nd(e, t) { if (process.env.NODE_ENV === "production") return () => null; - const n = t ? R({}, t.propTypes) : null; - return (o) => (a, i, l, c, d, ...p) => { - const h = d || i, w = n == null ? void 0 : n[h]; + const n = t ? $({}, t.propTypes) : null; + return (o) => (a, s, l, c, d, ...u) => { + const h = d || s, w = n == null ? void 0 : n[h]; if (w) { - const b = w(a, i, l, c, d, ...p); + const b = w(a, s, l, c, d, ...u); if (b) return b; } - return typeof a[i] < "u" && !a[o] ? new Error(`The prop \`${h}\` of \`${e}\` can only be used together with the \`${o}\` prop.`) : null; + return typeof a[s] < "u" && !a[o] ? new Error(`The prop \`${h}\` of \`${e}\` can only be used together with the \`${o}\` prop.`) : null; }; } -function Yn(e, t) { +function rr(e, t) { typeof e == "function" ? e(t) : e && (e.current = t); } -const wd = typeof window < "u" ? M.useLayoutEffect : M.useEffect, Lt = wd; -let ga = 0; -function fd(e) { - const [t, n] = M.useState(e), r = e || t; - return M.useEffect(() => { - t == null && (ga += 1, n(`mui-${ga}`)); +const kd = typeof window < "u" ? j.useLayoutEffect : j.useEffect, Gt = kd; +let ka = 0; +function Ed(e) { + const [t, n] = j.useState(e), r = e || t; + return j.useEffect(() => { + t == null && (ka += 1, n(`mui-${ka}`)); }, [t]), r; } -const ba = M["useId".toString()]; -function zi(e) { - if (ba !== void 0) { - const t = ba(); +const Ea = j["useId".toString()]; +function Gs(e) { + if (Ea !== void 0) { + const t = Ea(); return e ?? t; } - return fd(e); + return Ed(e); } -function md(e, t, n, r, o) { +function Td(e, t, n, r, o) { if (process.env.NODE_ENV === "production") return null; const a = o || t; return typeof e[t] < "u" ? new Error(`The prop \`${a}\` is not supported. Please remove it.`) : null; } -function Fi({ +function Hs({ controlled: e, default: t, name: n, @@ -4066,58 +4066,58 @@ function Fi({ }) { const { current: o - } = M.useRef(e !== void 0), [a, i] = M.useState(t), l = o ? e : a; + } = j.useRef(e !== void 0), [a, s] = j.useState(t), l = o ? e : a; if (process.env.NODE_ENV !== "production") { - M.useEffect(() => { + j.useEffect(() => { o !== (e !== void 0) && console.error([`MUI: A component is changing the ${o ? "" : "un"}controlled ${r} state of ${n} to be ${o ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(` `)); }, [r, n, e]); const { current: d - } = M.useRef(t); - M.useEffect(() => { + } = j.useRef(t); + j.useEffect(() => { !o && d !== t && console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(` `)); }, [JSON.stringify(t)]); } - const c = M.useCallback((d) => { - o || i(d); + const c = j.useCallback((d) => { + o || s(d); }, []); return [l, c]; } -function Yr(e) { - const t = M.useRef(e); - return Lt(() => { +function eo(e) { + const t = j.useRef(e); + return Gt(() => { t.current = e; - }), M.useRef((...n) => ( + }), j.useRef((...n) => ( // @ts-expect-error hide `this` (0, t.current)(...n) )).current; } -function xt(...e) { - return M.useMemo(() => e.every((t) => t == null) ? null : (t) => { +function kt(...e) { + return j.useMemo(() => e.every((t) => t == null) ? null : (t) => { e.forEach((n) => { - Yn(n, t); + rr(n, t); }); }, e); } -const va = {}; -function hd(e, t) { - const n = M.useRef(va); - return n.current === va && (n.current = e(t)), n; +const Ta = {}; +function Cd(e, t) { + const n = j.useRef(Ta); + return n.current === Ta && (n.current = e(t)), n; } -const gd = []; -function bd(e) { - M.useEffect(e, gd); +const Sd = []; +function Od(e) { + j.useEffect(e, Sd); } -class Tn { +class In { constructor() { this.currentId = null, this.clear = () => { this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null); }, this.disposeEffect = () => this.clear; } static create() { - return new Tn(); + return new In(); } /** * Executes `fn` after `delay`, clearing any previously scheduled call. @@ -4128,12 +4128,12 @@ class Tn { }, t); } } -function rn() { - const e = hd(Tn.create).current; - return bd(e.disposeEffect), e; +function cn() { + const e = Cd(In.create).current; + return Od(e.disposeEffect), e; } -let sr = !0, Wr = !1; -const vd = new Tn(), yd = { +let pr = !0, to = !1; +const Rd = new In(), _d = { text: !0, search: !0, url: !0, @@ -4148,26 +4148,26 @@ const vd = new Tn(), yd = { datetime: !0, "datetime-local": !0 }; -function xd(e) { +function Pd(e) { const { type: t, tagName: n } = e; - return !!(n === "INPUT" && yd[t] && !e.readOnly || n === "TEXTAREA" && !e.readOnly || e.isContentEditable); + return !!(n === "INPUT" && _d[t] && !e.readOnly || n === "TEXTAREA" && !e.readOnly || e.isContentEditable); } -function Nd(e) { - e.metaKey || e.altKey || e.ctrlKey || (sr = !0); +function $d(e) { + e.metaKey || e.altKey || e.ctrlKey || (pr = !0); } -function Br() { - sr = !1; +function zr() { + pr = !1; } -function kd() { - this.visibilityState === "hidden" && Wr && (sr = !0); +function Id() { + this.visibilityState === "hidden" && to && (pr = !0); } -function Ed(e) { - e.addEventListener("keydown", Nd, !0), e.addEventListener("mousedown", Br, !0), e.addEventListener("pointerdown", Br, !0), e.addEventListener("touchstart", Br, !0), e.addEventListener("visibilitychange", kd, !0); +function Ad(e) { + e.addEventListener("keydown", $d, !0), e.addEventListener("mousedown", zr, !0), e.addEventListener("pointerdown", zr, !0), e.addEventListener("touchstart", zr, !0), e.addEventListener("visibilitychange", Id, !0); } -function Td(e) { +function Dd(e) { const { target: t } = e; @@ -4175,19 +4175,19 @@ function Td(e) { return t.matches(":focus-visible"); } catch { } - return sr || xd(t); + return pr || Pd(t); } -function Ui() { - const e = M.useCallback((o) => { - o != null && Ed(o.ownerDocument); - }, []), t = M.useRef(!1); +function Xs() { + const e = j.useCallback((o) => { + o != null && Ad(o.ownerDocument); + }, []), t = j.useRef(!1); function n() { - return t.current ? (Wr = !0, vd.start(100, () => { - Wr = !1; + return t.current ? (to = !0, Rd.start(100, () => { + to = !1; }), t.current = !1, !0) : !1; } function r(o) { - return Td(o) ? (t.current = !0, !0) : !1; + return Dd(o) ? (t.current = !0, !0) : !1; } return { isFocusVisibleRef: t, @@ -4196,38 +4196,38 @@ function Ui() { ref: e }; } -function Gi(e, t) { - const n = R({}, t); +function Ys(e, t) { + const n = $({}, t); return Object.keys(e).forEach((r) => { if (r.toString().match(/^(components|slots)$/)) - n[r] = R({}, e[r], n[r]); + n[r] = $({}, e[r], n[r]); else if (r.toString().match(/^(componentsProps|slotProps)$/)) { const o = e[r] || {}, a = t[r]; - n[r] = {}, !a || !Object.keys(a) ? n[r] = o : !o || !Object.keys(o) ? n[r] = a : (n[r] = R({}, a), Object.keys(o).forEach((i) => { - n[r][i] = Gi(o[i], a[i]); + n[r] = {}, !a || !Object.keys(a) ? n[r] = o : !o || !Object.keys(o) ? n[r] = a : (n[r] = $({}, a), Object.keys(o).forEach((s) => { + n[r][s] = Ys(o[s], a[s]); })); } else n[r] === void 0 && (n[r] = e[r]); }), n; } -function bo(e, t, n = void 0) { +function Eo(e, t, n = void 0) { const r = {}; return Object.keys(e).forEach( // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`. // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208 (o) => { - r[o] = e[o].reduce((a, i) => { - if (i) { - const l = t(i); - l !== "" && a.push(l), n && n[i] && a.push(n[i]); + r[o] = e[o].reduce((a, s) => { + if (s) { + const l = t(s); + l !== "" && a.push(l), n && n[s] && a.push(n[s]); } return a; }, []).join(" "); } ), r; } -const ya = (e) => e, Cd = () => { - let e = ya; +const Ca = (e) => e, Md = () => { + let e = Ca; return { configure(t) { e = t; @@ -4236,10 +4236,10 @@ const ya = (e) => e, Cd = () => { return e(t); }, reset() { - e = ya; + e = Ca; } }; -}, Sd = Cd(), Hi = Sd, Xi = { +}, Bd = Md(), Ws = Bd, qs = { active: "active", checked: "checked", completed: "completed", @@ -4253,20 +4253,20 @@ const ya = (e) => e, Cd = () => { required: "required", selected: "selected" }; -function lr(e, t, n = "Mui") { - const r = Xi[t]; - return r ? `${n}-${r}` : `${Hi.generate(e)}-${t}`; +function wr(e, t, n = "Mui") { + const r = qs[t]; + return r ? `${n}-${r}` : `${Ws.generate(e)}-${t}`; } -function Yi(e, t, n = "Mui") { +function Ks(e, t, n = "Mui") { const r = {}; return t.forEach((o) => { - r[o] = lr(e, o, n); + r[o] = wr(e, o, n); }), r; } -function Od(e, t = Number.MIN_SAFE_INTEGER, n = Number.MAX_SAFE_INTEGER) { +function jd(e, t = Number.MIN_SAFE_INTEGER, n = Number.MAX_SAFE_INTEGER) { return Math.max(t, Math.min(e, n)); } -function Ne(e, t) { +function ke(e, t) { if (e == null) return {}; var n = {}, r = Object.keys(e), o, a; @@ -4274,16 +4274,16 @@ function Ne(e, t) { o = r[a], !(t.indexOf(o) >= 0) && (n[o] = e[o]); return n; } -const Rd = ["values", "unit", "step"], Pd = (e) => { +const Vd = ["values", "unit", "step"], Ld = (e) => { const t = Object.keys(e).map((n) => ({ key: n, val: e[n] })) || []; - return t.sort((n, r) => n.val - r.val), t.reduce((n, r) => R({}, n, { + return t.sort((n, r) => n.val - r.val), t.reduce((n, r) => $({}, n, { [r.key]: r.val }), {}); }; -function _d(e) { +function Fd(e) { const { // The breakpoint **start** at this value. // For instance with the first breakpoint xs: [xs, sm). @@ -4301,7 +4301,7 @@ function _d(e) { }, unit: n = "px", step: r = 5 - } = e, o = Ne(e, Rd), a = Pd(t), i = Object.keys(a); + } = e, o = ke(e, Vd), a = Ld(t), s = Object.keys(a); function l(w) { return `@media (min-width:${typeof t[w] == "number" ? t[w] : w}${n})`; } @@ -4309,37 +4309,37 @@ function _d(e) { return `@media (max-width:${(typeof t[w] == "number" ? t[w] : w) - r / 100}${n})`; } function d(w, b) { - const v = i.indexOf(b); - return `@media (min-width:${typeof t[w] == "number" ? t[w] : w}${n}) and (max-width:${(v !== -1 && typeof t[i[v]] == "number" ? t[i[v]] : b) - r / 100}${n})`; + const v = s.indexOf(b); + return `@media (min-width:${typeof t[w] == "number" ? t[w] : w}${n}) and (max-width:${(v !== -1 && typeof t[s[v]] == "number" ? t[s[v]] : b) - r / 100}${n})`; } - function p(w) { - return i.indexOf(w) + 1 < i.length ? d(w, i[i.indexOf(w) + 1]) : l(w); + function u(w) { + return s.indexOf(w) + 1 < s.length ? d(w, s[s.indexOf(w) + 1]) : l(w); } function h(w) { - const b = i.indexOf(w); - return b === 0 ? l(i[1]) : b === i.length - 1 ? c(i[b]) : d(w, i[i.indexOf(w) + 1]).replace("@media", "@media not all and"); + const b = s.indexOf(w); + return b === 0 ? l(s[1]) : b === s.length - 1 ? c(s[b]) : d(w, s[s.indexOf(w) + 1]).replace("@media", "@media not all and"); } - return R({ - keys: i, + return $({ + keys: s, values: a, up: l, down: c, between: d, - only: p, + only: u, not: h, unit: n }, o); } -const $d = { +const zd = { borderRadius: 4 -}, Id = $d, Ad = process.env.NODE_ENV !== "production" ? u.oneOfType([u.number, u.string, u.object, u.array]) : {}, st = Ad; -function cn(e, t) { - return t ? Ze(e, t, { +}, Ud = zd, Gd = process.env.NODE_ENV !== "production" ? p.oneOfType([p.number, p.string, p.object, p.array]) : {}, ct = Gd; +function fn(e, t) { + return t ? nt(e, t, { clone: !1 // No need to clone deep, it's way faster. }) : e; } -const vo = { +const To = { xs: 0, // phone sm: 600, @@ -4350,47 +4350,47 @@ const vo = { // desktop xl: 1536 // large screen -}, xa = { +}, Sa = { // Sorted ASC by size. That's important. // It can't be configured as it's used statically for propTypes. keys: ["xs", "sm", "md", "lg", "xl"], - up: (e) => `@media (min-width:${vo[e]}px)` + up: (e) => `@media (min-width:${To[e]}px)` }; -function Qe(e, t, n) { +function rt(e, t, n) { const r = e.theme || {}; if (Array.isArray(t)) { - const a = r.breakpoints || xa; - return t.reduce((i, l, c) => (i[a.up(a.keys[c])] = n(t[c]), i), {}); + const a = r.breakpoints || Sa; + return t.reduce((s, l, c) => (s[a.up(a.keys[c])] = n(t[c]), s), {}); } if (typeof t == "object") { - const a = r.breakpoints || xa; - return Object.keys(t).reduce((i, l) => { - if (Object.keys(a.values || vo).indexOf(l) !== -1) { + const a = r.breakpoints || Sa; + return Object.keys(t).reduce((s, l) => { + if (Object.keys(a.values || To).indexOf(l) !== -1) { const c = a.up(l); - i[c] = n(t[l], l); + s[c] = n(t[l], l); } else { const c = l; - i[c] = t[c]; + s[c] = t[c]; } - return i; + return s; }, {}); } return n(t); } -function Dd(e = {}) { +function Hd(e = {}) { var t; return ((t = e.keys) == null ? void 0 : t.reduce((r, o) => { const a = e.up(o); return r[a] = {}, r; }, {})) || {}; } -function Md(e, t) { +function Xd(e, t) { return e.reduce((n, r) => { const o = n[r]; return (!o || Object.keys(o).length === 0) && delete n[r], n; }, t); } -function cr(e, t, n = !0) { +function fr(e, t, n = !0) { if (!t || typeof t != "string") return null; if (e && e.vars && n) { @@ -4400,291 +4400,291 @@ function cr(e, t, n = !0) { } return t.split(".").reduce((r, o) => r && r[o] != null ? r[o] : null, e); } -function Wn(e, t, n, r = n) { +function or(e, t, n, r = n) { let o; - return typeof e == "function" ? o = e(n) : Array.isArray(e) ? o = e[n] || r : o = cr(e, n) || r, t && (o = t(o, r, e)), o; + return typeof e == "function" ? o = e(n) : Array.isArray(e) ? o = e[n] || r : o = fr(e, n) || r, t && (o = t(o, r, e)), o; } -function ve(e) { +function ye(e) { const { prop: t, cssProperty: n = e.prop, themeKey: r, transform: o - } = e, a = (i) => { - if (i[t] == null) + } = e, a = (s) => { + if (s[t] == null) return null; - const l = i[t], c = i.theme, d = cr(c, r) || {}; - return Qe(i, l, (h) => { - let w = Wn(d, o, h); - return h === w && typeof h == "string" && (w = Wn(d, o, `${t}${h === "default" ? "" : We(h)}`, h)), n === !1 ? w : { + const l = s[t], c = s.theme, d = fr(c, r) || {}; + return rt(s, l, (h) => { + let w = or(d, o, h); + return h === w && typeof h == "string" && (w = or(d, o, `${t}${h === "default" ? "" : Ze(h)}`, h)), n === !1 ? w : { [n]: w }; }); }; return a.propTypes = process.env.NODE_ENV !== "production" ? { - [t]: st + [t]: ct } : {}, a.filterProps = [t], a; } -function Bd(e) { +function Yd(e) { const t = {}; return (n) => (t[n] === void 0 && (t[n] = e(n)), t[n]); } -const jd = { +const Wd = { m: "margin", p: "padding" -}, Vd = { +}, qd = { t: "Top", r: "Right", b: "Bottom", l: "Left", x: ["Left", "Right"], y: ["Top", "Bottom"] -}, Na = { +}, Oa = { marginX: "mx", marginY: "my", paddingX: "px", paddingY: "py" -}, Ld = Bd((e) => { +}, Kd = Yd((e) => { if (e.length > 2) - if (Na[e]) - e = Na[e]; + if (Oa[e]) + e = Oa[e]; else return [e]; - const [t, n] = e.split(""), r = jd[t], o = Vd[n] || ""; + const [t, n] = e.split(""), r = Wd[t], o = qd[n] || ""; return Array.isArray(o) ? o.map((a) => r + a) : [r + o]; -}), dr = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"], pr = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"], zd = [...dr, ...pr]; -function Cn(e, t, n, r) { +}), mr = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"], hr = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"], Jd = [...mr, ...hr]; +function An(e, t, n, r) { var o; - const a = (o = cr(e, t, !1)) != null ? o : n; - return typeof a == "number" ? (i) => typeof i == "string" ? i : (process.env.NODE_ENV !== "production" && typeof i != "number" && console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`), a * i) : Array.isArray(a) ? (i) => typeof i == "string" ? i : (process.env.NODE_ENV !== "production" && (Number.isInteger(i) ? i > a.length - 1 && console.error([`MUI: The value provided (${i}) overflows.`, `The supported values are: ${JSON.stringify(a)}.`, `${i} > ${a.length - 1}, you need to add the missing values.`].join(` + const a = (o = fr(e, t, !1)) != null ? o : n; + return typeof a == "number" ? (s) => typeof s == "string" ? s : (process.env.NODE_ENV !== "production" && typeof s != "number" && console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`), a * s) : Array.isArray(a) ? (s) => typeof s == "string" ? s : (process.env.NODE_ENV !== "production" && (Number.isInteger(s) ? s > a.length - 1 && console.error([`MUI: The value provided (${s}) overflows.`, `The supported values are: ${JSON.stringify(a)}.`, `${s} > ${a.length - 1}, you need to add the missing values.`].join(` `)) : console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(` -`))), a[i]) : typeof a == "function" ? a : (process.env.NODE_ENV !== "production" && console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`, "It should be a number, an array or a function."].join(` +`))), a[s]) : typeof a == "function" ? a : (process.env.NODE_ENV !== "production" && console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`, "It should be a number, an array or a function."].join(` `)), () => { }); } -function Wi(e) { - return Cn(e, "spacing", 8, "spacing"); +function Js(e) { + return An(e, "spacing", 8, "spacing"); } -function Sn(e, t) { +function Dn(e, t) { if (typeof t == "string" || t == null) return t; const n = Math.abs(t), r = e(n); return t >= 0 ? r : typeof r == "number" ? -r : `-${r}`; } -function Fd(e, t) { - return (n) => e.reduce((r, o) => (r[o] = Sn(t, n), r), {}); +function Zd(e, t) { + return (n) => e.reduce((r, o) => (r[o] = Dn(t, n), r), {}); } -function Ud(e, t, n, r) { +function Qd(e, t, n, r) { if (t.indexOf(n) === -1) return null; - const o = Ld(n), a = Fd(o, r), i = e[n]; - return Qe(e, i, a); + const o = Kd(n), a = Zd(o, r), s = e[n]; + return rt(e, s, a); } -function qi(e, t) { - const n = Wi(e.theme); - return Object.keys(e).map((r) => Ud(e, t, r, n)).reduce(cn, {}); +function Zs(e, t) { + const n = Js(e.theme); + return Object.keys(e).map((r) => Qd(e, t, r, n)).reduce(fn, {}); } -function he(e) { - return qi(e, dr); -} -he.propTypes = process.env.NODE_ENV !== "production" ? dr.reduce((e, t) => (e[t] = st, e), {}) : {}; -he.filterProps = dr; function ge(e) { - return qi(e, pr); + return Zs(e, mr); +} +ge.propTypes = process.env.NODE_ENV !== "production" ? mr.reduce((e, t) => (e[t] = ct, e), {}) : {}; +ge.filterProps = mr; +function be(e) { + return Zs(e, hr); } -ge.propTypes = process.env.NODE_ENV !== "production" ? pr.reduce((e, t) => (e[t] = st, e), {}) : {}; -ge.filterProps = pr; -process.env.NODE_ENV !== "production" && zd.reduce((e, t) => (e[t] = st, e), {}); -function Gd(e = 8) { +be.propTypes = process.env.NODE_ENV !== "production" ? hr.reduce((e, t) => (e[t] = ct, e), {}) : {}; +be.filterProps = hr; +process.env.NODE_ENV !== "production" && Jd.reduce((e, t) => (e[t] = ct, e), {}); +function eu(e = 8) { if (e.mui) return e; - const t = Wi({ + const t = Js({ spacing: e }), n = (...r) => (process.env.NODE_ENV !== "production" && (r.length <= 4 || console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)), (r.length === 0 ? [1] : r).map((a) => { - const i = t(a); - return typeof i == "number" ? `${i}px` : i; + const s = t(a); + return typeof s == "number" ? `${s}px` : s; }).join(" ")); return n.mui = !0, n; } -function ur(...e) { +function gr(...e) { const t = e.reduce((r, o) => (o.filterProps.forEach((a) => { r[a] = o; - }), r), {}), n = (r) => Object.keys(r).reduce((o, a) => t[a] ? cn(o, t[a](r)) : o, {}); + }), r), {}), n = (r) => Object.keys(r).reduce((o, a) => t[a] ? fn(o, t[a](r)) : o, {}); return n.propTypes = process.env.NODE_ENV !== "production" ? e.reduce((r, o) => Object.assign(r, o.propTypes), {}) : {}, n.filterProps = e.reduce((r, o) => r.concat(o.filterProps), []), n; } -function Me(e) { +function Ve(e) { return typeof e != "number" ? e : `${e}px solid`; } -function Le(e, t) { - return ve({ +function Ue(e, t) { + return ye({ prop: e, themeKey: "borders", transform: t }); } -const Hd = Le("border", Me), Xd = Le("borderTop", Me), Yd = Le("borderRight", Me), Wd = Le("borderBottom", Me), qd = Le("borderLeft", Me), Kd = Le("borderColor"), Jd = Le("borderTopColor"), Zd = Le("borderRightColor"), Qd = Le("borderBottomColor"), ep = Le("borderLeftColor"), tp = Le("outline", Me), np = Le("outlineColor"), wr = (e) => { +const tu = Ue("border", Ve), nu = Ue("borderTop", Ve), ru = Ue("borderRight", Ve), ou = Ue("borderBottom", Ve), au = Ue("borderLeft", Ve), su = Ue("borderColor"), iu = Ue("borderTopColor"), lu = Ue("borderRightColor"), cu = Ue("borderBottomColor"), du = Ue("borderLeftColor"), uu = Ue("outline", Ve), pu = Ue("outlineColor"), br = (e) => { if (e.borderRadius !== void 0 && e.borderRadius !== null) { - const t = Cn(e.theme, "shape.borderRadius", 4, "borderRadius"), n = (r) => ({ - borderRadius: Sn(t, r) + const t = An(e.theme, "shape.borderRadius", 4, "borderRadius"), n = (r) => ({ + borderRadius: Dn(t, r) }); - return Qe(e, e.borderRadius, n); + return rt(e, e.borderRadius, n); } return null; }; -wr.propTypes = process.env.NODE_ENV !== "production" ? { - borderRadius: st +br.propTypes = process.env.NODE_ENV !== "production" ? { + borderRadius: ct } : {}; -wr.filterProps = ["borderRadius"]; -ur(Hd, Xd, Yd, Wd, qd, Kd, Jd, Zd, Qd, ep, wr, tp, np); -const fr = (e) => { +br.filterProps = ["borderRadius"]; +gr(tu, nu, ru, ou, au, su, iu, lu, cu, du, br, uu, pu); +const vr = (e) => { if (e.gap !== void 0 && e.gap !== null) { - const t = Cn(e.theme, "spacing", 8, "gap"), n = (r) => ({ - gap: Sn(t, r) + const t = An(e.theme, "spacing", 8, "gap"), n = (r) => ({ + gap: Dn(t, r) }); - return Qe(e, e.gap, n); + return rt(e, e.gap, n); } return null; }; -fr.propTypes = process.env.NODE_ENV !== "production" ? { - gap: st +vr.propTypes = process.env.NODE_ENV !== "production" ? { + gap: ct } : {}; -fr.filterProps = ["gap"]; -const mr = (e) => { +vr.filterProps = ["gap"]; +const yr = (e) => { if (e.columnGap !== void 0 && e.columnGap !== null) { - const t = Cn(e.theme, "spacing", 8, "columnGap"), n = (r) => ({ - columnGap: Sn(t, r) + const t = An(e.theme, "spacing", 8, "columnGap"), n = (r) => ({ + columnGap: Dn(t, r) }); - return Qe(e, e.columnGap, n); + return rt(e, e.columnGap, n); } return null; }; -mr.propTypes = process.env.NODE_ENV !== "production" ? { - columnGap: st +yr.propTypes = process.env.NODE_ENV !== "production" ? { + columnGap: ct } : {}; -mr.filterProps = ["columnGap"]; -const hr = (e) => { +yr.filterProps = ["columnGap"]; +const xr = (e) => { if (e.rowGap !== void 0 && e.rowGap !== null) { - const t = Cn(e.theme, "spacing", 8, "rowGap"), n = (r) => ({ - rowGap: Sn(t, r) + const t = An(e.theme, "spacing", 8, "rowGap"), n = (r) => ({ + rowGap: Dn(t, r) }); - return Qe(e, e.rowGap, n); + return rt(e, e.rowGap, n); } return null; }; -hr.propTypes = process.env.NODE_ENV !== "production" ? { - rowGap: st +xr.propTypes = process.env.NODE_ENV !== "production" ? { + rowGap: ct } : {}; -hr.filterProps = ["rowGap"]; -const rp = ve({ +xr.filterProps = ["rowGap"]; +const wu = ye({ prop: "gridColumn" -}), op = ve({ +}), fu = ye({ prop: "gridRow" -}), ap = ve({ +}), mu = ye({ prop: "gridAutoFlow" -}), ip = ve({ +}), hu = ye({ prop: "gridAutoColumns" -}), sp = ve({ +}), gu = ye({ prop: "gridAutoRows" -}), lp = ve({ +}), bu = ye({ prop: "gridTemplateColumns" -}), cp = ve({ +}), vu = ye({ prop: "gridTemplateRows" -}), dp = ve({ +}), yu = ye({ prop: "gridTemplateAreas" -}), pp = ve({ +}), xu = ye({ prop: "gridArea" }); -ur(fr, mr, hr, rp, op, ap, ip, sp, lp, cp, dp, pp); -function Dt(e, t) { +gr(vr, yr, xr, wu, fu, mu, hu, gu, bu, vu, yu, xu); +function jt(e, t) { return t === "grey" ? t : e; } -const up = ve({ +const Nu = ye({ prop: "color", themeKey: "palette", - transform: Dt -}), wp = ve({ + transform: jt +}), ku = ye({ prop: "bgcolor", cssProperty: "backgroundColor", themeKey: "palette", - transform: Dt -}), fp = ve({ + transform: jt +}), Eu = ye({ prop: "backgroundColor", themeKey: "palette", - transform: Dt + transform: jt }); -ur(up, wp, fp); -function Ie(e) { +gr(Nu, ku, Eu); +function Ae(e) { return e <= 1 && e !== 0 ? `${e * 100}%` : e; } -const mp = ve({ +const Tu = ye({ prop: "width", - transform: Ie -}), yo = (e) => { + transform: Ae +}), Co = (e) => { if (e.maxWidth !== void 0 && e.maxWidth !== null) { const t = (n) => { var r, o; - const a = ((r = e.theme) == null || (r = r.breakpoints) == null || (r = r.values) == null ? void 0 : r[n]) || vo[n]; + const a = ((r = e.theme) == null || (r = r.breakpoints) == null || (r = r.values) == null ? void 0 : r[n]) || To[n]; return a ? ((o = e.theme) == null || (o = o.breakpoints) == null ? void 0 : o.unit) !== "px" ? { maxWidth: `${a}${e.theme.breakpoints.unit}` } : { maxWidth: a } : { - maxWidth: Ie(n) + maxWidth: Ae(n) }; }; - return Qe(e, e.maxWidth, t); + return rt(e, e.maxWidth, t); } return null; }; -yo.filterProps = ["maxWidth"]; -const hp = ve({ +Co.filterProps = ["maxWidth"]; +const Cu = ye({ prop: "minWidth", - transform: Ie -}), gp = ve({ + transform: Ae +}), Su = ye({ prop: "height", - transform: Ie -}), bp = ve({ + transform: Ae +}), Ou = ye({ prop: "maxHeight", - transform: Ie -}), vp = ve({ + transform: Ae +}), Ru = ye({ prop: "minHeight", - transform: Ie + transform: Ae }); -ve({ +ye({ prop: "size", cssProperty: "width", - transform: Ie + transform: Ae }); -ve({ +ye({ prop: "size", cssProperty: "height", - transform: Ie + transform: Ae }); -const yp = ve({ +const _u = ye({ prop: "boxSizing" }); -ur(mp, yo, hp, gp, bp, vp, yp); -const xp = { +gr(Tu, Co, Cu, Su, Ou, Ru, _u); +const Pu = { // borders border: { themeKey: "borders", - transform: Me + transform: Ve }, borderTop: { themeKey: "borders", - transform: Me + transform: Ve }, borderRight: { themeKey: "borders", - transform: Me + transform: Ve }, borderBottom: { themeKey: "borders", - transform: Me + transform: Ve }, borderLeft: { themeKey: "borders", - transform: Me + transform: Ve }, borderColor: { themeKey: "palette" @@ -4703,149 +4703,149 @@ const xp = { }, outline: { themeKey: "borders", - transform: Me + transform: Ve }, outlineColor: { themeKey: "palette" }, borderRadius: { themeKey: "shape.borderRadius", - style: wr + style: br }, // palette color: { themeKey: "palette", - transform: Dt + transform: jt }, bgcolor: { themeKey: "palette", cssProperty: "backgroundColor", - transform: Dt + transform: jt }, backgroundColor: { themeKey: "palette", - transform: Dt + transform: jt }, // spacing p: { - style: ge + style: be }, pt: { - style: ge + style: be }, pr: { - style: ge + style: be }, pb: { - style: ge + style: be }, pl: { - style: ge + style: be }, px: { - style: ge + style: be }, py: { - style: ge + style: be }, padding: { - style: ge + style: be }, paddingTop: { - style: ge + style: be }, paddingRight: { - style: ge + style: be }, paddingBottom: { - style: ge + style: be }, paddingLeft: { - style: ge + style: be }, paddingX: { - style: ge + style: be }, paddingY: { - style: ge + style: be }, paddingInline: { - style: ge + style: be }, paddingInlineStart: { - style: ge + style: be }, paddingInlineEnd: { - style: ge + style: be }, paddingBlock: { - style: ge + style: be }, paddingBlockStart: { - style: ge + style: be }, paddingBlockEnd: { - style: ge + style: be }, m: { - style: he + style: ge }, mt: { - style: he + style: ge }, mr: { - style: he + style: ge }, mb: { - style: he + style: ge }, ml: { - style: he + style: ge }, mx: { - style: he + style: ge }, my: { - style: he + style: ge }, margin: { - style: he + style: ge }, marginTop: { - style: he + style: ge }, marginRight: { - style: he + style: ge }, marginBottom: { - style: he + style: ge }, marginLeft: { - style: he + style: ge }, marginX: { - style: he + style: ge }, marginY: { - style: he + style: ge }, marginInline: { - style: he + style: ge }, marginInlineStart: { - style: he + style: ge }, marginInlineEnd: { - style: he + style: ge }, marginBlock: { - style: he + style: ge }, marginBlockStart: { - style: he + style: ge }, marginBlockEnd: { - style: he + style: ge }, // display displayPrint: { @@ -4877,13 +4877,13 @@ const xp = { justifySelf: {}, // grid gap: { - style: fr + style: vr }, rowGap: { - style: hr + style: xr }, columnGap: { - style: mr + style: yr }, gridColumn: {}, gridRow: {}, @@ -4909,22 +4909,22 @@ const xp = { }, // sizing width: { - transform: Ie + transform: Ae }, maxWidth: { - style: yo + style: Co }, minWidth: { - transform: Ie + transform: Ae }, height: { - transform: Ie + transform: Ae }, maxHeight: { - transform: Ie + transform: Ae }, minHeight: { - transform: Ie + transform: Ae }, boxSizing: {}, // typography @@ -4948,17 +4948,17 @@ const xp = { cssProperty: !1, themeKey: "typography" } -}, xo = xp; -function Np(...e) { +}, So = Pu; +function $u(...e) { const t = e.reduce((r, o) => r.concat(Object.keys(o)), []), n = new Set(t); return e.every((r) => n.size === Object.keys(r).length); } -function kp(e, t) { +function Iu(e, t) { return typeof e == "function" ? e(t) : e; } -function Ep() { +function Au() { function e(n, r, o, a) { - const i = { + const s = { [n]: r, theme: o }, l = a[n]; @@ -4969,7 +4969,7 @@ function Ep() { const { cssProperty: c = n, themeKey: d, - transform: p, + transform: u, style: h } = l; if (r == null) @@ -4978,10 +4978,10 @@ function Ep() { return { [n]: r }; - const w = cr(o, d) || {}; - return h ? h(i) : Qe(i, r, (v) => { - let f = Wn(w, p, v); - return v === f && typeof v == "string" && (f = Wn(w, p, `${n}${v === "default" ? "" : We(v)}`, v)), c === !1 ? f : { + const w = fr(o, d) || {}; + return h ? h(s) : rt(s, r, (v) => { + let f = or(w, u, v); + return v === f && typeof v == "string" && (f = or(w, u, `${n}${v === "default" ? "" : Ze(v)}`, v)), c === !1 ? f : { [c]: f }; }); @@ -4994,7 +4994,7 @@ function Ep() { } = n || {}; if (!o) return null; - const i = (r = a.unstable_sxConfig) != null ? r : xo; + const s = (r = a.unstable_sxConfig) != null ? r : So; function l(c) { let d = c; if (typeof c == "function") @@ -5003,259 +5003,259 @@ function Ep() { return c; if (!d) return null; - const p = Dd(a.breakpoints), h = Object.keys(p); - let w = p; + const u = Hd(a.breakpoints), h = Object.keys(u); + let w = u; return Object.keys(d).forEach((b) => { - const v = kp(d[b], a); + const v = Iu(d[b], a); if (v != null) if (typeof v == "object") - if (i[b]) - w = cn(w, e(b, v, a, i)); + if (s[b]) + w = fn(w, e(b, v, a, s)); else { - const f = Qe({ + const f = rt({ theme: a }, v, (m) => ({ [b]: m })); - Np(f, v) ? w[b] = t({ + $u(f, v) ? w[b] = t({ sx: v, theme: a - }) : w = cn(w, f); + }) : w = fn(w, f); } else - w = cn(w, e(b, v, a, i)); - }), Md(h, w); + w = fn(w, e(b, v, a, s)); + }), Xd(h, w); } return Array.isArray(o) ? o.map(l) : l(o); } return t; } -const Ki = Ep(); -Ki.filterProps = ["sx"]; -const No = Ki; -function Tp(e, t) { +const Qs = Au(); +Qs.filterProps = ["sx"]; +const Oo = Qs; +function Du(e, t) { const n = this; return n.vars && typeof n.getColorSchemeSelector == "function" ? { [n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/, "*:where($1)")]: t } : n.palette.mode === e ? t : {}; } -const Cp = ["breakpoints", "palette", "spacing", "shape"]; -function ko(e = {}, ...t) { +const Mu = ["breakpoints", "palette", "spacing", "shape"]; +function Ro(e = {}, ...t) { const { breakpoints: n = {}, palette: r = {}, spacing: o, shape: a = {} - } = e, i = Ne(e, Cp), l = _d(n), c = Gd(o); - let d = Ze({ + } = e, s = ke(e, Mu), l = Fd(n), c = eu(o); + let d = nt({ breakpoints: l, direction: "ltr", components: {}, // Inject component definitions. - palette: R({ + palette: $({ mode: "light" }, r), spacing: c, - shape: R({}, Id, a) - }, i); - return d.applyStyles = Tp, d = t.reduce((p, h) => Ze(p, h), d), d.unstable_sxConfig = R({}, xo, i == null ? void 0 : i.unstable_sxConfig), d.unstable_sx = function(h) { - return No({ + shape: $({}, Ud, a) + }, s); + return d.applyStyles = Du, d = t.reduce((u, h) => nt(u, h), d), d.unstable_sxConfig = $({}, So, s == null ? void 0 : s.unstable_sxConfig), d.unstable_sx = function(h) { + return Oo({ sx: h, theme: this }); }, d; } -function Sp(e) { +function Bu(e) { return Object.keys(e).length === 0; } -function Ji(e = null) { - const t = M.useContext(vl); - return !t || Sp(t) ? e : t; +function ei(e = null) { + const t = j.useContext(Rl); + return !t || Bu(t) ? e : t; } -const Op = ko(); -function Zi(e = Op) { - return Ji(e); +const ju = Ro(); +function ti(e = ju) { + return ei(e); } -const Rp = ["ownerState"], Pp = ["variants"], _p = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; -function $p(e) { +const Vu = ["ownerState"], Lu = ["variants"], Fu = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; +function zu(e) { return Object.keys(e).length === 0; } -function Ip(e) { +function Uu(e) { return typeof e == "string" && // 96 is one less than the char code // for "a" so this is checking that // it's a lowercase character e.charCodeAt(0) > 96; } -function Un(e) { +function Kn(e) { return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as"; } -const Ap = ko(), ka = (e) => e && e.charAt(0).toLowerCase() + e.slice(1); -function jn({ +const Gu = Ro(), Ra = (e) => e && e.charAt(0).toLowerCase() + e.slice(1); +function Hn({ defaultTheme: e, theme: t, themeId: n }) { - return $p(t) ? e : t[n] || t; + return zu(t) ? e : t[n] || t; } -function Dp(e) { +function Hu(e) { return e ? (t, n) => n[e] : null; } -function Gn(e, t) { +function Jn(e, t) { let { ownerState: n - } = t, r = Ne(t, Rp); - const o = typeof e == "function" ? e(R({ + } = t, r = ke(t, Vu); + const o = typeof e == "function" ? e($({ ownerState: n }, r)) : e; if (Array.isArray(o)) - return o.flatMap((a) => Gn(a, R({ + return o.flatMap((a) => Jn(a, $({ ownerState: n }, r))); if (o && typeof o == "object" && Array.isArray(o.variants)) { const { variants: a = [] } = o; - let l = Ne(o, Pp); + let l = ke(o, Lu); return a.forEach((c) => { let d = !0; - typeof c.props == "function" ? d = c.props(R({ + typeof c.props == "function" ? d = c.props($({ ownerState: n - }, r, n)) : Object.keys(c.props).forEach((p) => { - (n == null ? void 0 : n[p]) !== c.props[p] && r[p] !== c.props[p] && (d = !1); - }), d && (Array.isArray(l) || (l = [l]), l.push(typeof c.style == "function" ? c.style(R({ + }, r, n)) : Object.keys(c.props).forEach((u) => { + (n == null ? void 0 : n[u]) !== c.props[u] && r[u] !== c.props[u] && (d = !1); + }), d && (Array.isArray(l) || (l = [l]), l.push(typeof c.style == "function" ? c.style($({ ownerState: n }, r, n)) : c.style)); }), l; } return o; } -function Mp(e = {}) { +function Xu(e = {}) { const { themeId: t, - defaultTheme: n = Ap, - rootShouldForwardProp: r = Un, - slotShouldForwardProp: o = Un - } = e, a = (i) => No(R({}, i, { - theme: jn(R({}, i, { + defaultTheme: n = Gu, + rootShouldForwardProp: r = Kn, + slotShouldForwardProp: o = Kn + } = e, a = (s) => Oo($({}, s, { + theme: Hn($({}, s, { defaultTheme: n, themeId: t })) })); - return a.__mui_systemSx = !0, (i, l = {}) => { - yl(i, (g) => g.filter((_) => !(_ != null && _.__mui_systemSx))); + return a.__mui_systemSx = !0, (s, l = {}) => { + _l(s, (g) => g.filter((I) => !(I != null && I.__mui_systemSx))); const { name: c, slot: d, - skipVariantsResolver: p, + skipVariantsResolver: u, skipSx: h, // TODO v6: remove `lowercaseFirstLetter()` in the next major release // For more details: https://github.com/mui/material-ui/pull/37908 - overridesResolver: w = Dp(ka(d)) - } = l, b = Ne(l, _p), v = p !== void 0 ? p : ( + overridesResolver: w = Hu(Ra(d)) + } = l, b = ke(l, Fu), v = u !== void 0 ? u : ( // TODO v6: remove `Root` in the next major release // For more details: https://github.com/mui/material-ui/pull/37908 d && d !== "Root" && d !== "root" || !1 ), f = h || !1; let m; - process.env.NODE_ENV !== "production" && c && (m = `${c}-${ka(d || "Root")}`); - let N = Un; - d === "Root" || d === "root" ? N = r : d ? N = o : Ip(i) && (N = void 0); - const I = bl(i, R({ + process.env.NODE_ENV !== "production" && c && (m = `${c}-${Ra(d || "Root")}`); + let N = Kn; + d === "Root" || d === "root" ? N = r : d ? N = o : Uu(s) && (N = void 0); + const A = Ol(s, $({ shouldForwardProp: N, label: m - }, b)), O = (g) => typeof g == "function" && g.__emotion_real !== g || ht(g) ? (_) => Gn(g, R({}, _, { - theme: jn({ - theme: _.theme, + }, b)), _ = (g) => typeof g == "function" && g.__emotion_real !== g || bt(g) ? (I) => Jn(g, $({}, I, { + theme: Hn({ + theme: I.theme, defaultTheme: n, themeId: t }) - })) : g, E = (g, ..._) => { - let L = O(g); - const H = _ ? _.map(O) : []; - c && w && H.push((k) => { - const B = jn(R({}, k, { + })) : g, E = (g, ...I) => { + let U = _(g); + const W = I ? I.map(_) : []; + c && w && W.push((k) => { + const B = Hn($({}, k, { defaultTheme: n, themeId: t })); if (!B.components || !B.components[c] || !B.components[c].styleOverrides) return null; - const D = B.components[c].styleOverrides, J = {}; - return Object.entries(D).forEach(([q, U]) => { - J[q] = Gn(U, R({}, k, { + const D = B.components[c].styleOverrides, Q = {}; + return Object.entries(D).forEach(([J, X]) => { + Q[J] = Jn(X, $({}, k, { theme: B })); - }), w(k, J); - }), c && !v && H.push((k) => { + }), w(k, Q); + }), c && !v && W.push((k) => { var B; - const D = jn(R({}, k, { + const D = Hn($({}, k, { defaultTheme: n, themeId: t - })), J = D == null || (B = D.components) == null || (B = B[c]) == null ? void 0 : B.variants; - return Gn({ - variants: J - }, R({}, k, { + })), Q = D == null || (B = D.components) == null || (B = B[c]) == null ? void 0 : B.variants; + return Jn({ + variants: Q + }, $({}, k, { theme: D })); - }), f || H.push(a); - const C = H.length - _.length; - if (Array.isArray(g) && C > 0) { - const k = new Array(C).fill(""); - L = [...g, ...k], L.raw = [...g.raw, ...k]; + }), f || W.push(a); + const O = W.length - I.length; + if (Array.isArray(g) && O > 0) { + const k = new Array(O).fill(""); + U = [...g, ...k], U.raw = [...g.raw, ...k]; } - const P = I(L, ...H); + const P = A(U, ...W); if (process.env.NODE_ENV !== "production") { let k; - c && (k = `${c}${We(d || "")}`), k === void 0 && (k = `Styled(${ad(i)})`), P.displayName = k; + c && (k = `${c}${Ze(d || "")}`), k === void 0 && (k = `Styled(${md(s)})`), P.displayName = k; } - return i.muiName && (P.muiName = i.muiName), P; + return s.muiName && (P.muiName = s.muiName), P; }; - return I.withConfig && (E.withConfig = I.withConfig), E; + return A.withConfig && (E.withConfig = A.withConfig), E; }; } -function Bp(e) { +function Yu(e) { const { theme: t, name: n, props: r } = e; - return !t || !t.components || !t.components[n] || !t.components[n].defaultProps ? r : Gi(t.components[n].defaultProps, r); + return !t || !t.components || !t.components[n] || !t.components[n].defaultProps ? r : Ys(t.components[n].defaultProps, r); } -function jp({ +function Wu({ props: e, name: t, defaultTheme: n, themeId: r }) { - let o = Zi(n); - return r && (o = o[r] || o), Bp({ + let o = ti(n); + return r && (o = o[r] || o), Yu({ theme: o, name: t, props: e }); } -function Eo(e, t = 0, n = 1) { - return process.env.NODE_ENV !== "production" && (e < t || e > n) && console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`), Od(e, t, n); +function _o(e, t = 0, n = 1) { + return process.env.NODE_ENV !== "production" && (e < t || e > n) && console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`), jd(e, t, n); } -function Vp(e) { +function qu(e) { e = e.slice(1); const t = new RegExp(`.{1,${e.length >= 6 ? 2 : 1}}`, "g"); let n = e.match(t); return n && n[0].length === 1 && (n = n.map((r) => r + r)), n ? `rgb${n.length === 4 ? "a" : ""}(${n.map((r, o) => o < 3 ? parseInt(r, 16) : Math.round(parseInt(r, 16) / 255 * 1e3) / 1e3).join(", ")})` : ""; } -function Nt(e) { +function Et(e) { if (e.type) return e; if (e.charAt(0) === "#") - return Nt(Vp(e)); + return Et(qu(e)); const t = e.indexOf("("), n = e.substring(0, t); if (["rgb", "rgba", "hsl", "hsla", "color"].indexOf(n) === -1) throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${e}\` color. -The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : Vt(9, e)); +The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : Ut(9, e)); let r = e.substring(t + 1, e.length - 1), o; if (n === "color") { if (r = r.split(" "), o = r.shift(), r.length === 4 && r[3].charAt(0) === "/" && (r[3] = r[3].slice(1)), ["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].indexOf(o) === -1) throw new Error(process.env.NODE_ENV !== "production" ? `MUI: unsupported \`${o}\` color space. -The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : Vt(10, o)); +The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : Ut(10, o)); } else r = r.split(","); return r = r.map((a) => parseFloat(a)), { @@ -5264,7 +5264,7 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg colorSpace: o }; } -function gr(e) { +function Nr(e) { const { type: t, colorSpace: n @@ -5274,40 +5274,40 @@ function gr(e) { } = e; return t.indexOf("rgb") !== -1 ? r = r.map((o, a) => a < 3 ? parseInt(o, 10) : o) : t.indexOf("hsl") !== -1 && (r[1] = `${r[1]}%`, r[2] = `${r[2]}%`), t.indexOf("color") !== -1 ? r = `${n} ${r.join(" ")}` : r = `${r.join(", ")}`, `${t}(${r})`; } -function Lp(e) { - e = Nt(e); +function Ku(e) { + e = Et(e); const { values: t - } = e, n = t[0], r = t[1] / 100, o = t[2] / 100, a = r * Math.min(o, 1 - o), i = (d, p = (d + n / 30) % 12) => o - a * Math.max(Math.min(p - 3, 9 - p, 1), -1); + } = e, n = t[0], r = t[1] / 100, o = t[2] / 100, a = r * Math.min(o, 1 - o), s = (d, u = (d + n / 30) % 12) => o - a * Math.max(Math.min(u - 3, 9 - u, 1), -1); let l = "rgb"; - const c = [Math.round(i(0) * 255), Math.round(i(8) * 255), Math.round(i(4) * 255)]; - return e.type === "hsla" && (l += "a", c.push(t[3])), gr({ + const c = [Math.round(s(0) * 255), Math.round(s(8) * 255), Math.round(s(4) * 255)]; + return e.type === "hsla" && (l += "a", c.push(t[3])), Nr({ type: l, values: c }); } -function Ea(e) { - e = Nt(e); - let t = e.type === "hsl" || e.type === "hsla" ? Nt(Lp(e)).values : e.values; +function _a(e) { + e = Et(e); + let t = e.type === "hsl" || e.type === "hsla" ? Et(Ku(e)).values : e.values; return t = t.map((n) => (e.type !== "color" && (n /= 255), n <= 0.03928 ? n / 12.92 : ((n + 0.055) / 1.055) ** 2.4)), Number((0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2]).toFixed(3)); } -function Ta(e, t) { - const n = Ea(e), r = Ea(t); +function Pa(e, t) { + const n = _a(e), r = _a(t); return (Math.max(n, r) + 0.05) / (Math.min(n, r) + 0.05); } -function Qi(e, t) { - return e = Nt(e), t = Eo(t), (e.type === "rgb" || e.type === "hsl") && (e.type += "a"), e.type === "color" ? e.values[3] = `/${t}` : e.values[3] = t, gr(e); +function ni(e, t) { + return e = Et(e), t = _o(t), (e.type === "rgb" || e.type === "hsl") && (e.type += "a"), e.type === "color" ? e.values[3] = `/${t}` : e.values[3] = t, Nr(e); } -function zp(e, t) { - if (e = Nt(e), t = Eo(t), e.type.indexOf("hsl") !== -1) +function Ju(e, t) { + if (e = Et(e), t = _o(t), e.type.indexOf("hsl") !== -1) e.values[2] *= 1 - t; else if (e.type.indexOf("rgb") !== -1 || e.type.indexOf("color") !== -1) for (let n = 0; n < 3; n += 1) e.values[n] *= 1 - t; - return gr(e); + return Nr(e); } -function Fp(e, t) { - if (e = Nt(e), t = Eo(t), e.type.indexOf("hsl") !== -1) +function Zu(e, t) { + if (e = Et(e), t = _o(t), e.type.indexOf("hsl") !== -1) e.values[2] += (100 - e.values[2]) * t; else if (e.type.indexOf("rgb") !== -1) for (let n = 0; n < 3; n += 1) @@ -5315,10 +5315,10 @@ function Fp(e, t) { else if (e.type.indexOf("color") !== -1) for (let n = 0; n < 3; n += 1) e.values[n] += (1 - e.values[n]) * t; - return gr(e); + return Nr(e); } -function Up(e, t) { - return R({ +function Qu(e, t) { + return $({ toolbar: { minHeight: 56, [e.up("xs")]: { @@ -5332,10 +5332,10 @@ function Up(e, t) { } }, t); } -const Gp = { +const ep = { black: "#000", white: "#fff" -}, bn = Gp, Hp = { +}, kn = ep, tp = { 50: "#fafafa", 100: "#f5f5f5", 200: "#eeeeee", @@ -5350,7 +5350,7 @@ const Gp = { A200: "#eeeeee", A400: "#bdbdbd", A700: "#616161" -}, Xp = Hp, Yp = { +}, np = tp, rp = { 50: "#f3e5f5", 100: "#e1bee7", 200: "#ce93d8", @@ -5365,7 +5365,7 @@ const Gp = { A200: "#e040fb", A400: "#d500f9", A700: "#aa00ff" -}, Ot = Yp, Wp = { +}, Pt = rp, op = { 50: "#ffebee", 100: "#ffcdd2", 200: "#ef9a9a", @@ -5380,7 +5380,7 @@ const Gp = { A200: "#ff5252", A400: "#ff1744", A700: "#d50000" -}, Rt = Wp, qp = { +}, $t = op, ap = { 50: "#fff3e0", 100: "#ffe0b2", 200: "#ffcc80", @@ -5395,7 +5395,7 @@ const Gp = { A200: "#ffab40", A400: "#ff9100", A700: "#ff6d00" -}, Qt = qp, Kp = { +}, on = ap, sp = { 50: "#e3f2fd", 100: "#bbdefb", 200: "#90caf9", @@ -5410,7 +5410,7 @@ const Gp = { A200: "#448aff", A400: "#2979ff", A700: "#2962ff" -}, Pt = Kp, Jp = { +}, It = sp, ip = { 50: "#e1f5fe", 100: "#b3e5fc", 200: "#81d4fa", @@ -5425,7 +5425,7 @@ const Gp = { A200: "#40c4ff", A400: "#00b0ff", A700: "#0091ea" -}, _t = Jp, Zp = { +}, At = ip, lp = { 50: "#e8f5e9", 100: "#c8e6c9", 200: "#a5d6a7", @@ -5440,7 +5440,7 @@ const Gp = { A200: "#69f0ae", A400: "#00e676", A700: "#00c853" -}, $t = Zp, Qp = ["mode", "contrastThreshold", "tonalOffset"], Ca = { +}, Dt = lp, cp = ["mode", "contrastThreshold", "tonalOffset"], $a = { // The colors used to style the text. text: { // The most important text. @@ -5455,8 +5455,8 @@ const Gp = { // The background colors used to style the surfaces. // Consistency between these values is important. background: { - paper: bn.white, - default: bn.white + paper: kn.white, + default: kn.white }, // The colors used to style the action elements. action: { @@ -5477,9 +5477,9 @@ const Gp = { focusOpacity: 0.12, activatedOpacity: 0.12 } -}, jr = { +}, Ur = { text: { - primary: bn.white, + primary: kn.white, secondary: "rgba(255, 255, 255, 0.7)", disabled: "rgba(255, 255, 255, 0.5)", icon: "rgba(255, 255, 255, 0.5)" @@ -5490,7 +5490,7 @@ const Gp = { default: "#121212" }, action: { - active: bn.white, + active: kn.white, hover: "rgba(255, 255, 255, 0.08)", hoverOpacity: 0.08, selected: "rgba(255, 255, 255, 0.16)", @@ -5503,87 +5503,87 @@ const Gp = { activatedOpacity: 0.24 } }; -function Sa(e, t, n, r) { +function Ia(e, t, n, r) { const o = r.light || r, a = r.dark || r * 1.5; - e[t] || (e.hasOwnProperty(n) ? e[t] = e[n] : t === "light" ? e.light = Fp(e.main, o) : t === "dark" && (e.dark = zp(e.main, a))); + e[t] || (e.hasOwnProperty(n) ? e[t] = e[n] : t === "light" ? e.light = Zu(e.main, o) : t === "dark" && (e.dark = Ju(e.main, a))); } -function eu(e = "light") { +function dp(e = "light") { return e === "dark" ? { - main: Pt[200], - light: Pt[50], - dark: Pt[400] + main: It[200], + light: It[50], + dark: It[400] } : { - main: Pt[700], - light: Pt[400], - dark: Pt[800] + main: It[700], + light: It[400], + dark: It[800] }; } -function tu(e = "light") { +function up(e = "light") { return e === "dark" ? { - main: Ot[200], - light: Ot[50], - dark: Ot[400] + main: Pt[200], + light: Pt[50], + dark: Pt[400] } : { - main: Ot[500], - light: Ot[300], - dark: Ot[700] + main: Pt[500], + light: Pt[300], + dark: Pt[700] }; } -function nu(e = "light") { +function pp(e = "light") { return e === "dark" ? { - main: Rt[500], - light: Rt[300], - dark: Rt[700] + main: $t[500], + light: $t[300], + dark: $t[700] } : { - main: Rt[700], - light: Rt[400], - dark: Rt[800] + main: $t[700], + light: $t[400], + dark: $t[800] }; } -function ru(e = "light") { +function wp(e = "light") { return e === "dark" ? { - main: _t[400], - light: _t[300], - dark: _t[700] + main: At[400], + light: At[300], + dark: At[700] } : { - main: _t[700], - light: _t[500], - dark: _t[900] + main: At[700], + light: At[500], + dark: At[900] }; } -function ou(e = "light") { +function fp(e = "light") { return e === "dark" ? { - main: $t[400], - light: $t[300], - dark: $t[700] + main: Dt[400], + light: Dt[300], + dark: Dt[700] } : { - main: $t[800], - light: $t[500], - dark: $t[900] + main: Dt[800], + light: Dt[500], + dark: Dt[900] }; } -function au(e = "light") { +function mp(e = "light") { return e === "dark" ? { - main: Qt[400], - light: Qt[300], - dark: Qt[700] + main: on[400], + light: on[300], + dark: on[700] } : { main: "#ed6c02", // closest to orange[800] that pass 3:1. - light: Qt[500], - dark: Qt[900] + light: on[500], + dark: on[900] }; } -function iu(e) { +function hp(e) { const { mode: t = "light", contrastThreshold: n = 3, tonalOffset: r = 0.2 - } = e, o = Ne(e, Qp), a = e.primary || eu(t), i = e.secondary || tu(t), l = e.error || nu(t), c = e.info || ru(t), d = e.success || ou(t), p = e.warning || au(t); + } = e, o = ke(e, cp), a = e.primary || dp(t), s = e.secondary || up(t), l = e.error || pp(t), c = e.info || wp(t), d = e.success || fp(t), u = e.warning || mp(t); function h(f) { - const m = Ta(f, jr.text.primary) >= n ? jr.text.primary : Ca.text.primary; + const m = Pa(f, Ur.text.primary) >= n ? Ur.text.primary : $a.text.primary; if (process.env.NODE_ENV !== "production") { - const N = Ta(f, m); + const N = Pa(f, m); N < 3 && console.error([`MUI: The contrast ratio of ${N}:1 for ${m} on ${f}`, "falls below the WCAG recommended absolute minimum contrast ratio of 3:1.", "https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(` `)); } @@ -5593,12 +5593,12 @@ function iu(e) { color: f, name: m, mainShade: N = 500, - lightShade: I = 300, - darkShade: O = 700 + lightShade: A = 300, + darkShade: _ = 700 }) => { - if (f = R({}, f), !f.main && f[N] && (f.main = f[N]), !f.hasOwnProperty("main")) + if (f = $({}, f), !f.main && f[N] && (f.main = f[N]), !f.hasOwnProperty("main")) throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${m ? ` (${m})` : ""} provided to augmentColor(color) is invalid. -The color object needs to have a \`main\` property or a \`${N}\` property.` : Vt(11, m ? ` (${m})` : "", N)); +The color object needs to have a \`main\` property or a \`${N}\` property.` : Ut(11, m ? ` (${m})` : "", N)); if (typeof f.main != "string") throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${m ? ` (${m})` : ""} provided to augmentColor(color) is invalid. \`color.main\` should be a string, but \`${JSON.stringify(f.main)}\` was provided instead. @@ -5613,15 +5613,15 @@ const theme1 = createTheme({ palette: { const theme2 = createTheme({ palette: { primary: { main: green[500] }, -} });` : Vt(12, m ? ` (${m})` : "", JSON.stringify(f.main))); - return Sa(f, "light", I, r), Sa(f, "dark", O, r), f.contrastText || (f.contrastText = h(f.main)), f; +} });` : Ut(12, m ? ` (${m})` : "", JSON.stringify(f.main))); + return Ia(f, "light", A, r), Ia(f, "dark", _, r), f.contrastText || (f.contrastText = h(f.main)), f; }, b = { - dark: jr, - light: Ca + dark: Ur, + light: $a }; - return process.env.NODE_ENV !== "production" && (b[t] || console.error(`MUI: The palette mode \`${t}\` is not supported.`)), Ze(R({ + return process.env.NODE_ENV !== "production" && (b[t] || console.error(`MUI: The palette mode \`${t}\` is not supported.`)), nt($({ // A collection of common colors. - common: R({}, bn), + common: $({}, kn), // prevent mutable object. // The palette mode, can be light or dark. mode: t, @@ -5632,7 +5632,7 @@ const theme2 = createTheme({ palette: { }), // The colors used to represent secondary interface elements for a user. secondary: w({ - color: i, + color: s, name: "secondary", mainShade: "A400", lightShade: "A200", @@ -5645,7 +5645,7 @@ const theme2 = createTheme({ palette: { }), // The colors used to represent potentially dangerous actions or important messages. warning: w({ - color: p, + color: u, name: "warning" }), // The colors used to present information to the user that is neutral and not necessarily important. @@ -5659,7 +5659,7 @@ const theme2 = createTheme({ palette: { name: "success" }), // The grey colors. - grey: Xp, + grey: np, // Used by `getContrastText()` to maximize the contrast between // the background and the text. contrastThreshold: n, @@ -5673,53 +5673,53 @@ const theme2 = createTheme({ palette: { tonalOffset: r }, b[t]), o); } -const su = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"]; -function lu(e) { +const gp = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"]; +function bp(e) { return Math.round(e * 1e5) / 1e5; } -const Oa = { +const Aa = { textTransform: "uppercase" -}, Ra = '"Roboto", "Helvetica", "Arial", sans-serif'; -function cu(e, t) { +}, Da = '"Roboto", "Helvetica", "Arial", sans-serif'; +function vp(e, t) { const n = typeof t == "function" ? t(e) : t, { - fontFamily: r = Ra, + fontFamily: r = Da, // The default font size of the Material Specification. fontSize: o = 14, // px fontWeightLight: a = 300, - fontWeightRegular: i = 400, + fontWeightRegular: s = 400, fontWeightMedium: l = 500, fontWeightBold: c = 700, // Tell MUI what's the font-size on the html element. // 16px is the default font-size used by browsers. htmlFontSize: d = 16, // Apply the CSS properties to all the variants. - allVariants: p, + allVariants: u, pxToRem: h - } = n, w = Ne(n, su); + } = n, w = ke(n, gp); process.env.NODE_ENV !== "production" && (typeof o != "number" && console.error("MUI: `fontSize` is required to be a number."), typeof d != "number" && console.error("MUI: `htmlFontSize` is required to be a number.")); - const b = o / 14, v = h || ((N) => `${N / d * b}rem`), f = (N, I, O, E, g) => R({ + const b = o / 14, v = h || ((N) => `${N / d * b}rem`), f = (N, A, _, E, g) => $({ fontFamily: r, fontWeight: N, - fontSize: v(I), + fontSize: v(A), // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/ - lineHeight: O - }, r === Ra ? { - letterSpacing: `${lu(E / I)}em` - } : {}, g, p), m = { + lineHeight: _ + }, r === Da ? { + letterSpacing: `${bp(E / A)}em` + } : {}, g, u), m = { h1: f(a, 96, 1.167, -1.5), h2: f(a, 60, 1.2, -0.5), - h3: f(i, 48, 1.167, 0), - h4: f(i, 34, 1.235, 0.25), - h5: f(i, 24, 1.334, 0), + h3: f(s, 48, 1.167, 0), + h4: f(s, 34, 1.235, 0.25), + h5: f(s, 24, 1.334, 0), h6: f(l, 20, 1.6, 0.15), - subtitle1: f(i, 16, 1.75, 0.15), + subtitle1: f(s, 16, 1.75, 0.15), subtitle2: f(l, 14, 1.57, 0.1), - body1: f(i, 16, 1.5, 0.15), - body2: f(i, 14, 1.43, 0.15), - button: f(l, 14, 1.75, 0.4, Oa), - caption: f(i, 12, 1.66, 0.4), - overline: f(i, 12, 2.66, 1, Oa), + body1: f(s, 16, 1.5, 0.15), + body2: f(s, 14, 1.43, 0.15), + button: f(l, 14, 1.75, 0.4, Aa), + caption: f(s, 12, 1.66, 0.4), + overline: f(s, 12, 2.66, 1, Aa), // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types. inherit: { fontFamily: "inherit", @@ -5729,13 +5729,13 @@ function cu(e, t) { letterSpacing: "inherit" } }; - return Ze(R({ + return nt($({ htmlFontSize: d, pxToRem: v, fontFamily: r, fontSize: o, fontWeightLight: a, - fontWeightRegular: i, + fontWeightRegular: s, fontWeightMedium: l, fontWeightBold: c }, m), w, { @@ -5743,11 +5743,11 @@ function cu(e, t) { // No need to clone deep }); } -const du = 0.2, pu = 0.14, uu = 0.12; -function fe(...e) { - return [`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${du})`, `${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${pu})`, `${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${uu})`].join(","); +const yp = 0.2, xp = 0.14, Np = 0.12; +function he(...e) { + return [`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${yp})`, `${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${xp})`, `${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Np})`].join(","); } -const wu = ["none", fe(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), fe(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), fe(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), fe(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), fe(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), fe(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), fe(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), fe(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), fe(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), fe(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), fe(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), fe(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), fe(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), fe(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), fe(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), fe(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), fe(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), fe(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), fe(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), fe(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), fe(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), fe(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), fe(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), fe(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)], fu = wu, mu = ["duration", "easing", "delay"], hu = { +const kp = ["none", he(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), he(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), he(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), he(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), he(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), he(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), he(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), he(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), he(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), he(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), he(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), he(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), he(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), he(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), he(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), he(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), he(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), he(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), he(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), he(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), he(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), he(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), he(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), he(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)], Ep = kp, Tp = ["duration", "easing", "delay"], Cp = { // This is the most common easing curve. easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)", // Objects enter the screen at full velocity from off-screen and @@ -5757,7 +5757,7 @@ const wu = ["none", fe(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), fe(0, 3, 1, -2, 0, easeIn: "cubic-bezier(0.4, 0, 1, 1)", // The sharp curve is used by objects that may return to the screen at any time. sharp: "cubic-bezier(0.4, 0, 0.6, 1)" -}, gu = { +}, Sp = { shortest: 150, shorter: 200, short: 250, @@ -5770,38 +5770,38 @@ const wu = ["none", fe(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), fe(0, 3, 1, -2, 0, // recommended when something is leaving screen leavingScreen: 195 }; -function Pa(e) { +function Ma(e) { return `${Math.round(e)}ms`; } -function bu(e) { +function Op(e) { if (!e) return 0; const t = e / 36; return Math.round((4 + 15 * t ** 0.25 + t / 5) * 10); } -function vu(e) { - const t = R({}, hu, e.easing), n = R({}, gu, e.duration); - return R({ - getAutoHeightDuration: bu, +function Rp(e) { + const t = $({}, Cp, e.easing), n = $({}, Sp, e.duration); + return $({ + getAutoHeightDuration: Op, create: (o = ["all"], a = {}) => { const { - duration: i = n.standard, + duration: s = n.standard, easing: l = t.easeInOut, delay: c = 0 - } = a, d = Ne(a, mu); + } = a, d = ke(a, Tp); if (process.env.NODE_ENV !== "production") { - const p = (w) => typeof w == "string", h = (w) => !isNaN(parseFloat(w)); - !p(o) && !Array.isArray(o) && console.error('MUI: Argument "props" must be a string or Array.'), !h(i) && !p(i) && console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`), p(l) || console.error('MUI: Argument "easing" must be a string.'), !h(c) && !p(c) && console.error('MUI: Argument "delay" must be a number or a string.'), typeof a != "object" && console.error(["MUI: Secong argument of transition.create must be an object.", "Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(` + const u = (w) => typeof w == "string", h = (w) => !isNaN(parseFloat(w)); + !u(o) && !Array.isArray(o) && console.error('MUI: Argument "props" must be a string or Array.'), !h(s) && !u(s) && console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`), u(l) || console.error('MUI: Argument "easing" must be a string.'), !h(c) && !u(c) && console.error('MUI: Argument "delay" must be a number or a string.'), typeof a != "object" && console.error(["MUI: Secong argument of transition.create must be an object.", "Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(` `)), Object.keys(d).length !== 0 && console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`); } - return (Array.isArray(o) ? o : [o]).map((p) => `${p} ${typeof i == "string" ? i : Pa(i)} ${l} ${typeof c == "string" ? c : Pa(c)}`).join(","); + return (Array.isArray(o) ? o : [o]).map((u) => `${u} ${typeof s == "string" ? s : Ma(s)} ${l} ${typeof c == "string" ? c : Ma(c)}`).join(","); } }, e, { easing: t, duration: n }); } -const yu = { +const _p = { mobileStepper: 1e3, fab: 1050, speedDial: 1050, @@ -5810,34 +5810,34 @@ const yu = { modal: 1300, snackbar: 1400, tooltip: 1500 -}, xu = yu, Nu = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"]; -function ku(e = {}, ...t) { +}, Pp = _p, $p = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"]; +function Ip(e = {}, ...t) { const { mixins: n = {}, palette: r = {}, transitions: o = {}, typography: a = {} - } = e, i = Ne(e, Nu); + } = e, s = ke(e, $p); if (e.vars) - throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name." : Vt(18)); - const l = iu(r), c = ko(e); - let d = Ze(c, { - mixins: Up(c.breakpoints, n), + throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name." : Ut(18)); + const l = hp(r), c = Ro(e); + let d = nt(c, { + mixins: Qu(c.breakpoints, n), palette: l, // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol. - shadows: fu.slice(), - typography: cu(l, a), - transitions: vu(o), - zIndex: R({}, xu) + shadows: Ep.slice(), + typography: vp(l, a), + transitions: Rp(o), + zIndex: $({}, Pp) }); - if (d = Ze(d, i), d = t.reduce((p, h) => Ze(p, h), d), process.env.NODE_ENV !== "production") { - const p = ["active", "checked", "completed", "disabled", "error", "expanded", "focused", "focusVisible", "required", "selected"], h = (w, b) => { + if (d = nt(d, s), d = t.reduce((u, h) => nt(u, h), d), process.env.NODE_ENV !== "production") { + const u = ["active", "checked", "completed", "disabled", "error", "expanded", "focused", "focusVisible", "required", "selected"], h = (w, b) => { let v; for (v in w) { const f = w[v]; - if (p.indexOf(v) !== -1 && Object.keys(f).length > 0) { + if (u.indexOf(v) !== -1 && Object.keys(f).length > 0) { if (process.env.NODE_ENV !== "production") { - const m = lr("", v); + const m = wr("", v); console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${v}\` internal state.`, "You can not override it like this: ", JSON.stringify(w, null, 2), "", `Instead, you need to use the '&.${m}' syntax:`, JSON.stringify({ root: { [`&.${m}`]: f @@ -5854,57 +5854,57 @@ function ku(e = {}, ...t) { b && w.indexOf("Mui") === 0 && h(b, w); }); } - return d.unstable_sxConfig = R({}, xo, i == null ? void 0 : i.unstable_sxConfig), d.unstable_sx = function(h) { - return No({ + return d.unstable_sxConfig = $({}, So, s == null ? void 0 : s.unstable_sxConfig), d.unstable_sx = function(h) { + return Oo({ sx: h, theme: this }); }, d; } -const Eu = ku(), To = Eu, Co = "$$material"; -function So({ +const Ap = Ip(), Po = Ap, $o = "$$material"; +function Io({ props: e, name: t }) { - return jp({ + return Wu({ props: e, name: t, - defaultTheme: To, - themeId: Co + defaultTheme: Po, + themeId: $o }); } -const Tu = (e) => Un(e) && e !== "classes", Cu = Mp({ - themeId: Co, - defaultTheme: To, - rootShouldForwardProp: Tu -}), On = Cu; -function Su(e) { - return lr("MuiSvgIcon", e); +const Dp = (e) => Kn(e) && e !== "classes", Mp = Xu({ + themeId: $o, + defaultTheme: Po, + rootShouldForwardProp: Dp +}), Mn = Mp; +function Bp(e) { + return wr("MuiSvgIcon", e); } -Yi("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]); -const Ou = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], Ru = (e) => { +Ks("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]); +const jp = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], Vp = (e) => { const { color: t, fontSize: n, classes: r } = e, o = { - root: ["root", t !== "inherit" && `color${We(t)}`, `fontSize${We(n)}`] + root: ["root", t !== "inherit" && `color${Ze(t)}`, `fontSize${Ze(n)}`] }; - return bo(o, Su, r); -}, Pu = On("svg", { + return Eo(o, Bp, r); +}, Lp = Mn("svg", { name: "MuiSvgIcon", slot: "Root", overridesResolver: (e, t) => { const { ownerState: n } = e; - return [t.root, n.color !== "inherit" && t[`color${We(n.color)}`], t[`fontSize${We(n.fontSize)}`]]; + return [t.root, n.color !== "inherit" && t[`color${Ze(n.color)}`], t[`fontSize${Ze(n.fontSize)}`]]; } })(({ theme: e, ownerState: t }) => { - var n, r, o, a, i, l, c, d, p, h, w, b, v; + var n, r, o, a, s, l, c, d, u, h, w, b, v; return { userSelect: "none", width: "1em", @@ -5919,9 +5919,9 @@ const Ou = ["children", "className", "color", "component", "fontSize", "htmlColo }), fontSize: { inherit: "inherit", - small: ((a = e.typography) == null || (i = a.pxToRem) == null ? void 0 : i.call(a, 20)) || "1.25rem", + small: ((a = e.typography) == null || (s = a.pxToRem) == null ? void 0 : s.call(a, 20)) || "1.25rem", medium: ((l = e.typography) == null || (c = l.pxToRem) == null ? void 0 : c.call(l, 24)) || "1.5rem", - large: ((d = e.typography) == null || (p = d.pxToRem) == null ? void 0 : p.call(d, 35)) || "2.1875rem" + large: ((d = e.typography) == null || (u = d.pxToRem) == null ? void 0 : u.call(d, 35)) || "2.1875rem" }[t.fontSize], // TODO v5 deprecate, v6 remove for sx color: (h = (w = (e.vars || e).palette) == null || (w = w[t.color]) == null ? void 0 : w.main) != null ? h : { @@ -5930,34 +5930,34 @@ const Ou = ["children", "className", "color", "component", "fontSize", "htmlColo inherit: void 0 }[t.color] }; -}), Oo = /* @__PURE__ */ M.forwardRef(function(t, n) { - const r = So({ +}), Ao = /* @__PURE__ */ j.forwardRef(function(t, n) { + const r = Io({ props: t, name: "MuiSvgIcon" }), { children: o, className: a, - color: i = "inherit", + color: s = "inherit", component: l = "svg", fontSize: c = "medium", htmlColor: d, - inheritViewBox: p = !1, + inheritViewBox: u = !1, titleAccess: h, viewBox: w = "0 0 24 24" - } = r, b = Ne(r, Ou), v = /* @__PURE__ */ M.isValidElement(o) && o.type === "svg", f = R({}, r, { - color: i, + } = r, b = ke(r, jp), v = /* @__PURE__ */ j.isValidElement(o) && o.type === "svg", f = $({}, r, { + color: s, component: l, fontSize: c, instanceFontSize: t.fontSize, - inheritViewBox: p, + inheritViewBox: u, viewBox: w, hasSvgAsChild: v }), m = {}; - p || (m.viewBox = w); - const N = Ru(f); - return /* @__PURE__ */ x(Pu, R({ + u || (m.viewBox = w); + const N = Vp(f); + return /* @__PURE__ */ x(Lp, $({ as: l, - className: bt(N.root, a), + className: yt(N.root, a), focusable: "false", color: d, "aria-hidden": h ? void 0 : !0, @@ -5965,12 +5965,12 @@ const Ou = ["children", "className", "color", "component", "fontSize", "htmlColo ref: n }, m, b, v && o.props, { ownerState: f, - children: [v ? o.props.children : o, h ? /* @__PURE__ */ s("title", { + children: [v ? o.props.children : o, h ? /* @__PURE__ */ i("title", { children: h }) : null] })); }); -process.env.NODE_ENV !== "production" && (Oo.propTypes = { +process.env.NODE_ENV !== "production" && (Ao.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -5978,15 +5978,15 @@ process.env.NODE_ENV !== "production" && (Oo.propTypes = { /** * Node passed into the SVG element. */ - children: u.node, + children: p.node, /** * Override or extend the styles applied to the component. */ - classes: u.object, + classes: p.object, /** * @ignore */ - className: u.string, + className: p.string, /** * The color of the component. * It supports both default and custom theme colors, which can be added as shown in the @@ -5994,21 +5994,21 @@ process.env.NODE_ENV !== "production" && (Oo.propTypes = { * You can use the `htmlColor` prop to apply a color attribute to the SVG element. * @default 'inherit' */ - color: u.oneOfType([u.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), u.string]), + color: p.oneOfType([p.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), p.string]), /** * The component used for the root node. * Either a string to use a HTML element or a component. */ - component: u.elementType, + component: p.elementType, /** * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size. * @default 'medium' */ - fontSize: u.oneOfType([u.oneOf(["inherit", "large", "medium", "small"]), u.string]), + fontSize: p.oneOfType([p.oneOf(["inherit", "large", "medium", "small"]), p.string]), /** * Applies a color attribute to the SVG element. */ - htmlColor: u.string, + htmlColor: p.string, /** * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox` * prop will be ignored. @@ -6016,22 +6016,22 @@ process.env.NODE_ENV !== "production" && (Oo.propTypes = { * `component`'s viewBox to the root node. * @default false */ - inheritViewBox: u.bool, + inheritViewBox: p.bool, /** * The shape-rendering attribute. The behavior of the different options is described on the * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering). * If you are having issues with blurry icons you should investigate this prop. */ - shapeRendering: u.string, + shapeRendering: p.string, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ - sx: u.oneOfType([u.arrayOf(u.oneOfType([u.func, u.object, u.bool])), u.func, u.object]), + sx: p.oneOfType([p.arrayOf(p.oneOfType([p.func, p.object, p.bool])), p.func, p.object]), /** * Provides a human-readable title for the element that contains it. * https://www.w3.org/TR/SVG-access/#Equivalent */ - titleAccess: u.string, + titleAccess: p.string, /** * Allows you to redefine what the coordinates without units mean inside an SVG element. * For example, if the SVG element is 500 (width) by 200 (height), @@ -6040,50 +6040,50 @@ process.env.NODE_ENV !== "production" && (Oo.propTypes = { * to bottom right (50,20) and each unit will be worth 10px. * @default '0 0 24 24' */ - viewBox: u.string + viewBox: p.string }); -Oo.muiName = "SvgIcon"; -const _a = Oo; -function es(e, t) { +Ao.muiName = "SvgIcon"; +const Ba = Ao; +function ri(e, t) { function n(r, o) { - return /* @__PURE__ */ s(_a, R({ + return /* @__PURE__ */ i(Ba, $({ "data-testid": `${t}Icon`, ref: o }, r, { children: e })); } - return process.env.NODE_ENV !== "production" && (n.displayName = `${t}Icon`), n.muiName = _a.muiName, /* @__PURE__ */ M.memo(/* @__PURE__ */ M.forwardRef(n)); + return process.env.NODE_ENV !== "production" && (n.displayName = `${t}Icon`), n.muiName = Ba.muiName, /* @__PURE__ */ j.memo(/* @__PURE__ */ j.forwardRef(n)); } -const _u = { +const Fp = { configure: (e) => { process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(` -`)), Hi.configure(e); +`)), Ws.configure(e); } -}, $u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +}, zp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - capitalize: We, - createChainedFunction: sd, - createSvgIcon: es, - debounce: ld, - deprecatedPropType: cd, - isMuiElement: dd, - ownerDocument: Xn, - ownerWindow: pd, - requirePropFactory: ud, - setRef: Yn, - unstable_ClassNameGenerator: _u, - unstable_useEnhancedEffect: Lt, - unstable_useId: zi, - unsupportedProp: md, - useControlled: Fi, - useEventCallback: Yr, - useForkRef: xt, - useIsFocusVisible: Ui -}, Symbol.toStringTag, { value: "Module" })), Iu = /* @__PURE__ */ zc($u); -var $a; -function Au() { - return $a || ($a = 1, function(e) { + capitalize: Ze, + createChainedFunction: gd, + createSvgIcon: ri, + debounce: bd, + deprecatedPropType: vd, + isMuiElement: yd, + ownerDocument: nr, + ownerWindow: xd, + requirePropFactory: Nd, + setRef: rr, + unstable_ClassNameGenerator: Fp, + unstable_useEnhancedEffect: Gt, + unstable_useId: Gs, + unsupportedProp: Td, + useControlled: Hs, + useEventCallback: eo, + useForkRef: kt, + useIsFocusVisible: Xs +}, Symbol.toStringTag, { value: "Module" })), Up = /* @__PURE__ */ Jc(zp); +var ja; +function Gp() { + return ja || (ja = 1, function(e) { "use client"; Object.defineProperty(e, "__esModule", { value: !0 @@ -6093,35 +6093,35 @@ function Au() { return t.createSvgIcon; } }); - var t = Iu; - }(Pr)), Pr; + var t = Up; + }(Dr)), Dr; } -var Du = Fc; -Object.defineProperty(mo, "__esModule", { +var Hp = Zc; +Object.defineProperty(xo, "__esModule", { value: !0 }); -var ts = mo.default = void 0, Mu = Du(Au()), Bu = Ds; -ts = mo.default = (0, Mu.default)(/* @__PURE__ */ (0, Bu.jsx)("path", { +var oi = xo.default = void 0, Xp = Hp(Gp()), Yp = Ui; +oi = xo.default = (0, Xp.default)(/* @__PURE__ */ (0, Yp.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); -function ju(e) { +function Wp(e) { return typeof e == "string"; } -function on(e, t, n) { - return e === void 0 || ju(e) ? t : R({}, t, { - ownerState: R({}, t.ownerState, n) +function dn(e, t, n) { + return e === void 0 || Wp(e) ? t : $({}, t, { + ownerState: $({}, t.ownerState, n) }); } -const Vu = { +const qp = { disableDefaultClasses: !1 -}, Lu = /* @__PURE__ */ M.createContext(Vu); -function zu(e) { +}, Kp = /* @__PURE__ */ j.createContext(qp); +function Jp(e) { const { disableDefaultClasses: t - } = M.useContext(Lu); + } = j.useContext(Kp); return (n) => t ? "" : e(n); } -function Fu(e, t = []) { +function Zp(e, t = []) { if (e === void 0) return {}; const n = {}; @@ -6129,10 +6129,10 @@ function Fu(e, t = []) { n[r] = e[r]; }), n; } -function Uu(e, t, n) { +function Qp(e, t, n) { return typeof e == "function" ? e(t, n) : e; } -function Ia(e) { +function Va(e) { if (e === void 0) return {}; const t = {}; @@ -6140,7 +6140,7 @@ function Ia(e) { t[n] = e[n]; }), t; } -function Gu(e) { +function ew(e) { const { getSlotProps: t, additionalProps: n, @@ -6149,85 +6149,85 @@ function Gu(e) { className: a } = e; if (!t) { - const b = bt(n == null ? void 0 : n.className, a, o == null ? void 0 : o.className, r == null ? void 0 : r.className), v = R({}, n == null ? void 0 : n.style, o == null ? void 0 : o.style, r == null ? void 0 : r.style), f = R({}, n, o, r); + const b = yt(n == null ? void 0 : n.className, a, o == null ? void 0 : o.className, r == null ? void 0 : r.className), v = $({}, n == null ? void 0 : n.style, o == null ? void 0 : o.style, r == null ? void 0 : r.style), f = $({}, n, o, r); return b.length > 0 && (f.className = b), Object.keys(v).length > 0 && (f.style = v), { props: f, internalRef: void 0 }; } - const i = Fu(R({}, o, r)), l = Ia(r), c = Ia(o), d = t(i), p = bt(d == null ? void 0 : d.className, n == null ? void 0 : n.className, a, o == null ? void 0 : o.className, r == null ? void 0 : r.className), h = R({}, d == null ? void 0 : d.style, n == null ? void 0 : n.style, o == null ? void 0 : o.style, r == null ? void 0 : r.style), w = R({}, d, n, c, l); - return p.length > 0 && (w.className = p), Object.keys(h).length > 0 && (w.style = h), { + const s = Zp($({}, o, r)), l = Va(r), c = Va(o), d = t(s), u = yt(d == null ? void 0 : d.className, n == null ? void 0 : n.className, a, o == null ? void 0 : o.className, r == null ? void 0 : r.className), h = $({}, d == null ? void 0 : d.style, n == null ? void 0 : n.style, o == null ? void 0 : o.style, r == null ? void 0 : r.style), w = $({}, d, n, c, l); + return u.length > 0 && (w.className = u), Object.keys(h).length > 0 && (w.style = h), { props: w, internalRef: d.ref }; } -const Hu = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"]; -function Xu(e) { +const tw = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"]; +function nw(e) { var t; const { elementType: n, externalSlotProps: r, ownerState: o, skipResolvingSlotProps: a = !1 - } = e, i = Ne(e, Hu), l = a ? {} : Uu(r, o), { + } = e, s = ke(e, tw), l = a ? {} : Qp(r, o), { props: c, internalRef: d - } = Gu(R({}, i, { + } = ew($({}, s, { externalSlotProps: l - })), p = xt(d, l == null ? void 0 : l.ref, (t = e.additionalProps) == null ? void 0 : t.ref); - return on(n, R({}, c, { - ref: p + })), u = kt(d, l == null ? void 0 : l.ref, (t = e.additionalProps) == null ? void 0 : t.ref); + return dn(n, $({}, c, { + ref: u }), o); } -const ns = "base"; -function Yu(e) { - return `${ns}--${e}`; +const ai = "base"; +function rw(e) { + return `${ai}--${e}`; } -function Wu(e, t) { - return `${ns}-${e}-${t}`; +function ow(e, t) { + return `${ai}-${e}-${t}`; } -function rs(e, t) { - const n = Xi[t]; - return n ? Yu(n) : Wu(e, t); +function si(e, t) { + const n = qs[t]; + return n ? rw(n) : ow(e, t); } -function qu(e, t) { +function aw(e, t) { const n = {}; return t.forEach((r) => { - n[r] = rs(e, r); + n[r] = si(e, r); }), n; } -function Ku(e) { +function sw(e) { return typeof e == "function" ? e() : e; } -const qn = /* @__PURE__ */ M.forwardRef(function(t, n) { +const ar = /* @__PURE__ */ j.forwardRef(function(t, n) { const { children: r, container: o, disablePortal: a = !1 - } = t, [i, l] = M.useState(null), c = xt(/* @__PURE__ */ M.isValidElement(r) ? r.ref : null, n); - if (Lt(() => { - a || l(Ku(o) || document.body); - }, [o, a]), Lt(() => { - if (i && !a) - return Yn(n, i), () => { - Yn(n, null); + } = t, [s, l] = j.useState(null), c = kt(/* @__PURE__ */ j.isValidElement(r) ? r.ref : null, n); + if (Gt(() => { + a || l(sw(o) || document.body); + }, [o, a]), Gt(() => { + if (s && !a) + return rr(n, s), () => { + rr(n, null); }; - }, [n, i, a]), a) { - if (/* @__PURE__ */ M.isValidElement(r)) { + }, [n, s, a]), a) { + if (/* @__PURE__ */ j.isValidElement(r)) { const d = { ref: c }; - return /* @__PURE__ */ M.cloneElement(r, d); + return /* @__PURE__ */ j.cloneElement(r, d); } - return /* @__PURE__ */ s(M.Fragment, { + return /* @__PURE__ */ i(j.Fragment, { children: r }); } - return /* @__PURE__ */ s(M.Fragment, { - children: i && /* @__PURE__ */ Ol.createPortal(r, i) + return /* @__PURE__ */ i(j.Fragment, { + children: s && /* @__PURE__ */ jl.createPortal(r, s) }); }); -process.env.NODE_ENV !== "production" && (qn.propTypes = { +process.env.NODE_ENV !== "production" && (ar.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ @@ -6235,7 +6235,7 @@ process.env.NODE_ENV !== "production" && (qn.propTypes = { /** * The children to render into the `container`. */ - children: u.node, + children: p.node, /** * An HTML element or function that returns one. * The `container` will have the portal children appended to it. @@ -6246,23 +6246,23 @@ process.env.NODE_ENV !== "production" && (qn.propTypes = { * By default, it uses the body of the top-level document object, * so it's simply `document.body` most of the time. */ - container: u.oneOfType([gn, u.func]), + container: p.oneOfType([Nn, p.func]), /** * The `children` will be under the DOM hierarchy of the parent component. * @default false */ - disablePortal: u.bool + disablePortal: p.bool }); -process.env.NODE_ENV !== "production" && (qn["propTypes"] = ed(qn.propTypes)); -var Ce = "top", je = "bottom", Ve = "right", Se = "left", Ro = "auto", Rn = [Ce, je, Ve, Se], zt = "start", vn = "end", Ju = "clippingParents", os = "viewport", en = "popper", Zu = "reference", Aa = /* @__PURE__ */ Rn.reduce(function(e, t) { - return e.concat([t + "-" + zt, t + "-" + vn]); -}, []), as = /* @__PURE__ */ [].concat(Rn, [Ro]).reduce(function(e, t) { - return e.concat([t, t + "-" + zt, t + "-" + vn]); -}, []), Qu = "beforeRead", ew = "read", tw = "afterRead", nw = "beforeMain", rw = "main", ow = "afterMain", aw = "beforeWrite", iw = "write", sw = "afterWrite", lw = [Qu, ew, tw, nw, rw, ow, aw, iw, sw]; -function qe(e) { +process.env.NODE_ENV !== "production" && (ar["propTypes"] = dd(ar.propTypes)); +var Ce = "top", Fe = "bottom", ze = "right", Se = "left", Do = "auto", Bn = [Ce, Fe, ze, Se], Ht = "start", En = "end", iw = "clippingParents", ii = "viewport", an = "popper", lw = "reference", La = /* @__PURE__ */ Bn.reduce(function(e, t) { + return e.concat([t + "-" + Ht, t + "-" + En]); +}, []), li = /* @__PURE__ */ [].concat(Bn, [Do]).reduce(function(e, t) { + return e.concat([t, t + "-" + Ht, t + "-" + En]); +}, []), cw = "beforeRead", dw = "read", uw = "afterRead", pw = "beforeMain", ww = "main", fw = "afterMain", mw = "beforeWrite", hw = "write", gw = "afterWrite", bw = [cw, dw, uw, pw, ww, fw, mw, hw, gw]; +function Qe(e) { return e ? (e.nodeName || "").toLowerCase() : null; } -function Ae(e) { +function Me(e) { if (e == null) return window; if (e.toString() !== "[object Window]") { @@ -6271,31 +6271,31 @@ function Ae(e) { } return e; } -function kt(e) { - var t = Ae(e).Element; +function Tt(e) { + var t = Me(e).Element; return e instanceof t || e instanceof Element; } -function Be(e) { - var t = Ae(e).HTMLElement; +function Le(e) { + var t = Me(e).HTMLElement; return e instanceof t || e instanceof HTMLElement; } -function Po(e) { +function Mo(e) { if (typeof ShadowRoot > "u") return !1; - var t = Ae(e).ShadowRoot; + var t = Me(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } -function cw(e) { +function vw(e) { var t = e.state; Object.keys(t.elements).forEach(function(n) { var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n]; - !Be(a) || !qe(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(i) { - var l = o[i]; - l === !1 ? a.removeAttribute(i) : a.setAttribute(i, l === !0 ? "" : l); + !Le(a) || !Qe(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(s) { + var l = o[s]; + l === !1 ? a.removeAttribute(s) : a.setAttribute(s, l === !0 ? "" : l); })); }); } -function dw(e) { +function yw(e) { var t = e.state, n = { popper: { position: t.options.strategy, @@ -6310,54 +6310,54 @@ function dw(e) { }; return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() { Object.keys(t.elements).forEach(function(r) { - var o = t.elements[r], a = t.attributes[r] || {}, i = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), l = i.reduce(function(c, d) { + var o = t.elements[r], a = t.attributes[r] || {}, s = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), l = s.reduce(function(c, d) { return c[d] = "", c; }, {}); - !Be(o) || !qe(o) || (Object.assign(o.style, l), Object.keys(a).forEach(function(c) { + !Le(o) || !Qe(o) || (Object.assign(o.style, l), Object.keys(a).forEach(function(c) { o.removeAttribute(c); })); }); }; } -const pw = { +const xw = { name: "applyStyles", enabled: !0, phase: "write", - fn: cw, - effect: dw, + fn: vw, + effect: yw, requires: ["computeStyles"] }; -function Xe(e) { +function qe(e) { return e.split("-")[0]; } -var vt = Math.max, Kn = Math.min, Ft = Math.round; -function qr() { +var xt = Math.max, sr = Math.min, Xt = Math.round; +function no() { var e = navigator.userAgentData; return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) { return t.brand + "/" + t.version; }).join(" ") : navigator.userAgent; } -function is() { - return !/^((?!chrome|android).)*safari/i.test(qr()); +function ci() { + return !/^((?!chrome|android).)*safari/i.test(no()); } -function Ut(e, t, n) { +function Yt(e, t, n) { t === void 0 && (t = !1), n === void 0 && (n = !1); var r = e.getBoundingClientRect(), o = 1, a = 1; - t && Be(e) && (o = e.offsetWidth > 0 && Ft(r.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && Ft(r.height) / e.offsetHeight || 1); - var i = kt(e) ? Ae(e) : window, l = i.visualViewport, c = !is() && n, d = (r.left + (c && l ? l.offsetLeft : 0)) / o, p = (r.top + (c && l ? l.offsetTop : 0)) / a, h = r.width / o, w = r.height / a; + t && Le(e) && (o = e.offsetWidth > 0 && Xt(r.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && Xt(r.height) / e.offsetHeight || 1); + var s = Tt(e) ? Me(e) : window, l = s.visualViewport, c = !ci() && n, d = (r.left + (c && l ? l.offsetLeft : 0)) / o, u = (r.top + (c && l ? l.offsetTop : 0)) / a, h = r.width / o, w = r.height / a; return { width: h, height: w, - top: p, + top: u, right: d + h, - bottom: p + w, + bottom: u + w, left: d, x: d, - y: p + y: u }; } -function _o(e) { - var t = Ut(e), n = e.offsetWidth, r = e.offsetHeight; +function Bo(e) { + var t = Yt(e), n = e.offsetWidth, r = e.offsetHeight; return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), { x: e.offsetLeft, y: e.offsetTop, @@ -6365,11 +6365,11 @@ function _o(e) { height: r }; } -function ss(e, t) { +function di(e, t) { var n = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; - if (n && Po(n)) { + if (n && Mo(n)) { var r = t; do { if (r && e.isSameNode(r)) @@ -6379,66 +6379,66 @@ function ss(e, t) { } return !1; } -function et(e) { - return Ae(e).getComputedStyle(e); +function ot(e) { + return Me(e).getComputedStyle(e); } -function uw(e) { - return ["table", "td", "th"].indexOf(qe(e)) >= 0; +function Nw(e) { + return ["table", "td", "th"].indexOf(Qe(e)) >= 0; } -function lt(e) { - return ((kt(e) ? e.ownerDocument : ( +function dt(e) { + return ((Tt(e) ? e.ownerDocument : ( // $FlowFixMe[prop-missing] e.document )) || window.document).documentElement; } -function br(e) { - return qe(e) === "html" ? e : ( +function kr(e) { + return Qe(e) === "html" ? e : ( // this is a quicker (but less type safe) way to save quite some bytes from the bundle // $FlowFixMe[incompatible-return] // $FlowFixMe[prop-missing] e.assignedSlot || // step into the shadow DOM of the parent of a slotted node e.parentNode || // DOM Element detected - (Po(e) ? e.host : null) || // ShadowRoot detected + (Mo(e) ? e.host : null) || // ShadowRoot detected // $FlowFixMe[incompatible-call]: HTMLElement is a Node - lt(e) + dt(e) ); } -function Da(e) { - return !Be(e) || // https://github.com/popperjs/popper-core/issues/837 - et(e).position === "fixed" ? null : e.offsetParent; +function Fa(e) { + return !Le(e) || // https://github.com/popperjs/popper-core/issues/837 + ot(e).position === "fixed" ? null : e.offsetParent; } -function ww(e) { - var t = /firefox/i.test(qr()), n = /Trident/i.test(qr()); - if (n && Be(e)) { - var r = et(e); +function kw(e) { + var t = /firefox/i.test(no()), n = /Trident/i.test(no()); + if (n && Le(e)) { + var r = ot(e); if (r.position === "fixed") return null; } - var o = br(e); - for (Po(o) && (o = o.host); Be(o) && ["html", "body"].indexOf(qe(o)) < 0; ) { - var a = et(o); + var o = kr(e); + for (Mo(o) && (o = o.host); Le(o) && ["html", "body"].indexOf(Qe(o)) < 0; ) { + var a = ot(o); if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return o; o = o.parentNode; } return null; } -function Pn(e) { - for (var t = Ae(e), n = Da(e); n && uw(n) && et(n).position === "static"; ) - n = Da(n); - return n && (qe(n) === "html" || qe(n) === "body" && et(n).position === "static") ? t : n || ww(e) || t; +function jn(e) { + for (var t = Me(e), n = Fa(e); n && Nw(n) && ot(n).position === "static"; ) + n = Fa(n); + return n && (Qe(n) === "html" || Qe(n) === "body" && ot(n).position === "static") ? t : n || kw(e) || t; } -function $o(e) { +function jo(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } -function dn(e, t, n) { - return vt(e, Kn(t, n)); +function mn(e, t, n) { + return xt(e, sr(t, n)); } -function fw(e, t, n) { - var r = dn(e, t, n); +function Ew(e, t, n) { + var r = mn(e, t, n); return r > n ? n : r; } -function ls() { +function ui() { return { top: 0, right: 0, @@ -6446,57 +6446,57 @@ function ls() { left: 0 }; } -function cs(e) { - return Object.assign({}, ls(), e); +function pi(e) { + return Object.assign({}, ui(), e); } -function ds(e, t) { +function wi(e, t) { return t.reduce(function(n, r) { return n[r] = e, n; }, {}); } -var mw = function(t, n) { +var Tw = function(t, n) { return t = typeof t == "function" ? t(Object.assign({}, n.rects, { placement: n.placement - })) : t, cs(typeof t != "number" ? t : ds(t, Rn)); + })) : t, pi(typeof t != "number" ? t : wi(t, Bn)); }; -function hw(e) { - var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, l = Xe(n.placement), c = $o(l), d = [Se, Ve].indexOf(l) >= 0, p = d ? "height" : "width"; - if (!(!a || !i)) { - var h = mw(o.padding, n), w = _o(a), b = c === "y" ? Ce : Se, v = c === "y" ? je : Ve, f = n.rects.reference[p] + n.rects.reference[c] - i[c] - n.rects.popper[p], m = i[c] - n.rects.reference[c], N = Pn(a), I = N ? c === "y" ? N.clientHeight || 0 : N.clientWidth || 0 : 0, O = f / 2 - m / 2, E = h[b], g = I - w[p] - h[v], _ = I / 2 - w[p] / 2 + O, L = dn(E, _, g), H = c; - n.modifiersData[r] = (t = {}, t[H] = L, t.centerOffset = L - _, t); +function Cw(e) { + var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, s = n.modifiersData.popperOffsets, l = qe(n.placement), c = jo(l), d = [Se, ze].indexOf(l) >= 0, u = d ? "height" : "width"; + if (!(!a || !s)) { + var h = Tw(o.padding, n), w = Bo(a), b = c === "y" ? Ce : Se, v = c === "y" ? Fe : ze, f = n.rects.reference[u] + n.rects.reference[c] - s[c] - n.rects.popper[u], m = s[c] - n.rects.reference[c], N = jn(a), A = N ? c === "y" ? N.clientHeight || 0 : N.clientWidth || 0 : 0, _ = f / 2 - m / 2, E = h[b], g = A - w[u] - h[v], I = A / 2 - w[u] / 2 + _, U = mn(E, I, g), W = c; + n.modifiersData[r] = (t = {}, t[W] = U, t.centerOffset = U - I, t); } } -function gw(e) { +function Sw(e) { var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r; - o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || ss(t.elements.popper, o) && (t.elements.arrow = o)); + o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || di(t.elements.popper, o) && (t.elements.arrow = o)); } -const bw = { +const Ow = { name: "arrow", enabled: !0, phase: "main", - fn: hw, - effect: gw, + fn: Cw, + effect: Sw, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; -function Gt(e) { +function Wt(e) { return e.split("-")[1]; } -var vw = { +var Rw = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; -function yw(e, t) { +function _w(e, t) { var n = e.x, r = e.y, o = t.devicePixelRatio || 1; return { - x: Ft(n * o) / o || 0, - y: Ft(r * o) / o || 0 + x: Xt(n * o) / o || 0, + y: Xt(r * o) / o || 0 }; } -function Ma(e) { - var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, i = e.offsets, l = e.position, c = e.gpuAcceleration, d = e.adaptive, p = e.roundOffsets, h = e.isFixed, w = i.x, b = w === void 0 ? 0 : w, v = i.y, f = v === void 0 ? 0 : v, m = typeof p == "function" ? p({ +function za(e) { + var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, s = e.offsets, l = e.position, c = e.gpuAcceleration, d = e.adaptive, u = e.roundOffsets, h = e.isFixed, w = s.x, b = w === void 0 ? 0 : w, v = s.y, f = v === void 0 ? 0 : v, m = typeof u == "function" ? u({ x: b, y: f }) : { @@ -6504,56 +6504,56 @@ function Ma(e) { y: f }; b = m.x, f = m.y; - var N = i.hasOwnProperty("x"), I = i.hasOwnProperty("y"), O = Se, E = Ce, g = window; + var N = s.hasOwnProperty("x"), A = s.hasOwnProperty("y"), _ = Se, E = Ce, g = window; if (d) { - var _ = Pn(n), L = "clientHeight", H = "clientWidth"; - if (_ === Ae(n) && (_ = lt(n), et(_).position !== "static" && l === "absolute" && (L = "scrollHeight", H = "scrollWidth")), _ = _, o === Ce || (o === Se || o === Ve) && a === vn) { - E = je; - var C = h && _ === g && g.visualViewport ? g.visualViewport.height : ( + var I = jn(n), U = "clientHeight", W = "clientWidth"; + if (I === Me(n) && (I = dt(n), ot(I).position !== "static" && l === "absolute" && (U = "scrollHeight", W = "scrollWidth")), I = I, o === Ce || (o === Se || o === ze) && a === En) { + E = Fe; + var O = h && I === g && g.visualViewport ? g.visualViewport.height : ( // $FlowFixMe[prop-missing] - _[L] + I[U] ); - f -= C - r.height, f *= c ? 1 : -1; + f -= O - r.height, f *= c ? 1 : -1; } - if (o === Se || (o === Ce || o === je) && a === vn) { - O = Ve; - var P = h && _ === g && g.visualViewport ? g.visualViewport.width : ( + if (o === Se || (o === Ce || o === Fe) && a === En) { + _ = ze; + var P = h && I === g && g.visualViewport ? g.visualViewport.width : ( // $FlowFixMe[prop-missing] - _[H] + I[W] ); b -= P - r.width, b *= c ? 1 : -1; } } var k = Object.assign({ position: l - }, d && vw), B = p === !0 ? yw({ + }, d && Rw), B = u === !0 ? _w({ x: b, y: f - }, Ae(n)) : { + }, Me(n)) : { x: b, y: f }; if (b = B.x, f = B.y, c) { var D; - return Object.assign({}, k, (D = {}, D[E] = I ? "0" : "", D[O] = N ? "0" : "", D.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + b + "px, " + f + "px)" : "translate3d(" + b + "px, " + f + "px, 0)", D)); + return Object.assign({}, k, (D = {}, D[E] = A ? "0" : "", D[_] = N ? "0" : "", D.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + b + "px, " + f + "px)" : "translate3d(" + b + "px, " + f + "px, 0)", D)); } - return Object.assign({}, k, (t = {}, t[E] = I ? f + "px" : "", t[O] = N ? b + "px" : "", t.transform = "", t)); + return Object.assign({}, k, (t = {}, t[E] = A ? f + "px" : "", t[_] = N ? b + "px" : "", t.transform = "", t)); } -function xw(e) { - var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, i = a === void 0 ? !0 : a, l = n.roundOffsets, c = l === void 0 ? !0 : l, d = { - placement: Xe(t.placement), - variation: Gt(t.placement), +function Pw(e) { + var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, s = a === void 0 ? !0 : a, l = n.roundOffsets, c = l === void 0 ? !0 : l, d = { + placement: qe(t.placement), + variation: Wt(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: o, isFixed: t.options.strategy === "fixed" }; - t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ma(Object.assign({}, d, { + t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, za(Object.assign({}, d, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, - adaptive: i, + adaptive: s, roundOffsets: c - })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ma(Object.assign({}, d, { + })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, za(Object.assign({}, d, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, @@ -6562,105 +6562,105 @@ function xw(e) { "data-popper-placement": t.placement }); } -const Nw = { +const $w = { name: "computeStyles", enabled: !0, phase: "beforeWrite", - fn: xw, + fn: Pw, data: {} }; -var Vn = { +var Xn = { passive: !0 }; -function kw(e) { - var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, i = r.resize, l = i === void 0 ? !0 : i, c = Ae(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper); - return a && d.forEach(function(p) { - p.addEventListener("scroll", n.update, Vn); - }), l && c.addEventListener("resize", n.update, Vn), function() { - a && d.forEach(function(p) { - p.removeEventListener("scroll", n.update, Vn); - }), l && c.removeEventListener("resize", n.update, Vn); +function Iw(e) { + var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, s = r.resize, l = s === void 0 ? !0 : s, c = Me(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper); + return a && d.forEach(function(u) { + u.addEventListener("scroll", n.update, Xn); + }), l && c.addEventListener("resize", n.update, Xn), function() { + a && d.forEach(function(u) { + u.removeEventListener("scroll", n.update, Xn); + }), l && c.removeEventListener("resize", n.update, Xn); }; } -const Ew = { +const Aw = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, - effect: kw, + effect: Iw, data: {} }; -var Tw = { +var Dw = { left: "right", right: "left", bottom: "top", top: "bottom" }; -function Hn(e) { +function Zn(e) { return e.replace(/left|right|bottom|top/g, function(t) { - return Tw[t]; + return Dw[t]; }); } -var Cw = { +var Mw = { start: "end", end: "start" }; -function Ba(e) { +function Ua(e) { return e.replace(/start|end/g, function(t) { - return Cw[t]; + return Mw[t]; }); } -function Io(e) { - var t = Ae(e), n = t.pageXOffset, r = t.pageYOffset; +function Vo(e) { + var t = Me(e), n = t.pageXOffset, r = t.pageYOffset; return { scrollLeft: n, scrollTop: r }; } -function Ao(e) { - return Ut(lt(e)).left + Io(e).scrollLeft; +function Lo(e) { + return Yt(dt(e)).left + Vo(e).scrollLeft; } -function Sw(e, t) { - var n = Ae(e), r = lt(e), o = n.visualViewport, a = r.clientWidth, i = r.clientHeight, l = 0, c = 0; +function Bw(e, t) { + var n = Me(e), r = dt(e), o = n.visualViewport, a = r.clientWidth, s = r.clientHeight, l = 0, c = 0; if (o) { - a = o.width, i = o.height; - var d = is(); + a = o.width, s = o.height; + var d = ci(); (d || !d && t === "fixed") && (l = o.offsetLeft, c = o.offsetTop); } return { width: a, - height: i, - x: l + Ao(e), + height: s, + x: l + Lo(e), y: c }; } -function Ow(e) { - var t, n = lt(e), r = Io(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = vt(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = vt(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), l = -r.scrollLeft + Ao(e), c = -r.scrollTop; - return et(o || n).direction === "rtl" && (l += vt(n.clientWidth, o ? o.clientWidth : 0) - a), { +function jw(e) { + var t, n = dt(e), r = Vo(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = xt(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = xt(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), l = -r.scrollLeft + Lo(e), c = -r.scrollTop; + return ot(o || n).direction === "rtl" && (l += xt(n.clientWidth, o ? o.clientWidth : 0) - a), { width: a, - height: i, + height: s, x: l, y: c }; } -function Do(e) { - var t = et(e), n = t.overflow, r = t.overflowX, o = t.overflowY; +function Fo(e) { + var t = ot(e), n = t.overflow, r = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(n + o + r); } -function ps(e) { - return ["html", "body", "#document"].indexOf(qe(e)) >= 0 ? e.ownerDocument.body : Be(e) && Do(e) ? e : ps(br(e)); +function fi(e) { + return ["html", "body", "#document"].indexOf(Qe(e)) >= 0 ? e.ownerDocument.body : Le(e) && Fo(e) ? e : fi(kr(e)); } -function pn(e, t) { +function hn(e, t) { var n; t === void 0 && (t = []); - var r = ps(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Ae(r), i = o ? [a].concat(a.visualViewport || [], Do(r) ? r : []) : r, l = t.concat(i); + var r = fi(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = Me(r), s = o ? [a].concat(a.visualViewport || [], Fo(r) ? r : []) : r, l = t.concat(s); return o ? l : ( // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here - l.concat(pn(br(i))) + l.concat(hn(kr(s))) ); } -function Kr(e) { +function ro(e) { return Object.assign({}, e, { left: e.x, top: e.y, @@ -6668,42 +6668,42 @@ function Kr(e) { bottom: e.y + e.height }); } -function Rw(e, t) { - var n = Ut(e, !1, t === "fixed"); +function Vw(e, t) { + var n = Yt(e, !1, t === "fixed"); return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n; } -function ja(e, t, n) { - return t === os ? Kr(Sw(e, n)) : kt(t) ? Rw(t, n) : Kr(Ow(lt(e))); +function Ga(e, t, n) { + return t === ii ? ro(Bw(e, n)) : Tt(t) ? Vw(t, n) : ro(jw(dt(e))); } -function Pw(e) { - var t = pn(br(e)), n = ["absolute", "fixed"].indexOf(et(e).position) >= 0, r = n && Be(e) ? Pn(e) : e; - return kt(r) ? t.filter(function(o) { - return kt(o) && ss(o, r) && qe(o) !== "body"; +function Lw(e) { + var t = hn(kr(e)), n = ["absolute", "fixed"].indexOf(ot(e).position) >= 0, r = n && Le(e) ? jn(e) : e; + return Tt(r) ? t.filter(function(o) { + return Tt(o) && di(o, r) && Qe(o) !== "body"; }) : []; } -function _w(e, t, n, r) { - var o = t === "clippingParents" ? Pw(e) : [].concat(t), a = [].concat(o, [n]), i = a[0], l = a.reduce(function(c, d) { - var p = ja(e, d, r); - return c.top = vt(p.top, c.top), c.right = Kn(p.right, c.right), c.bottom = Kn(p.bottom, c.bottom), c.left = vt(p.left, c.left), c; - }, ja(e, i, r)); +function Fw(e, t, n, r) { + var o = t === "clippingParents" ? Lw(e) : [].concat(t), a = [].concat(o, [n]), s = a[0], l = a.reduce(function(c, d) { + var u = Ga(e, d, r); + return c.top = xt(u.top, c.top), c.right = sr(u.right, c.right), c.bottom = sr(u.bottom, c.bottom), c.left = xt(u.left, c.left), c; + }, Ga(e, s, r)); return l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l; } -function us(e) { - var t = e.reference, n = e.element, r = e.placement, o = r ? Xe(r) : null, a = r ? Gt(r) : null, i = t.x + t.width / 2 - n.width / 2, l = t.y + t.height / 2 - n.height / 2, c; +function mi(e) { + var t = e.reference, n = e.element, r = e.placement, o = r ? qe(r) : null, a = r ? Wt(r) : null, s = t.x + t.width / 2 - n.width / 2, l = t.y + t.height / 2 - n.height / 2, c; switch (o) { case Ce: c = { - x: i, + x: s, y: t.y - n.height }; break; - case je: + case Fe: c = { - x: i, + x: s, y: t.y + t.height }; break; - case Ve: + case ze: c = { x: t.x + t.width, y: l @@ -6721,128 +6721,128 @@ function us(e) { y: t.y }; } - var d = o ? $o(o) : null; + var d = o ? jo(o) : null; if (d != null) { - var p = d === "y" ? "height" : "width"; + var u = d === "y" ? "height" : "width"; switch (a) { - case zt: - c[d] = c[d] - (t[p] / 2 - n[p] / 2); + case Ht: + c[d] = c[d] - (t[u] / 2 - n[u] / 2); break; - case vn: - c[d] = c[d] + (t[p] / 2 - n[p] / 2); + case En: + c[d] = c[d] + (t[u] / 2 - n[u] / 2); break; } } return c; } -function yn(e, t) { +function Tn(e, t) { t === void 0 && (t = {}); - var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.strategy, i = a === void 0 ? e.strategy : a, l = n.boundary, c = l === void 0 ? Ju : l, d = n.rootBoundary, p = d === void 0 ? os : d, h = n.elementContext, w = h === void 0 ? en : h, b = n.altBoundary, v = b === void 0 ? !1 : b, f = n.padding, m = f === void 0 ? 0 : f, N = cs(typeof m != "number" ? m : ds(m, Rn)), I = w === en ? Zu : en, O = e.rects.popper, E = e.elements[v ? I : w], g = _w(kt(E) ? E : E.contextElement || lt(e.elements.popper), c, p, i), _ = Ut(e.elements.reference), L = us({ - reference: _, - element: O, + var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.strategy, s = a === void 0 ? e.strategy : a, l = n.boundary, c = l === void 0 ? iw : l, d = n.rootBoundary, u = d === void 0 ? ii : d, h = n.elementContext, w = h === void 0 ? an : h, b = n.altBoundary, v = b === void 0 ? !1 : b, f = n.padding, m = f === void 0 ? 0 : f, N = pi(typeof m != "number" ? m : wi(m, Bn)), A = w === an ? lw : an, _ = e.rects.popper, E = e.elements[v ? A : w], g = Fw(Tt(E) ? E : E.contextElement || dt(e.elements.popper), c, u, s), I = Yt(e.elements.reference), U = mi({ + reference: I, + element: _, strategy: "absolute", placement: o - }), H = Kr(Object.assign({}, O, L)), C = w === en ? H : _, P = { - top: g.top - C.top + N.top, - bottom: C.bottom - g.bottom + N.bottom, - left: g.left - C.left + N.left, - right: C.right - g.right + N.right + }), W = ro(Object.assign({}, _, U)), O = w === an ? W : I, P = { + top: g.top - O.top + N.top, + bottom: O.bottom - g.bottom + N.bottom, + left: g.left - O.left + N.left, + right: O.right - g.right + N.right }, k = e.modifiersData.offset; - if (w === en && k) { + if (w === an && k) { var B = k[o]; Object.keys(P).forEach(function(D) { - var J = [Ve, je].indexOf(D) >= 0 ? 1 : -1, q = [Ce, je].indexOf(D) >= 0 ? "y" : "x"; - P[D] += B[q] * J; + var Q = [ze, Fe].indexOf(D) >= 0 ? 1 : -1, J = [Ce, Fe].indexOf(D) >= 0 ? "y" : "x"; + P[D] += B[J] * Q; }); } return P; } -function $w(e, t) { +function zw(e, t) { t === void 0 && (t = {}); - var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, i = n.padding, l = n.flipVariations, c = n.allowedAutoPlacements, d = c === void 0 ? as : c, p = Gt(r), h = p ? l ? Aa : Aa.filter(function(v) { - return Gt(v) === p; - }) : Rn, w = h.filter(function(v) { + var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, s = n.padding, l = n.flipVariations, c = n.allowedAutoPlacements, d = c === void 0 ? li : c, u = Wt(r), h = u ? l ? La : La.filter(function(v) { + return Wt(v) === u; + }) : Bn, w = h.filter(function(v) { return d.indexOf(v) >= 0; }); w.length === 0 && (w = h); var b = w.reduce(function(v, f) { - return v[f] = yn(e, { + return v[f] = Tn(e, { placement: f, boundary: o, rootBoundary: a, - padding: i - })[Xe(f)], v; + padding: s + })[qe(f)], v; }, {}); return Object.keys(b).sort(function(v, f) { return b[v] - b[f]; }); } -function Iw(e) { - if (Xe(e) === Ro) +function Uw(e) { + if (qe(e) === Do) return []; - var t = Hn(e); - return [Ba(e), t, Ba(t)]; + var t = Zn(e); + return [Ua(e), t, Ua(t)]; } -function Aw(e) { +function Gw(e) { var t = e.state, n = e.options, r = e.name; if (!t.modifiersData[r]._skip) { - for (var o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, l = i === void 0 ? !0 : i, c = n.fallbackPlacements, d = n.padding, p = n.boundary, h = n.rootBoundary, w = n.altBoundary, b = n.flipVariations, v = b === void 0 ? !0 : b, f = n.allowedAutoPlacements, m = t.options.placement, N = Xe(m), I = N === m, O = c || (I || !v ? [Hn(m)] : Iw(m)), E = [m].concat(O).reduce(function(V, W) { - return V.concat(Xe(W) === Ro ? $w(t, { - placement: W, - boundary: p, + for (var o = n.mainAxis, a = o === void 0 ? !0 : o, s = n.altAxis, l = s === void 0 ? !0 : s, c = n.fallbackPlacements, d = n.padding, u = n.boundary, h = n.rootBoundary, w = n.altBoundary, b = n.flipVariations, v = b === void 0 ? !0 : b, f = n.allowedAutoPlacements, m = t.options.placement, N = qe(m), A = N === m, _ = c || (A || !v ? [Zn(m)] : Uw(m)), E = [m].concat(_).reduce(function(z, q) { + return z.concat(qe(q) === Do ? zw(t, { + placement: q, + boundary: u, rootBoundary: h, padding: d, flipVariations: v, allowedAutoPlacements: f - }) : W); - }, []), g = t.rects.reference, _ = t.rects.popper, L = /* @__PURE__ */ new Map(), H = !0, C = E[0], P = 0; P < E.length; P++) { - var k = E[P], B = Xe(k), D = Gt(k) === zt, J = [Ce, je].indexOf(B) >= 0, q = J ? "width" : "height", U = yn(t, { + }) : q); + }, []), g = t.rects.reference, I = t.rects.popper, U = /* @__PURE__ */ new Map(), W = !0, O = E[0], P = 0; P < E.length; P++) { + var k = E[P], B = qe(k), D = Wt(k) === Ht, Q = [Ce, Fe].indexOf(B) >= 0, J = Q ? "width" : "height", X = Tn(t, { placement: k, - boundary: p, + boundary: u, rootBoundary: h, altBoundary: w, padding: d - }), ee = J ? D ? Ve : Se : D ? je : Ce; - g[q] > _[q] && (ee = Hn(ee)); - var ae = Hn(ee), re = []; - if (a && re.push(U[B] <= 0), l && re.push(U[ee] <= 0, U[ae] <= 0), re.every(function(V) { - return V; + }), ee = Q ? D ? ze : Se : D ? Fe : Ce; + g[J] > I[J] && (ee = Zn(ee)); + var re = Zn(ee), oe = []; + if (a && oe.push(X[B] <= 0), l && oe.push(X[ee] <= 0, X[re] <= 0), oe.every(function(z) { + return z; })) { - C = k, H = !1; + O = k, W = !1; break; } - L.set(k, re); - } - if (H) - for (var y = v ? 3 : 1, S = function(W) { - var X = E.find(function(Y) { - var G = L.get(Y); - if (G) - return G.slice(0, W).every(function(K) { - return K; + U.set(k, oe); + } + if (W) + for (var y = v ? 3 : 1, R = function(q) { + var L = E.find(function(K) { + var Y = U.get(K); + if (Y) + return Y.slice(0, q).every(function(Z) { + return Z; }); }); - if (X) - return C = X, "break"; - }, z = y; z > 0; z--) { - var F = S(z); - if (F === "break") + if (L) + return O = L, "break"; + }, H = y; H > 0; H--) { + var G = R(H); + if (G === "break") break; } - t.placement !== C && (t.modifiersData[r]._skip = !0, t.placement = C, t.reset = !0); + t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0); } } -const Dw = { +const Hw = { name: "flip", enabled: !0, phase: "main", - fn: Aw, + fn: Gw, requiresIfExists: ["offset"], data: { _skip: !1 } }; -function Va(e, t, n) { +function Ha(e, t, n) { return n === void 0 && (n = { x: 0, y: 0 @@ -6853,157 +6853,157 @@ function Va(e, t, n) { left: e.left - t.width - n.x }; } -function La(e) { - return [Ce, Ve, je, Se].some(function(t) { +function Xa(e) { + return [Ce, ze, Fe, Se].some(function(t) { return e[t] >= 0; }); } -function Mw(e) { - var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = yn(t, { +function Xw(e) { + var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, s = Tn(t, { elementContext: "reference" - }), l = yn(t, { + }), l = Tn(t, { altBoundary: !0 - }), c = Va(i, r), d = Va(l, o, a), p = La(c), h = La(d); + }), c = Ha(s, r), d = Ha(l, o, a), u = Xa(c), h = Xa(d); t.modifiersData[n] = { referenceClippingOffsets: c, popperEscapeOffsets: d, - isReferenceHidden: p, + isReferenceHidden: u, hasPopperEscaped: h }, t.attributes.popper = Object.assign({}, t.attributes.popper, { - "data-popper-reference-hidden": p, + "data-popper-reference-hidden": u, "data-popper-escaped": h }); } -const Bw = { +const Yw = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], - fn: Mw + fn: Xw }; -function jw(e, t, n) { - var r = Xe(e), o = [Se, Ce].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { +function Ww(e, t, n) { + var r = qe(e), o = [Se, Ce].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e - })) : n, i = a[0], l = a[1]; - return i = i || 0, l = (l || 0) * o, [Se, Ve].indexOf(r) >= 0 ? { + })) : n, s = a[0], l = a[1]; + return s = s || 0, l = (l || 0) * o, [Se, ze].indexOf(r) >= 0 ? { x: l, - y: i + y: s } : { - x: i, + x: s, y: l }; } -function Vw(e) { - var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, i = as.reduce(function(p, h) { - return p[h] = jw(h, t.rects, a), p; - }, {}), l = i[t.placement], c = l.x, d = l.y; - t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += c, t.modifiersData.popperOffsets.y += d), t.modifiersData[r] = i; +function qw(e) { + var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, s = li.reduce(function(u, h) { + return u[h] = Ww(h, t.rects, a), u; + }, {}), l = s[t.placement], c = l.x, d = l.y; + t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += c, t.modifiersData.popperOffsets.y += d), t.modifiersData[r] = s; } -const Lw = { +const Kw = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], - fn: Vw + fn: qw }; -function zw(e) { +function Jw(e) { var t = e.state, n = e.name; - t.modifiersData[n] = us({ + t.modifiersData[n] = mi({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } -const Fw = { +const Zw = { name: "popperOffsets", enabled: !0, phase: "read", - fn: zw, + fn: Jw, data: {} }; -function Uw(e) { +function Qw(e) { return e === "x" ? "y" : "x"; } -function Gw(e) { - var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, i = n.altAxis, l = i === void 0 ? !1 : i, c = n.boundary, d = n.rootBoundary, p = n.altBoundary, h = n.padding, w = n.tether, b = w === void 0 ? !0 : w, v = n.tetherOffset, f = v === void 0 ? 0 : v, m = yn(t, { +function ef(e) { + var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, s = n.altAxis, l = s === void 0 ? !1 : s, c = n.boundary, d = n.rootBoundary, u = n.altBoundary, h = n.padding, w = n.tether, b = w === void 0 ? !0 : w, v = n.tetherOffset, f = v === void 0 ? 0 : v, m = Tn(t, { boundary: c, rootBoundary: d, padding: h, - altBoundary: p - }), N = Xe(t.placement), I = Gt(t.placement), O = !I, E = $o(N), g = Uw(E), _ = t.modifiersData.popperOffsets, L = t.rects.reference, H = t.rects.popper, C = typeof f == "function" ? f(Object.assign({}, t.rects, { + altBoundary: u + }), N = qe(t.placement), A = Wt(t.placement), _ = !A, E = jo(N), g = Qw(E), I = t.modifiersData.popperOffsets, U = t.rects.reference, W = t.rects.popper, O = typeof f == "function" ? f(Object.assign({}, t.rects, { placement: t.placement - })) : f, P = typeof C == "number" ? { - mainAxis: C, - altAxis: C + })) : f, P = typeof O == "number" ? { + mainAxis: O, + altAxis: O } : Object.assign({ mainAxis: 0, altAxis: 0 - }, C), k = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, B = { + }, O), k = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, B = { x: 0, y: 0 }; - if (_) { + if (I) { if (a) { - var D, J = E === "y" ? Ce : Se, q = E === "y" ? je : Ve, U = E === "y" ? "height" : "width", ee = _[E], ae = ee + m[J], re = ee - m[q], y = b ? -H[U] / 2 : 0, S = I === zt ? L[U] : H[U], z = I === zt ? -H[U] : -L[U], F = t.elements.arrow, V = b && F ? _o(F) : { + var D, Q = E === "y" ? Ce : Se, J = E === "y" ? Fe : ze, X = E === "y" ? "height" : "width", ee = I[E], re = ee + m[Q], oe = ee - m[J], y = b ? -W[X] / 2 : 0, R = A === Ht ? U[X] : W[X], H = A === Ht ? -W[X] : -U[X], G = t.elements.arrow, z = b && G ? Bo(G) : { width: 0, height: 0 - }, W = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ls(), X = W[J], Y = W[q], G = dn(0, L[U], V[U]), K = O ? L[U] / 2 - y - G - X - P.mainAxis : S - G - X - P.mainAxis, Z = O ? -L[U] / 2 + y + G + Y + P.mainAxis : z + G + Y + P.mainAxis, de = t.elements.arrow && Pn(t.elements.arrow), $ = de ? E === "y" ? de.clientTop || 0 : de.clientLeft || 0 : 0, xe = (D = k == null ? void 0 : k[E]) != null ? D : 0, j = ee + K - xe - $, ye = ee + Z - xe, ze = dn(b ? Kn(ae, j) : ae, ee, b ? vt(re, ye) : re); - _[E] = ze, B[E] = ze - ee; + }, q = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ui(), L = q[Q], K = q[J], Y = mn(0, U[X], z[X]), Z = _ ? U[X] / 2 - y - Y - L - P.mainAxis : R - Y - L - P.mainAxis, S = _ ? -U[X] / 2 + y + Y + K + P.mainAxis : H + Y + K + P.mainAxis, F = t.elements.arrow && jn(t.elements.arrow), T = F ? E === "y" ? F.clientTop || 0 : F.clientLeft || 0 : 0, we = (D = k == null ? void 0 : k[E]) != null ? D : 0, V = ee + Z - we - T, xe = ee + S - we, Ge = mn(b ? sr(re, V) : re, ee, b ? xt(oe, xe) : oe); + I[E] = Ge, B[E] = Ge - ee; } if (l) { - var ct, ke = E === "x" ? Ce : Se, $n = E === "x" ? je : Ve, Fe = _[g], Et = g === "y" ? "height" : "width", dt = Fe + m[ke], Tt = Fe - m[$n], Ct = [Ce, Se].indexOf(N) !== -1, St = (ct = k == null ? void 0 : k[g]) != null ? ct : 0, pt = Ct ? dt : Fe - L[Et] - H[Et] - St + P.altAxis, Xt = Ct ? Fe + L[Et] + H[Et] - St - P.altAxis : Tt, In = b && Ct ? fw(pt, Fe, Xt) : dn(b ? pt : dt, Fe, b ? Xt : Tt); - _[g] = In, B[g] = In - Fe; + var ut, Ee = E === "x" ? Ce : Se, Vn = E === "x" ? Fe : ze, He = I[g], St = g === "y" ? "height" : "width", pt = He + m[Ee], Ot = He - m[Vn], Rt = [Ce, Se].indexOf(N) !== -1, _t = (ut = k == null ? void 0 : k[g]) != null ? ut : 0, wt = Rt ? pt : He - U[St] - W[St] - _t + P.altAxis, Jt = Rt ? He + U[St] + W[St] - _t - P.altAxis : Ot, Ln = b && Rt ? Ew(wt, He, Jt) : mn(b ? wt : pt, He, b ? Jt : Ot); + I[g] = Ln, B[g] = Ln - He; } t.modifiersData[r] = B; } } -const Hw = { +const tf = { name: "preventOverflow", enabled: !0, phase: "main", - fn: Gw, + fn: ef, requiresIfExists: ["offset"] }; -function Xw(e) { +function nf(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } -function Yw(e) { - return e === Ae(e) || !Be(e) ? Io(e) : Xw(e); +function rf(e) { + return e === Me(e) || !Le(e) ? Vo(e) : nf(e); } -function Ww(e) { - var t = e.getBoundingClientRect(), n = Ft(t.width) / e.offsetWidth || 1, r = Ft(t.height) / e.offsetHeight || 1; +function of(e) { + var t = e.getBoundingClientRect(), n = Xt(t.width) / e.offsetWidth || 1, r = Xt(t.height) / e.offsetHeight || 1; return n !== 1 || r !== 1; } -function qw(e, t, n) { +function af(e, t, n) { n === void 0 && (n = !1); - var r = Be(t), o = Be(t) && Ww(t), a = lt(t), i = Ut(e, o, n), l = { + var r = Le(t), o = Le(t) && of(t), a = dt(t), s = Yt(e, o, n), l = { scrollLeft: 0, scrollTop: 0 }, c = { x: 0, y: 0 }; - return (r || !r && !n) && ((qe(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 - Do(a)) && (l = Yw(t)), Be(t) ? (c = Ut(t, !0), c.x += t.clientLeft, c.y += t.clientTop) : a && (c.x = Ao(a))), { - x: i.left + l.scrollLeft - c.x, - y: i.top + l.scrollTop - c.y, - width: i.width, - height: i.height + return (r || !r && !n) && ((Qe(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 + Fo(a)) && (l = rf(t)), Le(t) ? (c = Yt(t, !0), c.x += t.clientLeft, c.y += t.clientTop) : a && (c.x = Lo(a))), { + x: s.left + l.scrollLeft - c.x, + y: s.top + l.scrollTop - c.y, + width: s.width, + height: s.height }; } -function Kw(e) { +function sf(e) { var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = []; e.forEach(function(a) { t.set(a.name, a); }); function o(a) { n.add(a.name); - var i = [].concat(a.requires || [], a.requiresIfExists || []); - i.forEach(function(l) { + var s = [].concat(a.requires || [], a.requiresIfExists || []); + s.forEach(function(l) { if (!n.has(l)) { var c = t.get(l); c && o(c); @@ -7014,15 +7014,15 @@ function Kw(e) { n.has(a.name) || o(a); }), r; } -function Jw(e) { - var t = Kw(e); - return lw.reduce(function(n, r) { +function lf(e) { + var t = sf(e); + return bw.reduce(function(n, r) { return n.concat(t.filter(function(o) { return o.phase === r; })); }, []); } -function Zw(e) { +function cf(e) { var t; return function() { return t || (t = new Promise(function(n) { @@ -7032,7 +7032,7 @@ function Zw(e) { })), t; }; } -function Qw(e) { +function df(e) { var t = e.reduce(function(n, r) { var o = n[r.name]; return n[r.name] = o ? Object.assign({}, o, r, { @@ -7044,27 +7044,27 @@ function Qw(e) { return t[n]; }); } -var za = { +var Ya = { placement: "bottom", modifiers: [], strategy: "absolute" }; -function Fa() { +function Wa() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; return !t.some(function(r) { return !(r && typeof r.getBoundingClientRect == "function"); }); } -function ef(e) { +function uf(e) { e === void 0 && (e = {}); - var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? za : o; + var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? Ya : o; return function(l, c, d) { d === void 0 && (d = a); - var p = { + var u = { placement: "bottom", orderedModifiers: [], - options: Object.assign({}, za, a), + options: Object.assign({}, Ya, a), modifiersData: {}, elements: { reference: l, @@ -7073,15 +7073,15 @@ function ef(e) { attributes: {}, styles: {} }, h = [], w = !1, b = { - state: p, + state: u, setOptions: function(N) { - var I = typeof N == "function" ? N(p.options) : N; - f(), p.options = Object.assign({}, a, p.options, I), p.scrollParents = { - reference: kt(l) ? pn(l) : l.contextElement ? pn(l.contextElement) : [], - popper: pn(c) + var A = typeof N == "function" ? N(u.options) : N; + f(), u.options = Object.assign({}, a, u.options, A), u.scrollParents = { + reference: Tt(l) ? hn(l) : l.contextElement ? hn(l.contextElement) : [], + popper: hn(c) }; - var O = Jw(Qw([].concat(r, p.options.modifiers))); - return p.orderedModifiers = O.filter(function(E) { + var _ = lf(df([].concat(r, u.options.modifiers))); + return u.orderedModifiers = _.filter(function(E) { return E.enabled; }), v(), b.update(); }, @@ -7092,58 +7092,58 @@ function ef(e) { // prefer the async Popper#update method forceUpdate: function() { if (!w) { - var N = p.elements, I = N.reference, O = N.popper; - if (Fa(I, O)) { - p.rects = { - reference: qw(I, Pn(O), p.options.strategy === "fixed"), - popper: _o(O) - }, p.reset = !1, p.placement = p.options.placement, p.orderedModifiers.forEach(function(P) { - return p.modifiersData[P.name] = Object.assign({}, P.data); + var N = u.elements, A = N.reference, _ = N.popper; + if (Wa(A, _)) { + u.rects = { + reference: af(A, jn(_), u.options.strategy === "fixed"), + popper: Bo(_) + }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(P) { + return u.modifiersData[P.name] = Object.assign({}, P.data); }); - for (var E = 0; E < p.orderedModifiers.length; E++) { - if (p.reset === !0) { - p.reset = !1, E = -1; + for (var E = 0; E < u.orderedModifiers.length; E++) { + if (u.reset === !0) { + u.reset = !1, E = -1; continue; } - var g = p.orderedModifiers[E], _ = g.fn, L = g.options, H = L === void 0 ? {} : L, C = g.name; - typeof _ == "function" && (p = _({ - state: p, - options: H, - name: C, + var g = u.orderedModifiers[E], I = g.fn, U = g.options, W = U === void 0 ? {} : U, O = g.name; + typeof I == "function" && (u = I({ + state: u, + options: W, + name: O, instance: b - }) || p); + }) || u); } } } }, // Async and optimistically optimized update – it will not be executed if // not necessary (debounced to run at most once-per-tick) - update: Zw(function() { + update: cf(function() { return new Promise(function(m) { - b.forceUpdate(), m(p); + b.forceUpdate(), m(u); }); }), destroy: function() { f(), w = !0; } }; - if (!Fa(l, c)) + if (!Wa(l, c)) return b; b.setOptions(d).then(function(m) { !w && d.onFirstUpdate && d.onFirstUpdate(m); }); function v() { - p.orderedModifiers.forEach(function(m) { - var N = m.name, I = m.options, O = I === void 0 ? {} : I, E = m.effect; + u.orderedModifiers.forEach(function(m) { + var N = m.name, A = m.options, _ = A === void 0 ? {} : A, E = m.effect; if (typeof E == "function") { var g = E({ - state: p, + state: u, name: N, instance: b, - options: O - }), _ = function() { + options: _ + }), I = function() { }; - h.push(g || _); + h.push(g || I); } }); } @@ -7155,16 +7155,16 @@ function ef(e) { return b; }; } -var tf = [Ew, Fw, Nw, pw, Lw, Dw, Hw, bw, Bw], nf = /* @__PURE__ */ ef({ - defaultModifiers: tf +var pf = [Aw, Zw, $w, xw, Kw, Hw, tf, Ow, Yw], wf = /* @__PURE__ */ uf({ + defaultModifiers: pf }); -const ws = "Popper"; -function rf(e) { - return rs(ws, e); +const hi = "Popper"; +function ff(e) { + return si(hi, e); } -qu(ws, ["root"]); -const of = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], af = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"]; -function sf(e, t) { +aw(hi, ["root"]); +const mf = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], hf = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"]; +function gf(e, t) { if (t === "ltr") return e; switch (e) { @@ -7180,27 +7180,27 @@ function sf(e, t) { return e; } } -function Jn(e) { +function ir(e) { return typeof e == "function" ? e() : e; } -function vr(e) { +function Er(e) { return e.nodeType !== void 0; } -function lf(e) { - return !vr(e); +function bf(e) { + return !Er(e); } -const cf = () => bo({ +const vf = () => Eo({ root: ["root"] -}, zu(rf)), df = {}, pf = /* @__PURE__ */ M.forwardRef(function(t, n) { +}, Jp(ff)), yf = {}, xf = /* @__PURE__ */ j.forwardRef(function(t, n) { var r; const { anchorEl: o, children: a, - direction: i, + direction: s, disablePortal: l, modifiers: c, open: d, - placement: p, + placement: u, popperOptions: h, popperRef: w, slotProps: b = {}, @@ -7208,27 +7208,27 @@ const cf = () => bo({ TransitionProps: f // @ts-ignore internal logic // prevent from spreading to DOM, it can come from the parent component e.g. Select. - } = t, m = Ne(t, of), N = M.useRef(null), I = xt(N, n), O = M.useRef(null), E = xt(O, w), g = M.useRef(E); - Lt(() => { + } = t, m = ke(t, mf), N = j.useRef(null), A = kt(N, n), _ = j.useRef(null), E = kt(_, w), g = j.useRef(E); + Gt(() => { g.current = E; - }, [E]), M.useImperativeHandle(w, () => O.current, []); - const _ = sf(p, i), [L, H] = M.useState(_), [C, P] = M.useState(Jn(o)); - M.useEffect(() => { - O.current && O.current.forceUpdate(); - }), M.useEffect(() => { - o && P(Jn(o)); - }, [o]), Lt(() => { - if (!C || !d) + }, [E]), j.useImperativeHandle(w, () => _.current, []); + const I = gf(u, s), [U, W] = j.useState(I), [O, P] = j.useState(ir(o)); + j.useEffect(() => { + _.current && _.current.forceUpdate(); + }), j.useEffect(() => { + o && P(ir(o)); + }, [o]), Gt(() => { + if (!O || !d) return; - const q = (ae) => { - H(ae.placement); + const J = (re) => { + W(re.placement); }; - if (process.env.NODE_ENV !== "production" && C && vr(C) && C.nodeType === 1) { - const ae = C.getBoundingClientRect(); - process.env.NODE_ENV !== "test" && ae.top === 0 && ae.left === 0 && ae.right === 0 && ae.bottom === 0 && 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(` + if (process.env.NODE_ENV !== "production" && O && Er(O) && O.nodeType === 1) { + const re = O.getBoundingClientRect(); + process.env.NODE_ENV !== "test" && re.top === 0 && re.left === 0 && re.right === 0 && re.bottom === 0 && 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(` `)); } - let U = [{ + let X = [{ name: "preventOverflow", options: { altBoundary: l @@ -7243,105 +7243,105 @@ const cf = () => bo({ enabled: !0, phase: "afterWrite", fn: ({ - state: ae + state: re }) => { - q(ae); + J(re); } }]; - c != null && (U = U.concat(c)), h && h.modifiers != null && (U = U.concat(h.modifiers)); - const ee = nf(C, N.current, R({ - placement: _ + c != null && (X = X.concat(c)), h && h.modifiers != null && (X = X.concat(h.modifiers)); + const ee = wf(O, N.current, $({ + placement: I }, h, { - modifiers: U + modifiers: X })); return g.current(ee), () => { ee.destroy(), g.current(null); }; - }, [C, l, c, d, h, _]); + }, [O, l, c, d, h, I]); const k = { - placement: L + placement: U }; f !== null && (k.TransitionProps = f); - const B = cf(), D = (r = v.root) != null ? r : "div", J = Xu({ + const B = vf(), D = (r = v.root) != null ? r : "div", Q = nw({ elementType: D, externalSlotProps: b.root, externalForwardedProps: m, additionalProps: { role: "tooltip", - ref: I + ref: A }, ownerState: t, className: B.root }); - return /* @__PURE__ */ s(D, R({}, J, { + return /* @__PURE__ */ i(D, $({}, Q, { children: typeof a == "function" ? a(k) : a })); -}), fs = /* @__PURE__ */ M.forwardRef(function(t, n) { +}), gi = /* @__PURE__ */ j.forwardRef(function(t, n) { const { anchorEl: r, children: o, container: a, - direction: i = "ltr", + direction: s = "ltr", disablePortal: l = !1, keepMounted: c = !1, modifiers: d, - open: p, + open: u, placement: h = "bottom", - popperOptions: w = df, + popperOptions: w = yf, popperRef: b, style: v, transition: f = !1, slotProps: m = {}, slots: N = {} - } = t, I = Ne(t, af), [O, E] = M.useState(!0), g = () => { + } = t, A = ke(t, hf), [_, E] = j.useState(!0), g = () => { E(!1); - }, _ = () => { + }, I = () => { E(!0); }; - if (!c && !p && (!f || O)) + if (!c && !u && (!f || _)) return null; - let L; + let U; if (a) - L = a; + U = a; else if (r) { - const P = Jn(r); - L = P && vr(P) ? Xn(P).body : Xn(null).body; + const P = ir(r); + U = P && Er(P) ? nr(P).body : nr(null).body; } - const H = !p && c && (!f || O) ? "none" : void 0, C = f ? { - in: p, + const W = !u && c && (!f || _) ? "none" : void 0, O = f ? { + in: u, onEnter: g, - onExited: _ + onExited: I } : void 0; - return /* @__PURE__ */ s(qn, { + return /* @__PURE__ */ i(ar, { disablePortal: l, - container: L, - children: /* @__PURE__ */ s(pf, R({ + container: U, + children: /* @__PURE__ */ i(xf, $({ anchorEl: r, - direction: i, + direction: s, disablePortal: l, modifiers: d, ref: n, - open: f ? !O : p, + open: f ? !_ : u, placement: h, popperOptions: w, popperRef: b, slotProps: m, slots: N - }, I, { - style: R({ + }, A, { + style: $({ // Prevents scroll issue, waiting for Popper.js to add this style once initiated. position: "fixed", // Fix Popper.js display issue top: 0, left: 0, - display: H + display: W }, v), - TransitionProps: C, + TransitionProps: O, children: o })) }); }); -process.env.NODE_ENV !== "production" && (fs.propTypes = { +process.env.NODE_ENV !== "production" && (gi.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ @@ -7352,15 +7352,15 @@ process.env.NODE_ENV !== "production" && (fs.propTypes = { * It's used to set the position of the popper. * The return value will passed as the reference object of the Popper instance. */ - anchorEl: ho(u.oneOfType([gn, u.object, u.func]), (e) => { + anchorEl: No(p.oneOfType([Nn, p.object, p.func]), (e) => { if (e.open) { - const t = Jn(e.anchorEl); - if (t && vr(t) && t.nodeType === 1) { + const t = ir(e.anchorEl); + if (t && Er(t) && t.nodeType === 1) { const n = t.getBoundingClientRect(); if (process.env.NODE_ENV !== "test" && n.top === 0 && n.left === 0 && n.right === 0 && n.bottom === 0) 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(` `)); - } else if (!t || typeof t.getBoundingClientRect != "function" || lf(t) && t.contextElement != null && t.contextElement.nodeType !== 1) + } else if (!t || typeof t.getBoundingClientRect != "function" || bf(t) && t.contextElement != null && t.contextElement.nodeType !== 1) 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(` `)); } @@ -7369,7 +7369,7 @@ process.env.NODE_ENV !== "production" && (fs.propTypes = { /** * Popper render function or node. */ - children: u.oneOfType([u.node, u.func]), + children: p.oneOfType([p.node, p.func]), /** * An HTML element or function that returns one. * The `container` will have the portal children appended to it. @@ -7380,24 +7380,24 @@ process.env.NODE_ENV !== "production" && (fs.propTypes = { * By default, it uses the body of the top-level document object, * so it's simply `document.body` most of the time. */ - container: u.oneOfType([gn, u.func]), + container: p.oneOfType([Nn, p.func]), /** * Direction of the text. * @default 'ltr' */ - direction: u.oneOf(["ltr", "rtl"]), + direction: p.oneOf(["ltr", "rtl"]), /** * The `children` will be under the DOM hierarchy of the parent component. * @default false */ - disablePortal: u.bool, + disablePortal: p.bool, /** * Always keep the children in the DOM. * This prop can be useful in SEO situation or * when you want to maximize the responsiveness of the Popper. * @default false */ - keepMounted: u.bool, + keepMounted: p.bool, /** * Popper.js is based on a "plugin-like" architecture, * most of its features are fully encapsulated "modifiers". @@ -7407,110 +7407,110 @@ process.env.NODE_ENV !== "production" && (fs.propTypes = { * For this reason, modifiers should be very performant to avoid bottlenecks. * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/). */ - modifiers: u.arrayOf(u.shape({ - data: u.object, - effect: u.func, - enabled: u.bool, - fn: u.func, - name: u.any, - options: u.object, - phase: u.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]), - requires: u.arrayOf(u.string), - requiresIfExists: u.arrayOf(u.string) + modifiers: p.arrayOf(p.shape({ + data: p.object, + effect: p.func, + enabled: p.bool, + fn: p.func, + name: p.any, + options: p.object, + phase: p.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]), + requires: p.arrayOf(p.string), + requiresIfExists: p.arrayOf(p.string) })), /** * If `true`, the component is shown. */ - open: u.bool.isRequired, + open: p.bool.isRequired, /** * Popper placement. * @default 'bottom' */ - placement: u.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"]), + placement: p.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"]), /** * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance. * @default {} */ - popperOptions: u.shape({ - modifiers: u.array, - onFirstUpdate: u.func, - placement: u.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"]), - strategy: u.oneOf(["absolute", "fixed"]) + popperOptions: p.shape({ + modifiers: p.array, + onFirstUpdate: p.func, + placement: p.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"]), + strategy: p.oneOf(["absolute", "fixed"]) }), /** * A ref that points to the used popper instance. */ - popperRef: Li, + popperRef: Us, /** * The props used for each slot inside the Popper. * @default {} */ - slotProps: u.shape({ - root: u.oneOfType([u.func, u.object]) + slotProps: p.shape({ + root: p.oneOfType([p.func, p.object]) }), /** * The components used for each slot inside the Popper. * Either a string to use a HTML element or a component. * @default {} */ - slots: u.shape({ - root: u.elementType + slots: p.shape({ + root: p.elementType }), /** * Help supporting a react-transition-group/Transition component. * @default false */ - transition: u.bool + transition: p.bool }); -function ms() { - const e = Zi(To); - return process.env.NODE_ENV !== "production" && M.useDebugValue(e), e[Co] || e; +function bi() { + const e = ti(Po); + return process.env.NODE_ENV !== "production" && j.useDebugValue(e), e[$o] || e; } -function Jr(e, t) { - return Jr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) { +function oo(e, t) { + return oo = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) { return r.__proto__ = o, r; - }, Jr(e, t); + }, oo(e, t); } -function uf(e, t) { - e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Jr(e, t); +function Nf(e, t) { + e.prototype = Object.create(t.prototype), e.prototype.constructor = e, oo(e, t); } -const Ua = { +const qa = { disabled: !1 }; -var wf = process.env.NODE_ENV !== "production" ? u.oneOfType([u.number, u.shape({ - enter: u.number, - exit: u.number, - appear: u.number +var kf = process.env.NODE_ENV !== "production" ? p.oneOfType([p.number, p.shape({ + enter: p.number, + exit: p.number, + appear: p.number }).isRequired]) : null; -process.env.NODE_ENV !== "production" && u.oneOfType([u.string, u.shape({ - enter: u.string, - exit: u.string, - active: u.string -}), u.shape({ - enter: u.string, - enterDone: u.string, - enterActive: u.string, - exit: u.string, - exitDone: u.string, - exitActive: u.string +process.env.NODE_ENV !== "production" && p.oneOfType([p.string, p.shape({ + enter: p.string, + exit: p.string, + active: p.string +}), p.shape({ + enter: p.string, + enterDone: p.string, + enterActive: p.string, + exit: p.string, + exitDone: p.string, + exitActive: p.string })]); -const hs = A.createContext(null); -var ff = function(t) { +const vi = M.createContext(null); +var Ef = function(t) { return t.scrollTop; -}, an = "unmounted", ft = "exited", mt = "entering", At = "entered", Zr = "exiting", tt = /* @__PURE__ */ function(e) { - uf(t, e); +}, un = "unmounted", ht = "exited", gt = "entering", Bt = "entered", ao = "exiting", at = /* @__PURE__ */ function(e) { + Nf(t, e); function t(r, o) { var a; a = e.call(this, r, o) || this; - var i = o, l = i && !i.isMounting ? r.enter : r.appear, c; - return a.appearStatus = null, r.in ? l ? (c = ft, a.appearStatus = mt) : c = At : r.unmountOnExit || r.mountOnEnter ? c = an : c = ft, a.state = { + var s = o, l = s && !s.isMounting ? r.enter : r.appear, c; + return a.appearStatus = null, r.in ? l ? (c = ht, a.appearStatus = gt) : c = Bt : r.unmountOnExit || r.mountOnEnter ? c = un : c = ht, a.state = { status: c }, a.nextCallback = null, a; } t.getDerivedStateFromProps = function(o, a) { - var i = o.in; - return i && a.status === an ? { - status: ft + var s = o.in; + return s && a.status === un ? { + status: ht } : null; }; var n = t.prototype; @@ -7519,70 +7519,70 @@ var ff = function(t) { }, n.componentDidUpdate = function(o) { var a = null; if (o !== this.props) { - var i = this.state.status; - this.props.in ? i !== mt && i !== At && (a = mt) : (i === mt || i === At) && (a = Zr); + var s = this.state.status; + this.props.in ? s !== gt && s !== Bt && (a = gt) : (s === gt || s === Bt) && (a = ao); } this.updateStatus(!1, a); }, n.componentWillUnmount = function() { this.cancelNextCallback(); }, n.getTimeouts = function() { - var o = this.props.timeout, a, i, l; - return a = i = l = o, o != null && typeof o != "number" && (a = o.exit, i = o.enter, l = o.appear !== void 0 ? o.appear : i), { + var o = this.props.timeout, a, s, l; + return a = s = l = o, o != null && typeof o != "number" && (a = o.exit, s = o.enter, l = o.appear !== void 0 ? o.appear : s), { exit: a, - enter: i, + enter: s, appear: l }; }, n.updateStatus = function(o, a) { if (o === void 0 && (o = !1), a !== null) - if (this.cancelNextCallback(), a === mt) { + if (this.cancelNextCallback(), a === gt) { if (this.props.unmountOnExit || this.props.mountOnEnter) { - var i = this.props.nodeRef ? this.props.nodeRef.current : Mn.findDOMNode(this); - i && ff(i); + var s = this.props.nodeRef ? this.props.nodeRef.current : Un.findDOMNode(this); + s && Ef(s); } this.performEnter(o); } else this.performExit(); else - this.props.unmountOnExit && this.state.status === ft && this.setState({ - status: an + this.props.unmountOnExit && this.state.status === ht && this.setState({ + status: un }); }, n.performEnter = function(o) { - var a = this, i = this.props.enter, l = this.context ? this.context.isMounting : o, c = this.props.nodeRef ? [l] : [Mn.findDOMNode(this), l], d = c[0], p = c[1], h = this.getTimeouts(), w = l ? h.appear : h.enter; - if (!o && !i || Ua.disabled) { + var a = this, s = this.props.enter, l = this.context ? this.context.isMounting : o, c = this.props.nodeRef ? [l] : [Un.findDOMNode(this), l], d = c[0], u = c[1], h = this.getTimeouts(), w = l ? h.appear : h.enter; + if (!o && !s || qa.disabled) { this.safeSetState({ - status: At + status: Bt }, function() { a.props.onEntered(d); }); return; } - this.props.onEnter(d, p), this.safeSetState({ - status: mt + this.props.onEnter(d, u), this.safeSetState({ + status: gt }, function() { - a.props.onEntering(d, p), a.onTransitionEnd(w, function() { + a.props.onEntering(d, u), a.onTransitionEnd(w, function() { a.safeSetState({ - status: At + status: Bt }, function() { - a.props.onEntered(d, p); + a.props.onEntered(d, u); }); }); }); }, n.performExit = function() { - var o = this, a = this.props.exit, i = this.getTimeouts(), l = this.props.nodeRef ? void 0 : Mn.findDOMNode(this); - if (!a || Ua.disabled) { + var o = this, a = this.props.exit, s = this.getTimeouts(), l = this.props.nodeRef ? void 0 : Un.findDOMNode(this); + if (!a || qa.disabled) { this.safeSetState({ - status: ft + status: ht }, function() { o.props.onExited(l); }); return; } this.props.onExit(l), this.safeSetState({ - status: Zr + status: ao }, function() { - o.props.onExiting(l), o.onTransitionEnd(i.exit, function() { + o.props.onExiting(l), o.onTransitionEnd(s.exit, function() { o.safeSetState({ - status: ft + status: ht }, function() { o.props.onExited(l); }); @@ -7593,41 +7593,41 @@ var ff = function(t) { }, n.safeSetState = function(o, a) { a = this.setNextCallback(a), this.setState(o, a); }, n.setNextCallback = function(o) { - var a = this, i = !0; + var a = this, s = !0; return this.nextCallback = function(l) { - i && (i = !1, a.nextCallback = null, o(l)); + s && (s = !1, a.nextCallback = null, o(l)); }, this.nextCallback.cancel = function() { - i = !1; + s = !1; }, this.nextCallback; }, n.onTransitionEnd = function(o, a) { this.setNextCallback(a); - var i = this.props.nodeRef ? this.props.nodeRef.current : Mn.findDOMNode(this), l = o == null && !this.props.addEndListener; - if (!i || l) { + var s = this.props.nodeRef ? this.props.nodeRef.current : Un.findDOMNode(this), l = o == null && !this.props.addEndListener; + if (!s || l) { setTimeout(this.nextCallback, 0); return; } if (this.props.addEndListener) { - var c = this.props.nodeRef ? [this.nextCallback] : [i, this.nextCallback], d = c[0], p = c[1]; - this.props.addEndListener(d, p); + var c = this.props.nodeRef ? [this.nextCallback] : [s, this.nextCallback], d = c[0], u = c[1]; + this.props.addEndListener(d, u); } o != null && setTimeout(this.nextCallback, o); }, n.render = function() { var o = this.state.status; - if (o === an) + if (o === un) return null; - var a = this.props, i = a.children; + var a = this.props, s = a.children; a.in, a.mountOnEnter, a.unmountOnExit, a.appear, a.enter, a.exit, a.timeout, a.addEndListener, a.onEnter, a.onEntering, a.onEntered, a.onExit, a.onExiting, a.onExited, a.nodeRef; - var l = Ne(a, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); + var l = ke(a, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); return ( // allows for nested Transitions - /* @__PURE__ */ A.createElement(hs.Provider, { + /* @__PURE__ */ M.createElement(vi.Provider, { value: null - }, typeof i == "function" ? i(o, l) : A.cloneElement(A.Children.only(i), l)) + }, typeof s == "function" ? s(o, l) : M.cloneElement(M.Children.only(s), l)) ); }, t; -}(A.Component); -tt.contextType = hs; -tt.propTypes = process.env.NODE_ENV !== "production" ? { +}(M.Component); +at.contextType = vi; +at.propTypes = process.env.NODE_ENV !== "production" ? { /** * A React reference to DOM element that need to transition: * https://stackoverflow.com/a/51127130/4671932 @@ -7639,10 +7639,10 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * (see * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)). */ - nodeRef: u.shape({ - current: typeof Element > "u" ? u.any : function(e, t, n, r, o, a) { - var i = e[t]; - return u.instanceOf(i && "ownerDocument" in i ? i.ownerDocument.defaultView.Element : Element)(e, t, n, r, o, a); + nodeRef: p.shape({ + current: typeof Element > "u" ? p.any : function(e, t, n, r, o, a) { + var s = e[t]; + return p.instanceOf(s && "ownerDocument" in s ? s.ownerDocument.defaultView.Element : Element)(e, t, n, r, o, a); } }), /** @@ -7659,23 +7659,23 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * * ``` */ - children: u.oneOfType([u.func.isRequired, u.element.isRequired]).isRequired, + children: p.oneOfType([p.func.isRequired, p.element.isRequired]).isRequired, /** * Show the component; triggers the enter or exit states */ - in: u.bool, + in: p.bool, /** * By default the child component is mounted immediately along with * the parent `Transition` component. If you want to "lazy mount" the component on the * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay * mounted, even on "exited", unless you also specify `unmountOnExit`. */ - mountOnEnter: u.bool, + mountOnEnter: p.bool, /** * By default the child component stays mounted after it reaches the `'exited'` state. * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting. */ - unmountOnExit: u.bool, + unmountOnExit: p.bool, /** * By default the child component does not perform the enter transition when * it first mounts, regardless of the value of `in`. If you want this @@ -7687,15 +7687,15 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * > additional `.appear-*` classes, that way you can choose to style it * > differently. */ - appear: u.bool, + appear: p.bool, /** * Enable or disable enter transitions. */ - enter: u.bool, + enter: p.bool, /** * Enable or disable exit transitions. */ - exit: u.bool, + exit: p.bool, /** * The duration of the transition, in milliseconds. * Required unless `addEndListener` is provided. @@ -7723,7 +7723,7 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * @type {number | { enter?: number, exit?: number, appear?: number }} */ timeout: function(t) { - var n = wf; + var n = kf; t.addEndListener || (n = n.isRequired); for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++) o[a - 1] = arguments[a]; @@ -7743,7 +7743,7 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * }} * ``` */ - addEndListener: u.func, + addEndListener: p.func, /** * Callback fired before the "entering" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount @@ -7752,7 +7752,7 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * * @type Function(node: HtmlElement, isAppearing: bool) -> void */ - onEnter: u.func, + onEnter: p.func, /** * Callback fired after the "entering" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount @@ -7761,7 +7761,7 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * * @type Function(node: HtmlElement, isAppearing: bool) */ - onEntering: u.func, + onEntering: p.func, /** * Callback fired after the "entered" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount @@ -7770,7 +7770,7 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * * @type Function(node: HtmlElement, isAppearing: bool) -> void */ - onEntered: u.func, + onEntered: p.func, /** * Callback fired before the "exiting" status is applied. * @@ -7778,7 +7778,7 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * * @type Function(node: HtmlElement) -> void */ - onExit: u.func, + onExit: p.func, /** * Callback fired after the "exiting" status is applied. * @@ -7786,7 +7786,7 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * * @type Function(node: HtmlElement) -> void */ - onExiting: u.func, + onExiting: p.func, /** * Callback fired after the "exited" status is applied. * @@ -7794,148 +7794,148 @@ tt.propTypes = process.env.NODE_ENV !== "production" ? { * * @type Function(node: HtmlElement) -> void */ - onExited: u.func + onExited: p.func } : {}; -function It() { +function Mt() { } -tt.defaultProps = { +at.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, - onEnter: It, - onEntering: It, - onEntered: It, - onExit: It, - onExiting: It, - onExited: It + onEnter: Mt, + onEntering: Mt, + onEntered: Mt, + onExit: Mt, + onExiting: Mt, + onExited: Mt }; -tt.UNMOUNTED = an; -tt.EXITED = ft; -tt.ENTERING = mt; -tt.ENTERED = At; -tt.EXITING = Zr; -const mf = tt, hf = (e) => e.scrollTop; -function Ga(e, t) { +at.UNMOUNTED = un; +at.EXITED = ht; +at.ENTERING = gt; +at.ENTERED = Bt; +at.EXITING = ao; +const Tf = at, Cf = (e) => e.scrollTop; +function Ka(e, t) { var n, r; const { timeout: o, easing: a, - style: i = {} + style: s = {} } = e; return { - duration: (n = i.transitionDuration) != null ? n : typeof o == "number" ? o : o[t.mode] || 0, - easing: (r = i.transitionTimingFunction) != null ? r : typeof a == "object" ? a[t.mode] : a, - delay: i.transitionDelay + duration: (n = s.transitionDuration) != null ? n : typeof o == "number" ? o : o[t.mode] || 0, + easing: (r = s.transitionTimingFunction) != null ? r : typeof a == "object" ? a[t.mode] : a, + delay: s.transitionDelay }; } -const gf = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]; -function Qr(e) { +const Sf = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]; +function so(e) { return `scale(${e}, ${e ** 2})`; } -const bf = { +const Of = { entering: { opacity: 1, - transform: Qr(1) + transform: so(1) }, entered: { opacity: 1, transform: "none" } -}, Vr = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), Mo = /* @__PURE__ */ M.forwardRef(function(t, n) { +}, Gr = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), zo = /* @__PURE__ */ j.forwardRef(function(t, n) { const { addEndListener: r, appear: o = !0, children: a, - easing: i, + easing: s, in: l, onEnter: c, onEntered: d, - onEntering: p, + onEntering: u, onExit: h, onExited: w, onExiting: b, style: v, timeout: f = "auto", // eslint-disable-next-line react/prop-types - TransitionComponent: m = mf - } = t, N = Ne(t, gf), I = rn(), O = M.useRef(), E = ms(), g = M.useRef(null), _ = xt(g, a.ref, n), L = (q) => (U) => { - if (q) { + TransitionComponent: m = Tf + } = t, N = ke(t, Sf), A = cn(), _ = j.useRef(), E = bi(), g = j.useRef(null), I = kt(g, a.ref, n), U = (J) => (X) => { + if (J) { const ee = g.current; - U === void 0 ? q(ee) : q(ee, U); + X === void 0 ? J(ee) : J(ee, X); } - }, H = L(p), C = L((q, U) => { - hf(q); + }, W = U(u), O = U((J, X) => { + Cf(J); const { duration: ee, - delay: ae, - easing: re - } = Ga({ + delay: re, + easing: oe + } = Ka({ style: v, timeout: f, - easing: i + easing: s }, { mode: "enter" }); let y; - f === "auto" ? (y = E.transitions.getAutoHeightDuration(q.clientHeight), O.current = y) : y = ee, q.style.transition = [E.transitions.create("opacity", { + f === "auto" ? (y = E.transitions.getAutoHeightDuration(J.clientHeight), _.current = y) : y = ee, J.style.transition = [E.transitions.create("opacity", { duration: y, - delay: ae + delay: re }), E.transitions.create("transform", { - duration: Vr ? y : y * 0.666, - delay: ae, - easing: re - })].join(","), c && c(q, U); - }), P = L(d), k = L(b), B = L((q) => { + duration: Gr ? y : y * 0.666, + delay: re, + easing: oe + })].join(","), c && c(J, X); + }), P = U(d), k = U(b), B = U((J) => { const { - duration: U, + duration: X, delay: ee, - easing: ae - } = Ga({ + easing: re + } = Ka({ style: v, timeout: f, - easing: i + easing: s }, { mode: "exit" }); - let re; - f === "auto" ? (re = E.transitions.getAutoHeightDuration(q.clientHeight), O.current = re) : re = U, q.style.transition = [E.transitions.create("opacity", { - duration: re, + let oe; + f === "auto" ? (oe = E.transitions.getAutoHeightDuration(J.clientHeight), _.current = oe) : oe = X, J.style.transition = [E.transitions.create("opacity", { + duration: oe, delay: ee }), E.transitions.create("transform", { - duration: Vr ? re : re * 0.666, - delay: Vr ? ee : ee || re * 0.333, - easing: ae - })].join(","), q.style.opacity = 0, q.style.transform = Qr(0.75), h && h(q); - }), D = L(w); - return /* @__PURE__ */ s(m, R({ + duration: Gr ? oe : oe * 0.666, + delay: Gr ? ee : ee || oe * 0.333, + easing: re + })].join(","), J.style.opacity = 0, J.style.transform = so(0.75), h && h(J); + }), D = U(w); + return /* @__PURE__ */ i(m, $({ appear: o, in: l, nodeRef: g, - onEnter: C, + onEnter: O, onEntered: P, - onEntering: H, + onEntering: W, onExit: B, onExited: D, onExiting: k, - addEndListener: (q) => { - f === "auto" && I.start(O.current || 0, q), r && r(g.current, q); + addEndListener: (J) => { + f === "auto" && A.start(_.current || 0, J), r && r(g.current, J); }, timeout: f === "auto" ? null : f }, N, { - children: (q, U) => /* @__PURE__ */ M.cloneElement(a, R({ - style: R({ + children: (J, X) => /* @__PURE__ */ j.cloneElement(a, $({ + style: $({ opacity: 0, - transform: Qr(0.75), - visibility: q === "exited" && !l ? "hidden" : void 0 - }, bf[q], v, a.props.style), - ref: _ - }, U)) + transform: so(0.75), + visibility: J === "exited" && !l ? "hidden" : void 0 + }, Of[J], v, a.props.style), + ref: I + }, X)) })); }); -process.env.NODE_ENV !== "production" && (Mo.propTypes = { +process.env.NODE_ENV !== "production" && (zo.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -7945,57 +7945,57 @@ process.env.NODE_ENV !== "production" && (Mo.propTypes = { * node and a done callback. Allows for more fine grained transition end * logic. Note: Timeouts are still used as a fallback if provided. */ - addEndListener: u.func, + addEndListener: p.func, /** * Perform the enter transition when it first mounts if `in` is also `true`. * Set this to `false` to disable this behavior. * @default true */ - appear: u.bool, + appear: p.bool, /** * A single child content element. */ - children: ji.isRequired, + children: Fs.isRequired, /** * The transition timing function. * You may specify a single easing or a object containing enter and exit values. */ - easing: u.oneOfType([u.shape({ - enter: u.string, - exit: u.string - }), u.string]), + easing: p.oneOfType([p.shape({ + enter: p.string, + exit: p.string + }), p.string]), /** * If `true`, the component will transition in. */ - in: u.bool, + in: p.bool, /** * @ignore */ - onEnter: u.func, + onEnter: p.func, /** * @ignore */ - onEntered: u.func, + onEntered: p.func, /** * @ignore */ - onEntering: u.func, + onEntering: p.func, /** * @ignore */ - onExit: u.func, + onExit: p.func, /** * @ignore */ - onExited: u.func, + onExited: p.func, /** * @ignore */ - onExiting: u.func, + onExiting: p.func, /** * @ignore */ - style: u.object, + style: p.object, /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. @@ -8003,28 +8003,28 @@ process.env.NODE_ENV !== "production" && (Mo.propTypes = { * Set to 'auto' to automatically calculate transition time based on height. * @default 'auto' */ - timeout: u.oneOfType([u.oneOf(["auto"]), u.number, u.shape({ - appear: u.number, - enter: u.number, - exit: u.number + timeout: p.oneOfType([p.oneOf(["auto"]), p.number, p.shape({ + appear: p.number, + enter: p.number, + exit: p.number })]) }); -Mo.muiSupportAuto = !0; -const Ha = Mo, vf = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"], yf = On(fs, { +zo.muiSupportAuto = !0; +const Ja = zo, Rf = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"], _f = Mn(gi, { name: "MuiPopper", slot: "Root", overridesResolver: (e, t) => t.root -})({}), gs = /* @__PURE__ */ M.forwardRef(function(t, n) { +})({}), yi = /* @__PURE__ */ j.forwardRef(function(t, n) { var r; - const o = Ji(), a = So({ + const o = ei(), a = Io({ props: t, name: "MuiPopper" }), { - anchorEl: i, + anchorEl: s, component: l, components: c, componentsProps: d, - container: p, + container: u, disablePortal: h, keepMounted: w, modifiers: b, @@ -8032,12 +8032,12 @@ const Ha = Mo, vf = ["anchorEl", "component", "components", "componentsProps", " placement: f, popperOptions: m, popperRef: N, - transition: I, - slots: O, + transition: A, + slots: _, slotProps: E - } = a, g = Ne(a, vf), _ = (r = O == null ? void 0 : O.root) != null ? r : c == null ? void 0 : c.Root, L = R({ - anchorEl: i, - container: p, + } = a, g = ke(a, Rf), I = (r = _ == null ? void 0 : _.root) != null ? r : c == null ? void 0 : c.Root, U = $({ + anchorEl: s, + container: u, disablePortal: h, keepMounted: w, modifiers: b, @@ -8045,20 +8045,20 @@ const Ha = Mo, vf = ["anchorEl", "component", "components", "componentsProps", " placement: f, popperOptions: m, popperRef: N, - transition: I + transition: A }, g); - return /* @__PURE__ */ s(yf, R({ + return /* @__PURE__ */ i(_f, $({ as: l, direction: o == null ? void 0 : o.direction, slots: { - root: _ + root: I }, slotProps: E ?? d - }, L, { + }, U, { ref: n })); }); -process.env.NODE_ENV !== "production" && (gs.propTypes = { +process.env.NODE_ENV !== "production" && (yi.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ @@ -8069,30 +8069,30 @@ process.env.NODE_ENV !== "production" && (gs.propTypes = { * It's used to set the position of the popper. * The return value will passed as the reference object of the Popper instance. */ - anchorEl: u.oneOfType([gn, u.object, u.func]), + anchorEl: p.oneOfType([Nn, p.object, p.func]), /** * Popper render function or node. */ - children: u.oneOfType([u.node, u.func]), + children: p.oneOfType([p.node, p.func]), /** * The component used for the root node. * Either a string to use a HTML element or a component. */ - component: u.elementType, + component: p.elementType, /** * The components used for each slot inside the Popper. * Either a string to use a HTML element or a component. * @default {} */ - components: u.shape({ - Root: u.elementType + components: p.shape({ + Root: p.elementType }), /** * The props used for each slot inside the Popper. * @default {} */ - componentsProps: u.shape({ - root: u.oneOfType([u.func, u.object]) + componentsProps: p.shape({ + root: p.oneOfType([p.func, p.object]) }), /** * An HTML element or function that returns one. @@ -8104,19 +8104,19 @@ process.env.NODE_ENV !== "production" && (gs.propTypes = { * By default, it uses the body of the top-level document object, * so it's simply `document.body` most of the time. */ - container: u.oneOfType([gn, u.func]), + container: p.oneOfType([Nn, p.func]), /** * The `children` will be under the DOM hierarchy of the parent component. * @default false */ - disablePortal: u.bool, + disablePortal: p.bool, /** * Always keep the children in the DOM. * This prop can be useful in SEO situation or * when you want to maximize the responsiveness of the Popper. * @default false */ - keepMounted: u.bool, + keepMounted: p.bool, /** * Popper.js is based on a "plugin-like" architecture, * most of its features are fully encapsulated "modifiers". @@ -8126,87 +8126,87 @@ process.env.NODE_ENV !== "production" && (gs.propTypes = { * For this reason, modifiers should be very performant to avoid bottlenecks. * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/). */ - modifiers: u.arrayOf(u.shape({ - data: u.object, - effect: u.func, - enabled: u.bool, - fn: u.func, - name: u.any, - options: u.object, - phase: u.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]), - requires: u.arrayOf(u.string), - requiresIfExists: u.arrayOf(u.string) + modifiers: p.arrayOf(p.shape({ + data: p.object, + effect: p.func, + enabled: p.bool, + fn: p.func, + name: p.any, + options: p.object, + phase: p.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]), + requires: p.arrayOf(p.string), + requiresIfExists: p.arrayOf(p.string) })), /** * If `true`, the component is shown. */ - open: u.bool.isRequired, + open: p.bool.isRequired, /** * Popper placement. * @default 'bottom' */ - placement: u.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"]), + placement: p.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"]), /** * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance. * @default {} */ - popperOptions: u.shape({ - modifiers: u.array, - onFirstUpdate: u.func, - placement: u.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"]), - strategy: u.oneOf(["absolute", "fixed"]) + popperOptions: p.shape({ + modifiers: p.array, + onFirstUpdate: p.func, + placement: p.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"]), + strategy: p.oneOf(["absolute", "fixed"]) }), /** * A ref that points to the used popper instance. */ - popperRef: Li, + popperRef: Us, /** * The props used for each slot inside the Popper. * @default {} */ - slotProps: u.shape({ - root: u.oneOfType([u.func, u.object]) + slotProps: p.shape({ + root: p.oneOfType([p.func, p.object]) }), /** * The components used for each slot inside the Popper. * Either a string to use a HTML element or a component. * @default {} */ - slots: u.shape({ - root: u.elementType + slots: p.shape({ + root: p.elementType }), /** * The system prop that allows defining system overrides as well as additional CSS styles. */ - sx: u.oneOfType([u.arrayOf(u.oneOfType([u.func, u.object, u.bool])), u.func, u.object]), + sx: p.oneOfType([p.arrayOf(p.oneOfType([p.func, p.object, p.bool])), p.func, p.object]), /** * Help supporting a react-transition-group/Transition component. * @default false */ - transition: u.bool + transition: p.bool }); -const bs = gs; -function xf(e) { - return lr("MuiTooltip", e); +const xi = yi; +function Pf(e) { + return wr("MuiTooltip", e); } -const Nf = Yi("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]), rt = Nf, kf = ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"]; -function Ef(e) { +const $f = Ks("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]), it = $f, If = ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"]; +function Af(e) { return Math.round(e * 1e5) / 1e5; } -const Tf = (e) => { +const Df = (e) => { const { classes: t, disableInteractive: n, arrow: r, touch: o, placement: a - } = e, i = { + } = e, s = { popper: ["popper", !n && "popperInteractive", r && "popperArrow"], - tooltip: ["tooltip", r && "tooltipArrow", o && "touch", `tooltipPlacement${We(a.split("-")[0])}`], + tooltip: ["tooltip", r && "tooltipArrow", o && "touch", `tooltipPlacement${Ze(a.split("-")[0])}`], arrow: ["arrow"] }; - return bo(i, xf, t); -}, Cf = On(bs, { + return Eo(s, Pf, t); +}, Mf = Mn(xi, { name: "MuiTooltip", slot: "Popper", overridesResolver: (e, t) => { @@ -8219,7 +8219,7 @@ const Tf = (e) => { theme: e, ownerState: t, open: n -}) => R({ +}) => $({ zIndex: (e.vars || e).zIndex.tooltip, pointerEvents: "none" }, !t.disableInteractive && { @@ -8227,21 +8227,21 @@ const Tf = (e) => { }, !n && { pointerEvents: "none" }, t.arrow && { - [`&[data-popper-placement*="bottom"] .${rt.arrow}`]: { + [`&[data-popper-placement*="bottom"] .${it.arrow}`]: { top: 0, marginTop: "-0.71em", "&::before": { transformOrigin: "0 100%" } }, - [`&[data-popper-placement*="top"] .${rt.arrow}`]: { + [`&[data-popper-placement*="top"] .${it.arrow}`]: { bottom: 0, marginBottom: "-0.71em", "&::before": { transformOrigin: "100% 0" } }, - [`&[data-popper-placement*="right"] .${rt.arrow}`]: R({}, t.isRtl ? { + [`&[data-popper-placement*="right"] .${it.arrow}`]: $({}, t.isRtl ? { right: 0, marginRight: "-0.71em" } : { @@ -8254,7 +8254,7 @@ const Tf = (e) => { transformOrigin: "100% 100%" } }), - [`&[data-popper-placement*="left"] .${rt.arrow}`]: R({}, t.isRtl ? { + [`&[data-popper-placement*="left"] .${it.arrow}`]: $({}, t.isRtl ? { left: 0, marginLeft: "-0.71em" } : { @@ -8267,20 +8267,20 @@ const Tf = (e) => { transformOrigin: "0 0" } }) -})), Sf = On("div", { +})), Bf = Mn("div", { name: "MuiTooltip", slot: "Tooltip", overridesResolver: (e, t) => { const { ownerState: n } = e; - return [t.tooltip, n.touch && t.touch, n.arrow && t.tooltipArrow, t[`tooltipPlacement${We(n.placement.split("-")[0])}`]]; + return [t.tooltip, n.touch && t.touch, n.arrow && t.tooltipArrow, t[`tooltipPlacement${Ze(n.placement.split("-")[0])}`]]; } })(({ theme: e, ownerState: t -}) => R({ - backgroundColor: e.vars ? e.vars.palette.Tooltip.bg : Qi(e.palette.grey[700], 0.92), +}) => $({ + backgroundColor: e.vars ? e.vars.palette.Tooltip.bg : ni(e.palette.grey[700], 0.92), borderRadius: (e.vars || e).shape.borderRadius, color: (e.vars || e).palette.common.white, fontFamily: e.typography.fontFamily, @@ -8296,44 +8296,44 @@ const Tf = (e) => { }, t.touch && { padding: "8px 16px", fontSize: e.typography.pxToRem(14), - lineHeight: `${Ef(16 / 14)}em`, + lineHeight: `${Af(16 / 14)}em`, fontWeight: e.typography.fontWeightRegular }, { - [`.${rt.popper}[data-popper-placement*="left"] &`]: R({ + [`.${it.popper}[data-popper-placement*="left"] &`]: $({ transformOrigin: "right center" - }, t.isRtl ? R({ + }, t.isRtl ? $({ marginLeft: "14px" }, t.touch && { marginLeft: "24px" - }) : R({ + }) : $({ marginRight: "14px" }, t.touch && { marginRight: "24px" })), - [`.${rt.popper}[data-popper-placement*="right"] &`]: R({ + [`.${it.popper}[data-popper-placement*="right"] &`]: $({ transformOrigin: "left center" - }, t.isRtl ? R({ + }, t.isRtl ? $({ marginRight: "14px" }, t.touch && { marginRight: "24px" - }) : R({ + }) : $({ marginLeft: "14px" }, t.touch && { marginLeft: "24px" })), - [`.${rt.popper}[data-popper-placement*="top"] &`]: R({ + [`.${it.popper}[data-popper-placement*="top"] &`]: $({ transformOrigin: "center bottom", marginBottom: "14px" }, t.touch && { marginBottom: "24px" }), - [`.${rt.popper}[data-popper-placement*="bottom"] &`]: R({ + [`.${it.popper}[data-popper-placement*="bottom"] &`]: $({ transformOrigin: "center top", marginTop: "14px" }, t.touch && { marginTop: "24px" }) -})), Of = On("span", { +})), jf = Mn("span", { name: "MuiTooltip", slot: "Arrow", overridesResolver: (e, t) => t.arrow @@ -8345,7 +8345,7 @@ const Tf = (e) => { width: "1em", height: "0.71em", boxSizing: "border-box", - color: e.vars ? e.vars.palette.Tooltip.bg : Qi(e.palette.grey[700], 0.9), + color: e.vars ? e.vars.palette.Tooltip.bg : ni(e.palette.grey[700], 0.9), "&::before": { content: '""', margin: "auto", @@ -8356,211 +8356,211 @@ const Tf = (e) => { transform: "rotate(45deg)" } })); -let Ln = !1; -const Xa = new Tn(); -let tn = { +let Yn = !1; +const Za = new In(); +let sn = { x: 0, y: 0 }; -function zn(e, t) { +function Wn(e, t) { return (n) => { t && t(n), e(n); }; } -const vs = /* @__PURE__ */ M.forwardRef(function(t, n) { - var r, o, a, i, l, c, d, p, h, w, b, v, f, m, N, I, O, E, g; - const _ = So({ +const Ni = /* @__PURE__ */ j.forwardRef(function(t, n) { + var r, o, a, s, l, c, d, u, h, w, b, v, f, m, N, A, _, E, g; + const I = Io({ props: t, name: "MuiTooltip" }), { - arrow: L = !1, - children: H, - components: C = {}, + arrow: U = !1, + children: W, + components: O = {}, componentsProps: P = {}, describeChild: k = !1, disableFocusListener: B = !1, disableHoverListener: D = !1, - disableInteractive: J = !1, - disableTouchListener: q = !1, - enterDelay: U = 100, + disableInteractive: Q = !1, + disableTouchListener: J = !1, + enterDelay: X = 100, enterNextDelay: ee = 0, - enterTouchDelay: ae = 700, - followCursor: re = !1, + enterTouchDelay: re = 700, + followCursor: oe = !1, id: y, - leaveDelay: S = 0, - leaveTouchDelay: z = 1500, - onClose: F, - onOpen: V, - open: W, - placement: X = "bottom", - PopperComponent: Y, - PopperProps: G = {}, - slotProps: K = {}, - slots: Z = {}, - title: de, - TransitionComponent: $ = Ha, - TransitionProps: xe - } = _, j = Ne(_, kf), ye = /* @__PURE__ */ M.isValidElement(H) ? H : /* @__PURE__ */ s("span", { - children: H - }), ze = ms(), ct = ze.direction === "rtl", [ke, $n] = M.useState(), [Fe, Et] = M.useState(null), dt = M.useRef(!1), Tt = J || re, Ct = rn(), St = rn(), pt = rn(), Xt = rn(), [In, Bo] = Fi({ - controlled: W, + leaveDelay: R = 0, + leaveTouchDelay: H = 1500, + onClose: G, + onOpen: z, + open: q, + placement: L = "bottom", + PopperComponent: K, + PopperProps: Y = {}, + slotProps: Z = {}, + slots: S = {}, + title: F, + TransitionComponent: T = Ja, + TransitionProps: we + } = I, V = ke(I, If), xe = /* @__PURE__ */ j.isValidElement(W) ? W : /* @__PURE__ */ i("span", { + children: W + }), Ge = bi(), ut = Ge.direction === "rtl", [Ee, Vn] = j.useState(), [He, St] = j.useState(null), pt = j.useRef(!1), Ot = Q || oe, Rt = cn(), _t = cn(), wt = cn(), Jt = cn(), [Ln, Uo] = Hs({ + controlled: q, default: !1, name: "Tooltip", state: "open" }); - let Ke = In; + let et = Ln; if (process.env.NODE_ENV !== "production") { const { - current: Q - } = M.useRef(W !== void 0); - M.useEffect(() => { - ke && ke.disabled && !Q && de !== "" && ke.tagName.toLowerCase() === "button" && console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.", "A disabled element does not fire events.", "Tooltip needs to listen to the child element's events to display the title.", "", "Add a simple wrapper element, such as a `span`."].join(` + current: te + } = j.useRef(q !== void 0); + j.useEffect(() => { + Ee && Ee.disabled && !te && F !== "" && Ee.tagName.toLowerCase() === "button" && console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.", "A disabled element does not fire events.", "Tooltip needs to listen to the child element's events to display the title.", "", "Add a simple wrapper element, such as a `span`."].join(` `)); - }, [de, ke, Q]); + }, [F, Ee, te]); } - const yr = zi(y), Yt = M.useRef(), An = Yr(() => { - Yt.current !== void 0 && (document.body.style.WebkitUserSelect = Yt.current, Yt.current = void 0), Xt.clear(); + const Tr = Gs(y), Zt = j.useRef(), Fn = eo(() => { + Zt.current !== void 0 && (document.body.style.WebkitUserSelect = Zt.current, Zt.current = void 0), Jt.clear(); }); - M.useEffect(() => An, [An]); - const jo = (Q) => { - Xa.clear(), Ln = !0, Bo(!0), V && !Ke && V(Q); - }, Dn = Yr( + j.useEffect(() => Fn, [Fn]); + const Go = (te) => { + Za.clear(), Yn = !0, Uo(!0), z && !et && z(te); + }, zn = eo( /** * @param {React.SyntheticEvent | Event} event */ - (Q) => { - Xa.start(800 + S, () => { - Ln = !1; - }), Bo(!1), F && Ke && F(Q), Ct.start(ze.transitions.duration.shortest, () => { - dt.current = !1; + (te) => { + Za.start(800 + R, () => { + Yn = !1; + }), Uo(!1), G && et && G(te), Rt.start(Ge.transitions.duration.shortest, () => { + pt.current = !1; }); } - ), xr = (Q) => { - dt.current && Q.type !== "touchstart" || (ke && ke.removeAttribute("title"), St.clear(), pt.clear(), U || Ln && ee ? St.start(Ln ? ee : U, () => { - jo(Q); - }) : jo(Q)); - }, Vo = (Q) => { - St.clear(), pt.start(S, () => { - Dn(Q); + ), Cr = (te) => { + pt.current && te.type !== "touchstart" || (Ee && Ee.removeAttribute("title"), _t.clear(), wt.clear(), X || Yn && ee ? _t.start(Yn ? ee : X, () => { + Go(te); + }) : Go(te)); + }, Ho = (te) => { + _t.clear(), wt.start(R, () => { + zn(te); }); }, { - isFocusVisibleRef: Lo, - onBlur: ks, - onFocus: Es, - ref: Ts - } = Ui(), [, zo] = M.useState(!1), Fo = (Q) => { - ks(Q), Lo.current === !1 && (zo(!1), Vo(Q)); - }, Uo = (Q) => { - ke || $n(Q.currentTarget), Es(Q), Lo.current === !0 && (zo(!0), xr(Q)); - }, Go = (Q) => { - dt.current = !0; - const Pe = ye.props; - Pe.onTouchStart && Pe.onTouchStart(Q); - }, Ho = xr, Xo = Vo, Cs = (Q) => { - Go(Q), pt.clear(), Ct.clear(), An(), Yt.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", Xt.start(ae, () => { - document.body.style.WebkitUserSelect = Yt.current, xr(Q); + isFocusVisibleRef: Xo, + onBlur: Pi, + onFocus: $i, + ref: Ii + } = Xs(), [, Yo] = j.useState(!1), Wo = (te) => { + Pi(te), Xo.current === !1 && (Yo(!1), Ho(te)); + }, qo = (te) => { + Ee || Vn(te.currentTarget), $i(te), Xo.current === !0 && (Yo(!0), Cr(te)); + }, Ko = (te) => { + pt.current = !0; + const _e = xe.props; + _e.onTouchStart && _e.onTouchStart(te); + }, Jo = Cr, Zo = Ho, Ai = (te) => { + Ko(te), wt.clear(), Rt.clear(), Fn(), Zt.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", Jt.start(re, () => { + document.body.style.WebkitUserSelect = Zt.current, Cr(te); }); - }, Ss = (Q) => { - ye.props.onTouchEnd && ye.props.onTouchEnd(Q), An(), pt.start(z, () => { - Dn(Q); + }, Di = (te) => { + xe.props.onTouchEnd && xe.props.onTouchEnd(te), Fn(), wt.start(H, () => { + zn(te); }); }; - M.useEffect(() => { - if (!Ke) + j.useEffect(() => { + if (!et) return; - function Q(Pe) { - (Pe.key === "Escape" || Pe.key === "Esc") && Dn(Pe); + function te(_e) { + (_e.key === "Escape" || _e.key === "Esc") && zn(_e); } - return document.addEventListener("keydown", Q), () => { - document.removeEventListener("keydown", Q); + return document.addEventListener("keydown", te), () => { + document.removeEventListener("keydown", te); }; - }, [Dn, Ke]); - const Os = xt(ye.ref, Ts, $n, n); - !de && de !== 0 && (Ke = !1); - const Nr = M.useRef(), Rs = (Q) => { - const Pe = ye.props; - Pe.onMouseMove && Pe.onMouseMove(Q), tn = { - x: Q.clientX, - y: Q.clientY - }, Nr.current && Nr.current.update(); - }, Wt = {}, kr = typeof de == "string"; - k ? (Wt.title = !Ke && kr && !D ? de : null, Wt["aria-describedby"] = Ke ? yr : null) : (Wt["aria-label"] = kr ? de : null, Wt["aria-labelledby"] = Ke && !kr ? yr : null); - const De = R({}, Wt, j, ye.props, { - className: bt(j.className, ye.props.className), - onTouchStart: Go, - ref: Os - }, re ? { - onMouseMove: Rs + }, [zn, et]); + const Mi = kt(xe.ref, Ii, Vn, n); + !F && F !== 0 && (et = !1); + const Sr = j.useRef(), Bi = (te) => { + const _e = xe.props; + _e.onMouseMove && _e.onMouseMove(te), sn = { + x: te.clientX, + y: te.clientY + }, Sr.current && Sr.current.update(); + }, Qt = {}, Or = typeof F == "string"; + k ? (Qt.title = !et && Or && !D ? F : null, Qt["aria-describedby"] = et ? Tr : null) : (Qt["aria-label"] = Or ? F : null, Qt["aria-labelledby"] = et && !Or ? Tr : null); + const Be = $({}, Qt, V, xe.props, { + className: yt(V.className, xe.props.className), + onTouchStart: Ko, + ref: Mi + }, oe ? { + onMouseMove: Bi } : {}); - process.env.NODE_ENV !== "production" && (De["data-mui-internal-clone-element"] = !0, M.useEffect(() => { - ke && !ke.getAttribute("data-mui-internal-clone-element") && console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.", "Please make sure that props are spread on the same element that the ref is applied to."].join(` + process.env.NODE_ENV !== "production" && (Be["data-mui-internal-clone-element"] = !0, j.useEffect(() => { + Ee && !Ee.getAttribute("data-mui-internal-clone-element") && console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.", "Please make sure that props are spread on the same element that the ref is applied to."].join(` `)); - }, [ke])); - const qt = {}; - q || (De.onTouchStart = Cs, De.onTouchEnd = Ss), D || (De.onMouseOver = zn(Ho, De.onMouseOver), De.onMouseLeave = zn(Xo, De.onMouseLeave), Tt || (qt.onMouseOver = Ho, qt.onMouseLeave = Xo)), B || (De.onFocus = zn(Uo, De.onFocus), De.onBlur = zn(Fo, De.onBlur), Tt || (qt.onFocus = Uo, qt.onBlur = Fo)), process.env.NODE_ENV !== "production" && ye.props.title && console.error(["MUI: You have provided a `title` prop to the child of .", `Remove this title prop \`${ye.props.title}\` or the Tooltip component.`].join(` + }, [Ee])); + const en = {}; + J || (Be.onTouchStart = Ai, Be.onTouchEnd = Di), D || (Be.onMouseOver = Wn(Jo, Be.onMouseOver), Be.onMouseLeave = Wn(Zo, Be.onMouseLeave), Ot || (en.onMouseOver = Jo, en.onMouseLeave = Zo)), B || (Be.onFocus = Wn(qo, Be.onFocus), Be.onBlur = Wn(Wo, Be.onBlur), Ot || (en.onFocus = qo, en.onBlur = Wo)), process.env.NODE_ENV !== "production" && xe.props.title && console.error(["MUI: You have provided a `title` prop to the child of .", `Remove this title prop \`${xe.props.title}\` or the Tooltip component.`].join(` `)); - const Ps = M.useMemo(() => { - var Q; - let Pe = [{ + const ji = j.useMemo(() => { + var te; + let _e = [{ name: "arrow", - enabled: !!Fe, + enabled: !!He, options: { - element: Fe, + element: He, padding: 4 } }]; - return (Q = G.popperOptions) != null && Q.modifiers && (Pe = Pe.concat(G.popperOptions.modifiers)), R({}, G.popperOptions, { - modifiers: Pe + return (te = Y.popperOptions) != null && te.modifiers && (_e = _e.concat(Y.popperOptions.modifiers)), $({}, Y.popperOptions, { + modifiers: _e }); - }, [Fe, G]), Kt = R({}, _, { - isRtl: ct, - arrow: L, - disableInteractive: Tt, - placement: X, - PopperComponentProp: Y, - touch: dt.current - }), Er = Tf(Kt), Yo = (r = (o = Z.popper) != null ? o : C.Popper) != null ? r : Cf, Wo = (a = (i = (l = Z.transition) != null ? l : C.Transition) != null ? i : $) != null ? a : Ha, qo = (c = (d = Z.tooltip) != null ? d : C.Tooltip) != null ? c : Sf, Ko = (p = (h = Z.arrow) != null ? h : C.Arrow) != null ? p : Of, _s = on(Yo, R({}, G, (w = K.popper) != null ? w : P.popper, { - className: bt(Er.popper, G == null ? void 0 : G.className, (b = (v = K.popper) != null ? v : P.popper) == null ? void 0 : b.className) - }), Kt), $s = on(Wo, R({}, xe, (f = K.transition) != null ? f : P.transition), Kt), Is = on(qo, R({}, (m = K.tooltip) != null ? m : P.tooltip, { - className: bt(Er.tooltip, (N = (I = K.tooltip) != null ? I : P.tooltip) == null ? void 0 : N.className) - }), Kt), As = on(Ko, R({}, (O = K.arrow) != null ? O : P.arrow, { - className: bt(Er.arrow, (E = (g = K.arrow) != null ? g : P.arrow) == null ? void 0 : E.className) - }), Kt); - return /* @__PURE__ */ x(M.Fragment, { - children: [/* @__PURE__ */ M.cloneElement(ye, De), /* @__PURE__ */ s(Yo, R({ - as: Y ?? bs, - placement: X, - anchorEl: re ? { + }, [He, Y]), tn = $({}, I, { + isRtl: ut, + arrow: U, + disableInteractive: Ot, + placement: L, + PopperComponentProp: K, + touch: pt.current + }), Rr = Df(tn), Qo = (r = (o = S.popper) != null ? o : O.Popper) != null ? r : Mf, ea = (a = (s = (l = S.transition) != null ? l : O.Transition) != null ? s : T) != null ? a : Ja, ta = (c = (d = S.tooltip) != null ? d : O.Tooltip) != null ? c : Bf, na = (u = (h = S.arrow) != null ? h : O.Arrow) != null ? u : jf, Vi = dn(Qo, $({}, Y, (w = Z.popper) != null ? w : P.popper, { + className: yt(Rr.popper, Y == null ? void 0 : Y.className, (b = (v = Z.popper) != null ? v : P.popper) == null ? void 0 : b.className) + }), tn), Li = dn(ea, $({}, we, (f = Z.transition) != null ? f : P.transition), tn), Fi = dn(ta, $({}, (m = Z.tooltip) != null ? m : P.tooltip, { + className: yt(Rr.tooltip, (N = (A = Z.tooltip) != null ? A : P.tooltip) == null ? void 0 : N.className) + }), tn), zi = dn(na, $({}, (_ = Z.arrow) != null ? _ : P.arrow, { + className: yt(Rr.arrow, (E = (g = Z.arrow) != null ? g : P.arrow) == null ? void 0 : E.className) + }), tn); + return /* @__PURE__ */ x(j.Fragment, { + children: [/* @__PURE__ */ j.cloneElement(xe, Be), /* @__PURE__ */ i(Qo, $({ + as: K ?? xi, + placement: L, + anchorEl: oe ? { getBoundingClientRect: () => ({ - top: tn.y, - left: tn.x, - right: tn.x, - bottom: tn.y, + top: sn.y, + left: sn.x, + right: sn.x, + bottom: sn.y, width: 0, height: 0 }) - } : ke, - popperRef: Nr, - open: ke ? Ke : !1, - id: yr, + } : Ee, + popperRef: Sr, + open: Ee ? et : !1, + id: Tr, transition: !0 - }, qt, _s, { - popperOptions: Ps, + }, en, Vi, { + popperOptions: ji, children: ({ - TransitionProps: Q - }) => /* @__PURE__ */ s(Wo, R({ - timeout: ze.transitions.duration.shorter - }, Q, $s, { - children: /* @__PURE__ */ x(qo, R({}, Is, { - children: [de, L ? /* @__PURE__ */ s(Ko, R({}, As, { - ref: Et + TransitionProps: te + }) => /* @__PURE__ */ i(ea, $({ + timeout: Ge.transitions.duration.shorter + }, te, Li, { + children: /* @__PURE__ */ x(ta, $({}, Fi, { + children: [F, U ? /* @__PURE__ */ i(na, $({}, zi, { + ref: St })) : null] })) })) }))] }); }); -process.env.NODE_ENV !== "production" && (vs.propTypes = { +process.env.NODE_ENV !== "production" && (Ni.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -8569,19 +8569,19 @@ process.env.NODE_ENV !== "production" && (vs.propTypes = { * If `true`, adds an arrow to the tooltip. * @default false */ - arrow: u.bool, + arrow: p.bool, /** * Tooltip reference element. */ - children: ji.isRequired, + children: Fs.isRequired, /** * Override or extend the styles applied to the component. */ - classes: u.object, + classes: p.object, /** * @ignore */ - className: u.string, + className: p.string, /** * The components used for each slot inside. * @@ -8590,11 +8590,11 @@ process.env.NODE_ENV !== "production" && (vs.propTypes = { * * @default {} */ - components: u.shape({ - Arrow: u.elementType, - Popper: u.elementType, - Tooltip: u.elementType, - Transition: u.elementType + components: p.shape({ + Arrow: p.elementType, + Popper: p.elementType, + Tooltip: p.elementType, + Transition: p.elementType }), /** * The extra props for the slot components. @@ -8605,107 +8605,107 @@ process.env.NODE_ENV !== "production" && (vs.propTypes = { * * @default {} */ - componentsProps: u.shape({ - arrow: u.object, - popper: u.object, - tooltip: u.object, - transition: u.object + componentsProps: p.shape({ + arrow: p.object, + popper: p.object, + tooltip: p.object, + transition: p.object }), /** * Set to `true` if the `title` acts as an accessible description. * By default the `title` acts as an accessible label for the child. * @default false */ - describeChild: u.bool, + describeChild: p.bool, /** * Do not respond to focus-visible events. * @default false */ - disableFocusListener: u.bool, + disableFocusListener: p.bool, /** * Do not respond to hover events. * @default false */ - disableHoverListener: u.bool, + disableHoverListener: p.bool, /** * Makes a tooltip not interactive, i.e. it will close when the user * hovers over the tooltip before the `leaveDelay` is expired. * @default false */ - disableInteractive: u.bool, + disableInteractive: p.bool, /** * Do not respond to long press touch events. * @default false */ - disableTouchListener: u.bool, + disableTouchListener: p.bool, /** * The number of milliseconds to wait before showing the tooltip. * This prop won't impact the enter touch delay (`enterTouchDelay`). * @default 100 */ - enterDelay: u.number, + enterDelay: p.number, /** * The number of milliseconds to wait before showing the tooltip when one was already recently opened. * @default 0 */ - enterNextDelay: u.number, + enterNextDelay: p.number, /** * The number of milliseconds a user must touch the element before showing the tooltip. * @default 700 */ - enterTouchDelay: u.number, + enterTouchDelay: p.number, /** * If `true`, the tooltip follow the cursor over the wrapped element. * @default false */ - followCursor: u.bool, + followCursor: p.bool, /** * This prop is used to help implement the accessibility logic. * If you don't provide this prop. It falls back to a randomly generated id. */ - id: u.string, + id: p.string, /** * The number of milliseconds to wait before hiding the tooltip. * This prop won't impact the leave touch delay (`leaveTouchDelay`). * @default 0 */ - leaveDelay: u.number, + leaveDelay: p.number, /** * The number of milliseconds after the user stops touching an element before hiding the tooltip. * @default 1500 */ - leaveTouchDelay: u.number, + leaveTouchDelay: p.number, /** * Callback fired when the component requests to be closed. * * @param {React.SyntheticEvent} event The event source of the callback. */ - onClose: u.func, + onClose: p.func, /** * Callback fired when the component requests to be open. * * @param {React.SyntheticEvent} event The event source of the callback. */ - onOpen: u.func, + onOpen: p.func, /** * If `true`, the component is shown. */ - open: u.bool, + open: p.bool, /** * Tooltip placement. * @default 'bottom' */ - placement: u.oneOf(["bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]), + placement: p.oneOf(["bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]), /** * The component used for the popper. * @default Popper */ - PopperComponent: u.elementType, + PopperComponent: p.elementType, /** * Props applied to the [`Popper`](/material-ui/api/popper/) element. * @default {} */ - PopperProps: u.object, + PopperProps: p.object, /** * The extra props for the slot components. * You can override the existing props or add new ones. @@ -8714,11 +8714,11 @@ process.env.NODE_ENV !== "production" && (vs.propTypes = { * * @default {} */ - slotProps: u.shape({ - arrow: u.object, - popper: u.object, - tooltip: u.object, - transition: u.object + slotProps: p.shape({ + arrow: p.object, + popper: p.object, + tooltip: p.object, + transition: p.object }), /** * The components used for each slot inside. @@ -8727,96 +8727,96 @@ process.env.NODE_ENV !== "production" && (vs.propTypes = { * * @default {} */ - slots: u.shape({ - arrow: u.elementType, - popper: u.elementType, - tooltip: u.elementType, - transition: u.elementType + slots: p.shape({ + arrow: p.elementType, + popper: p.elementType, + tooltip: p.elementType, + transition: p.elementType }), /** * The system prop that allows defining system overrides as well as additional CSS styles. */ - sx: u.oneOfType([u.arrayOf(u.oneOfType([u.func, u.object, u.bool])), u.func, u.object]), + sx: p.oneOfType([p.arrayOf(p.oneOfType([p.func, p.object, p.bool])), p.func, p.object]), /** * Tooltip title. Zero-length titles string, undefined, null and false are never displayed. */ - title: u.node, + title: p.node, /** * The component used for the transition. * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. * @default Grow */ - TransitionComponent: u.elementType, + TransitionComponent: p.elementType, /** * Props applied to the transition element. * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component. */ - TransitionProps: u.object + TransitionProps: p.object }); -const Rf = vs; -function Ya(e, t, n) { - return e ? /* @__PURE__ */ s(ai, { className: `papi-menu-icon-${n ? "leading" : "trailing"}`, children: /* @__PURE__ */ s("img", { src: e, alt: `${n ? "Leading" : "Trailing"} icon for ${t}` }) }) : void 0; +const Vf = Ni; +function Qa(e, t, n) { + return e ? /* @__PURE__ */ i(ds, { className: `papi-menu-icon-${n ? "leading" : "trailing"}`, children: /* @__PURE__ */ i("img", { src: e, alt: `${n ? "Leading" : "Trailing"} icon for ${t}` }) }) : void 0; } -function ys(e) { +function ki(e) { const { onClick: t, label: n, tooltip: r, allowForLeadingIcons: o = !0, iconPathBefore: a = void 0, - iconPathAfter: i = void 0, + iconPathAfter: s = void 0, hasAutoFocus: l = !1, className: c, isDisabled: d = !1, - isDense: p = !0, + isDense: u = !0, isSubMenuParent: h = !1, hasDisabledGutters: w = !1, hasDivider: b = !1, focusVisibleClassName: v, id: f, children: m - } = e, N = /* @__PURE__ */ s( - xl, + } = e, N = /* @__PURE__ */ i( + Pl, { sx: { lineHeight: 0.8 }, autoFocus: l, className: c, disabled: d, - dense: p, + dense: u, disableGutters: w, divider: b, focusVisibleClassName: v, onClick: t, id: f, - children: n ? /* @__PURE__ */ x(it, { children: [ - Ya(a, n, !0), - /* @__PURE__ */ s(Nl, { primary: n, inset: !a && o }), - h ? /* @__PURE__ */ s(ai, { className: "papi-menu-icon-trailing", children: /* @__PURE__ */ s(ts, {}) }) : Ya(i, n, !1) + children: n ? /* @__PURE__ */ x(lt, { children: [ + Qa(a, n, !0), + /* @__PURE__ */ i($l, { primary: n, inset: !a && o }), + h ? /* @__PURE__ */ i(ds, { className: "papi-menu-icon-trailing", children: /* @__PURE__ */ i(oi, {}) }) : Qa(s, n, !1) ] }) : m } ); - return r ? /* @__PURE__ */ s(Rf, { title: r, placement: "right", children: /* @__PURE__ */ s("div", { children: N }) }) : N; + return r ? /* @__PURE__ */ i(Vf, { title: r, placement: "right", children: /* @__PURE__ */ i("div", { children: N }) }) : N; } -function xs(e) { +function Ei(e) { return Object.entries(e.groups).map(([n, r]) => ({ id: n, group: r })); } -function Pf(e) { - const [t, n] = ue(void 0), { parentMenuItem: r, parentItemProps: o, menuDefinition: a } = e, i = (d) => { +function Lf(e) { + const [t, n] = ie(void 0), { parentMenuItem: r, parentItemProps: o, menuDefinition: a } = e, s = (d) => { n(d.currentTarget); }, l = () => { n(void 0); }, c = () => { - let d = xs(a).filter((p) => "menuItem" in p.group); + let d = Ei(a).filter((u) => "menuItem" in u.group); if (!(r != null && r.id)) throw new Error("A valid parent menu item is required for submenus."); return d = d.filter( - (p) => "menuItem" in p.group && p.group.menuItem === r.id - ), /* @__PURE__ */ s(Ns, { ...e, includedGroups: d }); + (u) => "menuItem" in u.group && u.group.menuItem === r.id + ), /* @__PURE__ */ i(Ti, { ...e, includedGroups: d }); }; - return /* @__PURE__ */ x(it, { children: [ - /* @__PURE__ */ s(ys, { onClick: i, ...o, isSubMenuParent: !0 }), - /* @__PURE__ */ s( - kl, + return /* @__PURE__ */ x(lt, { children: [ + /* @__PURE__ */ i(ki, { onClick: s, ...o, isSubMenuParent: !0 }), + /* @__PURE__ */ i( + Il, { anchorEl: t, open: !!t, @@ -8835,18 +8835,18 @@ function Pf(e) { ) ] }); } -const _f = (e, t) => t.filter((o) => o.group === e).sort((o, a) => (o.order || 0) - (a.order || 0)); -function Ns(e) { - const { menuDefinition: t, onClick: n, commandHandler: r, includedGroups: o } = e, { items: a, allowForLeadingIcons: i } = Te(() => { - const p = o && o.length > 0 ? o : ( +const Ff = (e, t) => t.filter((o) => o.group === e).sort((o, a) => (o.order || 0) - (a.order || 0)); +function Ti(e) { + const { menuDefinition: t, onClick: n, commandHandler: r, includedGroups: o } = e, { items: a, allowForLeadingIcons: s } = Ne(() => { + const u = o && o.length > 0 ? o : ( // We're apparently laying out a single-column menu (presumably a context menu). In this // case, all groups should be included except ones that belong to a submenu. - xs(t).filter((v) => !("menuItem" in v.group)) - ), h = Object.values(p).sort( + Ei(t).filter((v) => !("menuItem" in v.group)) + ), h = Object.values(u).sort( (v, f) => (v.group.order || 0) - (f.group.order || 0) ), w = []; h.forEach((v) => { - _f(v.id, t.items).forEach( + Ff(v.id, t.items).forEach( (f) => w.push({ item: f, isLastItemInGroup: !1 }) ), w.length > 0 && (w[w.length - 1].isLastItemInGroup = !0); }), w.length > 0 && (w[w.length - 1].isLastItemInGroup = !1); @@ -8854,25 +8854,25 @@ function Ns(e) { (v) => "iconPathBefore" in v.item && v.item.iconPathBefore ); return { items: w, allowForLeadingIcons: b }; - }, [o, t]), l = ({ item: p, isLastItemInGroup: h }) => ({ + }, [o, t]), l = ({ item: u, isLastItemInGroup: h }) => ({ className: "papi-menu-item", - label: p.label, - tooltip: p.tooltip, - iconPathBefore: "iconPathBefore" in p ? p.iconPathBefore : void 0, - iconPathAfter: "iconPathAfter" in p ? p.iconPathAfter : void 0, + label: u.label, + tooltip: u.tooltip, + iconPathBefore: "iconPathBefore" in u ? u.iconPathBefore : void 0, + iconPathAfter: "iconPathAfter" in u ? u.iconPathAfter : void 0, hasDivider: h, // Set hasDivider to true for the last item in a group - allowForLeadingIcons: i + allowForLeadingIcons: s }), [c] = a; if (!c) - return /* @__PURE__ */ s("div", {}); + return /* @__PURE__ */ i("div", {}); const d = c.item.group; - return /* @__PURE__ */ s("div", { role: "menu", "aria-label": d, children: a.map((p, h) => { - const { item: w } = p, b = l(p); + return /* @__PURE__ */ i("div", { role: "menu", "aria-label": d, children: a.map((u, h) => { + const { item: w } = u, b = l(u); if ("command" in w) { const v = w.group + h; - return /* @__PURE__ */ s( - ys, + return /* @__PURE__ */ i( + ki, { onClick: (f) => { n == null || n(f), r(w); @@ -8882,8 +8882,8 @@ function Ns(e) { v ); } - return /* @__PURE__ */ s( - Pf, + return /* @__PURE__ */ i( + Lf, { parentMenuItem: w, parentItemProps: b, @@ -8893,16 +8893,16 @@ function Ns(e) { ); }) }, d); } -function $f(e) { +function zf(e) { const { menuDefinition: t, columnId: n } = e; - let a = Object.entries(t.groups).map(([i, l]) => ({ id: i, group: l })).filter((i) => "column" in i.group); + let a = Object.entries(t.groups).map(([s, l]) => ({ id: s, group: l })).filter((s) => "column" in s.group); return n && "columns" in t && // Without this type assertion, TS doesn't know what columns is. // eslint-disable-next-line no-type-assertion/no-type-assertion t.columns[n] && (a = a.filter( - (i) => "column" in i.group && i.group.column === n - )), /* @__PURE__ */ s(Ns, { ...e, includedGroups: a }); + (s) => "column" in s.group && s.group.column === n + )), /* @__PURE__ */ i(Ti, { ...e, includedGroups: a }); } -function If({ +function Uf({ commandHandler: e, menuDefinition: t, id: n, @@ -8911,7 +8911,7 @@ function If({ className: a }) { return /* @__PURE__ */ x( - ii, + us, { id: n, item: !0, @@ -8920,9 +8920,9 @@ function If({ "aria-label": n, className: `papi-menu-column ${a ?? ""}`, children: [ - /* @__PURE__ */ s("h3", { "aria-label": r.label, className: `papi-menu-column-header ${a ?? ""}`, children: r.label }), - /* @__PURE__ */ s(El, { id: n, dense: !0, className: a ?? "", children: /* @__PURE__ */ s( - $f, + /* @__PURE__ */ i("h3", { "aria-label": r.label, className: `papi-menu-column-header ${a ?? ""}`, children: r.label }), + /* @__PURE__ */ i(Al, { id: n, dense: !0, className: a ?? "", children: /* @__PURE__ */ i( + zf, { commandHandler: e, menuDefinition: t, @@ -8934,25 +8934,25 @@ function If({ } ); } -function Af({ +function Gf({ commandHandler: e, className: t, multiColumnMenu: n, id: r }) { - const { columns: o } = n, a = Te(() => { - const i = /* @__PURE__ */ new Map(); + const { columns: o } = n, a = Ne(() => { + const s = /* @__PURE__ */ new Map(); return Object.getOwnPropertyNames(o).forEach((l) => { if (l === "isExtensible") return; const c = l, d = o[c]; - typeof d == "object" && typeof d.order == "number" && !Number.isNaN(d.order) ? i.set(d.order, { id: c, metadata: d }) : console.warn( + typeof d == "object" && typeof d.order == "number" && !Number.isNaN(d.order) ? s.set(d.order, { id: c, metadata: d }) : console.warn( `Property ${l} (${typeof d}) on menu ${r} is not a valid column and is being ignored. This might indicate data corruption` ); - }), Array.from(i.values()).sort((l, c) => (l.metadata.order || 0) - (c.metadata.order || 0)); + }), Array.from(s.values()).sort((l, c) => (l.metadata.order || 0) - (c.metadata.order || 0)); }, [o, r]); - return /* @__PURE__ */ s( - ii, + return /* @__PURE__ */ i( + us, { container: !0, spacing: 0, @@ -8961,12 +8961,12 @@ function Af({ role: "menu", "aria-label": "GridMenu", id: r, - children: a.map((i, l) => /* @__PURE__ */ s( - If, + children: a.map((s, l) => /* @__PURE__ */ i( + Uf, { commandHandler: e, menuDefinition: n, - ...i, + ...s, className: t }, l @@ -8974,72 +8974,72 @@ function Af({ } ); } -function Df(e) { +function Hf(e) { return { preserveValue: !0, ...e }; } -const eo = (e, t, n = {}) => { - const r = gt(t); +const io = (e, t, n = {}) => { + const r = vt(t); r.current = t; - const o = gt(n); - o.current = Df(o.current); - const [a, i] = ue(() => r.current), [l, c] = ue(!0); - return at(() => { + const o = vt(n); + o.current = Hf(o.current); + const [a, s] = ie(() => r.current), [l, c] = ie(!0); + return Ke(() => { let d = !0; return c(!!e), (async () => { if (e) { - const p = await e(); - d && (i(() => p), c(!1)); + const u = await e(); + d && (s(() => u), c(!1)); } })(), () => { - d = !1, o.current.preserveValue || i(() => r.current); + d = !1, o.current.preserveValue || s(() => r.current); }; }, [e]), [a, l]; -}, Mf = es(/* @__PURE__ */ s("path", { +}, Xf = ri(/* @__PURE__ */ i("path", { d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z" }), "Menu"); -function Bf({ +function Yf({ menuProvider: e, normalMenu: t, fullMenu: n, commandHandler: r, containerRef: o, className: a, - ariaLabelPrefix: i, + ariaLabelPrefix: s, children: l }) { - const [c, d] = ue(!1), [p, h] = ue(!1), w = $e(() => { + const [c, d] = ie(!1), [u, h] = ie(!1), w = Ie(() => { c && d(!1), h(!1); - }, [c]), b = $e((E) => { + }, [c]), b = Ie((E) => { E.stopPropagation(), d((g) => { - const _ = !g; - return _ && E.shiftKey ? h(!0) : _ || h(!1), _; + const I = !g; + return I && E.shiftKey ? h(!0) : I || h(!1), I; }); - }, []), v = $e( + }, []), v = Ie( (E) => (w(), r(E)), [r, w] - ), [f, m] = ue({ top: 1, left: 1 }); - at(() => { + ), [f, m] = ie({ top: 1, left: 1 }); + Ke(() => { if (c) { const E = o == null ? void 0 : o.current; if (E) { - const g = E.getBoundingClientRect(), _ = window.scrollY, L = window.scrollX, H = g.top + _ + E.clientHeight, C = g.left + L; - m({ top: H, left: C }); + const g = E.getBoundingClientRect(), I = window.scrollY, U = window.scrollX, W = g.top + I + E.clientHeight, O = g.left + U; + m({ top: W, left: O }); } } }, [c, o]); - const [N] = eo( - $e(async () => (e == null ? void 0 : e(!1)) ?? t, [e, t, c]), + const [N] = io( + Ie(async () => (e == null ? void 0 : e(!1)) ?? t, [e, t, c]), t - ), [I] = eo( - $e(async () => (e == null ? void 0 : e(!0)) ?? n ?? N, [e, n, N, c]), + ), [A] = io( + Ie(async () => (e == null ? void 0 : e(!0)) ?? n ?? N, [e, n, N, c]), n ?? N - ), O = p && I ? I : N; - return /* @__PURE__ */ x(it, { children: [ - /* @__PURE__ */ s( - si, + ), _ = u && A ? A : N; + return /* @__PURE__ */ x(lt, { children: [ + /* @__PURE__ */ i( + ps, { sx: { paddingTop: 0, @@ -9048,13 +9048,13 @@ function Bf({ edge: "start", className: `papi-menuButton ${a ?? ""}`, color: "inherit", - "aria-label": `${i ?? ""} menu button`, + "aria-label": `${s ?? ""} menu button`, onClick: b, - children: l ?? /* @__PURE__ */ s(Mf, {}) + children: l ?? /* @__PURE__ */ i(Xf, {}) } ), - /* @__PURE__ */ s( - Tl, + /* @__PURE__ */ i( + Dl, { className: `papi-menu-drawer ${a ?? ""}`, anchor: "left", @@ -9068,38 +9068,38 @@ function Bf({ left: f.left } }, - children: O ? /* @__PURE__ */ s( - Af, + children: _ ? /* @__PURE__ */ i( + Gf, { className: a, - id: `${i ?? ""} main menu`, + id: `${s ?? ""} main menu`, commandHandler: v, - multiColumnMenu: O + multiColumnMenu: _ } ) : void 0 } ) ] }); } -function Lm({ +function Ym({ id: e, label: t, isDisabled: n = !1, tooltip: r, isTooltipSuppressed: o = !1, adjustMarginToAlignToEdge: a = !1, - size: i = "medium", + size: s = "medium", className: l, onClick: c, children: d }) { - return /* @__PURE__ */ s( - si, + return /* @__PURE__ */ i( + ps, { id: e, disabled: n, edge: a, - size: i, + size: s, "aria-label": t, title: o ? void 0 : r ?? t, className: `papi-icon-button ${l ?? ""}`, @@ -9108,82 +9108,82 @@ function Lm({ } ); } -const _n = Zn(({ className: e, ...t }, n) => /* @__PURE__ */ s(el, { size: 35, className: T("tw-animate-spin", e), ...t, ref: n })); -_n.displayName = "Spinner"; -function zm({ +const Ct = lr(({ className: e, ...t }, n) => /* @__PURE__ */ i(il, { size: 35, className: C("tw-animate-spin", e), ...t, ref: n })); +Ct.displayName = "Spinner"; +function Wm({ id: e, isDisabled: t = !1, hasError: n = !1, isFullWidth: r = !1, helperText: o, label: a, - placeholder: i, + placeholder: s, isRequired: l = !1, className: c, defaultValue: d, - value: p, + value: u, onChange: h, onFocus: w, onBlur: b }) { - return /* @__PURE__ */ x("div", { className: T("tw-inline-grid tw-items-center tw-gap-1.5", { "tw-w-full": r }), children: [ - /* @__PURE__ */ s( - He, + return /* @__PURE__ */ x("div", { className: C("tw-inline-grid tw-items-center tw-gap-1.5", { "tw-w-full": r }), children: [ + /* @__PURE__ */ i( + De, { htmlFor: e, - className: T({ + className: C({ "tw-text-red-600": n, "tw-hidden": !a }), children: `${a}${l ? "*" : ""}` } ), - /* @__PURE__ */ s( - kn, + /* @__PURE__ */ i( + qt, { id: e, disabled: t, - placeholder: i, + placeholder: s, required: l, - className: T(c, { "tw-border-red-600": n }), + className: C(c, { "tw-border-red-600": n }), defaultValue: d, - value: p, + value: u, onChange: h, onFocus: w, onBlur: b } ), - /* @__PURE__ */ s("p", { className: T({ "tw-hidden": !o }), children: o }) + /* @__PURE__ */ i("p", { className: C({ "tw-hidden": !o }), children: o }) ] }); } -function Fm({ +function qm({ menuProvider: e, commandHandler: t, className: n, id: r, children: o }) { - const a = gt(void 0); - return /* @__PURE__ */ s("div", { ref: a, style: { position: "relative" }, children: /* @__PURE__ */ s(Cl, { position: "static", id: r, children: /* @__PURE__ */ x( - Sl, + const a = vt(void 0); + return /* @__PURE__ */ i("div", { ref: a, style: { position: "relative" }, children: /* @__PURE__ */ i(Ml, { position: "static", id: r, children: /* @__PURE__ */ x( + Bl, { - className: T("tw-bg-muted tw-text-muted-foreground", n), + className: C("tw-bg-muted tw-text-muted-foreground", n), variant: "dense", children: [ - e ? /* @__PURE__ */ s( - Bf, + e ? /* @__PURE__ */ i( + Yf, { commandHandler: t, containerRef: a, menuProvider: e } ) : void 0, - o ? /* @__PURE__ */ s("div", { className: "papi-toolbar-children", children: o }) : void 0 + o ? /* @__PURE__ */ i("div", { className: "papi-toolbar-children", children: o }) : void 0 ] } ) }) }); } -const jf = Nn( +const Wf = Sn( "tw-relative tw-w-full tw-rounded-lg tw-border tw-p-4 [&>svg~*]:tw-pl-7 [&>svg+div]:tw-translate-y-[-3px] [&>svg]:tw-absolute [&>svg]:tw-left-4 [&>svg]:tw-top-4 [&>svg]:tw-text-foreground", { variants: { @@ -9196,14 +9196,14 @@ const jf = Nn( variant: "default" } } -), Vf = A.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ s("div", { ref: r, role: "alert", className: T(jf({ variant: t }), e), ...n })); -Vf.displayName = "Alert"; -const Lf = A.forwardRef( +), qf = M.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ i("div", { ref: r, role: "alert", className: C(Wf({ variant: t }), e), ...n })); +qf.displayName = "Alert"; +const Kf = M.forwardRef( ({ className: e, ...t }, n) => /* @__PURE__ */ x( "h5", { ref: n, - className: T("tw-mb-1 tw-font-medium tw-leading-none tw-tracking-tight", e), + className: C("tw-mb-1 tw-font-medium tw-leading-none tw-tracking-tight", e), ...t, children: [ t.children, @@ -9212,10 +9212,10 @@ const Lf = A.forwardRef( } ) ); -Lf.displayName = "AlertTitle"; -const zf = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s("div", { ref: n, className: T("tw-text-sm [&_p]:tw-leading-relaxed", e), ...t })); -zf.displayName = "AlertDescription"; -const Ff = Nn( +Kf.displayName = "AlertTitle"; +const Jf = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i("div", { ref: n, className: C("tw-text-sm [&_p]:tw-leading-relaxed", e), ...t })); +Jf.displayName = "AlertDescription"; +const Zf = Sn( "tw-inline-flex tw-items-center tw-rounded-full tw-border tw-px-2.5 tw-py-0.5 tw-text-xs tw-font-semibold tw-transition-colors focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2", { variants: { @@ -9232,15 +9232,15 @@ const Ff = Nn( } } ); -function Um({ className: e, variant: t, ...n }) { - return /* @__PURE__ */ s("div", { className: T("pr-twp", Ff({ variant: t }), e), ...n }); +function Km({ className: e, variant: t, ...n }) { + return /* @__PURE__ */ i("div", { className: C("pr-twp", Zf({ variant: t }), e), ...n }); } -const Uf = A.forwardRef( - ({ className: e, ...t }, n) => /* @__PURE__ */ s( +const Ci = M.forwardRef( + ({ className: e, ...t }, n) => /* @__PURE__ */ i( "div", { ref: n, - className: T( + className: C( "pr-twp tw-rounded-lg tw-border tw-bg-card tw-text-card-foreground tw-shadow-sm", e ), @@ -9248,24 +9248,24 @@ const Uf = A.forwardRef( } ) ); -Uf.displayName = "Card"; -const Gf = A.forwardRef( - ({ className: e, ...t }, n) => /* @__PURE__ */ s( +Ci.displayName = "Card"; +const Si = M.forwardRef( + ({ className: e, ...t }, n) => /* @__PURE__ */ i( "div", { ref: n, - className: T("pr-twp tw-flex tw-flex-col tw-space-y-1.5 tw-p-6", e), + className: C("pr-twp tw-flex tw-flex-col tw-space-y-1.5 tw-p-6", e), ...t } ) ); -Gf.displayName = "CardHeader"; -const Hf = A.forwardRef( - ({ className: e, ...t }, n) => /* @__PURE__ */ s( +Si.displayName = "CardHeader"; +const Oi = M.forwardRef( + ({ className: e, ...t }, n) => /* @__PURE__ */ i( "h3", { ref: n, - className: T( + className: C( "pr-twp tw-text-2xl tw-font-semibold tw-leading-none tw-tracking-tight", e ), @@ -9274,27 +9274,27 @@ const Hf = A.forwardRef( } ) ); -Hf.displayName = "CardTitle"; -const Xf = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s("p", { ref: n, className: T("pr-twp tw-text-sm tw-text-muted-foreground", e), ...t })); -Xf.displayName = "CardDescription"; -const Yf = A.forwardRef( - ({ className: e, ...t }, n) => /* @__PURE__ */ s("div", { ref: n, className: T("pr-twp tw-p-6 tw-pt-0", e), ...t }) +Oi.displayName = "CardTitle"; +const Ri = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i("p", { ref: n, className: C("pr-twp tw-text-sm tw-text-muted-foreground", e), ...t })); +Ri.displayName = "CardDescription"; +const _i = M.forwardRef( + ({ className: e, ...t }, n) => /* @__PURE__ */ i("div", { ref: n, className: C("pr-twp tw-p-6 tw-pt-0", e), ...t }) ); -Yf.displayName = "CardContent"; -const Wf = A.forwardRef( - ({ className: e, ...t }, n) => /* @__PURE__ */ s( +_i.displayName = "CardContent"; +const Qf = M.forwardRef( + ({ className: e, ...t }, n) => /* @__PURE__ */ i( "div", { ref: n, - className: T("pr-twp tw-flex tw-items-center tw-p-6 tw-pt-0", e), + className: C("pr-twp tw-flex tw-items-center tw-p-6 tw-pt-0", e), ...t } ) ); -Wf.displayName = "CardFooter"; -function Gm({ ...e }) { - return /* @__PURE__ */ s( - Rl, +Qf.displayName = "CardFooter"; +function Jm({ ...e }) { + return /* @__PURE__ */ i( + Vl, { className: "tw-toaster tw-group", toastOptions: { @@ -9309,89 +9309,89 @@ function Gm({ ...e }) { } ); } -const qf = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ x( - nn.Root, +const em = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ x( + ln.Root, { ref: n, - className: T( + className: C( "pr-twp tw-relative tw-flex tw-w-full tw-touch-none tw-select-none tw-items-center", e ), ...t, children: [ - /* @__PURE__ */ s(nn.Track, { className: "tw-relative tw-h-2 tw-w-full tw-grow tw-overflow-hidden tw-rounded-full tw-bg-secondary", children: /* @__PURE__ */ s(nn.Range, { className: "tw-absolute tw-h-full tw-bg-primary" }) }), - /* @__PURE__ */ s(nn.Thumb, { className: "tw-block tw-h-5 tw-w-5 tw-rounded-full tw-border-2 tw-border-primary tw-bg-background tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50" }) + /* @__PURE__ */ i(ln.Track, { className: "tw-relative tw-h-2 tw-w-full tw-grow tw-overflow-hidden tw-rounded-full tw-bg-secondary", children: /* @__PURE__ */ i(ln.Range, { className: "tw-absolute tw-h-full tw-bg-primary" }) }), + /* @__PURE__ */ i(ln.Thumb, { className: "tw-block tw-h-5 tw-w-5 tw-rounded-full tw-border-2 tw-border-primary tw-bg-background tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50" }) ] } )); -qf.displayName = nn.Root.displayName; -const Kf = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( - Ur.Root, +em.displayName = ln.Root.displayName; +const tm = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( + qr.Root, { - className: T( + className: C( "tw-peer pr-twp tw-inline-flex tw-h-6 tw-w-11 tw-shrink-0 tw-cursor-pointer tw-items-center tw-rounded-full tw-border-2 tw-border-transparent tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 focus-visible:tw-ring-offset-background disabled:tw-cursor-not-allowed disabled:tw-opacity-50 data-[state=checked]:tw-bg-primary data-[state=unchecked]:tw-bg-input", e ), ...t, ref: n, - children: /* @__PURE__ */ s( - Ur.Thumb, + children: /* @__PURE__ */ i( + qr.Thumb, { - className: T( + className: C( "pr-twp tw-pointer-events-none tw-block tw-h-5 tw-w-5 tw-rounded-full tw-bg-background tw-shadow-lg tw-ring-0 tw-transition-transform data-[state=checked]:tw-translate-x-5 data-[state=unchecked]:tw-translate-x-0" ) } ) } )); -Kf.displayName = Ur.Root.displayName; -const Hm = Re.Root, Jf = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +tm.displayName = qr.Root.displayName; +const Zm = Re.Root, nm = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Re.List, { ref: n, - className: T( + className: C( "tw-inline-flex tw-h-10 tw-items-center tw-justify-center tw-rounded-md tw-bg-muted tw-p-1 tw-text-muted-foreground", e ), ...t } )); -Jf.displayName = Re.List.displayName; -const Zf = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +nm.displayName = Re.List.displayName; +const rm = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Re.Trigger, { ref: n, - className: T( + className: C( "tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-sm tw-px-3 tw-py-1.5 tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-all hover:tw-text-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=active]:tw-bg-background data-[state=active]:tw-text-foreground data-[state=active]:tw-shadow-sm", e ), ...t } )); -Zf.displayName = Re.Trigger.displayName; -const Qf = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s( +rm.displayName = Re.Trigger.displayName; +const om = M.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ i( Re.Content, { ref: n, - className: T( + className: C( "tw-mt-2 tw-ring-offset-background focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2", e ), ...t } )); -Qf.displayName = Re.Content.displayName; -function Xm({ +om.displayName = Re.Content.displayName; +function Qm({ isInstalling: e, handleClick: t, buttonText: n, className: r, ...o }) { - return /* @__PURE__ */ s( - me, + return /* @__PURE__ */ i( + fe, { - className: T( + className: C( "tw-h-8 tw-rounded-md tw-text-white tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-blue-700", { "tw-cursor-not-allowed tw-bg-blue-700": e, @@ -9403,23 +9403,23 @@ function Xm({ ), onClick: t, ...o, - children: e ? /* @__PURE__ */ s(_n, { size: 15 }) : /* @__PURE__ */ x(it, { children: [ - /* @__PURE__ */ s(tl, { size: 25, className: T("tw-h-4 tw-w-4", { "tw-mr-1": n }) }), + children: e ? /* @__PURE__ */ i(Ct, { size: 15 }) : /* @__PURE__ */ x(lt, { children: [ + /* @__PURE__ */ i(ll, { size: 25, className: C("tw-h-4 tw-w-4", { "tw-mr-1": n }) }), n ] }) } ); } -function Ym({ +function eh({ isEnabling: e, handleClick: t, className: n, ...r }) { - return /* @__PURE__ */ s( - me, + return /* @__PURE__ */ i( + fe, { - className: T( + className: C( "tw-h-8 tw-rounded-md tw-bg-blue-600 tw-px-4 tw-text-white tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-blue-700", { "tw-cursor-not-allowed tw-bg-blue-700": e @@ -9428,23 +9428,23 @@ function Ym({ ), onClick: t, ...r, - children: e ? /* @__PURE__ */ x(it, { children: [ - /* @__PURE__ */ s(_n, { size: 15, className: "tw-mr-1 tw-text-white" }), + children: e ? /* @__PURE__ */ x(lt, { children: [ + /* @__PURE__ */ i(Ct, { size: 15, className: "tw-mr-1 tw-text-white" }), "Enabling..." ] }) : "Enable" } ); } -function Wm({ +function th({ isDisabling: e, handleClick: t, className: n, ...r }) { - return /* @__PURE__ */ s( - me, + return /* @__PURE__ */ i( + fe, { - className: T( + className: C( "tw-h-8 tw-rounded-md tw-bg-gray-300 tw-text-black tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-gray-400", { "tw-cursor-not-allowed tw-bg-gray-400": e @@ -9453,23 +9453,23 @@ function Wm({ ), onClick: t, ...r, - children: e ? /* @__PURE__ */ x(it, { children: [ - /* @__PURE__ */ s(_n, { size: 15, className: "tw-mr-1 tw-text-black" }), + children: e ? /* @__PURE__ */ x(lt, { children: [ + /* @__PURE__ */ i(Ct, { size: 15, className: "tw-mr-1 tw-text-black" }), "Disabling..." ] }) : "Disable" } ); } -function qm({ +function nh({ isUpdating: e, handleClick: t, className: n, ...r }) { - return /* @__PURE__ */ s( - me, + return /* @__PURE__ */ i( + fe, { - className: T( + className: C( "tw-h-8 tw-rounded-md tw-bg-blue-600 tw-px-4 tw-text-white tw-transition tw-duration-300 tw-ease-in-out hover:tw-bg-blue-700 hover:tw-text-white", { "tw-cursor-not-allowed tw-bg-blue-700": e @@ -9478,20 +9478,20 @@ function qm({ ), onClick: t, ...r, - children: e ? /* @__PURE__ */ x(it, { children: [ - /* @__PURE__ */ s(_n, { size: 15, className: "tw-mr-1 tw-text-white" }), + children: e ? /* @__PURE__ */ x(lt, { children: [ + /* @__PURE__ */ i(Ct, { size: 15, className: "tw-mr-1 tw-text-white" }), "Updating..." ] }) : "Update" } ); } -function Km({ +function rh({ id: e, markdown: t, className: n, anchorTarget: r }) { - const o = Te( + const o = Ne( () => ({ overrides: { a: { @@ -9503,19 +9503,19 @@ function Km({ }), [r] ); - return /* @__PURE__ */ s("div", { id: e, className: T("pr-twp tw-prose", n), children: /* @__PURE__ */ s(Pl, { options: o, children: t }) }); + return /* @__PURE__ */ i("div", { id: e, className: C("pr-twp tw-prose", n), children: /* @__PURE__ */ i(Ll, { options: o, children: t }) }); } -const em = Zn((e, t) => /* @__PURE__ */ x( - me, +const am = lr((e, t) => /* @__PURE__ */ x( + fe, { ref: t, className: "tw-rounded-md tw-border tw-border-dashed tw-border-gray-400 tw-bg-white tw-px-4 tw-py-2 tw-text-black tw-transition tw-duration-300 tw-ease-in-out hover:tw-border-blue-600 hover:tw-bg-white hover:tw-text-blue-600", ...e, children: [ - /* @__PURE__ */ s(nl, { size: 16, className: "tw-mr-2 tw-h-4 tw-w-4 tw-text-gray-700 hover:tw-text-blue-600" }), + /* @__PURE__ */ i(cl, { size: 16, className: "tw-mr-2 tw-h-4 tw-w-4 tw-text-gray-700 hover:tw-text-blue-600" }), "Filter", - /* @__PURE__ */ s( - Qn, + /* @__PURE__ */ i( + Vt, { size: 16, className: "tw-ml-2 tw-h-4 tw-w-4 tw-text-gray-700 hover:tw-text-blue-600" @@ -9524,31 +9524,31 @@ const em = Zn((e, t) => /* @__PURE__ */ x( ] } )); -var tm = /* @__PURE__ */ ((e) => (e[e.Check = 0] = "Check", e[e.Radio = 1] = "Radio", e))(tm || {}); -function Jm({ id: e, groups: t }) { - return /* @__PURE__ */ s("div", { id: e, children: /* @__PURE__ */ x(ao, { children: [ - /* @__PURE__ */ s(fi, { asChild: !0, children: /* @__PURE__ */ s(em, {}) }), - /* @__PURE__ */ s(tr, { children: t.map((n) => /* @__PURE__ */ x("div", { children: [ - /* @__PURE__ */ s(En, { children: n.label }), - /* @__PURE__ */ s(Hl, { children: n.items.map((r) => /* @__PURE__ */ s("div", { children: r.itemType === 0 ? /* @__PURE__ */ s(io, { onClick: r.onClick, children: r.label }) : /* @__PURE__ */ s(hi, { onClick: r.onClick, value: r.label, children: r.label }) }, r.label)) }), - /* @__PURE__ */ s(nr, {}) +var sm = /* @__PURE__ */ ((e) => (e[e.Check = 0] = "Check", e[e.Radio = 1] = "Radio", e))(sm || {}); +function oh({ id: e, groups: t }) { + return /* @__PURE__ */ i("div", { id: e, children: /* @__PURE__ */ x(vn, { children: [ + /* @__PURE__ */ i(er, { asChild: !0, children: /* @__PURE__ */ i(am, {}) }), + /* @__PURE__ */ i(Lt, { children: t.map((n) => /* @__PURE__ */ x("div", { children: [ + /* @__PURE__ */ i(On, { children: n.label }), + /* @__PURE__ */ i(tc, { children: n.items.map((r) => /* @__PURE__ */ i("div", { children: r.itemType === 0 ? /* @__PURE__ */ i(dr, { onClick: r.onClick, children: r.label }) : /* @__PURE__ */ i(vs, { onClick: r.onClick, value: r.label, children: r.label }) }, r.label)) }), + /* @__PURE__ */ i(Rn, {}) ] }, n.label)) }) ] }) }); } -function Zm({ id: e, message: t }) { - return /* @__PURE__ */ s("div", { id: e, className: "tw-mb-20 tw-mt-20 tw-flex tw-items-center tw-justify-center", children: /* @__PURE__ */ s("div", { className: "tw-w-3/4 tw-rounded-lg tw-bg-gray-100 tw-p-8 tw-text-center", children: /* @__PURE__ */ s("p", { className: "tw-text-lg tw-text-gray-800", children: t }) }) }); +function ah({ id: e, message: t }) { + return /* @__PURE__ */ i("div", { id: e, className: "tw-mb-20 tw-mt-20 tw-flex tw-items-center tw-justify-center", children: /* @__PURE__ */ i("div", { className: "tw-w-3/4 tw-rounded-lg tw-bg-gray-100 tw-p-8 tw-text-center", children: /* @__PURE__ */ i("p", { className: "tw-text-lg tw-text-gray-800", children: t }) }) }); } -function Qm({ +function sh({ id: e, category: t, downloads: n, languages: r, moreInfoUrl: o }) { - const a = new pl("en", { + const a = new yl("en", { notation: "compact", compactDisplay: "short" - }).format(Object.values(n).reduce((l, c) => l + c, 0)), i = () => { + }).format(Object.values(n).reduce((l, c) => l + c, 0)), s = () => { window.scrollTo(0, document.body.scrollHeight); }; return /* @__PURE__ */ x( @@ -9558,20 +9558,20 @@ function Qm({ className: "tw-flex tw-flex-wrap tw-items-start tw-space-x-4 tw-border-b tw-border-t tw-bg-white tw-pb-4 tw-pt-4", children: [ /* @__PURE__ */ x("div", { className: "tw-flex tw-flex-col tw-items-center", children: [ - /* @__PURE__ */ s("div", { className: "tw-flex tw-items-center tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1", children: /* @__PURE__ */ s("span", { className: "tw-text-xs tw-font-semibold tw-text-gray-700", children: t }) }), - /* @__PURE__ */ s("span", { className: "tw-text-xs tw-text-gray-500", children: "CATEGORY" }) + /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1", children: /* @__PURE__ */ i("span", { className: "tw-text-xs tw-font-semibold tw-text-gray-700", children: t }) }), + /* @__PURE__ */ i("span", { className: "tw-text-xs tw-text-gray-500", children: "CATEGORY" }) ] }), - /* @__PURE__ */ s("div", { className: "tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300" }), + /* @__PURE__ */ i("div", { className: "tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300" }), /* @__PURE__ */ x("div", { className: "tw-flex tw-flex-col tw-items-center", children: [ /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1", children: [ - /* @__PURE__ */ s(rl, { className: "tw-mr-1 tw-h-4 tw-w-4" }), - /* @__PURE__ */ s("span", { className: "tw-text-xs tw-font-semibold tw-text-gray-700", children: a }) + /* @__PURE__ */ i(dl, { className: "tw-mr-1 tw-h-4 tw-w-4" }), + /* @__PURE__ */ i("span", { className: "tw-text-xs tw-font-semibold tw-text-gray-700", children: a }) ] }), - /* @__PURE__ */ s("span", { className: "tw-text-xs tw-text-gray-500", children: "USERS" }) + /* @__PURE__ */ i("span", { className: "tw-text-xs tw-text-gray-500", children: "USERS" }) ] }), - /* @__PURE__ */ s("div", { className: "tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300" }), + /* @__PURE__ */ i("div", { className: "tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300" }), /* @__PURE__ */ x("div", { className: "tw-flex tw-flex-col tw-items-center", children: [ - /* @__PURE__ */ s("div", { className: "tw-flex tw-items-center", children: r.slice(0, 3).map((l) => /* @__PURE__ */ s( + /* @__PURE__ */ i("div", { className: "tw-flex tw-items-center", children: r.slice(0, 3).map((l) => /* @__PURE__ */ i( "span", { className: "tw-ml-1 tw-rounded-md tw-bg-gray-100 tw-px-2 tw-py-1 tw-text-xs tw-font-semibold tw-text-gray-700", @@ -9583,7 +9583,7 @@ function Qm({ "button", { type: "button", - onClick: () => i(), + onClick: () => s(), className: "tw-text-xs tw-text-gray-500 tw-underline", children: [ "+", @@ -9593,7 +9593,7 @@ function Qm({ } ) ] }), - /* @__PURE__ */ s("div", { className: "tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300" }), + /* @__PURE__ */ i("div", { className: "tw-mx-2 tw-h-10 tw-border-l tw-border-gray-300" }), /* @__PURE__ */ x("div", { className: "tw-ml-auto tw-flex tw-flex-col tw-space-y-2", children: [ /* @__PURE__ */ x( "a", @@ -9604,7 +9604,7 @@ function Qm({ className: "tw-flex tw-items-center tw-text-xs tw-font-semibold tw-text-gray-500 tw-underline", children: [ "Website", - /* @__PURE__ */ s(ol, { className: "tw-ml-1 tw-inline tw-h-4 tw-w-4" }) + /* @__PURE__ */ i(ul, { className: "tw-ml-1 tw-inline tw-h-4 tw-w-4" }) ] } ), @@ -9617,7 +9617,7 @@ function Qm({ className: "tw-flex tw-items-center tw-text-xs tw-font-semibold tw-text-gray-500 tw-underline", children: [ "Support", - /* @__PURE__ */ s(al, { className: "tw-ml-1 tw-inline tw-h-4 tw-w-4" }) + /* @__PURE__ */ i(pl, { className: "tw-ml-1 tw-inline tw-h-4 tw-w-4" }) ] } ) @@ -9626,27 +9626,27 @@ function Qm({ } ); } -function nm({ id: e, versionHistory: t }) { - const [n, r] = ue(!1), o = /* @__PURE__ */ new Date(); +function im({ id: e, versionHistory: t }) { + const [n, r] = ie(!1), o = /* @__PURE__ */ new Date(); function a(l) { - const c = new Date(l), d = new Date(o.getTime() - c.getTime()), p = d.getUTCFullYear() - 1970, h = d.getUTCMonth(), w = d.getUTCDate() - 1; + const c = new Date(l), d = new Date(o.getTime() - c.getTime()), u = d.getUTCFullYear() - 1970, h = d.getUTCMonth(), w = d.getUTCDate() - 1; let b = ""; - return p > 0 ? b = `${p.toString()} year${p === 1 ? "" : "s"} ago` : h > 0 ? b = `${h.toString()} month${h === 1 ? "" : "s"} ago` : w === 0 ? b = "today" : b = `${w.toString()} day${w === 1 ? "" : "s"} ago`, b; + return u > 0 ? b = `${u.toString()} year${u === 1 ? "" : "s"} ago` : h > 0 ? b = `${h.toString()} month${h === 1 ? "" : "s"} ago` : w === 0 ? b = "today" : b = `${w.toString()} day${w === 1 ? "" : "s"} ago`, b; } - const i = Object.entries(t).sort((l, c) => c[0].localeCompare(l[0])); + const s = Object.entries(t).sort((l, c) => c[0].localeCompare(l[0])); return /* @__PURE__ */ x("div", { id: e, children: [ - /* @__PURE__ */ s("h3", { className: "tw-text-md tw-font-semibold", children: "What`s New" }), - /* @__PURE__ */ s("ul", { className: "tw-list-disc tw-pl-5 tw-pr-4 tw-text-xs tw-text-gray-600", children: (n ? i : i.slice(0, 5)).map((l) => /* @__PURE__ */ x("div", { className: "tw-mt-3 tw-flex tw-justify-between", children: [ - /* @__PURE__ */ s("div", { className: "tw-text-gray-600", children: /* @__PURE__ */ s("li", { className: "tw-prose tw-text-xs", children: /* @__PURE__ */ s("span", { children: l[1].description }) }) }), + /* @__PURE__ */ i("h3", { className: "tw-text-md tw-font-semibold", children: "What`s New" }), + /* @__PURE__ */ i("ul", { className: "tw-list-disc tw-pl-5 tw-pr-4 tw-text-xs tw-text-gray-600", children: (n ? s : s.slice(0, 5)).map((l) => /* @__PURE__ */ x("div", { className: "tw-mt-3 tw-flex tw-justify-between", children: [ + /* @__PURE__ */ i("div", { className: "tw-text-gray-600", children: /* @__PURE__ */ i("li", { className: "tw-prose tw-text-xs", children: /* @__PURE__ */ i("span", { children: l[1].description }) }) }), /* @__PURE__ */ x("div", { className: "tw-justify-end tw-text-right", children: [ /* @__PURE__ */ x("div", { children: [ "Version ", l[0] ] }), - /* @__PURE__ */ s("div", { children: a(l[1].date) }) + /* @__PURE__ */ i("div", { children: a(l[1].date) }) ] }) ] }, l[0])) }), - i.length > 5 && /* @__PURE__ */ s( + s.length > 5 && /* @__PURE__ */ i( "button", { type: "button", @@ -9657,39 +9657,248 @@ function nm({ id: e, versionHistory: t }) { ) ] }); } -function eh({ +function ih({ id: e, publisherDisplayName: t, fileSize: n, locales: r, versionHistory: o }) { - const a = Te(() => ul(n), [n]), l = ((c) => { + const a = Ne(() => xl(n), [n]), l = ((c) => { const d = new Intl.DisplayNames(navigator.language, { type: "language" }); - return c.map((p) => d.of(p)); + return c.map((u) => d.of(u)); })(r); - return /* @__PURE__ */ s("div", { id: e, className: "tw-border-t tw-pb-4 tw-pt-4", children: /* @__PURE__ */ x("div", { className: "tw-md:flex-row tw-md:space-x-8 tw-flex tw-flex-col tw-space-x-0", children: [ - /* @__PURE__ */ s(nm, { versionHistory: o }), - /* @__PURE__ */ s("div", { className: "tw-md:border-t-0 tw-md:border-l tw-md-h-auto tw-md-ml-8 tw-mt-4 tw-border-t tw-border-gray-300" }), + return /* @__PURE__ */ i("div", { id: e, className: "tw-border-t tw-pb-4 tw-pt-4", children: /* @__PURE__ */ x("div", { className: "tw-md:flex-row tw-md:space-x-8 tw-flex tw-flex-col tw-space-x-0", children: [ + /* @__PURE__ */ i(im, { versionHistory: o }), + /* @__PURE__ */ i("div", { className: "tw-md:border-t-0 tw-md:border-l tw-md-h-auto tw-md-ml-8 tw-mt-4 tw-border-t tw-border-gray-300" }), /* @__PURE__ */ x("div", { className: "tw-md:mt-0 tw-mt-4 tw-flex-1 tw-space-y-3", children: [ - /* @__PURE__ */ s("h2", { className: "tw-text-md tw-font-semibold", children: "Information" }), + /* @__PURE__ */ i("h2", { className: "tw-text-md tw-font-semibold", children: "Information" }), /* @__PURE__ */ x("div", { className: "tw-flex tw-items-start tw-justify-between tw-pr-4 tw-text-xs tw-text-gray-600", children: [ /* @__PURE__ */ x("p", { className: "tw-flex tw-flex-col tw-justify-start", children: [ - /* @__PURE__ */ s("span", { className: "tw-mb-2", children: "Publisher" }), - /* @__PURE__ */ s("span", { className: "tw-font-semibold", children: t }), - /* @__PURE__ */ s("span", { className: "tw-mb-2 tw-mt-4", children: "Size" }), - /* @__PURE__ */ s("span", { className: "tw-font-semibold", children: a }) + /* @__PURE__ */ i("span", { className: "tw-mb-2", children: "Publisher" }), + /* @__PURE__ */ i("span", { className: "tw-font-semibold", children: t }), + /* @__PURE__ */ i("span", { className: "tw-mb-2 tw-mt-4", children: "Size" }), + /* @__PURE__ */ i("span", { className: "tw-font-semibold", children: a }) ] }), - /* @__PURE__ */ s("div", { className: "tw-flex tw-w-3/4 tw-items-center tw-justify-between tw-text-xs tw-text-gray-600", children: /* @__PURE__ */ x("p", { className: "tw-flex tw-flex-col tw-justify-start", children: [ - /* @__PURE__ */ s("span", { className: "tw-mb-2", children: "Languages" }), - /* @__PURE__ */ s("span", { className: "tw-font-semibold", children: l.join(", ") }) + /* @__PURE__ */ i("div", { className: "tw-flex tw-w-3/4 tw-items-center tw-justify-between tw-text-xs tw-text-gray-600", children: /* @__PURE__ */ x("p", { className: "tw-flex tw-flex-col tw-justify-start", children: [ + /* @__PURE__ */ i("span", { className: "tw-mb-2", children: "Languages" }), + /* @__PURE__ */ i("span", { className: "tw-font-semibold", children: l.join(", ") }) ] }) }) ] }) ] }) ] }) }); } -const th = (e, t) => { - at(() => { +const lh = [ + "%resources_action%", + "%resources_dialog_subtitle%", + "%resources_dialog_title%", + "%resources_filterInput%", + "%resources_fullName%", + "%resources_get%", + "%resources_installed%", + "%resources_language%", + "%resources_languageFilter%", + "%resources_loadingResources%", + "%resources_noResults%", + "%resources_open%", + "%resources_remove%", + "%resources_size%", + "%resources_type%", + "%resources_type_DBL%", + "%resources_type_ER%", + "%resources_type_SLR%", + "%resources_type_XR%", + "%resources_type_unknown%", + "%resources_update%" +], lm = (e, t) => { + const n = Array.from( + new Set(e.map((o) => o.bestLanguageName)) + ), r = new Set( + t.concat( + e.filter((o) => o.installed).map((o) => o.bestLanguageName) + ) + ); + return n.sort((o, a) => { + const s = r.has(o), l = r.has(a); + return s && l ? o.localeCompare(a) : s ? -1 : l ? 1 : o.localeCompare(a); + }); +}, es = (e, t, n) => /* @__PURE__ */ i(fe, { variant: "outline", onClick: () => n(e.dblEntryUid, "install"), children: t }), cm = (e, t, n, r, o, a) => t.includes(e.dblEntryUid) ? /* @__PURE__ */ i(fe, { variant: "outline", children: /* @__PURE__ */ i(Ct, { className: "tw-h-5 tw-py-[1px]" }) }) : e.installed ? e.updateAvailable ? es(e, r, a) : /* @__PURE__ */ i(De, { className: "tw-my-2 tw-flex tw-h-6 tw-items-center", children: o }) : es(e, n, a); +function ch({ + localizedStrings: e, + dblResources: t, + isLoadingDblResources: n, + typeFilter: r, + setTypeFilter: o, + languageFilter: a, + setLanguageFilter: s, + openResource: l, + installResource: c, + uninstallResource: d +}) { + const u = e["%resources_action%"], h = e["%resources_dialog_subtitle%"], w = e["%resources_dialog_title%"], b = e["%resources_filterInput%"], v = e["%resources_fullName%"], f = e["%resources_get%"], m = e["%resources_installed%"], N = e["%resources_language%"], A = e["%resources_languageFilter%"], _ = e["%resources_loadingResources%"], E = e["%resources_noResults%"], g = e["%resources_open%"], I = e["%resources_remove%"], U = e["%resources_size%"], W = e["%resources_type%"], O = e["%resources_type_DBL%"], P = e["%resources_type_ER%"], k = e["%resources_type_SLR%"], B = e["%resources_type_XR%"], D = e["%resources_type_unknown%"], Q = e["%resources_update%"], [J, X] = ie([]), ee = (S, F) => { + if (!c || !d) + return; + const T = { + dblEntryUid: S, + action: F === "install" ? "installing" : "removing" + }; + X((V) => [...V, T]), (F === "install" ? c : d)(S).catch((V) => { + console.debug(Nl(V)); + }); + }; + Ke(() => { + X( + (S) => S.filter((F) => { + const T = t.find((we) => we.dblEntryUid === F.dblEntryUid); + return T ? !(F.action === "installing" && T.installed || F.action === "removing" && !T.installed) : !0; + }) + ); + }, [t]); + const [re, oe] = ie(""), y = Ne(() => t.filter((S) => { + const F = re.toLowerCase(); + return S.displayName.toLowerCase().includes(F) || S.fullName.toLowerCase().includes(F) || S.bestLanguageName.toLowerCase().includes(F); + }), [t, re]), R = Ne(() => [ + { type: "DBLResource", localizedValue: O }, + { type: "EnhancedResource", localizedValue: P }, + { type: "SourceLanguageResource", localizedValue: k }, + { type: "XmlResource", localizedValue: B } + ], [O, P, k, B]), H = (S) => { + const F = [...r]; + let T = []; + !F || F.length === 0 ? T = [S] : T = F.includes(S) ? F.filter((we) => we !== S) : [...F, S], o(T); + }, G = Ne(() => y.filter((S) => r.includes(S.type)), [y, r]); + Ke(() => { + a.length === 0 && s( + t.filter((S) => S.installed === !0).map((S) => S.bestLanguageName) + ); + }, [t, a.length, s]); + const z = (S) => { + const F = [...a]; + let T = []; + !F || F.length === 0 ? T = [S] : T = F.includes(S) ? F.filter((we) => we !== S) : [...F, S], s(T); + }, q = Ne(() => G.filter((S) => a.includes(S.bestLanguageName)), [a, G]), [L, K] = ie({ + key: "bestLanguageName", + direction: "ascending" + }), Y = Ne(() => [...q].sort((S, F) => { + const T = S[L.key], we = F[L.key]; + return T < we ? L.direction === "ascending" ? -1 : 1 : T > we ? L.direction === "ascending" ? 1 : -1 : 0; + }), [L.direction, L.key, q]), Z = (S) => { + const F = { key: S, direction: "ascending" }; + L.key === S && L.direction === "ascending" && (F.direction = "descending"), K(F); + }; + return /* @__PURE__ */ x(Ci, { className: "tw-rounded-none tw-border-0", children: [ + /* @__PURE__ */ i(Si, { children: /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center", children: [ + /* @__PURE__ */ i(oa, { size: 36, className: "tw-mr-2" }), + /* @__PURE__ */ x("div", { children: [ + /* @__PURE__ */ i(Oi, { children: w }), + /* @__PURE__ */ i(Ri, { className: "tw-mt-1", children: h }) + ] }) + ] }) }), + /* @__PURE__ */ i(_i, { children: n || !t ? /* @__PURE__ */ x("div", { className: "tw-flex tw-flex-col tw-items-center tw-gap-2", children: [ + /* @__PURE__ */ i(De, { children: _ }), + /* @__PURE__ */ i(Ct, {}) + ] }) : /* @__PURE__ */ x("div", { children: [ + /* @__PURE__ */ x("div", { className: "tw-mb-1 tw-flex tw-gap-1", children: [ + /* @__PURE__ */ x("div", { className: "tw-relative", children: [ + /* @__PURE__ */ i( + qt, + { + type: "text", + className: "tw-box-border tw-min-w-72 tw-gap-2.5 tw-rounded-lg tw-border tw-border-solid tw-bg-background tw-py-2 tw-pl-4 tw-pr-3 tw-shadow-none tw-outline-none", + onChange: (S) => oe(S.target.value), + value: re, + placeholder: b + } + ), + /* @__PURE__ */ i(lo, { className: "tw-absolute tw-right-3 tw-top-1/2 tw-h-4 tw-w-4 tw--translate-y-1/2 tw-transform tw-text-muted-foreground" }) + ] }), + /* @__PURE__ */ x(vn, { children: [ + /* @__PURE__ */ i(er, { asChild: !0, children: /* @__PURE__ */ x(fe, { variant: "outline", children: [ + /* @__PURE__ */ i(wl, { className: "tw-mr-2 tw-w-4" }), + W + ] }) }), + /* @__PURE__ */ i(Lt, { align: "start", children: R.map((S) => /* @__PURE__ */ i( + dr, + { + checked: r.includes(S.type), + onClick: (F) => { + F.preventDefault(), H(S.type); + }, + children: /* @__PURE__ */ i("span", { children: S.localizedValue }) + } + )) }) + ] }), + /* @__PURE__ */ i( + Jr, + { + className: "tw-w-auto tw-min-w-10 tw-flex-shrink", + buttonPlaceholder: N, + textPlaceholder: A, + value: a[0], + options: lm(t, a), + onChange: z + } + ) + ] }), + Y.length === 0 ? /* @__PURE__ */ i("div", { className: "tw-m-4 tw-flex tw-w-full tw-justify-center", children: /* @__PURE__ */ i(De, { children: E }) }) : /* @__PURE__ */ x(_n, { stickyHeader: !0, children: [ + /* @__PURE__ */ i(Pn, { className: "tw-bg-none", stickyHeader: !0, children: /* @__PURE__ */ x(We, { children: [ + /* @__PURE__ */ i(je, {}), + /* @__PURE__ */ i(je, {}), + /* @__PURE__ */ i(je, { onClick: () => Z("fullName"), children: /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center", children: [ + v, + L.key !== "fullName" && /* @__PURE__ */ i(Qn, { className: "tw-pl-1", size: 16 }), + L.key === "fullName" && (L.direction === "ascending" ? /* @__PURE__ */ i(Xr, { className: "tw-pl-1", size: 16 }) : /* @__PURE__ */ i(Vt, { className: "tw-pl-1", size: 16 })) + ] }) }), + /* @__PURE__ */ i(je, { onClick: () => Z("bestLanguageName"), children: /* @__PURE__ */ x("div", { className: "tw-flex tw-items-center", children: [ + N, + L.key !== "bestLanguageName" && /* @__PURE__ */ i(Qn, { className: "tw-pl-1", size: 16 }), + L.key === "bestLanguageName" && (L.direction === "ascending" ? /* @__PURE__ */ i(Xr, { className: "tw-pl-1", size: 16 }) : /* @__PURE__ */ i(Vt, { className: "tw-pl-1", size: 16 })) + ] }) }), + /* @__PURE__ */ i(je, { children: W }), + /* @__PURE__ */ i(je, { children: U }), + /* @__PURE__ */ i(je, { children: u }) + ] }) }), + /* @__PURE__ */ i($n, { children: Y.map((S) => { + var F; + return /* @__PURE__ */ x(We, { children: [ + /* @__PURE__ */ i($e, { children: /* @__PURE__ */ i(oa, { className: "tw-pr-0", size: 18 }) }), + /* @__PURE__ */ i($e, { children: S.displayName }), + /* @__PURE__ */ i($e, { className: "tw-font-medium", children: S.fullName }), + /* @__PURE__ */ i($e, { children: S.bestLanguageName }), + /* @__PURE__ */ i($e, { children: ((F = R.find((T) => T.type === S.type)) == null ? void 0 : F.localizedValue) ?? D }), + /* @__PURE__ */ i($e, { children: S.size }), + /* @__PURE__ */ i($e, { children: /* @__PURE__ */ x("div", { className: "tw-flex tw-justify-between", children: [ + cm( + S, + J.map((T) => T.dblEntryUid), + f, + Q, + m, + ee + ), + S.installed && /* @__PURE__ */ x(vn, { children: [ + /* @__PURE__ */ i(er, { asChild: !0, children: /* @__PURE__ */ i(fe, { variant: "ghost", children: /* @__PURE__ */ i(fl, { className: "tw-w-4" }) }) }), + /* @__PURE__ */ x(Lt, { align: "start", children: [ + /* @__PURE__ */ i(tr, { onClick: () => l(S.projectId), children: /* @__PURE__ */ i("span", { children: g }) }), + /* @__PURE__ */ i(Rn, {}), + /* @__PURE__ */ i( + tr, + { + onClick: () => ee(S.dblEntryUid, "remove"), + children: /* @__PURE__ */ i("span", { children: I }) + } + ) + ] }) + ] }) + ] }) }) + ] }, S.displayName + S.fullName); + }) }) + ] }) + ] }) }) + ] }); +} +const dh = (e, t) => { + Ke(() => { if (!e) return () => { }; @@ -9698,30 +9907,30 @@ const th = (e, t) => { n(); }; }, [e, t]); -}, Lr = () => !1, nh = (e, t) => { - const [n] = eo( - $e(async () => { +}, Hr = () => !1, uh = (e, t) => { + const [n] = io( + Ie(async () => { if (!e) - return Lr; + return Hr; const r = await Promise.resolve(e(t)); return async () => r(); }, [t, e]), - Lr, + Hr, // We want the unsubscriber to return to default value immediately upon changing subscription // So the useEffect below will unsubscribe asap { preserveValue: !1 } ); - at(() => () => { - n !== Lr && n(); + Ke(() => () => { + n !== Hr && n(); }, [n]); }; -function rm(e, t = "top") { +function dm(e, t = "top") { if (!e || typeof document > "u") return; const n = document.head || document.querySelector("head"), r = n.querySelector(":first-child"), o = document.createElement("style"); o.appendChild(document.createTextNode(e)), t === "top" && r ? n.insertBefore(o, r) : n.appendChild(o); } -rm(`*, ::before, ::after { +dm(`*, ::before, ::after { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; @@ -10861,6 +11070,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-m-2 { margin: 0.5rem; } +.tw-m-4 { + margin: 1rem; +} .tw--mx-1 { margin-left: -0.25rem; margin-right: -0.25rem; @@ -11159,6 +11371,12 @@ video:where(.pr-twp,.pr-twp *) { .tw-w-full { width: 100%; } +.tw-min-w-10 { + min-width: 2.5rem; +} +.tw-min-w-72 { + min-width: 18rem; +} .tw-min-w-\\[8rem\\] { min-width: 8rem; } @@ -11180,6 +11398,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-flex-1 { flex: 1 1 0%; } +.tw-flex-shrink { + flex-shrink: 1; +} .tw-flex-shrink-0 { flex-shrink: 0; } @@ -11430,6 +11651,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-rounded-md { border-radius: calc(var(--radius) - 2px); } +.tw-rounded-none { + border-radius: 0px; +} .tw-rounded-sm { border-radius: calc(var(--radius) - 4px); } @@ -11638,6 +11862,9 @@ video:where(.pr-twp,.pr-twp *) { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); } +.tw-bg-none { + background-image: none; +} .tw-fill-current { fill: currentColor; } @@ -11729,6 +11956,10 @@ video:where(.pr-twp,.pr-twp *) { padding-top: 1.5rem; padding-bottom: 1.5rem; } +.tw-py-\\[1px\\] { + padding-top: 1px; + padding-bottom: 1px; +} .tw-pb-2 { padding-bottom: 0.5rem; } @@ -11747,6 +11978,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-pe-9 { padding-inline-end: 2.25rem; } +.tw-pl-1 { + padding-left: 0.25rem; +} .tw-pl-4 { padding-left: 1rem; } @@ -11756,6 +11990,9 @@ video:where(.pr-twp,.pr-twp *) { .tw-pl-8 { padding-left: 2rem; } +.tw-pr-0 { + padding-right: 0px; +} .tw-pr-2 { padding-right: 0.5rem; } @@ -12832,6 +13069,19 @@ video:where(.pr-twp,.pr-twp *) { .\\[\\&_tr\\]\\:tw-border-b tr { border-bottom-width: 1px; } +.papi-menu-item { + background-color: transparent; +} + +.papi-menu-icon-trailing { + margin-left: 10px; + place-content: flex-end; +} + +.papi-menu-item img { + max-width: 24px; + max-height: 24px; +} .papi-icon-button { border: 0; border-radius: 3em; @@ -12892,18 +13142,12 @@ video:where(.pr-twp,.pr-twp *) { color: rgb(76, 106, 76); background-color: rgb(214, 255, 152); } -.papi-menu-item { - background-color: transparent; -} - -.papi-menu-icon-trailing { - margin-left: 10px; - place-content: flex-end; +.banded-row:hover { + cursor: pointer; } -.papi-menu-item img { - max-width: 24px; - max-height: 24px; +.banded-row[data-state='selected']:hover { + cursor: default; } .papi-menu-drawer-paper { height: fit-content !important; @@ -12915,128 +13159,123 @@ video:where(.pr-twp,.pr-twp *) { display: flex; gap: 8px; } -.banded-row:hover { - cursor: pointer; -} - -.banded-row[data-state='selected']:hover { - cursor: default; -} `, "top"); export { - Vf as Alert, - zf as AlertDescription, - Lf as AlertTitle, - Tm as BOOK_SELECTOR_STRING_KEYS, - Um as Badge, - Em as BookChapterControl, - fc as BookSelectionMode, - Cm as BookSelector, - me as Button, - Uf as Card, - Yf as CardContent, - Xf as CardDescription, - Wf as CardFooter, - Gf as CardHeader, - Hf as CardTitle, - wc as ChapterRangeSelector, - fo as Checkbox, - Vm as Checklist, - ta as ComboBox, - Nc as DataTable, - Wm as DisableButton, - ao as DropdownMenu, - io as DropdownMenuCheckboxItem, - tr as DropdownMenuContent, - Hl as DropdownMenuGroup, - mi as DropdownMenuItem, - tm as DropdownMenuItemType, - En as DropdownMenuLabel, - xm as DropdownMenuPortal, - km as DropdownMenuRadioGroup, - hi as DropdownMenuRadioItem, - nr as DropdownMenuSeparator, - Wl as DropdownMenuShortcut, - Nm as DropdownMenuSub, - Yl as DropdownMenuSubContent, - Xl as DropdownMenuSubTrigger, - fi as DropdownMenuTrigger, - Ym as EnableButton, - em as FilterButton, - Jm as FilterDropdown, - eh as Footer, - Af as GridMenu, - Bf as HamburgerMenuButton, - Pm as INVENTORY_STRING_KEYS, - Lm as IconButton, - kn as Input, - Xm as InstallButton, - _m as Inventory, - He as Label, - Km as MarkdownRenderer, - ys as MenuItem, - Qm as MoreInfo, - $m as MultiSelectComboBox, - Im as NavigationContentSearch, - Zm as NoExtensionsFound, - gi as RadioGroup, - Gr as RadioGroupItem, - Am as ScriptureResultsViewer, - Dm as ScrollGroupSelector, - _c as SearchBar, - fn as Select, - Bt as SelectContent, - hc as SelectGroup, - Ue as SelectItem, - gc as SelectLabel, - ki as SelectScrollDownButton, - Ni as SelectScrollUpButton, - bc as SelectSeparator, - Mt as SelectTrigger, - mn as SelectValue, - _i as Separator, - Mm as SettingsList, - jm as SettingsListHeader, - Bm as SettingsListItem, - qf as Slider, - Gm as Sonner, - _n as Spinner, - Kf as Switch, - rr as Table, - ar as TableBody, - xc as TableCaption, - jt as TableCell, - yc as TableFooter, - hn as TableHead, - or as TableHeader, - ot as TableRow, - Hm as Tabs, - Qf as TabsContent, - Jf as TabsList, - Zf as TabsTrigger, - zm as TextField, - Ci as ToggleGroup, - Fn as ToggleGroupItem, - Fm as Toolbar, - qm as UpdateButton, - nm as VersionHistory, - Si as VerticalTabs, - Ri as VerticalTabsContent, - Oi as VerticalTabsList, - $c as VerticalTabsTrigger, - Ff as badgeVariants, - ac as buttonVariants, - T as cn, - Tc as getBookNumFromId, - Ec as getLinesFromUSFM, - na as getNumberFromUSFM, - Cc as getStatusForItem, - Om as inventoryCountColumn, - Sm as inventoryItemColumn, - Rm as inventoryStatusColumn, - ah as sonner, - th as useEvent, - nh as useEventAsync, - eo as usePromise + qf as Alert, + Jf as AlertDescription, + Kf as AlertTitle, + $m as BOOK_SELECTOR_STRING_KEYS, + Km as Badge, + Pm as BookChapterControl, + Ec as BookSelectionMode, + Im as BookSelector, + fe as Button, + Ci as Card, + _i as CardContent, + Ri as CardDescription, + Qf as CardFooter, + Si as CardHeader, + Oi as CardTitle, + kc as ChapterRangeSelector, + yo as Checkbox, + Xm as Checklist, + Jr as ComboBox, + $c as DataTable, + th as DisableButton, + vn as DropdownMenu, + dr as DropdownMenuCheckboxItem, + Lt as DropdownMenuContent, + tc as DropdownMenuGroup, + tr as DropdownMenuItem, + sm as DropdownMenuItemType, + On as DropdownMenuLabel, + Om as DropdownMenuPortal, + _m as DropdownMenuRadioGroup, + vs as DropdownMenuRadioItem, + Rn as DropdownMenuSeparator, + oc as DropdownMenuShortcut, + Rm as DropdownMenuSub, + rc as DropdownMenuSubContent, + nc as DropdownMenuSubTrigger, + er as DropdownMenuTrigger, + eh as EnableButton, + lh as FILTERABLE_RESOURCE_LIST_STRING_KEYS, + am as FilterButton, + oh as FilterDropdown, + ch as FilterableResourceList, + ih as Footer, + Gf as GridMenu, + Yf as HamburgerMenuButton, + Bm as INVENTORY_STRING_KEYS, + Ym as IconButton, + qt as Input, + Qm as InstallButton, + jm as Inventory, + De as Label, + rh as MarkdownRenderer, + ki as MenuItem, + sh as MoreInfo, + Vm as MultiSelectComboBox, + Lm as NavigationContentSearch, + ah as NoExtensionsFound, + ys as RadioGroup, + Kr as RadioGroupItem, + Fm as ScriptureResultsViewer, + zm as ScrollGroupSelector, + Fc as SearchBar, + yn as Select, + zt as SelectContent, + Cc as SelectGroup, + Xe as SelectItem, + Sc as SelectLabel, + Cs as SelectScrollDownButton, + Ts as SelectScrollUpButton, + Oc as SelectSeparator, + Ft as SelectTrigger, + xn as SelectValue, + As as Separator, + Um as SettingsList, + Hm as SettingsListHeader, + Gm as SettingsListItem, + em as Slider, + Jm as Sonner, + Ct as Spinner, + tm as Switch, + _n as Table, + $n as TableBody, + Pc as TableCaption, + $e as TableCell, + _c as TableFooter, + je as TableHead, + Pn as TableHeader, + We as TableRow, + Zm as Tabs, + om as TabsContent, + nm as TabsList, + rm as TabsTrigger, + Wm as TextField, + Rs as ToggleGroup, + qn as ToggleGroupItem, + qm as Toolbar, + nh as UpdateButton, + im as VersionHistory, + _s as VerticalTabs, + $s as VerticalTabsContent, + Ps as VerticalTabsList, + zc as VerticalTabsTrigger, + Zf as badgeVariants, + mc as buttonVariants, + C as cn, + Dc as getBookNumFromId, + Ac as getLinesFromUSFM, + la as getNumberFromUSFM, + Mc as getStatusForItem, + Dm as inventoryCountColumn, + Am as inventoryItemColumn, + Mm as inventoryStatusColumn, + fh as sonner, + dh as useEvent, + uh as useEventAsync, + io as usePromise }; //# sourceMappingURL=index.js.map diff --git a/lib/platform-bible-react/dist/index.js.map b/lib/platform-bible-react/dist/index.js.map index 7bbb3df427..b6e1dd41f9 100644 --- a/lib/platform-bible-react/dist/index.js.map +++ b/lib/platform-bible-react/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../src/utils/shadcn-ui.util.ts","../src/components/shadcn-ui/input.tsx","../src/components/advanced/book-chapter-control/book-chapter-input.component.tsx","../../../node_modules/@sillsdev/scripture/dist/index.es.js","../src/components/shadcn-ui/dropdown-menu.tsx","../src/components/advanced/book-chapter-control/book-menu-item.component.tsx","../src/components/advanced/book-chapter-control/chapter-select.component.tsx","../src/components/advanced/book-chapter-control/go-to-menu-item.component.tsx","../src/components/advanced/book-chapter-control/book-chapter-control.component.tsx","../src/components/shadcn-ui/button.tsx","../src/components/shadcn-ui/label.tsx","../src/components/shadcn-ui/radio-group.tsx","../src/components/shadcn-ui/popover.tsx","../src/components/shadcn-ui/dialog.tsx","../src/components/shadcn-ui/command.tsx","../src/components/basics/combo-box.component.tsx","../src/components/basics/chapter-range-selector.component.tsx","../src/components/advanced/book-selector.component.tsx","../src/components/advanced/data-table/data-table-column-toggle.component.tsx","../src/components/shadcn-ui/select.tsx","../src/components/advanced/data-table/data-table-pagination.component.tsx","../src/components/shadcn-ui/table.tsx","../src/components/advanced/data-table/data-table.component.tsx","../src/components/advanced/inventory/occurrences-table.component.tsx","../src/components/shadcn-ui/checkbox.tsx","../src/components/advanced/inventory/inventory-utils.ts","../src/components/shadcn-ui/toggle.tsx","../src/components/shadcn-ui/toggle-group.tsx","../src/components/advanced/inventory/inventory-columns.tsx","../src/components/advanced/inventory/inventory.component.tsx","../src/components/advanced/multi-select-combo-box.tsx","../src/components/basics/search-bar.component.tsx","../src/components/basics/tabs-vertical.tsx","../src/components/advanced/navigation-content-search.component.tsx","../src/components/advanced/scripture-results-viewer/scripture-results-viewer.component.tsx","../src/components/advanced/scroll-group-selector.component.tsx","../src/components/shadcn-ui/separator.tsx","../src/components/advanced/settings-components/settings-list.component.tsx","../src/components/basics/checklist.component.tsx","../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/@mui/utils/chainPropTypes/chainPropTypes.js","../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../node_modules/@mui/utils/deepmerge/deepmerge.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../node_modules/prop-types/node_modules/react-is/index.js","../../../node_modules/object-assign/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/lib/has.js","../../../node_modules/prop-types/checkPropTypes.js","../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.js","../../../node_modules/@mui/utils/exactProp/exactProp.js","../../../node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/cjs/react-is.development.js","../../../node_modules/react-is/index.js","../../../node_modules/@mui/utils/getDisplayName/getDisplayName.js","../../../node_modules/@mui/utils/HTMLElementType/HTMLElementType.js","../../../node_modules/@mui/utils/refType/refType.js","../../../node_modules/@mui/utils/capitalize/capitalize.js","../../../node_modules/@mui/utils/createChainedFunction/createChainedFunction.js","../../../node_modules/@mui/utils/debounce/debounce.js","../../../node_modules/@mui/utils/deprecatedPropType/deprecatedPropType.js","../../../node_modules/@mui/utils/isMuiElement/isMuiElement.js","../../../node_modules/@mui/utils/ownerDocument/ownerDocument.js","../../../node_modules/@mui/utils/ownerWindow/ownerWindow.js","../../../node_modules/@mui/utils/requirePropFactory/requirePropFactory.js","../../../node_modules/@mui/utils/setRef/setRef.js","../../../node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.js","../../../node_modules/@mui/utils/useId/useId.js","../../../node_modules/@mui/utils/unsupportedProp/unsupportedProp.js","../../../node_modules/@mui/utils/useControlled/useControlled.js","../../../node_modules/@mui/utils/useEventCallback/useEventCallback.js","../../../node_modules/@mui/utils/useForkRef/useForkRef.js","../../../node_modules/@mui/utils/useLazyRef/useLazyRef.js","../../../node_modules/@mui/utils/useOnMount/useOnMount.js","../../../node_modules/@mui/utils/useTimeout/useTimeout.js","../../../node_modules/@mui/utils/useIsFocusVisible/useIsFocusVisible.js","../../../node_modules/@mui/utils/resolveProps/resolveProps.js","../../../node_modules/@mui/utils/composeClasses/composeClasses.js","../../../node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.js","../../../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js","../../../node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js","../../../node_modules/@mui/utils/clamp/clamp.js","../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../node_modules/@mui/system/esm/createTheme/createBreakpoints.js","../../../node_modules/@mui/system/esm/createTheme/shape.js","../../../node_modules/@mui/system/esm/responsivePropType.js","../../../node_modules/@mui/system/esm/merge.js","../../../node_modules/@mui/system/esm/breakpoints.js","../../../node_modules/@mui/system/esm/style.js","../../../node_modules/@mui/system/esm/memoize.js","../../../node_modules/@mui/system/esm/spacing.js","../../../node_modules/@mui/system/esm/createTheme/createSpacing.js","../../../node_modules/@mui/system/esm/compose.js","../../../node_modules/@mui/system/esm/borders.js","../../../node_modules/@mui/system/esm/cssGrid.js","../../../node_modules/@mui/system/esm/palette.js","../../../node_modules/@mui/system/esm/sizing.js","../../../node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","../../../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","../../../node_modules/@mui/system/esm/createTheme/applyStyles.js","../../../node_modules/@mui/system/esm/createTheme/createTheme.js","../../../node_modules/@mui/system/esm/useThemeWithoutDefault.js","../../../node_modules/@mui/system/esm/useTheme.js","../../../node_modules/@mui/system/esm/createStyled.js","../../../node_modules/@mui/system/esm/useThemeProps/getThemeProps.js","../../../node_modules/@mui/system/esm/useThemeProps/useThemeProps.js","../../../node_modules/@mui/system/esm/colorManipulator.js","../../../node_modules/@mui/material/styles/createMixins.js","../../../node_modules/@mui/material/colors/common.js","../../../node_modules/@mui/material/colors/grey.js","../../../node_modules/@mui/material/colors/purple.js","../../../node_modules/@mui/material/colors/red.js","../../../node_modules/@mui/material/colors/orange.js","../../../node_modules/@mui/material/colors/blue.js","../../../node_modules/@mui/material/colors/lightBlue.js","../../../node_modules/@mui/material/colors/green.js","../../../node_modules/@mui/material/styles/createPalette.js","../../../node_modules/@mui/material/styles/createTypography.js","../../../node_modules/@mui/material/styles/shadows.js","../../../node_modules/@mui/material/styles/createTransitions.js","../../../node_modules/@mui/material/styles/zIndex.js","../../../node_modules/@mui/material/styles/createTheme.js","../../../node_modules/@mui/material/styles/defaultTheme.js","../../../node_modules/@mui/material/styles/identifier.js","../../../node_modules/@mui/material/styles/useThemeProps.js","../../../node_modules/@mui/material/styles/styled.js","../../../node_modules/@mui/material/SvgIcon/svgIconClasses.js","../../../node_modules/@mui/material/SvgIcon/SvgIcon.js","../../../node_modules/@mui/material/utils/createSvgIcon.js","../../../node_modules/@mui/material/utils/index.js","../../../node_modules/@mui/icons-material/utils/createSvgIcon.js","../../../node_modules/@mui/icons-material/ArrowRight.js","../../../node_modules/@mui/base/utils/isHostComponent.js","../../../node_modules/@mui/base/utils/appendOwnerState.js","../../../node_modules/@mui/base/utils/ClassNameConfigurator.js","../../../node_modules/@mui/base/utils/extractEventHandlers.js","../../../node_modules/@mui/base/utils/resolveComponentProps.js","../../../node_modules/@mui/base/utils/omitEventHandlers.js","../../../node_modules/@mui/base/utils/mergeSlotProps.js","../../../node_modules/@mui/base/utils/useSlotProps.js","../../../node_modules/@mui/base/generateUtilityClass/index.js","../../../node_modules/@mui/base/generateUtilityClasses/index.js","../../../node_modules/@mui/base/Portal/Portal.js","../../../node_modules/@popperjs/core/lib/enums.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../node_modules/@popperjs/core/lib/utils/math.js","../../../node_modules/@popperjs/core/lib/utils/userAgent.js","../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../node_modules/@popperjs/core/lib/utils/within.js","../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../node_modules/@popperjs/core/lib/utils/debounce.js","../../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../node_modules/@popperjs/core/lib/createPopper.js","../../../node_modules/@popperjs/core/lib/popper.js","../../../node_modules/@mui/base/Popper/popperClasses.js","../../../node_modules/@mui/base/Popper/Popper.js","../../../node_modules/@mui/material/styles/useTheme.js","../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../node_modules/react-transition-group/esm/config.js","../../../node_modules/react-transition-group/esm/utils/PropTypes.js","../../../node_modules/react-transition-group/esm/TransitionGroupContext.js","../../../node_modules/react-transition-group/esm/utils/reflow.js","../../../node_modules/react-transition-group/esm/Transition.js","../../../node_modules/@mui/material/transitions/utils.js","../../../node_modules/@mui/material/Grow/Grow.js","../../../node_modules/@mui/material/Popper/Popper.js","../../../node_modules/@mui/material/Tooltip/tooltipClasses.js","../../../node_modules/@mui/material/Tooltip/Tooltip.js","../src/components/mui/menu-item.component.tsx","../src/components/mui/grouped-menu-item-list.component.tsx","../src/components/mui/top-level-menu.component.tsx","../src/components/mui/grid-menu.component.tsx","../src/hooks/use-promise.hook.ts","../../../node_modules/@mui/icons-material/esm/Menu.js","../src/components/mui/hamburger-menu-button.component.tsx","../src/components/mui/icon-button.component.tsx","../src/components/basics/spinner.component.tsx","../src/components/basics/text-field.component.tsx","../src/components/mui/toolbar.component.tsx","../src/components/shadcn-ui/alert.tsx","../src/components/shadcn-ui/badge.tsx","../src/components/shadcn-ui/card.tsx","../src/components/shadcn-ui/sonner.tsx","../src/components/shadcn-ui/slider.tsx","../src/components/shadcn-ui/switch.tsx","../src/components/shadcn-ui/tabs.tsx","../src/components/advanced/extension-marketplace/buttons/install-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/enable-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/disable-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/update-button.component.tsx","../src/components/advanced/extension-marketplace/markdown-renderer.component.tsx","../src/components/advanced/extension-marketplace/buttons/filter-button.component.tsx","../src/components/advanced/extension-marketplace/filter-dropdown.component.tsx","../src/components/advanced/extension-marketplace/no-extensions-found.component.tsx","../src/components/advanced/extension-marketplace/more-info.component.tsx","../src/components/advanced/extension-marketplace/version-history.component.tsx","../src/components/advanced/extension-marketplace/footer.component.tsx","../src/hooks/use-event.hook.ts","../src/hooks/use-event-async.hook.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst twMergeCustom = extendTailwindMerge({ prefix: 'tw-' });\n\n/**\n * Tailwind and CSS class application helper function. Uses\n * [`clsx`](https://www.npmjs.com/package/clsx) to make it easy to apply classes conditionally using\n * object syntax, and uses [`tailwind-merge`](https://www.npmjs.com/package/tailwind-merge) to make\n * it easy to merge/overwrite Tailwind classes in a programmer-logic-friendly way.\n *\n * Note: `tailwind-merge` is configured to use the prefix `tw-`, so you must use the same prefix\n * with any Tailwind classes you use with this function to successfully overwrite other Tailwind\n * classes. `platform-bible-react` is configured to use `tw-` as its Tailwind prefix, so any\n * Tailwind classes you pass into `platform-bible-react` components will be compared using the `tw-`\n * prefix.\n *\n * This function was popularized by\n * [shadcn/ui](https://ui.shadcn.com/docs/installation/manual#add-a-cn-helper). See [ByteGrad's\n * explanation video](https://www.youtube.com/watch?v=re2JFITR7TI) for more information.\n *\n * @example\n *\n * ```typescript\n * const borderShouldBeBlue = true;\n * const textShouldBeRed = true;\n * const heightShouldBe20 = false;\n * const classString = cn(\n * 'tw-bg-primary tw-h-10 tw-text-primary-foreground',\n * 'tw-bg-secondary',\n * {\n * 'tw-border-blue-500': borderShouldBeBlue,\n * 'tw-text-red-500': textShouldBeRed,\n * 'tw-h-20': heightShouldBe20,\n * },\n * 'some-class',\n * );\n * ```\n *\n * The resulting `classString` is `'tw-h-10 tw-bg-secondary tw-border-blue-500 tw-text-red-500\n * some-class'`\n *\n * - Notice that `'tw-bg-secondary'`, specified later, overwrote `'tw-bg-primary'`, specified earlier,\n * because they are Tailwind classes that affect the same css property\n * - Notice that `'tw-text-red-500'`, specified later, overwrote `'tw-text-primary-foreground'`,\n * specified earlier, because they are Tailwind classes that affect the same css property\n * - Notice that `'tw-h-20'`, specified later, did not overwrite `'tw-h-10'`, specified earlier,\n * because `'tw-h-20'` is part of a conditional class object and its value evaluated to `false`;\n * therefore it was not applied\n * - Notice that `'some-class'` was applied. This function is not limited only to Tailwind classes.\n *\n *\n * @param inputs Class strings or `clsx` conditional class objects to merge. Tailwind classes\n * specified later in the arguments overwrite similar Tailwind classes specified earlier in the\n * arguments\n * @returns Class string containing all applicable classes from the arguments based on the rules\n * described above\n */\n// shadcn/ui uses this export in its boilerplate code\n// eslint-disable-next-line import/prefer-default-export\nexport function cn(...inputs: ClassValue[]) {\n return twMergeCustom(clsx(inputs));\n}\n","import React from 'react';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport interface InputProps extends React.InputHTMLAttributes {}\n\nexport const Input = React.forwardRef(\n ({ className, type, ...props }, ref) => {\n return (\n \n );\n },\n);\nInput.displayName = 'Input';\n","import { FocusEventHandler, forwardRef, KeyboardEvent, MouseEventHandler } from 'react';\nimport { History } from 'lucide-react';\nimport { Input as ShadInput } from '@/components/shadcn-ui/input';\n\nexport type BookChapterInputProps = {\n handleSearch: (searchString: string) => void;\n handleKeyDown: (event: KeyboardEvent) => void;\n handleOnClick: MouseEventHandler;\n handleSubmit: () => void;\n onFocus?: FocusEventHandler;\n value: string;\n placeholder: string;\n};\n\n// Shadcn Input sets type to \"button\"- HAVE to prop spread before setting type\nconst BookChapterInput = forwardRef(\n (\n { handleSearch, handleKeyDown, handleOnClick, handleSubmit, ...props }: BookChapterInputProps,\n ref,\n ) => {\n return (\n
\n handleSearch(event.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n handleSubmit();\n }\n handleKeyDown(e);\n }}\n onClick={handleOnClick}\n ref={ref}\n />\n {\n // eslint-disable-next-line no-console\n console.log('back in history');\n }}\n />\n
\n );\n },\n);\n\nexport default BookChapterInput;\n","var P = Object.defineProperty;\nvar R = (t, e, s) => e in t ? P(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;\nvar n = (t, e, s) => R(t, typeof e != \"symbol\" ? e + \"\" : e, s);\nclass _ {\n constructor() {\n n(this, \"books\");\n n(this, \"firstSelectedBookNum\");\n n(this, \"lastSelectedBookNum\");\n n(this, \"count\");\n n(this, \"selectedBookNumbers\");\n n(this, \"selectedBookIds\");\n }\n}\nconst N = [\n \"GEN\",\n \"EXO\",\n \"LEV\",\n \"NUM\",\n \"DEU\",\n \"JOS\",\n \"JDG\",\n \"RUT\",\n \"1SA\",\n \"2SA\",\n // 10\n \"1KI\",\n \"2KI\",\n \"1CH\",\n \"2CH\",\n \"EZR\",\n \"NEH\",\n \"EST\",\n \"JOB\",\n \"PSA\",\n \"PRO\",\n // 20\n \"ECC\",\n \"SNG\",\n \"ISA\",\n \"JER\",\n \"LAM\",\n \"EZK\",\n \"DAN\",\n \"HOS\",\n \"JOL\",\n \"AMO\",\n // 30\n \"OBA\",\n \"JON\",\n \"MIC\",\n \"NAM\",\n \"HAB\",\n \"ZEP\",\n \"HAG\",\n \"ZEC\",\n \"MAL\",\n \"MAT\",\n // 40\n \"MRK\",\n \"LUK\",\n \"JHN\",\n \"ACT\",\n \"ROM\",\n \"1CO\",\n \"2CO\",\n \"GAL\",\n \"EPH\",\n \"PHP\",\n // 50\n \"COL\",\n \"1TH\",\n \"2TH\",\n \"1TI\",\n \"2TI\",\n \"TIT\",\n \"PHM\",\n \"HEB\",\n \"JAS\",\n \"1PE\",\n // 60\n \"2PE\",\n \"1JN\",\n \"2JN\",\n \"3JN\",\n \"JUD\",\n \"REV\",\n \"TOB\",\n \"JDT\",\n \"ESG\",\n \"WIS\",\n // 70\n \"SIR\",\n \"BAR\",\n \"LJE\",\n \"S3Y\",\n \"SUS\",\n \"BEL\",\n \"1MA\",\n \"2MA\",\n \"3MA\",\n \"4MA\",\n // 80\n \"1ES\",\n \"2ES\",\n \"MAN\",\n \"PS2\",\n \"ODA\",\n \"PSS\",\n \"JSA\",\n // actual variant text for JOS, now in LXA text\n \"JDB\",\n // actual variant text for JDG, now in LXA text\n \"TBS\",\n // actual variant text for TOB, now in LXA text\n \"SST\",\n // actual variant text for SUS, now in LXA text // 90\n \"DNT\",\n // actual variant text for DAN, now in LXA text\n \"BLT\",\n // actual variant text for BEL, now in LXA text\n \"XXA\",\n \"XXB\",\n \"XXC\",\n \"XXD\",\n \"XXE\",\n \"XXF\",\n \"XXG\",\n \"FRT\",\n // 100\n \"BAK\",\n \"OTH\",\n \"3ES\",\n // Used previously but really should be 2ES\n \"EZA\",\n // Used to be called 4ES, but not actually in any known project\n \"5EZ\",\n // Used to be called 5ES, but not actually in any known project\n \"6EZ\",\n // Used to be called 6ES, but not actually in any known project\n \"INT\",\n \"CNC\",\n \"GLO\",\n \"TDX\",\n // 110\n \"NDX\",\n \"DAG\",\n \"PS3\",\n \"2BA\",\n \"LBA\",\n \"JUB\",\n \"ENO\",\n \"1MQ\",\n \"2MQ\",\n \"3MQ\",\n // 120\n \"REP\",\n \"4BA\",\n \"LAO\"\n], B = [\n \"XXA\",\n \"XXB\",\n \"XXC\",\n \"XXD\",\n \"XXE\",\n \"XXF\",\n \"XXG\",\n \"FRT\",\n \"BAK\",\n \"OTH\",\n \"INT\",\n \"CNC\",\n \"GLO\",\n \"TDX\",\n \"NDX\"\n], O = [\n \"Genesis\",\n \"Exodus\",\n \"Leviticus\",\n \"Numbers\",\n \"Deuteronomy\",\n \"Joshua\",\n \"Judges\",\n \"Ruth\",\n \"1 Samuel\",\n \"2 Samuel\",\n \"1 Kings\",\n \"2 Kings\",\n \"1 Chronicles\",\n \"2 Chronicles\",\n \"Ezra\",\n \"Nehemiah\",\n \"Esther (Hebrew)\",\n \"Job\",\n \"Psalms\",\n \"Proverbs\",\n \"Ecclesiastes\",\n \"Song of Songs\",\n \"Isaiah\",\n \"Jeremiah\",\n \"Lamentations\",\n \"Ezekiel\",\n \"Daniel (Hebrew)\",\n \"Hosea\",\n \"Joel\",\n \"Amos\",\n \"Obadiah\",\n \"Jonah\",\n \"Micah\",\n \"Nahum\",\n \"Habakkuk\",\n \"Zephaniah\",\n \"Haggai\",\n \"Zechariah\",\n \"Malachi\",\n \"Matthew\",\n \"Mark\",\n \"Luke\",\n \"John\",\n \"Acts\",\n \"Romans\",\n \"1 Corinthians\",\n \"2 Corinthians\",\n \"Galatians\",\n \"Ephesians\",\n \"Philippians\",\n \"Colossians\",\n \"1 Thessalonians\",\n \"2 Thessalonians\",\n \"1 Timothy\",\n \"2 Timothy\",\n \"Titus\",\n \"Philemon\",\n \"Hebrews\",\n \"James\",\n \"1 Peter\",\n \"2 Peter\",\n \"1 John\",\n \"2 John\",\n \"3 John\",\n \"Jude\",\n \"Revelation\",\n \"Tobit\",\n \"Judith\",\n \"Esther Greek\",\n \"Wisdom of Solomon\",\n \"Sirach (Ecclesiasticus)\",\n \"Baruch\",\n \"Letter of Jeremiah\",\n \"Song of 3 Young Men\",\n \"Susanna\",\n \"Bel and the Dragon\",\n \"1 Maccabees\",\n \"2 Maccabees\",\n \"3 Maccabees\",\n \"4 Maccabees\",\n \"1 Esdras (Greek)\",\n \"2 Esdras (Latin)\",\n \"Prayer of Manasseh\",\n \"Psalm 151\",\n \"Odes\",\n \"Psalms of Solomon\",\n // WARNING, if you change the spelling of the *obsolete* tag be sure to update\n // IsObsolete routine\n \"Joshua A. *obsolete*\",\n \"Judges B. *obsolete*\",\n \"Tobit S. *obsolete*\",\n \"Susanna Th. *obsolete*\",\n \"Daniel Th. *obsolete*\",\n \"Bel Th. *obsolete*\",\n \"Extra A\",\n \"Extra B\",\n \"Extra C\",\n \"Extra D\",\n \"Extra E\",\n \"Extra F\",\n \"Extra G\",\n \"Front Matter\",\n \"Back Matter\",\n \"Other Matter\",\n \"3 Ezra *obsolete*\",\n \"Apocalypse of Ezra\",\n \"5 Ezra (Latin Prologue)\",\n \"6 Ezra (Latin Epilogue)\",\n \"Introduction\",\n \"Concordance \",\n \"Glossary \",\n \"Topical Index\",\n \"Names Index\",\n \"Daniel Greek\",\n \"Psalms 152-155\",\n \"2 Baruch (Apocalypse)\",\n \"Letter of Baruch\",\n \"Jubilees\",\n \"Enoch\",\n \"1 Meqabyan\",\n \"2 Meqabyan\",\n \"3 Meqabyan\",\n \"Reproof (Proverbs 25-31)\",\n \"4 Baruch (Rest of Baruch)\",\n \"Laodiceans\"\n], S = K();\nfunction g(t, e = !0) {\n return e && (t = t.toUpperCase()), t in S ? S[t] : 0;\n}\nfunction k(t) {\n return g(t) > 0;\n}\nfunction x(t) {\n const e = typeof t == \"string\" ? g(t) : t;\n return e >= 40 && e <= 66;\n}\nfunction T(t) {\n return (typeof t == \"string\" ? g(t) : t) <= 39;\n}\nfunction X(t) {\n return t <= 66;\n}\nfunction V(t) {\n const e = typeof t == \"string\" ? g(t) : t;\n return w(e) && !X(e);\n}\nfunction* L() {\n for (let t = 1; t <= N.length; t++) yield t;\n}\nconst G = 1, A = N.length;\nfunction H() {\n return [\"XXA\", \"XXB\", \"XXC\", \"XXD\", \"XXE\", \"XXF\", \"XXG\"];\n}\nfunction C(t, e = \"***\") {\n const s = t - 1;\n return s < 0 || s >= N.length ? e : N[s];\n}\nfunction I(t) {\n return t <= 0 || t > A ? \"******\" : O[t - 1];\n}\nfunction y(t) {\n return I(g(t));\n}\nfunction w(t) {\n const e = typeof t == \"number\" ? C(t) : t;\n return k(e) && !B.includes(e);\n}\nfunction q(t) {\n const e = typeof t == \"number\" ? C(t) : t;\n return k(e) && B.includes(e);\n}\nfunction U(t) {\n return O[t - 1].includes(\"*obsolete*\");\n}\nfunction K() {\n const t = {};\n for (let e = 0; e < N.length; e++)\n t[N[e]] = e + 1;\n return t;\n}\nconst m = {\n allBookIds: N,\n nonCanonicalIds: B,\n bookIdToNumber: g,\n isBookIdValid: k,\n isBookNT: x,\n isBookOT: T,\n isBookOTNT: X,\n isBookDC: V,\n allBookNumbers: L,\n firstBook: G,\n lastBook: A,\n extraBooks: H,\n bookNumberToId: C,\n bookNumberToEnglishName: I,\n bookIdToEnglishName: y,\n isCanonical: w,\n isExtraMaterial: q,\n isObsolete: U\n};\nvar l = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = \"Unknown\", t[t.Original = 1] = \"Original\", t[t.Septuagint = 2] = \"Septuagint\", t[t.Vulgate = 3] = \"Vulgate\", t[t.English = 4] = \"English\", t[t.RussianProtestant = 5] = \"RussianProtestant\", t[t.RussianOrthodox = 6] = \"RussianOrthodox\", t))(l || {});\nconst h = class h {\n // private versInfo: Versification;\n constructor(e) {\n n(this, \"name\");\n n(this, \"fullPath\");\n n(this, \"isPresent\");\n n(this, \"hasVerseSegments\");\n n(this, \"isCustomized\");\n n(this, \"baseVersification\");\n n(this, \"scriptureBooks\");\n n(this, \"_type\");\n if (e == null)\n throw new Error(\"Argument undefined\");\n typeof e == \"string\" ? (this.name = e, this._type = l[e]) : (this._type = e, this.name = l[e]);\n }\n get type() {\n return this._type;\n }\n equals(e) {\n return !e.type || !this.type ? !1 : e.type === this.type;\n }\n};\nn(h, \"Original\", new h(l.Original)), n(h, \"Septuagint\", new h(l.Septuagint)), n(h, \"Vulgate\", new h(l.Vulgate)), n(h, \"English\", new h(l.English)), n(h, \"RussianProtestant\", new h(l.RussianProtestant)), n(h, \"RussianOrthodox\", new h(l.RussianOrthodox));\nlet c = h;\nfunction E(t, e) {\n const s = e[0];\n for (let r = 1; r < e.length; r++)\n t = t.split(e[r]).join(s);\n return t.split(s);\n}\nvar D = /* @__PURE__ */ ((t) => (t[t.Valid = 0] = \"Valid\", t[t.UnknownVersification = 1] = \"UnknownVersification\", t[t.OutOfRange = 2] = \"OutOfRange\", t[t.VerseOutOfOrder = 3] = \"VerseOutOfOrder\", t[t.VerseRepeated = 4] = \"VerseRepeated\", t))(D || {});\nconst i = class i {\n constructor(e, s, r, a) {\n /** Not yet implemented. */\n n(this, \"firstChapter\");\n /** Not yet implemented. */\n n(this, \"lastChapter\");\n /** Not yet implemented. */\n n(this, \"lastVerse\");\n /** Not yet implemented. */\n n(this, \"hasSegmentsDefined\");\n /** Not yet implemented. */\n n(this, \"text\");\n /** Not yet implemented. */\n n(this, \"BBBCCCVVVS\");\n /** Not yet implemented. */\n n(this, \"longHashCode\");\n /** The versification of the reference. */\n n(this, \"versification\");\n n(this, \"rtlMark\", \"‏\");\n n(this, \"_bookNum\", 0);\n n(this, \"_chapterNum\", 0);\n n(this, \"_verseNum\", 0);\n n(this, \"_verse\");\n if (r == null && a == null)\n if (e != null && typeof e == \"string\") {\n const o = e, u = s != null && s instanceof c ? s : void 0;\n this.setEmpty(u), this.parse(o);\n } else if (e != null && typeof e == \"number\") {\n const o = s != null && s instanceof c ? s : void 0;\n this.setEmpty(o), this._verseNum = e % i.chapterDigitShifter, this._chapterNum = Math.floor(\n e % i.bookDigitShifter / i.chapterDigitShifter\n ), this._bookNum = Math.floor(e / i.bookDigitShifter);\n } else if (s == null)\n if (e != null && e instanceof i) {\n const o = e;\n this._bookNum = o.bookNum, this._chapterNum = o.chapterNum, this._verseNum = o.verseNum, this._verse = o.verse, this.versification = o.versification;\n } else {\n if (e == null) return;\n const o = e instanceof c ? e : i.defaultVersification;\n this.setEmpty(o);\n }\n else\n throw new Error(\"VerseRef constructor not supported.\");\n else if (e != null && s != null && r != null)\n if (typeof e == \"string\" && typeof s == \"string\" && typeof r == \"string\")\n this.setEmpty(a), this.updateInternal(e, s, r);\n else if (typeof e == \"number\" && typeof s == \"number\" && typeof r == \"number\")\n this._bookNum = e, this._chapterNum = s, this._verseNum = r, this.versification = a ?? i.defaultVersification;\n else\n throw new Error(\"VerseRef constructor not supported.\");\n else\n throw new Error(\"VerseRef constructor not supported.\");\n }\n /**\n * Determines if the verse string is in a valid format (does not consider versification).\n */\n static isVerseParseable(e) {\n return e.length > 0 && \"0123456789\".includes(e[0]) && !e.endsWith(this.verseRangeSeparator) && !e.endsWith(this.verseSequenceIndicator);\n }\n /**\n * Tries to parse the specified string into a verse reference.\n * @param str - The string to attempt to parse.\n * @returns success: `true` if the specified string was successfully parsed, `false` otherwise.\n * @returns verseRef: The result of the parse if successful, or empty VerseRef if it failed\n */\n static tryParse(e) {\n let s;\n try {\n return s = new i(e), { success: !0, verseRef: s };\n } catch (r) {\n if (r instanceof v)\n return s = new i(), { success: !1, verseRef: s };\n throw r;\n }\n }\n /**\n * Gets the reference as a comparable integer where the book, chapter, and verse each occupy 3\n * digits.\n * @param bookNum - Book number (this is 1-based, not an index).\n * @param chapterNum - Chapter number.\n * @param verseNum - Verse number.\n * @returns The reference as a comparable integer where the book, chapter, and verse each occupy 3\n * digits.\n */\n static getBBBCCCVVV(e, s, r) {\n return e % i.bcvMaxValue * i.bookDigitShifter + (s >= 0 ? s % i.bcvMaxValue * i.chapterDigitShifter : 0) + (r >= 0 ? r % i.bcvMaxValue : 0);\n }\n /**\n * Deserializes a serialized VerseRef.\n * @param serializedVerseRef - Serialized VerseRef to create from.\n * @returns the deserialized VerseRef.\n */\n static fromJSON(e) {\n const { book: s, chapterNum: r, verseNum: a, verse: o, versificationStr: u } = e, f = o || a.toString();\n let d;\n return u && (d = new c(u)), s ? new i(s, r.toString(), f, d) : new i();\n }\n /**\n * Parses a verse string and gets the leading numeric portion as a number.\n * @param verseStr - verse string to parse\n * @returns true if the entire string could be parsed as a single, simple verse number (1-999);\n * false if the verse string represented a verse bridge, contained segment letters, or was invalid\n */\n static tryGetVerseNum(e) {\n let s;\n if (!e)\n return s = -1, { success: !0, vNum: s };\n s = 0;\n let r;\n for (let a = 0; a < e.length; a++) {\n if (r = e[a], r < \"0\" || r > \"9\")\n return a === 0 && (s = -1), { success: !1, vNum: s };\n if (s = s * 10 + +r - 0, s > i.bcvMaxValue)\n return s = -1, { success: !1, vNum: s };\n }\n return { success: !0, vNum: s };\n }\n /**\n * Checks to see if a VerseRef hasn't been set - all values are the default.\n */\n get isDefault() {\n return this.bookNum === 0 && this.chapterNum === 0 && this.verseNum === 0 && this.versification == null;\n }\n /**\n * Gets whether the verse contains multiple verses.\n */\n get hasMultiple() {\n return this._verse != null && (this._verse.includes(i.verseRangeSeparator) || this._verse.includes(i.verseSequenceIndicator));\n }\n /**\n * Gets or sets the book of the reference. Book is the 3-letter abbreviation in capital letters,\n * e.g. `'MAT'`.\n */\n get book() {\n return m.bookNumberToId(this.bookNum, \"\");\n }\n set book(e) {\n this.bookNum = m.bookIdToNumber(e);\n }\n /**\n * Gets or sets the chapter of the reference,. e.g. `'3'`.\n */\n get chapter() {\n return this.isDefault || this._chapterNum < 0 ? \"\" : this._chapterNum.toString();\n }\n set chapter(e) {\n const s = +e;\n this._chapterNum = Number.isInteger(s) ? s : -1;\n }\n /**\n * Gets or sets the verse of the reference, including range, segments, and sequences, e.g. `'4'`,\n * or `'4b-5a, 7'`.\n */\n get verse() {\n return this._verse != null ? this._verse : this.isDefault || this._verseNum < 0 ? \"\" : this._verseNum.toString();\n }\n set verse(e) {\n const { success: s, vNum: r } = i.tryGetVerseNum(e);\n this._verse = s ? void 0 : e.replace(this.rtlMark, \"\"), this._verseNum = r, !(this._verseNum >= 0) && ({ vNum: this._verseNum } = i.tryGetVerseNum(this._verse));\n }\n /**\n * Get or set Book based on book number, e.g. `42`.\n */\n get bookNum() {\n return this._bookNum;\n }\n set bookNum(e) {\n if (e <= 0 || e > m.lastBook)\n throw new v(\n \"BookNum must be greater than zero and less than or equal to last book\"\n );\n this._bookNum = e;\n }\n /**\n * Gets or sets the chapter number, e.g. `3`. `-1` if not valid.\n */\n get chapterNum() {\n return this._chapterNum;\n }\n set chapterNum(e) {\n this.chapterNum = e;\n }\n /**\n * Gets or sets verse start number, e.g. `4`. `-1` if not valid.\n */\n get verseNum() {\n return this._verseNum;\n }\n set verseNum(e) {\n this._verseNum = e;\n }\n /**\n * String representing the versification (should ONLY be used for serialization/deserialization).\n *\n * @remarks This is for backwards compatibility when ScrVers was an enumeration.\n */\n get versificationStr() {\n var e;\n return (e = this.versification) == null ? void 0 : e.name;\n }\n set versificationStr(e) {\n this.versification = this.versification != null ? new c(e) : void 0;\n }\n /**\n * Determines if the reference is valid.\n */\n get valid() {\n return this.validStatus === 0;\n }\n /**\n * Get the valid status for this reference.\n */\n get validStatus() {\n return this.validateVerse(i.verseRangeSeparators, i.verseSequenceIndicators);\n }\n /**\n * Gets the reference as a comparable integer where the book,\n * chapter, and verse each occupy three digits and the verse is 0.\n */\n get BBBCCC() {\n return i.getBBBCCCVVV(this._bookNum, this._chapterNum, 0);\n }\n /**\n * Gets the reference as a comparable integer where the book,\n * chapter, and verse each occupy three digits. If verse is not null\n * (i.e., this reference represents a complex reference with verse\n * segments or bridge) this cannot be used for an exact comparison.\n */\n get BBBCCCVVV() {\n return i.getBBBCCCVVV(this._bookNum, this._chapterNum, this._verseNum);\n }\n /**\n * Gets whether the verse is defined as an excluded verse in the versification.\n * Does not handle verse ranges.\n */\n // eslint-disable-next-line @typescript-eslint/class-literal-property-style\n get isExcluded() {\n return !1;\n }\n /**\n * Parses the reference in the specified string.\n * Optionally versification can follow reference as in GEN 3:11/4\n * Throw an exception if\n * - invalid book name\n * - chapter number is missing or not a number\n * - verse number is missing or does not start with a number\n * - versification is invalid\n * @param verseStr - string to parse e.g. 'MAT 3:11'\n */\n parse(e) {\n if (e = e.replace(this.rtlMark, \"\"), e.includes(\"/\")) {\n const o = e.split(\"/\");\n if (e = o[0], o.length > 1)\n try {\n const u = +o[1].trim();\n this.versification = new c(l[u]);\n } catch {\n throw new v(\"Invalid reference : \" + e);\n }\n }\n const s = e.trim().split(\" \");\n if (s.length !== 2)\n throw new v(\"Invalid reference : \" + e);\n const r = s[1].split(\":\"), a = +r[0];\n if (r.length !== 2 || m.bookIdToNumber(s[0]) === 0 || !Number.isInteger(a) || a < 0 || !i.isVerseParseable(r[1]))\n throw new v(\"Invalid reference : \" + e);\n this.updateInternal(s[0], r[0], r[1]);\n }\n /**\n * Simplifies this verse ref so that it has no bridging of verses or\n * verse segments like `'1a'`.\n */\n simplify() {\n this._verse = void 0;\n }\n /**\n * Makes a clone of the reference.\n *\n * @returns The cloned VerseRef.\n */\n clone() {\n return new i(this);\n }\n toString() {\n const e = this.book;\n return e === \"\" ? \"\" : `${e} ${this.chapter}:${this.verse}`;\n }\n toJSON() {\n let e = this.verse;\n (e === \"\" || e === this.verseNum.toString()) && (e = void 0);\n const s = {\n book: this.book,\n chapterNum: this.chapterNum,\n verseNum: this.verseNum,\n verse: e,\n versificationStr: this.versificationStr\n };\n return e || delete s.verse, s;\n }\n /**\n * Compares this `VerseRef` with supplied one.\n * @param verseRef - object to compare this one to.\n * @returns `true` if this `VerseRef` is equal to the supplied one, `false` otherwise.\n */\n equals(e) {\n return e instanceof i ? e._bookNum === this._bookNum && e._chapterNum === this._chapterNum && e._verseNum === this._verseNum && e.verse === this.verse && (e.versification == null && this.versification == null || e.versification != null && this.versification != null && e.versification.equals(this.versification)) : !1;\n }\n /**\n * Enumerate all individual verses contained in a VerseRef.\n * Verse ranges are indicated by \"-\" and consecutive verses by \",\"s.\n * Examples:\n * GEN 1:2 returns GEN 1:2\n * GEN 1:1a-3b,5 returns GEN 1:1a, GEN 1:2, GEN 1:3b, GEN 1:5\n * GEN 1:2a-2c returns //! ??????\n *\n * @param specifiedVersesOnly - if set to true return only verses that are\n * explicitly specified only, not verses within a range. Defaults to `false`.\n * @param verseRangeSeparators - Verse range separators.\n * Defaults to `VerseRef.verseRangeSeparators`.\n * @param verseSequenceSeparators - Verse sequence separators.\n * Defaults to `VerseRef.verseSequenceIndicators`.\n * @returns An array of all single verse references in this VerseRef.\n */\n allVerses(e = !1, s = i.verseRangeSeparators, r = i.verseSequenceIndicators) {\n if (this._verse == null || this.chapterNum <= 0)\n return [this.clone()];\n const a = [], o = E(this._verse, r);\n for (const u of o.map((f) => E(f, s))) {\n const f = this.clone();\n f.verse = u[0];\n const d = f.verseNum;\n if (a.push(f), u.length > 1) {\n const b = this.clone();\n if (b.verse = u[1], !e)\n for (let p = d + 1; p < b.verseNum; p++) {\n const J = new i(\n this._bookNum,\n this._chapterNum,\n p,\n this.versification\n );\n this.isExcluded || a.push(J);\n }\n a.push(b);\n }\n }\n return a;\n }\n /**\n * Validates a verse number using the supplied separators rather than the defaults.\n */\n validateVerse(e, s) {\n if (!this.verse)\n return this.internalValid;\n let r = 0;\n for (const a of this.allVerses(!0, e, s)) {\n const o = a.internalValid;\n if (o !== 0)\n return o;\n const u = a.BBBCCCVVV;\n if (r > u)\n return 3;\n if (r === u)\n return 4;\n r = u;\n }\n return 0;\n }\n /**\n * Gets whether a single verse reference is valid.\n */\n get internalValid() {\n return this.versification == null ? 1 : this._bookNum <= 0 || this._bookNum > m.lastBook ? 2 : (m.isCanonical(this._bookNum), 0);\n }\n setEmpty(e = i.defaultVersification) {\n this._bookNum = 0, this._chapterNum = -1, this._verse = void 0, this.versification = e;\n }\n updateInternal(e, s, r) {\n this.bookNum = m.bookIdToNumber(e), this.chapter = s, this.verse = r;\n }\n};\nn(i, \"defaultVersification\", c.English), n(i, \"verseRangeSeparator\", \"-\"), n(i, \"verseSequenceIndicator\", \",\"), n(i, \"verseRangeSeparators\", [i.verseRangeSeparator]), n(i, \"verseSequenceIndicators\", [i.verseSequenceIndicator]), n(i, \"chapterDigitShifter\", 1e3), n(i, \"bookDigitShifter\", i.chapterDigitShifter * i.chapterDigitShifter), n(i, \"bcvMaxValue\", i.chapterDigitShifter - 1), /**\n * The valid status of the VerseRef.\n */\nn(i, \"ValidStatusType\", D);\nlet M = i;\nclass v extends Error {\n}\nexport {\n _ as BookSet,\n m as Canon,\n c as ScrVers,\n l as ScrVersType,\n M as VerseRef,\n v as VerseRefException\n};\n//# sourceMappingURL=index.es.js.map\n","import React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\n\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nexport type DropdownMenuSubTriggerProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.SubTrigger\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuSubContentProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.SubContent\n> & {\n className?: string;\n};\n\nexport type DropdownMenuContentProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Content\n> & {\n className?: string;\n sideOffset?: number;\n};\n\nexport type DropdownMenuItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Item\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.CheckboxItem\n> & {\n className?: string;\n checked?: boolean;\n};\n\nexport type DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.RadioItem\n> & {\n className?: string;\n};\n\nexport type DropdownMenuLabelProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Label\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Separator\n> & {\n className?: string;\n};\n\nexport type DropdownMenuShortcutProps = React.HTMLAttributes & {\n className?: string;\n};\n\nexport const DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef,\n DropdownMenuSubTriggerProps\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nexport const DropdownMenuSubContent = React.forwardRef<\n React.ElementRef,\n DropdownMenuSubContentProps\n>(({ className, ...props }, ref) => (\n \n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nexport const DropdownMenuContent = React.forwardRef<\n React.ElementRef,\n DropdownMenuContentProps\n>(({ className, sideOffset = 4, ...props }, ref) => (\n \n \n \n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/**\n * TODO: fix: direction is not automatically handled by this component, so that shortcuts are\n * display always to the right\n */\nexport const DropdownMenuItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuItemProps\n>(({ className, inset, ...props }, ref) => (\n \n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nexport const DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nexport const DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nexport const DropdownMenuLabel = React.forwardRef<\n React.ElementRef,\n DropdownMenuLabelProps\n>(({ className, inset, ...props }, ref) => (\n \n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ElementRef,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n \n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nexport function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return (\n \n );\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n","import { Canon } from '@sillsdev/scripture';\nimport { PropsWithChildren, KeyboardEvent, forwardRef } from 'react';\nimport { DropdownMenuItem as ShadDropdownMenuItem } from '@/components/shadcn-ui/dropdown-menu';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport type BookType = 'OT' | 'NT' | 'DC';\n\ntype BookMenuItemProps = PropsWithChildren<{\n /** String id of book */\n bookId: string;\n /** Callback to run when a book menu item is selected */\n handleSelectBook: () => void;\n /** Indicates if this menu item is currently selected */\n isSelected: boolean;\n /** Function that is called upon highlighting a book in the dropdown menu */\n handleHighlightBook: () => void;\n /**\n * Function that is called on pressing a key\n *\n * @param event Event that contains information about the key stroke\n */\n handleKeyDown: (event: KeyboardEvent) => void;\n /**\n * Type of book associated with this menu item, coordinates color labels ? Mock up has the labels\n * coordinated to genre\n */\n bookType: BookType;\n}>;\n\nconst BookMenuItem = forwardRef(\n (\n {\n bookId,\n handleSelectBook,\n isSelected,\n handleHighlightBook,\n handleKeyDown,\n bookType,\n children,\n }: BookMenuItemProps,\n ref,\n ) => {\n return (\n {\n // preventDefault() here prevents the entire dropdown menu from closing when selecting this item\n event.preventDefault();\n handleSelectBook();\n }}\n onKeyDown={(event: KeyboardEvent) => {\n handleKeyDown(event);\n }}\n onFocus={handleHighlightBook}\n onMouseMove={handleHighlightBook}\n >\n \n {Canon.bookIdToEnglishName(bookId)}\n \n {isSelected &&
{children}
}\n \n );\n },\n);\n\nexport default BookMenuItem;\n","import { cn } from '@/utils/shadcn-ui.util';\nimport { useCallback } from 'react';\n\nexport type ChapterSelectProps = {\n /**\n * Callback to run when a chapter div is selected\n *\n * @param chapterNumber Number of the chapter that has been selected\n */\n handleSelectChapter: (chapterNumber: number) => void;\n /** The highest chapter number in the book (of course equal to number of chapters in the book) */\n endChapter: number;\n /** The chapter number that is currently selected */\n activeChapter: number;\n /** The chapter number that is currently highlighted using keyboard or mouse navigation */\n highlightedChapter: number;\n /**\n * Callback to run when a chapter is highlighted by the user\n *\n * @param chapterNumber The chapter that is highlighted\n */\n handleHighlightedChapter: (chapterNumber: number) => void;\n};\n\nfunction ChapterSelect({\n handleSelectChapter,\n endChapter,\n activeChapter,\n highlightedChapter,\n handleHighlightedChapter,\n}: ChapterSelectProps) {\n const chapters = Array.from({ length: endChapter }, (_, i) => i + 1);\n\n const handleMouse = useCallback(\n (chapterNumber: number) => {\n handleHighlightedChapter(chapterNumber);\n },\n [handleHighlightedChapter],\n );\n\n return (\n
\n {chapters.map((chapter) => (\n {\n event.preventDefault();\n event.stopPropagation();\n handleSelectChapter(chapter);\n }}\n role=\"button\"\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n handleSelectChapter(chapter);\n }\n }}\n tabIndex={0}\n onMouseMove={() => handleMouse(chapter)}\n >\n {chapter}\n
\n ))}\n
\n );\n}\n\nexport default ChapterSelect;\n","import { DropdownMenuLabel as ShadDropdownMenuLabel } from '@/components/shadcn-ui/dropdown-menu';\nimport { Bookmark, Clock, ArrowDownWideNarrow } from 'lucide-react';\n\nexport type GoToMenuItemProps = {\n handleSort: () => void;\n handleLocationHistory: () => void;\n handleBookmarks: () => void;\n};\n\nfunction GoToMenuItem({ handleSort, handleLocationHistory, handleBookmarks }: GoToMenuItemProps) {\n return (\n \n

Go To

\n
\n \n \n \n
\n
\n );\n}\n\nexport default GoToMenuItem;\n","import BookChapterInput from '@/components/advanced/book-chapter-control/book-chapter-input.component';\nimport BookMenuItem, {\n BookType,\n} from '@/components/advanced/book-chapter-control/book-menu-item.component';\nimport ChapterSelect from '@/components/advanced/book-chapter-control/chapter-select.component';\nimport GoToMenuItem from '@/components/advanced/book-chapter-control/go-to-menu-item.component';\nimport {\n DropdownMenu as ShadDropdownMenu,\n DropdownMenuContent as ShadDropdownMenuContent,\n DropdownMenuLabel as ShadDropdownMenuLabel,\n DropdownMenuSeparator as ShadDropdownMenuSeparator,\n DropdownMenuTrigger as ShadDropdownMenuTrigger,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport { Canon } from '@sillsdev/scripture';\nimport { ScriptureReference, getChaptersForBook } from 'platform-bible-utils';\nimport {\n KeyboardEvent as ReactKeyboardEvent,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\ntype BookTypeLabels = {\n [bookType in BookType]: string;\n};\ntype BookChapterControlProps = {\n scrRef: ScriptureReference;\n handleSubmit: (scrRef: ScriptureReference) => void;\n};\n\nconst ALL_BOOK_IDS = Canon.allBookIds;\nconst BOOK_TYPE_LABELS: BookTypeLabels = {\n OT: 'Old Testament',\n NT: 'New Testament',\n DC: 'Deuterocanon',\n};\nconst BOOK_TYPE_ARRAY: BookType[] = ['OT', 'NT', 'DC'];\n// This is the height of three menu items to offset scrolling to the selected menu item\n// If you use menuItemRef.clientHeight- includes height of chapter div which is too big\nconst SCROLL_OFFSET = 32 + 32 + 32;\nconst SEARCH_QUERY_FORMATS = [\n /^(\\w+)$/i, // Matches a single word (book name or id)\n /^(\\w+)(?:\\s(\\d+))$/i, // Matches a word followed by a chapter number\n /^(\\w+)(?:\\s(\\d+):(\\d+))$/i, // Matches a word followed by a chapter and verse number\n];\nconst fetchGroupedBooks = (bookType: BookType) => {\n const groupedBooks = {\n OT: ALL_BOOK_IDS.filter((bookId) => Canon.isBookOT(bookId)),\n NT: ALL_BOOK_IDS.filter((bookId) => Canon.isBookNT(bookId)),\n DC: ALL_BOOK_IDS.filter((bookId) => Canon.isBookDC(bookId)),\n };\n return groupedBooks[bookType];\n};\nconst fetchEndChapter = (bookId: string) => {\n // getChaptersForBook returns -1 if not found in scrBookData\n // scrBookData only includes OT and NT, so all DC will return -1\n return getChaptersForBook(Canon.bookIdToNumber(bookId));\n};\n\n/**\n * Gets all of the English names from book ids\n *\n * @returns String[]\n */\nfunction getAllEnglishNames(): string[] {\n const allEnglishNames = ALL_BOOK_IDS.map((bookId) => {\n return Canon.bookIdToEnglishName(bookId);\n });\n return allEnglishNames;\n}\n\n/**\n * Determines if bookName is in allEnglishNames\n *\n * @param bookName Book English name\n * @returns True if bookName is included, false otherwise\n */\nfunction isValidBookEnglishName(bookName: string): boolean {\n return getAllEnglishNames().includes(bookName);\n}\n\n/**\n * Gets a bookId from given English name\n *\n * @param bookName Book English name\n * @returns BookId of provided bookName, undefined otherwise\n */\nfunction getBookIdFromEnglishName(bookName: string): string | undefined {\n // Convert bookName to lowercase and then capitalize the first letter\n const formattedBookName = bookName.toLowerCase().replace(/^\\w/, (c) => c.toUpperCase());\n\n if (isValidBookEnglishName(formattedBookName)) {\n const matchingBookId = ALL_BOOK_IDS.find((bookId) => {\n return Canon.bookIdToEnglishName(bookId) === formattedBookName;\n });\n return matchingBookId;\n }\n\n return undefined;\n}\n\nfunction BookChapterControl({ scrRef, handleSubmit }: BookChapterControlProps) {\n const [searchQuery, setSearchQuery] = useState('');\n const [selectedBookId, setSelectedBookId] = useState(\n Canon.bookNumberToId(scrRef.bookNum),\n );\n const [highlightedChapter, setHighlightedChapter] = useState(scrRef.chapterNum ?? 0);\n const [highlightedBookId, setHighlightedBookId] = useState(\n Canon.bookNumberToId(scrRef.bookNum),\n );\n const [isContentOpen, setIsContentOpen] = useState(false);\n const [isContentOpenDelayed, setIsContentOpenDelayed] = useState(isContentOpen);\n\n // This ref will always be defined\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const inputRef = useRef(undefined!);\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const contentRef = useRef(undefined!);\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const menuItemRef = useRef(undefined!);\n\n const fetchFilteredBooks = useCallback(\n (bookType: BookType) => {\n return fetchGroupedBooks(bookType).filter((bookId: string) => {\n const englishNameLowerCase = Canon.bookIdToEnglishName(bookId).toLowerCase();\n const normalizedQuery = searchQuery.replace(/[^a-zA-Z]/g, '').toLowerCase();\n return (\n englishNameLowerCase.includes(normalizedQuery) || // Match book name\n bookId.toLowerCase().includes(normalizedQuery) // Match book ID\n );\n });\n },\n [searchQuery],\n );\n\n const handleSearchInput = (searchString: string) => {\n setSearchQuery(searchString);\n };\n\n /**\n * Whether to prevent radix's logic from closing the dropdown. This is important because radix\n * tries to close the dropdown when the input first focuses, and we don't want it to do that. But\n * we don't want to prevent the dropdown from closing when we click away from the input, so we\n * don't want to just keep it open if the input is focused\n */\n const shouldPreventAutoClosing = useRef(false);\n\n const controlMenuState = useCallback((open: boolean) => {\n if (shouldPreventAutoClosing.current) {\n shouldPreventAutoClosing.current = false;\n return;\n }\n setIsContentOpen(open);\n }, []);\n\n const updateReference = useCallback(\n (bookId: string, shouldClose: boolean, chapter?: number, verse?: number) => {\n setHighlightedChapter(\n Canon.bookNumberToId(scrRef.bookNum) !== bookId ? 1 : scrRef.chapterNum,\n );\n\n if (shouldClose || fetchEndChapter(bookId) === -1) {\n handleSubmit({\n bookNum: Canon.bookIdToNumber(bookId),\n chapterNum: chapter || 1,\n verseNum: verse || 1,\n });\n\n setIsContentOpen(false);\n setSearchQuery('');\n return;\n }\n\n setSelectedBookId(selectedBookId !== bookId ? bookId : '');\n setIsContentOpen(!shouldClose);\n },\n [handleSubmit, scrRef.bookNum, scrRef.chapterNum, selectedBookId],\n );\n\n const handleSelectChapter = (chapterNumber: number) => {\n if (chapterNumber <= 0 || chapterNumber > fetchEndChapter(selectedBookId)) {\n return;\n }\n updateReference(selectedBookId, true, chapterNumber);\n };\n\n const handleInputSubmit = useCallback(() => {\n SEARCH_QUERY_FORMATS.forEach((format) => {\n const matches = searchQuery.match(format);\n if (matches) {\n // Book should be a bookId or an english name\n const [book, chapter = undefined, verse = undefined] = matches.slice(1);\n const englishName = getBookIdFromEnglishName(book);\n\n if (Canon.isBookIdValid(book) || englishName) {\n updateReference(\n englishName ?? book,\n true,\n chapter ? parseInt(chapter, 10) : 1,\n verse ? parseInt(verse, 10) : 1,\n );\n }\n }\n });\n }, [updateReference, searchQuery]);\n\n const handleKeyDownInput = useCallback(\n (event: ReactKeyboardEvent) => {\n if (!isContentOpen) {\n setIsContentOpen(true);\n } else if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n if (\n typeof menuItemRef !== 'undefined' &&\n // Ref uses null\n // eslint-disable-next-line no-null/no-null\n menuItemRef.current !== null\n ) {\n menuItemRef.current.focus();\n } else if (\n typeof contentRef !== 'undefined' &&\n // Ref uses null\n // eslint-disable-next-line no-null/no-null\n contentRef.current !== null\n ) {\n contentRef.current.focus();\n }\n event.preventDefault();\n }\n },\n [isContentOpen],\n );\n\n const handleKeyDownContent = (event: ReactKeyboardEvent) => {\n // When the dropdown menu has focus, key strokes should give focus to the input component,\n // unless they're navigation keys (arrows and enter)\n const { key } = event;\n if (\n key === 'ArrowRight' ||\n key === 'ArrowLeft' ||\n key === 'ArrowDown' ||\n key === 'ArrowUp' ||\n key === 'Enter'\n ) {\n return;\n }\n\n inputRef.current.dispatchEvent(new KeyboardEvent('keydown', { key }));\n inputRef.current.focus();\n };\n\n const handleKeyDownMenuItem = (event: ReactKeyboardEvent) => {\n const { key } = event;\n if (highlightedBookId === selectedBookId) {\n if (key === 'Enter') {\n event.preventDefault();\n updateReference(selectedBookId, true, highlightedChapter);\n return;\n }\n\n let chapterOffSet = 0;\n if (key === 'ArrowRight') {\n if (highlightedChapter < fetchEndChapter(highlightedBookId)) {\n chapterOffSet = 1;\n } else {\n event.preventDefault();\n return;\n }\n } else if (key === 'ArrowLeft') {\n if (highlightedChapter > 1) {\n chapterOffSet = -1;\n } else {\n event.preventDefault();\n return;\n }\n } else if (key === 'ArrowDown') {\n chapterOffSet = 6;\n } else if (key === 'ArrowUp') {\n chapterOffSet = -6;\n }\n if (\n highlightedChapter + chapterOffSet <= 0 ||\n highlightedChapter + chapterOffSet > fetchEndChapter(highlightedBookId)\n ) {\n setHighlightedChapter(0);\n } else if (chapterOffSet !== 0) {\n setHighlightedChapter(highlightedChapter + chapterOffSet);\n event.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n if (selectedBookId === highlightedBookId) {\n if (selectedBookId === Canon.bookNumberToId(scrRef.bookNum)) {\n setHighlightedChapter(scrRef.chapterNum);\n } else {\n setHighlightedChapter(1);\n }\n } else {\n setHighlightedChapter(0);\n }\n }, [highlightedBookId, scrRef.bookNum, scrRef.chapterNum, selectedBookId]);\n\n // The purpose of these useLayoutEffects and timeout is to delay the scroll just\n // enough so that the refs are defined and available when they are used after the timeout\n useLayoutEffect(() => {\n setIsContentOpenDelayed(isContentOpen);\n }, [isContentOpen]);\n\n useLayoutEffect(() => {\n const scrollTimeout = setTimeout(() => {\n if (isContentOpenDelayed && contentRef.current && menuItemRef.current) {\n const menuItemOffsetTop = menuItemRef.current.offsetTop;\n const scrollPosition = menuItemOffsetTop - SCROLL_OFFSET;\n contentRef.current.scrollTo({ top: scrollPosition, behavior: 'instant' });\n }\n }, 10);\n return () => {\n clearTimeout(scrollTimeout);\n };\n }, [isContentOpenDelayed]);\n\n return (\n
\n \n \n {\n setSelectedBookId(Canon.bookNumberToId(scrRef.bookNum));\n setHighlightedBookId(Canon.bookNumberToId(scrRef.bookNum));\n setHighlightedChapter(scrRef.chapterNum > 0 ? scrRef.chapterNum : 0);\n setIsContentOpen(true);\n inputRef.current.focus();\n }}\n onFocus={() => {\n // Radix thinks we want to close because the input is being focused. Prevent that\n shouldPreventAutoClosing.current = true;\n }}\n handleSubmit={handleInputSubmit}\n placeholder={`${Canon.bookNumberToEnglishName(scrRef.bookNum)} ${scrRef.chapterNum}:${scrRef.verseNum}`}\n />\n \n \n console.log('sorting')}\n handleLocationHistory={() => console.log('location history')}\n handleBookmarks={() => console.log('bookmarks')}\n />\n {BOOK_TYPE_ARRAY.map(\n (bookType, bookTypeIndex) =>\n fetchFilteredBooks(bookType).length > 0 && (\n
\n \n {BOOK_TYPE_LABELS[bookType]}\n \n\n {fetchFilteredBooks(bookType).map((bookId) => (\n
\n updateReference(bookId, false)}\n isSelected={selectedBookId === bookId}\n handleHighlightBook={() => setHighlightedBookId(bookId)}\n handleKeyDown={handleKeyDownMenuItem}\n bookType={bookType}\n ref={(element: HTMLDivElement) => {\n if (selectedBookId === bookId) menuItemRef.current = element;\n }}\n >\n {\n setHighlightedChapter(chapterNumber);\n }}\n />\n \n
\n ))}\n {BOOK_TYPE_ARRAY.length - 1 !== bookTypeIndex ? (\n \n ) : undefined}\n
\n ),\n )}\n \n
\n
\n );\n}\n\nexport default BookChapterControl;\n","import React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const buttonVariants = cva(\n 'pr-twp tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50',\n {\n variants: {\n variant: {\n default: 'tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/90',\n destructive: 'tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/90',\n outline:\n 'tw-border tw-border-input tw-bg-background hover:tw-bg-accent hover:tw-text-accent-foreground',\n secondary: 'tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80',\n ghost: 'hover:tw-bg-accent hover:tw-text-accent-foreground',\n link: 'tw-text-primary tw-underline-offset-4 hover:tw-underline',\n },\n size: {\n default: 'tw-h-10 tw-px-4 tw-py-2',\n sm: 'tw-h-9 tw-rounded-md tw-px-3',\n lg: 'tw-h-11 tw-rounded-md tw-px-8',\n icon: 'tw-h-10 tw-w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes,\n VariantProps {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n \n );\n },\n);\nButton.displayName = 'Button';\n","import React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst labelVariants = cva(\n 'tw-text-sm tw-font-medium tw-leading-none peer-disabled:tw-cursor-not-allowed peer-disabled:tw-opacity-70',\n);\n\nexport const Label = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & VariantProps\n>(({ className, ...props }, ref) => (\n \n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n","import React from 'react';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n \n \n \n \n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n","import React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n \n \n \n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent };\n","import React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n {children}\n \n \n Close\n \n \n \n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nfunction DialogHeader({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nDialogHeader.displayName = 'DialogHeader';\n\nfunction DialogFooter({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n","import React from 'react';\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Dialog, DialogContent } from '@/components/shadcn-ui/dialog';\n\nconst Command = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nfunction CommandDialog({ children, ...props }: CommandDialogProps) {\n return (\n \n \n \n {children}\n \n \n \n );\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n
\n \n \n
\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>((props, ref) => (\n \n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nfunction CommandShortcut({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","import { ReactNode, useState } from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/shadcn-ui/popover';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/shadcn-ui/command';\nimport { PopoverProps } from '@radix-ui/react-popover';\n\nexport type ComboBoxLabelOption = { label: string };\nexport type ComboBoxOption = string | number | ComboBoxLabelOption;\n\nexport type ComboBoxProps = {\n /** Optional unique identifier */\n id?: string;\n /** Text label title for combobox */\n /** List of available options for the dropdown menu */\n options?: readonly T[];\n /** Additional css classes to help with unique styling of the combo box */\n className?: string;\n /**\n * The selected value that the combo box currently holds. Must be shallow equal to one of the\n * options entries.\n */\n value?: T;\n /** Triggers when content of textfield is changed */\n onChange?: (newValue: T) => void;\n /** Used to determine the string value for a given option. */\n getOptionLabel?: (option: ComboBoxOption) => string;\n /** Icon to be displayed on the trigger */\n icon?: ReactNode;\n /** Text displayed on button if `value` is undefined */\n buttonPlaceholder?: string;\n /** Placeholder text for text field */\n textPlaceholder?: string;\n /** Text to display when no options match input */\n commandEmptyMessage?: string;\n /** Variant of button */\n buttonVariant?: ButtonProps['variant'];\n /** Control how the popover menu should be aligned. Defaults to start */\n alignDropDown?: 'start' | 'center' | 'end';\n /** Text direction ltr or rtl */\n dir?: Direction;\n /** Optional boolean to set if trigger should be disabled */\n isDisabled?: boolean;\n} & PopoverProps;\n\ntype Direction = 'ltr' | 'rtl';\n\nfunction getOptionLabelDefault(option: ComboBoxOption): string {\n if (typeof option === 'string') {\n return option;\n }\n if (typeof option === 'number') {\n return option.toString();\n }\n return option.label;\n}\n\n/**\n * Autocomplete input and command palette with a list of suggestions.\n *\n * Thanks to Shadcn for heavy inspiration and documentation\n * https://ui.shadcn.com/docs/components/combobox\n */\nfunction ComboBox({\n id,\n options = [],\n className,\n value,\n onChange = () => {},\n getOptionLabel = getOptionLabelDefault,\n icon = undefined,\n buttonPlaceholder = '',\n textPlaceholder = '',\n commandEmptyMessage = 'No option found',\n buttonVariant = 'outline',\n alignDropDown = 'start',\n dir = 'ltr',\n isDisabled = false,\n ...props\n}: ComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n return (\n \n \n \n
\n {icon &&
{icon}
}\n \n {value ? getOptionLabel(value) : buttonPlaceholder}\n \n
\n\n \n \n
\n \n \n \n {commandEmptyMessage}\n \n {options.map((option) => (\n {\n onChange(option);\n setOpen(false);\n }}\n >\n \n {getOptionLabel(option)}\n \n ))}\n \n \n \n
\n );\n}\n\nexport default ComboBox;\n","import { useMemo } from 'react';\nimport ComboBox from '@/components/basics/combo-box.component';\nimport { Label } from '@/components/shadcn-ui/label';\n\nexport type ChapterRangeSelectorProps = {\n startChapter: number;\n endChapter: number;\n handleSelectStartChapter: (chapter: number) => void;\n handleSelectEndChapter: (chapter: number) => void;\n isDisabled?: boolean;\n chapterCount: number;\n};\n\nexport default function ChapterRangeSelector({\n startChapter,\n endChapter,\n handleSelectStartChapter,\n handleSelectEndChapter,\n isDisabled = false,\n chapterCount,\n}: ChapterRangeSelectorProps) {\n const chapterOptions = useMemo(\n () => Array.from({ length: chapterCount }, (_, index) => index + 1),\n [chapterCount],\n );\n\n const onChangeStartChapter = (value: number) => {\n handleSelectStartChapter(value);\n if (value > endChapter) {\n handleSelectEndChapter(value);\n }\n };\n\n const onChangeEndChapter = (value: number) => {\n handleSelectEndChapter(value);\n if (value < startChapter) {\n handleSelectStartChapter(value);\n }\n };\n\n return (\n <>\n \n option.toString()}\n value={startChapter}\n />\n\n \n option.toString()}\n value={endChapter}\n />\n \n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport { Label } from '@/components/shadcn-ui/label';\nimport { RadioGroup, RadioGroupItem } from '@/components/shadcn-ui/radio-group';\nimport { Canon } from '@sillsdev/scripture';\nimport { LocalizedStringValue } from 'platform-bible-utils';\nimport { useState } from 'react';\nimport ChapterRangeSelector, {\n ChapterRangeSelectorProps,\n} from '../basics/chapter-range-selector.component';\n\nexport enum BookSelectionMode {\n CURRENT_BOOK = 'current book',\n CHOOSE_BOOKS = 'choose books',\n}\n\n/**\n * Object containing all keys used for localization in this component. If you're using this\n * component in an extension, you can pass it into the useLocalizedStrings hook to easily obtain the\n * localized strings and pass them into the localizedStrings prop of this component\n */\nexport const BOOK_SELECTOR_STRING_KEYS = Object.freeze([\n '%webView_bookSelector_currentBook%',\n '%webView_bookSelector_choose%',\n '%webView_bookSelector_chooseBooks%',\n] as const);\n\nexport type BookSelectorLocalizedStrings = {\n [localizedInventoryKey in (typeof BOOK_SELECTOR_STRING_KEYS)[number]]?: LocalizedStringValue;\n};\n\n/**\n * Gets the localized value for the provided key\n *\n * @param strings Object containing localized string\n * @param key Key for a localized string\n * @returns The localized value for the provided key, if available. Returns the key if no localized\n * value is available\n */\nconst localizeString = (\n strings: BookSelectorLocalizedStrings,\n key: keyof BookSelectorLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\ntype BookSelectorProps = ChapterRangeSelectorProps & {\n handleBookSelectionModeChange: (newMode: BookSelectionMode) => void;\n currentBookName: string;\n onSelectBooks: () => void;\n selectedBookIds: string[];\n localizedStrings: BookSelectorLocalizedStrings;\n};\n\nexport default function BookSelector({\n handleBookSelectionModeChange,\n currentBookName,\n onSelectBooks,\n selectedBookIds,\n chapterCount,\n endChapter,\n handleSelectEndChapter,\n startChapter,\n handleSelectStartChapter,\n localizedStrings,\n}: BookSelectorProps) {\n const currentBookText = localizeString(localizedStrings, '%webView_bookSelector_currentBook%');\n const chooseText = localizeString(localizedStrings, '%webView_bookSelector_choose%');\n const chooseBooksText = localizeString(localizedStrings, '%webView_bookSelector_chooseBooks%');\n\n const [bookSelectionMode, setBookSelectionMode] = useState(\n BookSelectionMode.CURRENT_BOOK,\n );\n\n const onSelectionModeChange = (newMode: BookSelectionMode) => {\n setBookSelectionMode(newMode);\n handleBookSelectionModeChange(newMode);\n };\n\n return (\n onSelectionModeChange(value as BookSelectionMode)}\n >\n
\n
\n
\n \n \n
\n \n
\n \n
\n
\n
\n
\n \n \n
\n \n onSelectBooks()}\n >\n {chooseText}\n \n
\n
\n \n );\n}\n","import { DropdownMenuTrigger } from '@radix-ui/react-dropdown-menu';\nimport { FilterIcon } from 'lucide-react';\nimport { Table } from '@tanstack/react-table';\n\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n} from '@/components/shadcn-ui/dropdown-menu';\n\ninterface DataTableViewOptionsProps {\n table: Table;\n}\n\nfunction DataTableViewOptions({ table }: DataTableViewOptionsProps) {\n return (\n \n \n \n \n \n Toggle columns\n \n {table\n .getAllColumns()\n .filter((column) => column.getCanHide())\n .map((column) => {\n return (\n column.toggleVisibility(!!value)}\n >\n {column.id}\n \n );\n })}\n \n \n );\n}\n\nexport default DataTableViewOptions;\n","import React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Check, ChevronDown, ChevronUp } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n span]:tw-line-clamp-1',\n className,\n )}\n {...props}\n >\n {children}\n \n \n \n \n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, position = 'popper', ...props }, ref) => (\n \n \n \n \n {children}\n \n \n \n \n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n\n {children}\n \n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n","import { ChevronLeftIcon, ChevronRightIcon, ArrowLeftIcon, ArrowRightIcon } from 'lucide-react';\nimport { Table } from '@tanstack/react-table';\n\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\n\ninterface DataTablePaginationProps {\n table: Table;\n}\n\nfunction DataTablePagination({ table }: DataTablePaginationProps) {\n return (\n
\n
\n
\n {table.getFilteredSelectedRowModel().rows.length} of{' '}\n {table.getFilteredRowModel().rows.length} row(s) selected\n
\n
\n

Rows per page

\n {\n table.setPageSize(Number(value));\n }}\n >\n \n \n \n \n {[10, 20, 30, 40, 50].map((pageSize) => (\n \n {pageSize}\n \n ))}\n \n \n
\n
\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n
\n
\n table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n Go to first page\n \n \n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n Go to previous page\n \n \n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n Go to next page\n \n \n table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n Go to last page\n \n \n
\n
\n
\n );\n}\n\nexport default DataTablePagination;\n","import React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes & { stickyHeader?: boolean }\n>(({ className, stickyHeader, ...props }, ref) => (\n
\n \n
\n));\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes & { stickyHeader?: boolean }\n>(({ className, stickyHeader, ...props }, ref) => (\n \n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n tr]:last:tw-border-b-0', className)}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableCaption.displayName = 'TableCaption';\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n","import { useState } from 'react';\n\nimport {\n ColumnFiltersState,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n SortingState,\n ColumnDef as TSColumnDef,\n Row as TSRow,\n RowSelectionState as TSRowSelectionState,\n SortDirection as TSSortDirection,\n Table as TSTable,\n useReactTable,\n VisibilityState,\n} from '@tanstack/react-table';\n\nimport DataTableViewOptions from '@/components/advanced/data-table/data-table-column-toggle.component';\nimport DataTablePagination from '@/components/advanced/data-table/data-table-pagination.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\n\nexport type ColumnDef = TSColumnDef;\nexport type RowContents = TSRow;\nexport type TableContents = TSTable;\nexport type SortDirection = TSSortDirection;\nexport type RowSelectionState = TSRowSelectionState;\n\ninterface DataTableProps {\n columns: ColumnDef[];\n data: TData[];\n enablePagination?: boolean;\n showPaginationControls?: boolean;\n showColumnVisibilityControls?: boolean;\n stickyHeader?: boolean;\n onRowClickHandler?: (row: RowContents, table: TableContents) => void;\n}\n\n/**\n * Feature-rich table component that infuses our basic shadcn-based Table component with features\n * from TanStack's React Table library\n */\nfunction DataTable({\n columns,\n data,\n enablePagination = false,\n showPaginationControls = false,\n showColumnVisibilityControls = false,\n stickyHeader = false,\n onRowClickHandler = () => {},\n}: DataTableProps) {\n const [sorting, setSorting] = useState([]);\n const [columnFilters, setColumnFilters] = useState([]);\n const [columnVisibility, setColumnVisibility] = useState({});\n const [rowSelection, setRowSelection] = useState({});\n\n const table = useReactTable({\n data,\n columns,\n getCoreRowModel: getCoreRowModel(),\n ...(enablePagination && { getPaginationRowModel: getPaginationRowModel() }),\n onSortingChange: setSorting,\n getSortedRowModel: getSortedRowModel(),\n onColumnFiltersChange: setColumnFilters,\n getFilteredRowModel: getFilteredRowModel(),\n onColumnVisibilityChange: setColumnVisibility,\n onRowSelectionChange: setRowSelection,\n state: {\n sorting,\n columnFilters,\n columnVisibility,\n rowSelection,\n },\n });\n\n return (\n
\n {showColumnVisibilityControls && }\n \n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers.map((header) => {\n return (\n \n {header.isPlaceholder\n ? undefined\n : flexRender(header.column.columnDef.header, header.getContext())}\n \n );\n })}\n \n ))}\n \n \n {table.getRowModel().rows?.length ? (\n table.getRowModel().rows.map((row) => (\n onRowClickHandler(row, table)}\n key={row.id}\n data-state={row.getIsSelected() && 'selected'}\n >\n {row.getVisibleCells().map((cell) => (\n \n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n \n ))}\n \n ))\n ) : (\n \n \n No results.\n \n \n )}\n \n
\n {enablePagination && (\n
\n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n Previous\n \n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n Next\n \n
\n )}\n {enablePagination && showPaginationControls && }\n
\n );\n}\n\nexport default DataTable;\n","import {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport { Canon } from '@sillsdev/scripture';\nimport { deepEqual, LanguageStrings, ScriptureReference } from 'platform-bible-utils';\nimport { useMemo } from 'react';\nimport { InventoryItemOccurrence } from './inventory-utils';\n\n/** Props for the OccurrencesTable component */\ntype OccurrencesTableProps = {\n /** Data that contains scriptures references and snippets of scripture */\n occurrenceData: InventoryItemOccurrence[];\n /** Callback function that is executed when the scripture reference is changed */\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n /**\n * Object with all localized strings that the OccurrencesTable needs to work well across multiple\n * languages\n */\n localizedStrings: LanguageStrings;\n};\n\n/**\n * Table that shows occurrences of specified inventory item(s). The first column shows the related\n * scripture reference. The second column shows the snippet of scripture that contains the specified\n * inventory item\n */\nfunction OccurrencesTable({\n occurrenceData,\n setScriptureReference,\n localizedStrings,\n}: OccurrencesTableProps) {\n const referenceHeaderText =\n localizedStrings['%webView_inventory_occurrences_table_header_reference%'];\n const occurrenceHeaderText =\n localizedStrings['%webView_inventory_occurrences_table_header_occurrence%'];\n\n const occurrences: InventoryItemOccurrence[] = useMemo(() => {\n const uniqueOccurrences: InventoryItemOccurrence[] = [];\n\n occurrenceData.forEach((occurrence) => {\n if (!uniqueOccurrences.some((uniqueOccurrence) => deepEqual(uniqueOccurrence, occurrence))) {\n uniqueOccurrences.push(occurrence);\n }\n });\n\n return uniqueOccurrences;\n }, [occurrenceData]);\n\n return (\n \n \n \n {referenceHeaderText}\n {occurrenceHeaderText}\n \n \n \n {occurrences.length > 0 &&\n occurrences.map((occurrence) => (\n {\n setScriptureReference(occurrence.reference);\n }}\n >\n {`${Canon.bookNumberToEnglishName(occurrence.reference.bookNum)} ${occurrence.reference.chapterNum}:${occurrence.reference.verseNum}`}\n {occurrence.text}\n \n ))}\n \n
\n );\n}\n\nexport default OccurrencesTable;\n","import React from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Checkbox = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport default Checkbox;\n","import { Canon } from '@sillsdev/scripture';\nimport { ScriptureReference } from 'platform-bible-utils';\n\n/* #region Types */\n\n/**\n * Status of items that appear in inventories. 'approved' and 'unapproved' items are defined in the\n * project's `Settings.xml`. All other items are defined as 'unknown'\n */\nexport type Status = 'approved' | 'unapproved' | 'unknown';\n\n/** Occurrence of item in inventory. Primarily used by table that shows occurrences */\nexport type InventoryItemOccurrence = {\n /** Reference to scripture where the item appears */\n reference: ScriptureReference;\n /** Snippet of scripture that contains the occurrence */\n text: string;\n};\n\n/** Data structure that contains all information on an item that is shown in an inventory */\nexport type InventoryTableData = {\n /**\n * The item (e.g. a character in the characters inventory, a marker in the marker inventory) In\n * most cases the array will only have one element. In case of additional items (e.g. the\n * preceding marker in the markers check), the primary item should be stored in the first index.\n * To show additional items in the inventory, make sure to configure the `additionalItemsLabels`\n * prop for the Inventory component\n */\n items: string[];\n /** The number of times this item occurs in the selected scope */\n count: number;\n /** The status of this item (see documentation for `Status` type for more information) */\n status: Status;\n /** Occurrences of this item in the scripture text for the selected scope */\n occurrences: InventoryItemOccurrence[];\n};\n\n/* #endregion */\n\n/* #region Functions */\n\n/**\n * Splits USFM string into shorter line-like segments\n *\n * @param text A single (likely very large) USFM string\n * @returns An array containing the input text, split into shorter segments\n */\nexport const getLinesFromUSFM = (text: string) => {\n // Splits on (CR)LF, CR, \\v, \\c and \\id\n return text.split(/(?:\\r?\\n|\\r)|(?=(?:\\\\(?:v|c|id)))/g);\n};\n\n/**\n * Extracts chapter or verse number from USFM strings that start with a \\c or \\v marker\n *\n * @param text USFM string that is expected to start with \\c or \\v marker\n * @returns Chapter or verse number if one is found. Else returns 0.\n */\nexport const getNumberFromUSFM = (text: string): number | undefined => {\n // Captures all digits that follow \\v or \\c markers followed by whitespace located at the start of a string\n const regex = /^\\\\[vc]\\s+(\\d+)/;\n const match = text.match(regex);\n\n if (match) {\n return +match[1];\n }\n return undefined;\n};\n\n/**\n * Gets book ID from USFM string that starts with the \\id marker, and returns book number for it\n *\n * @param text USFM string that is expected to start with \\id marker\n * @returns Book number corresponding to the \\id marker in the input text. Returns 0 if no marker is\n * found or the marker is not valid\n */\nexport const getBookNumFromId = (text: string): number => {\n // Captures all digits that follow an \\id marker followed by whitespace located at the start of a string\n const match = text.match(/^\\\\id\\s+([A-Za-z]+)/);\n if (match) {\n return Canon.bookIdToNumber(match[1]);\n }\n return 0;\n};\n\n/**\n * Gets the status for an item, typically used in the Inventory component\n *\n * @param item The item for which the status is being requested\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @returns The status for the specified item\n */\nexport const getStatusForItem = (\n item: string,\n approvedItems: string[],\n unapprovedItems: string[],\n): Status => {\n if (unapprovedItems.includes(item)) return 'unapproved';\n if (approvedItems.includes(item)) return 'approved';\n return 'unknown';\n};\n\n/* #endregion */\n","import React from 'react';\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst toggleVariants = cva(\n 'pr-twp tw-inline-flex tw-items-center tw-justify-center tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors hover:tw-bg-muted hover:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=on]:tw-bg-accent data-[state=on]:tw-text-accent-foreground',\n {\n variants: {\n variant: {\n default: 'tw-bg-transparent',\n outline:\n 'tw-border tw-border-input tw-bg-transparent hover:tw-bg-accent hover:tw-text-accent-foreground',\n },\n size: {\n default: 'tw-h-10 tw-px-3',\n sm: 'tw-h-9 tw-px-2.5',\n lg: 'tw-h-11 tw-px-5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst Toggle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & VariantProps\n>(({ className, variant, size, ...props }, ref) => (\n \n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n","import React from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { toggleVariants } from '@/components/shadcn-ui/toggle';\n\nconst ToggleGroupContext = React.createContext>({\n size: 'default',\n variant: 'default',\n});\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, size, children, ...props }, ref) => (\n \n \n {children}\n \n \n));\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n \n {children}\n \n );\n});\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;\n\nexport { ToggleGroup, ToggleGroupItem };\n","import { ColumnDef, SortDirection } from '@/components/advanced/data-table/data-table.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport { ToggleGroup, ToggleGroupItem } from '@/components/shadcn-ui/toggle-group';\nimport {\n ArrowDownIcon,\n ArrowUpDownIcon,\n ArrowUpIcon,\n CircleCheckIcon,\n CircleHelpIcon,\n CircleXIcon,\n} from 'lucide-react';\nimport { ReactNode } from 'react';\nimport { InventoryTableData, Status } from './inventory-utils';\n\n/**\n * Gets an icon that indicates the current sorting direction based on the provided input\n *\n * @param sortDirection Sorting direction. Can be ascending ('asc'), descending ('desc') or false (\n * i.e. not sorted)\n * @returns The appropriate sorting icon for the provided sorting direction\n */\nconst getSortingIcon = (sortDirection: false | SortDirection): ReactNode => {\n if (sortDirection === 'asc') {\n return ;\n }\n if (sortDirection === 'desc') {\n return ;\n }\n return ;\n};\n\n/**\n * Function that creates the item column for inventories\n *\n * @param itemLabel Localized label for the item column (e.g. 'Character', 'Repeated Word', etc.)\n * @returns Column that shows the inventory items. Should be used with the DataTable component\n */\nexport const inventoryItemColumn = (itemLabel: string): ColumnDef => {\n return {\n accessorKey: 'item',\n accessorFn: (row: InventoryTableData) => row.items[0],\n header: ({ column }) => (\n \n ),\n };\n};\n\n/**\n * Function that creates the additional item columns for inventories\n *\n * @param additionalItemLabel Localized label for the additional item column (e.g. 'Preceding\n * Marker')\n * @param additionalItemIndex Index that locates the desired item in the items array of the\n * inventory\n * @returns Column that shows additional inventory items. Should be used with the DataTable\n * component\n */\nexport const inventoryAdditionalItemColumn = (\n additionalItemLabel: string,\n additionalItemIndex: number,\n): ColumnDef => {\n return {\n accessorKey: `item${additionalItemIndex}`,\n accessorFn: (row: InventoryTableData) => row.items[additionalItemIndex],\n header: ({ column }) => (\n \n ),\n };\n};\n\n/**\n * Function that creates the count column for inventories. Should be used with the DataTable\n * component.\n *\n * @param itemLabel Localized label for the count column\n * @returns Column that shows the number of occurrences of the related inventory items\n */\nexport const inventoryCountColumn = (countLabel: string): ColumnDef => {\n return {\n accessorKey: 'count',\n header: ({ column }) => (\n
\n \n
\n ),\n cell: ({ row }) =>
{row.getValue('count')}
,\n };\n};\n\n/**\n * Function that updates project settings when status for item(s) changes\n *\n * @param changedItems Array of items for which the status is being updated\n * @param newStatus The status that the items are being given\n * @param approvedItems Array of currently approved items\n * @param onApprovedItemsChange Callback function that stores the updated list of approved items\n * @param unapprovedItems Array of currently unapproved items\n * @param onUnapprovedItemsChange Callback function that stores the updated list of unapproved items\n */\nconst statusChangeHandler = (\n changedItems: string[],\n newStatus: Status,\n approvedItems: string[],\n onApprovedItemsChange: (items: string[]) => void,\n unapprovedItems: string[],\n onUnapprovedItemsChange: (items: string[]) => void,\n) => {\n let newApprovedItems: string[] = [...approvedItems];\n changedItems.forEach((item) => {\n if (newStatus === 'approved') {\n if (!newApprovedItems.includes(item)) {\n newApprovedItems.push(item);\n }\n } else {\n newApprovedItems = newApprovedItems.filter((validItem) => validItem !== item);\n }\n });\n onApprovedItemsChange(newApprovedItems);\n\n let newUnapprovedItems: string[] = [...unapprovedItems];\n changedItems.forEach((item) => {\n if (newStatus === 'unapproved') {\n if (!newUnapprovedItems.includes(item)) {\n newUnapprovedItems.push(item);\n }\n } else {\n newUnapprovedItems = newUnapprovedItems.filter((unapprovedItem) => unapprovedItem !== item);\n }\n });\n onUnapprovedItemsChange(newUnapprovedItems);\n};\n\n/**\n * Function that creates the status column for inventories. Should be used with the DataTable\n * component.\n *\n * @param statusLabel Localized label for the status column\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param onApprovedItemsChange Callback function that stores the updated list of approved items\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @param onUnapprovedItemsChange Callback function that stores the updated list of unapproved items\n * @returns Column that shows the status buttons for the related inventory item. The button for the\n * current status of the item is selected\n */\nexport const inventoryStatusColumn = (\n statusLabel: string,\n approvedItems: string[],\n onApprovedItemsChange: (items: string[]) => void,\n unapprovedItems: string[],\n onUnapprovedItemsChange: (items: string[]) => void,\n): ColumnDef => {\n return {\n accessorKey: 'status',\n header: ({ column }) => {\n return (\n
\n \n
\n );\n },\n cell: ({ row }) => {\n const status: Status = row.getValue('status');\n const item: string = row.getValue('item');\n return (\n \n \n statusChangeHandler(\n [item],\n 'approved',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"approved\"\n >\n \n \n \n statusChangeHandler(\n [item],\n 'unapproved',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"unapproved\"\n >\n \n \n \n statusChangeHandler(\n [item],\n 'unknown',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"unknown\"\n >\n \n \n \n );\n },\n };\n};\n","import DataTable, {\n ColumnDef,\n RowContents,\n RowSelectionState,\n TableContents,\n} from '@/components/advanced/data-table/data-table.component';\nimport OccurrencesTable from '@/components/advanced/inventory/occurrences-table.component';\nimport Checkbox from '@/components/shadcn-ui/checkbox';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { Label } from '@/components/shadcn-ui/label';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport {\n deepEqual,\n LocalizedStringValue,\n ScriptureReference,\n substring,\n} from 'platform-bible-utils';\nimport { useEffect, useMemo, useState } from 'react';\nimport {\n getBookNumFromId,\n getLinesFromUSFM,\n getNumberFromUSFM,\n getStatusForItem,\n InventoryItemOccurrence,\n InventoryTableData,\n Status,\n} from './inventory-utils';\nimport { inventoryAdditionalItemColumn } from './inventory-columns';\n\n/**\n * Object containing all keys used for localization in this component. If you're using this\n * component in an extension, you can pass it into the useLocalizedStrings hook to easily obtain the\n * localized strings and pass them into the localizedStrings prop of this component\n */\nexport const INVENTORY_STRING_KEYS = Object.freeze([\n '%webView_inventory_all%',\n '%webView_inventory_approved%',\n '%webView_inventory_unapproved%',\n '%webView_inventory_unknown%',\n '%webView_inventory_scope_currentBook%',\n '%webView_inventory_scope_chapter%',\n '%webView_inventory_scope_verse%',\n '%webView_inventory_filter_text%',\n '%webView_inventory_show_additional_items%',\n '%webView_inventory_occurrences_table_header_reference%',\n '%webView_inventory_occurrences_table_header_occurrence%',\n] as const);\n\nexport type InventoryLocalizedStrings = {\n [localizedInventoryKey in (typeof INVENTORY_STRING_KEYS)[number]]?: LocalizedStringValue;\n};\n\n/** Scope of scripture that the inventory can operate on */\nexport type Scope = 'book' | 'chapter' | 'verse';\n\n/** Status values that the status filter can select from */\ntype StatusFilter = Status | 'all';\n\n/** Text labels for the inventory columns and the control components of additional inventory items */\ntype AdditionalItemsLabels = {\n checkboxText?: string;\n tableHeaders?: string[];\n};\n\n/**\n * Filters data that is shown in the DataTable section of the Inventory\n *\n * @param itemData All inventory items and their related information\n * @param statusFilter Allows filtering by status (i.e. show all items, or only items that are\n * 'approved', 'unapproved' or 'unknown')\n * @param textFilter Allows filtering by text. All items that include the filter text will be\n * selected.\n * @returns Array of items and their related information that are matched by the specified filters\n */\nconst filterItemData = (\n itemData: InventoryTableData[],\n statusFilter: StatusFilter,\n textFilter: string,\n): InventoryTableData[] => {\n let filteredItemData: InventoryTableData[] = itemData;\n\n if (statusFilter !== 'all') {\n filteredItemData = filteredItemData.filter(\n (item) =>\n (statusFilter === 'approved' && item.status === 'approved') ||\n (statusFilter === 'unapproved' && item.status === 'unapproved') ||\n (statusFilter === 'unknown' && item.status === 'unknown'),\n );\n }\n\n if (textFilter !== '')\n filteredItemData = filteredItemData.filter((item) => item.items[0].includes(textFilter));\n\n return filteredItemData;\n};\n\n/**\n * Turns array of strings into array of inventory items, along with their count and status\n *\n * @param text The source scripture text that is searched for inventory items\n * @param scriptureRef The scripture reference that the application is currently set to\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @param itemRegex Regular expression that describes what items this Inventory should extract from\n * the provided scripture text\n * @returns Array of inventory items, along with their count and status\n */\nconst createTableData = (\n text: string | undefined,\n scriptureRef: ScriptureReference,\n approvedItems: string[],\n unapprovedItems: string[],\n itemRegex: RegExp,\n): InventoryTableData[] => {\n if (!text) return [];\n\n const tableData: InventoryTableData[] = [];\n\n let currentBook: number | undefined = scriptureRef.bookNum;\n let currentChapter: number | undefined = scriptureRef.chapterNum;\n let currentVerse: number | undefined = scriptureRef.verseNum;\n\n const lines = getLinesFromUSFM(text);\n\n lines.forEach((line: string) => {\n if (line.startsWith('\\\\id')) {\n currentBook = getBookNumFromId(line);\n currentChapter = 0;\n currentVerse = 0;\n }\n if (line.startsWith('\\\\c')) {\n currentChapter = getNumberFromUSFM(line);\n currentVerse = 0;\n }\n if (line.startsWith('\\\\v')) {\n currentVerse = getNumberFromUSFM(line);\n if (currentChapter === 0) {\n currentChapter = scriptureRef.chapterNum;\n }\n }\n\n let match: RegExpExecArray | undefined = itemRegex.exec(line) ?? undefined;\n while (match) {\n const items: string[] = [];\n match.forEach((item) => items.push(item));\n const itemIndex = match.index;\n const existingItem = tableData.find((tableEntry) => deepEqual(tableEntry.items, items));\n const newReference: InventoryItemOccurrence = {\n reference: {\n bookNum: currentBook !== undefined ? currentBook : -1,\n chapterNum: currentChapter !== undefined ? currentChapter : -1,\n verseNum: currentVerse !== undefined ? currentVerse : -1,\n },\n text: substring(line, Math.max(0, itemIndex - 25), Math.min(itemIndex + 25, line.length)),\n };\n if (existingItem) {\n existingItem.count += 1;\n existingItem.occurrences.push(newReference);\n } else {\n const newItem: InventoryTableData = {\n items,\n count: 1,\n status: getStatusForItem(items[0], approvedItems, unapprovedItems),\n occurrences: [newReference],\n };\n tableData.push(newItem);\n }\n\n match = itemRegex.exec(line) ?? undefined;\n }\n });\n\n return tableData;\n};\n\n/**\n * Gets the localized value for the provided key\n *\n * @param strings Object containing localized string\n * @param key Key for a localized string\n * @returns The localized value for the provided key, if available. Returns the key if no localized\n * value is available\n */\nconst localizeString = (\n strings: InventoryLocalizedStrings,\n key: keyof InventoryLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\n/** Props for the Inventory component */\ntype InventoryProps = {\n /** The scripture reference that the application is currently set to */\n scriptureReference: ScriptureReference;\n /** Callback function that is executed when the scripture reference is changed */\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n /**\n * Object with all localized strings that the Inventory needs to work well across multiple\n * languages. When using this component with Platform.Bible, you can import\n * `INVENTORY_STRING_KEYS` from this library, pass it in to the Platform's localization hook, and\n * pass the localized keys that are returned by the hook into this prop.\n */\n localizedStrings: InventoryLocalizedStrings;\n /**\n * The logic that finds the desired items in the source text. This can either be a Regular\n * expression that captures one or multiple items (preferred), or a custom function that builds\n * and return an InventoryDataTable[] manually. Note: In case the logic captures more than one\n * item (i.e. InventoryTableData.items has a length greater than 1), you must provide text labels\n * for the related columns and control elements to show by setting the `additionalItemsLabels`\n * prop\n */\n extractItems:\n | RegExp\n | ((\n text: string | undefined,\n scriptureRef: ScriptureReference,\n approvedItems: string[],\n unapprovedItems: string[],\n ) => InventoryTableData[]);\n /**\n * Text labels for control elements and additional column headers in case your Inventory has more\n * than one item to show (e.g. The 'Preceding Marker' in the Markers Inventory)\n */\n additionalItemsLabels?: AdditionalItemsLabels;\n /** Array of approved items, typically as defined in `Settings.xml` */\n approvedItems: string[];\n /** Array of unapproved items, typically as defined in `Settings.xml` */\n unapprovedItems: string[];\n /** The source scripture text that is searched for in inventory items */\n text: string | undefined;\n /** Scope of scripture that the inventory will operate on */\n scope: Scope;\n /** Callback function that is executed when the scope is changed from the Inventory */\n onScopeChange: (scope: Scope) => void;\n /**\n * Column definitions for the Inventory data table. The most commonly used column definitions are\n * pre-configured for your convenience and can be imported (e.g. inventoryItemColumn,\n * inventoryAdditionalItemColumn inventoryCountColumn, and inventoryStatusColumn). If you need any\n * other columns you can add these yourself\n */\n columns: ColumnDef[];\n};\n\n/** Inventory component that is used to view and control the status of provided project settings */\nexport default function Inventory({\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n extractItems,\n additionalItemsLabels,\n approvedItems,\n unapprovedItems,\n text,\n scope,\n onScopeChange,\n columns,\n}: InventoryProps) {\n const allItemsText = localizeString(localizedStrings, '%webView_inventory_all%');\n const approvedItemsText = localizeString(localizedStrings, '%webView_inventory_approved%');\n const unapprovedItemsText = localizeString(localizedStrings, '%webView_inventory_unapproved%');\n const unknownItemsText = localizeString(localizedStrings, '%webView_inventory_unknown%');\n const scopeBookText = localizeString(localizedStrings, '%webView_inventory_scope_currentBook%');\n const scopeChapterText = localizeString(localizedStrings, '%webView_inventory_scope_chapter%');\n const scopeVerseText = localizeString(localizedStrings, '%webView_inventory_scope_verse%');\n const filterText = localizeString(localizedStrings, '%webView_inventory_filter_text%');\n const showAdditionalItemsText = localizeString(\n localizedStrings,\n '%webView_inventory_show_additional_items%',\n );\n\n const [showAdditionalItems, setShowAdditionalItems] = useState(false);\n const [statusFilter, setStatusFilter] = useState('all');\n const [textFilter, setTextFilter] = useState('');\n const [selectedItem, setSelectedItem] = useState([]);\n\n const tableData: InventoryTableData[] = useMemo(() => {\n if (!text) return [];\n if (extractItems instanceof RegExp)\n return createTableData(\n text,\n scriptureReference,\n approvedItems,\n unapprovedItems,\n extractItems,\n );\n return extractItems(text, scriptureReference, approvedItems, unapprovedItems);\n }, [text, extractItems, scriptureReference, approvedItems, unapprovedItems]);\n\n const reducedTableData: InventoryTableData[] = useMemo(() => {\n if (showAdditionalItems) return tableData;\n\n const newTableData: InventoryTableData[] = [];\n\n tableData.forEach((tableEntry) => {\n const firstItem = tableEntry.items[0];\n\n const existingEntry = newTableData.find(\n (newTableEntry) => newTableEntry.items[0] === firstItem,\n );\n\n if (existingEntry) {\n existingEntry.count += tableEntry.count;\n existingEntry.occurrences = existingEntry.occurrences.concat(tableEntry.occurrences);\n } else {\n newTableData.push({\n items: [firstItem],\n count: tableEntry.count,\n occurrences: tableEntry.occurrences,\n status: tableEntry.status,\n });\n }\n });\n\n return newTableData;\n }, [showAdditionalItems, tableData]);\n\n const filteredTableData: InventoryTableData[] = useMemo(() => {\n return filterItemData(reducedTableData, statusFilter, textFilter);\n }, [reducedTableData, statusFilter, textFilter]);\n\n const allColumns: ColumnDef[] = useMemo(() => {\n if (!showAdditionalItems) return columns;\n\n const numberOfAdditionalItems = additionalItemsLabels?.tableHeaders?.length;\n if (!numberOfAdditionalItems) return columns;\n\n const additionalColumns: ColumnDef[] = [];\n\n for (let index = 0; index < numberOfAdditionalItems; index++) {\n additionalColumns.push(\n inventoryAdditionalItemColumn(\n additionalItemsLabels?.tableHeaders?.[index] || 'Additional Item',\n index + 1,\n ),\n );\n }\n\n return [...additionalColumns, ...columns];\n }, [additionalItemsLabels?.tableHeaders, columns, showAdditionalItems]);\n\n useEffect(() => {\n setSelectedItem([]);\n }, [filteredTableData]);\n\n const rowClickHandler = (\n row: RowContents,\n table: TableContents,\n ) => {\n table.setRowSelection(() => {\n const newSelection: RowSelectionState = {};\n newSelection[row.index] = true;\n return newSelection;\n });\n\n setSelectedItem(row.original.items);\n };\n\n const handleScopeChange = (value: string) => {\n if (value === 'book' || value === 'chapter' || value === 'verse') {\n onScopeChange(value);\n } else {\n throw new Error(`Invalid scope value: ${value}`);\n }\n };\n\n const handleStatusFilterChange = (value: string) => {\n if (value === 'all' || value === 'approved' || value === 'unapproved' || value === 'unknown') {\n setStatusFilter(value);\n } else {\n throw new Error(`Invalid status filter value: ${value}`);\n }\n };\n\n const occurrenceData: InventoryItemOccurrence[] = useMemo(() => {\n if (reducedTableData.length === 0 || selectedItem.length === 0) return [];\n const occurrence = reducedTableData.filter((tableEntry: InventoryTableData) => {\n return deepEqual(\n showAdditionalItems ? tableEntry.items : [tableEntry.items[0]],\n selectedItem,\n );\n });\n if (occurrence.length > 1) throw new Error('Selected item is not unique');\n return occurrence[0].occurrences;\n }, [selectedItem, showAdditionalItems, reducedTableData]);\n\n return (\n
\n
\n handleStatusFilterChange(value)}\n defaultValue={statusFilter}\n >\n \n \n \n \n {allItemsText}\n {approvedItemsText}\n {unapprovedItemsText}\n {unknownItemsText}\n \n \n \n {\n setTextFilter(event.target.value);\n }}\n />\n {additionalItemsLabels && (\n
\n {\n setSelectedItem([]);\n setShowAdditionalItems(checked);\n }}\n />\n \n
\n )}\n
\n
\n \n
\n {occurrenceData.length > 0 && (\n
\n \n
\n )}\n
\n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/shadcn-ui/command';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/shadcn-ui/popover';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Check, ChevronsUpDown, Star } from 'lucide-react';\nimport { ReactNode, useCallback, useMemo, useState } from 'react';\n\ntype MultiSelectComboBoxEntry = {\n value: string;\n label: string;\n starred?: boolean;\n};\n\ninterface MultiSelectComboBoxProps {\n entries: MultiSelectComboBoxEntry[];\n getEntriesCount?: (option: MultiSelectComboBoxEntry) => number;\n selected: string[];\n onChange: (values: string[]) => void;\n placeholder: string;\n commandEmptyMessage?: string;\n customSelectedText?: string;\n sortSelected?: boolean;\n icon?: ReactNode;\n}\n\nfunction MultiSelectComboBox({\n entries,\n getEntriesCount = undefined,\n selected,\n onChange,\n placeholder,\n commandEmptyMessage = 'No option found',\n customSelectedText,\n sortSelected = false,\n icon = undefined,\n}: MultiSelectComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n const handleSelect = useCallback(\n (value: string) => {\n onChange(\n selected.includes(value) ? selected.filter((item) => item !== value) : [...selected, value],\n );\n },\n [selected, onChange],\n );\n\n const getPlaceholderText = () => {\n if (selected.length === 1)\n return entries.find((option) => option.value === selected[0])?.label ?? placeholder;\n if (customSelectedText) return customSelectedText;\n return placeholder;\n };\n\n const sortedOptions = useMemo(() => {\n if (!sortSelected) return entries;\n\n const starredItems = entries\n .filter((opt) => opt.starred)\n .sort((a, b) => a.label.localeCompare(b.label));\n const nonStarredItems = entries\n .filter((opt) => !opt.starred)\n .sort((a, b) => {\n const aSelected = selected.includes(a.value);\n const bSelected = selected.includes(b.value);\n if (aSelected && !bSelected) return -1;\n if (!aSelected && bSelected) return 1;\n return a.label.localeCompare(b.label);\n });\n\n return [...starredItems, ...nonStarredItems];\n }, [entries, selected, sortSelected]);\n\n return (\n \n \n 0 && selected.length < entries.length && 'tw-border-primary',\n )}\n >\n
\n
\n \n {icon}\n \n
\n \n {getPlaceholderText()}\n
\n
\n \n \n \n \n \n \n \n {commandEmptyMessage}\n \n {sortedOptions.map((option) => {\n const count: number | undefined = getEntriesCount\n ? getEntriesCount(option)\n : undefined;\n return (\n \n
\n \n
\n
\n {option.starred && }\n
\n
{option.label}
\n {getEntriesCount && (\n
{count}
\n )}\n \n );\n })}\n
\n
\n
\n
\n \n );\n}\n\nexport default MultiSelectComboBox;\n","import { Button } from '@/components/shadcn-ui/button';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Search, X } from 'lucide-react';\nimport { useState } from 'react';\n\nexport type SearchBarProps = {\n /**\n * Callback fired to handle the search query when button pressed\n *\n * @param searchQuery\n */\n onSearch: (searchQuery: string) => void;\n\n /** Optional string that appears in the search bar without a search string */\n placeholder?: string;\n\n /** Optional boolean to set the input base to full width */\n isFullWidth?: boolean;\n\n /** ClassName for the input */\n className?: string;\n};\n\nexport default function SearchBar({\n onSearch,\n placeholder,\n isFullWidth,\n className,\n}: SearchBarProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const handleInputChange = (searchString: string) => {\n setSearchQuery(searchString);\n onSearch(searchString);\n };\n\n return (\n
\n \n handleInputChange(e.target.value)}\n />\n {searchQuery && (\n \n {\n handleInputChange('');\n }}\n />\n Clear\n \n )}\n
\n );\n}\n","// adapted from: https://github.com/shadcn-ui/ui/discussions/752\n\n'use client';\n\nimport { TabsContentProps, TabsListProps, TabsTriggerProps } from '@/components/shadcn-ui/tabs';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\nimport React from 'react';\n\nexport type VerticalTabsProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type LeftTabsTriggerProps = TabsTriggerProps & {\n value: string;\n ref?: React.Ref;\n};\n\nexport const VerticalTabs = React.forwardRef<\n React.ElementRef,\n VerticalTabsProps\n>(({ className, ...props }, ref) => (\n \n));\n\nVerticalTabs.displayName = TabsPrimitive.List.displayName;\n\nexport const VerticalTabsList = React.forwardRef<\n React.ElementRef,\n TabsListProps\n>(({ className, ...props }, ref) => (\n \n));\nVerticalTabsList.displayName = TabsPrimitive.List.displayName;\n\nexport const VerticalTabsTrigger = React.forwardRef<\n React.ElementRef,\n LeftTabsTriggerProps\n>(({ className, ...props }, ref) => (\n \n));\n\nexport const VerticalTabsContent = React.forwardRef<\n React.ElementRef,\n TabsContentProps\n>(({ className, ...props }, ref) => (\n \n));\nVerticalTabsContent.displayName = TabsPrimitive.Content.displayName;\n","import SearchBar from '@/components/basics/search-bar.component';\nimport {\n VerticalTabs,\n VerticalTabsContent,\n VerticalTabsList,\n VerticalTabsTrigger,\n} from '@/components/basics/tabs-vertical';\nimport { ReactNode } from 'react';\n\nexport type TabKeyValueContent = {\n key: string;\n value: string;\n content: ReactNode;\n};\n\nexport type NavigationContentSearchProps = {\n /** List of values and keys for each tab this component should provide */\n tabList: TabKeyValueContent[];\n\n /** Handler to run when the value of the search bar changes */\n onSearch: (searchQuery: string) => void;\n\n /** Optional placeholder for the search bar */\n searchPlaceholder?: string;\n\n /** Optional title to include in the header */\n headerTitle?: string;\n\n /** Optional flag to make the search bar appear full width */\n isSearchBarFullWidth?: boolean;\n\n /** Text direction ltr or rtl */\n direction?: 'ltr' | 'rtl';\n};\n\nexport default function NavigationContentSearch({\n tabList,\n onSearch,\n searchPlaceholder,\n headerTitle,\n isSearchBarFullWidth = false,\n direction = 'ltr',\n}: NavigationContentSearchProps) {\n return (\n
\n
\n {headerTitle ?

{headerTitle}

: ''}\n \n
\n \n \n {tabList.map((tab) => (\n \n {tab.value}\n \n ))}\n \n {tabList.map((tab) => (\n \n {tab.content}\n \n ))}\n \n
\n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Canon } from '@sillsdev/scripture';\nimport {\n Cell,\n ColumnDef,\n flexRender,\n getCoreRowModel,\n getExpandedRowModel,\n getGroupedRowModel,\n getSortedRowModel,\n GroupingState,\n Row,\n RowSelectionState,\n SortingState,\n useReactTable,\n} from '@tanstack/react-table';\nimport '@/components/advanced/scripture-results-viewer/scripture-results-viewer.component.css';\nimport {\n compareScrRefs,\n formatScrRef,\n ScriptureSelection,\n scrRefToBBBCCCVVV,\n} from 'platform-bible-utils';\nimport { MouseEvent, useEffect, useMemo, useState } from 'react';\nimport { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\n\n/**\n * Information (e.g., a checking error or some other type of \"transient\" annotation) about something\n * noteworthy at a specific place in an instance of the Scriptures.\n */\nexport type ScriptureItemDetail = ScriptureSelection & {\n /**\n * Text of the error, note, etc. In the future, we might want to support something more than just\n * text so that a JSX element could be provided with a link or some other controls related to the\n * issue being reported.\n */\n detail: string;\n};\n\n/**\n * A uniquely identifiable source of results that can be displayed in the ScriptureResultsViewer.\n * Generally, the source will be a particular Scripture check, but there may be other types of\n * sources.\n */\nexport type ResultsSource = {\n /**\n * Uniquely identifies the source.\n *\n * @type {string}\n */\n id: string;\n\n /**\n * Name (potentially localized) of the source, suitable for display in the UI.\n *\n * @type {string}\n */\n displayName: string;\n};\n\nexport type ScriptureSrcItemDetail = ScriptureItemDetail & {\n /** Source/type of detail. Can be used for grouping. */\n source: ResultsSource;\n};\n\n/**\n * Represents a set of results keyed by Scripture reference. Generally, the source will be a\n * particular Scripture check, but this type also allows for other types of uniquely identifiable\n * sources.\n */\nexport type ResultsSet = {\n /**\n * The backing source associated with this set of results.\n *\n * @type {ResultsSource}\n */\n source: ResultsSource;\n\n /**\n * Array of Scripture item details (messages keyed by Scripture reference).\n *\n * @type {ScriptureItemDetail[]}\n */\n data: ScriptureItemDetail[];\n};\n\nconst scrBookColId = 'scrBook';\nconst scrRefColId = 'scrRef';\nconst typeColId = 'source';\nconst detailsColId = 'details';\n\nconst defaultScrRefColumnName = 'Scripture Reference';\nconst defaultScrBookGroupName = 'Scripture Book';\nconst defaultTypeColumnName = 'Type';\nconst defaultDetailsColumnName = 'Details';\n\nexport type ScriptureResultsViewerColumnInfo = {\n /** Optional header to display for the Reference column. Default value: 'Scripture Reference'. */\n scriptureReferenceColumnName?: string;\n\n /** Optional text to display to refer to the Scripture book group. Default value: 'Scripture Book'. */\n scriptureBookGroupName?: string;\n\n /** Optional header to display for the Type column. Default value: 'Type'. */\n typeColumnName?: string;\n\n /** Optional header to display for the Details column. Default value: 'Details' */\n detailsColumnName?: string;\n};\n\nexport type ScriptureResultsViewerProps = ScriptureResultsViewerColumnInfo & {\n /** Groups of ScriptureItemDetail objects from particular sources (e.g., Scripture checks) */\n sources: ResultsSet[];\n\n /** Flag indicating whether to display column headers. Default is false. */\n showColumnHeaders?: boolean;\n\n /** Flag indicating whether to display source column. Default is false. */\n showSourceColumn?: boolean;\n\n /** Callback function to notify when a row is selected */\n onRowSelected?: (selectedRow: ScriptureSrcItemDetail | undefined) => void;\n\n /** Text direction ltr or rtl */\n direction?: 'ltr' | 'rtl';\n};\n\nfunction getColumns(\n colInfo?: ScriptureResultsViewerColumnInfo,\n showSourceColumn?: boolean,\n): ColumnDef[] {\n const showSrcCol = showSourceColumn ?? false;\n return [\n {\n accessorFn: (row) =>\n `${Canon.bookNumberToId(row.start.bookNum)} ${row.start.chapterNum}:${row.start.verseNum}`,\n id: scrBookColId,\n header: colInfo?.scriptureReferenceColumnName ?? defaultScrRefColumnName,\n cell: (info) => {\n const row = info.row.original;\n if (info.row.getIsGrouped()) {\n return Canon.bookNumberToEnglishName(row.start.bookNum);\n }\n return info.row.groupingColumnId === scrBookColId ? formatScrRef(row.start) : undefined;\n },\n getGroupingValue: (row) => row.start.bookNum,\n sortingFn: (a, b) => {\n return compareScrRefs(a.original.start, b.original.start);\n },\n enableGrouping: true,\n },\n {\n accessorFn: (row) => formatScrRef(row.start),\n id: scrRefColId,\n header: undefined,\n cell: (info) => {\n const row = info.row.original;\n return info.row.getIsGrouped() ? undefined : formatScrRef(row.start);\n },\n sortingFn: (a, b) => {\n return compareScrRefs(a.original.start, b.original.start);\n },\n enableGrouping: false,\n },\n {\n accessorFn: (row) => row.source.displayName,\n id: typeColId,\n header: showSrcCol ? (colInfo?.typeColumnName ?? defaultTypeColumnName) : undefined,\n cell: (info) => (showSrcCol || info.row.getIsGrouped() ? info.getValue() : undefined),\n getGroupingValue: (row) => row.source.id,\n sortingFn: (a, b) =>\n a.original.source.displayName.localeCompare(b.original.source.displayName),\n enableGrouping: true,\n },\n {\n accessorFn: (row) => row.detail,\n id: detailsColId,\n header: colInfo?.detailsColumnName ?? defaultDetailsColumnName,\n cell: (info) => info.getValue(),\n enableGrouping: false,\n },\n ];\n}\n\nconst toRefOrRange = (scriptureSelection: ScriptureSelection) => {\n if (!('offset' in scriptureSelection.start))\n throw new Error('No offset available in range start');\n if (scriptureSelection.end && !('offset' in scriptureSelection.end))\n throw new Error('No offset available in range end');\n const { offset: offsetStart } = scriptureSelection.start;\n let offsetEnd: number = 0;\n if (scriptureSelection.end) ({ offset: offsetEnd } = scriptureSelection.end);\n if (\n !scriptureSelection.end ||\n compareScrRefs(scriptureSelection.start, scriptureSelection.end) === 0\n )\n return `${scrRefToBBBCCCVVV(scriptureSelection.start)}+${offsetStart}`;\n return `${scrRefToBBBCCCVVV(scriptureSelection.start)}+${offsetStart}-${scrRefToBBBCCCVVV(scriptureSelection.end)}+${offsetEnd}`;\n};\n\nconst getRowKey = (row: ScriptureSrcItemDetail) =>\n `${toRefOrRange({ start: row.start, end: row.end })} ${row.source.displayName} ${row.detail}`;\n\n/**\n * Component to display a combined list of detailed items from one or more sources, where the items\n * are keyed primarily by Scripture reference. This is particularly useful for displaying a list of\n * results from Scripture checks, but more generally could be used to display any \"results\" from any\n * source(s). The component allows for grouping by Scripture book, source, or both. By default, it\n * displays somewhat \"tree-like\" which allows it to be more horizontally compact and intuitive. But\n * it also has the option of displaying as a traditional table with column headings (with or without\n * the source column showing).\n */\nexport default function ScriptureResultsViewer({\n sources,\n showColumnHeaders = false,\n showSourceColumn = false,\n scriptureReferenceColumnName,\n scriptureBookGroupName,\n typeColumnName,\n detailsColumnName,\n onRowSelected,\n direction = 'ltr',\n}: ScriptureResultsViewerProps) {\n const [grouping, setGrouping] = useState([]);\n const [sorting, setSorting] = useState([{ id: scrBookColId, desc: false }]);\n const [rowSelection, setRowSelection] = useState({});\n\n const scriptureResults = useMemo(\n () =>\n sources.flatMap((source) => {\n return source.data.map((item) => ({\n ...item,\n source: source.source,\n }));\n }),\n [sources],\n );\n\n const columns = useMemo(\n () =>\n getColumns(\n {\n scriptureReferenceColumnName,\n typeColumnName,\n detailsColumnName,\n },\n showSourceColumn,\n ),\n [scriptureReferenceColumnName, typeColumnName, detailsColumnName, showSourceColumn],\n );\n\n useEffect(() => {\n // Ensure sorting is applied correctly when grouped by type\n if (grouping.includes(typeColId)) {\n setSorting([\n { id: typeColId, desc: false },\n { id: scrBookColId, desc: false },\n ]);\n } else {\n setSorting([{ id: scrBookColId, desc: false }]);\n }\n }, [grouping]);\n\n const table = useReactTable({\n data: scriptureResults,\n columns,\n state: {\n grouping,\n sorting,\n rowSelection,\n },\n onGroupingChange: setGrouping,\n onSortingChange: setSorting,\n onRowSelectionChange: setRowSelection,\n getExpandedRowModel: getExpandedRowModel(),\n getGroupedRowModel: getGroupedRowModel(),\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getRowId: getRowKey,\n autoResetExpanded: false,\n enableMultiRowSelection: false,\n enableSubRowSelection: false,\n });\n\n useEffect(() => {\n if (onRowSelected) {\n const selectedRows = table.getSelectedRowModel().rowsById;\n const keys = Object.keys(selectedRows);\n if (keys.length === 1) {\n const selectedRow = scriptureResults.find((row) => getRowKey(row) === keys[0]) || undefined;\n if (selectedRow) onRowSelected(selectedRow);\n }\n }\n }, [rowSelection, scriptureResults, onRowSelected, table]);\n\n // Define possible grouping options\n const scrBookGroupName = scriptureBookGroupName ?? defaultScrBookGroupName;\n const typeGroupName = typeColumnName ?? defaultTypeColumnName;\n\n const groupingOptions = [\n { label: 'No Grouping', value: [] },\n { label: `Group by ${scrBookGroupName}`, value: [scrBookColId] },\n { label: `Group by ${typeGroupName}`, value: [typeColId] },\n {\n label: `Group by ${scrBookGroupName} and ${typeGroupName}`,\n value: [scrBookColId, typeColId],\n },\n {\n label: `Group by ${typeGroupName} and ${scrBookGroupName}`,\n value: [typeColId, scrBookColId],\n },\n ];\n\n const handleSelectChange = (selectedGrouping: string) => {\n setGrouping(JSON.parse(selectedGrouping));\n };\n\n const handleRowClick = (row: Row, event: MouseEvent) => {\n if (!row.getIsGrouped() && !row.getIsSelected()) {\n row.getToggleSelectedHandler()(event);\n }\n };\n\n const getEvenOrOddBandingStyle = (row: Row, index: number) => {\n if (row.getIsGrouped()) return '';\n // UX has now said they don't think they want banding. I'm leaving in the code to\n // set even and odd styles, but there's nothing in the CSS to style them differently.\n // The \"even\" style used to also have tw-bg-neutral-300 (along with even) to create\n // a visual banding effect. That could be added back in if UX changes the decision.\n return cn('banded-row', index % 2 === 0 ? 'even' : 'odd');\n };\n\n const getIndent = (\n groupingState: GroupingState,\n row: Row,\n cell: Cell,\n ) => {\n if (groupingState?.length === 0 || row.depth < cell.column.getGroupedIndex()) return undefined;\n if (row.getIsGrouped()) {\n switch (row.depth) {\n case 1:\n return 'tw-ps-4';\n default:\n return undefined;\n }\n }\n switch (row.depth) {\n case 1:\n return 'tw-ps-8';\n case 2:\n return 'tw-ps-12';\n default:\n return undefined;\n }\n };\n\n return (\n
\n {!showColumnHeaders && (\n {\n handleSelectChange(value);\n }}\n >\n \n \n \n \n \n {groupingOptions.map((option) => (\n \n {option.label}\n \n ))}\n \n \n \n )}\n \n {showColumnHeaders && (\n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers\n .filter((h) => h.column.columnDef.header)\n .map((header) => (\n /* For sticky column headers to work, we probably need to change the default definition of the shadcn Table component. See https://github.com/shadcn-ui/ui/issues/1151 */\n \n {header.isPlaceholder ? undefined : (\n
\n {header.column.getCanGroup() ? (\n \n {header.column.getIsGrouped() ? `🛑` : `👊 `}\n \n ) : undefined}{' '}\n {flexRender(header.column.columnDef.header, header.getContext())}\n
\n )}\n
\n ))}\n
\n ))}\n
\n )}\n \n {table.getRowModel().rows.map((row, rowIndex) => {\n return (\n handleRowClick(row, event)}\n >\n {row.getVisibleCells().map((cell) => {\n if (\n cell.getIsPlaceholder() ||\n (cell.column.columnDef.enableGrouping &&\n !cell.getIsGrouped() &&\n (cell.column.columnDef.id !== typeColId || !showSourceColumn))\n )\n return undefined;\n return (\n \n {(() => {\n if (cell.getIsGrouped()) {\n return (\n \n {row.getIsExpanded() && }\n {!row.getIsExpanded() &&\n (direction === 'ltr' ? : )}{' '}\n {flexRender(cell.column.columnDef.cell, cell.getContext())} (\n {row.subRows.length})\n \n );\n }\n\n // if (cell.getIsAggregated()) {\n // flexRender(\n // cell.column.columnDef.aggregatedCell ?? cell.column.columnDef.cell,\n // cell.getContext(),\n // );\n // }\n\n return flexRender(cell.column.columnDef.cell, cell.getContext());\n })()}\n \n );\n })}\n \n );\n })}\n \n
\n
\n );\n}\n","import {\n getLocalizeKeyForScrollGroupId,\n LanguageStrings,\n ScrollGroupId,\n} from 'platform-bible-utils';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\n\nconst DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS = {\n [getLocalizeKeyForScrollGroupId('undefined')]: 'Ø',\n [getLocalizeKeyForScrollGroupId(0)]: 'A',\n [getLocalizeKeyForScrollGroupId(1)]: 'B',\n [getLocalizeKeyForScrollGroupId(2)]: 'C',\n [getLocalizeKeyForScrollGroupId(3)]: 'D',\n [getLocalizeKeyForScrollGroupId(4)]: 'E',\n [getLocalizeKeyForScrollGroupId(5)]: 'F',\n [getLocalizeKeyForScrollGroupId(6)]: 'G',\n [getLocalizeKeyForScrollGroupId(7)]: 'H',\n [getLocalizeKeyForScrollGroupId(8)]: 'I',\n [getLocalizeKeyForScrollGroupId(9)]: 'J',\n [getLocalizeKeyForScrollGroupId(10)]: 'K',\n [getLocalizeKeyForScrollGroupId(11)]: 'L',\n [getLocalizeKeyForScrollGroupId(12)]: 'M',\n [getLocalizeKeyForScrollGroupId(13)]: 'N',\n [getLocalizeKeyForScrollGroupId(14)]: 'O',\n [getLocalizeKeyForScrollGroupId(15)]: 'P',\n [getLocalizeKeyForScrollGroupId(16)]: 'Q',\n [getLocalizeKeyForScrollGroupId(17)]: 'R',\n [getLocalizeKeyForScrollGroupId(18)]: 'S',\n [getLocalizeKeyForScrollGroupId(19)]: 'T',\n [getLocalizeKeyForScrollGroupId(20)]: 'U',\n [getLocalizeKeyForScrollGroupId(21)]: 'V',\n [getLocalizeKeyForScrollGroupId(22)]: 'W',\n [getLocalizeKeyForScrollGroupId(23)]: 'X',\n [getLocalizeKeyForScrollGroupId(24)]: 'Y',\n [getLocalizeKeyForScrollGroupId(25)]: 'Z',\n};\n\nexport type ScrollGroupSelectorProps = {\n /**\n * List of scroll group ids to show to the user. Either a {@link ScrollGroupId} or `undefined` for\n * no scroll group\n */\n availableScrollGroupIds: (ScrollGroupId | undefined)[];\n /** Currently selected scroll group id. `undefined` for no scroll group */\n scrollGroupId: ScrollGroupId | undefined;\n /** Callback function run when the user tries to change the scroll group id */\n onChangeScrollGroupId: (newScrollGroupId: ScrollGroupId | undefined) => void;\n /**\n * Localized strings to use for displaying scroll group ids. Must be an object whose keys are\n * `getLocalizeKeyForScrollGroupId(scrollGroupId)` for all scroll group ids (and `undefined` if\n * included) in {@link ScrollGroupSelectorProps.availableScrollGroupIds} and whose values are the\n * localized strings to use for those scroll group ids.\n *\n * Defaults to English localizations of English alphabet for scroll groups 0-25 (e.g. 0 is A) and\n * Ø for `undefined`. Will fill in any that are not provided with these English localizations.\n * Also, if any values match the keys, the English localization will be used. This is useful in\n * case you want to pass in a temporary version of the localized strings while your localized\n * strings load.\n *\n * @example\n *\n * ```typescript\n * const myScrollGroupIdLocalizedStrings = {\n * [getLocalizeKeyForScrollGroupId('undefined')]: 'Ø',\n * [getLocalizeKeyForScrollGroupId(0)]: 'A',\n * [getLocalizeKeyForScrollGroupId(1)]: 'B',\n * [getLocalizeKeyForScrollGroupId(2)]: 'C',\n * [getLocalizeKeyForScrollGroupId(3)]: 'D',\n * [getLocalizeKeyForScrollGroupId(4)]: 'E',\n * };\n * ```\n *\n * @example\n *\n * ```tsx\n * const availableScrollGroupIds = [undefined, 0, 1, 2, 3, 4];\n *\n * const localizeKeys = getLocalizeKeysForScrollGroupIds();\n *\n * const [localizedStrings] = useLocalizedStrings(localizeKeys);\n *\n * ...\n *\n * \n * ```\n */\n localizedStrings?: LanguageStrings;\n};\n\n/** Selector component for choosing a scroll group */\nexport default function ScrollGroupSelector({\n availableScrollGroupIds,\n scrollGroupId,\n onChangeScrollGroupId,\n localizedStrings = {},\n}: ScrollGroupSelectorProps) {\n const localizedStringsDefaulted = {\n ...DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS,\n ...Object.fromEntries(\n Object.entries(localizedStrings).map(\n ([localizedStringKey, localizedStringValue]: [string, string]) => [\n localizedStringKey,\n localizedStringKey === localizedStringValue &&\n localizedStringKey in DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS\n ? DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS[localizedStringKey]\n : localizedStringValue,\n ],\n ),\n ),\n };\n return (\n \n onChangeScrollGroupId(\n newScrollGroupString === 'undefined' ? undefined : parseInt(newScrollGroupString, 10),\n )\n }\n >\n \n \n \n \n {availableScrollGroupIds.map((scrollGroupOptionId) => (\n \n {localizedStringsDefaulted[getLocalizeKeyForScrollGroupId(scrollGroupOptionId)]}\n \n ))}\n \n \n );\n}\n","import React from 'react';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Separator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n \n));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n","import { PropsWithChildren } from 'react';\nimport { Separator } from '@/components/shadcn-ui/separator';\n\n/** Props for the SettingsList component, currently just children */\ntype SettingsListProps = PropsWithChildren;\n\n/**\n * SettingsList component is a wrapper for list items. Rendered with a formatted div\n *\n * @param children To populate the list with\n * @returns Formatted div encompassing the children\n */\nexport function SettingsList({ children }: SettingsListProps) {\n return
{children}
;\n}\n\n/** Props for SettingsListItem component */\ntype SettingsListItemProps = PropsWithChildren & {\n /** Primary text of the list item */\n primary: string;\n\n /** Optional text of the list item */\n secondary?: string | undefined;\n\n /** Optional boolean to display a message if the children aren't loaded yet. Defaults to false */\n isLoading?: boolean;\n\n /** Optional message to display if isLoading */\n loadingMessage?: string;\n};\n\n/**\n * SettingsListItem component is a common list item. Rendered with a formatted div\n *\n * @param primary Primary text of the list item\n * @param secondary Optional secondary text of the list item\n * @param isLoading Optional, to display a message if the action component isn't generated yet,\n * defaults to false\n * @param children The action component(s) to provide for this item\n * @param loadingMessage Optional, message to display if isLoading\n * @returns Formatted div encompassing the list item content\n */\nexport function SettingsListItem({\n primary,\n secondary,\n children,\n isLoading = false,\n loadingMessage,\n}: SettingsListItemProps) {\n return (\n
\n
\n

{primary}

\n

\n {secondary}\n

\n
\n\n {isLoading ? (\n

{loadingMessage}

\n ) : (\n
{children}
\n )}\n
\n );\n}\n\n/** Props for SettingsListHeader component */\ntype SettingsListHeaderProps = {\n /** The primary text of the list header */\n primary: string;\n\n /** Optional secondary text of the list header */\n secondary?: string | undefined;\n\n /** Optional boolean to include a separator underneath the secondary text. Defaults to false */\n includeSeparator?: boolean;\n};\n\n/**\n * SettingsListHeader component displays text above the list\n *\n * @param primary The primary text of the list header\n * @param secondary Optional secondary text of the list header\n * @param includeSeparator Optional boolean to include a separator underneath the secondary text.\n * Defaults to false\n * @returns Formatted div with list header content\n */\nexport function SettingsListHeader({\n primary,\n secondary,\n includeSeparator = false,\n}: SettingsListHeaderProps) {\n return (\n
\n
\n

{primary}

\n

{secondary}

\n
\n {includeSeparator ? : ''}\n
\n );\n}\n","import Checkbox from '@/components/shadcn-ui/checkbox';\nimport { Label } from '@/components/shadcn-ui/label';\n\nexport type ChecklistProps = {\n /** Optional string representing the id attribute of the Checklist */\n id?: string;\n /** Optional string representing CSS class name(s) for styling */\n className?: string;\n /** Array of strings representing the checkable items */\n listItems: string[];\n /** Array of strings representing the checked items */\n selectedListItems: string[];\n /**\n * Function that is called when a checkbox item is selected or deselected\n *\n * @param item The string description for this item\n * @param selected True if selected, false if not selected\n */\n handleSelectListItem: (item: string, selected: boolean) => void;\n\n /**\n * Optional function creates a label for a provided checkable item\n *\n * @param item The item for which a label is to be created\n * @returns A string representing the label text for the checkbox associated with that item\n */\n createLabel?: (item: string) => string;\n};\n\n/** Renders a list of checkboxes. Each checkbox corresponds to an item from the `listItems` array. */\nexport default function Checklist({\n id,\n className,\n listItems,\n selectedListItems,\n handleSelectListItem,\n createLabel,\n}: ChecklistProps) {\n return (\n
\n {listItems.map((item) => (\n
\n handleSelectListItem(item, value)}\n />\n \n
\n ))}\n
\n );\n}\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function chainPropTypes(propType1, propType2) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return function validate(...args) {\n return propType1(...args) || propType2(...args);\n };\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (!isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? _extends({}, target) : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\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","/** @license React v16.13.1\n * react-is.development.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';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\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\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\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\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\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\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import PropTypes from 'prop-types';\nimport chainPropTypes from '../chainPropTypes';\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n const element = props[propName];\n const safePropName = propFullName || propName;\n if (element == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for Emotion compat.\n // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n const elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nconst elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n\nconst specialProperty = 'exact-prop: \\u200b';\nexport default function exactProp(propTypes) {\n if (process.env.NODE_ENV === 'production') {\n return propTypes;\n }\n return _extends({}, propTypes, {\n [specialProperty]: props => {\n const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));\n if (unsupportedProps.length > 0) {\n return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\\`${prop}\\``).join(', ')}. Please remove them.`);\n }\n return null;\n }\n });\n}","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe if we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","/**\n * @license React\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'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","/**\n * @license React\n * react-is.development.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';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_SERVER_CONTEXT_TYPE:\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\nfunction isSuspenseList(object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.SuspenseList = SuspenseList;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isSuspenseList = isSuspenseList;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","import { ForwardRef, Memo } from 'react-is';\n\n// Simplified polyfill for IE11 support\n// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3\nconst fnNameMatchRegex = /^\\s*function(?:\\s|\\s*\\/\\*.*\\*\\/\\s*)+([^(\\s/]*)\\s*/;\nexport function getFunctionName(fn) {\n const match = `${fn}`.match(fnNameMatchRegex);\n const name = match && match[1];\n return name || '';\n}\nfunction getFunctionComponentName(Component, fallback = '') {\n return Component.displayName || Component.name || getFunctionName(Component) || fallback;\n}\nfunction getWrappedName(outerType, innerType, wrapperName) {\n const functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);\n}\n\n/**\n * cherry-pick from\n * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName with added IE11 support\n */\nexport default function getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n if (typeof Component === 'string') {\n return Component;\n }\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`\n if (typeof Component === 'object') {\n switch (Component.$$typeof) {\n case ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n case Memo:\n return getWrappedName(Component, Component.type, 'memo');\n default:\n return undefined;\n }\n }\n return undefined;\n}","export default function HTMLElementType(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null) {\n return null;\n }\n if (propValue && propValue.nodeType !== 1) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an HTMLElement.`);\n }\n return null;\n}","import PropTypes from 'prop-types';\nconst refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);\nexport default refType;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","export default function deprecatedPropType(validator, reason) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return (props, propName, componentName, location, propFullName) => {\n const componentNameSafe = componentName || '<>';\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The ${location} \\`${propFullNameSafe}\\` of ` + `\\`${componentNameSafe}\\` is deprecated. ${reason}`);\n }\n return null;\n };\n}","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n var _muiName, _element$type;\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from '../ownerDocument';\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function requirePropFactory(componentNameInError, Component) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n\n // eslint-disable-next-line react/forbid-foreign-prop-types\n const prevPropTypes = Component ? _extends({}, Component.propTypes) : null;\n const requireProp = requiredProp => (props, propName, componentName, location, propFullName, ...args) => {\n const propFullNameSafe = propFullName || propName;\n const defaultTypeChecker = prevPropTypes == null ? void 0 : prevPropTypes[propFullNameSafe];\n if (defaultTypeChecker) {\n const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args);\n if (typeCheckerResult) {\n return typeCheckerResult;\n }\n }\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(`The prop \\`${propFullNameSafe}\\` of ` + `\\`${componentNameInError}\\` can only be used together with the \\`${requiredProp}\\` prop.`);\n }\n return null;\n };\n return requireProp;\n}","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseId = React['useId'.toString()];\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride != null ? idOverride : reactId;\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","export default function unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The prop \\`${propFullNameSafe}\\` is not supported. Please remove it.`);\n }\n return null;\n}","'use client';\n\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && defaultValue !== defaultProp) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '../useEnhancedEffect';\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nimport setRef from '../setRef';\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport useLazyRef from '../useLazyRef/useLazyRef';\nimport useOnMount from '../useOnMount/useOnMount';\nexport class Timeout {\n constructor() {\n this.currentId = null;\n this.clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n this.disposeEffect = () => {\n return this.clear;\n };\n }\n static create() {\n return new Timeout();\n }\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","'use client';\n\n// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nimport * as React from 'react';\nimport { Timeout } from '../useTimeout/useTimeout';\nlet hadKeyboardEvent = true;\nlet hadFocusVisibleRecently = false;\nconst hadFocusVisibleRecentlyTimeout = new Timeout();\nconst inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @returns {boolean}\n */\nfunction focusTriggersKeyboardModality(node) {\n const {\n type,\n tagName\n } = node;\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n if (node.isContentEditable) {\n return true;\n }\n return false;\n}\n\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n hadKeyboardEvent = true;\n}\n\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\nexport function teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\nfunction isFocusVisible(event) {\n const {\n target\n } = event;\n try {\n return target.matches(':focus-visible');\n } catch (error) {\n // Browsers not implementing :focus-visible will throw a SyntaxError.\n // We use our own heuristic for those browsers.\n // Rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n }\n\n // No need for validFocusTarget check. The user does that by attaching it to\n // focusable events only.\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\nexport default function useIsFocusVisible() {\n const ref = React.useCallback(node => {\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n const isFocusVisibleRef = React.useRef(false);\n\n /**\n * Should be called if a blur event is fired\n */\n function handleBlurVisible() {\n // checking against potential state variable does not suffice if we focus and blur synchronously.\n // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.\n // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.\n // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751\n // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).\n if (isFocusVisibleRef.current) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n hadFocusVisibleRecentlyTimeout.start(100, () => {\n hadFocusVisibleRecently = false;\n });\n isFocusVisibleRef.current = false;\n return true;\n }\n return false;\n }\n\n /**\n * Should be called if a blur event is fired\n */\n function handleFocusVisible(event) {\n if (isFocusVisible(event)) {\n isFocusVisibleRef.current = true;\n return true;\n }\n return false;\n }\n return {\n isFocusVisibleRef,\n onFocus: handleFocusVisible,\n onBlur: handleBlurVisible,\n ref\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param {object} defaultProps\n * @param {object} props\n * @returns {object} resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = _extends({}, props);\n Object.keys(defaultProps).forEach(propName => {\n if (propName.toString().match(/^(components|slots)$/)) {\n output[propName] = _extends({}, defaultProps[propName], output[propName]);\n } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {\n const defaultSlotProps = defaultProps[propName] || {};\n const slotProps = props[propName];\n output[propName] = {};\n if (!slotProps || !Object.keys(slotProps)) {\n // Reduce the iteration if the slot props is empty\n output[propName] = defaultSlotProps;\n } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {\n // Reduce the iteration if the default slot props is empty\n output[propName] = slotProps;\n } else {\n output[propName] = _extends({}, slotProps);\n Object.keys(defaultSlotProps).forEach(slotPropName => {\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n });\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n });\n return output;\n}","export default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n Object.keys(slots).forEach(\n // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n const utilityClass = getUtilityClass(key);\n if (utilityClass !== '') {\n acc.push(utilityClass);\n }\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n }\n return acc;\n }, []).join(' ');\n });\n return output;\n}","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from '../ClassNameGenerator';\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from '../generateUtilityClass';\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"values\", \"unit\", \"step\"];\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return _extends({}, acc, {\n [obj.key]: obj.val\n });\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5\n } = breakpoints,\n other = _objectWithoutPropertiesLoose(breakpoints, _excluded);\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return _extends({\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit\n }, other);\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import PropTypes from 'prop-types';\nconst responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};\nexport default responsivePropType;","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from './merge';\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme\n }, props[key]));\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nimport { getPath } from './style';\nimport merge from './merge';\nimport memoize from './memoize';\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n var _getPath;\n const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;\n if (typeof themeSpacing === 'number') {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);\n }\n }\n return themeSpacing * abs;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n return themeSpacing[abs];\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n const abs = Math.abs(propValue);\n const transformed = transformer(abs);\n if (propValue >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (keys.indexOf(prop) === -1) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","import { createUnarySpacing } from '../spacing';\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n\n // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n // Smaller components, such as icons, can align to a 4dp grid.\n // https://m2.material.io/design/layout/understanding-layout.html\n const transform = createUnarySpacing({\n spacing: spacingInput\n });\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","import merge from './merge';\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from './responsivePropType';\nimport style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nimport responsivePropType from './responsivePropType';\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from './style';\nimport compose from './compose';\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from './style';\nimport compose from './compose';\nimport { handleBreakpoints, values as breakpointsValues } from './breakpoints';\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n var _props$theme, _props$theme2;\n const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from '../spacing';\nimport { borderRadius, borderTransform } from '../borders';\nimport { gap, rowGap, columnGap } from '../cssGrid';\nimport { paletteTransform } from '../palette';\nimport { maxWidth, sizingTransform } from '../sizing';\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import capitalize from '@mui/utils/capitalize';\nimport merge from '../merge';\nimport { getPath, getStyleValue as getValue } from '../style';\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from '../breakpoints';\nimport defaultSxConfig from './defaultSxConfig';\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n var _theme$unstable_sxCon;\n const {\n sx,\n theme = {}\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n return removeUnusedBreakpoints(breakpointsKeys, css);\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n *\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars && typeof theme.getColorSchemeSelector === 'function') {\n // If CssVarsProvider is used as a provider,\n // returns '* :where([data-mui-color-scheme=\"light|dark\"]) &'\n const selector = theme.getColorSchemeSelector(key).replace(/(\\[[^\\]]+\\])/, '*:where($1)');\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"breakpoints\", \"palette\", \"spacing\", \"shape\"];\nimport deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from './createBreakpoints';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport styleFunctionSx from '../styleFunctionSx/styleFunctionSx';\nimport defaultSxConfig from '../styleFunctionSx/defaultSxConfig';\nimport applyStyles from './applyStyles';\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: _extends({\n mode: 'light'\n }, paletteInput),\n spacing,\n shape: _extends({}, shape, shapeInput)\n }, other);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nexport default createTheme;","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","'use client';\n\nimport createTheme from './createTheme';\nimport useThemeWithoutDefault from './useThemeWithoutDefault';\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ownerState\"],\n _excluded2 = [\"variants\"],\n _excluded3 = [\"name\", \"slot\", \"skipVariantsResolver\", \"skipSx\", \"overridesResolver\"];\n/* eslint-disable no-underscore-dangle */\nimport styledEngineStyled, { internal_processStyles as processStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from './createTheme';\nimport styleFunctionSx from './styleFunctionSx';\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport const systemDefaultTheme = createTheme();\nconst lowercaseFirstLetter = string => {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n};\nfunction resolveTheme({\n defaultTheme,\n theme,\n themeId\n}) {\n return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (props, styles) => styles[slot];\n}\nfunction processStyleArg(callableStyle, _ref) {\n let {\n ownerState\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n const resolvedStylesArg = typeof callableStyle === 'function' ? callableStyle(_extends({\n ownerState\n }, props)) : callableStyle;\n if (Array.isArray(resolvedStylesArg)) {\n return resolvedStylesArg.flatMap(resolvedStyle => processStyleArg(resolvedStyle, _extends({\n ownerState\n }, props)));\n }\n if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {\n const {\n variants = []\n } = resolvedStylesArg,\n otherStyles = _objectWithoutPropertiesLoose(resolvedStylesArg, _excluded2);\n let result = otherStyles;\n variants.forEach(variant => {\n let isMatch = true;\n if (typeof variant.props === 'function') {\n isMatch = variant.props(_extends({\n ownerState\n }, props, ownerState));\n } else {\n Object.keys(variant.props).forEach(key => {\n if ((ownerState == null ? void 0 : ownerState[key]) !== variant.props[key] && props[key] !== variant.props[key]) {\n isMatch = false;\n }\n });\n }\n if (isMatch) {\n if (!Array.isArray(result)) {\n result = [result];\n }\n result.push(typeof variant.style === 'function' ? variant.style(_extends({\n ownerState\n }, props, ownerState)) : variant.style);\n }\n });\n return result;\n }\n return resolvedStylesArg;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n const systemSx = props => {\n return styleFunctionSx(_extends({}, props, {\n theme: resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }))\n }));\n };\n systemSx.__mui_systemSx = true;\n return (tag, inputOptions = {}) => {\n // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.\n processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))\n } = inputOptions,\n options = _objectWithoutPropertiesLoose(inputOptions, _excluded3);\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, _extends({\n shouldForwardProp: shouldForwardPropOption,\n label\n }, options));\n const transformStyleArg = stylesArg => {\n // On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg || isPlainObject(stylesArg)) {\n return props => processStyleArg(stylesArg, _extends({}, props, {\n theme: resolveTheme({\n theme: props.theme,\n defaultTheme,\n themeId\n })\n }));\n }\n return stylesArg;\n };\n const muiStyledResolver = (styleArg, ...expressions) => {\n let transformedStyleArg = transformStyleArg(styleArg);\n const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];\n if (componentName && overridesResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {\n return null;\n }\n const styleOverrides = theme.components[componentName].styleOverrides;\n const resolvedStyleOverrides = {};\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {\n resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, _extends({}, props, {\n theme\n }));\n });\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsWithDefaultTheme.push(props => {\n var _theme$components;\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants;\n return processStyleArg({\n variants: themeVariants\n }, _extends({}, props, {\n theme\n }));\n });\n }\n if (!skipSx) {\n expressionsWithDefaultTheme.push(systemSx);\n }\n const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;\n if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {\n const placeholders = new Array(numOfCustomFnsApplied).fill('');\n // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.\n transformedStyleArg = [...styleArg, ...placeholders];\n transformedStyleArg.raw = [...styleArg.raw, ...placeholders];\n }\n const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n let displayName;\n if (componentName) {\n displayName = `${componentName}${capitalize(componentSlot || '')}`;\n }\n if (displayName === undefined) {\n displayName = `Styled(${getDisplayName(tag)})`;\n }\n Component.displayName = displayName;\n }\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n}","import resolveProps from '@mui/utils/resolveProps';\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n return resolveProps(theme.components[name].defaultProps, props);\n}","'use client';\n\nimport getThemeProps from './getThemeProps';\nimport useTheme from '../useTheme';\nexport default function useThemeProps({\n props,\n name,\n defaultTheme,\n themeId\n}) {\n let theme = useTheme(defaultTheme);\n if (themeId) {\n theme = theme[themeId] || theme;\n }\n const mergedProps = getThemeProps({\n theme,\n name,\n props\n });\n return mergedProps;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport clamp from '@mui/utils/clamp';\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return clamp(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nexport function hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : _formatMuiErrorMessage(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : _formatMuiErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nexport const colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexport const private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nexport function rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nexport function private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nexport function private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nexport function blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, mixins) {\n return _extends({\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n }\n }, mixins);\n}","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"mode\", \"contrastThreshold\", \"tonalOffset\"];\nimport { deepmerge } from '@mui/utils';\nimport { darken, getContrastRatio, lighten } from '@mui/system';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport purple from '../colors/purple';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport lightBlue from '../colors/lightBlue';\nimport green from '../colors/green';\nexport const light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport const dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2\n } = palette,\n other = _objectWithoutPropertiesLoose(palette, _excluded);\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = _extends({}, color);\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\nThe color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from \"@mui/material/colors\";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });` : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n const modes = {\n dark,\n light\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!modes[mode]) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: _extends({}, common),\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset\n }, modes[mode]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"];\nimport { deepmerge } from '@mui/utils';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const _ref = typeof typography === 'function' ? typography(palette) : typography,\n {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}, casing, allVariants);\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge(_extends({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"duration\", \"easing\", \"delay\"];\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = _extends({}, easing, inputTransitions.easing);\n const mergedDuration = _extends({}, duration, inputTransitions.duration);\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n // IE11 support, replace with Number.isNaN\n // eslint-disable-next-line no-restricted-globals\n const isNumber = value => !isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return _extends({\n getAutoHeightDuration,\n create\n }, inputTransitions, {\n easing: mergedEasing,\n duration: mergedDuration\n });\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"breakpoints\", \"mixins\", \"spacing\", \"palette\", \"transitions\", \"typography\", \"shape\"];\nimport { deepmerge } from '@mui/utils';\nimport { createTheme as systemCreateTheme, unstable_defaultSxConfig as defaultSxConfig, unstable_styleFunctionSx as styleFunctionSx } from '@mui/system';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport createTransitions from './createTransitions';\nimport zIndex from './zIndex';\nfunction createTheme(options = {}, ...args) {\n const {\n mixins: mixinsInput = {},\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (options.vars) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`vars\\` is a private field used for CSS variables support.\nPlease use another name.` : _formatMuiErrorMessage(18));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: _extends({}, zIndex)\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (key in node) {\n const child = node[key];\n if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.indexOf('Mui') === 0) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createTheme(...args);\n}\nexport default createTheme;","'use client';\n\nimport createTheme from './createTheme';\nconst defaultTheme = createTheme();\nexport default defaultTheme;","export default '$$material';","'use client';\n\nimport { useThemeProps as systemUseThemeProps } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport default function useThemeProps({\n props,\n name\n}) {\n return systemUseThemeProps({\n props,\n name,\n defaultTheme,\n themeId: THEME_ID\n });\n}","'use client';\n\nimport { createStyled, shouldForwardProp } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';\nexport const slotShouldForwardProp = shouldForwardProp;\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"inheritViewBox\", \"titleAccess\", \"viewBox\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport { getSvgIconUtilityClass } from './svgIconClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3;\n return {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n // the will define the property that has `currentColor`\n // e.g. heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',\n flexShrink: 0,\n transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {\n duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter\n }),\n fontSize: {\n inherit: 'inherit',\n small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',\n medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',\n large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'\n }[ownerState.fontSize],\n // TODO v5 deprecate, v6 remove for sx\n color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : {\n action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active,\n disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled,\n inherit: undefined\n }[ownerState.color]\n };\n});\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = _extends({}, props, {\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n });\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, more, other, hasSvgAsChild && children.props, {\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', '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 fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\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 * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport SvgIcon from '../SvgIcon';\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, _extends({\n \"data-testid\": `${displayName}Icon`,\n ref: ref\n }, props, {\n children: path\n }));\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));\n}","'use client';\n\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/base/ClassNameGenerator';\nexport { default as capitalize } from './capitalize';\nexport { default as createChainedFunction } from './createChainedFunction';\nexport { default as createSvgIcon } from './createSvgIcon';\nexport { default as debounce } from './debounce';\nexport { default as deprecatedPropType } from './deprecatedPropType';\nexport { default as isMuiElement } from './isMuiElement';\nexport { default as ownerDocument } from './ownerDocument';\nexport { default as ownerWindow } from './ownerWindow';\nexport { default as requirePropFactory } from './requirePropFactory';\nexport { default as setRef } from './setRef';\nexport { default as unstable_useEnhancedEffect } from './useEnhancedEffect';\nexport { default as unstable_useId } from './useId';\nexport { default as unsupportedProp } from './unsupportedProp';\nexport { default as useControlled } from './useControlled';\nexport { default as useEventCallback } from './useEventCallback';\nexport { default as useForkRef } from './useForkRef';\nexport { default as useIsFocusVisible } from './useIsFocusVisible';\n// TODO: remove this export once ClassNameGenerator is stable\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const unstable_ClassNameGenerator = {\n configure: generator => {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(['MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.', '', \"You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead\", '', 'The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401', '', 'The updated documentation: https://mui.com/guides/classname-generator/'].join('\\n'));\n }\n ClassNameGenerator.configure(generator);\n }\n};","\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\nvar _utils = require(\"@mui/material/utils\");","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m10 17 5-5-5-5z\"\n}), 'ArrowRight');","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nexport function isHostComponent(element) {\n return typeof element === 'string';\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { isHostComponent } from './isHostComponent';\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nexport function appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return _extends({}, otherProps, {\n ownerState: _extends({}, otherProps.ownerState, ownerState)\n });\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}","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nexport function extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nexport function resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nexport function omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport clsx from 'clsx';\nimport { extractEventHandlers } from './extractEventHandlers';\nimport { omitEventHandlers } from './omitEventHandlers';\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nexport function mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}","'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}","import { globalStateClasses } from '@mui/utils/generateUtilityClass';\nconst GLOBAL_CLASS_PREFIX = 'base';\nfunction buildStateClass(state) {\n return `${GLOBAL_CLASS_PREFIX}--${state}`;\n}\nfunction buildSlotClass(componentName, slot) {\n return `${GLOBAL_CLASS_PREFIX}-${componentName}-${slot}`;\n}\nexport function generateUtilityClass(componentName, slot) {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? buildStateClass(globalStateClass) : buildSlotClass(componentName, slot);\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import { generateUtilityClass } from '../generateUtilityClass';\nexport function generateUtilityClasses(componentName, slots) {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot);\n });\n return result;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://mui.com/base-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://mui.com/base-ui/react-portal/components-api/#portal)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n // @ts-expect-error TODO upstream fix\n const handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? children.ref : null, forwardedRef);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(forwardedRef, mountNode);\n return () => {\n setRef(forwardedRef, null);\n };\n }\n return undefined;\n }, [forwardedRef, mountNode, disablePortal]);\n if (disablePortal) {\n if ( /*#__PURE__*/React.isValidElement(children)) {\n const newProps = {\n ref: handleRef\n };\n return /*#__PURE__*/React.cloneElement(children, newProps);\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: children\n });\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport { Portal };","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];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","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 };","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 { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","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 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 { 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}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\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 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 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 default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\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}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\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};","export default function getVariation(placement) {\n return placement.split('-')[1];\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 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};","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 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}","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\";\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 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 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}","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 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 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 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 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 { 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 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};","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};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\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 getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\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}","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 { 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}","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 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 };","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 { generateUtilityClass } from '../generateUtilityClass';\nimport { generateUtilityClasses } from '../generateUtilityClasses';\nconst COMPONENT_NAME = 'Popper';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass(COMPONENT_NAME, slot);\n}\nexport const popperClasses = generateUtilityClasses(COMPONENT_NAME, ['root']);","'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 the TypeScript types and run `pnpm 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 * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 };","'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}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default {\n disabled: false\n};","import PropTypes from 'prop-types';\nexport var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number,\n appear: PropTypes.number\n}).isRequired]) : null;\nexport var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string,\n active: PropTypes.string\n}), PropTypes.shape({\n enter: PropTypes.string,\n enterDone: PropTypes.string,\n enterActive: PropTypes.string,\n exit: PropTypes.string,\n exitDone: PropTypes.string,\n exitActive: PropTypes.string\n})]) : null;","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n var _style$transitionDura, _style$transitionTimi;\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: (_style$transitionDura = style.transitionDuration) != null ? _style$transitionDura : typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,\n easing: (_style$transitionTimi = style.transitionTimingFunction) != null ? _style$transitionTimi : typeof easing === 'object' ? easing[options.mode] : easing,\n delay: style.transitionDelay\n };\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"addEndListener\", \"appear\", \"children\", \"easing\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { elementAcceptingRef, unstable_useTimeout as useTimeout } from '@mui/utils';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps, reflow } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n\n/*\n TODO v6: remove\n Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.\n */\nconst isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\\/)15(.|_)4/i.test(navigator.userAgent);\n\n/**\n * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and\n * [Popover](/material-ui/react-popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const timer = useTimeout();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, children.ref, ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay: isWebKit154 ? delay : delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = 0;\n node.style.transform = getScale(0.75);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTimeout.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n }\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"anchorEl\", \"component\", \"components\", \"componentsProps\", \"container\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"transition\", \"slots\", \"slotProps\"];\nimport { Popper as BasePopper } from '@mui/base/Popper';\nimport { useThemeWithoutDefault as useTheme } from '@mui/system';\nimport { HTMLElementType, refType } from '@mui/utils';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { styled, useThemeProps } from '../styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n name: 'MuiPopper',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://mui.com/material-ui/react-menu/)\n * - [Popper](https://mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n var _slots$root;\n const theme = useTheme();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPopper'\n });\n const {\n anchorEl,\n component,\n components,\n componentsProps,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;\n const otherProps = _extends({\n anchorEl,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition\n }, other);\n return /*#__PURE__*/_jsx(PopperRoot, _extends({\n as: component,\n direction: theme == null ? void 0 : theme.direction,\n slots: {\n root: RootComponent\n },\n slotProps: slotProps != null ? slotProps : componentsProps\n }, otherProps, {\n ref: ref\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 the TypeScript types and run `pnpm 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: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\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 components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 * 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 * 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 * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"arrow\", \"children\", \"classes\", \"components\", \"componentsProps\", \"describeChild\", \"disableFocusListener\", \"disableHoverListener\", \"disableInteractive\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"followCursor\", \"id\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"slotProps\", \"slots\", \"title\", \"TransitionComponent\", \"TransitionProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementAcceptingRef, unstable_useTimeout as useTimeout, unstable_Timeout as Timeout } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses, appendOwnerState } from '@mui/base';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport Grow from '../Grow';\nimport Popper from '../Popper';\nimport useEventCallback from '../utils/useEventCallback';\nimport useForkRef from '../utils/useForkRef';\nimport useId from '../utils/useId';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useControlled from '../utils/useControlled';\nimport tooltipClasses, { getTooltipUtilityClass } from './tooltipClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(({\n theme,\n ownerState,\n open\n}) => _extends({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none'\n}, !ownerState.disableInteractive && {\n pointerEvents: 'auto'\n}, !open && {\n pointerEvents: 'none'\n}, ownerState.arrow && {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {\n left: 0,\n marginLeft: '-0.71em'\n } : {\n right: 0,\n marginRight: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n }),\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {\n right: 0,\n marginRight: '-0.71em'\n } : {\n left: 0,\n marginLeft: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n })\n}));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.arrow && {\n position: 'relative',\n margin: 0\n}, ownerState.touch && {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n}, {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: _extends({\n transformOrigin: 'right center'\n }, !ownerState.isRtl ? _extends({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n }) : _extends({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n })),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: _extends({\n transformOrigin: 'left center'\n }, !ownerState.isRtl ? _extends({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n }) : _extends({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n })),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: _extends({\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n }, ownerState.touch && {\n marginBottom: '24px'\n }),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: _extends({\n transformOrigin: 'center top',\n marginTop: '14px'\n }, ownerState.touch && {\n marginTop: '24px'\n })\n}));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n}));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return event => {\n if (eventHandler) {\n eventHandler(event);\n }\n handler(event);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n var _ref, _slots$popper, _ref2, _ref3, _slots$transition, _ref4, _slots$tooltip, _ref5, _slots$arrow, _slotProps$popper, _ref6, _slotProps$popper2, _slotProps$transition, _slotProps$tooltip, _ref7, _slotProps$tooltip2, _slotProps$arrow, _ref8, _slotProps$arrow2;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp = Grow,\n TransitionProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleEnter = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = useIsFocusVisible();\n // We don't necessarily care about the focusVisible state (which is safe to access via ref anyway).\n // We just need to re-render the Tooltip if the focus-visible state changes.\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n handleBlurVisible(event);\n if (isFocusVisibleRef.current === false) {\n setChildIsFocusVisible(false);\n handleLeave(event);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n handleFocusVisible(event);\n if (isFocusVisibleRef.current === true) {\n setChildIsFocusVisible(true);\n handleEnter(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleMouseOver = handleEnter;\n const handleMouseLeave = handleLeave;\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleEnter(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Bink?) use 'Esc'\n if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = _extends({}, nameOrDescProps, other, children.props, {\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n }, followCursor ? {\n onMouseMove: handleMouseMove\n } : {});\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const popperOptions = React.useMemo(() => {\n var _PopperProps$popperOp;\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if ((_PopperProps$popperOp = PopperProps.popperOptions) != null && _PopperProps$popperOp.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n return _extends({}, PopperProps.popperOptions, {\n modifiers: tooltipModifiers\n });\n }, [arrowRef, PopperProps]);\n const ownerState = _extends({}, props, {\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n });\n const classes = useUtilityClasses(ownerState);\n const PopperComponent = (_ref = (_slots$popper = slots.popper) != null ? _slots$popper : components.Popper) != null ? _ref : TooltipPopper;\n const TransitionComponent = (_ref2 = (_ref3 = (_slots$transition = slots.transition) != null ? _slots$transition : components.Transition) != null ? _ref3 : TransitionComponentProp) != null ? _ref2 : Grow;\n const TooltipComponent = (_ref4 = (_slots$tooltip = slots.tooltip) != null ? _slots$tooltip : components.Tooltip) != null ? _ref4 : TooltipTooltip;\n const ArrowComponent = (_ref5 = (_slots$arrow = slots.arrow) != null ? _slots$arrow : components.Arrow) != null ? _ref5 : TooltipArrow;\n const popperProps = appendOwnerState(PopperComponent, _extends({}, PopperProps, (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper, {\n className: clsx(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_ref6 = (_slotProps$popper2 = slotProps.popper) != null ? _slotProps$popper2 : componentsProps.popper) == null ? void 0 : _ref6.className)\n }), ownerState);\n const transitionProps = appendOwnerState(TransitionComponent, _extends({}, TransitionProps, (_slotProps$transition = slotProps.transition) != null ? _slotProps$transition : componentsProps.transition), ownerState);\n const tooltipProps = appendOwnerState(TooltipComponent, _extends({}, (_slotProps$tooltip = slotProps.tooltip) != null ? _slotProps$tooltip : componentsProps.tooltip, {\n className: clsx(classes.tooltip, (_ref7 = (_slotProps$tooltip2 = slotProps.tooltip) != null ? _slotProps$tooltip2 : componentsProps.tooltip) == null ? void 0 : _ref7.className)\n }), ownerState);\n const tooltipArrowProps = appendOwnerState(ArrowComponent, _extends({}, (_slotProps$arrow = slotProps.arrow) != null ? _slotProps$arrow : componentsProps.arrow, {\n className: clsx(classes.arrow, (_ref8 = (_slotProps$arrow2 = slotProps.arrow) != null ? _slotProps$arrow2 : componentsProps.arrow) == null ? void 0 : _ref8.className)\n }), ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperComponent, _extends({\n as: PopperComponentProp != null ? PopperComponentProp : Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true\n }, interactiveWrapperListeners, popperProps, {\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionComponent, _extends({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, transitionProps, {\n children: /*#__PURE__*/_jsxs(TooltipComponent, _extends({}, tooltipProps, {\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowComponent, _extends({}, tooltipArrowProps, {\n ref: setArrowRef\n })) : null]\n }))\n }))\n }))]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `slots` prop.\n * It's recommended to use the `slots` prop instead.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `slotProps` prop.\n * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @default Popper\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](/material-ui/api/popper/) element.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: 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 * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","import '@/components/mui/menu-item.component.css';\nimport ArrowRightIcon from '@mui/icons-material/ArrowRight';\nimport {\n ListItemIcon as MuiListItemIcon,\n ListItemText as MuiListItemText,\n MenuItem as MuiMenuItem,\n} from '@mui/material';\nimport Tooltip from '@mui/material/Tooltip';\nimport { Localized, ReferencedItem, SingleColumnMenu } from 'platform-bible-utils';\nimport { MouseEvent, PropsWithChildren } from 'react';\n\ntype MenuItemInfoBase = {\n /** Text (displayable in the UI) as the name of the menu item */\n label: string;\n /** Text to display when the mouse hovers over the menu item */\n tooltip?: string;\n};\n\nexport type Command = MenuItemInfoBase & {\n /** Command to execute (string.string) */\n command: string;\n};\n\ntype SubMenu = MenuItemInfoBase & {\n /** Command to execute (string.string) */\n items: MenuItemInfo[];\n};\n\nexport interface CommandHandler {\n (command: Command): void;\n}\n\nexport type MenuPropsBase = {\n /*\n * The JSON defining the menu whose items are to be rendered. This will typically be one of the\n * menus in the \"defs\" in a Platform.Bible menu (see PlatformMenus). The schema for this is\n * menuDocumentSchema (at the end of menus.model.ts). Note that while this is a\n * \"SingleColumnMenu\", somewhat bizarrely, a MultiColumnMenu is a SingleColumnMenu, so it really\n * could be a MultiColumnMenu, in which case, column had better be defined so it can be used\n * to filter out the actual groups and items to display on the column.\n */\n menuDefinition: Localized;\n\n commandHandler: CommandHandler;\n\n /**\n * Additional action to perform when any menu item is clicked. Allows the caller to handle event\n * (e.g., to close the menu).\n */\n onClick?: (event: MouseEvent) => void;\n};\n\nexport type MenuItemListProps = MenuPropsBase & {\n /** Optional unique (column) identifier */\n columnId?: ReferencedItem;\n};\n\nexport type MenuItemProps = Omit &\n PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n\n onClick: (event: MouseEvent) => void;\n }>;\n\ntype MenuItemInfo = (Command | SubMenu) & {\n /**\n * If specified, menu item will be inset if it does not have a leading icon.\n *\n * @default true\n */\n allowForLeadingIcons?: boolean;\n /**\n * If specified, the path to the icon image to display on the leading side of the menu text.\n *\n * @default undefined (no leading icon will be shown)\n */\n iconPathBefore?: string;\n /**\n * If specified, the path to the icon image to display on the trailing side of the menu text.\n *\n * @default undefined (no trailing icon will be shown)\n */\n iconPathAfter?: string;\n /**\n * If true, list item is focused during the first mount\n *\n * @default false\n */\n hasAutoFocus?: boolean;\n\n /** Additional css classes to help with unique styling of the menu item */\n className?: string;\n\n /**\n * If true, the menu item will appear disabled and it will not respond to clicks or mouse hovers.\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * If true, compact vertical padding designed for keyboard and mouse input is used.\n *\n * @default true\n */\n isDense?: boolean;\n\n /**\n * If true, a right-arrow icon will be displayed (iconPathAfter, if specified, will be ignored).\n *\n * @default false\n */\n isSubMenuParent?: boolean;\n\n /**\n * If true, the left and right padding is removed\n *\n * @default false\n */\n hasDisabledGutters?: boolean;\n\n /**\n * If true, a 1px light border is added to bottom of menu item\n *\n * @default false\n */\n hasDivider?: boolean;\n\n /** Help identify which element has keyboard focus */\n focusVisibleClassName?: string;\n\n /** If it's a submenu, it should have the items property */\n items?: MenuItemInfo[];\n};\n\nfunction getIcon(icon: string | undefined, menuLabel: string, leading: boolean) {\n return icon ? (\n \n {`${leading\n \n ) : undefined;\n}\n\nexport default function MenuItem(props: MenuItemProps) {\n const {\n onClick,\n label,\n tooltip,\n allowForLeadingIcons = true,\n iconPathBefore = undefined,\n iconPathAfter = undefined,\n hasAutoFocus = false,\n className,\n isDisabled = false,\n isDense = true,\n isSubMenuParent = false,\n hasDisabledGutters = false,\n hasDivider = false,\n focusVisibleClassName,\n id,\n children,\n } = props;\n\n const menuItem = (\n \n {label ? (\n <>\n {getIcon(iconPathBefore, label, true)}\n \n {isSubMenuParent ? (\n \n \n \n ) : (\n getIcon(iconPathAfter, label, false)\n )}\n \n ) : (\n children\n )}\n \n );\n\n return tooltip ? (\n \n
{menuItem}
\n
\n ) : (\n menuItem\n );\n}\n","import MenuItem, {\n MenuItemListProps,\n MenuItemProps,\n MenuPropsBase,\n} from '@/components/mui/menu-item.component';\nimport { Menu } from '@mui/material';\nimport {\n Localized,\n MenuGroupDetailsInSubMenu,\n MenuItemContainingCommand,\n MenuItemContainingSubmenu,\n OrderedExtensibleContainer,\n ReferencedItem,\n SingleColumnMenu,\n} from 'platform-bible-utils';\nimport { MouseEvent, useMemo, useState } from 'react';\n\n/**\n * All the exported types in this file should be regarded as \"internal\" (i.e., they should not be\n * exposed via index.ts).\n */\n\nexport type GroupedMenuPropsBase = MenuPropsBase & {\n /** Optional unique (column) identifier */\n columnId?: ReferencedItem;\n};\n\nexport type GroupedMenuItemListProps = MenuItemListProps & {\n /**\n * If the menuDefinition includes \"top-level\" groups (i.e., those that belong to a column as\n * opposed to those that belong to a submenu) that should not be included in the list, then this\n * array specifies which groups to include. Likewise, for a submenu, this list indicates which\n * groups are pertinent for that submenu. So then for a context menu this property need not be\n * specified since it is a top-level menu based on a \"true\" SingleColumnMenu (i.e., one that is\n * not a MultiColumnMenu).\n */\n includedGroups?: {\n id: string;\n group: Localized;\n }[];\n};\n\ninterface ItemInfo {\n item: Localized;\n isLastItemInGroup: boolean;\n}\n\ntype SubMenuProps = MenuPropsBase & {\n parentMenuItem: Localized;\n parentItemProps: Omit, 'iconPathAfter'>;\n};\n\nfunction getAllGroups(menuDefinition: Localized) {\n const groupEntries = Object.entries(menuDefinition.groups);\n // Convert array of entries to array of objects with id and group properties\n return groupEntries.map(([key, value]) => ({ id: key, group: value }));\n}\n\nfunction SubMenu(props: SubMenuProps) {\n const [anchorEl, setAnchorEl] = useState(undefined);\n\n const { parentMenuItem, parentItemProps, menuDefinition } = props;\n\n const handleParentMenuItemClick = (event: MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(undefined);\n };\n\n const renderSubMenuItems = () => {\n let includedGroups = getAllGroups(menuDefinition).filter((g) => 'menuItem' in g.group);\n\n // Ensure valid parent menu was provided. (If not, submenu will contain all groups!)\n if (!parentMenuItem?.id) throw new Error('A valid parent menu item is required for submenus.');\n\n // When laying out a submenu, only include groups associated with the provided parent menu.\n // Note: without the (annoying) redundant check that the included groups\n // have the menuItem field, TS doesn't think it exists.\n includedGroups = includedGroups.filter(\n (group) => 'menuItem' in group.group && group.group.menuItem === parentMenuItem.id,\n );\n\n return ;\n };\n\n return (\n <>\n \n \n {renderSubMenuItems()}\n \n \n );\n}\n\nconst getOrderedGroupItems = (\n groupId: string,\n allItems: Localized[],\n) => {\n // Filter items that belong to the specified group\n const itemsForGroup = allItems.filter((item) => item.group === groupId);\n // Sort items based on order\n const sortedItems = itemsForGroup.sort((a, b) => (a.order || 0) - (b.order || 0));\n return sortedItems;\n};\n\n/**\n * This component is internal; it does not need to be exposed to the outside world since it is not\n * useful on its own. It is used to generate and lay out the MenuItems that appear either on a\n * top-level menu (in a GridMenu or ContextMenu) or in a submenu.\n */\nexport default function GroupedMenuItemList(menuProps: GroupedMenuItemListProps) {\n const { menuDefinition, onClick, commandHandler, includedGroups } = menuProps;\n\n const { items, allowForLeadingIcons } = useMemo(() => {\n const groupsToInclude =\n includedGroups && includedGroups.length > 0\n ? includedGroups\n : // We're apparently laying out a single-column menu (presumably a context menu). In this\n // case, all groups should be included except ones that belong to a submenu.\n getAllGroups(menuDefinition).filter((g) => !('menuItem' in g.group));\n\n const sortedGroups = Object.values(groupsToInclude).sort(\n (a, b) => (a.group.order || 0) - (b.group.order || 0),\n );\n\n const itemArray: ItemInfo[] = [];\n\n sortedGroups.forEach((group) => {\n getOrderedGroupItems(group.id, menuDefinition.items).forEach((item) =>\n itemArray.push({ item, isLastItemInGroup: false }),\n );\n if (itemArray.length > 0) itemArray[itemArray.length - 1].isLastItemInGroup = true;\n });\n\n // No divider after last item in final group.\n if (itemArray.length > 0) itemArray[itemArray.length - 1].isLastItemInGroup = false;\n\n const allowSpaceForLeadingIcons = itemArray.some(\n (i) => 'iconPathBefore' in i.item && i.item.iconPathBefore,\n );\n\n return { items: itemArray, allowForLeadingIcons: allowSpaceForLeadingIcons };\n }, [includedGroups, menuDefinition]);\n\n // Create props for MenuItem component including setting hasDivider for the last item in a group\n const createMenuItemProps = ({ item, isLastItemInGroup }: ItemInfo) => {\n const menuItemProps = {\n className: 'papi-menu-item',\n label: item.label,\n tooltip: item.tooltip,\n iconPathBefore: 'iconPathBefore' in item ? item.iconPathBefore : undefined,\n iconPathAfter: 'iconPathAfter' in item ? item.iconPathAfter : undefined,\n hasDivider: isLastItemInGroup, // Set hasDivider to true for the last item in a group\n allowForLeadingIcons,\n };\n\n return menuItemProps;\n };\n\n const [firstItem] = items;\n\n if (!firstItem) return
;\n\n const divKey = firstItem.item.group;\n\n return (\n
\n {items.map((itemInfo, index) => {\n const { item } = itemInfo;\n const menuItemProps = createMenuItemProps(itemInfo);\n if ('command' in item) {\n const key = item.group + index;\n return (\n ) => {\n onClick?.(event);\n commandHandler(item);\n }}\n {...menuItemProps}\n />\n );\n }\n return (\n \n );\n })}\n
\n );\n}\n","import GroupedMenuItemList from '@/components/mui/grouped-menu-item-list.component';\nimport { MenuItemListProps } from '@/components/mui/menu-item.component';\nimport { MultiColumnMenu } from 'platform-bible-utils';\n\n/**\n * This component is internal; it does not need to be exposed to the outside world since it is not\n * useful on its own. Use either GridMenu or ContextMenu.\n */\nexport default function TopLevelMenu(props: MenuItemListProps) {\n const { menuDefinition, columnId } = props;\n\n const groupEntries = Object.entries(menuDefinition.groups);\n // Convert array of entries to array of objects with id and group properties\n const groups = groupEntries.map(([key, value]) => ({ id: key, group: value }));\n let includedGroups = groups.filter((g) => 'column' in g.group);\n\n // Check if column is provided and menuDefinition is a MultiColumnMenu\n if (\n columnId &&\n 'columns' in menuDefinition &&\n // Without this type assertion, TS doesn't know what columns is.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n (menuDefinition as MultiColumnMenu).columns[columnId]\n ) {\n // When laying out a single column in a MultiColumnMenu, only include groups associated with\n // the provided column. Note: without the (annoying) redundant check that the included groups\n // have the colum field, TS doesn't think it exists.\n includedGroups = includedGroups.filter(\n (g) => 'column' in g.group && g.group.column === columnId,\n );\n }\n\n return ;\n}\n","import '@/components/mui/grid-menu.component.css';\nimport { GroupedMenuPropsBase } from '@/components/mui/grouped-menu-item-list.component';\nimport { CommandHandler } from '@/components/mui/menu-item.component';\nimport TopLevelMenu from '@/components/mui/top-level-menu.component';\nimport { Grid, List } from '@mui/material';\nimport {\n Localized,\n MenuColumnWithHeader,\n MultiColumnMenu,\n ReferencedItem,\n} from 'platform-bible-utils';\nimport { useMemo } from 'react';\n\ntype ColumnInfo = {\n /*\n * The ID (`${string}.${string}`) of a specific menu column.\n */\n id: ReferencedItem;\n\n /*\n * Metadata (label, order, etc.) for a specific menu column.\n */\n metadata: Localized;\n};\n\ntype MenuColumnProps = ColumnInfo &\n GroupedMenuPropsBase & {\n /** Additional css classes to help with unique styling of the menu column */\n className?: string;\n };\n\nexport type GridMenuInfo = {\n /** The menu object containing information about the columns, groups, and items to display. */\n multiColumnMenu: Localized;\n};\n\nexport type GridMenuProps = GridMenuInfo & {\n /** Optional unique identifier */\n id?: string;\n\n commandHandler: CommandHandler;\n\n /** Additional css classes to help with unique styling of the grid menu */\n className?: string;\n};\n\nfunction MenuColumn({\n commandHandler,\n menuDefinition,\n id,\n metadata,\n onClick,\n className,\n}: MenuColumnProps) {\n return (\n \n

\n {metadata.label}\n

\n {/* It would seem as though this List component were unnecessary, since it only contains one\n thing, but the \"dense\" property does affect the layout of the items (in a way I don't fully\n understand). There might be a better way. */}\n \n \n \n \n );\n}\n\nexport default function GridMenu({\n commandHandler,\n className,\n multiColumnMenu,\n id,\n}: GridMenuProps) {\n const { columns } = multiColumnMenu;\n\n const sortedColumns = useMemo(() => {\n const columnNumbers = new Map();\n Object.getOwnPropertyNames(columns).forEach((columnName: string) => {\n // We know for sure there is a (boolean) property 'isExtensible' that we are not interested in.\n if (columnName === 'isExtensible') return;\n // TS doesn't allow `columnName` above to be a ReferencedItem even though the type says it is\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const columnId = columnName as ReferencedItem;\n const column = columns[columnId];\n // As of right now (and hopefully forever after), all remaining properties of the\n // ColumnsWithHeaders object are columns whose property names are the IDs of the columns.\n // This is an additional (redundant) sanity check. Specifically we're interested in\n // MenuColumnWithHeader objects, which TypeScript now \"knows\" we have, but at runtime all we\n // can check for is that it's an object with a valid numeric order field. That's likely good\n // enough.\n if (\n typeof column === 'object' &&\n typeof column.order === 'number' &&\n !Number.isNaN(column.order)\n )\n columnNumbers.set(column.order, { id: columnId, metadata: column });\n else\n console.warn(\n `Property ${columnName} (${typeof column}) on menu ${id} is not a valid column and is being ignored. This might indicate data corruption`,\n );\n });\n\n // Extract values and sort them based on the 'order' property\n return Array.from(columnNumbers.values()).sort((a, b) => {\n return (a.metadata.order || 0) - (b.metadata.order || 0);\n });\n }, [columns, id]);\n\n // We might need something like this if we need to be able to prevent empty columns\n // sortedColumns.filter((c) => multiColumnMenu.groups.some((g) => 'column' in g && (g as .column)...\n\n return (\n \n {sortedColumns.map((col, index) => (\n \n ))}\n \n );\n}\n","import { useEffect, useRef, useState } from 'react';\n\nexport type UsePromiseOptions = {\n /**\n * Whether to leave the value as the most recent resolved promise value or set it back to\n * defaultValue while running the promise again. Defaults to true\n */\n preserveValue?: boolean;\n};\n\n/** Set up defaults for options for usePromise hook */\nfunction getUsePromiseOptionsDefaults(options: UsePromiseOptions): UsePromiseOptions {\n return {\n preserveValue: true,\n ...options,\n };\n}\n\n/**\n * Awaits a promise and returns a loading value while the promise is unresolved\n *\n * @param promiseFactoryCallback A function that returns the promise to await. If this callback is\n * undefined, the current value will be returned (defaultValue unless it was previously changed\n * and `options.preserveValue` is true), and there will be no loading.\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n * @param defaultValue The initial value to return while first awaiting the promise. If\n * `options.preserveValue` is false, this value is also shown while awaiting the promise on\n * subsequent calls.\n *\n * Note: this parameter is internally assigned to a `ref`, so changing it will not cause any hooks\n * to re-run with its new value. This means that, if the `promiseFactoryCallback` changes and\n * `options.preserveValue` is `false`, the returned value will be set to the current\n * `defaultValue`. However, the returned value will not be updated if`defaultValue` changes.\n * @param options Various options for adjusting how this hook runs the `promiseFactoryCallback`\n *\n * Note: this parameter is internally assigned to a `ref`, so changing it will not cause any hooks\n * to re-run with its new value. However, the latest `options.preserveValue` will always be used\n * appropriately to determine whether to preserve the returned value when changing the\n * `promiseFactoryCallback`\n * @returns `[value, isLoading]`\n *\n * - `value`: the current value for the promise, either the defaultValue or the resolved promise value\n * - `isLoading`: whether the promise is waiting to be resolved\n */\nconst usePromise = (\n promiseFactoryCallback: (() => Promise) | undefined,\n defaultValue: T,\n options: UsePromiseOptions = {},\n): [value: T, isLoading: boolean] => {\n // Use defaultValue as a ref so it doesn't update dependency arrays\n const defaultValueRef = useRef(defaultValue);\n defaultValueRef.current = defaultValue;\n // Use options as a ref so it doesn't update dependency arrays\n const optionsDefaultedRef = useRef(options);\n optionsDefaultedRef.current = getUsePromiseOptionsDefaults(optionsDefaultedRef.current);\n\n const [value, setValue] = useState(() => defaultValueRef.current);\n const [isLoading, setIsLoading] = useState(true);\n useEffect(() => {\n let promiseIsCurrent = true;\n // If a promiseFactoryCallback was provided, we are loading. Otherwise, there is no loading to do\n setIsLoading(!!promiseFactoryCallback);\n (async () => {\n // If there is a callback to run, run it\n if (promiseFactoryCallback) {\n const result = await promiseFactoryCallback();\n // If the promise was not already replaced, update the value\n if (promiseIsCurrent) {\n setValue(() => result);\n setIsLoading(false);\n }\n }\n })();\n\n return () => {\n // Mark this promise as old and not to be used\n promiseIsCurrent = false;\n if (!optionsDefaultedRef.current.preserveValue) setValue(() => defaultValueRef.current);\n };\n }, [promiseFactoryCallback]);\n\n return [value, isLoading];\n};\nexport default usePromise;\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: \"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z\"\n}), 'Menu');","import GridMenu from '@/components/mui/grid-menu.component';\nimport { Command, CommandHandler } from '@/components/mui/menu-item.component';\nimport usePromise from '@/hooks/use-promise.hook';\nimport { Menu as MenuIcon } from '@mui/icons-material';\nimport { Drawer, IconButton } from '@mui/material';\nimport { Localized, MultiColumnMenu } from 'platform-bible-utils';\nimport {\n MouseEvent,\n MutableRefObject,\n PropsWithChildren,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nexport interface MultiColumnMenuProvider {\n (isSupportAndDevelopment: boolean): Promise>;\n}\n\nexport type HamburgerMenuButtonProps = PropsWithChildren & {\n /** The handler to use for menu commands (and eventually toolbar commands). */\n commandHandler: CommandHandler;\n\n /**\n * Optional reference to the \"div\" container that determines the where the menu should appear. If\n * not defined, then (1,1) used.\n */\n containerRef?: MutableRefObject;\n\n /**\n * The delegate to use to get the menu data. If not specified or if it returns undefined, the data\n * in normalMenu or fullMenu property will be used.\n */\n menuProvider?: MultiColumnMenuProvider;\n\n /**\n * The menu data to show when the menu is opened if the menuProvider property is not defined.\n * (This allows for a default or test-only static menu to be used.)\n */\n normalMenu?: Localized;\n\n /**\n * The menu data to show for \"full\" menu (when opened with the SHIFT key pressed) if the\n * menuProvider property is not defined. (This allows for a default or test-only static menu to be\n * used.)\n */\n fullMenu?: Localized;\n\n /** Additional css class(es) to help with unique styling of the sub-components */\n className?: string;\n\n /** Value to use as prefix for ARIA labels on interactive sub-components */\n ariaLabelPrefix?: string;\n};\n\nexport default function HamburgerMenuButton({\n menuProvider,\n normalMenu,\n fullMenu,\n commandHandler,\n containerRef,\n className,\n ariaLabelPrefix,\n children,\n}: HamburgerMenuButtonProps) {\n const [isMenuOpen, setMenuOpen] = useState(false);\n const [showFullMenu, setShowFullMenu] = useState(false);\n\n const handleMenuItemClick = useCallback(() => {\n if (isMenuOpen) setMenuOpen(false);\n setShowFullMenu(false);\n }, [isMenuOpen]);\n\n const handleMenuButtonClick = useCallback((e: MouseEvent) => {\n e.stopPropagation();\n setMenuOpen((prevIsOpen) => {\n const isOpening = !prevIsOpen;\n if (isOpening && e.shiftKey) setShowFullMenu(true);\n else if (!isOpening) setShowFullMenu(false);\n return isOpening;\n });\n }, []);\n\n const menuCommandHandler = useCallback(\n (command: Command) => {\n handleMenuItemClick();\n return commandHandler(command);\n },\n [commandHandler, handleMenuItemClick],\n );\n\n const [offset, setOffset] = useState({ top: 1, left: 1 });\n\n useEffect(() => {\n if (isMenuOpen) {\n const node = containerRef?.current;\n if (node) {\n const rect = node.getBoundingClientRect();\n const scrollTop = window.scrollY;\n const scrollLeft = window.scrollX;\n const top = rect.top + scrollTop + node.clientHeight;\n const left = rect.left + scrollLeft;\n setOffset({ top, left });\n }\n }\n }, [isMenuOpen, containerRef]);\n\n const [normalMenuData] = usePromise(\n useCallback(async () => {\n return menuProvider?.(false) ?? normalMenu;\n // isMenuOpen needs to be included for the menu contents to reevaluate when reopened\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [menuProvider, normalMenu, isMenuOpen]),\n normalMenu,\n );\n\n const [fullMenuData] = usePromise(\n useCallback(async () => {\n return menuProvider?.(true) ?? fullMenu ?? normalMenuData;\n // isMenuOpen needs to be included for the menu contents to reevaluate when reopened\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [menuProvider, fullMenu, normalMenuData, isMenuOpen]),\n fullMenu ?? normalMenuData,\n );\n\n const menu = showFullMenu && fullMenuData ? fullMenuData : normalMenuData;\n\n return (\n <>\n \n {children ?? }\n \n \n {menu ? (\n \n ) : undefined}\n \n \n );\n}\n","import '@/components/mui/icon-button.component.css';\nimport { IconButton as MuiIconButton } from '@mui/material';\nimport { MouseEventHandler, PropsWithChildren } from 'react';\n\nexport type IconButtonProps = PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n /**\n * Required. Used as both the tooltip (aka, title) and the aria-label (used for accessibility,\n * testing, etc.), unless a distinct tooltip is supplied.\n */\n label: string;\n /**\n * Enabled status of button\n *\n * @default false\n */\n isDisabled?: boolean;\n /** Optional tooltip to display if different from the aria-label. */\n tooltip?: string;\n /** If true, no tooltip will be displayed. */\n isTooltipSuppressed?: boolean;\n /**\n * If given, uses a negative margin to counteract the padding on one side (this is often helpful\n * for aligning the left or right side of the icon with content above or below, without ruining\n * the border size and shape).\n *\n * @default false\n */\n adjustMarginToAlignToEdge?: 'end' | 'start' | false;\n /**\n * The size of the component. small is equivalent to the dense button styling.\n *\n * @default false\n */\n size: 'small' | 'medium' | 'large';\n /** Additional css classes to help with unique styling of the button */\n className?: string;\n /** Optional click handler */\n onClick?: MouseEventHandler;\n}>;\n\n/**\n * Iconic button a user can click to do something\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction IconButton({\n id,\n label,\n isDisabled = false,\n tooltip,\n isTooltipSuppressed = false,\n adjustMarginToAlignToEdge = false,\n size = 'medium',\n className,\n onClick,\n children,\n}: IconButtonProps) {\n return (\n \n {children /* the icon to display */}\n \n );\n}\n\nexport default IconButton;\n","import { cn } from '@/utils/shadcn-ui.util';\nimport { LoaderCircle, LucideProps } from 'lucide-react';\nimport { forwardRef } from 'react';\n\nexport type SpinnerProps = LucideProps;\n\nconst Spinner = forwardRef(({ className, ...props }, ref) => {\n return (\n \n );\n});\n\nSpinner.displayName = 'Spinner';\n\nexport default Spinner;\n","import { Input as ShadInput } from '@/components/shadcn-ui/input';\nimport { Label as ShadLabel } from '@/components/shadcn-ui/label';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { ChangeEventHandler, FocusEventHandler } from 'react';\n\nexport type TextFieldProps = {\n /** Optional unique identifier */\n id?: string;\n /**\n * If `true`, the component is disabled.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * If `true`, the label is displayed in an error state.\n *\n * @default false\n */\n hasError?: boolean;\n /**\n * If `true`, the input will take up the full width of its container.\n *\n * @default false\n */\n isFullWidth?: boolean;\n /** Text that gives the user instructions on what contents the TextField expects */\n helperText?: string;\n /** The title of the TextField */\n label?: string;\n /** The short hint displayed in the `input` before the user enters a value. */\n placeholder?: string;\n /**\n * If `true`, the label is displayed as required and the `input` element is required.\n *\n * @default false\n */\n isRequired?: boolean;\n /** Additional css classes to help with unique styling of the text field */\n className?: string;\n /** Starting value for the text field if it is not controlled */\n defaultValue?: string | number;\n /** Value of the text field if controlled */\n value?: string | number;\n /** Triggers when content of textfield is changed */\n onChange?: ChangeEventHandler;\n /** Triggers when textfield gets focus */\n onFocus?: FocusEventHandler;\n /** Triggers when textfield loses focus */\n onBlur?: FocusEventHandler;\n};\n\n/**\n * Text input field\n *\n * Thanks to Shadcn for heavy inspiration and documentation\n * https://ui.shadcn.com/docs/components/input#with-label\n */\nfunction TextField({\n id,\n isDisabled = false,\n hasError = false,\n isFullWidth = false,\n helperText,\n label,\n placeholder,\n isRequired = false,\n className,\n defaultValue,\n value,\n onChange,\n onFocus,\n onBlur,\n}: TextFieldProps) {\n return (\n
\n {`${label}${isRequired ? '*' : ''}`}\n \n

{helperText}

\n
\n );\n}\n\nexport default TextField;\n","import HamburgerMenuButton, {\n MultiColumnMenuProvider,\n} from '@/components/mui/hamburger-menu-button.component';\nimport { CommandHandler } from '@/components/mui/menu-item.component';\nimport '@/components/mui/toolbar.component.css';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { AppBar, Toolbar as MuiToolbar } from '@mui/material';\nimport { PropsWithChildren, useRef } from 'react';\n\nexport type ToolbarProps = PropsWithChildren<{\n /** The handler to use for menu commands (and eventually toolbar commands). */\n commandHandler: CommandHandler;\n\n /**\n * The optional delegate to use to get the menu data. If not specified, the \"hamburger\" menu will\n * not display.\n */\n menuProvider?: MultiColumnMenuProvider;\n\n /** Optional unique identifier */\n id?: string;\n\n /** Additional css classes to help with unique styling of the toolbar */\n className?: string;\n}>;\n\nexport default function Toolbar({\n menuProvider,\n commandHandler,\n className,\n id,\n children,\n}: ToolbarProps) {\n // This ref will always be defined\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const containerRef = useRef(undefined!);\n\n return (\n
\n \n \n {menuProvider ? (\n \n ) : undefined}\n {children ?
{children}
: undefined}\n \n
\n
\n );\n}\n","import React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst alertVariants = cva(\n 'tw-relative tw-w-full tw-rounded-lg tw-border tw-p-4 [&>svg~*]:tw-pl-7 [&>svg+div]:tw-translate-y-[-3px] [&>svg]:tw-absolute [&>svg]:tw-left-4 [&>svg]:tw-top-4 [&>svg]:tw-text-foreground',\n {\n variants: {\n variant: {\n default: 'tw-bg-background tw-text-foreground',\n destructive:\n 'tw-border-destructive/50 tw-text-destructive dark:tw-border-destructive [&>svg]:tw-text-destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes & VariantProps\n>(({ className, variant, ...props }, ref) => (\n
\n));\nAlert.displayName = 'Alert';\n\nconst AlertTitle = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n {/* added because of https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md */}\n {props.children}{' '}\n \n ),\n);\nAlertTitle.displayName = 'AlertTitle';\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n
\n));\nAlertDescription.displayName = 'AlertDescription';\n\nexport { Alert, AlertTitle, AlertDescription };\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst badgeVariants = cva(\n 'tw-inline-flex tw-items-center tw-rounded-full tw-border tw-px-2.5 tw-py-0.5 tw-text-xs tw-font-semibold tw-transition-colors focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2',\n {\n variants: {\n variant: {\n default:\n 'tw-border-transparent tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/80',\n secondary:\n 'tw-border-transparent tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80',\n muted: 'tw-border-transparent tw-bg-muted tw-text-muted-foreground hover:tw-bg-muted/80',\n destructive:\n 'tw-border-transparent tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/80',\n outline: 'tw-text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes,\n VariantProps {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return
;\n}\n\nexport { Badge, badgeVariants };\n","import React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Card = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n {/* added because of https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md */}\n {props.children}\n \n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n

\n));\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef>(\n ({ className, ...props }, ref) => (\n

\n ),\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n","import { ComponentProps } from 'react';\nimport { toast as sonner, Toaster } from 'sonner';\n\ntype SonnerProps = ComponentProps;\n\nfunction Sonner({ ...props }: SonnerProps) {\n return (\n \n );\n}\n\n// The re-export of the sonner function was added manually\nexport { Sonner, sonner };\n","import React from 'react';\nimport * as SliderPrimitive from '@radix-ui/react-slider';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Slider = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n \n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n","import React from 'react';\nimport * as SwitchPrimitives from '@radix-ui/react-switch';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Switch = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n","import React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport type TabsListProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type TabsContentProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport const TabsList = React.forwardRef<\n React.ElementRef,\n TabsListProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nexport const TabsTrigger = React.forwardRef<\n React.ElementRef,\n TabsTriggerProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nexport const TabsContent = React.forwardRef<\n React.ElementRef,\n TabsContentProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Download } from 'lucide-react';\n\ntype InstallButtonProps = {\n /** The installing boolean value determines the state of the button. */\n isInstalling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n /** Optional text for the button. */\n buttonText?: string;\n} & ButtonProps;\n\n/**\n * The InstallButton component is a button designed for initiating installs. It includes visuals for\n * active installing and idle states.\n *\n * @param isInstalling The installing boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @param buttonText Optional text for the button.\n * @returns A install button.\n */\nexport default function InstallButton({\n isInstalling,\n handleClick,\n buttonText,\n className,\n ...props\n}: InstallButtonProps) {\n return (\n \n {isInstalling ? (\n \n ) : (\n <>\n \n {buttonText}\n \n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype EnableButtonProps = {\n /** The enabling boolean value determines the state of the button. */\n isEnabling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The EnableButton component is a button designed for initiating enabling of downloads. It includes\n * visuals for active enabling and idle states.\n *\n * @param isEnabling The enabling boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to enable.\n */\nexport default function EnableButton({\n isEnabling,\n handleClick,\n className,\n ...props\n}: EnableButtonProps) {\n return (\n \n {isEnabling ? (\n <>\n \n Enabling...\n \n ) : (\n 'Enable'\n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype DisableButtonProps = {\n /** The disabling boolean value determines the state of the button. */\n isDisabling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The DisableButton component is a button designed for initiating disabling of downloads. It\n * includes visuals for active disabling and idle states.\n *\n * @param isDisabling The disabling boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to disable.\n */\nexport default function DisableButton({\n isDisabling,\n handleClick,\n className,\n ...props\n}: DisableButtonProps) {\n return (\n \n {isDisabling ? (\n <>\n \n Disabling...\n \n ) : (\n 'Disable'\n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype UpdateButtonProps = {\n /** The updating boolean value determines the state of the button. */\n isUpdating: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The UpdateButton component is a button designed for initiating updates for downloaded extensions.\n * It includes visuals for active updating and idle states.\n *\n * @param isUpdating The updating boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to update.\n */\nexport default function UpdateButton({\n isUpdating,\n handleClick,\n className,\n ...props\n}: UpdateButtonProps) {\n return (\n \n {isUpdating ? (\n <>\n \n Updating...\n \n ) : (\n 'Update'\n )}\n \n );\n}\n","import { cn } from '@/utils/shadcn-ui.util';\nimport Markdown, { MarkdownToJSX } from 'markdown-to-jsx';\nimport { useMemo } from 'react';\n\ninterface MarkdownRendererProps {\n /** Optional unique identifier */\n id?: string;\n /** The markdown string to render */\n markdown: string;\n className?: string;\n /**\n * The [`target` attribute for `a` html\n * tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target). Defaults to not\n * adding a `target` to `a` tags\n */\n anchorTarget?: string;\n}\n\n/**\n * This component renders markdown content given a markdown string. It uses typography styles from\n * the platform.\n *\n * @param markdown The markdown string to render.\n * @param id Optional unique identifier\n * @returns A div containing the rendered markdown content.\n */\nexport default function MarkdownRenderer({\n id,\n markdown,\n className,\n anchorTarget,\n}: MarkdownRendererProps) {\n const options: MarkdownToJSX.Options = useMemo(\n () => ({\n overrides: {\n a: {\n props: {\n target: anchorTarget,\n },\n },\n },\n }),\n [anchorTarget],\n );\n return (\n
\n {markdown}\n
\n );\n}\n","import { Filter, ChevronDown } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { Button } from '@/components/shadcn-ui/button';\n\n/**\n * The FilterButton component is a button designed for initiating filtering of data. It is designed\n * to be used with the dropdown menu. It uses forwardRef to pass the button to the dropdown trigger\n * asChild.\n *\n * @returns A button that can be used to filter.\n */\nconst FilterButton = forwardRef((props, ref) => {\n return (\n \n \n Filter\n \n \n );\n});\n\nexport default FilterButton;\n","import {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuGroup,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport FilterButton from './buttons/filter-button.component';\n\nexport enum DropdownMenuItemType {\n Check,\n Radio,\n}\n\nexport type DropdownItem = {\n /** The label is the text that will be displayed on the dropdown item. */\n label: string;\n /** The itemType determines the DropdownMenuItemType type as either Check or Radio. */\n itemType: DropdownMenuItemType;\n /** The onClick function is called when the item is clicked. */\n onClick: () => void;\n};\n\nexport type DropdownGroup = {\n /**\n * The label is the text that will be displayed on the dropdown group. It is used to categorize\n * the items in the group.\n */\n label: string;\n /** The items array contains the items that will be displayed in the dropdown group */\n items: DropdownItem[];\n};\n\nexport type FilterDropdownProps = {\n /** Object unique identifier */\n id?: string;\n /** The groups array contains the groups that will be displayed in the dropdown */\n groups: DropdownGroup[];\n}; // TODO: extend the props later\n\n/**\n * The FilterDropdown component is a dropdown designed for filtering content. It includes groups of\n * items that can be checkboxes or radio items.\n *\n * @param id Optional unique identifier\n * @param groups The groups array contains the groups that will be displayed in the dropdown\n * @returns A filter dropdown.\n */\nexport default function FilterDropdown({ id, groups }: FilterDropdownProps) {\n return (\n
\n {/* TODO: remove this once the DropDown Menu shadcn has an id prop */}\n \n \n \n \n \n {groups.map((group) => (\n
\n {group.label}\n \n {group.items.map((item) => (\n
\n {item.itemType === DropdownMenuItemType.Check ? (\n \n {item.label}\n \n ) : (\n \n {item.label}\n \n )}\n
\n ))}\n
\n \n
\n ))}\n
\n
\n
\n );\n}\n","interface NoExtensionsFoundProps {\n /** Optional unique identifier */\n id?: string;\n /** The message to display */\n message: string;\n}\n/**\n * This component displays a message to the user when no extensions are found in the marketplace.\n *\n * @param id Optional unique identifier\n * @param message The message to display.\n * @returns {JSX.Element} - Returns the message component that displays the message to the user.\n */\nexport default function NoExtensionsFound({ id, message }: NoExtensionsFoundProps) {\n return (\n
\n
\n

{message}

\n
\n
\n );\n}\n","import { CircleHelp, Link as LucideLink, User } from 'lucide-react';\nimport { NumberFormat } from 'platform-bible-utils';\n\n/** Interface that stores the parameters passed to the More Info component */\ninterface MoreInfoProps {\n /** Optional unique identifier */\n id?: string;\n /** The category of the extension */\n category: string;\n /** The number of downloads for the extension */\n downloads: Record;\n /** The languages supported by the extension */\n languages: string[];\n /** The URL to the more info page of the extension */\n moreInfoUrl: string;\n}\n/**\n * This component displays the more info section of the extension which includes the category,\n * number of downloads, languages, and links to the website and support\n *\n * @param id Optional unique identifier\n * @param category The category of the extension\n * @param downloads The number of downloads for the extension\n * @param languages The languages supported by the extension\n * @param moreInfoUrl The URL to the more info page of the extension\n * @returns {JSX.Element} - Returns the more info component that displays the category, number of\n * downloads, languages, and links to the website and support\n */\nexport default function MoreInfo({\n id,\n category,\n downloads,\n languages,\n moreInfoUrl,\n}: MoreInfoProps) {\n /**\n * This constant formats the number of downloads into a more readable format.\n *\n * @example 1000 -> 1K\n *\n * @example 1000000 -> 1M\n *\n * @returns The formatted number of downloads\n */\n const numberFormatted = new NumberFormat('en', {\n notation: 'compact',\n compactDisplay: 'short',\n }).format(Object.values(downloads).reduce((a: number, b: number) => a + b, 0));\n\n /** This function scrolls the window to the bottom of the page. */\n const handleScrollToBottom = () => {\n window.scrollTo(0, document.body.scrollHeight);\n };\n\n return (\n \n
\n
\n {category}\n
\n CATEGORY\n
\n
\n
\n
\n \n {numberFormatted}\n
\n USERS\n
\n
\n
\n
\n {languages.slice(0, 3).map((locale) => (\n \n {locale.toUpperCase()}\n \n ))}\n
\n {languages.length > 3 && (\n handleScrollToBottom()}\n className=\"tw-text-xs tw-text-gray-500 tw-underline\"\n >\n +{languages.length - 3} more languages\n \n )}\n
\n
\n
\n \n Website\n \n \n \n Support\n \n \n
\n
\n );\n}\n","import { useState } from 'react';\n\nexport type VersionInformation = {\n /** Date the version was published */\n date: string;\n /** Description of the changes in the version */\n description: string;\n};\n\n/** Type to store the version history information */\nexport type VersionHistoryType = Record;\n\n/** Interface that stores the parameters passed to the Version History component */\ninterface VersionHistoryProps {\n /** Optional unique identifier */\n id?: string;\n /** Object containing the versions mapped with their information */\n versionHistory: VersionHistoryType;\n}\n\n/**\n * Component to render the version history information shown in the footer component. Lists the 5\n * most recent versions, with the options to show all versions by pressing a button.\n *\n * @param versionHistory Object containing the versions mapped with their information\n * @param id Optional unique identifier\n * @returns Rendered version history for the Footer component\n */\nexport default function VersionHistory({ id, versionHistory }: VersionHistoryProps) {\n const [showAllVersions, setShowAllVersions] = useState(false);\n const currentDate = new Date();\n\n /**\n * Function to format the time string for the version history in the form of 'X year(s) ago'.\n *\n * @param dateString ISO Date string to determine the time string from\n * @returns Formatted time string\n */\n function formatTimeString(dateString: string) {\n const date = new Date(dateString);\n const dateDiff = new Date(currentDate.getTime() - date.getTime());\n const yearDiff = dateDiff.getUTCFullYear() - 1970;\n const monthDiff = dateDiff.getUTCMonth();\n const dayDiff = dateDiff.getUTCDate() - 1;\n\n // Determines how long ago the version was published\n let timeString = '';\n if (yearDiff > 0) {\n timeString = `${yearDiff.toString()} year${yearDiff === 1 ? '' : 's'} ago`;\n } else if (monthDiff > 0) {\n timeString = `${monthDiff.toString()} month${monthDiff === 1 ? '' : 's'} ago`;\n } else if (dayDiff === 0) {\n timeString = 'today';\n } else {\n timeString = `${dayDiff.toString()} day${dayDiff === 1 ? '' : 's'} ago`;\n }\n\n return timeString;\n }\n\n // Sorts the version history by version number\n const sortedEntries = Object.entries(versionHistory).sort((a, b) => b[0].localeCompare(a[0]));\n\n return (\n
\n

What`s New

\n
    \n {(showAllVersions ? sortedEntries : sortedEntries.slice(0, 5)).map((entry) => (\n
    \n
    \n
  • \n {entry[1].description}\n
  • \n
    \n
    \n
    Version {entry[0]}
    \n
    {formatTimeString(entry[1].date)}
    \n
    \n
    \n ))}\n
\n {sortedEntries.length > 5 && (\n setShowAllVersions(!showAllVersions)}\n className=\"tw-text-xs tw-text-gray-500 tw-underline\"\n >\n {showAllVersions ? 'Show Less Version History' : 'Show All Version History'}\n \n )}\n
\n );\n}\n","import { useMemo } from 'react';\nimport { formatBytes } from 'platform-bible-utils';\nimport VersionHistory, { VersionHistoryType } from './version-history.component';\n\n/** Interface to store the parameters passed to the Footer component */\ninterface FooterProps {\n /** Optional unique identifier */\n id?: string;\n /** Name of the publisher */\n publisherDisplayName: string;\n /** Size of the extension file in bytes */\n fileSize: number;\n /** List of language codes supported by the extension */\n locales: string[];\n /** Object containing the version history mapped with their information */\n versionHistory: VersionHistoryType;\n}\n\n/**\n * Component to render the footer for the extension details which contains information on the\n * publisher, version history, languages, and file size.\n *\n * @param id Optional unique identifier\n * @param publisherDisplayName Name of the publisher\n * @param fileSize Size of the extension file in bytes\n * @param locales List of language codes supported by the extension\n * @param versionHistory Object containing the version history mapped with their information\n * @returns The rendered Footer component\n */\nexport default function Footer({\n id,\n publisherDisplayName,\n fileSize,\n locales,\n versionHistory,\n}: FooterProps) {\n /** Formats the file size into a human-readable format */\n const formattedFileSize = useMemo(() => formatBytes(fileSize), [fileSize]);\n\n /**\n * This function gets the display names of the languages based on the language codes.\n *\n * @param codes The list of language codes\n * @returns The list of language names\n */\n const getLanguageNames = (codes: string[]) => {\n const displayNames = new Intl.DisplayNames(navigator.language, { type: 'language' });\n return codes.map((code) => displayNames.of(code));\n };\n\n const languageNames = getLanguageNames(locales);\n\n return (\n
\n
\n \n
\n
\n

Information

\n
\n

\n Publisher\n {publisherDisplayName}\n Size\n {formattedFileSize}\n

\n
\n

\n Languages\n {languageNames.join(', ')}\n

\n
\n
\n
\n
\n
\n );\n}\n","import { PlatformEvent, PlatformEventHandler } from 'platform-bible-utils';\nimport { useEffect } from 'react';\n\n/**\n * Adds an event handler to an event so the event handler runs when the event is emitted. Use\n * `papi.network.getNetworkEvent` to use a networked event with this hook.\n *\n * @param event The event to subscribe to.\n *\n * - If event is a `PlatformEvent`, that event will be used\n * - If event is undefined, the callback will not be subscribed. Useful if the event is not yet\n * available for example\n *\n * @param eventHandler The callback to run when the event is emitted\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n */\nconst useEvent = (\n event: PlatformEvent | undefined,\n eventHandler: PlatformEventHandler,\n) => {\n useEffect(() => {\n // Do nothing if the event is not provided (in case the event is not yet available, for example)\n if (!event) return () => {};\n\n const unsubscriber = event(eventHandler);\n return () => {\n unsubscriber();\n };\n }, [event, eventHandler]);\n};\nexport default useEvent;\n","import { useCallback, useEffect } from 'react';\nimport { PlatformEvent, PlatformEventAsync, PlatformEventHandler } from 'platform-bible-utils';\nimport usePromise from './use-promise.hook';\n\nconst noopUnsubscriber = () => false;\n\n/**\n * Adds an event handler to an asynchronously subscribing/unsubscribing event so the event handler\n * runs when the event is emitted. Use `papi.network.getNetworkEvent` to use a networked event with\n * this hook.\n *\n * @param event The asynchronously (un)subscribing event to subscribe to.\n *\n * - If event is a `PlatformEvent` or `PlatformEventAsync`, that event will be used\n * - If event is undefined, the callback will not be subscribed. Useful if the event is not yet\n * available for example\n *\n * @param eventHandler The callback to run when the event is emitted\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n */\nconst useEventAsync = (\n event: PlatformEvent | PlatformEventAsync | undefined,\n eventHandler: PlatformEventHandler,\n) => {\n // Subscribe to the event asynchronously\n const [unsubscribe] = usePromise(\n useCallback(async () => {\n // Do nothing if the event is not provided (in case the event is not yet available, for example)\n if (!event) return noopUnsubscriber;\n\n // Wrap subscribe and unsubscribe in promises to allow normal events to be used as well\n const unsub = await Promise.resolve(event(eventHandler));\n return async () => unsub();\n }, [eventHandler, event]),\n noopUnsubscriber,\n // We want the unsubscriber to return to default value immediately upon changing subscription\n // So the useEffect below will unsubscribe asap\n { preserveValue: false },\n );\n\n // Unsubscribe from the event asynchronously (but we aren't awaiting the unsub)\n useEffect(() => {\n return () => {\n if (unsubscribe !== noopUnsubscriber) {\n unsubscribe();\n }\n };\n }, [unsubscribe]);\n};\n\nexport default useEventAsync;\n"],"names":["twMergeCustom","extendTailwindMerge","cn","inputs","clsx","Input","React","className","type","props","ref","jsx","BookChapterInput","forwardRef","handleSearch","handleKeyDown","handleOnClick","handleSubmit","jsxs","ShadInput","event","e","History","P","R","t","s","n","N","B","O","S","K","g","k","x","T","X","V","w","L","G","A","H","C","I","y","q","U","m","l","h","c","E","D","i","a","o","u","v","f","d","b","J","DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","inset","children","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","BookMenuItem","bookId","handleSelectBook","isSelected","handleHighlightBook","bookType","ShadDropdownMenuItem","Canon","ChapterSelect","handleSelectChapter","endChapter","activeChapter","highlightedChapter","handleHighlightedChapter","chapters","_","handleMouse","useCallback","chapterNumber","chapter","GoToMenuItem","handleSort","handleLocationHistory","handleBookmarks","ShadDropdownMenuLabel","ArrowDownWideNarrow","Clock","Bookmark","ALL_BOOK_IDS","BOOK_TYPE_LABELS","BOOK_TYPE_ARRAY","SCROLL_OFFSET","SEARCH_QUERY_FORMATS","fetchGroupedBooks","fetchEndChapter","getChaptersForBook","getAllEnglishNames","isValidBookEnglishName","bookName","getBookIdFromEnglishName","formattedBookName","BookChapterControl","scrRef","searchQuery","setSearchQuery","useState","selectedBookId","setSelectedBookId","setHighlightedChapter","highlightedBookId","setHighlightedBookId","isContentOpen","setIsContentOpen","isContentOpenDelayed","setIsContentOpenDelayed","inputRef","useRef","contentRef","menuItemRef","fetchFilteredBooks","englishNameLowerCase","normalizedQuery","handleSearchInput","searchString","shouldPreventAutoClosing","controlMenuState","open","updateReference","shouldClose","verse","handleInputSubmit","format","matches","book","englishName","handleKeyDownInput","handleKeyDownContent","key","handleKeyDownMenuItem","chapterOffSet","useEffect","useLayoutEffect","scrollTimeout","scrollPosition","ShadDropdownMenu","ShadDropdownMenuTrigger","ShadDropdownMenuContent","bookTypeIndex","element","ShadDropdownMenuSeparator","buttonVariants","cva","Button","variant","size","asChild","Slot","labelVariants","Label","LabelPrimitive","RadioGroup","RadioGroupPrimitive","RadioGroupItem","Popover","PopoverPrimitive","PopoverTrigger","PopoverContent","align","DialogPortal","DialogPrimitive","DialogOverlay","DialogContent","DialogTitle","DialogDescription","Command","CommandPrimitive","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","getOptionLabelDefault","option","ComboBox","id","options","value","onChange","getOptionLabel","icon","buttonPlaceholder","textPlaceholder","commandEmptyMessage","buttonVariant","alignDropDown","dir","isDisabled","setOpen","ChevronsUpDown","ChapterRangeSelector","startChapter","handleSelectStartChapter","handleSelectEndChapter","chapterCount","chapterOptions","useMemo","index","Fragment","BookSelectionMode","BOOK_SELECTOR_STRING_KEYS","localizeString","strings","BookSelector","handleBookSelectionModeChange","currentBookName","onSelectBooks","selectedBookIds","localizedStrings","currentBookText","chooseText","chooseBooksText","bookSelectionMode","setBookSelectionMode","onSelectionModeChange","newMode","DataTableViewOptions","table","FilterIcon","column","Select","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","SelectSeparator","DataTablePagination","pageSize","ArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","ArrowRightIcon","Table","stickyHeader","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","DataTable","columns","data","enablePagination","showPaginationControls","showColumnVisibilityControls","onRowClickHandler","sorting","setSorting","columnFilters","setColumnFilters","columnVisibility","setColumnVisibility","rowSelection","setRowSelection","useReactTable","getCoreRowModel","getPaginationRowModel","getSortedRowModel","getFilteredRowModel","headerGroup","header","flexRender","_a","row","cell","OccurrencesTable","occurrenceData","setScriptureReference","referenceHeaderText","occurrenceHeaderText","occurrences","uniqueOccurrences","occurrence","uniqueOccurrence","deepEqual","Checkbox","CheckboxPrimitive","getLinesFromUSFM","text","getNumberFromUSFM","regex","match","getBookNumFromId","getStatusForItem","item","approvedItems","unapprovedItems","toggleVariants","Toggle","TogglePrimitive","ToggleGroupContext","ToggleGroup","ToggleGroupPrimitive","ToggleGroupItem","context","getSortingIcon","sortDirection","ArrowUpIcon","ArrowDownIcon","ArrowUpDownIcon","inventoryItemColumn","itemLabel","inventoryAdditionalItemColumn","additionalItemLabel","additionalItemIndex","inventoryCountColumn","countLabel","statusChangeHandler","changedItems","newStatus","onApprovedItemsChange","onUnapprovedItemsChange","newApprovedItems","validItem","newUnapprovedItems","unapprovedItem","inventoryStatusColumn","statusLabel","status","CircleCheckIcon","CircleXIcon","CircleHelpIcon","INVENTORY_STRING_KEYS","filterItemData","itemData","statusFilter","textFilter","filteredItemData","createTableData","scriptureRef","itemRegex","tableData","currentBook","currentChapter","currentVerse","line","items","itemIndex","existingItem","tableEntry","newReference","substring","newItem","Inventory","scriptureReference","extractItems","additionalItemsLabels","scope","onScopeChange","allItemsText","approvedItemsText","unapprovedItemsText","unknownItemsText","scopeBookText","scopeChapterText","scopeVerseText","filterText","showAdditionalItemsText","showAdditionalItems","setShowAdditionalItems","setStatusFilter","setTextFilter","selectedItem","setSelectedItem","reducedTableData","newTableData","firstItem","existingEntry","newTableEntry","filteredTableData","allColumns","numberOfAdditionalItems","additionalColumns","_b","rowClickHandler","newSelection","handleScopeChange","handleStatusFilterChange","MultiSelectComboBox","entries","getEntriesCount","selected","placeholder","customSelectedText","sortSelected","handleSelect","getPlaceholderText","sortedOptions","starredItems","opt","nonStarredItems","aSelected","bSelected","count","Star","SearchBar","onSearch","isFullWidth","handleInputChange","VerticalTabs","TabsPrimitive","VerticalTabsList","VerticalTabsTrigger","VerticalTabsContent","NavigationContentSearch","tabList","searchPlaceholder","headerTitle","isSearchBarFullWidth","direction","tab","scrBookColId","scrRefColId","typeColId","detailsColId","defaultScrRefColumnName","defaultScrBookGroupName","defaultTypeColumnName","defaultDetailsColumnName","getColumns","colInfo","showSourceColumn","showSrcCol","info","formatScrRef","compareScrRefs","toRefOrRange","scriptureSelection","offsetStart","offsetEnd","scrRefToBBBCCCVVV","getRowKey","ScriptureResultsViewer","sources","showColumnHeaders","scriptureReferenceColumnName","scriptureBookGroupName","typeColumnName","detailsColumnName","onRowSelected","grouping","setGrouping","scriptureResults","source","getExpandedRowModel","getGroupedRowModel","selectedRows","keys","selectedRow","scrBookGroupName","typeGroupName","groupingOptions","handleSelectChange","selectedGrouping","handleRowClick","getEvenOrOddBandingStyle","getIndent","groupingState","rowIndex","ChevronLeft","DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS","getLocalizeKeyForScrollGroupId","ScrollGroupSelector","availableScrollGroupIds","scrollGroupId","onChangeScrollGroupId","localizedStringsDefaulted","localizedStringKey","localizedStringValue","newScrollGroupString","scrollGroupOptionId","Separator","orientation","decorative","SeparatorPrimitive","SettingsList","SettingsListItem","primary","secondary","isLoading","loadingMessage","SettingsListHeader","includeSeparator","Checklist","listItems","selectedListItems","handleSelectListItem","createLabel","_interopRequireDefault","obj","module","chainPropTypes","propType1","propType2","args","_extends","target","isPlainObject","prototype","deepClone","output","deepmerge","p","r","z","reactIs_production_min","hasSymbol","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","isValidElementType","typeOf","object","$$typeof","$$typeofType","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","hasWarnedAboutDeprecatedIsAsyncMode","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","reactIs_development","reactIsModule","require$$0","require$$1","getOwnPropertySymbols","hasOwnProperty","propIsEnumerable","toObject","val","shouldUseNative","test1","test2","order2","test3","letter","objectAssign","from","to","symbols","ReactPropTypesSecret","ReactPropTypesSecret_1","has","printWarning","loggedTypeFailures","message","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","error","err","ex","stack","checkPropTypes_1","ReactIs","assign","require$$2","require$$3","require$$4","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","iteratorFn","ANONYMOUS","ReactPropTypes","createPrimitiveTypeChecker","createAnyTypeChecker","createArrayOfTypeChecker","createElementTypeChecker","createElementTypeTypeChecker","createInstanceTypeChecker","createNodeChecker","createObjectOfTypeChecker","createEnumTypeChecker","createUnionTypeChecker","createShapeTypeChecker","createStrictShapeTypeChecker","is","PropTypeError","createChainableTypeChecker","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","propName","propFullName","secret","cacheKey","chainedCheckType","expectedType","propValue","propType","getPropType","preciseType","getPreciseType","typeChecker","expectedClass","expectedClassName","actualClassName","getClassName","expectedValues","valuesString","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","expectedTypesMessage","isNode","invalidValidatorError","shapeTypes","allKeys","iterator","step","entry","isSymbol","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","isClassComponent","elementType","acceptingRef","safePropName","warningHint","elementAcceptingRef","PropTypes","elementAcceptingRef$1","specialProperty","exactProp","propTypes","unsupportedProps","prop","formatMuiErrorMessage","code","url","REACT_SERVER_CONTEXT_TYPE","REACT_OFFSCREEN_TYPE","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","SuspenseList","hasWarnedAboutDeprecatedIsConcurrentMode","isSuspenseList","fnNameMatchRegex","getFunctionName","fn","getFunctionComponentName","Component","fallback","getWrappedName","outerType","innerType","wrapperName","functionName","getDisplayName","HTMLElementType","refType","refType$1","capitalize","string","_formatMuiErrorMessage","createChainedFunction","funcs","acc","func","debounce","wait","timeout","debounced","later","deprecatedPropType","validator","reason","componentNameSafe","propFullNameSafe","isMuiElement","muiNames","_muiName","_element$type","ownerDocument","node","ownerWindow","requirePropFactory","componentNameInError","prevPropTypes","requiredProp","defaultTypeChecker","typeCheckerResult","setRef","useEnhancedEffect","useEnhancedEffect$1","globalId","useGlobalId","idOverride","defaultId","setDefaultId","maybeReactUseId","useId","reactId","unsupportedProp","useControlled","controlled","defaultProp","name","state","isControlled","valueState","setValue","defaultValue","setValueIfUncontrolled","newValue","useEventCallback","useForkRef","refs","instance","UNINITIALIZED","useLazyRef","init","initArg","EMPTY","useOnMount","Timeout","delay","useTimeout","hadKeyboardEvent","hadFocusVisibleRecently","hadFocusVisibleRecentlyTimeout","inputTypesWhitelist","focusTriggersKeyboardModality","tagName","handlePointerDown","handleVisibilityChange","prepare","doc","isFocusVisible","useIsFocusVisible","isFocusVisibleRef","handleBlurVisible","handleFocusVisible","resolveProps","defaultProps","defaultSlotProps","slotProps","slotPropName","composeClasses","slots","getUtilityClass","classes","slot","utilityClass","defaultGenerator","createClassNameGenerator","generate","generator","ClassNameGenerator","ClassNameGenerator$1","globalStateClasses","generateUtilityClass","globalStatePrefix","globalStateClass","generateUtilityClasses","result","clamp","min","max","_objectWithoutPropertiesLoose","excluded","sourceKeys","_excluded","sortBreakpointsValues","breakpointsAsArray","breakpoint1","breakpoint2","createBreakpoints","breakpoints","unit","other","sortedValues","up","down","between","start","end","endIndex","only","not","keyIndex","shape","shape$1","responsivePropType","responsivePropType$1","merge","defaultBreakpoints","handleBreakpoints","styleFromPropValue","theme","themeBreakpoints","breakpoint","mediaKey","cssKey","createEmptyBreakpointObject","breakpointsInput","_breakpointsInput$key","breakpointStyleKey","removeUnusedBreakpoints","breakpointKeys","style","breakpointOutput","getPath","path","checkVars","getStyleValue","themeMapping","transform","propValueFinal","userValue","cssProperty","themeKey","memoize","cache","arg","properties","directions","aliases","getCssProperties","property","marginKeys","paddingKeys","spacingKeys","createUnaryUnit","_getPath","themeSpacing","abs","createUnarySpacing","getValue","transformer","transformed","getStyleFromPropValue","cssProperties","resolveCssProperty","margin","padding","createSpacing","spacingInput","spacing","argsInput","argument","compose","styles","handlers","borderTransform","createBorderStyle","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outline","outlineColor","borderRadius","gap","columnGap","rowGap","gridColumn","gridRow","gridAutoFlow","gridAutoColumns","gridAutoRows","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridArea","paletteTransform","color","bgcolor","backgroundColor","sizingTransform","width","maxWidth","_props$theme","_props$theme2","breakpointsValues","minWidth","height","maxHeight","minHeight","boxSizing","defaultSxConfig","defaultSxConfig$1","objectsHaveSameKeys","objects","union","callIfFn","maybeFn","unstable_createStyleFunctionSx","getThemeValue","config","styleFunctionSx","_theme$unstable_sxCon","sx","traverse","sxInput","sxObject","emptyBreakpoints","breakpointsKeys","css","styleKey","styleFunctionSx$1","applyStyles","createTheme","paletteInput","shapeInput","muiTheme","isObjectEmpty","useTheme","defaultTheme","contextTheme","ThemeContext","systemDefaultTheme","useThemeWithoutDefault","_excluded2","_excluded3","isEmpty","isStringTag","tag","shouldForwardProp","lowercaseFirstLetter","resolveTheme","themeId","defaultOverridesResolver","processStyleArg","callableStyle","_ref","ownerState","resolvedStylesArg","resolvedStyle","variants","isMatch","createStyled","input","rootShouldForwardProp","slotShouldForwardProp","systemSx","inputOptions","processStyles","componentSlot","inputSkipVariantsResolver","inputSkipSx","overridesResolver","skipVariantsResolver","skipSx","label","shouldForwardPropOption","defaultStyledResolver","styledEngineStyled","transformStyleArg","stylesArg","muiStyledResolver","styleArg","expressions","transformedStyleArg","expressionsWithDefaultTheme","styleOverrides","resolvedStyleOverrides","slotKey","slotStyle","_theme$components","themeVariants","numOfCustomFnsApplied","placeholders","displayName","getThemeProps","params","useThemeProps","clampWrapper","hexToRgb","re","colors","decomposeColor","marker","colorSpace","recomposeColor","hslToRgb","rgb","getLuminance","getContrastRatio","foreground","background","lumA","lumB","alpha","darken","coefficient","lighten","createMixins","mixins","common","common$1","grey","grey$1","purple","purple$1","red","red$1","orange","orange$1","blue","blue$1","lightBlue","lightBlue$1","green","green$1","light","dark","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","getDefaultPrimary","mode","getDefaultSecondary","getDefaultError","getDefaultInfo","getDefaultSuccess","getDefaultWarning","createPalette","palette","contrastThreshold","success","warning","getContrastText","contrastText","contrast","augmentColor","mainShade","lightShade","darkShade","modes","round","caseAllCaps","defaultFontFamily","createTypography","typography","fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem2","coef","pxToRem","buildVariant","fontWeight","lineHeight","letterSpacing","casing","shadowKeyUmbraOpacity","shadowKeyPenumbraOpacity","shadowAmbientShadowOpacity","createShadow","px","shadows","shadows$1","easing","duration","formatMs","milliseconds","getAutoHeightDuration","constant","createTransitions","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","isString","isNumber","animatedProp","zIndex","zIndex$1","mixinsInput","transitionsInput","typographyInput","systemTheme","systemCreateTheme","stateClasses","component","child","stateClass","defaultTheme$1","THEME_ID","systemUseThemeProps","styled","styled$1","getSvgIconUtilityClass","useUtilityClasses","SvgIconRoot","_theme$transitions","_theme$transitions$cr","_theme$transitions2","_theme$typography","_theme$typography$pxT","_theme$typography2","_theme$typography2$px","_theme$typography3","_theme$typography3$px","_palette$ownerState$c","_palette","_palette2","_palette3","SvgIcon","inProps","htmlColor","inheritViewBox","titleAccess","viewBox","hasSvgAsChild","more","_jsxs","_jsx","SvgIcon$1","createSvgIcon","unstable_ClassNameGenerator","exports","_utils","ArrowRight","default_1","_createSvgIcon","_jsxRuntime","isHostComponent","appendOwnerState","otherProps","defaultContextValue","ClassNameConfiguratorContext","useClassNamesOverride","disableDefaultClasses","extractEventHandlers","excludeKeys","resolveComponentProps","componentProps","slotState","omitEventHandlers","mergeSlotProps","parameters","getSlotProps","additionalProps","externalSlotProps","externalForwardedProps","joinedClasses","mergedStyle","eventHandlers","componentsPropsWithoutEventHandlers","otherPropsWithoutEventHandlers","internalSlotProps","useSlotProps","_parameters$additiona","skipResolvingSlotProps","rest","resolvedComponentsProps","mergedProps","internalRef","GLOBAL_CLASS_PREFIX","buildStateClass","buildSlotClass","getContainer","container","forwardedRef","disablePortal","mountNode","setMountNode","handleRef","newProps","ReactDOM","top","bottom","right","left","auto","basePlacements","clippingParents","viewport","popper","reference","variationPlacements","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","getWindow","OwnElement","isHTMLElement","isShadowRoot","attributes","effect","_ref2","initialStyles","styleProperties","attribute","applyStyles$1","getBasePlacement","getUAString","uaData","isLayoutViewport","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","visualViewport","addVisualOffsets","getLayoutRect","contains","parent","rootNode","next","getComputedStyle","isTableElement","getDocumentElement","getParentNode","getTrueOffsetParent","getContainingBlock","isFirefox","isIE","elementCss","currentNode","getOffsetParent","window","offsetParent","getMainAxisFromPlacement","within","mathMax","mathMin","withinMaxClamp","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","arrow","_state$modifiersData$","arrowElement","popperOffsets","basePlacement","axis","isVertical","len","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","center","offset","axisProp","_options$element","arrow$1","getVariation","unsetSides","roundOffsetsByDPR","win","dpr","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","heightProp","widthProp","offsetY","offsetX","commonStyles","_ref4","_Object$assign","computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash","getOppositePlacement","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","scrollTop","getWindowScrollBarX","getViewportRect","strategy","html","layoutViewport","getDocumentRect","_element$ownerDocumen","winScroll","body","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","list","isBody","updatedList","rectToClientRect","rect","getInnerBoundingClientRect","getClientRectFromMixedType","clippingParent","getClippingParents","canEscapeClipping","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","allPlacements","allowedPlacements","overflows","getExpandedFallbackPlacements","oppositePlacement","flip","_options$mainAxis","checkMainAxis","_options$altAxis","checkAltAxis","specifiedFallbackPlacements","_options$flipVariatio","preferredPlacement","isBasePlacement","fallbackPlacements","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","check","numberOfChecks","_loop","_i","fittingPlacement","_ret","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","hide","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","rects","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","preventOverflow","_options$tether","tether","_options$tetherOffset","tetherOffset","altAxis","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","documentElement","order","modifiers","map","visited","modifier","sort","requires","dep","depModifier","orderModifiers","orderedModifiers","phase","pending","resolve","mergeByName","merged","current","existing","DEFAULT_OPTIONS","areValidElements","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptionsAction","cleanupModifierEffects","runModifierEffects","_state$elements","_state$orderedModifie","_state$orderedModifie2","_ref$options","cleanupFn","noopFn","createPopper","COMPONENT_NAME","getPopperUtilityClass","flipPlacement","resolveAnchorEl","anchorEl","isVirtualElement","defaultPopperOptions","PopperTooltip","_slots$root","initialPlacement","popperOptions","popperRefProp","TransitionProps","tooltipRef","ownRef","popperRef","handlePopperRef","handlePopperRefRef","rtlPlacement","setPlacement","resolvedAnchorElement","setResolvedAnchorElement","handlePopperUpdate","box","popperModifiers","childProps","Root","rootProps","Popper","containerProp","keepMounted","transition","exited","setExited","handleEnter","handleExited","resolvedAnchorEl","display","transitionProps","useThemeSystem","_setPrototypeOf","_inheritsLoose","subClass","superClass","setPrototypeOf","timeoutsShape","TransitionGroupContext","forceReflow","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","_this","parentGroup","appear","initialStatus","prevState","nextIn","_proto","prevProps","nextStatus","exit","enter","mounting","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","_this3","nextState","callback","_this4","active","handler","doesNotHaveTimeoutOrListener","maybeNextCallback","_this$props","pt","noop","Transition$1","reflow","getTransitionProps","_style$transitionDura","_style$transitionTimi","getScale","isWebKit154","Grow","addEndListener","inProp","onEnter","onEntered","onEntering","onExit","onExited","onExiting","TransitionComponent","timer","autoTimeout","nodeRef","normalizedTransitionCallback","maybeIsAppearing","handleEntering","isAppearing","transitionDuration","transitionTimingFunction","handleEntered","handleExiting","handleExit","Grow$1","PopperRoot","BasePopper","components","componentsProps","RootComponent","Popper$1","getTooltipUtilityClass","tooltipClasses","tooltipClasses$1","disableInteractive","touch","TooltipPopper","TooltipTooltip","TooltipArrow","hystersisOpen","hystersisTimer","cursorPosition","composeEventHandler","eventHandler","Tooltip","_slots$popper","_slots$transition","_slots$tooltip","_slots$arrow","_slotProps$popper","_ref6","_slotProps$popper2","_slotProps$transition","_slotProps$tooltip","_ref7","_slotProps$tooltip2","_slotProps$arrow","_ref8","_slotProps$arrow2","childrenProp","describeChild","disableFocusListener","disableHoverListener","disableInteractiveProp","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","idProp","leaveDelay","leaveTouchDelay","onClose","onOpen","openProp","PopperComponentProp","PopperProps","title","TransitionComponentProp","isRtl","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","handleOpen","handleClose","handleLeave","focusVisibleRef","setChildIsFocusVisible","handleBlur","handleFocus","detectTouchStart","childrenProps","handleMouseOver","handleMouseLeave","handleTouchStart","handleTouchEnd","nativeEvent","handleMouseMove","nameOrDescProps","titleIsString","interactiveWrapperListeners","_PopperProps$popperOp","tooltipModifiers","PopperComponent","TooltipComponent","ArrowComponent","popperProps","tooltipProps","tooltipArrowProps","TransitionPropsInner","Tooltip$1","getIcon","menuLabel","leading","MuiListItemIcon","MenuItem","onClick","tooltip","allowForLeadingIcons","iconPathBefore","iconPathAfter","hasAutoFocus","isDense","isSubMenuParent","hasDisabledGutters","hasDivider","focusVisibleClassName","menuItem","MuiMenuItem","MuiListItemText","getAllGroups","menuDefinition","SubMenu","setAnchorEl","parentMenuItem","parentItemProps","handleParentMenuItemClick","renderSubMenuItems","includedGroups","group","GroupedMenuItemList","Menu","getOrderedGroupItems","groupId","allItems","menuProps","commandHandler","groupsToInclude","sortedGroups","itemArray","allowSpaceForLeadingIcons","createMenuItemProps","isLastItemInGroup","divKey","itemInfo","menuItemProps","TopLevelMenu","columnId","MenuColumn","metadata","Grid","List","GridMenu","multiColumnMenu","sortedColumns","columnNumbers","columnName","col","getUsePromiseOptionsDefaults","usePromise","promiseFactoryCallback","defaultValueRef","optionsDefaultedRef","setIsLoading","promiseIsCurrent","MenuIcon","HamburgerMenuButton","menuProvider","normalMenu","fullMenu","containerRef","ariaLabelPrefix","isMenuOpen","setMenuOpen","showFullMenu","setShowFullMenu","handleMenuItemClick","handleMenuButtonClick","prevIsOpen","isOpening","menuCommandHandler","command","setOffset","normalMenuData","fullMenuData","menu","IconButton","Drawer","isTooltipSuppressed","adjustMarginToAlignToEdge","MuiIconButton","Spinner","LoaderCircle","TextField","hasError","helperText","onFocus","onBlur","ShadLabel","Toolbar","AppBar","MuiToolbar","alertVariants","Alert","AlertTitle","AlertDescription","badgeVariants","Badge","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","Sonner","Toaster","Slider","SliderPrimitive","Switch","SwitchPrimitives","Tabs","TabsList","TabsTrigger","TabsContent","InstallButton","isInstalling","handleClick","buttonText","Download","EnableButton","isEnabling","DisableButton","isDisabling","UpdateButton","isUpdating","MarkdownRenderer","markdown","anchorTarget","Markdown","FilterButton","Filter","DropdownMenuItemType","DropdownMenuItemType2","FilterDropdown","groups","NoExtensionsFound","MoreInfo","category","downloads","languages","moreInfoUrl","numberFormatted","NumberFormat","handleScrollToBottom","User","locale","LucideLink","CircleHelp","VersionHistory","versionHistory","showAllVersions","setShowAllVersions","currentDate","formatTimeString","dateString","date","dateDiff","yearDiff","monthDiff","dayDiff","timeString","sortedEntries","Footer","publisherDisplayName","fileSize","locales","formattedFileSize","formatBytes","languageNames","codes","displayNames","useEvent","unsubscriber","noopUnsubscriber","useEventAsync","unsubscribe","unsub"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,KAAgBC,GAAoB,EAAE,QAAQ,MAAO,CAAA;AAyDpD,SAASC,KAAMC,GAAsB;AACnC,SAAAH,GAAcI,GAAKD,CAAM,CAAC;AACnC;ACzDO,MAAME,KAAQC,EAAM;AAAA,EACzB,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,EAAA,GAASC,MAE5B,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAAH;AAAA,MACA,WAAWN;AAAA,QACT;AAAA,QACAK;AAAA,MACF;AAAA,MACA,KAAAG;AAAA,MAEC,GAAGD;AAAA,IAAA;AAAA,EAAA;AAIZ;AACAJ,GAAM,cAAc;ACNpB,MAAMO,KAAmBC;AAAA,EACvB,CACE,EAAE,cAAAC,GAAc,eAAAC,GAAe,eAAAC,GAAe,cAAAC,GAAc,GAAGR,EAAM,GACrEC,MAGE,gBAAAQ,EAAC,OAAI,EAA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AAA,EACA;AAAA,EACA;AACF,GAAGC,KAAI;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,222]} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../src/utils/shadcn-ui.util.ts","../src/components/shadcn-ui/input.tsx","../src/components/advanced/book-chapter-control/book-chapter-input.component.tsx","../../../node_modules/@sillsdev/scripture/dist/index.es.js","../src/components/shadcn-ui/dropdown-menu.tsx","../src/components/advanced/book-chapter-control/book-menu-item.component.tsx","../src/components/advanced/book-chapter-control/chapter-select.component.tsx","../src/components/advanced/book-chapter-control/go-to-menu-item.component.tsx","../src/components/advanced/book-chapter-control/book-chapter-control.component.tsx","../src/components/shadcn-ui/button.tsx","../src/components/shadcn-ui/label.tsx","../src/components/shadcn-ui/radio-group.tsx","../src/components/shadcn-ui/popover.tsx","../src/components/shadcn-ui/dialog.tsx","../src/components/shadcn-ui/command.tsx","../src/components/basics/combo-box.component.tsx","../src/components/basics/chapter-range-selector.component.tsx","../src/components/advanced/book-selector.component.tsx","../src/components/advanced/data-table/data-table-column-toggle.component.tsx","../src/components/shadcn-ui/select.tsx","../src/components/advanced/data-table/data-table-pagination.component.tsx","../src/components/shadcn-ui/table.tsx","../src/components/advanced/data-table/data-table.component.tsx","../src/components/advanced/inventory/occurrences-table.component.tsx","../src/components/shadcn-ui/checkbox.tsx","../src/components/advanced/inventory/inventory-utils.ts","../src/components/shadcn-ui/toggle.tsx","../src/components/shadcn-ui/toggle-group.tsx","../src/components/advanced/inventory/inventory-columns.tsx","../src/components/advanced/inventory/inventory.component.tsx","../src/components/advanced/multi-select-combo-box.tsx","../src/components/basics/search-bar.component.tsx","../src/components/basics/tabs-vertical.tsx","../src/components/advanced/navigation-content-search.component.tsx","../src/components/advanced/scripture-results-viewer/scripture-results-viewer.component.tsx","../src/components/advanced/scroll-group-selector.component.tsx","../src/components/shadcn-ui/separator.tsx","../src/components/advanced/settings-components/settings-list.component.tsx","../src/components/basics/checklist.component.tsx","../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../node_modules/@mui/utils/chainPropTypes/chainPropTypes.js","../../../node_modules/@babel/runtime/helpers/esm/extends.js","../../../node_modules/@mui/utils/deepmerge/deepmerge.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../node_modules/prop-types/node_modules/react-is/index.js","../../../node_modules/object-assign/index.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/lib/has.js","../../../node_modules/prop-types/checkPropTypes.js","../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.js","../../../node_modules/@mui/utils/exactProp/exactProp.js","../../../node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/cjs/react-is.development.js","../../../node_modules/react-is/index.js","../../../node_modules/@mui/utils/getDisplayName/getDisplayName.js","../../../node_modules/@mui/utils/HTMLElementType/HTMLElementType.js","../../../node_modules/@mui/utils/refType/refType.js","../../../node_modules/@mui/utils/capitalize/capitalize.js","../../../node_modules/@mui/utils/createChainedFunction/createChainedFunction.js","../../../node_modules/@mui/utils/debounce/debounce.js","../../../node_modules/@mui/utils/deprecatedPropType/deprecatedPropType.js","../../../node_modules/@mui/utils/isMuiElement/isMuiElement.js","../../../node_modules/@mui/utils/ownerDocument/ownerDocument.js","../../../node_modules/@mui/utils/ownerWindow/ownerWindow.js","../../../node_modules/@mui/utils/requirePropFactory/requirePropFactory.js","../../../node_modules/@mui/utils/setRef/setRef.js","../../../node_modules/@mui/utils/useEnhancedEffect/useEnhancedEffect.js","../../../node_modules/@mui/utils/useId/useId.js","../../../node_modules/@mui/utils/unsupportedProp/unsupportedProp.js","../../../node_modules/@mui/utils/useControlled/useControlled.js","../../../node_modules/@mui/utils/useEventCallback/useEventCallback.js","../../../node_modules/@mui/utils/useForkRef/useForkRef.js","../../../node_modules/@mui/utils/useLazyRef/useLazyRef.js","../../../node_modules/@mui/utils/useOnMount/useOnMount.js","../../../node_modules/@mui/utils/useTimeout/useTimeout.js","../../../node_modules/@mui/utils/useIsFocusVisible/useIsFocusVisible.js","../../../node_modules/@mui/utils/resolveProps/resolveProps.js","../../../node_modules/@mui/utils/composeClasses/composeClasses.js","../../../node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.js","../../../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js","../../../node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js","../../../node_modules/@mui/utils/clamp/clamp.js","../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../node_modules/@mui/system/esm/createTheme/createBreakpoints.js","../../../node_modules/@mui/system/esm/createTheme/shape.js","../../../node_modules/@mui/system/esm/responsivePropType.js","../../../node_modules/@mui/system/esm/merge.js","../../../node_modules/@mui/system/esm/breakpoints.js","../../../node_modules/@mui/system/esm/style.js","../../../node_modules/@mui/system/esm/memoize.js","../../../node_modules/@mui/system/esm/spacing.js","../../../node_modules/@mui/system/esm/createTheme/createSpacing.js","../../../node_modules/@mui/system/esm/compose.js","../../../node_modules/@mui/system/esm/borders.js","../../../node_modules/@mui/system/esm/cssGrid.js","../../../node_modules/@mui/system/esm/palette.js","../../../node_modules/@mui/system/esm/sizing.js","../../../node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","../../../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","../../../node_modules/@mui/system/esm/createTheme/applyStyles.js","../../../node_modules/@mui/system/esm/createTheme/createTheme.js","../../../node_modules/@mui/system/esm/useThemeWithoutDefault.js","../../../node_modules/@mui/system/esm/useTheme.js","../../../node_modules/@mui/system/esm/createStyled.js","../../../node_modules/@mui/system/esm/useThemeProps/getThemeProps.js","../../../node_modules/@mui/system/esm/useThemeProps/useThemeProps.js","../../../node_modules/@mui/system/esm/colorManipulator.js","../../../node_modules/@mui/material/styles/createMixins.js","../../../node_modules/@mui/material/colors/common.js","../../../node_modules/@mui/material/colors/grey.js","../../../node_modules/@mui/material/colors/purple.js","../../../node_modules/@mui/material/colors/red.js","../../../node_modules/@mui/material/colors/orange.js","../../../node_modules/@mui/material/colors/blue.js","../../../node_modules/@mui/material/colors/lightBlue.js","../../../node_modules/@mui/material/colors/green.js","../../../node_modules/@mui/material/styles/createPalette.js","../../../node_modules/@mui/material/styles/createTypography.js","../../../node_modules/@mui/material/styles/shadows.js","../../../node_modules/@mui/material/styles/createTransitions.js","../../../node_modules/@mui/material/styles/zIndex.js","../../../node_modules/@mui/material/styles/createTheme.js","../../../node_modules/@mui/material/styles/defaultTheme.js","../../../node_modules/@mui/material/styles/identifier.js","../../../node_modules/@mui/material/styles/useThemeProps.js","../../../node_modules/@mui/material/styles/styled.js","../../../node_modules/@mui/material/SvgIcon/svgIconClasses.js","../../../node_modules/@mui/material/SvgIcon/SvgIcon.js","../../../node_modules/@mui/material/utils/createSvgIcon.js","../../../node_modules/@mui/material/utils/index.js","../../../node_modules/@mui/icons-material/utils/createSvgIcon.js","../../../node_modules/@mui/icons-material/ArrowRight.js","../../../node_modules/@mui/base/utils/isHostComponent.js","../../../node_modules/@mui/base/utils/appendOwnerState.js","../../../node_modules/@mui/base/utils/ClassNameConfigurator.js","../../../node_modules/@mui/base/utils/extractEventHandlers.js","../../../node_modules/@mui/base/utils/resolveComponentProps.js","../../../node_modules/@mui/base/utils/omitEventHandlers.js","../../../node_modules/@mui/base/utils/mergeSlotProps.js","../../../node_modules/@mui/base/utils/useSlotProps.js","../../../node_modules/@mui/base/generateUtilityClass/index.js","../../../node_modules/@mui/base/generateUtilityClasses/index.js","../../../node_modules/@mui/base/Portal/Portal.js","../../../node_modules/@popperjs/core/lib/enums.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../node_modules/@popperjs/core/lib/utils/math.js","../../../node_modules/@popperjs/core/lib/utils/userAgent.js","../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../node_modules/@popperjs/core/lib/utils/within.js","../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../node_modules/@popperjs/core/lib/utils/debounce.js","../../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../node_modules/@popperjs/core/lib/createPopper.js","../../../node_modules/@popperjs/core/lib/popper.js","../../../node_modules/@mui/base/Popper/popperClasses.js","../../../node_modules/@mui/base/Popper/Popper.js","../../../node_modules/@mui/material/styles/useTheme.js","../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../node_modules/react-transition-group/esm/config.js","../../../node_modules/react-transition-group/esm/utils/PropTypes.js","../../../node_modules/react-transition-group/esm/TransitionGroupContext.js","../../../node_modules/react-transition-group/esm/utils/reflow.js","../../../node_modules/react-transition-group/esm/Transition.js","../../../node_modules/@mui/material/transitions/utils.js","../../../node_modules/@mui/material/Grow/Grow.js","../../../node_modules/@mui/material/Popper/Popper.js","../../../node_modules/@mui/material/Tooltip/tooltipClasses.js","../../../node_modules/@mui/material/Tooltip/Tooltip.js","../src/components/mui/menu-item.component.tsx","../src/components/mui/grouped-menu-item-list.component.tsx","../src/components/mui/top-level-menu.component.tsx","../src/components/mui/grid-menu.component.tsx","../src/hooks/use-promise.hook.ts","../../../node_modules/@mui/icons-material/esm/Menu.js","../src/components/mui/hamburger-menu-button.component.tsx","../src/components/mui/icon-button.component.tsx","../src/components/basics/spinner.component.tsx","../src/components/basics/text-field.component.tsx","../src/components/mui/toolbar.component.tsx","../src/components/shadcn-ui/alert.tsx","../src/components/shadcn-ui/badge.tsx","../src/components/shadcn-ui/card.tsx","../src/components/shadcn-ui/sonner.tsx","../src/components/shadcn-ui/slider.tsx","../src/components/shadcn-ui/switch.tsx","../src/components/shadcn-ui/tabs.tsx","../src/components/advanced/extension-marketplace/buttons/install-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/enable-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/disable-button.component.tsx","../src/components/advanced/extension-marketplace/buttons/update-button.component.tsx","../src/components/advanced/extension-marketplace/markdown-renderer.component.tsx","../src/components/advanced/extension-marketplace/buttons/filter-button.component.tsx","../src/components/advanced/extension-marketplace/filter-dropdown.component.tsx","../src/components/advanced/extension-marketplace/no-extensions-found.component.tsx","../src/components/advanced/extension-marketplace/more-info.component.tsx","../src/components/advanced/extension-marketplace/version-history.component.tsx","../src/components/advanced/extension-marketplace/footer.component.tsx","../src/components/advanced/filterable-resource-list/filterable-resource-list.component.tsx","../src/hooks/use-event.hook.ts","../src/hooks/use-event-async.hook.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst twMergeCustom = extendTailwindMerge({ prefix: 'tw-' });\n\n/**\n * Tailwind and CSS class application helper function. Uses\n * [`clsx`](https://www.npmjs.com/package/clsx) to make it easy to apply classes conditionally using\n * object syntax, and uses [`tailwind-merge`](https://www.npmjs.com/package/tailwind-merge) to make\n * it easy to merge/overwrite Tailwind classes in a programmer-logic-friendly way.\n *\n * Note: `tailwind-merge` is configured to use the prefix `tw-`, so you must use the same prefix\n * with any Tailwind classes you use with this function to successfully overwrite other Tailwind\n * classes. `platform-bible-react` is configured to use `tw-` as its Tailwind prefix, so any\n * Tailwind classes you pass into `platform-bible-react` components will be compared using the `tw-`\n * prefix.\n *\n * This function was popularized by\n * [shadcn/ui](https://ui.shadcn.com/docs/installation/manual#add-a-cn-helper). See [ByteGrad's\n * explanation video](https://www.youtube.com/watch?v=re2JFITR7TI) for more information.\n *\n * @example\n *\n * ```typescript\n * const borderShouldBeBlue = true;\n * const textShouldBeRed = true;\n * const heightShouldBe20 = false;\n * const classString = cn(\n * 'tw-bg-primary tw-h-10 tw-text-primary-foreground',\n * 'tw-bg-secondary',\n * {\n * 'tw-border-blue-500': borderShouldBeBlue,\n * 'tw-text-red-500': textShouldBeRed,\n * 'tw-h-20': heightShouldBe20,\n * },\n * 'some-class',\n * );\n * ```\n *\n * The resulting `classString` is `'tw-h-10 tw-bg-secondary tw-border-blue-500 tw-text-red-500\n * some-class'`\n *\n * - Notice that `'tw-bg-secondary'`, specified later, overwrote `'tw-bg-primary'`, specified earlier,\n * because they are Tailwind classes that affect the same css property\n * - Notice that `'tw-text-red-500'`, specified later, overwrote `'tw-text-primary-foreground'`,\n * specified earlier, because they are Tailwind classes that affect the same css property\n * - Notice that `'tw-h-20'`, specified later, did not overwrite `'tw-h-10'`, specified earlier,\n * because `'tw-h-20'` is part of a conditional class object and its value evaluated to `false`;\n * therefore it was not applied\n * - Notice that `'some-class'` was applied. This function is not limited only to Tailwind classes.\n *\n *\n * @param inputs Class strings or `clsx` conditional class objects to merge. Tailwind classes\n * specified later in the arguments overwrite similar Tailwind classes specified earlier in the\n * arguments\n * @returns Class string containing all applicable classes from the arguments based on the rules\n * described above\n */\n// shadcn/ui uses this export in its boilerplate code\n// eslint-disable-next-line import/prefer-default-export\nexport function cn(...inputs: ClassValue[]) {\n return twMergeCustom(clsx(inputs));\n}\n","import React from 'react';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport interface InputProps extends React.InputHTMLAttributes {}\n\nexport const Input = React.forwardRef(\n ({ className, type, ...props }, ref) => {\n return (\n \n );\n },\n);\nInput.displayName = 'Input';\n","import { FocusEventHandler, forwardRef, KeyboardEvent, MouseEventHandler } from 'react';\nimport { History } from 'lucide-react';\nimport { Input as ShadInput } from '@/components/shadcn-ui/input';\n\nexport type BookChapterInputProps = {\n handleSearch: (searchString: string) => void;\n handleKeyDown: (event: KeyboardEvent) => void;\n handleOnClick: MouseEventHandler;\n handleSubmit: () => void;\n onFocus?: FocusEventHandler;\n value: string;\n placeholder: string;\n};\n\n// Shadcn Input sets type to \"button\"- HAVE to prop spread before setting type\nconst BookChapterInput = forwardRef(\n (\n { handleSearch, handleKeyDown, handleOnClick, handleSubmit, ...props }: BookChapterInputProps,\n ref,\n ) => {\n return (\n
\n handleSearch(event.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n handleSubmit();\n }\n handleKeyDown(e);\n }}\n onClick={handleOnClick}\n ref={ref}\n />\n {\n // eslint-disable-next-line no-console\n console.log('back in history');\n }}\n />\n
\n );\n },\n);\n\nexport default BookChapterInput;\n","var P = Object.defineProperty;\nvar R = (t, e, s) => e in t ? P(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;\nvar n = (t, e, s) => R(t, typeof e != \"symbol\" ? e + \"\" : e, s);\nclass _ {\n constructor() {\n n(this, \"books\");\n n(this, \"firstSelectedBookNum\");\n n(this, \"lastSelectedBookNum\");\n n(this, \"count\");\n n(this, \"selectedBookNumbers\");\n n(this, \"selectedBookIds\");\n }\n}\nconst N = [\n \"GEN\",\n \"EXO\",\n \"LEV\",\n \"NUM\",\n \"DEU\",\n \"JOS\",\n \"JDG\",\n \"RUT\",\n \"1SA\",\n \"2SA\",\n // 10\n \"1KI\",\n \"2KI\",\n \"1CH\",\n \"2CH\",\n \"EZR\",\n \"NEH\",\n \"EST\",\n \"JOB\",\n \"PSA\",\n \"PRO\",\n // 20\n \"ECC\",\n \"SNG\",\n \"ISA\",\n \"JER\",\n \"LAM\",\n \"EZK\",\n \"DAN\",\n \"HOS\",\n \"JOL\",\n \"AMO\",\n // 30\n \"OBA\",\n \"JON\",\n \"MIC\",\n \"NAM\",\n \"HAB\",\n \"ZEP\",\n \"HAG\",\n \"ZEC\",\n \"MAL\",\n \"MAT\",\n // 40\n \"MRK\",\n \"LUK\",\n \"JHN\",\n \"ACT\",\n \"ROM\",\n \"1CO\",\n \"2CO\",\n \"GAL\",\n \"EPH\",\n \"PHP\",\n // 50\n \"COL\",\n \"1TH\",\n \"2TH\",\n \"1TI\",\n \"2TI\",\n \"TIT\",\n \"PHM\",\n \"HEB\",\n \"JAS\",\n \"1PE\",\n // 60\n \"2PE\",\n \"1JN\",\n \"2JN\",\n \"3JN\",\n \"JUD\",\n \"REV\",\n \"TOB\",\n \"JDT\",\n \"ESG\",\n \"WIS\",\n // 70\n \"SIR\",\n \"BAR\",\n \"LJE\",\n \"S3Y\",\n \"SUS\",\n \"BEL\",\n \"1MA\",\n \"2MA\",\n \"3MA\",\n \"4MA\",\n // 80\n \"1ES\",\n \"2ES\",\n \"MAN\",\n \"PS2\",\n \"ODA\",\n \"PSS\",\n \"JSA\",\n // actual variant text for JOS, now in LXA text\n \"JDB\",\n // actual variant text for JDG, now in LXA text\n \"TBS\",\n // actual variant text for TOB, now in LXA text\n \"SST\",\n // actual variant text for SUS, now in LXA text // 90\n \"DNT\",\n // actual variant text for DAN, now in LXA text\n \"BLT\",\n // actual variant text for BEL, now in LXA text\n \"XXA\",\n \"XXB\",\n \"XXC\",\n \"XXD\",\n \"XXE\",\n \"XXF\",\n \"XXG\",\n \"FRT\",\n // 100\n \"BAK\",\n \"OTH\",\n \"3ES\",\n // Used previously but really should be 2ES\n \"EZA\",\n // Used to be called 4ES, but not actually in any known project\n \"5EZ\",\n // Used to be called 5ES, but not actually in any known project\n \"6EZ\",\n // Used to be called 6ES, but not actually in any known project\n \"INT\",\n \"CNC\",\n \"GLO\",\n \"TDX\",\n // 110\n \"NDX\",\n \"DAG\",\n \"PS3\",\n \"2BA\",\n \"LBA\",\n \"JUB\",\n \"ENO\",\n \"1MQ\",\n \"2MQ\",\n \"3MQ\",\n // 120\n \"REP\",\n \"4BA\",\n \"LAO\"\n], B = [\n \"XXA\",\n \"XXB\",\n \"XXC\",\n \"XXD\",\n \"XXE\",\n \"XXF\",\n \"XXG\",\n \"FRT\",\n \"BAK\",\n \"OTH\",\n \"INT\",\n \"CNC\",\n \"GLO\",\n \"TDX\",\n \"NDX\"\n], O = [\n \"Genesis\",\n \"Exodus\",\n \"Leviticus\",\n \"Numbers\",\n \"Deuteronomy\",\n \"Joshua\",\n \"Judges\",\n \"Ruth\",\n \"1 Samuel\",\n \"2 Samuel\",\n \"1 Kings\",\n \"2 Kings\",\n \"1 Chronicles\",\n \"2 Chronicles\",\n \"Ezra\",\n \"Nehemiah\",\n \"Esther (Hebrew)\",\n \"Job\",\n \"Psalms\",\n \"Proverbs\",\n \"Ecclesiastes\",\n \"Song of Songs\",\n \"Isaiah\",\n \"Jeremiah\",\n \"Lamentations\",\n \"Ezekiel\",\n \"Daniel (Hebrew)\",\n \"Hosea\",\n \"Joel\",\n \"Amos\",\n \"Obadiah\",\n \"Jonah\",\n \"Micah\",\n \"Nahum\",\n \"Habakkuk\",\n \"Zephaniah\",\n \"Haggai\",\n \"Zechariah\",\n \"Malachi\",\n \"Matthew\",\n \"Mark\",\n \"Luke\",\n \"John\",\n \"Acts\",\n \"Romans\",\n \"1 Corinthians\",\n \"2 Corinthians\",\n \"Galatians\",\n \"Ephesians\",\n \"Philippians\",\n \"Colossians\",\n \"1 Thessalonians\",\n \"2 Thessalonians\",\n \"1 Timothy\",\n \"2 Timothy\",\n \"Titus\",\n \"Philemon\",\n \"Hebrews\",\n \"James\",\n \"1 Peter\",\n \"2 Peter\",\n \"1 John\",\n \"2 John\",\n \"3 John\",\n \"Jude\",\n \"Revelation\",\n \"Tobit\",\n \"Judith\",\n \"Esther Greek\",\n \"Wisdom of Solomon\",\n \"Sirach (Ecclesiasticus)\",\n \"Baruch\",\n \"Letter of Jeremiah\",\n \"Song of 3 Young Men\",\n \"Susanna\",\n \"Bel and the Dragon\",\n \"1 Maccabees\",\n \"2 Maccabees\",\n \"3 Maccabees\",\n \"4 Maccabees\",\n \"1 Esdras (Greek)\",\n \"2 Esdras (Latin)\",\n \"Prayer of Manasseh\",\n \"Psalm 151\",\n \"Odes\",\n \"Psalms of Solomon\",\n // WARNING, if you change the spelling of the *obsolete* tag be sure to update\n // IsObsolete routine\n \"Joshua A. *obsolete*\",\n \"Judges B. *obsolete*\",\n \"Tobit S. *obsolete*\",\n \"Susanna Th. *obsolete*\",\n \"Daniel Th. *obsolete*\",\n \"Bel Th. *obsolete*\",\n \"Extra A\",\n \"Extra B\",\n \"Extra C\",\n \"Extra D\",\n \"Extra E\",\n \"Extra F\",\n \"Extra G\",\n \"Front Matter\",\n \"Back Matter\",\n \"Other Matter\",\n \"3 Ezra *obsolete*\",\n \"Apocalypse of Ezra\",\n \"5 Ezra (Latin Prologue)\",\n \"6 Ezra (Latin Epilogue)\",\n \"Introduction\",\n \"Concordance \",\n \"Glossary \",\n \"Topical Index\",\n \"Names Index\",\n \"Daniel Greek\",\n \"Psalms 152-155\",\n \"2 Baruch (Apocalypse)\",\n \"Letter of Baruch\",\n \"Jubilees\",\n \"Enoch\",\n \"1 Meqabyan\",\n \"2 Meqabyan\",\n \"3 Meqabyan\",\n \"Reproof (Proverbs 25-31)\",\n \"4 Baruch (Rest of Baruch)\",\n \"Laodiceans\"\n], S = K();\nfunction g(t, e = !0) {\n return e && (t = t.toUpperCase()), t in S ? S[t] : 0;\n}\nfunction k(t) {\n return g(t) > 0;\n}\nfunction x(t) {\n const e = typeof t == \"string\" ? g(t) : t;\n return e >= 40 && e <= 66;\n}\nfunction T(t) {\n return (typeof t == \"string\" ? g(t) : t) <= 39;\n}\nfunction X(t) {\n return t <= 66;\n}\nfunction V(t) {\n const e = typeof t == \"string\" ? g(t) : t;\n return w(e) && !X(e);\n}\nfunction* L() {\n for (let t = 1; t <= N.length; t++) yield t;\n}\nconst G = 1, A = N.length;\nfunction H() {\n return [\"XXA\", \"XXB\", \"XXC\", \"XXD\", \"XXE\", \"XXF\", \"XXG\"];\n}\nfunction C(t, e = \"***\") {\n const s = t - 1;\n return s < 0 || s >= N.length ? e : N[s];\n}\nfunction I(t) {\n return t <= 0 || t > A ? \"******\" : O[t - 1];\n}\nfunction y(t) {\n return I(g(t));\n}\nfunction w(t) {\n const e = typeof t == \"number\" ? C(t) : t;\n return k(e) && !B.includes(e);\n}\nfunction q(t) {\n const e = typeof t == \"number\" ? C(t) : t;\n return k(e) && B.includes(e);\n}\nfunction U(t) {\n return O[t - 1].includes(\"*obsolete*\");\n}\nfunction K() {\n const t = {};\n for (let e = 0; e < N.length; e++)\n t[N[e]] = e + 1;\n return t;\n}\nconst m = {\n allBookIds: N,\n nonCanonicalIds: B,\n bookIdToNumber: g,\n isBookIdValid: k,\n isBookNT: x,\n isBookOT: T,\n isBookOTNT: X,\n isBookDC: V,\n allBookNumbers: L,\n firstBook: G,\n lastBook: A,\n extraBooks: H,\n bookNumberToId: C,\n bookNumberToEnglishName: I,\n bookIdToEnglishName: y,\n isCanonical: w,\n isExtraMaterial: q,\n isObsolete: U\n};\nvar l = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = \"Unknown\", t[t.Original = 1] = \"Original\", t[t.Septuagint = 2] = \"Septuagint\", t[t.Vulgate = 3] = \"Vulgate\", t[t.English = 4] = \"English\", t[t.RussianProtestant = 5] = \"RussianProtestant\", t[t.RussianOrthodox = 6] = \"RussianOrthodox\", t))(l || {});\nconst h = class h {\n // private versInfo: Versification;\n constructor(e) {\n n(this, \"name\");\n n(this, \"fullPath\");\n n(this, \"isPresent\");\n n(this, \"hasVerseSegments\");\n n(this, \"isCustomized\");\n n(this, \"baseVersification\");\n n(this, \"scriptureBooks\");\n n(this, \"_type\");\n if (e == null)\n throw new Error(\"Argument undefined\");\n typeof e == \"string\" ? (this.name = e, this._type = l[e]) : (this._type = e, this.name = l[e]);\n }\n get type() {\n return this._type;\n }\n equals(e) {\n return !e.type || !this.type ? !1 : e.type === this.type;\n }\n};\nn(h, \"Original\", new h(l.Original)), n(h, \"Septuagint\", new h(l.Septuagint)), n(h, \"Vulgate\", new h(l.Vulgate)), n(h, \"English\", new h(l.English)), n(h, \"RussianProtestant\", new h(l.RussianProtestant)), n(h, \"RussianOrthodox\", new h(l.RussianOrthodox));\nlet c = h;\nfunction E(t, e) {\n const s = e[0];\n for (let r = 1; r < e.length; r++)\n t = t.split(e[r]).join(s);\n return t.split(s);\n}\nvar D = /* @__PURE__ */ ((t) => (t[t.Valid = 0] = \"Valid\", t[t.UnknownVersification = 1] = \"UnknownVersification\", t[t.OutOfRange = 2] = \"OutOfRange\", t[t.VerseOutOfOrder = 3] = \"VerseOutOfOrder\", t[t.VerseRepeated = 4] = \"VerseRepeated\", t))(D || {});\nconst i = class i {\n constructor(e, s, r, a) {\n /** Not yet implemented. */\n n(this, \"firstChapter\");\n /** Not yet implemented. */\n n(this, \"lastChapter\");\n /** Not yet implemented. */\n n(this, \"lastVerse\");\n /** Not yet implemented. */\n n(this, \"hasSegmentsDefined\");\n /** Not yet implemented. */\n n(this, \"text\");\n /** Not yet implemented. */\n n(this, \"BBBCCCVVVS\");\n /** Not yet implemented. */\n n(this, \"longHashCode\");\n /** The versification of the reference. */\n n(this, \"versification\");\n n(this, \"rtlMark\", \"‏\");\n n(this, \"_bookNum\", 0);\n n(this, \"_chapterNum\", 0);\n n(this, \"_verseNum\", 0);\n n(this, \"_verse\");\n if (r == null && a == null)\n if (e != null && typeof e == \"string\") {\n const o = e, u = s != null && s instanceof c ? s : void 0;\n this.setEmpty(u), this.parse(o);\n } else if (e != null && typeof e == \"number\") {\n const o = s != null && s instanceof c ? s : void 0;\n this.setEmpty(o), this._verseNum = e % i.chapterDigitShifter, this._chapterNum = Math.floor(\n e % i.bookDigitShifter / i.chapterDigitShifter\n ), this._bookNum = Math.floor(e / i.bookDigitShifter);\n } else if (s == null)\n if (e != null && e instanceof i) {\n const o = e;\n this._bookNum = o.bookNum, this._chapterNum = o.chapterNum, this._verseNum = o.verseNum, this._verse = o.verse, this.versification = o.versification;\n } else {\n if (e == null) return;\n const o = e instanceof c ? e : i.defaultVersification;\n this.setEmpty(o);\n }\n else\n throw new Error(\"VerseRef constructor not supported.\");\n else if (e != null && s != null && r != null)\n if (typeof e == \"string\" && typeof s == \"string\" && typeof r == \"string\")\n this.setEmpty(a), this.updateInternal(e, s, r);\n else if (typeof e == \"number\" && typeof s == \"number\" && typeof r == \"number\")\n this._bookNum = e, this._chapterNum = s, this._verseNum = r, this.versification = a ?? i.defaultVersification;\n else\n throw new Error(\"VerseRef constructor not supported.\");\n else\n throw new Error(\"VerseRef constructor not supported.\");\n }\n /**\n * Determines if the verse string is in a valid format (does not consider versification).\n */\n static isVerseParseable(e) {\n return e.length > 0 && \"0123456789\".includes(e[0]) && !e.endsWith(this.verseRangeSeparator) && !e.endsWith(this.verseSequenceIndicator);\n }\n /**\n * Tries to parse the specified string into a verse reference.\n * @param str - The string to attempt to parse.\n * @returns success: `true` if the specified string was successfully parsed, `false` otherwise.\n * @returns verseRef: The result of the parse if successful, or empty VerseRef if it failed\n */\n static tryParse(e) {\n let s;\n try {\n return s = new i(e), { success: !0, verseRef: s };\n } catch (r) {\n if (r instanceof v)\n return s = new i(), { success: !1, verseRef: s };\n throw r;\n }\n }\n /**\n * Gets the reference as a comparable integer where the book, chapter, and verse each occupy 3\n * digits.\n * @param bookNum - Book number (this is 1-based, not an index).\n * @param chapterNum - Chapter number.\n * @param verseNum - Verse number.\n * @returns The reference as a comparable integer where the book, chapter, and verse each occupy 3\n * digits.\n */\n static getBBBCCCVVV(e, s, r) {\n return e % i.bcvMaxValue * i.bookDigitShifter + (s >= 0 ? s % i.bcvMaxValue * i.chapterDigitShifter : 0) + (r >= 0 ? r % i.bcvMaxValue : 0);\n }\n /**\n * Deserializes a serialized VerseRef.\n * @param serializedVerseRef - Serialized VerseRef to create from.\n * @returns the deserialized VerseRef.\n */\n static fromJSON(e) {\n const { book: s, chapterNum: r, verseNum: a, verse: o, versificationStr: u } = e, f = o || a.toString();\n let d;\n return u && (d = new c(u)), s ? new i(s, r.toString(), f, d) : new i();\n }\n /**\n * Parses a verse string and gets the leading numeric portion as a number.\n * @param verseStr - verse string to parse\n * @returns true if the entire string could be parsed as a single, simple verse number (1-999);\n * false if the verse string represented a verse bridge, contained segment letters, or was invalid\n */\n static tryGetVerseNum(e) {\n let s;\n if (!e)\n return s = -1, { success: !0, vNum: s };\n s = 0;\n let r;\n for (let a = 0; a < e.length; a++) {\n if (r = e[a], r < \"0\" || r > \"9\")\n return a === 0 && (s = -1), { success: !1, vNum: s };\n if (s = s * 10 + +r - 0, s > i.bcvMaxValue)\n return s = -1, { success: !1, vNum: s };\n }\n return { success: !0, vNum: s };\n }\n /**\n * Checks to see if a VerseRef hasn't been set - all values are the default.\n */\n get isDefault() {\n return this.bookNum === 0 && this.chapterNum === 0 && this.verseNum === 0 && this.versification == null;\n }\n /**\n * Gets whether the verse contains multiple verses.\n */\n get hasMultiple() {\n return this._verse != null && (this._verse.includes(i.verseRangeSeparator) || this._verse.includes(i.verseSequenceIndicator));\n }\n /**\n * Gets or sets the book of the reference. Book is the 3-letter abbreviation in capital letters,\n * e.g. `'MAT'`.\n */\n get book() {\n return m.bookNumberToId(this.bookNum, \"\");\n }\n set book(e) {\n this.bookNum = m.bookIdToNumber(e);\n }\n /**\n * Gets or sets the chapter of the reference,. e.g. `'3'`.\n */\n get chapter() {\n return this.isDefault || this._chapterNum < 0 ? \"\" : this._chapterNum.toString();\n }\n set chapter(e) {\n const s = +e;\n this._chapterNum = Number.isInteger(s) ? s : -1;\n }\n /**\n * Gets or sets the verse of the reference, including range, segments, and sequences, e.g. `'4'`,\n * or `'4b-5a, 7'`.\n */\n get verse() {\n return this._verse != null ? this._verse : this.isDefault || this._verseNum < 0 ? \"\" : this._verseNum.toString();\n }\n set verse(e) {\n const { success: s, vNum: r } = i.tryGetVerseNum(e);\n this._verse = s ? void 0 : e.replace(this.rtlMark, \"\"), this._verseNum = r, !(this._verseNum >= 0) && ({ vNum: this._verseNum } = i.tryGetVerseNum(this._verse));\n }\n /**\n * Get or set Book based on book number, e.g. `42`.\n */\n get bookNum() {\n return this._bookNum;\n }\n set bookNum(e) {\n if (e <= 0 || e > m.lastBook)\n throw new v(\n \"BookNum must be greater than zero and less than or equal to last book\"\n );\n this._bookNum = e;\n }\n /**\n * Gets or sets the chapter number, e.g. `3`. `-1` if not valid.\n */\n get chapterNum() {\n return this._chapterNum;\n }\n set chapterNum(e) {\n this.chapterNum = e;\n }\n /**\n * Gets or sets verse start number, e.g. `4`. `-1` if not valid.\n */\n get verseNum() {\n return this._verseNum;\n }\n set verseNum(e) {\n this._verseNum = e;\n }\n /**\n * String representing the versification (should ONLY be used for serialization/deserialization).\n *\n * @remarks This is for backwards compatibility when ScrVers was an enumeration.\n */\n get versificationStr() {\n var e;\n return (e = this.versification) == null ? void 0 : e.name;\n }\n set versificationStr(e) {\n this.versification = this.versification != null ? new c(e) : void 0;\n }\n /**\n * Determines if the reference is valid.\n */\n get valid() {\n return this.validStatus === 0;\n }\n /**\n * Get the valid status for this reference.\n */\n get validStatus() {\n return this.validateVerse(i.verseRangeSeparators, i.verseSequenceIndicators);\n }\n /**\n * Gets the reference as a comparable integer where the book,\n * chapter, and verse each occupy three digits and the verse is 0.\n */\n get BBBCCC() {\n return i.getBBBCCCVVV(this._bookNum, this._chapterNum, 0);\n }\n /**\n * Gets the reference as a comparable integer where the book,\n * chapter, and verse each occupy three digits. If verse is not null\n * (i.e., this reference represents a complex reference with verse\n * segments or bridge) this cannot be used for an exact comparison.\n */\n get BBBCCCVVV() {\n return i.getBBBCCCVVV(this._bookNum, this._chapterNum, this._verseNum);\n }\n /**\n * Gets whether the verse is defined as an excluded verse in the versification.\n * Does not handle verse ranges.\n */\n // eslint-disable-next-line @typescript-eslint/class-literal-property-style\n get isExcluded() {\n return !1;\n }\n /**\n * Parses the reference in the specified string.\n * Optionally versification can follow reference as in GEN 3:11/4\n * Throw an exception if\n * - invalid book name\n * - chapter number is missing or not a number\n * - verse number is missing or does not start with a number\n * - versification is invalid\n * @param verseStr - string to parse e.g. 'MAT 3:11'\n */\n parse(e) {\n if (e = e.replace(this.rtlMark, \"\"), e.includes(\"/\")) {\n const o = e.split(\"/\");\n if (e = o[0], o.length > 1)\n try {\n const u = +o[1].trim();\n this.versification = new c(l[u]);\n } catch {\n throw new v(\"Invalid reference : \" + e);\n }\n }\n const s = e.trim().split(\" \");\n if (s.length !== 2)\n throw new v(\"Invalid reference : \" + e);\n const r = s[1].split(\":\"), a = +r[0];\n if (r.length !== 2 || m.bookIdToNumber(s[0]) === 0 || !Number.isInteger(a) || a < 0 || !i.isVerseParseable(r[1]))\n throw new v(\"Invalid reference : \" + e);\n this.updateInternal(s[0], r[0], r[1]);\n }\n /**\n * Simplifies this verse ref so that it has no bridging of verses or\n * verse segments like `'1a'`.\n */\n simplify() {\n this._verse = void 0;\n }\n /**\n * Makes a clone of the reference.\n *\n * @returns The cloned VerseRef.\n */\n clone() {\n return new i(this);\n }\n toString() {\n const e = this.book;\n return e === \"\" ? \"\" : `${e} ${this.chapter}:${this.verse}`;\n }\n toJSON() {\n let e = this.verse;\n (e === \"\" || e === this.verseNum.toString()) && (e = void 0);\n const s = {\n book: this.book,\n chapterNum: this.chapterNum,\n verseNum: this.verseNum,\n verse: e,\n versificationStr: this.versificationStr\n };\n return e || delete s.verse, s;\n }\n /**\n * Compares this `VerseRef` with supplied one.\n * @param verseRef - object to compare this one to.\n * @returns `true` if this `VerseRef` is equal to the supplied one, `false` otherwise.\n */\n equals(e) {\n return e instanceof i ? e._bookNum === this._bookNum && e._chapterNum === this._chapterNum && e._verseNum === this._verseNum && e.verse === this.verse && (e.versification == null && this.versification == null || e.versification != null && this.versification != null && e.versification.equals(this.versification)) : !1;\n }\n /**\n * Enumerate all individual verses contained in a VerseRef.\n * Verse ranges are indicated by \"-\" and consecutive verses by \",\"s.\n * Examples:\n * GEN 1:2 returns GEN 1:2\n * GEN 1:1a-3b,5 returns GEN 1:1a, GEN 1:2, GEN 1:3b, GEN 1:5\n * GEN 1:2a-2c returns //! ??????\n *\n * @param specifiedVersesOnly - if set to true return only verses that are\n * explicitly specified only, not verses within a range. Defaults to `false`.\n * @param verseRangeSeparators - Verse range separators.\n * Defaults to `VerseRef.verseRangeSeparators`.\n * @param verseSequenceSeparators - Verse sequence separators.\n * Defaults to `VerseRef.verseSequenceIndicators`.\n * @returns An array of all single verse references in this VerseRef.\n */\n allVerses(e = !1, s = i.verseRangeSeparators, r = i.verseSequenceIndicators) {\n if (this._verse == null || this.chapterNum <= 0)\n return [this.clone()];\n const a = [], o = E(this._verse, r);\n for (const u of o.map((f) => E(f, s))) {\n const f = this.clone();\n f.verse = u[0];\n const d = f.verseNum;\n if (a.push(f), u.length > 1) {\n const b = this.clone();\n if (b.verse = u[1], !e)\n for (let p = d + 1; p < b.verseNum; p++) {\n const J = new i(\n this._bookNum,\n this._chapterNum,\n p,\n this.versification\n );\n this.isExcluded || a.push(J);\n }\n a.push(b);\n }\n }\n return a;\n }\n /**\n * Validates a verse number using the supplied separators rather than the defaults.\n */\n validateVerse(e, s) {\n if (!this.verse)\n return this.internalValid;\n let r = 0;\n for (const a of this.allVerses(!0, e, s)) {\n const o = a.internalValid;\n if (o !== 0)\n return o;\n const u = a.BBBCCCVVV;\n if (r > u)\n return 3;\n if (r === u)\n return 4;\n r = u;\n }\n return 0;\n }\n /**\n * Gets whether a single verse reference is valid.\n */\n get internalValid() {\n return this.versification == null ? 1 : this._bookNum <= 0 || this._bookNum > m.lastBook ? 2 : (m.isCanonical(this._bookNum), 0);\n }\n setEmpty(e = i.defaultVersification) {\n this._bookNum = 0, this._chapterNum = -1, this._verse = void 0, this.versification = e;\n }\n updateInternal(e, s, r) {\n this.bookNum = m.bookIdToNumber(e), this.chapter = s, this.verse = r;\n }\n};\nn(i, \"defaultVersification\", c.English), n(i, \"verseRangeSeparator\", \"-\"), n(i, \"verseSequenceIndicator\", \",\"), n(i, \"verseRangeSeparators\", [i.verseRangeSeparator]), n(i, \"verseSequenceIndicators\", [i.verseSequenceIndicator]), n(i, \"chapterDigitShifter\", 1e3), n(i, \"bookDigitShifter\", i.chapterDigitShifter * i.chapterDigitShifter), n(i, \"bcvMaxValue\", i.chapterDigitShifter - 1), /**\n * The valid status of the VerseRef.\n */\nn(i, \"ValidStatusType\", D);\nlet M = i;\nclass v extends Error {\n}\nexport {\n _ as BookSet,\n m as Canon,\n c as ScrVers,\n l as ScrVersType,\n M as VerseRef,\n v as VerseRefException\n};\n//# sourceMappingURL=index.es.js.map\n","import React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\n\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nexport type DropdownMenuSubTriggerProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.SubTrigger\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuSubContentProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.SubContent\n> & {\n className?: string;\n};\n\nexport type DropdownMenuContentProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Content\n> & {\n className?: string;\n sideOffset?: number;\n};\n\nexport type DropdownMenuItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Item\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.CheckboxItem\n> & {\n className?: string;\n checked?: boolean;\n};\n\nexport type DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.RadioItem\n> & {\n className?: string;\n};\n\nexport type DropdownMenuLabelProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Label\n> & {\n className?: string;\n inset?: boolean;\n};\n\nexport type DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Separator\n> & {\n className?: string;\n};\n\nexport type DropdownMenuShortcutProps = React.HTMLAttributes & {\n className?: string;\n};\n\nexport const DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef,\n DropdownMenuSubTriggerProps\n>(({ className, inset, children, ...props }, ref) => (\n \n {children}\n \n \n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nexport const DropdownMenuSubContent = React.forwardRef<\n React.ElementRef,\n DropdownMenuSubContentProps\n>(({ className, ...props }, ref) => (\n \n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nexport const DropdownMenuContent = React.forwardRef<\n React.ElementRef,\n DropdownMenuContentProps\n>(({ className, sideOffset = 4, ...props }, ref) => (\n \n \n \n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/**\n * TODO: fix: direction is not automatically handled by this component, so that shortcuts are\n * display always to the right\n */\nexport const DropdownMenuItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuItemProps\n>(({ className, inset, ...props }, ref) => (\n \n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nexport const DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nexport const DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef,\n DropdownMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n {children}\n \n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nexport const DropdownMenuLabel = React.forwardRef<\n React.ElementRef,\n DropdownMenuLabelProps\n>(({ className, inset, ...props }, ref) => (\n \n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ElementRef,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n \n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nexport function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps) {\n return (\n \n );\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n","import { Canon } from '@sillsdev/scripture';\nimport { PropsWithChildren, KeyboardEvent, forwardRef } from 'react';\nimport { DropdownMenuItem as ShadDropdownMenuItem } from '@/components/shadcn-ui/dropdown-menu';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport type BookType = 'OT' | 'NT' | 'DC';\n\ntype BookMenuItemProps = PropsWithChildren<{\n /** String id of book */\n bookId: string;\n /** Callback to run when a book menu item is selected */\n handleSelectBook: () => void;\n /** Indicates if this menu item is currently selected */\n isSelected: boolean;\n /** Function that is called upon highlighting a book in the dropdown menu */\n handleHighlightBook: () => void;\n /**\n * Function that is called on pressing a key\n *\n * @param event Event that contains information about the key stroke\n */\n handleKeyDown: (event: KeyboardEvent) => void;\n /**\n * Type of book associated with this menu item, coordinates color labels ? Mock up has the labels\n * coordinated to genre\n */\n bookType: BookType;\n}>;\n\nconst BookMenuItem = forwardRef(\n (\n {\n bookId,\n handleSelectBook,\n isSelected,\n handleHighlightBook,\n handleKeyDown,\n bookType,\n children,\n }: BookMenuItemProps,\n ref,\n ) => {\n return (\n {\n // preventDefault() here prevents the entire dropdown menu from closing when selecting this item\n event.preventDefault();\n handleSelectBook();\n }}\n onKeyDown={(event: KeyboardEvent) => {\n handleKeyDown(event);\n }}\n onFocus={handleHighlightBook}\n onMouseMove={handleHighlightBook}\n >\n \n {Canon.bookIdToEnglishName(bookId)}\n \n {isSelected &&
{children}
}\n \n );\n },\n);\n\nexport default BookMenuItem;\n","import { cn } from '@/utils/shadcn-ui.util';\nimport { useCallback } from 'react';\n\nexport type ChapterSelectProps = {\n /**\n * Callback to run when a chapter div is selected\n *\n * @param chapterNumber Number of the chapter that has been selected\n */\n handleSelectChapter: (chapterNumber: number) => void;\n /** The highest chapter number in the book (of course equal to number of chapters in the book) */\n endChapter: number;\n /** The chapter number that is currently selected */\n activeChapter: number;\n /** The chapter number that is currently highlighted using keyboard or mouse navigation */\n highlightedChapter: number;\n /**\n * Callback to run when a chapter is highlighted by the user\n *\n * @param chapterNumber The chapter that is highlighted\n */\n handleHighlightedChapter: (chapterNumber: number) => void;\n};\n\nfunction ChapterSelect({\n handleSelectChapter,\n endChapter,\n activeChapter,\n highlightedChapter,\n handleHighlightedChapter,\n}: ChapterSelectProps) {\n const chapters = Array.from({ length: endChapter }, (_, i) => i + 1);\n\n const handleMouse = useCallback(\n (chapterNumber: number) => {\n handleHighlightedChapter(chapterNumber);\n },\n [handleHighlightedChapter],\n );\n\n return (\n
\n {chapters.map((chapter) => (\n {\n event.preventDefault();\n event.stopPropagation();\n handleSelectChapter(chapter);\n }}\n role=\"button\"\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n handleSelectChapter(chapter);\n }\n }}\n tabIndex={0}\n onMouseMove={() => handleMouse(chapter)}\n >\n {chapter}\n
\n ))}\n
\n );\n}\n\nexport default ChapterSelect;\n","import { DropdownMenuLabel as ShadDropdownMenuLabel } from '@/components/shadcn-ui/dropdown-menu';\nimport { Bookmark, Clock, ArrowDownWideNarrow } from 'lucide-react';\n\nexport type GoToMenuItemProps = {\n handleSort: () => void;\n handleLocationHistory: () => void;\n handleBookmarks: () => void;\n};\n\nfunction GoToMenuItem({ handleSort, handleLocationHistory, handleBookmarks }: GoToMenuItemProps) {\n return (\n \n

Go To

\n
\n \n \n \n
\n
\n );\n}\n\nexport default GoToMenuItem;\n","import BookChapterInput from '@/components/advanced/book-chapter-control/book-chapter-input.component';\nimport BookMenuItem, {\n BookType,\n} from '@/components/advanced/book-chapter-control/book-menu-item.component';\nimport ChapterSelect from '@/components/advanced/book-chapter-control/chapter-select.component';\nimport GoToMenuItem from '@/components/advanced/book-chapter-control/go-to-menu-item.component';\nimport {\n DropdownMenu as ShadDropdownMenu,\n DropdownMenuContent as ShadDropdownMenuContent,\n DropdownMenuLabel as ShadDropdownMenuLabel,\n DropdownMenuSeparator as ShadDropdownMenuSeparator,\n DropdownMenuTrigger as ShadDropdownMenuTrigger,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport { Canon } from '@sillsdev/scripture';\nimport { ScriptureReference, getChaptersForBook } from 'platform-bible-utils';\nimport {\n KeyboardEvent as ReactKeyboardEvent,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\ntype BookTypeLabels = {\n [bookType in BookType]: string;\n};\ntype BookChapterControlProps = {\n scrRef: ScriptureReference;\n handleSubmit: (scrRef: ScriptureReference) => void;\n};\n\nconst ALL_BOOK_IDS = Canon.allBookIds;\nconst BOOK_TYPE_LABELS: BookTypeLabels = {\n OT: 'Old Testament',\n NT: 'New Testament',\n DC: 'Deuterocanon',\n};\nconst BOOK_TYPE_ARRAY: BookType[] = ['OT', 'NT', 'DC'];\n// This is the height of three menu items to offset scrolling to the selected menu item\n// If you use menuItemRef.clientHeight- includes height of chapter div which is too big\nconst SCROLL_OFFSET = 32 + 32 + 32;\nconst SEARCH_QUERY_FORMATS = [\n /^(\\w+)$/i, // Matches a single word (book name or id)\n /^(\\w+)(?:\\s(\\d+))$/i, // Matches a word followed by a chapter number\n /^(\\w+)(?:\\s(\\d+):(\\d+))$/i, // Matches a word followed by a chapter and verse number\n];\nconst fetchGroupedBooks = (bookType: BookType) => {\n const groupedBooks = {\n OT: ALL_BOOK_IDS.filter((bookId) => Canon.isBookOT(bookId)),\n NT: ALL_BOOK_IDS.filter((bookId) => Canon.isBookNT(bookId)),\n DC: ALL_BOOK_IDS.filter((bookId) => Canon.isBookDC(bookId)),\n };\n return groupedBooks[bookType];\n};\nconst fetchEndChapter = (bookId: string) => {\n // getChaptersForBook returns -1 if not found in scrBookData\n // scrBookData only includes OT and NT, so all DC will return -1\n return getChaptersForBook(Canon.bookIdToNumber(bookId));\n};\n\n/**\n * Gets all of the English names from book ids\n *\n * @returns String[]\n */\nfunction getAllEnglishNames(): string[] {\n const allEnglishNames = ALL_BOOK_IDS.map((bookId) => {\n return Canon.bookIdToEnglishName(bookId);\n });\n return allEnglishNames;\n}\n\n/**\n * Determines if bookName is in allEnglishNames\n *\n * @param bookName Book English name\n * @returns True if bookName is included, false otherwise\n */\nfunction isValidBookEnglishName(bookName: string): boolean {\n return getAllEnglishNames().includes(bookName);\n}\n\n/**\n * Gets a bookId from given English name\n *\n * @param bookName Book English name\n * @returns BookId of provided bookName, undefined otherwise\n */\nfunction getBookIdFromEnglishName(bookName: string): string | undefined {\n // Convert bookName to lowercase and then capitalize the first letter\n const formattedBookName = bookName.toLowerCase().replace(/^\\w/, (c) => c.toUpperCase());\n\n if (isValidBookEnglishName(formattedBookName)) {\n const matchingBookId = ALL_BOOK_IDS.find((bookId) => {\n return Canon.bookIdToEnglishName(bookId) === formattedBookName;\n });\n return matchingBookId;\n }\n\n return undefined;\n}\n\nfunction BookChapterControl({ scrRef, handleSubmit }: BookChapterControlProps) {\n const [searchQuery, setSearchQuery] = useState('');\n const [selectedBookId, setSelectedBookId] = useState(\n Canon.bookNumberToId(scrRef.bookNum),\n );\n const [highlightedChapter, setHighlightedChapter] = useState(scrRef.chapterNum ?? 0);\n const [highlightedBookId, setHighlightedBookId] = useState(\n Canon.bookNumberToId(scrRef.bookNum),\n );\n const [isContentOpen, setIsContentOpen] = useState(false);\n const [isContentOpenDelayed, setIsContentOpenDelayed] = useState(isContentOpen);\n\n // This ref will always be defined\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const inputRef = useRef(undefined!);\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const contentRef = useRef(undefined!);\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const menuItemRef = useRef(undefined!);\n\n const fetchFilteredBooks = useCallback(\n (bookType: BookType) => {\n return fetchGroupedBooks(bookType).filter((bookId: string) => {\n const englishNameLowerCase = Canon.bookIdToEnglishName(bookId).toLowerCase();\n const normalizedQuery = searchQuery.replace(/[^a-zA-Z]/g, '').toLowerCase();\n return (\n englishNameLowerCase.includes(normalizedQuery) || // Match book name\n bookId.toLowerCase().includes(normalizedQuery) // Match book ID\n );\n });\n },\n [searchQuery],\n );\n\n const handleSearchInput = (searchString: string) => {\n setSearchQuery(searchString);\n };\n\n /**\n * Whether to prevent radix's logic from closing the dropdown. This is important because radix\n * tries to close the dropdown when the input first focuses, and we don't want it to do that. But\n * we don't want to prevent the dropdown from closing when we click away from the input, so we\n * don't want to just keep it open if the input is focused\n */\n const shouldPreventAutoClosing = useRef(false);\n\n const controlMenuState = useCallback((open: boolean) => {\n if (shouldPreventAutoClosing.current) {\n shouldPreventAutoClosing.current = false;\n return;\n }\n setIsContentOpen(open);\n }, []);\n\n const updateReference = useCallback(\n (bookId: string, shouldClose: boolean, chapter?: number, verse?: number) => {\n setHighlightedChapter(\n Canon.bookNumberToId(scrRef.bookNum) !== bookId ? 1 : scrRef.chapterNum,\n );\n\n if (shouldClose || fetchEndChapter(bookId) === -1) {\n handleSubmit({\n bookNum: Canon.bookIdToNumber(bookId),\n chapterNum: chapter || 1,\n verseNum: verse || 1,\n });\n\n setIsContentOpen(false);\n setSearchQuery('');\n return;\n }\n\n setSelectedBookId(selectedBookId !== bookId ? bookId : '');\n setIsContentOpen(!shouldClose);\n },\n [handleSubmit, scrRef.bookNum, scrRef.chapterNum, selectedBookId],\n );\n\n const handleSelectChapter = (chapterNumber: number) => {\n if (chapterNumber <= 0 || chapterNumber > fetchEndChapter(selectedBookId)) {\n return;\n }\n updateReference(selectedBookId, true, chapterNumber);\n };\n\n const handleInputSubmit = useCallback(() => {\n SEARCH_QUERY_FORMATS.forEach((format) => {\n const matches = searchQuery.match(format);\n if (matches) {\n // Book should be a bookId or an english name\n const [book, chapter = undefined, verse = undefined] = matches.slice(1);\n const englishName = getBookIdFromEnglishName(book);\n\n if (Canon.isBookIdValid(book) || englishName) {\n updateReference(\n englishName ?? book,\n true,\n chapter ? parseInt(chapter, 10) : 1,\n verse ? parseInt(verse, 10) : 1,\n );\n }\n }\n });\n }, [updateReference, searchQuery]);\n\n const handleKeyDownInput = useCallback(\n (event: ReactKeyboardEvent) => {\n if (!isContentOpen) {\n setIsContentOpen(true);\n } else if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n if (\n typeof menuItemRef !== 'undefined' &&\n // Ref uses null\n // eslint-disable-next-line no-null/no-null\n menuItemRef.current !== null\n ) {\n menuItemRef.current.focus();\n } else if (\n typeof contentRef !== 'undefined' &&\n // Ref uses null\n // eslint-disable-next-line no-null/no-null\n contentRef.current !== null\n ) {\n contentRef.current.focus();\n }\n event.preventDefault();\n }\n },\n [isContentOpen],\n );\n\n const handleKeyDownContent = (event: ReactKeyboardEvent) => {\n // When the dropdown menu has focus, key strokes should give focus to the input component,\n // unless they're navigation keys (arrows and enter)\n const { key } = event;\n if (\n key === 'ArrowRight' ||\n key === 'ArrowLeft' ||\n key === 'ArrowDown' ||\n key === 'ArrowUp' ||\n key === 'Enter'\n ) {\n return;\n }\n\n inputRef.current.dispatchEvent(new KeyboardEvent('keydown', { key }));\n inputRef.current.focus();\n };\n\n const handleKeyDownMenuItem = (event: ReactKeyboardEvent) => {\n const { key } = event;\n if (highlightedBookId === selectedBookId) {\n if (key === 'Enter') {\n event.preventDefault();\n updateReference(selectedBookId, true, highlightedChapter);\n return;\n }\n\n let chapterOffSet = 0;\n if (key === 'ArrowRight') {\n if (highlightedChapter < fetchEndChapter(highlightedBookId)) {\n chapterOffSet = 1;\n } else {\n event.preventDefault();\n return;\n }\n } else if (key === 'ArrowLeft') {\n if (highlightedChapter > 1) {\n chapterOffSet = -1;\n } else {\n event.preventDefault();\n return;\n }\n } else if (key === 'ArrowDown') {\n chapterOffSet = 6;\n } else if (key === 'ArrowUp') {\n chapterOffSet = -6;\n }\n if (\n highlightedChapter + chapterOffSet <= 0 ||\n highlightedChapter + chapterOffSet > fetchEndChapter(highlightedBookId)\n ) {\n setHighlightedChapter(0);\n } else if (chapterOffSet !== 0) {\n setHighlightedChapter(highlightedChapter + chapterOffSet);\n event.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n if (selectedBookId === highlightedBookId) {\n if (selectedBookId === Canon.bookNumberToId(scrRef.bookNum)) {\n setHighlightedChapter(scrRef.chapterNum);\n } else {\n setHighlightedChapter(1);\n }\n } else {\n setHighlightedChapter(0);\n }\n }, [highlightedBookId, scrRef.bookNum, scrRef.chapterNum, selectedBookId]);\n\n // The purpose of these useLayoutEffects and timeout is to delay the scroll just\n // enough so that the refs are defined and available when they are used after the timeout\n useLayoutEffect(() => {\n setIsContentOpenDelayed(isContentOpen);\n }, [isContentOpen]);\n\n useLayoutEffect(() => {\n const scrollTimeout = setTimeout(() => {\n if (isContentOpenDelayed && contentRef.current && menuItemRef.current) {\n const menuItemOffsetTop = menuItemRef.current.offsetTop;\n const scrollPosition = menuItemOffsetTop - SCROLL_OFFSET;\n contentRef.current.scrollTo({ top: scrollPosition, behavior: 'instant' });\n }\n }, 10);\n return () => {\n clearTimeout(scrollTimeout);\n };\n }, [isContentOpenDelayed]);\n\n return (\n
\n \n \n {\n setSelectedBookId(Canon.bookNumberToId(scrRef.bookNum));\n setHighlightedBookId(Canon.bookNumberToId(scrRef.bookNum));\n setHighlightedChapter(scrRef.chapterNum > 0 ? scrRef.chapterNum : 0);\n setIsContentOpen(true);\n inputRef.current.focus();\n }}\n onFocus={() => {\n // Radix thinks we want to close because the input is being focused. Prevent that\n shouldPreventAutoClosing.current = true;\n }}\n handleSubmit={handleInputSubmit}\n placeholder={`${Canon.bookNumberToEnglishName(scrRef.bookNum)} ${scrRef.chapterNum}:${scrRef.verseNum}`}\n />\n \n \n console.log('sorting')}\n handleLocationHistory={() => console.log('location history')}\n handleBookmarks={() => console.log('bookmarks')}\n />\n {BOOK_TYPE_ARRAY.map(\n (bookType, bookTypeIndex) =>\n fetchFilteredBooks(bookType).length > 0 && (\n
\n \n {BOOK_TYPE_LABELS[bookType]}\n \n\n {fetchFilteredBooks(bookType).map((bookId) => (\n
\n updateReference(bookId, false)}\n isSelected={selectedBookId === bookId}\n handleHighlightBook={() => setHighlightedBookId(bookId)}\n handleKeyDown={handleKeyDownMenuItem}\n bookType={bookType}\n ref={(element: HTMLDivElement) => {\n if (selectedBookId === bookId) menuItemRef.current = element;\n }}\n >\n {\n setHighlightedChapter(chapterNumber);\n }}\n />\n \n
\n ))}\n {BOOK_TYPE_ARRAY.length - 1 !== bookTypeIndex ? (\n \n ) : undefined}\n
\n ),\n )}\n \n
\n
\n );\n}\n\nexport default BookChapterControl;\n","import React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const buttonVariants = cva(\n 'pr-twp tw-inline-flex tw-items-center tw-justify-center tw-whitespace-nowrap tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50',\n {\n variants: {\n variant: {\n default: 'tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/90',\n destructive: 'tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/90',\n outline:\n 'tw-border tw-border-input tw-bg-background hover:tw-bg-accent hover:tw-text-accent-foreground',\n secondary: 'tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80',\n ghost: 'hover:tw-bg-accent hover:tw-text-accent-foreground',\n link: 'tw-text-primary tw-underline-offset-4 hover:tw-underline',\n },\n size: {\n default: 'tw-h-10 tw-px-4 tw-py-2',\n sm: 'tw-h-9 tw-rounded-md tw-px-3',\n lg: 'tw-h-11 tw-rounded-md tw-px-8',\n icon: 'tw-h-10 tw-w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes,\n VariantProps {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n \n );\n },\n);\nButton.displayName = 'Button';\n","import React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst labelVariants = cva(\n 'tw-text-sm tw-font-medium tw-leading-none peer-disabled:tw-cursor-not-allowed peer-disabled:tw-opacity-70',\n);\n\nexport const Label = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & VariantProps\n>(({ className, ...props }, ref) => (\n \n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n","import React from 'react';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => {\n return (\n \n \n \n \n \n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n","import React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n \n \n \n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent };\n","import React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n {children}\n \n \n Close\n \n \n \n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nfunction DialogHeader({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nDialogHeader.displayName = 'DialogHeader';\n\nfunction DialogFooter({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n","import React from 'react';\nimport { type DialogProps } from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Dialog, DialogContent } from '@/components/shadcn-ui/dialog';\n\nconst Command = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nfunction CommandDialog({ children, ...props }: CommandDialogProps) {\n return (\n \n \n \n {children}\n \n \n \n );\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n
\n \n \n
\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>((props, ref) => (\n \n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nfunction CommandShortcut({ className, ...props }: React.HTMLAttributes) {\n return (\n \n );\n}\nCommandShortcut.displayName = 'CommandShortcut';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","import { ReactNode, useState } from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/shadcn-ui/popover';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/shadcn-ui/command';\nimport { PopoverProps } from '@radix-ui/react-popover';\n\nexport type ComboBoxLabelOption = { label: string };\nexport type ComboBoxOption = string | number | ComboBoxLabelOption;\n\nexport type ComboBoxProps = {\n /** Optional unique identifier */\n id?: string;\n /** Text label title for combobox */\n /** List of available options for the dropdown menu */\n options?: readonly T[];\n /** Additional css classes to help with unique styling of the combo box */\n className?: string;\n /**\n * The selected value that the combo box currently holds. Must be shallow equal to one of the\n * options entries.\n */\n value?: T;\n /** Triggers when content of textfield is changed */\n onChange?: (newValue: T) => void;\n /** Used to determine the string value for a given option. */\n getOptionLabel?: (option: ComboBoxOption) => string;\n /** Icon to be displayed on the trigger */\n icon?: ReactNode;\n /** Text displayed on button if `value` is undefined */\n buttonPlaceholder?: string;\n /** Placeholder text for text field */\n textPlaceholder?: string;\n /** Text to display when no options match input */\n commandEmptyMessage?: string;\n /** Variant of button */\n buttonVariant?: ButtonProps['variant'];\n /** Control how the popover menu should be aligned. Defaults to start */\n alignDropDown?: 'start' | 'center' | 'end';\n /** Text direction ltr or rtl */\n dir?: Direction;\n /** Optional boolean to set if trigger should be disabled */\n isDisabled?: boolean;\n} & PopoverProps;\n\ntype Direction = 'ltr' | 'rtl';\n\nfunction getOptionLabelDefault(option: ComboBoxOption): string {\n if (typeof option === 'string') {\n return option;\n }\n if (typeof option === 'number') {\n return option.toString();\n }\n return option.label;\n}\n\n/**\n * Autocomplete input and command palette with a list of suggestions.\n *\n * Thanks to Shadcn for heavy inspiration and documentation\n * https://ui.shadcn.com/docs/components/combobox\n */\nfunction ComboBox({\n id,\n options = [],\n className,\n value,\n onChange = () => {},\n getOptionLabel = getOptionLabelDefault,\n icon = undefined,\n buttonPlaceholder = '',\n textPlaceholder = '',\n commandEmptyMessage = 'No option found',\n buttonVariant = 'outline',\n alignDropDown = 'start',\n dir = 'ltr',\n isDisabled = false,\n ...props\n}: ComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n return (\n \n \n \n
\n {icon &&
{icon}
}\n \n {value ? getOptionLabel(value) : buttonPlaceholder}\n \n
\n\n \n \n
\n \n \n \n {commandEmptyMessage}\n \n {options.map((option) => (\n {\n onChange(option);\n setOpen(false);\n }}\n >\n \n {getOptionLabel(option)}\n \n ))}\n \n \n \n
\n );\n}\n\nexport default ComboBox;\n","import { useMemo } from 'react';\nimport ComboBox from '@/components/basics/combo-box.component';\nimport { Label } from '@/components/shadcn-ui/label';\n\nexport type ChapterRangeSelectorProps = {\n startChapter: number;\n endChapter: number;\n handleSelectStartChapter: (chapter: number) => void;\n handleSelectEndChapter: (chapter: number) => void;\n isDisabled?: boolean;\n chapterCount: number;\n};\n\nexport default function ChapterRangeSelector({\n startChapter,\n endChapter,\n handleSelectStartChapter,\n handleSelectEndChapter,\n isDisabled = false,\n chapterCount,\n}: ChapterRangeSelectorProps) {\n const chapterOptions = useMemo(\n () => Array.from({ length: chapterCount }, (_, index) => index + 1),\n [chapterCount],\n );\n\n const onChangeStartChapter = (value: number) => {\n handleSelectStartChapter(value);\n if (value > endChapter) {\n handleSelectEndChapter(value);\n }\n };\n\n const onChangeEndChapter = (value: number) => {\n handleSelectEndChapter(value);\n if (value < startChapter) {\n handleSelectStartChapter(value);\n }\n };\n\n return (\n <>\n \n option.toString()}\n value={startChapter}\n />\n\n \n option.toString()}\n value={endChapter}\n />\n \n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport { Label } from '@/components/shadcn-ui/label';\nimport { RadioGroup, RadioGroupItem } from '@/components/shadcn-ui/radio-group';\nimport { Canon } from '@sillsdev/scripture';\nimport { LocalizedStringValue } from 'platform-bible-utils';\nimport { useState } from 'react';\nimport ChapterRangeSelector, {\n ChapterRangeSelectorProps,\n} from '../basics/chapter-range-selector.component';\n\nexport enum BookSelectionMode {\n CURRENT_BOOK = 'current book',\n CHOOSE_BOOKS = 'choose books',\n}\n\n/**\n * Object containing all keys used for localization in this component. If you're using this\n * component in an extension, you can pass it into the useLocalizedStrings hook to easily obtain the\n * localized strings and pass them into the localizedStrings prop of this component\n */\nexport const BOOK_SELECTOR_STRING_KEYS = Object.freeze([\n '%webView_bookSelector_currentBook%',\n '%webView_bookSelector_choose%',\n '%webView_bookSelector_chooseBooks%',\n] as const);\n\nexport type BookSelectorLocalizedStrings = {\n [localizedInventoryKey in (typeof BOOK_SELECTOR_STRING_KEYS)[number]]?: LocalizedStringValue;\n};\n\n/**\n * Gets the localized value for the provided key\n *\n * @param strings Object containing localized string\n * @param key Key for a localized string\n * @returns The localized value for the provided key, if available. Returns the key if no localized\n * value is available\n */\nconst localizeString = (\n strings: BookSelectorLocalizedStrings,\n key: keyof BookSelectorLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\ntype BookSelectorProps = ChapterRangeSelectorProps & {\n handleBookSelectionModeChange: (newMode: BookSelectionMode) => void;\n currentBookName: string;\n onSelectBooks: () => void;\n selectedBookIds: string[];\n localizedStrings: BookSelectorLocalizedStrings;\n};\n\nexport default function BookSelector({\n handleBookSelectionModeChange,\n currentBookName,\n onSelectBooks,\n selectedBookIds,\n chapterCount,\n endChapter,\n handleSelectEndChapter,\n startChapter,\n handleSelectStartChapter,\n localizedStrings,\n}: BookSelectorProps) {\n const currentBookText = localizeString(localizedStrings, '%webView_bookSelector_currentBook%');\n const chooseText = localizeString(localizedStrings, '%webView_bookSelector_choose%');\n const chooseBooksText = localizeString(localizedStrings, '%webView_bookSelector_chooseBooks%');\n\n const [bookSelectionMode, setBookSelectionMode] = useState(\n BookSelectionMode.CURRENT_BOOK,\n );\n\n const onSelectionModeChange = (newMode: BookSelectionMode) => {\n setBookSelectionMode(newMode);\n handleBookSelectionModeChange(newMode);\n };\n\n return (\n onSelectionModeChange(value as BookSelectionMode)}\n >\n
\n
\n
\n \n \n
\n \n
\n \n
\n
\n
\n
\n \n \n
\n \n onSelectBooks()}\n >\n {chooseText}\n \n
\n
\n \n );\n}\n","import { DropdownMenuTrigger } from '@radix-ui/react-dropdown-menu';\nimport { FilterIcon } from 'lucide-react';\nimport { Table } from '@tanstack/react-table';\n\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n} from '@/components/shadcn-ui/dropdown-menu';\n\ninterface DataTableViewOptionsProps {\n table: Table;\n}\n\nfunction DataTableViewOptions({ table }: DataTableViewOptionsProps) {\n return (\n \n \n \n \n \n Toggle columns\n \n {table\n .getAllColumns()\n .filter((column) => column.getCanHide())\n .map((column) => {\n return (\n column.toggleVisibility(!!value)}\n >\n {column.id}\n \n );\n })}\n \n \n );\n}\n\nexport default DataTableViewOptions;\n","import React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Check, ChevronDown, ChevronUp } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n span]:tw-line-clamp-1',\n className,\n )}\n {...props}\n >\n {children}\n \n \n \n \n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, position = 'popper', ...props }, ref) => (\n \n \n \n \n {children}\n \n \n \n \n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, children, ...props }, ref) => (\n \n \n \n \n \n \n\n {children}\n \n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n","import { ChevronLeftIcon, ChevronRightIcon, ArrowLeftIcon, ArrowRightIcon } from 'lucide-react';\nimport { Table } from '@tanstack/react-table';\n\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\n\ninterface DataTablePaginationProps {\n table: Table;\n}\n\nfunction DataTablePagination({ table }: DataTablePaginationProps) {\n return (\n
\n
\n
\n {table.getFilteredSelectedRowModel().rows.length} of{' '}\n {table.getFilteredRowModel().rows.length} row(s) selected\n
\n
\n

Rows per page

\n {\n table.setPageSize(Number(value));\n }}\n >\n \n \n \n \n {[10, 20, 30, 40, 50].map((pageSize) => (\n \n {pageSize}\n \n ))}\n \n \n
\n
\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n
\n
\n table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n Go to first page\n \n \n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n Go to previous page\n \n \n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n Go to next page\n \n \n table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n Go to last page\n \n \n
\n
\n
\n );\n}\n\nexport default DataTablePagination;\n","import React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes & { stickyHeader?: boolean }\n>(({ className, stickyHeader, ...props }, ref) => (\n
\n \n
\n));\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes & { stickyHeader?: boolean }\n>(({ className, stickyHeader, ...props }, ref) => (\n \n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n tr]:last:tw-border-b-0', className)}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n \n));\nTableCaption.displayName = 'TableCaption';\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n","import { useState } from 'react';\n\nimport {\n ColumnFiltersState,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n SortingState,\n ColumnDef as TSColumnDef,\n Row as TSRow,\n RowSelectionState as TSRowSelectionState,\n SortDirection as TSSortDirection,\n Table as TSTable,\n useReactTable,\n VisibilityState,\n} from '@tanstack/react-table';\n\nimport DataTableViewOptions from '@/components/advanced/data-table/data-table-column-toggle.component';\nimport DataTablePagination from '@/components/advanced/data-table/data-table-pagination.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\n\nexport type ColumnDef = TSColumnDef;\nexport type RowContents = TSRow;\nexport type TableContents = TSTable;\nexport type SortDirection = TSSortDirection;\nexport type RowSelectionState = TSRowSelectionState;\n\ninterface DataTableProps {\n columns: ColumnDef[];\n data: TData[];\n enablePagination?: boolean;\n showPaginationControls?: boolean;\n showColumnVisibilityControls?: boolean;\n stickyHeader?: boolean;\n onRowClickHandler?: (row: RowContents, table: TableContents) => void;\n}\n\n/**\n * Feature-rich table component that infuses our basic shadcn-based Table component with features\n * from TanStack's React Table library\n */\nfunction DataTable({\n columns,\n data,\n enablePagination = false,\n showPaginationControls = false,\n showColumnVisibilityControls = false,\n stickyHeader = false,\n onRowClickHandler = () => {},\n}: DataTableProps) {\n const [sorting, setSorting] = useState([]);\n const [columnFilters, setColumnFilters] = useState([]);\n const [columnVisibility, setColumnVisibility] = useState({});\n const [rowSelection, setRowSelection] = useState({});\n\n const table = useReactTable({\n data,\n columns,\n getCoreRowModel: getCoreRowModel(),\n ...(enablePagination && { getPaginationRowModel: getPaginationRowModel() }),\n onSortingChange: setSorting,\n getSortedRowModel: getSortedRowModel(),\n onColumnFiltersChange: setColumnFilters,\n getFilteredRowModel: getFilteredRowModel(),\n onColumnVisibilityChange: setColumnVisibility,\n onRowSelectionChange: setRowSelection,\n state: {\n sorting,\n columnFilters,\n columnVisibility,\n rowSelection,\n },\n });\n\n return (\n
\n {showColumnVisibilityControls && }\n \n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers.map((header) => {\n return (\n \n {header.isPlaceholder\n ? undefined\n : flexRender(header.column.columnDef.header, header.getContext())}\n \n );\n })}\n \n ))}\n \n \n {table.getRowModel().rows?.length ? (\n table.getRowModel().rows.map((row) => (\n onRowClickHandler(row, table)}\n key={row.id}\n data-state={row.getIsSelected() && 'selected'}\n >\n {row.getVisibleCells().map((cell) => (\n \n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n \n ))}\n \n ))\n ) : (\n \n \n No results.\n \n \n )}\n \n
\n {enablePagination && (\n
\n table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n Previous\n \n table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n Next\n \n
\n )}\n {enablePagination && showPaginationControls && }\n
\n );\n}\n\nexport default DataTable;\n","import {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport { Canon } from '@sillsdev/scripture';\nimport { deepEqual, LanguageStrings, ScriptureReference } from 'platform-bible-utils';\nimport { useMemo } from 'react';\nimport { InventoryItemOccurrence } from './inventory-utils';\n\n/** Props for the OccurrencesTable component */\ntype OccurrencesTableProps = {\n /** Data that contains scriptures references and snippets of scripture */\n occurrenceData: InventoryItemOccurrence[];\n /** Callback function that is executed when the scripture reference is changed */\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n /**\n * Object with all localized strings that the OccurrencesTable needs to work well across multiple\n * languages\n */\n localizedStrings: LanguageStrings;\n};\n\n/**\n * Table that shows occurrences of specified inventory item(s). The first column shows the related\n * scripture reference. The second column shows the snippet of scripture that contains the specified\n * inventory item\n */\nfunction OccurrencesTable({\n occurrenceData,\n setScriptureReference,\n localizedStrings,\n}: OccurrencesTableProps) {\n const referenceHeaderText =\n localizedStrings['%webView_inventory_occurrences_table_header_reference%'];\n const occurrenceHeaderText =\n localizedStrings['%webView_inventory_occurrences_table_header_occurrence%'];\n\n const occurrences: InventoryItemOccurrence[] = useMemo(() => {\n const uniqueOccurrences: InventoryItemOccurrence[] = [];\n\n occurrenceData.forEach((occurrence) => {\n if (!uniqueOccurrences.some((uniqueOccurrence) => deepEqual(uniqueOccurrence, occurrence))) {\n uniqueOccurrences.push(occurrence);\n }\n });\n\n return uniqueOccurrences;\n }, [occurrenceData]);\n\n return (\n \n \n \n {referenceHeaderText}\n {occurrenceHeaderText}\n \n \n \n {occurrences.length > 0 &&\n occurrences.map((occurrence) => (\n {\n setScriptureReference(occurrence.reference);\n }}\n >\n {`${Canon.bookNumberToEnglishName(occurrence.reference.bookNum)} ${occurrence.reference.chapterNum}:${occurrence.reference.verseNum}`}\n {occurrence.text}\n \n ))}\n \n
\n );\n}\n\nexport default OccurrencesTable;\n","import React from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Checkbox = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport default Checkbox;\n","import { Canon } from '@sillsdev/scripture';\nimport { ScriptureReference } from 'platform-bible-utils';\n\n/* #region Types */\n\n/**\n * Status of items that appear in inventories. 'approved' and 'unapproved' items are defined in the\n * project's `Settings.xml`. All other items are defined as 'unknown'\n */\nexport type Status = 'approved' | 'unapproved' | 'unknown';\n\n/** Occurrence of item in inventory. Primarily used by table that shows occurrences */\nexport type InventoryItemOccurrence = {\n /** Reference to scripture where the item appears */\n reference: ScriptureReference;\n /** Snippet of scripture that contains the occurrence */\n text: string;\n};\n\n/** Data structure that contains all information on an item that is shown in an inventory */\nexport type InventoryTableData = {\n /**\n * The item (e.g. a character in the characters inventory, a marker in the marker inventory) In\n * most cases the array will only have one element. In case of additional items (e.g. the\n * preceding marker in the markers check), the primary item should be stored in the first index.\n * To show additional items in the inventory, make sure to configure the `additionalItemsLabels`\n * prop for the Inventory component\n */\n items: string[];\n /** The number of times this item occurs in the selected scope */\n count: number;\n /** The status of this item (see documentation for `Status` type for more information) */\n status: Status;\n /** Occurrences of this item in the scripture text for the selected scope */\n occurrences: InventoryItemOccurrence[];\n};\n\n/* #endregion */\n\n/* #region Functions */\n\n/**\n * Splits USFM string into shorter line-like segments\n *\n * @param text A single (likely very large) USFM string\n * @returns An array containing the input text, split into shorter segments\n */\nexport const getLinesFromUSFM = (text: string) => {\n // Splits on (CR)LF, CR, \\v, \\c and \\id\n return text.split(/(?:\\r?\\n|\\r)|(?=(?:\\\\(?:v|c|id)))/g);\n};\n\n/**\n * Extracts chapter or verse number from USFM strings that start with a \\c or \\v marker\n *\n * @param text USFM string that is expected to start with \\c or \\v marker\n * @returns Chapter or verse number if one is found. Else returns 0.\n */\nexport const getNumberFromUSFM = (text: string): number | undefined => {\n // Captures all digits that follow \\v or \\c markers followed by whitespace located at the start of a string\n const regex = /^\\\\[vc]\\s+(\\d+)/;\n const match = text.match(regex);\n\n if (match) {\n return +match[1];\n }\n return undefined;\n};\n\n/**\n * Gets book ID from USFM string that starts with the \\id marker, and returns book number for it\n *\n * @param text USFM string that is expected to start with \\id marker\n * @returns Book number corresponding to the \\id marker in the input text. Returns 0 if no marker is\n * found or the marker is not valid\n */\nexport const getBookNumFromId = (text: string): number => {\n // Captures all digits that follow an \\id marker followed by whitespace located at the start of a string\n const match = text.match(/^\\\\id\\s+([A-Za-z]+)/);\n if (match) {\n return Canon.bookIdToNumber(match[1]);\n }\n return 0;\n};\n\n/**\n * Gets the status for an item, typically used in the Inventory component\n *\n * @param item The item for which the status is being requested\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @returns The status for the specified item\n */\nexport const getStatusForItem = (\n item: string,\n approvedItems: string[],\n unapprovedItems: string[],\n): Status => {\n if (unapprovedItems.includes(item)) return 'unapproved';\n if (approvedItems.includes(item)) return 'approved';\n return 'unknown';\n};\n\n/* #endregion */\n","import React from 'react';\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst toggleVariants = cva(\n 'pr-twp tw-inline-flex tw-items-center tw-justify-center tw-rounded-md tw-text-sm tw-font-medium tw-ring-offset-background tw-transition-colors hover:tw-bg-muted hover:tw-text-muted-foreground focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 disabled:tw-pointer-events-none disabled:tw-opacity-50 data-[state=on]:tw-bg-accent data-[state=on]:tw-text-accent-foreground',\n {\n variants: {\n variant: {\n default: 'tw-bg-transparent',\n outline:\n 'tw-border tw-border-input tw-bg-transparent hover:tw-bg-accent hover:tw-text-accent-foreground',\n },\n size: {\n default: 'tw-h-10 tw-px-3',\n sm: 'tw-h-9 tw-px-2.5',\n lg: 'tw-h-11 tw-px-5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst Toggle = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef & VariantProps\n>(({ className, variant, size, ...props }, ref) => (\n \n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n","import React from 'react';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { toggleVariants } from '@/components/shadcn-ui/toggle';\n\nconst ToggleGroupContext = React.createContext>({\n size: 'default',\n variant: 'default',\n});\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, variant, size, children, ...props }, ref) => (\n \n \n {children}\n \n \n));\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef &\n VariantProps\n>(({ className, children, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n \n {children}\n \n );\n});\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;\n\nexport { ToggleGroup, ToggleGroupItem };\n","import { ColumnDef, SortDirection } from '@/components/advanced/data-table/data-table.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport { ToggleGroup, ToggleGroupItem } from '@/components/shadcn-ui/toggle-group';\nimport {\n ArrowDownIcon,\n ArrowUpDownIcon,\n ArrowUpIcon,\n CircleCheckIcon,\n CircleHelpIcon,\n CircleXIcon,\n} from 'lucide-react';\nimport { ReactNode } from 'react';\nimport { InventoryTableData, Status } from './inventory-utils';\n\n/**\n * Gets an icon that indicates the current sorting direction based on the provided input\n *\n * @param sortDirection Sorting direction. Can be ascending ('asc'), descending ('desc') or false (\n * i.e. not sorted)\n * @returns The appropriate sorting icon for the provided sorting direction\n */\nconst getSortingIcon = (sortDirection: false | SortDirection): ReactNode => {\n if (sortDirection === 'asc') {\n return ;\n }\n if (sortDirection === 'desc') {\n return ;\n }\n return ;\n};\n\n/**\n * Function that creates the item column for inventories\n *\n * @param itemLabel Localized label for the item column (e.g. 'Character', 'Repeated Word', etc.)\n * @returns Column that shows the inventory items. Should be used with the DataTable component\n */\nexport const inventoryItemColumn = (itemLabel: string): ColumnDef => {\n return {\n accessorKey: 'item',\n accessorFn: (row: InventoryTableData) => row.items[0],\n header: ({ column }) => (\n \n ),\n };\n};\n\n/**\n * Function that creates the additional item columns for inventories\n *\n * @param additionalItemLabel Localized label for the additional item column (e.g. 'Preceding\n * Marker')\n * @param additionalItemIndex Index that locates the desired item in the items array of the\n * inventory\n * @returns Column that shows additional inventory items. Should be used with the DataTable\n * component\n */\nexport const inventoryAdditionalItemColumn = (\n additionalItemLabel: string,\n additionalItemIndex: number,\n): ColumnDef => {\n return {\n accessorKey: `item${additionalItemIndex}`,\n accessorFn: (row: InventoryTableData) => row.items[additionalItemIndex],\n header: ({ column }) => (\n \n ),\n };\n};\n\n/**\n * Function that creates the count column for inventories. Should be used with the DataTable\n * component.\n *\n * @param itemLabel Localized label for the count column\n * @returns Column that shows the number of occurrences of the related inventory items\n */\nexport const inventoryCountColumn = (countLabel: string): ColumnDef => {\n return {\n accessorKey: 'count',\n header: ({ column }) => (\n
\n \n
\n ),\n cell: ({ row }) =>
{row.getValue('count')}
,\n };\n};\n\n/**\n * Function that updates project settings when status for item(s) changes\n *\n * @param changedItems Array of items for which the status is being updated\n * @param newStatus The status that the items are being given\n * @param approvedItems Array of currently approved items\n * @param onApprovedItemsChange Callback function that stores the updated list of approved items\n * @param unapprovedItems Array of currently unapproved items\n * @param onUnapprovedItemsChange Callback function that stores the updated list of unapproved items\n */\nconst statusChangeHandler = (\n changedItems: string[],\n newStatus: Status,\n approvedItems: string[],\n onApprovedItemsChange: (items: string[]) => void,\n unapprovedItems: string[],\n onUnapprovedItemsChange: (items: string[]) => void,\n) => {\n let newApprovedItems: string[] = [...approvedItems];\n changedItems.forEach((item) => {\n if (newStatus === 'approved') {\n if (!newApprovedItems.includes(item)) {\n newApprovedItems.push(item);\n }\n } else {\n newApprovedItems = newApprovedItems.filter((validItem) => validItem !== item);\n }\n });\n onApprovedItemsChange(newApprovedItems);\n\n let newUnapprovedItems: string[] = [...unapprovedItems];\n changedItems.forEach((item) => {\n if (newStatus === 'unapproved') {\n if (!newUnapprovedItems.includes(item)) {\n newUnapprovedItems.push(item);\n }\n } else {\n newUnapprovedItems = newUnapprovedItems.filter((unapprovedItem) => unapprovedItem !== item);\n }\n });\n onUnapprovedItemsChange(newUnapprovedItems);\n};\n\n/**\n * Function that creates the status column for inventories. Should be used with the DataTable\n * component.\n *\n * @param statusLabel Localized label for the status column\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param onApprovedItemsChange Callback function that stores the updated list of approved items\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @param onUnapprovedItemsChange Callback function that stores the updated list of unapproved items\n * @returns Column that shows the status buttons for the related inventory item. The button for the\n * current status of the item is selected\n */\nexport const inventoryStatusColumn = (\n statusLabel: string,\n approvedItems: string[],\n onApprovedItemsChange: (items: string[]) => void,\n unapprovedItems: string[],\n onUnapprovedItemsChange: (items: string[]) => void,\n): ColumnDef => {\n return {\n accessorKey: 'status',\n header: ({ column }) => {\n return (\n
\n \n
\n );\n },\n cell: ({ row }) => {\n const status: Status = row.getValue('status');\n const item: string = row.getValue('item');\n return (\n \n \n statusChangeHandler(\n [item],\n 'approved',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"approved\"\n >\n \n \n \n statusChangeHandler(\n [item],\n 'unapproved',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"unapproved\"\n >\n \n \n \n statusChangeHandler(\n [item],\n 'unknown',\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n )\n }\n value=\"unknown\"\n >\n \n \n \n );\n },\n };\n};\n","import DataTable, {\n ColumnDef,\n RowContents,\n RowSelectionState,\n TableContents,\n} from '@/components/advanced/data-table/data-table.component';\nimport OccurrencesTable from '@/components/advanced/inventory/occurrences-table.component';\nimport Checkbox from '@/components/shadcn-ui/checkbox';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { Label } from '@/components/shadcn-ui/label';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport {\n deepEqual,\n LocalizedStringValue,\n ScriptureReference,\n substring,\n} from 'platform-bible-utils';\nimport { useEffect, useMemo, useState } from 'react';\nimport {\n getBookNumFromId,\n getLinesFromUSFM,\n getNumberFromUSFM,\n getStatusForItem,\n InventoryItemOccurrence,\n InventoryTableData,\n Status,\n} from './inventory-utils';\nimport { inventoryAdditionalItemColumn } from './inventory-columns';\n\n/**\n * Object containing all keys used for localization in this component. If you're using this\n * component in an extension, you can pass it into the useLocalizedStrings hook to easily obtain the\n * localized strings and pass them into the localizedStrings prop of this component\n */\nexport const INVENTORY_STRING_KEYS = Object.freeze([\n '%webView_inventory_all%',\n '%webView_inventory_approved%',\n '%webView_inventory_unapproved%',\n '%webView_inventory_unknown%',\n '%webView_inventory_scope_currentBook%',\n '%webView_inventory_scope_chapter%',\n '%webView_inventory_scope_verse%',\n '%webView_inventory_filter_text%',\n '%webView_inventory_show_additional_items%',\n '%webView_inventory_occurrences_table_header_reference%',\n '%webView_inventory_occurrences_table_header_occurrence%',\n] as const);\n\nexport type InventoryLocalizedStrings = {\n [localizedInventoryKey in (typeof INVENTORY_STRING_KEYS)[number]]?: LocalizedStringValue;\n};\n\n/** Scope of scripture that the inventory can operate on */\nexport type Scope = 'book' | 'chapter' | 'verse';\n\n/** Status values that the status filter can select from */\ntype StatusFilter = Status | 'all';\n\n/** Text labels for the inventory columns and the control components of additional inventory items */\ntype AdditionalItemsLabels = {\n checkboxText?: string;\n tableHeaders?: string[];\n};\n\n/**\n * Filters data that is shown in the DataTable section of the Inventory\n *\n * @param itemData All inventory items and their related information\n * @param statusFilter Allows filtering by status (i.e. show all items, or only items that are\n * 'approved', 'unapproved' or 'unknown')\n * @param textFilter Allows filtering by text. All items that include the filter text will be\n * selected.\n * @returns Array of items and their related information that are matched by the specified filters\n */\nconst filterItemData = (\n itemData: InventoryTableData[],\n statusFilter: StatusFilter,\n textFilter: string,\n): InventoryTableData[] => {\n let filteredItemData: InventoryTableData[] = itemData;\n\n if (statusFilter !== 'all') {\n filteredItemData = filteredItemData.filter(\n (item) =>\n (statusFilter === 'approved' && item.status === 'approved') ||\n (statusFilter === 'unapproved' && item.status === 'unapproved') ||\n (statusFilter === 'unknown' && item.status === 'unknown'),\n );\n }\n\n if (textFilter !== '')\n filteredItemData = filteredItemData.filter((item) => item.items[0].includes(textFilter));\n\n return filteredItemData;\n};\n\n/**\n * Turns array of strings into array of inventory items, along with their count and status\n *\n * @param text The source scripture text that is searched for inventory items\n * @param scriptureRef The scripture reference that the application is currently set to\n * @param approvedItems Array of approved items, typically as defined in `Settings.xml`\n * @param unapprovedItems Array of unapproved items, typically as defined in `Settings.xml`\n * @param itemRegex Regular expression that describes what items this Inventory should extract from\n * the provided scripture text\n * @returns Array of inventory items, along with their count and status\n */\nconst createTableData = (\n text: string | undefined,\n scriptureRef: ScriptureReference,\n approvedItems: string[],\n unapprovedItems: string[],\n itemRegex: RegExp,\n): InventoryTableData[] => {\n if (!text) return [];\n\n const tableData: InventoryTableData[] = [];\n\n let currentBook: number | undefined = scriptureRef.bookNum;\n let currentChapter: number | undefined = scriptureRef.chapterNum;\n let currentVerse: number | undefined = scriptureRef.verseNum;\n\n const lines = getLinesFromUSFM(text);\n\n lines.forEach((line: string) => {\n if (line.startsWith('\\\\id')) {\n currentBook = getBookNumFromId(line);\n currentChapter = 0;\n currentVerse = 0;\n }\n if (line.startsWith('\\\\c')) {\n currentChapter = getNumberFromUSFM(line);\n currentVerse = 0;\n }\n if (line.startsWith('\\\\v')) {\n currentVerse = getNumberFromUSFM(line);\n if (currentChapter === 0) {\n currentChapter = scriptureRef.chapterNum;\n }\n }\n\n let match: RegExpExecArray | undefined = itemRegex.exec(line) ?? undefined;\n while (match) {\n const items: string[] = [];\n match.forEach((item) => items.push(item));\n const itemIndex = match.index;\n const existingItem = tableData.find((tableEntry) => deepEqual(tableEntry.items, items));\n const newReference: InventoryItemOccurrence = {\n reference: {\n bookNum: currentBook !== undefined ? currentBook : -1,\n chapterNum: currentChapter !== undefined ? currentChapter : -1,\n verseNum: currentVerse !== undefined ? currentVerse : -1,\n },\n text: substring(line, Math.max(0, itemIndex - 25), Math.min(itemIndex + 25, line.length)),\n };\n if (existingItem) {\n existingItem.count += 1;\n existingItem.occurrences.push(newReference);\n } else {\n const newItem: InventoryTableData = {\n items,\n count: 1,\n status: getStatusForItem(items[0], approvedItems, unapprovedItems),\n occurrences: [newReference],\n };\n tableData.push(newItem);\n }\n\n match = itemRegex.exec(line) ?? undefined;\n }\n });\n\n return tableData;\n};\n\n/**\n * Gets the localized value for the provided key\n *\n * @param strings Object containing localized string\n * @param key Key for a localized string\n * @returns The localized value for the provided key, if available. Returns the key if no localized\n * value is available\n */\nconst localizeString = (\n strings: InventoryLocalizedStrings,\n key: keyof InventoryLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\n/** Props for the Inventory component */\ntype InventoryProps = {\n /** The scripture reference that the application is currently set to */\n scriptureReference: ScriptureReference;\n /** Callback function that is executed when the scripture reference is changed */\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n /**\n * Object with all localized strings that the Inventory needs to work well across multiple\n * languages. When using this component with Platform.Bible, you can import\n * `INVENTORY_STRING_KEYS` from this library, pass it in to the Platform's localization hook, and\n * pass the localized keys that are returned by the hook into this prop.\n */\n localizedStrings: InventoryLocalizedStrings;\n /**\n * The logic that finds the desired items in the source text. This can either be a Regular\n * expression that captures one or multiple items (preferred), or a custom function that builds\n * and return an InventoryDataTable[] manually. Note: In case the logic captures more than one\n * item (i.e. InventoryTableData.items has a length greater than 1), you must provide text labels\n * for the related columns and control elements to show by setting the `additionalItemsLabels`\n * prop\n */\n extractItems:\n | RegExp\n | ((\n text: string | undefined,\n scriptureRef: ScriptureReference,\n approvedItems: string[],\n unapprovedItems: string[],\n ) => InventoryTableData[]);\n /**\n * Text labels for control elements and additional column headers in case your Inventory has more\n * than one item to show (e.g. The 'Preceding Marker' in the Markers Inventory)\n */\n additionalItemsLabels?: AdditionalItemsLabels;\n /** Array of approved items, typically as defined in `Settings.xml` */\n approvedItems: string[];\n /** Array of unapproved items, typically as defined in `Settings.xml` */\n unapprovedItems: string[];\n /** The source scripture text that is searched for in inventory items */\n text: string | undefined;\n /** Scope of scripture that the inventory will operate on */\n scope: Scope;\n /** Callback function that is executed when the scope is changed from the Inventory */\n onScopeChange: (scope: Scope) => void;\n /**\n * Column definitions for the Inventory data table. The most commonly used column definitions are\n * pre-configured for your convenience and can be imported (e.g. inventoryItemColumn,\n * inventoryAdditionalItemColumn inventoryCountColumn, and inventoryStatusColumn). If you need any\n * other columns you can add these yourself\n */\n columns: ColumnDef[];\n};\n\n/** Inventory component that is used to view and control the status of provided project settings */\nexport default function Inventory({\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n extractItems,\n additionalItemsLabels,\n approvedItems,\n unapprovedItems,\n text,\n scope,\n onScopeChange,\n columns,\n}: InventoryProps) {\n const allItemsText = localizeString(localizedStrings, '%webView_inventory_all%');\n const approvedItemsText = localizeString(localizedStrings, '%webView_inventory_approved%');\n const unapprovedItemsText = localizeString(localizedStrings, '%webView_inventory_unapproved%');\n const unknownItemsText = localizeString(localizedStrings, '%webView_inventory_unknown%');\n const scopeBookText = localizeString(localizedStrings, '%webView_inventory_scope_currentBook%');\n const scopeChapterText = localizeString(localizedStrings, '%webView_inventory_scope_chapter%');\n const scopeVerseText = localizeString(localizedStrings, '%webView_inventory_scope_verse%');\n const filterText = localizeString(localizedStrings, '%webView_inventory_filter_text%');\n const showAdditionalItemsText = localizeString(\n localizedStrings,\n '%webView_inventory_show_additional_items%',\n );\n\n const [showAdditionalItems, setShowAdditionalItems] = useState(false);\n const [statusFilter, setStatusFilter] = useState('all');\n const [textFilter, setTextFilter] = useState('');\n const [selectedItem, setSelectedItem] = useState([]);\n\n const tableData: InventoryTableData[] = useMemo(() => {\n if (!text) return [];\n if (extractItems instanceof RegExp)\n return createTableData(\n text,\n scriptureReference,\n approvedItems,\n unapprovedItems,\n extractItems,\n );\n return extractItems(text, scriptureReference, approvedItems, unapprovedItems);\n }, [text, extractItems, scriptureReference, approvedItems, unapprovedItems]);\n\n const reducedTableData: InventoryTableData[] = useMemo(() => {\n if (showAdditionalItems) return tableData;\n\n const newTableData: InventoryTableData[] = [];\n\n tableData.forEach((tableEntry) => {\n const firstItem = tableEntry.items[0];\n\n const existingEntry = newTableData.find(\n (newTableEntry) => newTableEntry.items[0] === firstItem,\n );\n\n if (existingEntry) {\n existingEntry.count += tableEntry.count;\n existingEntry.occurrences = existingEntry.occurrences.concat(tableEntry.occurrences);\n } else {\n newTableData.push({\n items: [firstItem],\n count: tableEntry.count,\n occurrences: tableEntry.occurrences,\n status: tableEntry.status,\n });\n }\n });\n\n return newTableData;\n }, [showAdditionalItems, tableData]);\n\n const filteredTableData: InventoryTableData[] = useMemo(() => {\n return filterItemData(reducedTableData, statusFilter, textFilter);\n }, [reducedTableData, statusFilter, textFilter]);\n\n const allColumns: ColumnDef[] = useMemo(() => {\n if (!showAdditionalItems) return columns;\n\n const numberOfAdditionalItems = additionalItemsLabels?.tableHeaders?.length;\n if (!numberOfAdditionalItems) return columns;\n\n const additionalColumns: ColumnDef[] = [];\n\n for (let index = 0; index < numberOfAdditionalItems; index++) {\n additionalColumns.push(\n inventoryAdditionalItemColumn(\n additionalItemsLabels?.tableHeaders?.[index] || 'Additional Item',\n index + 1,\n ),\n );\n }\n\n return [...additionalColumns, ...columns];\n }, [additionalItemsLabels?.tableHeaders, columns, showAdditionalItems]);\n\n useEffect(() => {\n setSelectedItem([]);\n }, [filteredTableData]);\n\n const rowClickHandler = (\n row: RowContents,\n table: TableContents,\n ) => {\n table.setRowSelection(() => {\n const newSelection: RowSelectionState = {};\n newSelection[row.index] = true;\n return newSelection;\n });\n\n setSelectedItem(row.original.items);\n };\n\n const handleScopeChange = (value: string) => {\n if (value === 'book' || value === 'chapter' || value === 'verse') {\n onScopeChange(value);\n } else {\n throw new Error(`Invalid scope value: ${value}`);\n }\n };\n\n const handleStatusFilterChange = (value: string) => {\n if (value === 'all' || value === 'approved' || value === 'unapproved' || value === 'unknown') {\n setStatusFilter(value);\n } else {\n throw new Error(`Invalid status filter value: ${value}`);\n }\n };\n\n const occurrenceData: InventoryItemOccurrence[] = useMemo(() => {\n if (reducedTableData.length === 0 || selectedItem.length === 0) return [];\n const occurrence = reducedTableData.filter((tableEntry: InventoryTableData) => {\n return deepEqual(\n showAdditionalItems ? tableEntry.items : [tableEntry.items[0]],\n selectedItem,\n );\n });\n if (occurrence.length > 1) throw new Error('Selected item is not unique');\n return occurrence[0].occurrences;\n }, [selectedItem, showAdditionalItems, reducedTableData]);\n\n return (\n
\n
\n handleStatusFilterChange(value)}\n defaultValue={statusFilter}\n >\n \n \n \n \n {allItemsText}\n {approvedItemsText}\n {unapprovedItemsText}\n {unknownItemsText}\n \n \n \n {\n setTextFilter(event.target.value);\n }}\n />\n {additionalItemsLabels && (\n
\n {\n setSelectedItem([]);\n setShowAdditionalItems(checked);\n }}\n />\n \n
\n )}\n
\n
\n \n
\n {occurrenceData.length > 0 && (\n
\n \n
\n )}\n
\n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/shadcn-ui/command';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/shadcn-ui/popover';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Check, ChevronsUpDown, Star } from 'lucide-react';\nimport { ReactNode, useCallback, useMemo, useState } from 'react';\n\ntype MultiSelectComboBoxEntry = {\n value: string;\n label: string;\n starred?: boolean;\n};\n\ninterface MultiSelectComboBoxProps {\n entries: MultiSelectComboBoxEntry[];\n getEntriesCount?: (option: MultiSelectComboBoxEntry) => number;\n selected: string[];\n onChange: (values: string[]) => void;\n placeholder: string;\n commandEmptyMessage?: string;\n customSelectedText?: string;\n sortSelected?: boolean;\n icon?: ReactNode;\n}\n\nfunction MultiSelectComboBox({\n entries,\n getEntriesCount = undefined,\n selected,\n onChange,\n placeholder,\n commandEmptyMessage = 'No entries found',\n customSelectedText,\n sortSelected = false,\n icon = undefined,\n}: MultiSelectComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n const handleSelect = useCallback(\n (value: string) => {\n onChange(\n selected.includes(value) ? selected.filter((item) => item !== value) : [...selected, value],\n );\n },\n [selected, onChange],\n );\n\n const getPlaceholderText = () => {\n if (selected.length === 1)\n return entries.find((option) => option.value === selected[0])?.label ?? placeholder;\n if (customSelectedText) return customSelectedText;\n return placeholder;\n };\n\n const sortedOptions = useMemo(() => {\n if (!sortSelected) return entries;\n\n const starredItems = entries\n .filter((opt) => opt.starred)\n .sort((a, b) => a.label.localeCompare(b.label));\n const nonStarredItems = entries\n .filter((opt) => !opt.starred)\n .sort((a, b) => {\n const aSelected = selected.includes(a.value);\n const bSelected = selected.includes(b.value);\n if (aSelected && !bSelected) return -1;\n if (!aSelected && bSelected) return 1;\n return a.label.localeCompare(b.label);\n });\n\n return [...starredItems, ...nonStarredItems];\n }, [entries, selected, sortSelected]);\n\n return (\n \n \n 0 && selected.length < entries.length && 'tw-border-primary',\n )}\n >\n
\n
\n \n {icon}\n \n
\n \n {getPlaceholderText()}\n
\n
\n \n \n \n \n \n \n \n {commandEmptyMessage}\n \n {sortedOptions.map((option) => {\n const count: number | undefined = getEntriesCount\n ? getEntriesCount(option)\n : undefined;\n return (\n \n
\n \n
\n
\n {option.starred && }\n
\n
{option.label}
\n {getEntriesCount && (\n
{count}
\n )}\n \n );\n })}\n
\n
\n
\n
\n \n );\n}\n\nexport default MultiSelectComboBox;\n","import { Button } from '@/components/shadcn-ui/button';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Search, X } from 'lucide-react';\nimport { useState } from 'react';\n\nexport type SearchBarProps = {\n /**\n * Callback fired to handle the search query when button pressed\n *\n * @param searchQuery\n */\n onSearch: (searchQuery: string) => void;\n\n /** Optional string that appears in the search bar without a search string */\n placeholder?: string;\n\n /** Optional boolean to set the input base to full width */\n isFullWidth?: boolean;\n\n /** ClassName for the input */\n className?: string;\n};\n\nexport default function SearchBar({\n onSearch,\n placeholder,\n isFullWidth,\n className,\n}: SearchBarProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const handleInputChange = (searchString: string) => {\n setSearchQuery(searchString);\n onSearch(searchString);\n };\n\n return (\n
\n \n handleInputChange(e.target.value)}\n />\n {searchQuery && (\n \n {\n handleInputChange('');\n }}\n />\n Clear\n \n )}\n
\n );\n}\n","// adapted from: https://github.com/shadcn-ui/ui/discussions/752\n\n'use client';\n\nimport { TabsContentProps, TabsListProps, TabsTriggerProps } from '@/components/shadcn-ui/tabs';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\nimport React from 'react';\n\nexport type VerticalTabsProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type LeftTabsTriggerProps = TabsTriggerProps & {\n value: string;\n ref?: React.Ref;\n};\n\nexport const VerticalTabs = React.forwardRef<\n React.ElementRef,\n VerticalTabsProps\n>(({ className, ...props }, ref) => (\n \n));\n\nVerticalTabs.displayName = TabsPrimitive.List.displayName;\n\nexport const VerticalTabsList = React.forwardRef<\n React.ElementRef,\n TabsListProps\n>(({ className, ...props }, ref) => (\n \n));\nVerticalTabsList.displayName = TabsPrimitive.List.displayName;\n\nexport const VerticalTabsTrigger = React.forwardRef<\n React.ElementRef,\n LeftTabsTriggerProps\n>(({ className, ...props }, ref) => (\n \n));\n\nexport const VerticalTabsContent = React.forwardRef<\n React.ElementRef,\n TabsContentProps\n>(({ className, ...props }, ref) => (\n \n));\nVerticalTabsContent.displayName = TabsPrimitive.Content.displayName;\n","import SearchBar from '@/components/basics/search-bar.component';\nimport {\n VerticalTabs,\n VerticalTabsContent,\n VerticalTabsList,\n VerticalTabsTrigger,\n} from '@/components/basics/tabs-vertical';\nimport { ReactNode } from 'react';\n\nexport type TabKeyValueContent = {\n key: string;\n value: string;\n content: ReactNode;\n};\n\nexport type NavigationContentSearchProps = {\n /** List of values and keys for each tab this component should provide */\n tabList: TabKeyValueContent[];\n\n /** Handler to run when the value of the search bar changes */\n onSearch: (searchQuery: string) => void;\n\n /** Optional placeholder for the search bar */\n searchPlaceholder?: string;\n\n /** Optional title to include in the header */\n headerTitle?: string;\n\n /** Optional flag to make the search bar appear full width */\n isSearchBarFullWidth?: boolean;\n\n /** Text direction ltr or rtl */\n direction?: 'ltr' | 'rtl';\n};\n\nexport default function NavigationContentSearch({\n tabList,\n onSearch,\n searchPlaceholder,\n headerTitle,\n isSearchBarFullWidth = false,\n direction = 'ltr',\n}: NavigationContentSearchProps) {\n return (\n
\n
\n {headerTitle ?

{headerTitle}

: ''}\n \n
\n \n \n {tabList.map((tab) => (\n \n {tab.value}\n \n ))}\n \n {tabList.map((tab) => (\n \n {tab.content}\n \n ))}\n \n
\n );\n}\n","import { Button } from '@/components/shadcn-ui/button';\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Canon } from '@sillsdev/scripture';\nimport {\n Cell,\n ColumnDef,\n flexRender,\n getCoreRowModel,\n getExpandedRowModel,\n getGroupedRowModel,\n getSortedRowModel,\n GroupingState,\n Row,\n RowSelectionState,\n SortingState,\n useReactTable,\n} from '@tanstack/react-table';\nimport '@/components/advanced/scripture-results-viewer/scripture-results-viewer.component.css';\nimport {\n compareScrRefs,\n formatScrRef,\n ScriptureSelection,\n scrRefToBBBCCCVVV,\n} from 'platform-bible-utils';\nimport { MouseEvent, useEffect, useMemo, useState } from 'react';\nimport { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-react';\n\n/**\n * Information (e.g., a checking error or some other type of \"transient\" annotation) about something\n * noteworthy at a specific place in an instance of the Scriptures.\n */\nexport type ScriptureItemDetail = ScriptureSelection & {\n /**\n * Text of the error, note, etc. In the future, we might want to support something more than just\n * text so that a JSX element could be provided with a link or some other controls related to the\n * issue being reported.\n */\n detail: string;\n};\n\n/**\n * A uniquely identifiable source of results that can be displayed in the ScriptureResultsViewer.\n * Generally, the source will be a particular Scripture check, but there may be other types of\n * sources.\n */\nexport type ResultsSource = {\n /**\n * Uniquely identifies the source.\n *\n * @type {string}\n */\n id: string;\n\n /**\n * Name (potentially localized) of the source, suitable for display in the UI.\n *\n * @type {string}\n */\n displayName: string;\n};\n\nexport type ScriptureSrcItemDetail = ScriptureItemDetail & {\n /** Source/type of detail. Can be used for grouping. */\n source: ResultsSource;\n};\n\n/**\n * Represents a set of results keyed by Scripture reference. Generally, the source will be a\n * particular Scripture check, but this type also allows for other types of uniquely identifiable\n * sources.\n */\nexport type ResultsSet = {\n /**\n * The backing source associated with this set of results.\n *\n * @type {ResultsSource}\n */\n source: ResultsSource;\n\n /**\n * Array of Scripture item details (messages keyed by Scripture reference).\n *\n * @type {ScriptureItemDetail[]}\n */\n data: ScriptureItemDetail[];\n};\n\nconst scrBookColId = 'scrBook';\nconst scrRefColId = 'scrRef';\nconst typeColId = 'source';\nconst detailsColId = 'details';\n\nconst defaultScrRefColumnName = 'Scripture Reference';\nconst defaultScrBookGroupName = 'Scripture Book';\nconst defaultTypeColumnName = 'Type';\nconst defaultDetailsColumnName = 'Details';\n\nexport type ScriptureResultsViewerColumnInfo = {\n /** Optional header to display for the Reference column. Default value: 'Scripture Reference'. */\n scriptureReferenceColumnName?: string;\n\n /** Optional text to display to refer to the Scripture book group. Default value: 'Scripture Book'. */\n scriptureBookGroupName?: string;\n\n /** Optional header to display for the Type column. Default value: 'Type'. */\n typeColumnName?: string;\n\n /** Optional header to display for the Details column. Default value: 'Details' */\n detailsColumnName?: string;\n};\n\nexport type ScriptureResultsViewerProps = ScriptureResultsViewerColumnInfo & {\n /** Groups of ScriptureItemDetail objects from particular sources (e.g., Scripture checks) */\n sources: ResultsSet[];\n\n /** Flag indicating whether to display column headers. Default is false. */\n showColumnHeaders?: boolean;\n\n /** Flag indicating whether to display source column. Default is false. */\n showSourceColumn?: boolean;\n\n /** Callback function to notify when a row is selected */\n onRowSelected?: (selectedRow: ScriptureSrcItemDetail | undefined) => void;\n\n /** Text direction ltr or rtl */\n direction?: 'ltr' | 'rtl';\n};\n\nfunction getColumns(\n colInfo?: ScriptureResultsViewerColumnInfo,\n showSourceColumn?: boolean,\n): ColumnDef[] {\n const showSrcCol = showSourceColumn ?? false;\n return [\n {\n accessorFn: (row) =>\n `${Canon.bookNumberToId(row.start.bookNum)} ${row.start.chapterNum}:${row.start.verseNum}`,\n id: scrBookColId,\n header: colInfo?.scriptureReferenceColumnName ?? defaultScrRefColumnName,\n cell: (info) => {\n const row = info.row.original;\n if (info.row.getIsGrouped()) {\n return Canon.bookNumberToEnglishName(row.start.bookNum);\n }\n return info.row.groupingColumnId === scrBookColId ? formatScrRef(row.start) : undefined;\n },\n getGroupingValue: (row) => row.start.bookNum,\n sortingFn: (a, b) => {\n return compareScrRefs(a.original.start, b.original.start);\n },\n enableGrouping: true,\n },\n {\n accessorFn: (row) => formatScrRef(row.start),\n id: scrRefColId,\n header: undefined,\n cell: (info) => {\n const row = info.row.original;\n return info.row.getIsGrouped() ? undefined : formatScrRef(row.start);\n },\n sortingFn: (a, b) => {\n return compareScrRefs(a.original.start, b.original.start);\n },\n enableGrouping: false,\n },\n {\n accessorFn: (row) => row.source.displayName,\n id: typeColId,\n header: showSrcCol ? (colInfo?.typeColumnName ?? defaultTypeColumnName) : undefined,\n cell: (info) => (showSrcCol || info.row.getIsGrouped() ? info.getValue() : undefined),\n getGroupingValue: (row) => row.source.id,\n sortingFn: (a, b) =>\n a.original.source.displayName.localeCompare(b.original.source.displayName),\n enableGrouping: true,\n },\n {\n accessorFn: (row) => row.detail,\n id: detailsColId,\n header: colInfo?.detailsColumnName ?? defaultDetailsColumnName,\n cell: (info) => info.getValue(),\n enableGrouping: false,\n },\n ];\n}\n\nconst toRefOrRange = (scriptureSelection: ScriptureSelection) => {\n if (!('offset' in scriptureSelection.start))\n throw new Error('No offset available in range start');\n if (scriptureSelection.end && !('offset' in scriptureSelection.end))\n throw new Error('No offset available in range end');\n const { offset: offsetStart } = scriptureSelection.start;\n let offsetEnd: number = 0;\n if (scriptureSelection.end) ({ offset: offsetEnd } = scriptureSelection.end);\n if (\n !scriptureSelection.end ||\n compareScrRefs(scriptureSelection.start, scriptureSelection.end) === 0\n )\n return `${scrRefToBBBCCCVVV(scriptureSelection.start)}+${offsetStart}`;\n return `${scrRefToBBBCCCVVV(scriptureSelection.start)}+${offsetStart}-${scrRefToBBBCCCVVV(scriptureSelection.end)}+${offsetEnd}`;\n};\n\nconst getRowKey = (row: ScriptureSrcItemDetail) =>\n `${toRefOrRange({ start: row.start, end: row.end })} ${row.source.displayName} ${row.detail}`;\n\n/**\n * Component to display a combined list of detailed items from one or more sources, where the items\n * are keyed primarily by Scripture reference. This is particularly useful for displaying a list of\n * results from Scripture checks, but more generally could be used to display any \"results\" from any\n * source(s). The component allows for grouping by Scripture book, source, or both. By default, it\n * displays somewhat \"tree-like\" which allows it to be more horizontally compact and intuitive. But\n * it also has the option of displaying as a traditional table with column headings (with or without\n * the source column showing).\n */\nexport default function ScriptureResultsViewer({\n sources,\n showColumnHeaders = false,\n showSourceColumn = false,\n scriptureReferenceColumnName,\n scriptureBookGroupName,\n typeColumnName,\n detailsColumnName,\n onRowSelected,\n direction = 'ltr',\n}: ScriptureResultsViewerProps) {\n const [grouping, setGrouping] = useState([]);\n const [sorting, setSorting] = useState([{ id: scrBookColId, desc: false }]);\n const [rowSelection, setRowSelection] = useState({});\n\n const scriptureResults = useMemo(\n () =>\n sources.flatMap((source) => {\n return source.data.map((item) => ({\n ...item,\n source: source.source,\n }));\n }),\n [sources],\n );\n\n const columns = useMemo(\n () =>\n getColumns(\n {\n scriptureReferenceColumnName,\n typeColumnName,\n detailsColumnName,\n },\n showSourceColumn,\n ),\n [scriptureReferenceColumnName, typeColumnName, detailsColumnName, showSourceColumn],\n );\n\n useEffect(() => {\n // Ensure sorting is applied correctly when grouped by type\n if (grouping.includes(typeColId)) {\n setSorting([\n { id: typeColId, desc: false },\n { id: scrBookColId, desc: false },\n ]);\n } else {\n setSorting([{ id: scrBookColId, desc: false }]);\n }\n }, [grouping]);\n\n const table = useReactTable({\n data: scriptureResults,\n columns,\n state: {\n grouping,\n sorting,\n rowSelection,\n },\n onGroupingChange: setGrouping,\n onSortingChange: setSorting,\n onRowSelectionChange: setRowSelection,\n getExpandedRowModel: getExpandedRowModel(),\n getGroupedRowModel: getGroupedRowModel(),\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getRowId: getRowKey,\n autoResetExpanded: false,\n enableMultiRowSelection: false,\n enableSubRowSelection: false,\n });\n\n useEffect(() => {\n if (onRowSelected) {\n const selectedRows = table.getSelectedRowModel().rowsById;\n const keys = Object.keys(selectedRows);\n if (keys.length === 1) {\n const selectedRow = scriptureResults.find((row) => getRowKey(row) === keys[0]) || undefined;\n if (selectedRow) onRowSelected(selectedRow);\n }\n }\n }, [rowSelection, scriptureResults, onRowSelected, table]);\n\n // Define possible grouping options\n const scrBookGroupName = scriptureBookGroupName ?? defaultScrBookGroupName;\n const typeGroupName = typeColumnName ?? defaultTypeColumnName;\n\n const groupingOptions = [\n { label: 'No Grouping', value: [] },\n { label: `Group by ${scrBookGroupName}`, value: [scrBookColId] },\n { label: `Group by ${typeGroupName}`, value: [typeColId] },\n {\n label: `Group by ${scrBookGroupName} and ${typeGroupName}`,\n value: [scrBookColId, typeColId],\n },\n {\n label: `Group by ${typeGroupName} and ${scrBookGroupName}`,\n value: [typeColId, scrBookColId],\n },\n ];\n\n const handleSelectChange = (selectedGrouping: string) => {\n setGrouping(JSON.parse(selectedGrouping));\n };\n\n const handleRowClick = (row: Row, event: MouseEvent) => {\n if (!row.getIsGrouped() && !row.getIsSelected()) {\n row.getToggleSelectedHandler()(event);\n }\n };\n\n const getEvenOrOddBandingStyle = (row: Row, index: number) => {\n if (row.getIsGrouped()) return '';\n // UX has now said they don't think they want banding. I'm leaving in the code to\n // set even and odd styles, but there's nothing in the CSS to style them differently.\n // The \"even\" style used to also have tw-bg-neutral-300 (along with even) to create\n // a visual banding effect. That could be added back in if UX changes the decision.\n return cn('banded-row', index % 2 === 0 ? 'even' : 'odd');\n };\n\n const getIndent = (\n groupingState: GroupingState,\n row: Row,\n cell: Cell,\n ) => {\n if (groupingState?.length === 0 || row.depth < cell.column.getGroupedIndex()) return undefined;\n if (row.getIsGrouped()) {\n switch (row.depth) {\n case 1:\n return 'tw-ps-4';\n default:\n return undefined;\n }\n }\n switch (row.depth) {\n case 1:\n return 'tw-ps-8';\n case 2:\n return 'tw-ps-12';\n default:\n return undefined;\n }\n };\n\n return (\n
\n {!showColumnHeaders && (\n {\n handleSelectChange(value);\n }}\n >\n \n \n \n \n \n {groupingOptions.map((option) => (\n \n {option.label}\n \n ))}\n \n \n \n )}\n \n {showColumnHeaders && (\n \n {table.getHeaderGroups().map((headerGroup) => (\n \n {headerGroup.headers\n .filter((h) => h.column.columnDef.header)\n .map((header) => (\n /* For sticky column headers to work, we probably need to change the default definition of the shadcn Table component. See https://github.com/shadcn-ui/ui/issues/1151 */\n \n {header.isPlaceholder ? undefined : (\n
\n {header.column.getCanGroup() ? (\n \n {header.column.getIsGrouped() ? `🛑` : `👊 `}\n \n ) : undefined}{' '}\n {flexRender(header.column.columnDef.header, header.getContext())}\n
\n )}\n
\n ))}\n
\n ))}\n
\n )}\n \n {table.getRowModel().rows.map((row, rowIndex) => {\n return (\n handleRowClick(row, event)}\n >\n {row.getVisibleCells().map((cell) => {\n if (\n cell.getIsPlaceholder() ||\n (cell.column.columnDef.enableGrouping &&\n !cell.getIsGrouped() &&\n (cell.column.columnDef.id !== typeColId || !showSourceColumn))\n )\n return undefined;\n return (\n \n {(() => {\n if (cell.getIsGrouped()) {\n return (\n \n {row.getIsExpanded() && }\n {!row.getIsExpanded() &&\n (direction === 'ltr' ? : )}{' '}\n {flexRender(cell.column.columnDef.cell, cell.getContext())} (\n {row.subRows.length})\n \n );\n }\n\n // if (cell.getIsAggregated()) {\n // flexRender(\n // cell.column.columnDef.aggregatedCell ?? cell.column.columnDef.cell,\n // cell.getContext(),\n // );\n // }\n\n return flexRender(cell.column.columnDef.cell, cell.getContext());\n })()}\n \n );\n })}\n \n );\n })}\n \n
\n
\n );\n}\n","import {\n getLocalizeKeyForScrollGroupId,\n LanguageStrings,\n ScrollGroupId,\n} from 'platform-bible-utils';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\n\nconst DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS = {\n [getLocalizeKeyForScrollGroupId('undefined')]: 'Ø',\n [getLocalizeKeyForScrollGroupId(0)]: 'A',\n [getLocalizeKeyForScrollGroupId(1)]: 'B',\n [getLocalizeKeyForScrollGroupId(2)]: 'C',\n [getLocalizeKeyForScrollGroupId(3)]: 'D',\n [getLocalizeKeyForScrollGroupId(4)]: 'E',\n [getLocalizeKeyForScrollGroupId(5)]: 'F',\n [getLocalizeKeyForScrollGroupId(6)]: 'G',\n [getLocalizeKeyForScrollGroupId(7)]: 'H',\n [getLocalizeKeyForScrollGroupId(8)]: 'I',\n [getLocalizeKeyForScrollGroupId(9)]: 'J',\n [getLocalizeKeyForScrollGroupId(10)]: 'K',\n [getLocalizeKeyForScrollGroupId(11)]: 'L',\n [getLocalizeKeyForScrollGroupId(12)]: 'M',\n [getLocalizeKeyForScrollGroupId(13)]: 'N',\n [getLocalizeKeyForScrollGroupId(14)]: 'O',\n [getLocalizeKeyForScrollGroupId(15)]: 'P',\n [getLocalizeKeyForScrollGroupId(16)]: 'Q',\n [getLocalizeKeyForScrollGroupId(17)]: 'R',\n [getLocalizeKeyForScrollGroupId(18)]: 'S',\n [getLocalizeKeyForScrollGroupId(19)]: 'T',\n [getLocalizeKeyForScrollGroupId(20)]: 'U',\n [getLocalizeKeyForScrollGroupId(21)]: 'V',\n [getLocalizeKeyForScrollGroupId(22)]: 'W',\n [getLocalizeKeyForScrollGroupId(23)]: 'X',\n [getLocalizeKeyForScrollGroupId(24)]: 'Y',\n [getLocalizeKeyForScrollGroupId(25)]: 'Z',\n};\n\nexport type ScrollGroupSelectorProps = {\n /**\n * List of scroll group ids to show to the user. Either a {@link ScrollGroupId} or `undefined` for\n * no scroll group\n */\n availableScrollGroupIds: (ScrollGroupId | undefined)[];\n /** Currently selected scroll group id. `undefined` for no scroll group */\n scrollGroupId: ScrollGroupId | undefined;\n /** Callback function run when the user tries to change the scroll group id */\n onChangeScrollGroupId: (newScrollGroupId: ScrollGroupId | undefined) => void;\n /**\n * Localized strings to use for displaying scroll group ids. Must be an object whose keys are\n * `getLocalizeKeyForScrollGroupId(scrollGroupId)` for all scroll group ids (and `undefined` if\n * included) in {@link ScrollGroupSelectorProps.availableScrollGroupIds} and whose values are the\n * localized strings to use for those scroll group ids.\n *\n * Defaults to English localizations of English alphabet for scroll groups 0-25 (e.g. 0 is A) and\n * Ø for `undefined`. Will fill in any that are not provided with these English localizations.\n * Also, if any values match the keys, the English localization will be used. This is useful in\n * case you want to pass in a temporary version of the localized strings while your localized\n * strings load.\n *\n * @example\n *\n * ```typescript\n * const myScrollGroupIdLocalizedStrings = {\n * [getLocalizeKeyForScrollGroupId('undefined')]: 'Ø',\n * [getLocalizeKeyForScrollGroupId(0)]: 'A',\n * [getLocalizeKeyForScrollGroupId(1)]: 'B',\n * [getLocalizeKeyForScrollGroupId(2)]: 'C',\n * [getLocalizeKeyForScrollGroupId(3)]: 'D',\n * [getLocalizeKeyForScrollGroupId(4)]: 'E',\n * };\n * ```\n *\n * @example\n *\n * ```tsx\n * const availableScrollGroupIds = [undefined, 0, 1, 2, 3, 4];\n *\n * const localizeKeys = getLocalizeKeysForScrollGroupIds();\n *\n * const [localizedStrings] = useLocalizedStrings(localizeKeys);\n *\n * ...\n *\n * \n * ```\n */\n localizedStrings?: LanguageStrings;\n};\n\n/** Selector component for choosing a scroll group */\nexport default function ScrollGroupSelector({\n availableScrollGroupIds,\n scrollGroupId,\n onChangeScrollGroupId,\n localizedStrings = {},\n}: ScrollGroupSelectorProps) {\n const localizedStringsDefaulted = {\n ...DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS,\n ...Object.fromEntries(\n Object.entries(localizedStrings).map(\n ([localizedStringKey, localizedStringValue]: [string, string]) => [\n localizedStringKey,\n localizedStringKey === localizedStringValue &&\n localizedStringKey in DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS\n ? DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS[localizedStringKey]\n : localizedStringValue,\n ],\n ),\n ),\n };\n return (\n \n onChangeScrollGroupId(\n newScrollGroupString === 'undefined' ? undefined : parseInt(newScrollGroupString, 10),\n )\n }\n >\n \n \n \n \n {availableScrollGroupIds.map((scrollGroupOptionId) => (\n \n {localizedStringsDefaulted[getLocalizeKeyForScrollGroupId(scrollGroupOptionId)]}\n \n ))}\n \n \n );\n}\n","import React from 'react';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Separator = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n \n));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n","import { PropsWithChildren } from 'react';\nimport { Separator } from '@/components/shadcn-ui/separator';\n\n/** Props for the SettingsList component, currently just children */\ntype SettingsListProps = PropsWithChildren;\n\n/**\n * SettingsList component is a wrapper for list items. Rendered with a formatted div\n *\n * @param children To populate the list with\n * @returns Formatted div encompassing the children\n */\nexport function SettingsList({ children }: SettingsListProps) {\n return
{children}
;\n}\n\n/** Props for SettingsListItem component */\ntype SettingsListItemProps = PropsWithChildren & {\n /** Primary text of the list item */\n primary: string;\n\n /** Optional text of the list item */\n secondary?: string | undefined;\n\n /** Optional boolean to display a message if the children aren't loaded yet. Defaults to false */\n isLoading?: boolean;\n\n /** Optional message to display if isLoading */\n loadingMessage?: string;\n};\n\n/**\n * SettingsListItem component is a common list item. Rendered with a formatted div\n *\n * @param primary Primary text of the list item\n * @param secondary Optional secondary text of the list item\n * @param isLoading Optional, to display a message if the action component isn't generated yet,\n * defaults to false\n * @param children The action component(s) to provide for this item\n * @param loadingMessage Optional, message to display if isLoading\n * @returns Formatted div encompassing the list item content\n */\nexport function SettingsListItem({\n primary,\n secondary,\n children,\n isLoading = false,\n loadingMessage,\n}: SettingsListItemProps) {\n return (\n
\n
\n

{primary}

\n

\n {secondary}\n

\n
\n\n {isLoading ? (\n

{loadingMessage}

\n ) : (\n
{children}
\n )}\n
\n );\n}\n\n/** Props for SettingsListHeader component */\ntype SettingsListHeaderProps = {\n /** The primary text of the list header */\n primary: string;\n\n /** Optional secondary text of the list header */\n secondary?: string | undefined;\n\n /** Optional boolean to include a separator underneath the secondary text. Defaults to false */\n includeSeparator?: boolean;\n};\n\n/**\n * SettingsListHeader component displays text above the list\n *\n * @param primary The primary text of the list header\n * @param secondary Optional secondary text of the list header\n * @param includeSeparator Optional boolean to include a separator underneath the secondary text.\n * Defaults to false\n * @returns Formatted div with list header content\n */\nexport function SettingsListHeader({\n primary,\n secondary,\n includeSeparator = false,\n}: SettingsListHeaderProps) {\n return (\n
\n
\n

{primary}

\n

{secondary}

\n
\n {includeSeparator ? : ''}\n
\n );\n}\n","import Checkbox from '@/components/shadcn-ui/checkbox';\nimport { Label } from '@/components/shadcn-ui/label';\n\nexport type ChecklistProps = {\n /** Optional string representing the id attribute of the Checklist */\n id?: string;\n /** Optional string representing CSS class name(s) for styling */\n className?: string;\n /** Array of strings representing the checkable items */\n listItems: string[];\n /** Array of strings representing the checked items */\n selectedListItems: string[];\n /**\n * Function that is called when a checkbox item is selected or deselected\n *\n * @param item The string description for this item\n * @param selected True if selected, false if not selected\n */\n handleSelectListItem: (item: string, selected: boolean) => void;\n\n /**\n * Optional function creates a label for a provided checkable item\n *\n * @param item The item for which a label is to be created\n * @returns A string representing the label text for the checkbox associated with that item\n */\n createLabel?: (item: string) => string;\n};\n\n/** Renders a list of checkboxes. Each checkbox corresponds to an item from the `listItems` array. */\nexport default function Checklist({\n id,\n className,\n listItems,\n selectedListItems,\n handleSelectListItem,\n createLabel,\n}: ChecklistProps) {\n return (\n
\n {listItems.map((item) => (\n
\n handleSelectListItem(item, value)}\n />\n \n
\n ))}\n
\n );\n}\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function chainPropTypes(propType1, propType2) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return function validate(...args) {\n return propType1(...args) || propType2(...args);\n };\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (!isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? _extends({}, target) : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\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","/** @license React v16.13.1\n * react-is.development.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';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\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\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\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\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\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\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\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\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import PropTypes from 'prop-types';\nimport chainPropTypes from '../chainPropTypes';\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n const {\n prototype = {}\n } = elementType;\n return Boolean(prototype.isReactComponent);\n}\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n const element = props[propName];\n const safePropName = propFullName || propName;\n if (element == null ||\n // When server-side rendering React doesn't warn either.\n // This is not an accurate check for SSR.\n // This is only in place for Emotion compat.\n // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.\n typeof window === 'undefined') {\n return null;\n }\n let warningHint;\n const elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nconst elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);\nelementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);\nexport default elementAcceptingRef;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n\nconst specialProperty = 'exact-prop: \\u200b';\nexport default function exactProp(propTypes) {\n if (process.env.NODE_ENV === 'production') {\n return propTypes;\n }\n return _extends({}, propTypes, {\n [specialProperty]: props => {\n const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop));\n if (unsupportedProps.length > 0) {\n return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\\`${prop}\\``).join(', ')}. Please remove them.`);\n }\n return null;\n }\n });\n}","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe if we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","/**\n * @license React\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'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","/**\n * @license React\n * react-is.development.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';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_SERVER_CONTEXT_TYPE:\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\nfunction isSuspenseList(object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.SuspenseList = SuspenseList;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isSuspenseList = isSuspenseList;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\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","import { ForwardRef, Memo } from 'react-is';\n\n// Simplified polyfill for IE11 support\n// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3\nconst fnNameMatchRegex = /^\\s*function(?:\\s|\\s*\\/\\*.*\\*\\/\\s*)+([^(\\s/]*)\\s*/;\nexport function getFunctionName(fn) {\n const match = `${fn}`.match(fnNameMatchRegex);\n const name = match && match[1];\n return name || '';\n}\nfunction getFunctionComponentName(Component, fallback = '') {\n return Component.displayName || Component.name || getFunctionName(Component) || fallback;\n}\nfunction getWrappedName(outerType, innerType, wrapperName) {\n const functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);\n}\n\n/**\n * cherry-pick from\n * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName with added IE11 support\n */\nexport default function getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n if (typeof Component === 'string') {\n return Component;\n }\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n // TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`\n if (typeof Component === 'object') {\n switch (Component.$$typeof) {\n case ForwardRef:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n case Memo:\n return getWrappedName(Component, Component.type, 'memo');\n default:\n return undefined;\n }\n }\n return undefined;\n}","export default function HTMLElementType(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == null) {\n return null;\n }\n if (propValue && propValue.nodeType !== 1) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an HTMLElement.`);\n }\n return null;\n}","import PropTypes from 'prop-types';\nconst refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);\nexport default refType;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","export default function deprecatedPropType(validator, reason) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return (props, propName, componentName, location, propFullName) => {\n const componentNameSafe = componentName || '<>';\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The ${location} \\`${propFullNameSafe}\\` of ` + `\\`${componentNameSafe}\\` is deprecated. ${reason}`);\n }\n return null;\n };\n}","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n var _muiName, _element$type;\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from '../ownerDocument';\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function requirePropFactory(componentNameInError, Component) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n\n // eslint-disable-next-line react/forbid-foreign-prop-types\n const prevPropTypes = Component ? _extends({}, Component.propTypes) : null;\n const requireProp = requiredProp => (props, propName, componentName, location, propFullName, ...args) => {\n const propFullNameSafe = propFullName || propName;\n const defaultTypeChecker = prevPropTypes == null ? void 0 : prevPropTypes[propFullNameSafe];\n if (defaultTypeChecker) {\n const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args);\n if (typeCheckerResult) {\n return typeCheckerResult;\n }\n }\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(`The prop \\`${propFullNameSafe}\\` of ` + `\\`${componentNameInError}\\` can only be used together with the \\`${requiredProp}\\` prop.`);\n }\n return null;\n };\n return requireProp;\n}","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseId = React['useId'.toString()];\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride != null ? idOverride : reactId;\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","export default function unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The prop \\`${propFullNameSafe}\\` is not supported. Please remove it.`);\n }\n return null;\n}","'use client';\n\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && defaultValue !== defaultProp) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '../useEnhancedEffect';\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nimport setRef from '../setRef';\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport useLazyRef from '../useLazyRef/useLazyRef';\nimport useOnMount from '../useOnMount/useOnMount';\nexport class Timeout {\n constructor() {\n this.currentId = null;\n this.clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n this.disposeEffect = () => {\n return this.clear;\n };\n }\n static create() {\n return new Timeout();\n }\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","'use client';\n\n// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nimport * as React from 'react';\nimport { Timeout } from '../useTimeout/useTimeout';\nlet hadKeyboardEvent = true;\nlet hadFocusVisibleRecently = false;\nconst hadFocusVisibleRecentlyTimeout = new Timeout();\nconst inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @returns {boolean}\n */\nfunction focusTriggersKeyboardModality(node) {\n const {\n type,\n tagName\n } = node;\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n if (node.isContentEditable) {\n return true;\n }\n return false;\n}\n\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n hadKeyboardEvent = true;\n}\n\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\nexport function teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\nfunction isFocusVisible(event) {\n const {\n target\n } = event;\n try {\n return target.matches(':focus-visible');\n } catch (error) {\n // Browsers not implementing :focus-visible will throw a SyntaxError.\n // We use our own heuristic for those browsers.\n // Rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n }\n\n // No need for validFocusTarget check. The user does that by attaching it to\n // focusable events only.\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\nexport default function useIsFocusVisible() {\n const ref = React.useCallback(node => {\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n const isFocusVisibleRef = React.useRef(false);\n\n /**\n * Should be called if a blur event is fired\n */\n function handleBlurVisible() {\n // checking against potential state variable does not suffice if we focus and blur synchronously.\n // React wouldn't have time to trigger a re-render so `focusVisible` would be stale.\n // Ideally we would adjust `isFocusVisible(event)` to look at `relatedTarget` for blur events.\n // This doesn't work in IE11 due to https://github.com/facebook/react/issues/3751\n // TODO: check again if React releases their internal changes to focus event handling (https://github.com/facebook/react/pull/19186).\n if (isFocusVisibleRef.current) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n hadFocusVisibleRecentlyTimeout.start(100, () => {\n hadFocusVisibleRecently = false;\n });\n isFocusVisibleRef.current = false;\n return true;\n }\n return false;\n }\n\n /**\n * Should be called if a blur event is fired\n */\n function handleFocusVisible(event) {\n if (isFocusVisible(event)) {\n isFocusVisibleRef.current = true;\n return true;\n }\n return false;\n }\n return {\n isFocusVisibleRef,\n onFocus: handleFocusVisible,\n onBlur: handleBlurVisible,\n ref\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param {object} defaultProps\n * @param {object} props\n * @returns {object} resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = _extends({}, props);\n Object.keys(defaultProps).forEach(propName => {\n if (propName.toString().match(/^(components|slots)$/)) {\n output[propName] = _extends({}, defaultProps[propName], output[propName]);\n } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {\n const defaultSlotProps = defaultProps[propName] || {};\n const slotProps = props[propName];\n output[propName] = {};\n if (!slotProps || !Object.keys(slotProps)) {\n // Reduce the iteration if the slot props is empty\n output[propName] = defaultSlotProps;\n } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {\n // Reduce the iteration if the default slot props is empty\n output[propName] = slotProps;\n } else {\n output[propName] = _extends({}, slotProps);\n Object.keys(defaultSlotProps).forEach(slotPropName => {\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n });\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n });\n return output;\n}","export default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n Object.keys(slots).forEach(\n // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n const utilityClass = getUtilityClass(key);\n if (utilityClass !== '') {\n acc.push(utilityClass);\n }\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n }\n return acc;\n }, []).join(' ');\n });\n return output;\n}","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from '../ClassNameGenerator';\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from '../generateUtilityClass';\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"values\", \"unit\", \"step\"];\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return _extends({}, acc, {\n [obj.key]: obj.val\n });\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5\n } = breakpoints,\n other = _objectWithoutPropertiesLoose(breakpoints, _excluded);\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return _extends({\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit\n }, other);\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import PropTypes from 'prop-types';\nconst responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};\nexport default responsivePropType;","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from './merge';\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme\n }, props[key]));\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nimport { getPath } from './style';\nimport merge from './merge';\nimport memoize from './memoize';\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n var _getPath;\n const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;\n if (typeof themeSpacing === 'number') {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);\n }\n }\n return themeSpacing * abs;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return abs => {\n if (typeof abs === 'string') {\n return abs;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n return themeSpacing[abs];\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n const abs = Math.abs(propValue);\n const transformed = transformer(abs);\n if (propValue >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (keys.indexOf(prop) === -1) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","import { createUnarySpacing } from '../spacing';\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n\n // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n // Smaller components, such as icons, can align to a 4dp grid.\n // https://m2.material.io/design/layout/understanding-layout.html\n const transform = createUnarySpacing({\n spacing: spacingInput\n });\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","import merge from './merge';\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from './responsivePropType';\nimport style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from './style';\nimport compose from './compose';\nimport { createUnaryUnit, getValue } from './spacing';\nimport { handleBreakpoints } from './breakpoints';\nimport responsivePropType from './responsivePropType';\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from './style';\nimport compose from './compose';\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from './style';\nimport compose from './compose';\nimport { handleBreakpoints, values as breakpointsValues } from './breakpoints';\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n var _props$theme, _props$theme2;\n const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from '../spacing';\nimport { borderRadius, borderTransform } from '../borders';\nimport { gap, rowGap, columnGap } from '../cssGrid';\nimport { paletteTransform } from '../palette';\nimport { maxWidth, sizingTransform } from '../sizing';\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import capitalize from '@mui/utils/capitalize';\nimport merge from '../merge';\nimport { getPath, getStyleValue as getValue } from '../style';\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from '../breakpoints';\nimport defaultSxConfig from './defaultSxConfig';\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n var _theme$unstable_sxCon;\n const {\n sx,\n theme = {}\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n return removeUnusedBreakpoints(breakpointsKeys, css);\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n *\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars && typeof theme.getColorSchemeSelector === 'function') {\n // If CssVarsProvider is used as a provider,\n // returns '* :where([data-mui-color-scheme=\"light|dark\"]) &'\n const selector = theme.getColorSchemeSelector(key).replace(/(\\[[^\\]]+\\])/, '*:where($1)');\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"breakpoints\", \"palette\", \"spacing\", \"shape\"];\nimport deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from './createBreakpoints';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport styleFunctionSx from '../styleFunctionSx/styleFunctionSx';\nimport defaultSxConfig from '../styleFunctionSx/defaultSxConfig';\nimport applyStyles from './applyStyles';\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: _extends({\n mode: 'light'\n }, paletteInput),\n spacing,\n shape: _extends({}, shape, shapeInput)\n }, other);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nexport default createTheme;","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","'use client';\n\nimport createTheme from './createTheme';\nimport useThemeWithoutDefault from './useThemeWithoutDefault';\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"ownerState\"],\n _excluded2 = [\"variants\"],\n _excluded3 = [\"name\", \"slot\", \"skipVariantsResolver\", \"skipSx\", \"overridesResolver\"];\n/* eslint-disable no-underscore-dangle */\nimport styledEngineStyled, { internal_processStyles as processStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from './createTheme';\nimport styleFunctionSx from './styleFunctionSx';\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport const systemDefaultTheme = createTheme();\nconst lowercaseFirstLetter = string => {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n};\nfunction resolveTheme({\n defaultTheme,\n theme,\n themeId\n}) {\n return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (props, styles) => styles[slot];\n}\nfunction processStyleArg(callableStyle, _ref) {\n let {\n ownerState\n } = _ref,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n const resolvedStylesArg = typeof callableStyle === 'function' ? callableStyle(_extends({\n ownerState\n }, props)) : callableStyle;\n if (Array.isArray(resolvedStylesArg)) {\n return resolvedStylesArg.flatMap(resolvedStyle => processStyleArg(resolvedStyle, _extends({\n ownerState\n }, props)));\n }\n if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {\n const {\n variants = []\n } = resolvedStylesArg,\n otherStyles = _objectWithoutPropertiesLoose(resolvedStylesArg, _excluded2);\n let result = otherStyles;\n variants.forEach(variant => {\n let isMatch = true;\n if (typeof variant.props === 'function') {\n isMatch = variant.props(_extends({\n ownerState\n }, props, ownerState));\n } else {\n Object.keys(variant.props).forEach(key => {\n if ((ownerState == null ? void 0 : ownerState[key]) !== variant.props[key] && props[key] !== variant.props[key]) {\n isMatch = false;\n }\n });\n }\n if (isMatch) {\n if (!Array.isArray(result)) {\n result = [result];\n }\n result.push(typeof variant.style === 'function' ? variant.style(_extends({\n ownerState\n }, props, ownerState)) : variant.style);\n }\n });\n return result;\n }\n return resolvedStylesArg;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n const systemSx = props => {\n return styleFunctionSx(_extends({}, props, {\n theme: resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }))\n }));\n };\n systemSx.__mui_systemSx = true;\n return (tag, inputOptions = {}) => {\n // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.\n processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))\n } = inputOptions,\n options = _objectWithoutPropertiesLoose(inputOptions, _excluded3);\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, _extends({\n shouldForwardProp: shouldForwardPropOption,\n label\n }, options));\n const transformStyleArg = stylesArg => {\n // On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg || isPlainObject(stylesArg)) {\n return props => processStyleArg(stylesArg, _extends({}, props, {\n theme: resolveTheme({\n theme: props.theme,\n defaultTheme,\n themeId\n })\n }));\n }\n return stylesArg;\n };\n const muiStyledResolver = (styleArg, ...expressions) => {\n let transformedStyleArg = transformStyleArg(styleArg);\n const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];\n if (componentName && overridesResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {\n return null;\n }\n const styleOverrides = theme.components[componentName].styleOverrides;\n const resolvedStyleOverrides = {};\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {\n resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, _extends({}, props, {\n theme\n }));\n });\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsWithDefaultTheme.push(props => {\n var _theme$components;\n const theme = resolveTheme(_extends({}, props, {\n defaultTheme,\n themeId\n }));\n const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants;\n return processStyleArg({\n variants: themeVariants\n }, _extends({}, props, {\n theme\n }));\n });\n }\n if (!skipSx) {\n expressionsWithDefaultTheme.push(systemSx);\n }\n const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;\n if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {\n const placeholders = new Array(numOfCustomFnsApplied).fill('');\n // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.\n transformedStyleArg = [...styleArg, ...placeholders];\n transformedStyleArg.raw = [...styleArg.raw, ...placeholders];\n }\n const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n let displayName;\n if (componentName) {\n displayName = `${componentName}${capitalize(componentSlot || '')}`;\n }\n if (displayName === undefined) {\n displayName = `Styled(${getDisplayName(tag)})`;\n }\n Component.displayName = displayName;\n }\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n}","import resolveProps from '@mui/utils/resolveProps';\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n return resolveProps(theme.components[name].defaultProps, props);\n}","'use client';\n\nimport getThemeProps from './getThemeProps';\nimport useTheme from '../useTheme';\nexport default function useThemeProps({\n props,\n name,\n defaultTheme,\n themeId\n}) {\n let theme = useTheme(defaultTheme);\n if (themeId) {\n theme = theme[themeId] || theme;\n }\n const mergedProps = getThemeProps({\n theme,\n name,\n props\n });\n return mergedProps;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport clamp from '@mui/utils/clamp';\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return clamp(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nexport function hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : _formatMuiErrorMessage(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : _formatMuiErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nexport const colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexport const private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nexport function rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nexport function private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nexport function private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nexport function blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, mixins) {\n return _extends({\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n }\n }, mixins);\n}","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"mode\", \"contrastThreshold\", \"tonalOffset\"];\nimport { deepmerge } from '@mui/utils';\nimport { darken, getContrastRatio, lighten } from '@mui/system';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport purple from '../colors/purple';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport lightBlue from '../colors/lightBlue';\nimport green from '../colors/green';\nexport const light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport const dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2\n } = palette,\n other = _objectWithoutPropertiesLoose(palette, _excluded);\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = _extends({}, color);\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\nThe color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from \"@mui/material/colors\";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });` : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n const modes = {\n dark,\n light\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!modes[mode]) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: _extends({}, common),\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset\n }, modes[mode]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"];\nimport { deepmerge } from '@mui/utils';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const _ref = typeof typography === 'function' ? typography(palette) : typography,\n {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}, casing, allVariants);\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge(_extends({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"duration\", \"easing\", \"delay\"];\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = _extends({}, easing, inputTransitions.easing);\n const mergedDuration = _extends({}, duration, inputTransitions.duration);\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n // IE11 support, replace with Number.isNaN\n // eslint-disable-next-line no-restricted-globals\n const isNumber = value => !isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return _extends({\n getAutoHeightDuration,\n create\n }, inputTransitions, {\n easing: mergedEasing,\n duration: mergedDuration\n });\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nconst _excluded = [\"breakpoints\", \"mixins\", \"spacing\", \"palette\", \"transitions\", \"typography\", \"shape\"];\nimport { deepmerge } from '@mui/utils';\nimport { createTheme as systemCreateTheme, unstable_defaultSxConfig as defaultSxConfig, unstable_styleFunctionSx as styleFunctionSx } from '@mui/system';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport createTransitions from './createTransitions';\nimport zIndex from './zIndex';\nfunction createTheme(options = {}, ...args) {\n const {\n mixins: mixinsInput = {},\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {}\n } = options,\n other = _objectWithoutPropertiesLoose(options, _excluded);\n if (options.vars) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`vars\\` is a private field used for CSS variables support.\nPlease use another name.` : _formatMuiErrorMessage(18));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: _extends({}, zIndex)\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (key in node) {\n const child = node[key];\n if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.indexOf('Mui') === 0) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createTheme(...args);\n}\nexport default createTheme;","'use client';\n\nimport createTheme from './createTheme';\nconst defaultTheme = createTheme();\nexport default defaultTheme;","export default '$$material';","'use client';\n\nimport { useThemeProps as systemUseThemeProps } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport default function useThemeProps({\n props,\n name\n}) {\n return systemUseThemeProps({\n props,\n name,\n defaultTheme,\n themeId: THEME_ID\n });\n}","'use client';\n\nimport { createStyled, shouldForwardProp } from '@mui/system';\nimport defaultTheme from './defaultTheme';\nimport THEME_ID from './identifier';\nexport const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';\nexport const slotShouldForwardProp = shouldForwardProp;\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"inheritViewBox\", \"titleAccess\", \"viewBox\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport { getSvgIconUtilityClass } from './svgIconClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3;\n return {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n // the will define the property that has `currentColor`\n // e.g. heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',\n flexShrink: 0,\n transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {\n duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter\n }),\n fontSize: {\n inherit: 'inherit',\n small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',\n medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',\n large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'\n }[ownerState.fontSize],\n // TODO v5 deprecate, v6 remove for sx\n color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : {\n action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active,\n disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled,\n inherit: undefined\n }[ownerState.color]\n };\n});\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = _extends({}, props, {\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n });\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, more, other, hasSvgAsChild && children.props, {\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', '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 fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\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 * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport SvgIcon from '../SvgIcon';\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, _extends({\n \"data-testid\": `${displayName}Icon`,\n ref: ref\n }, props, {\n children: path\n }));\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));\n}","'use client';\n\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/base/ClassNameGenerator';\nexport { default as capitalize } from './capitalize';\nexport { default as createChainedFunction } from './createChainedFunction';\nexport { default as createSvgIcon } from './createSvgIcon';\nexport { default as debounce } from './debounce';\nexport { default as deprecatedPropType } from './deprecatedPropType';\nexport { default as isMuiElement } from './isMuiElement';\nexport { default as ownerDocument } from './ownerDocument';\nexport { default as ownerWindow } from './ownerWindow';\nexport { default as requirePropFactory } from './requirePropFactory';\nexport { default as setRef } from './setRef';\nexport { default as unstable_useEnhancedEffect } from './useEnhancedEffect';\nexport { default as unstable_useId } from './useId';\nexport { default as unsupportedProp } from './unsupportedProp';\nexport { default as useControlled } from './useControlled';\nexport { default as useEventCallback } from './useEventCallback';\nexport { default as useForkRef } from './useForkRef';\nexport { default as useIsFocusVisible } from './useIsFocusVisible';\n// TODO: remove this export once ClassNameGenerator is stable\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const unstable_ClassNameGenerator = {\n configure: generator => {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(['MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.', '', \"You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead\", '', 'The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401', '', 'The updated documentation: https://mui.com/guides/classname-generator/'].join('\\n'));\n }\n ClassNameGenerator.configure(generator);\n }\n};","\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\nvar _utils = require(\"@mui/material/utils\");","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m10 17 5-5-5-5z\"\n}), 'ArrowRight');","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nexport function isHostComponent(element) {\n return typeof element === 'string';\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { isHostComponent } from './isHostComponent';\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nexport function appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return _extends({}, otherProps, {\n ownerState: _extends({}, otherProps.ownerState, ownerState)\n });\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}","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nexport function extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nexport function resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nexport function omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport clsx from 'clsx';\nimport { extractEventHandlers } from './extractEventHandlers';\nimport { omitEventHandlers } from './omitEventHandlers';\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nexport function mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}","'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}","import { globalStateClasses } from '@mui/utils/generateUtilityClass';\nconst GLOBAL_CLASS_PREFIX = 'base';\nfunction buildStateClass(state) {\n return `${GLOBAL_CLASS_PREFIX}--${state}`;\n}\nfunction buildSlotClass(componentName, slot) {\n return `${GLOBAL_CLASS_PREFIX}-${componentName}-${slot}`;\n}\nexport function generateUtilityClass(componentName, slot) {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? buildStateClass(globalStateClass) : buildSlotClass(componentName, slot);\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import { generateUtilityClass } from '../generateUtilityClass';\nexport function generateUtilityClasses(componentName, slots) {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot);\n });\n return result;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://mui.com/base-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://mui.com/base-ui/react-portal/components-api/#portal)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n // @ts-expect-error TODO upstream fix\n const handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? children.ref : null, forwardedRef);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(forwardedRef, mountNode);\n return () => {\n setRef(forwardedRef, null);\n };\n }\n return undefined;\n }, [forwardedRef, mountNode, disablePortal]);\n if (disablePortal) {\n if ( /*#__PURE__*/React.isValidElement(children)) {\n const newProps = {\n ref: handleRef\n };\n return /*#__PURE__*/React.cloneElement(children, newProps);\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: children\n });\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport { Portal };","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];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","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 };","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 { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","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 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 { 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}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\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 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 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 default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\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}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\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};","export default function getVariation(placement) {\n return placement.split('-')[1];\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 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};","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 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}","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\";\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 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 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}","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 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 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 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 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 { 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 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};","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};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\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 getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\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}","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 { 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}","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 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 };","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 { generateUtilityClass } from '../generateUtilityClass';\nimport { generateUtilityClasses } from '../generateUtilityClasses';\nconst COMPONENT_NAME = 'Popper';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass(COMPONENT_NAME, slot);\n}\nexport const popperClasses = generateUtilityClasses(COMPONENT_NAME, ['root']);","'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 the TypeScript types and run `pnpm 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 * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 };","'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}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default {\n disabled: false\n};","import PropTypes from 'prop-types';\nexport var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n enter: PropTypes.number,\n exit: PropTypes.number,\n appear: PropTypes.number\n}).isRequired]) : null;\nexport var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string,\n active: PropTypes.string\n}), PropTypes.shape({\n enter: PropTypes.string,\n enterDone: PropTypes.string,\n enterActive: PropTypes.string,\n exit: PropTypes.string,\n exitDone: PropTypes.string,\n exitActive: PropTypes.string\n})]) : null;","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n var _style$transitionDura, _style$transitionTimi;\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: (_style$transitionDura = style.transitionDuration) != null ? _style$transitionDura : typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,\n easing: (_style$transitionTimi = style.transitionTimingFunction) != null ? _style$transitionTimi : typeof easing === 'object' ? easing[options.mode] : easing,\n delay: style.transitionDelay\n };\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"addEndListener\", \"appear\", \"children\", \"easing\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { elementAcceptingRef, unstable_useTimeout as useTimeout } from '@mui/utils';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps, reflow } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n\n/*\n TODO v6: remove\n Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.\n */\nconst isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\\/)15(.|_)4/i.test(navigator.userAgent);\n\n/**\n * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and\n * [Popover](/material-ui/react-popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const timer = useTimeout();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, children.ref, ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay: isWebKit154 ? delay : delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = 0;\n node.style.transform = getScale(0.75);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTimeout.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n }\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"anchorEl\", \"component\", \"components\", \"componentsProps\", \"container\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"transition\", \"slots\", \"slotProps\"];\nimport { Popper as BasePopper } from '@mui/base/Popper';\nimport { useThemeWithoutDefault as useTheme } from '@mui/system';\nimport { HTMLElementType, refType } from '@mui/utils';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { styled, useThemeProps } from '../styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n name: 'MuiPopper',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://mui.com/material-ui/react-menu/)\n * - [Popper](https://mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n var _slots$root;\n const theme = useTheme();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPopper'\n });\n const {\n anchorEl,\n component,\n components,\n componentsProps,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;\n const otherProps = _extends({\n anchorEl,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition\n }, other);\n return /*#__PURE__*/_jsx(PopperRoot, _extends({\n as: component,\n direction: theme == null ? void 0 : theme.direction,\n slots: {\n root: RootComponent\n },\n slotProps: slotProps != null ? slotProps : componentsProps\n }, otherProps, {\n ref: ref\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 the TypeScript types and run `pnpm 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: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\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 components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\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 * 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 * 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 * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"arrow\", \"children\", \"classes\", \"components\", \"componentsProps\", \"describeChild\", \"disableFocusListener\", \"disableHoverListener\", \"disableInteractive\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"followCursor\", \"id\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"slotProps\", \"slots\", \"title\", \"TransitionComponent\", \"TransitionProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementAcceptingRef, unstable_useTimeout as useTimeout, unstable_Timeout as Timeout } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses, appendOwnerState } from '@mui/base';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport capitalize from '../utils/capitalize';\nimport Grow from '../Grow';\nimport Popper from '../Popper';\nimport useEventCallback from '../utils/useEventCallback';\nimport useForkRef from '../utils/useForkRef';\nimport useId from '../utils/useId';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useControlled from '../utils/useControlled';\nimport tooltipClasses, { getTooltipUtilityClass } from './tooltipClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(({\n theme,\n ownerState,\n open\n}) => _extends({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none'\n}, !ownerState.disableInteractive && {\n pointerEvents: 'auto'\n}, !open && {\n pointerEvents: 'none'\n}, ownerState.arrow && {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {\n left: 0,\n marginLeft: '-0.71em'\n } : {\n right: 0,\n marginRight: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n }),\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: _extends({}, !ownerState.isRtl ? {\n right: 0,\n marginRight: '-0.71em'\n } : {\n left: 0,\n marginLeft: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n })\n}));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.arrow && {\n position: 'relative',\n margin: 0\n}, ownerState.touch && {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n}, {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: _extends({\n transformOrigin: 'right center'\n }, !ownerState.isRtl ? _extends({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n }) : _extends({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n })),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: _extends({\n transformOrigin: 'left center'\n }, !ownerState.isRtl ? _extends({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n }) : _extends({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n })),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: _extends({\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n }, ownerState.touch && {\n marginBottom: '24px'\n }),\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: _extends({\n transformOrigin: 'center top',\n marginTop: '14px'\n }, ownerState.touch && {\n marginTop: '24px'\n })\n}));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n}));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return event => {\n if (eventHandler) {\n eventHandler(event);\n }\n handler(event);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n var _ref, _slots$popper, _ref2, _ref3, _slots$transition, _ref4, _slots$tooltip, _ref5, _slots$arrow, _slotProps$popper, _ref6, _slotProps$popper2, _slotProps$transition, _slotProps$tooltip, _ref7, _slotProps$tooltip2, _slotProps$arrow, _ref8, _slotProps$arrow2;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp = Grow,\n TransitionProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleEnter = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = useIsFocusVisible();\n // We don't necessarily care about the focusVisible state (which is safe to access via ref anyway).\n // We just need to re-render the Tooltip if the focus-visible state changes.\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n handleBlurVisible(event);\n if (isFocusVisibleRef.current === false) {\n setChildIsFocusVisible(false);\n handleLeave(event);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n handleFocusVisible(event);\n if (isFocusVisibleRef.current === true) {\n setChildIsFocusVisible(true);\n handleEnter(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleMouseOver = handleEnter;\n const handleMouseLeave = handleLeave;\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleEnter(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Bink?) use 'Esc'\n if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = _extends({}, nameOrDescProps, other, children.props, {\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n }, followCursor ? {\n onMouseMove: handleMouseMove\n } : {});\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const popperOptions = React.useMemo(() => {\n var _PopperProps$popperOp;\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if ((_PopperProps$popperOp = PopperProps.popperOptions) != null && _PopperProps$popperOp.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n return _extends({}, PopperProps.popperOptions, {\n modifiers: tooltipModifiers\n });\n }, [arrowRef, PopperProps]);\n const ownerState = _extends({}, props, {\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n });\n const classes = useUtilityClasses(ownerState);\n const PopperComponent = (_ref = (_slots$popper = slots.popper) != null ? _slots$popper : components.Popper) != null ? _ref : TooltipPopper;\n const TransitionComponent = (_ref2 = (_ref3 = (_slots$transition = slots.transition) != null ? _slots$transition : components.Transition) != null ? _ref3 : TransitionComponentProp) != null ? _ref2 : Grow;\n const TooltipComponent = (_ref4 = (_slots$tooltip = slots.tooltip) != null ? _slots$tooltip : components.Tooltip) != null ? _ref4 : TooltipTooltip;\n const ArrowComponent = (_ref5 = (_slots$arrow = slots.arrow) != null ? _slots$arrow : components.Arrow) != null ? _ref5 : TooltipArrow;\n const popperProps = appendOwnerState(PopperComponent, _extends({}, PopperProps, (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper, {\n className: clsx(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_ref6 = (_slotProps$popper2 = slotProps.popper) != null ? _slotProps$popper2 : componentsProps.popper) == null ? void 0 : _ref6.className)\n }), ownerState);\n const transitionProps = appendOwnerState(TransitionComponent, _extends({}, TransitionProps, (_slotProps$transition = slotProps.transition) != null ? _slotProps$transition : componentsProps.transition), ownerState);\n const tooltipProps = appendOwnerState(TooltipComponent, _extends({}, (_slotProps$tooltip = slotProps.tooltip) != null ? _slotProps$tooltip : componentsProps.tooltip, {\n className: clsx(classes.tooltip, (_ref7 = (_slotProps$tooltip2 = slotProps.tooltip) != null ? _slotProps$tooltip2 : componentsProps.tooltip) == null ? void 0 : _ref7.className)\n }), ownerState);\n const tooltipArrowProps = appendOwnerState(ArrowComponent, _extends({}, (_slotProps$arrow = slotProps.arrow) != null ? _slotProps$arrow : componentsProps.arrow, {\n className: clsx(classes.arrow, (_ref8 = (_slotProps$arrow2 = slotProps.arrow) != null ? _slotProps$arrow2 : componentsProps.arrow) == null ? void 0 : _ref8.className)\n }), ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperComponent, _extends({\n as: PopperComponentProp != null ? PopperComponentProp : Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true\n }, interactiveWrapperListeners, popperProps, {\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionComponent, _extends({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, transitionProps, {\n children: /*#__PURE__*/_jsxs(TooltipComponent, _extends({}, tooltipProps, {\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowComponent, _extends({}, tooltipArrowProps, {\n ref: setArrowRef\n })) : null]\n }))\n }))\n }))]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.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 `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `slots` prop.\n * It's recommended to use the `slots` prop instead.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `slotProps` prop.\n * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @default Popper\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](/material-ui/api/popper/) element.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: 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 * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","import '@/components/mui/menu-item.component.css';\nimport ArrowRightIcon from '@mui/icons-material/ArrowRight';\nimport {\n ListItemIcon as MuiListItemIcon,\n ListItemText as MuiListItemText,\n MenuItem as MuiMenuItem,\n} from '@mui/material';\nimport Tooltip from '@mui/material/Tooltip';\nimport { Localized, ReferencedItem, SingleColumnMenu } from 'platform-bible-utils';\nimport { MouseEvent, PropsWithChildren } from 'react';\n\ntype MenuItemInfoBase = {\n /** Text (displayable in the UI) as the name of the menu item */\n label: string;\n /** Text to display when the mouse hovers over the menu item */\n tooltip?: string;\n};\n\nexport type Command = MenuItemInfoBase & {\n /** Command to execute (string.string) */\n command: string;\n};\n\ntype SubMenu = MenuItemInfoBase & {\n /** Command to execute (string.string) */\n items: MenuItemInfo[];\n};\n\nexport interface CommandHandler {\n (command: Command): void;\n}\n\nexport type MenuPropsBase = {\n /*\n * The JSON defining the menu whose items are to be rendered. This will typically be one of the\n * menus in the \"defs\" in a Platform.Bible menu (see PlatformMenus). The schema for this is\n * menuDocumentSchema (at the end of menus.model.ts). Note that while this is a\n * \"SingleColumnMenu\", somewhat bizarrely, a MultiColumnMenu is a SingleColumnMenu, so it really\n * could be a MultiColumnMenu, in which case, column had better be defined so it can be used\n * to filter out the actual groups and items to display on the column.\n */\n menuDefinition: Localized;\n\n commandHandler: CommandHandler;\n\n /**\n * Additional action to perform when any menu item is clicked. Allows the caller to handle event\n * (e.g., to close the menu).\n */\n onClick?: (event: MouseEvent) => void;\n};\n\nexport type MenuItemListProps = MenuPropsBase & {\n /** Optional unique (column) identifier */\n columnId?: ReferencedItem;\n};\n\nexport type MenuItemProps = Omit &\n PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n\n onClick: (event: MouseEvent) => void;\n }>;\n\ntype MenuItemInfo = (Command | SubMenu) & {\n /**\n * If specified, menu item will be inset if it does not have a leading icon.\n *\n * @default true\n */\n allowForLeadingIcons?: boolean;\n /**\n * If specified, the path to the icon image to display on the leading side of the menu text.\n *\n * @default undefined (no leading icon will be shown)\n */\n iconPathBefore?: string;\n /**\n * If specified, the path to the icon image to display on the trailing side of the menu text.\n *\n * @default undefined (no trailing icon will be shown)\n */\n iconPathAfter?: string;\n /**\n * If true, list item is focused during the first mount\n *\n * @default false\n */\n hasAutoFocus?: boolean;\n\n /** Additional css classes to help with unique styling of the menu item */\n className?: string;\n\n /**\n * If true, the menu item will appear disabled and it will not respond to clicks or mouse hovers.\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * If true, compact vertical padding designed for keyboard and mouse input is used.\n *\n * @default true\n */\n isDense?: boolean;\n\n /**\n * If true, a right-arrow icon will be displayed (iconPathAfter, if specified, will be ignored).\n *\n * @default false\n */\n isSubMenuParent?: boolean;\n\n /**\n * If true, the left and right padding is removed\n *\n * @default false\n */\n hasDisabledGutters?: boolean;\n\n /**\n * If true, a 1px light border is added to bottom of menu item\n *\n * @default false\n */\n hasDivider?: boolean;\n\n /** Help identify which element has keyboard focus */\n focusVisibleClassName?: string;\n\n /** If it's a submenu, it should have the items property */\n items?: MenuItemInfo[];\n};\n\nfunction getIcon(icon: string | undefined, menuLabel: string, leading: boolean) {\n return icon ? (\n \n {`${leading\n \n ) : undefined;\n}\n\nexport default function MenuItem(props: MenuItemProps) {\n const {\n onClick,\n label,\n tooltip,\n allowForLeadingIcons = true,\n iconPathBefore = undefined,\n iconPathAfter = undefined,\n hasAutoFocus = false,\n className,\n isDisabled = false,\n isDense = true,\n isSubMenuParent = false,\n hasDisabledGutters = false,\n hasDivider = false,\n focusVisibleClassName,\n id,\n children,\n } = props;\n\n const menuItem = (\n \n {label ? (\n <>\n {getIcon(iconPathBefore, label, true)}\n \n {isSubMenuParent ? (\n \n \n \n ) : (\n getIcon(iconPathAfter, label, false)\n )}\n \n ) : (\n children\n )}\n \n );\n\n return tooltip ? (\n \n
{menuItem}
\n
\n ) : (\n menuItem\n );\n}\n","import MenuItem, {\n MenuItemListProps,\n MenuItemProps,\n MenuPropsBase,\n} from '@/components/mui/menu-item.component';\nimport { Menu } from '@mui/material';\nimport {\n Localized,\n MenuGroupDetailsInSubMenu,\n MenuItemContainingCommand,\n MenuItemContainingSubmenu,\n OrderedExtensibleContainer,\n ReferencedItem,\n SingleColumnMenu,\n} from 'platform-bible-utils';\nimport { MouseEvent, useMemo, useState } from 'react';\n\n/**\n * All the exported types in this file should be regarded as \"internal\" (i.e., they should not be\n * exposed via index.ts).\n */\n\nexport type GroupedMenuPropsBase = MenuPropsBase & {\n /** Optional unique (column) identifier */\n columnId?: ReferencedItem;\n};\n\nexport type GroupedMenuItemListProps = MenuItemListProps & {\n /**\n * If the menuDefinition includes \"top-level\" groups (i.e., those that belong to a column as\n * opposed to those that belong to a submenu) that should not be included in the list, then this\n * array specifies which groups to include. Likewise, for a submenu, this list indicates which\n * groups are pertinent for that submenu. So then for a context menu this property need not be\n * specified since it is a top-level menu based on a \"true\" SingleColumnMenu (i.e., one that is\n * not a MultiColumnMenu).\n */\n includedGroups?: {\n id: string;\n group: Localized;\n }[];\n};\n\ninterface ItemInfo {\n item: Localized;\n isLastItemInGroup: boolean;\n}\n\ntype SubMenuProps = MenuPropsBase & {\n parentMenuItem: Localized;\n parentItemProps: Omit, 'iconPathAfter'>;\n};\n\nfunction getAllGroups(menuDefinition: Localized) {\n const groupEntries = Object.entries(menuDefinition.groups);\n // Convert array of entries to array of objects with id and group properties\n return groupEntries.map(([key, value]) => ({ id: key, group: value }));\n}\n\nfunction SubMenu(props: SubMenuProps) {\n const [anchorEl, setAnchorEl] = useState(undefined);\n\n const { parentMenuItem, parentItemProps, menuDefinition } = props;\n\n const handleParentMenuItemClick = (event: MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(undefined);\n };\n\n const renderSubMenuItems = () => {\n let includedGroups = getAllGroups(menuDefinition).filter((g) => 'menuItem' in g.group);\n\n // Ensure valid parent menu was provided. (If not, submenu will contain all groups!)\n if (!parentMenuItem?.id) throw new Error('A valid parent menu item is required for submenus.');\n\n // When laying out a submenu, only include groups associated with the provided parent menu.\n // Note: without the (annoying) redundant check that the included groups\n // have the menuItem field, TS doesn't think it exists.\n includedGroups = includedGroups.filter(\n (group) => 'menuItem' in group.group && group.group.menuItem === parentMenuItem.id,\n );\n\n return ;\n };\n\n return (\n <>\n \n \n {renderSubMenuItems()}\n \n \n );\n}\n\nconst getOrderedGroupItems = (\n groupId: string,\n allItems: Localized[],\n) => {\n // Filter items that belong to the specified group\n const itemsForGroup = allItems.filter((item) => item.group === groupId);\n // Sort items based on order\n const sortedItems = itemsForGroup.sort((a, b) => (a.order || 0) - (b.order || 0));\n return sortedItems;\n};\n\n/**\n * This component is internal; it does not need to be exposed to the outside world since it is not\n * useful on its own. It is used to generate and lay out the MenuItems that appear either on a\n * top-level menu (in a GridMenu or ContextMenu) or in a submenu.\n */\nexport default function GroupedMenuItemList(menuProps: GroupedMenuItemListProps) {\n const { menuDefinition, onClick, commandHandler, includedGroups } = menuProps;\n\n const { items, allowForLeadingIcons } = useMemo(() => {\n const groupsToInclude =\n includedGroups && includedGroups.length > 0\n ? includedGroups\n : // We're apparently laying out a single-column menu (presumably a context menu). In this\n // case, all groups should be included except ones that belong to a submenu.\n getAllGroups(menuDefinition).filter((g) => !('menuItem' in g.group));\n\n const sortedGroups = Object.values(groupsToInclude).sort(\n (a, b) => (a.group.order || 0) - (b.group.order || 0),\n );\n\n const itemArray: ItemInfo[] = [];\n\n sortedGroups.forEach((group) => {\n getOrderedGroupItems(group.id, menuDefinition.items).forEach((item) =>\n itemArray.push({ item, isLastItemInGroup: false }),\n );\n if (itemArray.length > 0) itemArray[itemArray.length - 1].isLastItemInGroup = true;\n });\n\n // No divider after last item in final group.\n if (itemArray.length > 0) itemArray[itemArray.length - 1].isLastItemInGroup = false;\n\n const allowSpaceForLeadingIcons = itemArray.some(\n (i) => 'iconPathBefore' in i.item && i.item.iconPathBefore,\n );\n\n return { items: itemArray, allowForLeadingIcons: allowSpaceForLeadingIcons };\n }, [includedGroups, menuDefinition]);\n\n // Create props for MenuItem component including setting hasDivider for the last item in a group\n const createMenuItemProps = ({ item, isLastItemInGroup }: ItemInfo) => {\n const menuItemProps = {\n className: 'papi-menu-item',\n label: item.label,\n tooltip: item.tooltip,\n iconPathBefore: 'iconPathBefore' in item ? item.iconPathBefore : undefined,\n iconPathAfter: 'iconPathAfter' in item ? item.iconPathAfter : undefined,\n hasDivider: isLastItemInGroup, // Set hasDivider to true for the last item in a group\n allowForLeadingIcons,\n };\n\n return menuItemProps;\n };\n\n const [firstItem] = items;\n\n if (!firstItem) return
;\n\n const divKey = firstItem.item.group;\n\n return (\n
\n {items.map((itemInfo, index) => {\n const { item } = itemInfo;\n const menuItemProps = createMenuItemProps(itemInfo);\n if ('command' in item) {\n const key = item.group + index;\n return (\n ) => {\n onClick?.(event);\n commandHandler(item);\n }}\n {...menuItemProps}\n />\n );\n }\n return (\n \n );\n })}\n
\n );\n}\n","import GroupedMenuItemList from '@/components/mui/grouped-menu-item-list.component';\nimport { MenuItemListProps } from '@/components/mui/menu-item.component';\nimport { MultiColumnMenu } from 'platform-bible-utils';\n\n/**\n * This component is internal; it does not need to be exposed to the outside world since it is not\n * useful on its own. Use either GridMenu or ContextMenu.\n */\nexport default function TopLevelMenu(props: MenuItemListProps) {\n const { menuDefinition, columnId } = props;\n\n const groupEntries = Object.entries(menuDefinition.groups);\n // Convert array of entries to array of objects with id and group properties\n const groups = groupEntries.map(([key, value]) => ({ id: key, group: value }));\n let includedGroups = groups.filter((g) => 'column' in g.group);\n\n // Check if column is provided and menuDefinition is a MultiColumnMenu\n if (\n columnId &&\n 'columns' in menuDefinition &&\n // Without this type assertion, TS doesn't know what columns is.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n (menuDefinition as MultiColumnMenu).columns[columnId]\n ) {\n // When laying out a single column in a MultiColumnMenu, only include groups associated with\n // the provided column. Note: without the (annoying) redundant check that the included groups\n // have the colum field, TS doesn't think it exists.\n includedGroups = includedGroups.filter(\n (g) => 'column' in g.group && g.group.column === columnId,\n );\n }\n\n return ;\n}\n","import '@/components/mui/grid-menu.component.css';\nimport { GroupedMenuPropsBase } from '@/components/mui/grouped-menu-item-list.component';\nimport { CommandHandler } from '@/components/mui/menu-item.component';\nimport TopLevelMenu from '@/components/mui/top-level-menu.component';\nimport { Grid, List } from '@mui/material';\nimport {\n Localized,\n MenuColumnWithHeader,\n MultiColumnMenu,\n ReferencedItem,\n} from 'platform-bible-utils';\nimport { useMemo } from 'react';\n\ntype ColumnInfo = {\n /*\n * The ID (`${string}.${string}`) of a specific menu column.\n */\n id: ReferencedItem;\n\n /*\n * Metadata (label, order, etc.) for a specific menu column.\n */\n metadata: Localized;\n};\n\ntype MenuColumnProps = ColumnInfo &\n GroupedMenuPropsBase & {\n /** Additional css classes to help with unique styling of the menu column */\n className?: string;\n };\n\nexport type GridMenuInfo = {\n /** The menu object containing information about the columns, groups, and items to display. */\n multiColumnMenu: Localized;\n};\n\nexport type GridMenuProps = GridMenuInfo & {\n /** Optional unique identifier */\n id?: string;\n\n commandHandler: CommandHandler;\n\n /** Additional css classes to help with unique styling of the grid menu */\n className?: string;\n};\n\nfunction MenuColumn({\n commandHandler,\n menuDefinition,\n id,\n metadata,\n onClick,\n className,\n}: MenuColumnProps) {\n return (\n \n

\n {metadata.label}\n

\n {/* It would seem as though this List component were unnecessary, since it only contains one\n thing, but the \"dense\" property does affect the layout of the items (in a way I don't fully\n understand). There might be a better way. */}\n \n \n \n \n );\n}\n\nexport default function GridMenu({\n commandHandler,\n className,\n multiColumnMenu,\n id,\n}: GridMenuProps) {\n const { columns } = multiColumnMenu;\n\n const sortedColumns = useMemo(() => {\n const columnNumbers = new Map();\n Object.getOwnPropertyNames(columns).forEach((columnName: string) => {\n // We know for sure there is a (boolean) property 'isExtensible' that we are not interested in.\n if (columnName === 'isExtensible') return;\n // TS doesn't allow `columnName` above to be a ReferencedItem even though the type says it is\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const columnId = columnName as ReferencedItem;\n const column = columns[columnId];\n // As of right now (and hopefully forever after), all remaining properties of the\n // ColumnsWithHeaders object are columns whose property names are the IDs of the columns.\n // This is an additional (redundant) sanity check. Specifically we're interested in\n // MenuColumnWithHeader objects, which TypeScript now \"knows\" we have, but at runtime all we\n // can check for is that it's an object with a valid numeric order field. That's likely good\n // enough.\n if (\n typeof column === 'object' &&\n typeof column.order === 'number' &&\n !Number.isNaN(column.order)\n )\n columnNumbers.set(column.order, { id: columnId, metadata: column });\n else\n console.warn(\n `Property ${columnName} (${typeof column}) on menu ${id} is not a valid column and is being ignored. This might indicate data corruption`,\n );\n });\n\n // Extract values and sort them based on the 'order' property\n return Array.from(columnNumbers.values()).sort((a, b) => {\n return (a.metadata.order || 0) - (b.metadata.order || 0);\n });\n }, [columns, id]);\n\n // We might need something like this if we need to be able to prevent empty columns\n // sortedColumns.filter((c) => multiColumnMenu.groups.some((g) => 'column' in g && (g as .column)...\n\n return (\n \n {sortedColumns.map((col, index) => (\n \n ))}\n \n );\n}\n","import { useEffect, useRef, useState } from 'react';\n\nexport type UsePromiseOptions = {\n /**\n * Whether to leave the value as the most recent resolved promise value or set it back to\n * defaultValue while running the promise again. Defaults to true\n */\n preserveValue?: boolean;\n};\n\n/** Set up defaults for options for usePromise hook */\nfunction getUsePromiseOptionsDefaults(options: UsePromiseOptions): UsePromiseOptions {\n return {\n preserveValue: true,\n ...options,\n };\n}\n\n/**\n * Awaits a promise and returns a loading value while the promise is unresolved\n *\n * @param promiseFactoryCallback A function that returns the promise to await. If this callback is\n * undefined, the current value will be returned (defaultValue unless it was previously changed\n * and `options.preserveValue` is true), and there will be no loading.\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n * @param defaultValue The initial value to return while first awaiting the promise. If\n * `options.preserveValue` is false, this value is also shown while awaiting the promise on\n * subsequent calls.\n *\n * Note: this parameter is internally assigned to a `ref`, so changing it will not cause any hooks\n * to re-run with its new value. This means that, if the `promiseFactoryCallback` changes and\n * `options.preserveValue` is `false`, the returned value will be set to the current\n * `defaultValue`. However, the returned value will not be updated if`defaultValue` changes.\n * @param options Various options for adjusting how this hook runs the `promiseFactoryCallback`\n *\n * Note: this parameter is internally assigned to a `ref`, so changing it will not cause any hooks\n * to re-run with its new value. However, the latest `options.preserveValue` will always be used\n * appropriately to determine whether to preserve the returned value when changing the\n * `promiseFactoryCallback`\n * @returns `[value, isLoading]`\n *\n * - `value`: the current value for the promise, either the defaultValue or the resolved promise value\n * - `isLoading`: whether the promise is waiting to be resolved\n */\nconst usePromise = (\n promiseFactoryCallback: (() => Promise) | undefined,\n defaultValue: T,\n options: UsePromiseOptions = {},\n): [value: T, isLoading: boolean] => {\n // Use defaultValue as a ref so it doesn't update dependency arrays\n const defaultValueRef = useRef(defaultValue);\n defaultValueRef.current = defaultValue;\n // Use options as a ref so it doesn't update dependency arrays\n const optionsDefaultedRef = useRef(options);\n optionsDefaultedRef.current = getUsePromiseOptionsDefaults(optionsDefaultedRef.current);\n\n const [value, setValue] = useState(() => defaultValueRef.current);\n const [isLoading, setIsLoading] = useState(true);\n useEffect(() => {\n let promiseIsCurrent = true;\n // If a promiseFactoryCallback was provided, we are loading. Otherwise, there is no loading to do\n setIsLoading(!!promiseFactoryCallback);\n (async () => {\n // If there is a callback to run, run it\n if (promiseFactoryCallback) {\n const result = await promiseFactoryCallback();\n // If the promise was not already replaced, update the value\n if (promiseIsCurrent) {\n setValue(() => result);\n setIsLoading(false);\n }\n }\n })();\n\n return () => {\n // Mark this promise as old and not to be used\n promiseIsCurrent = false;\n if (!optionsDefaultedRef.current.preserveValue) setValue(() => defaultValueRef.current);\n };\n }, [promiseFactoryCallback]);\n\n return [value, isLoading];\n};\nexport default usePromise;\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: \"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z\"\n}), 'Menu');","import GridMenu from '@/components/mui/grid-menu.component';\nimport { Command, CommandHandler } from '@/components/mui/menu-item.component';\nimport usePromise from '@/hooks/use-promise.hook';\nimport { Menu as MenuIcon } from '@mui/icons-material';\nimport { Drawer, IconButton } from '@mui/material';\nimport { Localized, MultiColumnMenu } from 'platform-bible-utils';\nimport {\n MouseEvent,\n MutableRefObject,\n PropsWithChildren,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nexport interface MultiColumnMenuProvider {\n (isSupportAndDevelopment: boolean): Promise>;\n}\n\nexport type HamburgerMenuButtonProps = PropsWithChildren & {\n /** The handler to use for menu commands (and eventually toolbar commands). */\n commandHandler: CommandHandler;\n\n /**\n * Optional reference to the \"div\" container that determines the where the menu should appear. If\n * not defined, then (1,1) used.\n */\n containerRef?: MutableRefObject;\n\n /**\n * The delegate to use to get the menu data. If not specified or if it returns undefined, the data\n * in normalMenu or fullMenu property will be used.\n */\n menuProvider?: MultiColumnMenuProvider;\n\n /**\n * The menu data to show when the menu is opened if the menuProvider property is not defined.\n * (This allows for a default or test-only static menu to be used.)\n */\n normalMenu?: Localized;\n\n /**\n * The menu data to show for \"full\" menu (when opened with the SHIFT key pressed) if the\n * menuProvider property is not defined. (This allows for a default or test-only static menu to be\n * used.)\n */\n fullMenu?: Localized;\n\n /** Additional css class(es) to help with unique styling of the sub-components */\n className?: string;\n\n /** Value to use as prefix for ARIA labels on interactive sub-components */\n ariaLabelPrefix?: string;\n};\n\nexport default function HamburgerMenuButton({\n menuProvider,\n normalMenu,\n fullMenu,\n commandHandler,\n containerRef,\n className,\n ariaLabelPrefix,\n children,\n}: HamburgerMenuButtonProps) {\n const [isMenuOpen, setMenuOpen] = useState(false);\n const [showFullMenu, setShowFullMenu] = useState(false);\n\n const handleMenuItemClick = useCallback(() => {\n if (isMenuOpen) setMenuOpen(false);\n setShowFullMenu(false);\n }, [isMenuOpen]);\n\n const handleMenuButtonClick = useCallback((e: MouseEvent) => {\n e.stopPropagation();\n setMenuOpen((prevIsOpen) => {\n const isOpening = !prevIsOpen;\n if (isOpening && e.shiftKey) setShowFullMenu(true);\n else if (!isOpening) setShowFullMenu(false);\n return isOpening;\n });\n }, []);\n\n const menuCommandHandler = useCallback(\n (command: Command) => {\n handleMenuItemClick();\n return commandHandler(command);\n },\n [commandHandler, handleMenuItemClick],\n );\n\n const [offset, setOffset] = useState({ top: 1, left: 1 });\n\n useEffect(() => {\n if (isMenuOpen) {\n const node = containerRef?.current;\n if (node) {\n const rect = node.getBoundingClientRect();\n const scrollTop = window.scrollY;\n const scrollLeft = window.scrollX;\n const top = rect.top + scrollTop + node.clientHeight;\n const left = rect.left + scrollLeft;\n setOffset({ top, left });\n }\n }\n }, [isMenuOpen, containerRef]);\n\n const [normalMenuData] = usePromise(\n useCallback(async () => {\n return menuProvider?.(false) ?? normalMenu;\n // isMenuOpen needs to be included for the menu contents to reevaluate when reopened\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [menuProvider, normalMenu, isMenuOpen]),\n normalMenu,\n );\n\n const [fullMenuData] = usePromise(\n useCallback(async () => {\n return menuProvider?.(true) ?? fullMenu ?? normalMenuData;\n // isMenuOpen needs to be included for the menu contents to reevaluate when reopened\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [menuProvider, fullMenu, normalMenuData, isMenuOpen]),\n fullMenu ?? normalMenuData,\n );\n\n const menu = showFullMenu && fullMenuData ? fullMenuData : normalMenuData;\n\n return (\n <>\n \n {children ?? }\n \n \n {menu ? (\n \n ) : undefined}\n \n \n );\n}\n","import '@/components/mui/icon-button.component.css';\nimport { IconButton as MuiIconButton } from '@mui/material';\nimport { MouseEventHandler, PropsWithChildren } from 'react';\n\nexport type IconButtonProps = PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n /**\n * Required. Used as both the tooltip (aka, title) and the aria-label (used for accessibility,\n * testing, etc.), unless a distinct tooltip is supplied.\n */\n label: string;\n /**\n * Enabled status of button\n *\n * @default false\n */\n isDisabled?: boolean;\n /** Optional tooltip to display if different from the aria-label. */\n tooltip?: string;\n /** If true, no tooltip will be displayed. */\n isTooltipSuppressed?: boolean;\n /**\n * If given, uses a negative margin to counteract the padding on one side (this is often helpful\n * for aligning the left or right side of the icon with content above or below, without ruining\n * the border size and shape).\n *\n * @default false\n */\n adjustMarginToAlignToEdge?: 'end' | 'start' | false;\n /**\n * The size of the component. small is equivalent to the dense button styling.\n *\n * @default false\n */\n size: 'small' | 'medium' | 'large';\n /** Additional css classes to help with unique styling of the button */\n className?: string;\n /** Optional click handler */\n onClick?: MouseEventHandler;\n}>;\n\n/**\n * Iconic button a user can click to do something\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction IconButton({\n id,\n label,\n isDisabled = false,\n tooltip,\n isTooltipSuppressed = false,\n adjustMarginToAlignToEdge = false,\n size = 'medium',\n className,\n onClick,\n children,\n}: IconButtonProps) {\n return (\n \n {children /* the icon to display */}\n \n );\n}\n\nexport default IconButton;\n","import { cn } from '@/utils/shadcn-ui.util';\nimport { LoaderCircle, LucideProps } from 'lucide-react';\nimport { forwardRef } from 'react';\n\nexport type SpinnerProps = LucideProps;\n\nconst Spinner = forwardRef(({ className, ...props }, ref) => {\n return (\n \n );\n});\n\nSpinner.displayName = 'Spinner';\n\nexport default Spinner;\n","import { Input as ShadInput } from '@/components/shadcn-ui/input';\nimport { Label as ShadLabel } from '@/components/shadcn-ui/label';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { ChangeEventHandler, FocusEventHandler } from 'react';\n\nexport type TextFieldProps = {\n /** Optional unique identifier */\n id?: string;\n /**\n * If `true`, the component is disabled.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * If `true`, the label is displayed in an error state.\n *\n * @default false\n */\n hasError?: boolean;\n /**\n * If `true`, the input will take up the full width of its container.\n *\n * @default false\n */\n isFullWidth?: boolean;\n /** Text that gives the user instructions on what contents the TextField expects */\n helperText?: string;\n /** The title of the TextField */\n label?: string;\n /** The short hint displayed in the `input` before the user enters a value. */\n placeholder?: string;\n /**\n * If `true`, the label is displayed as required and the `input` element is required.\n *\n * @default false\n */\n isRequired?: boolean;\n /** Additional css classes to help with unique styling of the text field */\n className?: string;\n /** Starting value for the text field if it is not controlled */\n defaultValue?: string | number;\n /** Value of the text field if controlled */\n value?: string | number;\n /** Triggers when content of textfield is changed */\n onChange?: ChangeEventHandler;\n /** Triggers when textfield gets focus */\n onFocus?: FocusEventHandler;\n /** Triggers when textfield loses focus */\n onBlur?: FocusEventHandler;\n};\n\n/**\n * Text input field\n *\n * Thanks to Shadcn for heavy inspiration and documentation\n * https://ui.shadcn.com/docs/components/input#with-label\n */\nfunction TextField({\n id,\n isDisabled = false,\n hasError = false,\n isFullWidth = false,\n helperText,\n label,\n placeholder,\n isRequired = false,\n className,\n defaultValue,\n value,\n onChange,\n onFocus,\n onBlur,\n}: TextFieldProps) {\n return (\n
\n {`${label}${isRequired ? '*' : ''}`}\n \n

{helperText}

\n
\n );\n}\n\nexport default TextField;\n","import HamburgerMenuButton, {\n MultiColumnMenuProvider,\n} from '@/components/mui/hamburger-menu-button.component';\nimport { CommandHandler } from '@/components/mui/menu-item.component';\nimport '@/components/mui/toolbar.component.css';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { AppBar, Toolbar as MuiToolbar } from '@mui/material';\nimport { PropsWithChildren, useRef } from 'react';\n\nexport type ToolbarProps = PropsWithChildren<{\n /** The handler to use for menu commands (and eventually toolbar commands). */\n commandHandler: CommandHandler;\n\n /**\n * The optional delegate to use to get the menu data. If not specified, the \"hamburger\" menu will\n * not display.\n */\n menuProvider?: MultiColumnMenuProvider;\n\n /** Optional unique identifier */\n id?: string;\n\n /** Additional css classes to help with unique styling of the toolbar */\n className?: string;\n}>;\n\nexport default function Toolbar({\n menuProvider,\n commandHandler,\n className,\n id,\n children,\n}: ToolbarProps) {\n // This ref will always be defined\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n const containerRef = useRef(undefined!);\n\n return (\n
\n \n \n {menuProvider ? (\n \n ) : undefined}\n {children ?
{children}
: undefined}\n \n
\n
\n );\n}\n","import React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst alertVariants = cva(\n 'tw-relative tw-w-full tw-rounded-lg tw-border tw-p-4 [&>svg~*]:tw-pl-7 [&>svg+div]:tw-translate-y-[-3px] [&>svg]:tw-absolute [&>svg]:tw-left-4 [&>svg]:tw-top-4 [&>svg]:tw-text-foreground',\n {\n variants: {\n variant: {\n default: 'tw-bg-background tw-text-foreground',\n destructive:\n 'tw-border-destructive/50 tw-text-destructive dark:tw-border-destructive [&>svg]:tw-text-destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes & VariantProps\n>(({ className, variant, ...props }, ref) => (\n
\n));\nAlert.displayName = 'Alert';\n\nconst AlertTitle = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n {/* added because of https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md */}\n {props.children}{' '}\n \n ),\n);\nAlertTitle.displayName = 'AlertTitle';\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n
\n));\nAlertDescription.displayName = 'AlertDescription';\n\nexport { Alert, AlertTitle, AlertDescription };\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst badgeVariants = cva(\n 'tw-inline-flex tw-items-center tw-rounded-full tw-border tw-px-2.5 tw-py-0.5 tw-text-xs tw-font-semibold tw-transition-colors focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-ring focus:tw-ring-offset-2',\n {\n variants: {\n variant: {\n default:\n 'tw-border-transparent tw-bg-primary tw-text-primary-foreground hover:tw-bg-primary/80',\n secondary:\n 'tw-border-transparent tw-bg-secondary tw-text-secondary-foreground hover:tw-bg-secondary/80',\n muted: 'tw-border-transparent tw-bg-muted tw-text-muted-foreground hover:tw-bg-muted/80',\n destructive:\n 'tw-border-transparent tw-bg-destructive tw-text-destructive-foreground hover:tw-bg-destructive/80',\n outline: 'tw-text-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes,\n VariantProps {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return
;\n}\n\nexport { Badge, badgeVariants };\n","import React from 'react';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Card = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n {/* added because of https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md */}\n {props.children}\n \n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes\n>(({ className, ...props }, ref) => (\n

\n));\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef>(\n ({ className, ...props }, ref) => (\n

\n ),\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef>(\n ({ className, ...props }, ref) => (\n \n ),\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n","import { ComponentProps } from 'react';\nimport { toast as sonner, Toaster } from 'sonner';\n\ntype SonnerProps = ComponentProps;\n\nfunction Sonner({ ...props }: SonnerProps) {\n return (\n \n );\n}\n\n// The re-export of the sonner function was added manually\nexport { Sonner, sonner };\n","import React from 'react';\nimport * as SliderPrimitive from '@radix-ui/react-slider';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Slider = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n \n \n \n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n","import React from 'react';\nimport * as SwitchPrimitives from '@radix-ui/react-switch';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst Switch = React.forwardRef<\n React.ElementRef,\n React.ComponentPropsWithoutRef\n>(({ className, ...props }, ref) => (\n \n \n \n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n","import React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport type TabsListProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport type TabsContentProps = React.ComponentPropsWithoutRef & {\n className?: string;\n};\n\nexport const TabsList = React.forwardRef<\n React.ElementRef,\n TabsListProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nexport const TabsTrigger = React.forwardRef<\n React.ElementRef,\n TabsTriggerProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nexport const TabsContent = React.forwardRef<\n React.ElementRef,\n TabsContentProps\n>(({ className, ...props }, ref) => (\n \n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\nimport { Download } from 'lucide-react';\n\ntype InstallButtonProps = {\n /** The installing boolean value determines the state of the button. */\n isInstalling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n /** Optional text for the button. */\n buttonText?: string;\n} & ButtonProps;\n\n/**\n * The InstallButton component is a button designed for initiating installs. It includes visuals for\n * active installing and idle states.\n *\n * @param isInstalling The installing boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @param buttonText Optional text for the button.\n * @returns A install button.\n */\nexport default function InstallButton({\n isInstalling,\n handleClick,\n buttonText,\n className,\n ...props\n}: InstallButtonProps) {\n return (\n \n {isInstalling ? (\n \n ) : (\n <>\n \n {buttonText}\n \n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype EnableButtonProps = {\n /** The enabling boolean value determines the state of the button. */\n isEnabling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The EnableButton component is a button designed for initiating enabling of downloads. It includes\n * visuals for active enabling and idle states.\n *\n * @param isEnabling The enabling boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to enable.\n */\nexport default function EnableButton({\n isEnabling,\n handleClick,\n className,\n ...props\n}: EnableButtonProps) {\n return (\n \n {isEnabling ? (\n <>\n \n Enabling...\n \n ) : (\n 'Enable'\n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype DisableButtonProps = {\n /** The disabling boolean value determines the state of the button. */\n isDisabling: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The DisableButton component is a button designed for initiating disabling of downloads. It\n * includes visuals for active disabling and idle states.\n *\n * @param isDisabling The disabling boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to disable.\n */\nexport default function DisableButton({\n isDisabling,\n handleClick,\n className,\n ...props\n}: DisableButtonProps) {\n return (\n \n {isDisabling ? (\n <>\n \n Disabling...\n \n ) : (\n 'Disable'\n )}\n \n );\n}\n","import { Button, ButtonProps } from '@/components/shadcn-ui/button';\nimport Spinner from '@/components/basics/spinner.component';\nimport { cn } from '@/utils/shadcn-ui.util';\n\ntype UpdateButtonProps = {\n /** The updating boolean value determines the state of the button. */\n isUpdating: boolean;\n /** The handleClick function is called when the button is clicked. */\n handleClick: () => void;\n} & ButtonProps;\n\n/**\n * The UpdateButton component is a button designed for initiating updates for downloaded extensions.\n * It includes visuals for active updating and idle states.\n *\n * @param isUpdating The updating boolean value determines the state of the button.\n * @param handleClick The handleClick function is called when the button is clicked.\n * @returns A button that can be used to update.\n */\nexport default function UpdateButton({\n isUpdating,\n handleClick,\n className,\n ...props\n}: UpdateButtonProps) {\n return (\n \n {isUpdating ? (\n <>\n \n Updating...\n \n ) : (\n 'Update'\n )}\n \n );\n}\n","import { cn } from '@/utils/shadcn-ui.util';\nimport Markdown, { MarkdownToJSX } from 'markdown-to-jsx';\nimport { useMemo } from 'react';\n\ninterface MarkdownRendererProps {\n /** Optional unique identifier */\n id?: string;\n /** The markdown string to render */\n markdown: string;\n className?: string;\n /**\n * The [`target` attribute for `a` html\n * tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target). Defaults to not\n * adding a `target` to `a` tags\n */\n anchorTarget?: string;\n}\n\n/**\n * This component renders markdown content given a markdown string. It uses typography styles from\n * the platform.\n *\n * @param markdown The markdown string to render.\n * @param id Optional unique identifier\n * @returns A div containing the rendered markdown content.\n */\nexport default function MarkdownRenderer({\n id,\n markdown,\n className,\n anchorTarget,\n}: MarkdownRendererProps) {\n const options: MarkdownToJSX.Options = useMemo(\n () => ({\n overrides: {\n a: {\n props: {\n target: anchorTarget,\n },\n },\n },\n }),\n [anchorTarget],\n );\n return (\n
\n {markdown}\n
\n );\n}\n","import { Filter, ChevronDown } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { Button } from '@/components/shadcn-ui/button';\n\n/**\n * The FilterButton component is a button designed for initiating filtering of data. It is designed\n * to be used with the dropdown menu. It uses forwardRef to pass the button to the dropdown trigger\n * asChild.\n *\n * @returns A button that can be used to filter.\n */\nconst FilterButton = forwardRef((props, ref) => {\n return (\n \n \n Filter\n \n \n );\n});\n\nexport default FilterButton;\n","import {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuGroup,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport FilterButton from './buttons/filter-button.component';\n\nexport enum DropdownMenuItemType {\n Check,\n Radio,\n}\n\nexport type DropdownItem = {\n /** The label is the text that will be displayed on the dropdown item. */\n label: string;\n /** The itemType determines the DropdownMenuItemType type as either Check or Radio. */\n itemType: DropdownMenuItemType;\n /** The onClick function is called when the item is clicked. */\n onClick: () => void;\n};\n\nexport type DropdownGroup = {\n /**\n * The label is the text that will be displayed on the dropdown group. It is used to categorize\n * the items in the group.\n */\n label: string;\n /** The items array contains the items that will be displayed in the dropdown group */\n items: DropdownItem[];\n};\n\nexport type FilterDropdownProps = {\n /** Object unique identifier */\n id?: string;\n /** The groups array contains the groups that will be displayed in the dropdown */\n groups: DropdownGroup[];\n}; // TODO: extend the props later\n\n/**\n * The FilterDropdown component is a dropdown designed for filtering content. It includes groups of\n * items that can be checkboxes or radio items.\n *\n * @param id Optional unique identifier\n * @param groups The groups array contains the groups that will be displayed in the dropdown\n * @returns A filter dropdown.\n */\nexport default function FilterDropdown({ id, groups }: FilterDropdownProps) {\n return (\n
\n {/* TODO: remove this once the DropDown Menu shadcn has an id prop */}\n \n \n \n \n \n {groups.map((group) => (\n
\n {group.label}\n \n {group.items.map((item) => (\n
\n {item.itemType === DropdownMenuItemType.Check ? (\n \n {item.label}\n \n ) : (\n \n {item.label}\n \n )}\n
\n ))}\n
\n \n
\n ))}\n
\n
\n
\n );\n}\n","interface NoExtensionsFoundProps {\n /** Optional unique identifier */\n id?: string;\n /** The message to display */\n message: string;\n}\n/**\n * This component displays a message to the user when no extensions are found in the marketplace.\n *\n * @param id Optional unique identifier\n * @param message The message to display.\n * @returns {JSX.Element} - Returns the message component that displays the message to the user.\n */\nexport default function NoExtensionsFound({ id, message }: NoExtensionsFoundProps) {\n return (\n
\n
\n

{message}

\n
\n
\n );\n}\n","import { CircleHelp, Link as LucideLink, User } from 'lucide-react';\nimport { NumberFormat } from 'platform-bible-utils';\n\n/** Interface that stores the parameters passed to the More Info component */\ninterface MoreInfoProps {\n /** Optional unique identifier */\n id?: string;\n /** The category of the extension */\n category: string;\n /** The number of downloads for the extension */\n downloads: Record;\n /** The languages supported by the extension */\n languages: string[];\n /** The URL to the more info page of the extension */\n moreInfoUrl: string;\n}\n/**\n * This component displays the more info section of the extension which includes the category,\n * number of downloads, languages, and links to the website and support\n *\n * @param id Optional unique identifier\n * @param category The category of the extension\n * @param downloads The number of downloads for the extension\n * @param languages The languages supported by the extension\n * @param moreInfoUrl The URL to the more info page of the extension\n * @returns {JSX.Element} - Returns the more info component that displays the category, number of\n * downloads, languages, and links to the website and support\n */\nexport default function MoreInfo({\n id,\n category,\n downloads,\n languages,\n moreInfoUrl,\n}: MoreInfoProps) {\n /**\n * This constant formats the number of downloads into a more readable format.\n *\n * @example 1000 -> 1K\n *\n * @example 1000000 -> 1M\n *\n * @returns The formatted number of downloads\n */\n const numberFormatted = new NumberFormat('en', {\n notation: 'compact',\n compactDisplay: 'short',\n }).format(Object.values(downloads).reduce((a: number, b: number) => a + b, 0));\n\n /** This function scrolls the window to the bottom of the page. */\n const handleScrollToBottom = () => {\n window.scrollTo(0, document.body.scrollHeight);\n };\n\n return (\n \n
\n
\n {category}\n
\n CATEGORY\n
\n
\n
\n
\n \n {numberFormatted}\n
\n USERS\n
\n
\n
\n
\n {languages.slice(0, 3).map((locale) => (\n \n {locale.toUpperCase()}\n \n ))}\n
\n {languages.length > 3 && (\n handleScrollToBottom()}\n className=\"tw-text-xs tw-text-gray-500 tw-underline\"\n >\n +{languages.length - 3} more languages\n \n )}\n
\n
\n
\n \n Website\n \n \n \n Support\n \n \n
\n
\n );\n}\n","import { useState } from 'react';\n\nexport type VersionInformation = {\n /** Date the version was published */\n date: string;\n /** Description of the changes in the version */\n description: string;\n};\n\n/** Type to store the version history information */\nexport type VersionHistoryType = Record;\n\n/** Interface that stores the parameters passed to the Version History component */\ninterface VersionHistoryProps {\n /** Optional unique identifier */\n id?: string;\n /** Object containing the versions mapped with their information */\n versionHistory: VersionHistoryType;\n}\n\n/**\n * Component to render the version history information shown in the footer component. Lists the 5\n * most recent versions, with the options to show all versions by pressing a button.\n *\n * @param versionHistory Object containing the versions mapped with their information\n * @param id Optional unique identifier\n * @returns Rendered version history for the Footer component\n */\nexport default function VersionHistory({ id, versionHistory }: VersionHistoryProps) {\n const [showAllVersions, setShowAllVersions] = useState(false);\n const currentDate = new Date();\n\n /**\n * Function to format the time string for the version history in the form of 'X year(s) ago'.\n *\n * @param dateString ISO Date string to determine the time string from\n * @returns Formatted time string\n */\n function formatTimeString(dateString: string) {\n const date = new Date(dateString);\n const dateDiff = new Date(currentDate.getTime() - date.getTime());\n const yearDiff = dateDiff.getUTCFullYear() - 1970;\n const monthDiff = dateDiff.getUTCMonth();\n const dayDiff = dateDiff.getUTCDate() - 1;\n\n // Determines how long ago the version was published\n let timeString = '';\n if (yearDiff > 0) {\n timeString = `${yearDiff.toString()} year${yearDiff === 1 ? '' : 's'} ago`;\n } else if (monthDiff > 0) {\n timeString = `${monthDiff.toString()} month${monthDiff === 1 ? '' : 's'} ago`;\n } else if (dayDiff === 0) {\n timeString = 'today';\n } else {\n timeString = `${dayDiff.toString()} day${dayDiff === 1 ? '' : 's'} ago`;\n }\n\n return timeString;\n }\n\n // Sorts the version history by version number\n const sortedEntries = Object.entries(versionHistory).sort((a, b) => b[0].localeCompare(a[0]));\n\n return (\n
\n

What`s New

\n
    \n {(showAllVersions ? sortedEntries : sortedEntries.slice(0, 5)).map((entry) => (\n
    \n
    \n
  • \n {entry[1].description}\n
  • \n
    \n
    \n
    Version {entry[0]}
    \n
    {formatTimeString(entry[1].date)}
    \n
    \n
    \n ))}\n
\n {sortedEntries.length > 5 && (\n setShowAllVersions(!showAllVersions)}\n className=\"tw-text-xs tw-text-gray-500 tw-underline\"\n >\n {showAllVersions ? 'Show Less Version History' : 'Show All Version History'}\n \n )}\n
\n );\n}\n","import { useMemo } from 'react';\nimport { formatBytes } from 'platform-bible-utils';\nimport VersionHistory, { VersionHistoryType } from './version-history.component';\n\n/** Interface to store the parameters passed to the Footer component */\ninterface FooterProps {\n /** Optional unique identifier */\n id?: string;\n /** Name of the publisher */\n publisherDisplayName: string;\n /** Size of the extension file in bytes */\n fileSize: number;\n /** List of language codes supported by the extension */\n locales: string[];\n /** Object containing the version history mapped with their information */\n versionHistory: VersionHistoryType;\n}\n\n/**\n * Component to render the footer for the extension details which contains information on the\n * publisher, version history, languages, and file size.\n *\n * @param id Optional unique identifier\n * @param publisherDisplayName Name of the publisher\n * @param fileSize Size of the extension file in bytes\n * @param locales List of language codes supported by the extension\n * @param versionHistory Object containing the version history mapped with their information\n * @returns The rendered Footer component\n */\nexport default function Footer({\n id,\n publisherDisplayName,\n fileSize,\n locales,\n versionHistory,\n}: FooterProps) {\n /** Formats the file size into a human-readable format */\n const formattedFileSize = useMemo(() => formatBytes(fileSize), [fileSize]);\n\n /**\n * This function gets the display names of the languages based on the language codes.\n *\n * @param codes The list of language codes\n * @returns The list of language names\n */\n const getLanguageNames = (codes: string[]) => {\n const displayNames = new Intl.DisplayNames(navigator.language, { type: 'language' });\n return codes.map((code) => displayNames.of(code));\n };\n\n const languageNames = getLanguageNames(locales);\n\n return (\n
\n
\n \n
\n
\n

Information

\n
\n

\n Publisher\n {publisherDisplayName}\n Size\n {formattedFileSize}\n

\n
\n

\n Languages\n {languageNames.join(', ')}\n

\n
\n
\n
\n
\n
\n );\n}\n","import ComboBox from '@/components/basics/combo-box.component';\nimport Spinner from '@/components/basics/spinner.component';\nimport { Button } from '@/components/shadcn-ui/button';\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@/components/shadcn-ui/card';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/components/shadcn-ui/dropdown-menu';\nimport { Input } from '@/components/shadcn-ui/input';\nimport { Label } from '@/components/shadcn-ui/label';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/components/shadcn-ui/table';\nimport {\n BookOpen,\n ChevronDown,\n ChevronsUpDown,\n ChevronUp,\n Ellipsis,\n Loader,\n Search,\n} from 'lucide-react';\n\nimport {\n DblResourceData,\n getErrorMessage,\n LanguageStrings,\n LocalizeKey,\n ResourceType,\n} from 'platform-bible-utils';\nimport { useEffect, useMemo, useState } from 'react';\n\nexport const FILTERABLE_RESOURCE_LIST_STRING_KEYS: LocalizeKey[] = [\n '%resources_action%',\n '%resources_dialog_subtitle%',\n '%resources_dialog_title%',\n '%resources_filterInput%',\n '%resources_fullName%',\n '%resources_get%',\n '%resources_installed%',\n '%resources_language%',\n '%resources_languageFilter%',\n '%resources_loadingResources%',\n '%resources_noResults%',\n '%resources_open%',\n '%resources_remove%',\n '%resources_size%',\n '%resources_type%',\n '%resources_type_DBL%',\n '%resources_type_ER%',\n '%resources_type_SLR%',\n '%resources_type_XR%',\n '%resources_type_unknown%',\n '%resources_update%',\n];\n\ntype InstallInfo = {\n dblEntryUid: string;\n action: 'installing' | 'removing';\n};\n\ntype SortConfig = {\n key: 'fullName' | 'bestLanguageName';\n direction: 'ascending' | 'descending';\n};\n\ntype TypeOptions = {\n type: ResourceType;\n localizedValue: string;\n};\n\nconst getLanguageOptions = (\n dblResources: DblResourceData[],\n languageFilter: string[],\n): string[] => {\n const sortedLanguages = Array.from(\n new Set(dblResources.map((resource) => resource.bestLanguageName)),\n );\n\n const prioritizedLanguages = new Set(\n languageFilter.concat(\n dblResources\n .filter((resource) => resource.installed)\n .map((resource) => resource.bestLanguageName),\n ),\n );\n\n return sortedLanguages.sort((a, b) => {\n const aIsPrioritized = prioritizedLanguages.has(a);\n const bIsPrioritized = prioritizedLanguages.has(b);\n\n if (aIsPrioritized && bIsPrioritized) {\n return a.localeCompare(b);\n }\n if (aIsPrioritized) return -1;\n if (bIsPrioritized) return 1;\n\n return a.localeCompare(b);\n });\n};\n\nconst getActionButtonContent = (\n resource: DblResourceData,\n buttonText: string,\n installResource: (dblEntryUid: string, action: 'install' | 'remove') => void,\n) => {\n return (\n \n );\n};\n\nconst getActionContent = (\n resource: DblResourceData,\n idsBeingHandled: string[],\n getText: string,\n updateText: string,\n installedText: string,\n installResource: (dblEntryUid: string, action: 'install' | 'remove') => void,\n) => {\n const isBeingHandled = idsBeingHandled.includes(resource.dblEntryUid);\n if (isBeingHandled) {\n return (\n \n );\n }\n if (!resource.installed) {\n return getActionButtonContent(resource, getText, installResource);\n }\n if (resource.updateAvailable) {\n return getActionButtonContent(resource, updateText, installResource);\n }\n return ;\n};\n\ntype FilterableResourceListProps = {\n localizedStrings: LanguageStrings;\n dblResources: DblResourceData[];\n isLoadingDblResources: boolean;\n typeFilter: ResourceType[];\n setTypeFilter: (stateValue: ResourceType[]) => void;\n languageFilter: string[];\n setLanguageFilter: (stateValue: string[]) => void;\n openResource: (projectId: string) => void;\n installResource: ((uid: string) => Promise) | undefined;\n uninstallResource: ((uid: string) => Promise) | undefined;\n};\n\nfunction FilterableResourceList({\n localizedStrings,\n dblResources,\n isLoadingDblResources,\n typeFilter,\n setTypeFilter,\n languageFilter,\n setLanguageFilter,\n openResource,\n installResource,\n uninstallResource,\n}: FilterableResourceListProps) {\n const actionText: string = localizedStrings['%resources_action%'];\n const dialogSubtitleText: string = localizedStrings['%resources_dialog_subtitle%'];\n const dialogTitleText: string = localizedStrings['%resources_dialog_title%'];\n const filterInputText: string = localizedStrings['%resources_filterInput%'];\n const fullNameText: string = localizedStrings['%resources_fullName%'];\n const getText: string = localizedStrings['%resources_get%'];\n const installedText: string = localizedStrings['%resources_installed%'];\n const languageText: string = localizedStrings['%resources_language%'];\n const languageFilterText: string = localizedStrings['%resources_languageFilter%'];\n const loadingResourcesText: string = localizedStrings['%resources_loadingResources%'];\n const noResultsText: string = localizedStrings['%resources_noResults%'];\n const openText: string = localizedStrings['%resources_open%'];\n const removeText: string = localizedStrings['%resources_remove%'];\n const sizeText: string = localizedStrings['%resources_size%'];\n const typeText: string = localizedStrings['%resources_type%'];\n const typeDblText: string = localizedStrings['%resources_type_DBL%'];\n const typeErText: string = localizedStrings['%resources_type_ER%'];\n const typeSlrText: string = localizedStrings['%resources_type_SLR%'];\n const typeXrText: string = localizedStrings['%resources_type_XR%'];\n const typeUnknownText: string = localizedStrings['%resources_type_unknown%'];\n const updateText: string = localizedStrings['%resources_update%'];\n\n const [installInfo, setInstallInfo] = useState([]);\n\n const installOrRemoveResource = (dblEntryUid: string, action: 'install' | 'remove'): void => {\n if (!installResource || !uninstallResource) return;\n const newInstallInfo: InstallInfo = {\n dblEntryUid,\n action: action === 'install' ? 'installing' : 'removing',\n };\n\n setInstallInfo((prevInfo) => [...prevInfo, newInstallInfo]);\n\n const actionFunction = action === 'install' ? installResource : uninstallResource;\n\n actionFunction(dblEntryUid).catch((error) => {\n console.debug(getErrorMessage(error));\n });\n };\n\n /** Removes resources from array of resources that are currently being handled */\n useEffect(() => {\n setInstallInfo((currentInstallInfo) =>\n currentInstallInfo.filter((info) => {\n const resource = dblResources.find((res) => res.dblEntryUid === info.dblEntryUid);\n\n if (!resource) return true;\n\n if (info.action === 'installing' && resource.installed) return false;\n if (info.action === 'removing' && !resource.installed) return false;\n\n return true;\n }),\n );\n }, [dblResources]);\n\n const [textFilter, setTextFilter] = useState('');\n\n const textFilteredResources = useMemo(() => {\n return dblResources.filter((resource) => {\n const filter = textFilter.toLowerCase();\n return (\n resource.displayName.toLowerCase().includes(filter) ||\n resource.fullName.toLowerCase().includes(filter) ||\n resource.bestLanguageName.toLowerCase().includes(filter)\n );\n });\n }, [dblResources, textFilter]);\n\n const typeOptions: TypeOptions[] = useMemo(() => {\n return [\n { type: 'DBLResource', localizedValue: typeDblText },\n { type: 'EnhancedResource', localizedValue: typeErText },\n { type: 'SourceLanguageResource', localizedValue: typeSlrText },\n { type: 'XmlResource', localizedValue: typeXrText },\n ];\n }, [typeDblText, typeErText, typeSlrText, typeXrText]);\n\n const typeFilterChangeHandler = (newType: ResourceType): void => {\n const prevTypeFilter: ResourceType[] = [...typeFilter];\n let newTypeFilter: ResourceType[] = [];\n\n if (!prevTypeFilter || prevTypeFilter.length === 0) {\n newTypeFilter = [newType];\n } else {\n newTypeFilter = prevTypeFilter.includes(newType)\n ? prevTypeFilter.filter((value) => value !== newType)\n : [...prevTypeFilter, newType];\n }\n setTypeFilter(newTypeFilter);\n };\n\n const textAndTypeFilteredResources = useMemo(() => {\n return textFilteredResources.filter((resource) => {\n return typeFilter.includes(resource.type);\n });\n }, [textFilteredResources, typeFilter]);\n\n useEffect(() => {\n if (languageFilter.length === 0) {\n setLanguageFilter(\n dblResources\n .filter((resource) => resource.installed === true)\n .map((resource) => resource.bestLanguageName),\n );\n }\n }, [dblResources, languageFilter.length, setLanguageFilter]);\n\n const languageFilterChangeHandler = (newLanguage: string): void => {\n const prevLanguageFilter: string[] = [...languageFilter];\n let newLanguageFilter: string[] = [];\n\n if (!prevLanguageFilter || prevLanguageFilter.length === 0) {\n newLanguageFilter = [newLanguage];\n } else {\n newLanguageFilter = prevLanguageFilter.includes(newLanguage)\n ? prevLanguageFilter.filter((value) => value !== newLanguage)\n : [...prevLanguageFilter, newLanguage];\n }\n setLanguageFilter(newLanguageFilter);\n };\n\n const textAndTypeAndLanguageFilteredResources = useMemo(() => {\n return textAndTypeFilteredResources.filter((resource) => {\n return languageFilter.includes(resource.bestLanguageName);\n });\n }, [languageFilter, textAndTypeFilteredResources]);\n\n const [sortConfig, setSortConfig] = useState({\n key: 'bestLanguageName',\n direction: 'ascending',\n });\n\n const sortedResources = useMemo(() => {\n return [...textAndTypeAndLanguageFilteredResources].sort((a, b) => {\n const aValue = a[sortConfig.key];\n const bValue = b[sortConfig.key];\n\n if (aValue < bValue) {\n return sortConfig.direction === 'ascending' ? -1 : 1;\n }\n if (aValue > bValue) {\n return sortConfig.direction === 'ascending' ? 1 : -1;\n }\n return 0;\n });\n }, [sortConfig.direction, sortConfig.key, textAndTypeAndLanguageFilteredResources]);\n\n const handleSort = (key: SortConfig['key']) => {\n const newSortConfig: SortConfig = { key, direction: 'ascending' };\n if (sortConfig.key === key && sortConfig.direction === 'ascending') {\n newSortConfig.direction = 'descending';\n }\n setSortConfig(newSortConfig);\n };\n\n return (\n \n \n
\n \n
\n {dialogTitleText}\n {dialogSubtitleText}\n
\n
\n
\n \n {isLoadingDblResources || !dblResources ? (\n
\n \n \n
\n ) : (\n
\n
\n
\n setTextFilter(event.target.value)}\n value={textFilter}\n placeholder={filterInputText}\n />\n \n
\n \n \n \n \n \n {typeOptions.map((option) => (\n {\n e.preventDefault();\n typeFilterChangeHandler(option.type);\n }}\n >\n {option.localizedValue}\n \n ))}\n \n \n \n
\n\n {sortedResources.length === 0 ? (\n
\n \n
\n ) : (\n \n \n \n \n \n handleSort('fullName')}>\n
\n {fullNameText}\n {sortConfig.key !== 'fullName' && (\n \n )}\n {sortConfig.key === 'fullName' &&\n (sortConfig.direction === 'ascending' ? (\n \n ) : (\n \n ))}\n
\n
\n handleSort('bestLanguageName')}>\n
\n {languageText}\n {sortConfig.key !== 'bestLanguageName' && (\n \n )}\n {sortConfig.key === 'bestLanguageName' &&\n (sortConfig.direction === 'ascending' ? (\n \n ) : (\n \n ))}\n
\n
\n {typeText}\n {sizeText}\n {actionText}\n
\n
\n \n {sortedResources.map((resource) => (\n \n \n \n \n {resource.displayName}\n {resource.fullName}\n {resource.bestLanguageName}\n \n {typeOptions.find((type) => type.type === resource.type)?.localizedValue ??\n typeUnknownText}\n \n {resource.size}\n \n
\n {getActionContent(\n resource,\n installInfo.map((info) => info.dblEntryUid),\n getText,\n updateText,\n installedText,\n installOrRemoveResource,\n )}\n {resource.installed && (\n \n \n \n \n \n openResource(resource.projectId)}>\n {openText}\n \n\n \n \n installOrRemoveResource(resource.dblEntryUid, 'remove')\n }\n >\n {removeText}\n \n \n \n )}\n
\n
\n
\n ))}\n
\n
\n )}\n
\n )}\n
\n
\n );\n}\n\nexport default FilterableResourceList;\n","import { PlatformEvent, PlatformEventHandler } from 'platform-bible-utils';\nimport { useEffect } from 'react';\n\n/**\n * Adds an event handler to an event so the event handler runs when the event is emitted. Use\n * `papi.network.getNetworkEvent` to use a networked event with this hook.\n *\n * @param event The event to subscribe to.\n *\n * - If event is a `PlatformEvent`, that event will be used\n * - If event is undefined, the callback will not be subscribed. Useful if the event is not yet\n * available for example\n *\n * @param eventHandler The callback to run when the event is emitted\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n */\nconst useEvent = (\n event: PlatformEvent | undefined,\n eventHandler: PlatformEventHandler,\n) => {\n useEffect(() => {\n // Do nothing if the event is not provided (in case the event is not yet available, for example)\n if (!event) return () => {};\n\n const unsubscriber = event(eventHandler);\n return () => {\n unsubscriber();\n };\n }, [event, eventHandler]);\n};\nexport default useEvent;\n","import { useCallback, useEffect } from 'react';\nimport { PlatformEvent, PlatformEventAsync, PlatformEventHandler } from 'platform-bible-utils';\nimport usePromise from './use-promise.hook';\n\nconst noopUnsubscriber = () => false;\n\n/**\n * Adds an event handler to an asynchronously subscribing/unsubscribing event so the event handler\n * runs when the event is emitted. Use `papi.network.getNetworkEvent` to use a networked event with\n * this hook.\n *\n * @param event The asynchronously (un)subscribing event to subscribe to.\n *\n * - If event is a `PlatformEvent` or `PlatformEventAsync`, that event will be used\n * - If event is undefined, the callback will not be subscribed. Useful if the event is not yet\n * available for example\n *\n * @param eventHandler The callback to run when the event is emitted\n *\n * WARNING: MUST BE STABLE - const or wrapped in useCallback. The reference must not be updated\n * every render\n */\nconst useEventAsync = (\n event: PlatformEvent | PlatformEventAsync | undefined,\n eventHandler: PlatformEventHandler,\n) => {\n // Subscribe to the event asynchronously\n const [unsubscribe] = usePromise(\n useCallback(async () => {\n // Do nothing if the event is not provided (in case the event is not yet available, for example)\n if (!event) return noopUnsubscriber;\n\n // Wrap subscribe and unsubscribe in promises to allow normal events to be used as well\n const unsub = await Promise.resolve(event(eventHandler));\n return async () => unsub();\n }, [eventHandler, event]),\n noopUnsubscriber,\n // We want the unsubscriber to return to default value immediately upon changing subscription\n // So the useEffect below will unsubscribe asap\n { preserveValue: false },\n );\n\n // Unsubscribe from the event asynchronously (but we aren't awaiting the unsub)\n useEffect(() => {\n return () => {\n if (unsubscribe !== noopUnsubscriber) {\n unsubscribe();\n }\n };\n }, [unsubscribe]);\n};\n\nexport default useEventAsync;\n"],"names":["twMergeCustom","extendTailwindMerge","cn","inputs","clsx","Input","React","className","type","props","ref","jsx","BookChapterInput","forwardRef","handleSearch","handleKeyDown","handleOnClick","handleSubmit","jsxs","ShadInput","event","e","History","P","R","t","s","n","N","B","O","S","K","g","k","x","T","X","V","w","L","G","A","H","C","I","y","q","U","m","l","h","c","E","D","i","a","o","u","v","f","d","b","p","J","DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","inset","children","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","BookMenuItem","bookId","handleSelectBook","isSelected","handleHighlightBook","bookType","ShadDropdownMenuItem","Canon","ChapterSelect","handleSelectChapter","endChapter","activeChapter","highlightedChapter","handleHighlightedChapter","chapters","_","handleMouse","useCallback","chapterNumber","chapter","GoToMenuItem","handleSort","handleLocationHistory","handleBookmarks","ShadDropdownMenuLabel","ArrowDownWideNarrow","Clock","Bookmark","ALL_BOOK_IDS","BOOK_TYPE_LABELS","BOOK_TYPE_ARRAY","SCROLL_OFFSET","SEARCH_QUERY_FORMATS","fetchGroupedBooks","fetchEndChapter","getChaptersForBook","getAllEnglishNames","isValidBookEnglishName","bookName","getBookIdFromEnglishName","formattedBookName","BookChapterControl","scrRef","searchQuery","setSearchQuery","useState","selectedBookId","setSelectedBookId","setHighlightedChapter","highlightedBookId","setHighlightedBookId","isContentOpen","setIsContentOpen","isContentOpenDelayed","setIsContentOpenDelayed","inputRef","useRef","contentRef","menuItemRef","fetchFilteredBooks","englishNameLowerCase","normalizedQuery","handleSearchInput","searchString","shouldPreventAutoClosing","controlMenuState","open","updateReference","shouldClose","verse","handleInputSubmit","format","matches","book","englishName","handleKeyDownInput","handleKeyDownContent","key","handleKeyDownMenuItem","chapterOffSet","useEffect","useLayoutEffect","scrollTimeout","scrollPosition","ShadDropdownMenu","ShadDropdownMenuTrigger","ShadDropdownMenuContent","bookTypeIndex","element","ShadDropdownMenuSeparator","buttonVariants","cva","Button","variant","size","asChild","Slot","labelVariants","Label","LabelPrimitive","RadioGroup","RadioGroupPrimitive","RadioGroupItem","Popover","PopoverPrimitive","PopoverTrigger","PopoverContent","align","DialogPortal","DialogPrimitive","DialogOverlay","DialogContent","DialogTitle","DialogDescription","Command","CommandPrimitive","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","getOptionLabelDefault","option","ComboBox","id","options","value","onChange","getOptionLabel","icon","buttonPlaceholder","textPlaceholder","commandEmptyMessage","buttonVariant","alignDropDown","dir","isDisabled","setOpen","ChevronsUpDown","ChapterRangeSelector","startChapter","handleSelectStartChapter","handleSelectEndChapter","chapterCount","chapterOptions","useMemo","index","Fragment","BookSelectionMode","BOOK_SELECTOR_STRING_KEYS","localizeString","strings","BookSelector","handleBookSelectionModeChange","currentBookName","onSelectBooks","selectedBookIds","localizedStrings","currentBookText","chooseText","chooseBooksText","bookSelectionMode","setBookSelectionMode","onSelectionModeChange","newMode","DataTableViewOptions","table","FilterIcon","column","Select","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","SelectSeparator","DataTablePagination","pageSize","ArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","ArrowRightIcon","Table","stickyHeader","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","DataTable","columns","data","enablePagination","showPaginationControls","showColumnVisibilityControls","onRowClickHandler","sorting","setSorting","columnFilters","setColumnFilters","columnVisibility","setColumnVisibility","rowSelection","setRowSelection","useReactTable","getCoreRowModel","getPaginationRowModel","getSortedRowModel","getFilteredRowModel","headerGroup","header","flexRender","_a","row","cell","OccurrencesTable","occurrenceData","setScriptureReference","referenceHeaderText","occurrenceHeaderText","occurrences","uniqueOccurrences","occurrence","uniqueOccurrence","deepEqual","Checkbox","CheckboxPrimitive","getLinesFromUSFM","text","getNumberFromUSFM","regex","match","getBookNumFromId","getStatusForItem","item","approvedItems","unapprovedItems","toggleVariants","Toggle","TogglePrimitive","ToggleGroupContext","ToggleGroup","ToggleGroupPrimitive","ToggleGroupItem","context","getSortingIcon","sortDirection","ArrowUpIcon","ArrowDownIcon","ArrowUpDownIcon","inventoryItemColumn","itemLabel","inventoryAdditionalItemColumn","additionalItemLabel","additionalItemIndex","inventoryCountColumn","countLabel","statusChangeHandler","changedItems","newStatus","onApprovedItemsChange","onUnapprovedItemsChange","newApprovedItems","validItem","newUnapprovedItems","unapprovedItem","inventoryStatusColumn","statusLabel","status","CircleCheckIcon","CircleXIcon","CircleHelpIcon","INVENTORY_STRING_KEYS","filterItemData","itemData","statusFilter","textFilter","filteredItemData","createTableData","scriptureRef","itemRegex","tableData","currentBook","currentChapter","currentVerse","line","items","itemIndex","existingItem","tableEntry","newReference","substring","newItem","Inventory","scriptureReference","extractItems","additionalItemsLabels","scope","onScopeChange","allItemsText","approvedItemsText","unapprovedItemsText","unknownItemsText","scopeBookText","scopeChapterText","scopeVerseText","filterText","showAdditionalItemsText","showAdditionalItems","setShowAdditionalItems","setStatusFilter","setTextFilter","selectedItem","setSelectedItem","reducedTableData","newTableData","firstItem","existingEntry","newTableEntry","filteredTableData","allColumns","numberOfAdditionalItems","additionalColumns","_b","rowClickHandler","newSelection","handleScopeChange","handleStatusFilterChange","MultiSelectComboBox","entries","getEntriesCount","selected","placeholder","customSelectedText","sortSelected","handleSelect","getPlaceholderText","sortedOptions","starredItems","opt","nonStarredItems","aSelected","bSelected","count","Star","SearchBar","onSearch","isFullWidth","handleInputChange","VerticalTabs","TabsPrimitive","VerticalTabsList","VerticalTabsTrigger","VerticalTabsContent","NavigationContentSearch","tabList","searchPlaceholder","headerTitle","isSearchBarFullWidth","direction","tab","scrBookColId","scrRefColId","typeColId","detailsColId","defaultScrRefColumnName","defaultScrBookGroupName","defaultTypeColumnName","defaultDetailsColumnName","getColumns","colInfo","showSourceColumn","showSrcCol","info","formatScrRef","compareScrRefs","toRefOrRange","scriptureSelection","offsetStart","offsetEnd","scrRefToBBBCCCVVV","getRowKey","ScriptureResultsViewer","sources","showColumnHeaders","scriptureReferenceColumnName","scriptureBookGroupName","typeColumnName","detailsColumnName","onRowSelected","grouping","setGrouping","scriptureResults","source","getExpandedRowModel","getGroupedRowModel","selectedRows","keys","selectedRow","scrBookGroupName","typeGroupName","groupingOptions","handleSelectChange","selectedGrouping","handleRowClick","getEvenOrOddBandingStyle","getIndent","groupingState","rowIndex","ChevronLeft","DEFAULT_SCROLL_GROUP_LOCALIZED_STRINGS","getLocalizeKeyForScrollGroupId","ScrollGroupSelector","availableScrollGroupIds","scrollGroupId","onChangeScrollGroupId","localizedStringsDefaulted","localizedStringKey","localizedStringValue","newScrollGroupString","scrollGroupOptionId","Separator","orientation","decorative","SeparatorPrimitive","SettingsList","SettingsListItem","primary","secondary","isLoading","loadingMessage","SettingsListHeader","includeSeparator","Checklist","listItems","selectedListItems","handleSelectListItem","createLabel","_interopRequireDefault","obj","module","chainPropTypes","propType1","propType2","args","_extends","target","isPlainObject","prototype","deepClone","output","deepmerge","r","z","reactIs_production_min","hasSymbol","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","isValidElementType","typeOf","object","$$typeof","$$typeofType","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","hasWarnedAboutDeprecatedIsAsyncMode","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","reactIs_development","reactIsModule","require$$0","require$$1","getOwnPropertySymbols","hasOwnProperty","propIsEnumerable","toObject","val","shouldUseNative","test1","test2","order2","test3","letter","objectAssign","from","to","symbols","ReactPropTypesSecret","ReactPropTypesSecret_1","has","printWarning","loggedTypeFailures","message","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","error","err","ex","stack","checkPropTypes_1","ReactIs","assign","require$$2","require$$3","require$$4","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","iteratorFn","ANONYMOUS","ReactPropTypes","createPrimitiveTypeChecker","createAnyTypeChecker","createArrayOfTypeChecker","createElementTypeChecker","createElementTypeTypeChecker","createInstanceTypeChecker","createNodeChecker","createObjectOfTypeChecker","createEnumTypeChecker","createUnionTypeChecker","createShapeTypeChecker","createStrictShapeTypeChecker","is","PropTypeError","createChainableTypeChecker","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","propName","propFullName","secret","cacheKey","chainedCheckType","expectedType","propValue","propType","getPropType","preciseType","getPreciseType","typeChecker","expectedClass","expectedClassName","actualClassName","getClassName","expectedValues","valuesString","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","expectedTypesMessage","isNode","invalidValidatorError","shapeTypes","allKeys","iterator","step","entry","isSymbol","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","isClassComponent","elementType","acceptingRef","safePropName","warningHint","elementAcceptingRef","PropTypes","elementAcceptingRef$1","specialProperty","exactProp","propTypes","unsupportedProps","prop","formatMuiErrorMessage","code","url","REACT_SERVER_CONTEXT_TYPE","REACT_OFFSCREEN_TYPE","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","SuspenseList","hasWarnedAboutDeprecatedIsConcurrentMode","isSuspenseList","fnNameMatchRegex","getFunctionName","fn","getFunctionComponentName","Component","fallback","getWrappedName","outerType","innerType","wrapperName","functionName","getDisplayName","HTMLElementType","refType","refType$1","capitalize","string","_formatMuiErrorMessage","createChainedFunction","funcs","acc","func","debounce","wait","timeout","debounced","later","deprecatedPropType","validator","reason","componentNameSafe","propFullNameSafe","isMuiElement","muiNames","_muiName","_element$type","ownerDocument","node","ownerWindow","requirePropFactory","componentNameInError","prevPropTypes","requiredProp","defaultTypeChecker","typeCheckerResult","setRef","useEnhancedEffect","useEnhancedEffect$1","globalId","useGlobalId","idOverride","defaultId","setDefaultId","maybeReactUseId","useId","reactId","unsupportedProp","useControlled","controlled","defaultProp","name","state","isControlled","valueState","setValue","defaultValue","setValueIfUncontrolled","newValue","useEventCallback","useForkRef","refs","instance","UNINITIALIZED","useLazyRef","init","initArg","EMPTY","useOnMount","Timeout","delay","useTimeout","hadKeyboardEvent","hadFocusVisibleRecently","hadFocusVisibleRecentlyTimeout","inputTypesWhitelist","focusTriggersKeyboardModality","tagName","handlePointerDown","handleVisibilityChange","prepare","doc","isFocusVisible","useIsFocusVisible","isFocusVisibleRef","handleBlurVisible","handleFocusVisible","resolveProps","defaultProps","defaultSlotProps","slotProps","slotPropName","composeClasses","slots","getUtilityClass","classes","slot","utilityClass","defaultGenerator","createClassNameGenerator","generate","generator","ClassNameGenerator","ClassNameGenerator$1","globalStateClasses","generateUtilityClass","globalStatePrefix","globalStateClass","generateUtilityClasses","result","clamp","min","max","_objectWithoutPropertiesLoose","excluded","sourceKeys","_excluded","sortBreakpointsValues","breakpointsAsArray","breakpoint1","breakpoint2","createBreakpoints","breakpoints","unit","other","sortedValues","up","down","between","start","end","endIndex","only","not","keyIndex","shape","shape$1","responsivePropType","responsivePropType$1","merge","defaultBreakpoints","handleBreakpoints","styleFromPropValue","theme","themeBreakpoints","breakpoint","mediaKey","cssKey","createEmptyBreakpointObject","breakpointsInput","_breakpointsInput$key","breakpointStyleKey","removeUnusedBreakpoints","breakpointKeys","style","breakpointOutput","getPath","path","checkVars","getStyleValue","themeMapping","transform","propValueFinal","userValue","cssProperty","themeKey","memoize","cache","arg","properties","directions","aliases","getCssProperties","property","marginKeys","paddingKeys","spacingKeys","createUnaryUnit","_getPath","themeSpacing","abs","createUnarySpacing","getValue","transformer","transformed","getStyleFromPropValue","cssProperties","resolveCssProperty","margin","padding","createSpacing","spacingInput","spacing","argsInput","argument","compose","styles","handlers","borderTransform","createBorderStyle","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outline","outlineColor","borderRadius","gap","columnGap","rowGap","gridColumn","gridRow","gridAutoFlow","gridAutoColumns","gridAutoRows","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridArea","paletteTransform","color","bgcolor","backgroundColor","sizingTransform","width","maxWidth","_props$theme","_props$theme2","breakpointsValues","minWidth","height","maxHeight","minHeight","boxSizing","defaultSxConfig","defaultSxConfig$1","objectsHaveSameKeys","objects","union","callIfFn","maybeFn","unstable_createStyleFunctionSx","getThemeValue","config","styleFunctionSx","_theme$unstable_sxCon","sx","traverse","sxInput","sxObject","emptyBreakpoints","breakpointsKeys","css","styleKey","styleFunctionSx$1","applyStyles","createTheme","paletteInput","shapeInput","muiTheme","isObjectEmpty","useTheme","defaultTheme","contextTheme","ThemeContext","systemDefaultTheme","useThemeWithoutDefault","_excluded2","_excluded3","isEmpty","isStringTag","tag","shouldForwardProp","lowercaseFirstLetter","resolveTheme","themeId","defaultOverridesResolver","processStyleArg","callableStyle","_ref","ownerState","resolvedStylesArg","resolvedStyle","variants","isMatch","createStyled","input","rootShouldForwardProp","slotShouldForwardProp","systemSx","inputOptions","processStyles","componentSlot","inputSkipVariantsResolver","inputSkipSx","overridesResolver","skipVariantsResolver","skipSx","label","shouldForwardPropOption","defaultStyledResolver","styledEngineStyled","transformStyleArg","stylesArg","muiStyledResolver","styleArg","expressions","transformedStyleArg","expressionsWithDefaultTheme","styleOverrides","resolvedStyleOverrides","slotKey","slotStyle","_theme$components","themeVariants","numOfCustomFnsApplied","placeholders","displayName","getThemeProps","params","useThemeProps","clampWrapper","hexToRgb","re","colors","decomposeColor","marker","colorSpace","recomposeColor","hslToRgb","rgb","getLuminance","getContrastRatio","foreground","background","lumA","lumB","alpha","darken","coefficient","lighten","createMixins","mixins","common","common$1","grey","grey$1","purple","purple$1","red","red$1","orange","orange$1","blue","blue$1","lightBlue","lightBlue$1","green","green$1","light","dark","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","getDefaultPrimary","mode","getDefaultSecondary","getDefaultError","getDefaultInfo","getDefaultSuccess","getDefaultWarning","createPalette","palette","contrastThreshold","success","warning","getContrastText","contrastText","contrast","augmentColor","mainShade","lightShade","darkShade","modes","round","caseAllCaps","defaultFontFamily","createTypography","typography","fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem2","coef","pxToRem","buildVariant","fontWeight","lineHeight","letterSpacing","casing","shadowKeyUmbraOpacity","shadowKeyPenumbraOpacity","shadowAmbientShadowOpacity","createShadow","px","shadows","shadows$1","easing","duration","formatMs","milliseconds","getAutoHeightDuration","constant","createTransitions","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","isString","isNumber","animatedProp","zIndex","zIndex$1","mixinsInput","transitionsInput","typographyInput","systemTheme","systemCreateTheme","stateClasses","component","child","stateClass","defaultTheme$1","THEME_ID","systemUseThemeProps","styled","styled$1","getSvgIconUtilityClass","useUtilityClasses","SvgIconRoot","_theme$transitions","_theme$transitions$cr","_theme$transitions2","_theme$typography","_theme$typography$pxT","_theme$typography2","_theme$typography2$px","_theme$typography3","_theme$typography3$px","_palette$ownerState$c","_palette","_palette2","_palette3","SvgIcon","inProps","htmlColor","inheritViewBox","titleAccess","viewBox","hasSvgAsChild","more","_jsxs","_jsx","SvgIcon$1","createSvgIcon","unstable_ClassNameGenerator","exports","_utils","ArrowRight","default_1","_createSvgIcon","_jsxRuntime","isHostComponent","appendOwnerState","otherProps","defaultContextValue","ClassNameConfiguratorContext","useClassNamesOverride","disableDefaultClasses","extractEventHandlers","excludeKeys","resolveComponentProps","componentProps","slotState","omitEventHandlers","mergeSlotProps","parameters","getSlotProps","additionalProps","externalSlotProps","externalForwardedProps","joinedClasses","mergedStyle","eventHandlers","componentsPropsWithoutEventHandlers","otherPropsWithoutEventHandlers","internalSlotProps","useSlotProps","_parameters$additiona","skipResolvingSlotProps","rest","resolvedComponentsProps","mergedProps","internalRef","GLOBAL_CLASS_PREFIX","buildStateClass","buildSlotClass","getContainer","container","forwardedRef","disablePortal","mountNode","setMountNode","handleRef","newProps","ReactDOM","top","bottom","right","left","auto","basePlacements","clippingParents","viewport","popper","reference","variationPlacements","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","getWindow","OwnElement","isHTMLElement","isShadowRoot","attributes","effect","_ref2","initialStyles","styleProperties","attribute","applyStyles$1","getBasePlacement","getUAString","uaData","isLayoutViewport","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","visualViewport","addVisualOffsets","getLayoutRect","contains","parent","rootNode","next","getComputedStyle","isTableElement","getDocumentElement","getParentNode","getTrueOffsetParent","getContainingBlock","isFirefox","isIE","elementCss","currentNode","getOffsetParent","window","offsetParent","getMainAxisFromPlacement","within","mathMax","mathMin","withinMaxClamp","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","arrow","_state$modifiersData$","arrowElement","popperOffsets","basePlacement","axis","isVertical","len","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","center","offset","axisProp","_options$element","arrow$1","getVariation","unsetSides","roundOffsetsByDPR","win","dpr","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","heightProp","widthProp","offsetY","offsetX","commonStyles","_ref4","_Object$assign","computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash","getOppositePlacement","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","scrollTop","getWindowScrollBarX","getViewportRect","strategy","html","layoutViewport","getDocumentRect","_element$ownerDocumen","winScroll","body","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","list","isBody","updatedList","rectToClientRect","rect","getInnerBoundingClientRect","getClientRectFromMixedType","clippingParent","getClippingParents","canEscapeClipping","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","allPlacements","allowedPlacements","overflows","getExpandedFallbackPlacements","oppositePlacement","flip","_options$mainAxis","checkMainAxis","_options$altAxis","checkAltAxis","specifiedFallbackPlacements","_options$flipVariatio","preferredPlacement","isBasePlacement","fallbackPlacements","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","check","numberOfChecks","_loop","_i","fittingPlacement","_ret","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","hide","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","rects","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","preventOverflow","_options$tether","tether","_options$tetherOffset","tetherOffset","altAxis","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","documentElement","order","modifiers","map","visited","modifier","sort","requires","dep","depModifier","orderModifiers","orderedModifiers","phase","pending","resolve","mergeByName","merged","current","existing","DEFAULT_OPTIONS","areValidElements","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptionsAction","cleanupModifierEffects","runModifierEffects","_state$elements","_state$orderedModifie","_state$orderedModifie2","_ref$options","cleanupFn","noopFn","createPopper","COMPONENT_NAME","getPopperUtilityClass","flipPlacement","resolveAnchorEl","anchorEl","isVirtualElement","defaultPopperOptions","PopperTooltip","_slots$root","initialPlacement","popperOptions","popperRefProp","TransitionProps","tooltipRef","ownRef","popperRef","handlePopperRef","handlePopperRefRef","rtlPlacement","setPlacement","resolvedAnchorElement","setResolvedAnchorElement","handlePopperUpdate","box","popperModifiers","childProps","Root","rootProps","Popper","containerProp","keepMounted","transition","exited","setExited","handleEnter","handleExited","resolvedAnchorEl","display","transitionProps","useThemeSystem","_setPrototypeOf","_inheritsLoose","subClass","superClass","setPrototypeOf","timeoutsShape","TransitionGroupContext","forceReflow","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","_this","parentGroup","appear","initialStatus","prevState","nextIn","_proto","prevProps","nextStatus","exit","enter","mounting","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","_this3","nextState","callback","_this4","active","handler","doesNotHaveTimeoutOrListener","maybeNextCallback","_this$props","pt","noop","Transition$1","reflow","getTransitionProps","_style$transitionDura","_style$transitionTimi","getScale","isWebKit154","Grow","addEndListener","inProp","onEnter","onEntered","onEntering","onExit","onExited","onExiting","TransitionComponent","timer","autoTimeout","nodeRef","normalizedTransitionCallback","maybeIsAppearing","handleEntering","isAppearing","transitionDuration","transitionTimingFunction","handleEntered","handleExiting","handleExit","Grow$1","PopperRoot","BasePopper","components","componentsProps","RootComponent","Popper$1","getTooltipUtilityClass","tooltipClasses","tooltipClasses$1","disableInteractive","touch","TooltipPopper","TooltipTooltip","TooltipArrow","hystersisOpen","hystersisTimer","cursorPosition","composeEventHandler","eventHandler","Tooltip","_slots$popper","_slots$transition","_slots$tooltip","_slots$arrow","_slotProps$popper","_ref6","_slotProps$popper2","_slotProps$transition","_slotProps$tooltip","_ref7","_slotProps$tooltip2","_slotProps$arrow","_ref8","_slotProps$arrow2","childrenProp","describeChild","disableFocusListener","disableHoverListener","disableInteractiveProp","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","idProp","leaveDelay","leaveTouchDelay","onClose","onOpen","openProp","PopperComponentProp","PopperProps","title","TransitionComponentProp","isRtl","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","handleOpen","handleClose","handleLeave","focusVisibleRef","setChildIsFocusVisible","handleBlur","handleFocus","detectTouchStart","childrenProps","handleMouseOver","handleMouseLeave","handleTouchStart","handleTouchEnd","nativeEvent","handleMouseMove","nameOrDescProps","titleIsString","interactiveWrapperListeners","_PopperProps$popperOp","tooltipModifiers","PopperComponent","TooltipComponent","ArrowComponent","popperProps","tooltipProps","tooltipArrowProps","TransitionPropsInner","Tooltip$1","getIcon","menuLabel","leading","MuiListItemIcon","MenuItem","onClick","tooltip","allowForLeadingIcons","iconPathBefore","iconPathAfter","hasAutoFocus","isDense","isSubMenuParent","hasDisabledGutters","hasDivider","focusVisibleClassName","menuItem","MuiMenuItem","MuiListItemText","getAllGroups","menuDefinition","SubMenu","setAnchorEl","parentMenuItem","parentItemProps","handleParentMenuItemClick","renderSubMenuItems","includedGroups","group","GroupedMenuItemList","Menu","getOrderedGroupItems","groupId","allItems","menuProps","commandHandler","groupsToInclude","sortedGroups","itemArray","allowSpaceForLeadingIcons","createMenuItemProps","isLastItemInGroup","divKey","itemInfo","menuItemProps","TopLevelMenu","columnId","MenuColumn","metadata","Grid","List","GridMenu","multiColumnMenu","sortedColumns","columnNumbers","columnName","col","getUsePromiseOptionsDefaults","usePromise","promiseFactoryCallback","defaultValueRef","optionsDefaultedRef","setIsLoading","promiseIsCurrent","MenuIcon","HamburgerMenuButton","menuProvider","normalMenu","fullMenu","containerRef","ariaLabelPrefix","isMenuOpen","setMenuOpen","showFullMenu","setShowFullMenu","handleMenuItemClick","handleMenuButtonClick","prevIsOpen","isOpening","menuCommandHandler","command","setOffset","normalMenuData","fullMenuData","menu","IconButton","Drawer","isTooltipSuppressed","adjustMarginToAlignToEdge","MuiIconButton","Spinner","LoaderCircle","TextField","hasError","helperText","onFocus","onBlur","ShadLabel","Toolbar","AppBar","MuiToolbar","alertVariants","Alert","AlertTitle","AlertDescription","badgeVariants","Badge","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","Sonner","Toaster","Slider","SliderPrimitive","Switch","SwitchPrimitives","Tabs","TabsList","TabsTrigger","TabsContent","InstallButton","isInstalling","handleClick","buttonText","Download","EnableButton","isEnabling","DisableButton","isDisabling","UpdateButton","isUpdating","MarkdownRenderer","markdown","anchorTarget","Markdown","FilterButton","Filter","DropdownMenuItemType","DropdownMenuItemType2","FilterDropdown","groups","NoExtensionsFound","MoreInfo","category","downloads","languages","moreInfoUrl","numberFormatted","NumberFormat","handleScrollToBottom","User","locale","LucideLink","CircleHelp","VersionHistory","versionHistory","showAllVersions","setShowAllVersions","currentDate","formatTimeString","dateString","date","dateDiff","yearDiff","monthDiff","dayDiff","timeString","sortedEntries","Footer","publisherDisplayName","fileSize","locales","formattedFileSize","formatBytes","languageNames","codes","displayNames","FILTERABLE_RESOURCE_LIST_STRING_KEYS","getLanguageOptions","dblResources","languageFilter","sortedLanguages","resource","prioritizedLanguages","aIsPrioritized","bIsPrioritized","getActionButtonContent","installResource","getActionContent","idsBeingHandled","getText","updateText","installedText","FilterableResourceList","isLoadingDblResources","typeFilter","setTypeFilter","setLanguageFilter","openResource","uninstallResource","actionText","dialogSubtitleText","dialogTitleText","filterInputText","fullNameText","languageText","languageFilterText","loadingResourcesText","noResultsText","openText","removeText","sizeText","typeText","typeDblText","typeErText","typeSlrText","typeXrText","typeUnknownText","installInfo","setInstallInfo","installOrRemoveResource","dblEntryUid","action","newInstallInfo","prevInfo","getErrorMessage","currentInstallInfo","res","textFilteredResources","filter","typeOptions","typeFilterChangeHandler","newType","prevTypeFilter","newTypeFilter","textAndTypeFilteredResources","languageFilterChangeHandler","newLanguage","prevLanguageFilter","newLanguageFilter","textAndTypeAndLanguageFilteredResources","sortConfig","setSortConfig","sortedResources","aValue","bValue","newSortConfig","BookOpen","Loader","Ellipsis","useEvent","unsubscriber","noopUnsubscriber","useEventAsync","unsubscribe","unsub"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,KAAgBC,GAAoB,EAAE,QAAQ,MAAO,CAAA;AAyDpD,SAASC,KAAMC,GAAsB;AACnC,SAAAH,GAAcI,GAAKD,CAAM,CAAC;AACnC;ACzDO,MAAME,KAAQC,EAAM;AAAA,EACzB,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,EAAA,GAASC,MAE5B,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAAH;AAAA,MACA,WAAWN;AAAA,QACT;AAAA,QACAK;AAAA,MACF;AAAA,MACA,KAAAG;AAAA,MAEC,GAAGD;AAAA,IAAA;AAAA,EAAA;AAIZ;AACAJ,GAAM,cAAc;ACNpB,MAAMO,KAAmBC;AAAA,EACvB,CACE,EAAE,cAAAC,GAAc,eAAAC,GAAe,eAAAC,GAAe,cAAAC,GAAc,GAAGR,EAAM,GACrEC,MAGE,gBAAAQ,EAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,IAAA,gBAAAP;AAAA,MAACQ;AAAAA,MAAA;AAAA,QACE,GAAGV;AAAA,QACJ,MAAK;AAAA,QACL,WAAU;AAAA,QACV,UAAU,CAACW,MAAUN,EAAaM,EAAM,OAAO,KAAK;AAAA,QACpD,WAAW,CAACC,MAAM;AACZ,UAAAA,EAAE,QAAQ,WACCJ,KAEfF,EAAcM,CAAC;AAAA,QACjB;AAAA,QACA,SAASL;AAAA,QACT,KAAAN;AAAA,MAAA;AAAA,IACF;AAAA,IACA,gBAAAC;AAAA,MAACW;AAAA,MAAA;AAAA,QACC,WAAU;AAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,222]} \ No newline at end of file diff --git a/lib/platform-bible-react/src/components/advanced/filterable-resource-list/filterable-resource-list.component.tsx b/lib/platform-bible-react/src/components/advanced/filterable-resource-list/filterable-resource-list.component.tsx new file mode 100644 index 0000000000..a438248637 --- /dev/null +++ b/lib/platform-bible-react/src/components/advanced/filterable-resource-list/filterable-resource-list.component.tsx @@ -0,0 +1,500 @@ +import ComboBox from '@/components/basics/combo-box.component'; +import Spinner from '@/components/basics/spinner.component'; +import { Button } from '@/components/shadcn-ui/button'; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from '@/components/shadcn-ui/card'; +import { + DropdownMenu, + DropdownMenuCheckboxItem, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from '@/components/shadcn-ui/dropdown-menu'; +import { Input } from '@/components/shadcn-ui/input'; +import { Label } from '@/components/shadcn-ui/label'; +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from '@/components/shadcn-ui/table'; +import { + BookOpen, + ChevronDown, + ChevronsUpDown, + ChevronUp, + Ellipsis, + Loader, + Search, +} from 'lucide-react'; + +import { + DblResourceData, + getErrorMessage, + LanguageStrings, + LocalizeKey, + ResourceType, +} from 'platform-bible-utils'; +import { useEffect, useMemo, useState } from 'react'; + +export const FILTERABLE_RESOURCE_LIST_STRING_KEYS: LocalizeKey[] = [ + '%resources_action%', + '%resources_dialog_subtitle%', + '%resources_dialog_title%', + '%resources_filterInput%', + '%resources_fullName%', + '%resources_get%', + '%resources_installed%', + '%resources_language%', + '%resources_languageFilter%', + '%resources_loadingResources%', + '%resources_noResults%', + '%resources_open%', + '%resources_remove%', + '%resources_size%', + '%resources_type%', + '%resources_type_DBL%', + '%resources_type_ER%', + '%resources_type_SLR%', + '%resources_type_XR%', + '%resources_type_unknown%', + '%resources_update%', +]; + +type InstallInfo = { + dblEntryUid: string; + action: 'installing' | 'removing'; +}; + +type SortConfig = { + key: 'fullName' | 'bestLanguageName'; + direction: 'ascending' | 'descending'; +}; + +type TypeOptions = { + type: ResourceType; + localizedValue: string; +}; + +const getLanguageOptions = ( + dblResources: DblResourceData[], + languageFilter: string[], +): string[] => { + const sortedLanguages = Array.from( + new Set(dblResources.map((resource) => resource.bestLanguageName)), + ); + + const prioritizedLanguages = new Set( + languageFilter.concat( + dblResources + .filter((resource) => resource.installed) + .map((resource) => resource.bestLanguageName), + ), + ); + + return sortedLanguages.sort((a, b) => { + const aIsPrioritized = prioritizedLanguages.has(a); + const bIsPrioritized = prioritizedLanguages.has(b); + + if (aIsPrioritized && bIsPrioritized) { + return a.localeCompare(b); + } + if (aIsPrioritized) return -1; + if (bIsPrioritized) return 1; + + return a.localeCompare(b); + }); +}; + +const getActionButtonContent = ( + resource: DblResourceData, + buttonText: string, + installResource: (dblEntryUid: string, action: 'install' | 'remove') => void, +) => { + return ( + + ); +}; + +const getActionContent = ( + resource: DblResourceData, + idsBeingHandled: string[], + getText: string, + updateText: string, + installedText: string, + installResource: (dblEntryUid: string, action: 'install' | 'remove') => void, +) => { + const isBeingHandled = idsBeingHandled.includes(resource.dblEntryUid); + if (isBeingHandled) { + return ( + + ); + } + if (!resource.installed) { + return getActionButtonContent(resource, getText, installResource); + } + if (resource.updateAvailable) { + return getActionButtonContent(resource, updateText, installResource); + } + return ; +}; + +type FilterableResourceListProps = { + localizedStrings: LanguageStrings; + dblResources: DblResourceData[]; + isLoadingDblResources: boolean; + typeFilter: ResourceType[]; + setTypeFilter: (stateValue: ResourceType[]) => void; + languageFilter: string[]; + setLanguageFilter: (stateValue: string[]) => void; + openResource: (projectId: string) => void; + installResource: ((uid: string) => Promise) | undefined; + uninstallResource: ((uid: string) => Promise) | undefined; +}; + +function FilterableResourceList({ + localizedStrings, + dblResources, + isLoadingDblResources, + typeFilter, + setTypeFilter, + languageFilter, + setLanguageFilter, + openResource, + installResource, + uninstallResource, +}: FilterableResourceListProps) { + const actionText: string = localizedStrings['%resources_action%']; + const dialogSubtitleText: string = localizedStrings['%resources_dialog_subtitle%']; + const dialogTitleText: string = localizedStrings['%resources_dialog_title%']; + const filterInputText: string = localizedStrings['%resources_filterInput%']; + const fullNameText: string = localizedStrings['%resources_fullName%']; + const getText: string = localizedStrings['%resources_get%']; + const installedText: string = localizedStrings['%resources_installed%']; + const languageText: string = localizedStrings['%resources_language%']; + const languageFilterText: string = localizedStrings['%resources_languageFilter%']; + const loadingResourcesText: string = localizedStrings['%resources_loadingResources%']; + const noResultsText: string = localizedStrings['%resources_noResults%']; + const openText: string = localizedStrings['%resources_open%']; + const removeText: string = localizedStrings['%resources_remove%']; + const sizeText: string = localizedStrings['%resources_size%']; + const typeText: string = localizedStrings['%resources_type%']; + const typeDblText: string = localizedStrings['%resources_type_DBL%']; + const typeErText: string = localizedStrings['%resources_type_ER%']; + const typeSlrText: string = localizedStrings['%resources_type_SLR%']; + const typeXrText: string = localizedStrings['%resources_type_XR%']; + const typeUnknownText: string = localizedStrings['%resources_type_unknown%']; + const updateText: string = localizedStrings['%resources_update%']; + + const [installInfo, setInstallInfo] = useState([]); + + const installOrRemoveResource = (dblEntryUid: string, action: 'install' | 'remove'): void => { + if (!installResource || !uninstallResource) return; + const newInstallInfo: InstallInfo = { + dblEntryUid, + action: action === 'install' ? 'installing' : 'removing', + }; + + setInstallInfo((prevInfo) => [...prevInfo, newInstallInfo]); + + const actionFunction = action === 'install' ? installResource : uninstallResource; + + actionFunction(dblEntryUid).catch((error) => { + console.debug(getErrorMessage(error)); + }); + }; + + /** Removes resources from array of resources that are currently being handled */ + useEffect(() => { + setInstallInfo((currentInstallInfo) => + currentInstallInfo.filter((info) => { + const resource = dblResources.find((res) => res.dblEntryUid === info.dblEntryUid); + + if (!resource) return true; + + if (info.action === 'installing' && resource.installed) return false; + if (info.action === 'removing' && !resource.installed) return false; + + return true; + }), + ); + }, [dblResources]); + + const [textFilter, setTextFilter] = useState(''); + + const textFilteredResources = useMemo(() => { + return dblResources.filter((resource) => { + const filter = textFilter.toLowerCase(); + return ( + resource.displayName.toLowerCase().includes(filter) || + resource.fullName.toLowerCase().includes(filter) || + resource.bestLanguageName.toLowerCase().includes(filter) + ); + }); + }, [dblResources, textFilter]); + + const typeOptions: TypeOptions[] = useMemo(() => { + return [ + { type: 'DBLResource', localizedValue: typeDblText }, + { type: 'EnhancedResource', localizedValue: typeErText }, + { type: 'SourceLanguageResource', localizedValue: typeSlrText }, + { type: 'XmlResource', localizedValue: typeXrText }, + ]; + }, [typeDblText, typeErText, typeSlrText, typeXrText]); + + const typeFilterChangeHandler = (newType: ResourceType): void => { + const prevTypeFilter: ResourceType[] = [...typeFilter]; + let newTypeFilter: ResourceType[] = []; + + if (!prevTypeFilter || prevTypeFilter.length === 0) { + newTypeFilter = [newType]; + } else { + newTypeFilter = prevTypeFilter.includes(newType) + ? prevTypeFilter.filter((value) => value !== newType) + : [...prevTypeFilter, newType]; + } + setTypeFilter(newTypeFilter); + }; + + const textAndTypeFilteredResources = useMemo(() => { + return textFilteredResources.filter((resource) => { + return typeFilter.includes(resource.type); + }); + }, [textFilteredResources, typeFilter]); + + useEffect(() => { + if (languageFilter.length === 0) { + setLanguageFilter( + dblResources + .filter((resource) => resource.installed === true) + .map((resource) => resource.bestLanguageName), + ); + } + }, [dblResources, languageFilter.length, setLanguageFilter]); + + const languageFilterChangeHandler = (newLanguage: string): void => { + const prevLanguageFilter: string[] = [...languageFilter]; + let newLanguageFilter: string[] = []; + + if (!prevLanguageFilter || prevLanguageFilter.length === 0) { + newLanguageFilter = [newLanguage]; + } else { + newLanguageFilter = prevLanguageFilter.includes(newLanguage) + ? prevLanguageFilter.filter((value) => value !== newLanguage) + : [...prevLanguageFilter, newLanguage]; + } + setLanguageFilter(newLanguageFilter); + }; + + const textAndTypeAndLanguageFilteredResources = useMemo(() => { + return textAndTypeFilteredResources.filter((resource) => { + return languageFilter.includes(resource.bestLanguageName); + }); + }, [languageFilter, textAndTypeFilteredResources]); + + const [sortConfig, setSortConfig] = useState({ + key: 'bestLanguageName', + direction: 'ascending', + }); + + const sortedResources = useMemo(() => { + return [...textAndTypeAndLanguageFilteredResources].sort((a, b) => { + const aValue = a[sortConfig.key]; + const bValue = b[sortConfig.key]; + + if (aValue < bValue) { + return sortConfig.direction === 'ascending' ? -1 : 1; + } + if (aValue > bValue) { + return sortConfig.direction === 'ascending' ? 1 : -1; + } + return 0; + }); + }, [sortConfig.direction, sortConfig.key, textAndTypeAndLanguageFilteredResources]); + + const handleSort = (key: SortConfig['key']) => { + const newSortConfig: SortConfig = { key, direction: 'ascending' }; + if (sortConfig.key === key && sortConfig.direction === 'ascending') { + newSortConfig.direction = 'descending'; + } + setSortConfig(newSortConfig); + }; + + return ( + + +
+ +
+ {dialogTitleText} + {dialogSubtitleText} +
+
+
+ + {isLoadingDblResources || !dblResources ? ( +
+ + +
+ ) : ( +
+
+
+ setTextFilter(event.target.value)} + value={textFilter} + placeholder={filterInputText} + /> + +
+ + + + + + {typeOptions.map((option) => ( + { + e.preventDefault(); + typeFilterChangeHandler(option.type); + }} + > + {option.localizedValue} + + ))} + + + +
+ + {sortedResources.length === 0 ? ( +
+ +
+ ) : ( + + + + + + handleSort('fullName')}> +
+ {fullNameText} + {sortConfig.key !== 'fullName' && ( + + )} + {sortConfig.key === 'fullName' && + (sortConfig.direction === 'ascending' ? ( + + ) : ( + + ))} +
+
+ handleSort('bestLanguageName')}> +
+ {languageText} + {sortConfig.key !== 'bestLanguageName' && ( + + )} + {sortConfig.key === 'bestLanguageName' && + (sortConfig.direction === 'ascending' ? ( + + ) : ( + + ))} +
+
+ {typeText} + {sizeText} + {actionText} +
+
+ + {sortedResources.map((resource) => ( + + + + + {resource.displayName} + {resource.fullName} + {resource.bestLanguageName} + + {typeOptions.find((type) => type.type === resource.type)?.localizedValue ?? + typeUnknownText} + + {resource.size} + +
+ {getActionContent( + resource, + installInfo.map((info) => info.dblEntryUid), + getText, + updateText, + installedText, + installOrRemoveResource, + )} + {resource.installed && ( + + + + + + openResource(resource.projectId)}> + {openText} + + + + + installOrRemoveResource(resource.dblEntryUid, 'remove') + } + > + {removeText} + + + + )} +
+
+
+ ))} +
+
+ )} +
+ )} +
+
+ ); +} + +export default FilterableResourceList; diff --git a/lib/platform-bible-react/src/index.ts b/lib/platform-bible-react/src/index.ts index 2009204d3b..1d5b56d685 100644 --- a/lib/platform-bible-react/src/index.ts +++ b/lib/platform-bible-react/src/index.ts @@ -138,6 +138,8 @@ export { type VersionHistoryType, } from './components/advanced/extension-marketplace/version-history.component'; export { default as Footer } from './components/advanced/extension-marketplace/footer.component'; +export { default as FilterableResourceList } from './components/advanced/filterable-resource-list/filterable-resource-list.component'; +export { FILTERABLE_RESOURCE_LIST_STRING_KEYS } from './components/advanced/filterable-resource-list/filterable-resource-list.component'; // Hooks export { default as useEvent } from './hooks/use-event.hook'; diff --git a/lib/platform-bible-utils/dist/index.d.ts b/lib/platform-bible-utils/dist/index.d.ts index b72fb10fdb..b7454e5342 100644 --- a/lib/platform-bible-utils/dist/index.d.ts +++ b/lib/platform-bible-utils/dist/index.d.ts @@ -1797,6 +1797,18 @@ export declare const localizedStringsDocumentSchema: { }; }; }; +export type ResourceType = "DBLResource" | "EnhancedResource" | "XmlResource" | "SourceLanguageResource"; +export type DblResourceData = { + dblEntryUid: string; + displayName: string; + fullName: string; + bestLanguageName: string; + type: ResourceType; + size: number; + installed: boolean; + updateAvailable: boolean; + projectId: string; +}; /** The data an extension provides to inform Platform.Bible of the settings it provides */ export type SettingsContribution = SettingsGroup | SettingsGroup[]; /** A description of an extension's setting entry */ diff --git a/lib/platform-bible-utils/src/index.ts b/lib/platform-bible-utils/src/index.ts index e2546217e1..857255b0f0 100644 --- a/lib/platform-bible-utils/src/index.ts +++ b/lib/platform-bible-utils/src/index.ts @@ -127,6 +127,7 @@ export type { Localized, } from './menus.model'; export { menuDocumentSchema } from './menus.model'; +export type { DblResourceData, ResourceType } from './resources.model'; export type { ExtensionControlledProjectSetting, ExtensionControlledSetting, diff --git a/lib/platform-bible-utils/src/resources.model.ts b/lib/platform-bible-utils/src/resources.model.ts new file mode 100644 index 0000000000..53d9fd00c0 --- /dev/null +++ b/lib/platform-bible-utils/src/resources.model.ts @@ -0,0 +1,17 @@ +export type ResourceType = + | 'DBLResource' + | 'EnhancedResource' + | 'XmlResource' + | 'SourceLanguageResource'; + +export type DblResourceData = { + dblEntryUid: string; + displayName: string; + fullName: string; + bestLanguageName: string; + type: ResourceType; + size: number; + installed: boolean; + updateAvailable: boolean; + projectId: string; +};